annotate test_para4.c @ 29:a94136a6edb2 default tip

fix for LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 17 Jul 2021 14:38:29 +0900
parents 51f8521bc5d1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
1 //#include<stdio.h>
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
2 //#include<stdlib.h>
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
3
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
4 extern int printf(const char*, ...);
28
51f8521bc5d1 remove warnings
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 27
diff changeset
5 extern void exit(int status);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 #define DPRINT 1
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 #define NOINLINE __attribute__((noinline))
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 extern __code cs_goto(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j,
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
11 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 extern __code cs0(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j,
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
13 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 __code (*csp)(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j,
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
16 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 __code NOINLINE cs_exit(int a){
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
19 int b = 20 * a + 3;
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
20 printf("cs_exit : a=%d. b=%d\n", a, b);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
21 exit(a);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 }
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 __code NOINLINE cs0(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j,
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
25 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2){
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 #if DPRINT
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
27 //printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d.\n", a, b, c, d, e, f, g);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
28 printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
29 a, b, c, d, e, f, g, h, i, j);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
30 printf("cs0 : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
31 a2, b2, c2, d2, e2, f2, g2, h2, i2, j2);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 #endif
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
33 goto cs_exit( (int)(10*a + 10*b + 10*i2 + 10*j2) );
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 }
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 __code NOINLINE cs_goto(int a, int b, int c, int d, int e, int f, int g, int h, int i, int j,
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
37 int a2, int b2, int c2, int d2, int e2, int f2, int g2, int h2, int i2, int j2){
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 #if DPRINT
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
39 printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
40 a, b, c, d, e, f, g, h, i, j);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
41 printf("cs_goto : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
42 a2, b2, c2, d2, e2, f2, g2, h2, i2, j2);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 #endif
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
44 goto cs0(b, c, d, e, f, g, h, i, j, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, a);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 }
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
47 int function(double l, float m, int n){
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
48 int a=10, b=20, c=30, d=40, e=50, f=60, g=70, h=80, i=90, j=100;
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
49 int a2=110, b2=120, c2=130, d2=140, e2=150, f2=160, g2=170, h2=180, i2=190, j2=200;
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #if DPRINT
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
52 printf("function: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
53 a, b, c, d, e, f, g, h, i, j);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
54 printf("function: a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
55 a2, b2, c2, d2, e2, f2, g2, h2, i2, j2);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
56 //printf("l=%lf, m=%f, n=%d\n", l, m, n);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 #endif
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
58 //goto cs_goto(10, 20, 30, 40);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
59 goto cs_goto(a, b, c, d, e, f, g, h, i, j, a2, b2, c2, d2, e2, f2, g2, h2, i2, j2);
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 }
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 int main(int argc, char **argv){
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
27
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
65 //printf("main :\n");
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
66 /*
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
67 printf("main : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
68 a, b, c, d, e, f, g, h, i, j);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
69 printf("main : a=%d, b=%d, c=%d, d=%d, e=%d, f=%d, g=%d, h=%d, i=%d, j=%d\n",
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
70 a2, b2, c2, d2, e2, f2, g2, h2, i2, j2);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
71 */
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
72 //csp = cs0;
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
73 function(10.01, 20.02, 30);
586096c45873 clean up
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 2
diff changeset
74 return 0;
0
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 }
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76
bacef8675607 init repository
Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77