annotate test/arg.c @ 492:cc1a5f764782

*** empty log message ***
author kono
date Wed, 21 Dec 2005 12:10:43 +0900
parents 0c256ea2a97e
children 682c8ec38d45
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
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
3 struct arg {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
4 int a0;int a1;int a2;int a3;int a4;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
5 };
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
6
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
7 void *exit_env;
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
8 code (*exit_code)();
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
9
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
10 code carg1(int arg0,int arg1,int arg2,int arg3,int arg4,code(*exit1)(),void *env)
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
11 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
12 printf("#0011: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
13 goto carg2(arg1,arg2,arg3,arg4,arg0,exit1,env);
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
14 }
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
15
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
16 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
17 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
18 struct arg args0;
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
19 printf("#0018: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
20 args0.a0 = arg0;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
21 args0.a1 = arg1;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
22 args0.a2 = arg2;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
23 args0.a3 = arg3;
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
24 args0.a4 = arg4;
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
25 goto cargs(args0,exit1,env);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
26 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
27
55
94564b45c4f3 all save implementation of parallel assignment
kono
parents: 54
diff changeset
28 code cargs(struct arg args0,code exit1(),void *env)
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
29 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
30 printf("#0029:args: %d %d %d %d %d : %x %x\n",
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
31 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
32 exit1==exit_code,env==exit_env);
77
2b8ba655e572 fix arg type
kono
parents: 57
diff changeset
33 // goto exit1(321),env;
172
096559f07a70 some check
kono
parents: 79
diff changeset
34 goto (*exit1)(0),env;
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
35 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
36
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
37
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
38 code carg3(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
39 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
40 printf("#0039:args3: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
41 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
42 printf("#0041: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
43 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,
c73f013d07d7 ARM complete. PowerPC, MIPS, IA32 checked.
kono
parents: 193
diff changeset
44 args1.a0,args1.a1,args1.a2,args1.a3,args1.a4,
c73f013d07d7 ARM complete. PowerPC, MIPS, IA32 checked.
kono
parents: 193
diff changeset
45 i,j,k,l);
172
096559f07a70 some check
kono
parents: 79
diff changeset
46 if (args0.a0==args1.a0) exit(0);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
47 goto carg4(args0,args1,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
48 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
49
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
50 code carg4(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
51 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
52 printf("#0051:args4: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
53 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
54 goto carg5(args1,args0,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
55 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
56
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
57 code carg5(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
58 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
59 printf("#0058:args5: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
60 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
61 goto carg6(i,j,k,l,args0);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
62 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
63
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
64 code carg6(int i, int j,int k,int l,struct arg args0)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
65 {
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
66 printf("#0065:args6: %d %d %d %d %d : %x %x %x %x\n",
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
67 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
68 goto carg3(args0,args0,i,j,k,l);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
69 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
70
54
kono
parents: 53
diff changeset
71 int main1(int n)
kono
parents: 53
diff changeset
72 {
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
73 goto carg1(0,1,2,3,4,exit_code=return,exit_env=environment);
54
kono
parents: 53
diff changeset
74 return n;
kono
parents: 53
diff changeset
75 }
kono
parents: 53
diff changeset
76
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
77 struct arg a00;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
78 struct arg a01;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
79
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
80 int main( int ac, char *av[])
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
81 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
82 int n;
54
kono
parents: 53
diff changeset
83 n = main1(123);
427
0c256ea2a97e Bitfield left value for ia32
kono
parents: 418
diff changeset
84 printf("#0083:321=%d\n",n);
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
85
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
86 a00.a0 = 11;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
87 a00.a1 = 22;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
88 a00.a2 = 33;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
89 a00.a3 = 44;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
90 a00.a4 = 55;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
91 a01.a0 = 66;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
92 a01.a1 = 77;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
93 a01.a2 = 88;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
94 a01.a3 = 99;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
95 a01.a4 = 10;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
96 goto carg3(a00,a01,1,2,3,4);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
97 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
98