annotate test/arg.c @ 193:ce0c38b6c85e

try long long
author kono
date Sun, 14 Dec 2003 16:53:42 +0900
parents 096559f07a70
children c73f013d07d7
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 {
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
12 printf("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;
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
19 printf("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 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
30 printf("args: %d %d %d %d %d : %x %x\n",
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 {
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
40 printf("args3: %d %d %d %d %d : %x %x %x %x\n",
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
41 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
172
096559f07a70 some check
kono
parents: 79
diff changeset
42 if (args0.a0==args1.a0) exit(0);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
43 goto carg4(args0,args1,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
44 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
45
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
46 code carg4(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
47 {
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
48 printf("args4: %d %d %d %d %d : %x %x %x %x\n",
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
49 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
50 goto carg5(args1,args0,j,k,l,i);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
51 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
52
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
53 code carg5(struct arg args0,struct arg args1,int i, int j,int k,int l)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
54 {
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
55 printf("args5: %d %d %d %d %d : %x %x %x %x\n",
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
56 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
57 goto carg6(i,j,k,l,args0);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
58 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
59
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
60 code carg6(int i, int j,int k,int l,struct arg args0)
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
61 {
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
62 printf("args6: %d %d %d %d %d : %x %x %x %x\n",
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
63 args0.a0,args0.a1,args0.a2,args0.a3,args0.a4,i,j,k,l);
57
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
64 goto carg3(args0,args0,i,j,k,l);
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
65 }
3d7f199e99d0 struct handling
kono
parents: 55
diff changeset
66
54
kono
parents: 53
diff changeset
67 int main1(int n)
kono
parents: 53
diff changeset
68 {
193
ce0c38b6c85e try long long
kono
parents: 172
diff changeset
69 goto carg1(0,1,2,3,4,exit_code=return,exit_env=environment);
54
kono
parents: 53
diff changeset
70 return n;
kono
parents: 53
diff changeset
71 }
kono
parents: 53
diff changeset
72
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
73 struct arg a00;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
74 struct arg a01;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
75
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
76 int main( int ac, char *av[])
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
77 {
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
78 int n;
54
kono
parents: 53
diff changeset
79 n = main1(123);
kono
parents: 53
diff changeset
80 printf("321=%d\n",n);
79
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
81
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
82 a00.a0 = 11;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
83 a00.a1 = 22;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
84 a00.a2 = 33;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
85 a00.a3 = 44;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
86 a00.a4 = 55;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
87 a01.a0 = 66;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
88 a01.a1 = 77;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
89 a01.a2 = 88;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
90 a01.a3 = 99;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
91 a01.a4 = 10;
82d0e30f61dd *** empty log message ***
kono
parents: 77
diff changeset
92 goto carg3(a00,a01,1,2,3,4);
53
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
93 }
64a4e3789fd2 parallel assign works.
kono
parents:
diff changeset
94