annotate test/goto.c @ 775:a2a7b2835fa3

ia32 regression test
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Thu, 18 Nov 2010 21:25:30 +0900
parents c2c709727221
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
1 #define __environment _CbC_environment
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
2 #define __return _CbC_return
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
3
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
4 extern int printf(const char *,...);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
5
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
6 __code (*conv)(int,__code (*)());
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
7 __code a2(int i,__code conv());
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
8 __code a3(int i,__code conv());
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
9 __code a4(int i,__code conv());
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
10 __code a5(int i,__code conv());
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
11 __code a6();
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
12 __code a7();
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
13 __code a8();
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
14 __code a9();
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
15
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
16 char* print_conv(__code conv());
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
17
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
18 __code (*exit0)(int,void*);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
19 void *env;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
20
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
21 __code
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
22 a2(int i,__code conv())
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
23 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
24 printf("#0023:a2 %d %s\n",i,print_conv(conv));
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
25 goto conv(i+1,a4);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
26 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
27
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
28 __code
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
29 a3(int i,__code (*conv)())
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
30 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
31 printf("#0030:a3 %d %s\n",i,print_conv(conv));
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
32 goto conv(i+1,a5);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
33 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
34
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
35 __code
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
36 a4(int i,__code conv())
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
37 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
38 printf("#0037:a4 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
39 goto (*conv)(i+1,a6);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
40 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
41
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
42 __code
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
43 a5(int i,__code (*conv)())
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
44 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
45 printf("#0044:a5 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
46 goto (*conv)(i+1,i+2,i+3,a7);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
47 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
48
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
49 __code
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
50 a6(int i,int j,int k,__code conv())
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
51 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
52 printf("#0051:a6 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
53 goto conv(i+1,j,k,a8);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
54 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
55
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
56 __code
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
57 a7(int i,int j,int k,__code (*conv)())
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
58 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
59 printf("#0058:a7 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
60 goto conv(i+1,j,k,a9);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
61 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
62
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
63 __code
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
64 a8(int i,int j,int k,__code conv())
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
65 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
66 printf("#0065:a8 %d %s\n",i,print_conv(conv));
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
67 goto (*conv)(i+1,j,k,exit0);
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
68 }
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
69
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
70 __code
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
71 a9(int i,int j,int k,__code (*conv)())
80
83d901658ce9 *** empty log message ***
kono
parents: 79
diff changeset
72 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
73 printf("#0072:a9 %d %s\n",i,print_conv(conv));
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
74 goto (*conv)(0,env);
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
75 }
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
76
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
77 main(int ac,char *av[]) {
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
78 exit0 = __return;
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
79 env = __environment;
79
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
80 conv = a2;
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
81 goto conv(1,a3);
82d0e30f61dd *** empty log message ***
kono
parents:
diff changeset
82 }
572
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
83
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
84 char*
622
682c8ec38d45 _code へ
kono
parents: 573
diff changeset
85 print_conv(__code conv())
572
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
86 {
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
87 if(conv==a2) return "a2";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
88 if(conv==a3) return "a3";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
89 if(conv==a4) return "a4";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
90 if(conv==a5) return "a5";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
91 if(conv==a6) return "a6";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
92 if(conv==a7) return "a7";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
93 if(conv==a8) return "a8";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
94 if(conv==a9) return "a9";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
95 else return "xx";
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
96 }