Mercurial > hg > CbC > CbC_examples
annotate test_para4.c @ 5:90e6146d24cd
fix stack1.c
author | Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 22 Oct 2014 19:02:57 +0900 |
parents | 35d6eabeadb0 |
children | 586096c45873 |
rev | line source |
---|---|
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
1 #include<stdio.h> |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
2 #include<stdlib.h> |
0 | 3 |
4 #define DPRINT 1 | |
5 #define NOINLINE __attribute__((noinline)) | |
6 | |
7 extern __code cs_goto(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
8 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2); |
0 | 9 extern __code cs0(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
10 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2); |
0 | 11 |
12 __code (*csp)(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
13 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2); |
0 | 14 |
15 __code NOINLINE cs_exit(int a){ | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
16 int b = 20 * a + 3; |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
17 printf("cs_exit : a=%d. b=%d\n", a, b); |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
18 exit(a); |
0 | 19 } |
20 | |
21 __code NOINLINE cs0(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
22 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2){ |
0 | 23 #if DPRINT |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
24 printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
25 a, b, c, d, e, f, g, h, i, j); |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
26 printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
27 a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); |
0 | 28 #endif |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
29 goto cs_exit( (int)(10*a + 10*b + 10*i2 + 10*j2) ); |
0 | 30 } |
31 | |
32 __code NOINLINE cs_goto(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j, | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
33 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2){ |
0 | 34 #if DPRINT |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
35 printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
36 a, b, c, d, e, f, g, h, i, j); |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
37 printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
38 a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); |
0 | 39 #endif |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
40 goto cs0(b, c, d, e, f, g, h, i, j, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, a); |
0 | 41 } |
42 | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
43 void function(double l, float m, int n){ |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
44 int a=10, b=20, c=30, d=40, e=50, f=60, g=70, h=80, i=90, j=100; |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
45 int a2=110, b2=120, c2=130, d2=140, e2=150, f2=160, g2=170, h2=180, i2=190, j2=200; |
0 | 46 |
47 #if DPRINT | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
48 printf("function: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
49 a, b, c, d, e, f, g, h, i, j); |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
50 printf("function: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n", |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
51 a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); |
0 | 52 #endif |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
53 goto cs_goto(a, b, c, d, e, f, g, h, i, j, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2); |
0 | 54 } |
55 | |
56 | |
57 int main(int argc, char **argv){ | |
58 | |
2
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
59 function(10.01, 20.02, 30); |
35d6eabeadb0
modify Makefile. we can use makefile to compile outside CbC examples. (some examples are not compilable...)
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
60 return 0; |
0 | 61 } |
62 | |
63 |