annotate test/arg.c @ 751:c921670e2ce8

i64 continue... 64bit register
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 14 Nov 2010 04:56:02 +0900
parents c2c709727221
children 5313ed059cee
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
1 #include "stdio.h"
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
2
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
3 #define __environment _CbC_environment
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
4 #define __return _CbC_return
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
5
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
6
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
7 struct arg {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
8 int a0;int a1;int a2;int a3;int a4;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
9 };
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
10
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
11 extern void exit(int);
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
12
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
13 void *exit_env;
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
14 __code (*exit___code)();
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
15
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
16 __code carg1(int arg0,int arg1,int arg2,int arg3,int arg4,__code(*exit1)(),void *env)
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
17 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
18 printf("#0017:arg1: %d %d %d %d %d : %x %x\n",arg0,arg1,arg2,arg3,arg4,exit1==exit___code,env==exit_env);
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
19 goto carg2(arg1,arg2,arg3,arg4,arg0,exit1,env);
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
20 }
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
21
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
22 __code carg2(int arg0,int arg1,int arg2,int arg3,int arg4,__code(*exit1)(),void *env)
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
23 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
24 struct arg args0;
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
25 printf("#0024:arg1: %d %d %d %d %d : %x %x\n",arg0,arg1,arg2,arg3,arg4,exit1==exit___code,env==exit_env );
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
26 args0.a0 = arg0;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
27 args0.a1 = arg1;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
28 args0.a2 = arg2;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
29 args0.a3 = arg3;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
30 args0.a4 = arg4;
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
31 goto cargs(args0,exit1,env);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
32 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
33
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
34 __code cargs(struct arg args0,__code exit1(),void *env)
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
35 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
36 printf("#0035:args: %d %d %d %d %d : %x %x\n",
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
37 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
38 exit1==exit___code,env==exit_env);
77
2b8ba655e572 fix arg type
kono
parents: 57
diff changeset
39 // goto exit1(321),env;
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
40 goto (*exit1)(0,env);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
41 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
42
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
43
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
44 __code carg3(struct arg args0,struct arg args1,int i, int j,int k,int l)
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
45 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
46 printf("#0045:args3: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
47 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
48 printf("#0047:args3: args0 %d %d %d %d %d : args1 %d %d %d %d %d : %x %x %x %x\n",
418
c73f013d07d7 ARM complete. PowerPC, MIPS, IA32 checked.
kono
parents: 193
diff changeset
49 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,
c73f013d07d7 ARM complete. PowerPC, MIPS, IA32 checked.
kono
parents: 193
diff changeset
50 args1.a0,args1.a1,args1.a2,args1.a3,args1.a4,
c73f013d07d7 ARM complete. PowerPC, MIPS, IA32 checked.
kono
parents: 193
diff changeset
51 i,j,k,l);
172
096559f07a70 some check
kono
parents: 79
diff changeset
52 if (args0.a0==args1.a0) exit(0);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
53 goto carg4(args0,args1,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
54 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
55
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
56 __code carg4(struct arg args0,struct arg args1,int i, int j,int k,int l)
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
57 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
58 printf("#0057:args4: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
59 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
60 goto carg5(args1,args0,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
61 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
62
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
63 __code carg5(struct arg args0,struct arg args1,int i, int j,int k,int l)
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
64 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
65 printf("#0064:args5: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
66 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
67 goto carg6(i,j,k,l,args0);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
68 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
69
622
682c8ec38d45 _code へ
kono
parents: 427
diff changeset
70 __code carg6(int i, int j,int k,int l,struct arg args0)
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
71 {
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
72 printf("#0071:args6: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
73 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
74 goto carg3(args0,args0,i,j,k,l);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
75 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
76
54
kono
parents: 53
diff changeset
77 int main1(int n)
kono
parents: 53
diff changeset
78 {
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
79 goto carg1(0,1,2,3,4,exit___code=__return,exit_env=__environment);
54
kono
parents: 53
diff changeset
80 return n;
kono
parents: 53
diff changeset
81 }
kono
parents: 53
diff changeset
82
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
83 struct arg a00;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
84 struct arg a01;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
85
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
86 int main( int ac, char *av[])
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
87 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
88 int n;
54
kono
parents: 53
diff changeset
89 n = main1(123);
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
90 printf("#0089:321=%d\n",n);
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
91
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
92 a00.a0 = 11;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
93 a00.a1 = 22;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
94 a00.a2 = 33;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
95 a00.a3 = 44;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
96 a00.a4 = 55;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
97 a01.a0 = 66;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
98 a01.a1 = 77;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
99 a01.a2 = 88;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
100 a01.a3 = 99;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
101 a01.a4 = 10;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
102 goto carg3(a00,a01,1,2,3,4);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
103 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
104