Changeset 136 for trunk/Softwares/Test
- Timestamp:
- Oct 20, 2009, 8:52:15 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Softwares/Test/Test_073/src/c/main.c
r121 r136 9 9 #include <stdlib.h> 10 10 11 static unsigned int x; 11 int f (int x) 12 { 13 int x1, x2, x3, x4, x5, x6, x7, x8; 14 15 x1=x2=x3=x4=x5=x6=x7=x8=1; 16 17 for (int i=0; i<x; ++i) 18 { 19 x1 += 2; 20 x2 += 3; 21 x3 += 5; 22 x4 += 7; 23 x5 += 9; 24 x6 +=11; 25 x7 +=13; 26 x8 +=17; 27 } 12 28 13 void f0 (); 14 void f1 (); 15 void f2 (); 16 void f3 (); 17 void f4 (); 18 void f5 (); 19 void f6 (); 20 void f7 (); 21 void f8 (); 22 void f9 (); 29 return x1+x2+x3+x4+x5+x6+x7+x8; 30 } 23 31 24 void f0 () { f1(); x++;}25 void f1 () { f2(); x++;}26 void f2 () { f3(); x++;}27 void f3 () { f4(); x++;}28 void f4 () { f5(); x++;}29 void f5 () { f6(); x++;}30 void f6 () { f7(); x++;}31 void f7 () { f8(); x++;}32 void f8 () { f9(); x++;}33 void f9 () { x++;}34 32 35 33 int main() 36 34 { 37 int i0,i1,i2,i3,i4; 38 const int it0 = 1000; 39 const int it1 = 100; 40 const int it3 = 10; 41 42 for (i0 = 0; i0 < it0; ++i0); 35 f(1000); 43 36 44 37 38 unsigned int * addr = (unsigned int*)((0xa0000000) + 4); 39 /* *(addr) = a+b+c+d; */ 40 *(addr) = 0; 45 41 46 47 /* f0 (); */48 49 unsigned int * addr = (unsigned int*)((0xa0000000) + 4);50 *(addr) = 0;51 52 42 /* _exit (0); */ 53 43
Note: See TracChangeset
for help on using the changeset viewer.