annotate test/conv1.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
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
1 #include "stdio.h"
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
2
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
3 static int loop;
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
4 #define __environment _CbC_environment
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
5 #define __return _CbC_return
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
6
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
7 #if 1 // def __micro_c__
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
8 #define CC_ONLY 0
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
9 #else
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
10 #define CC_ONLY 1
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
11 #endif
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
12
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
13 /* classical function call case (0) */
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
14
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
15 f0(int i) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
16 int k,j;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
17 k = 3+i;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
18 j = g0(i+3);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
19 return k+4+j;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
20 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
21
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
22 g0(int i) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
23 return h0(i+4)+i;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
24 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
25
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
26 h0(int i) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
27 return i+4;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
28 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
29
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
30 #if !CC_ONLY
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
31
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
32 /* straight conversion case (1) */
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
33
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
34 typedef char *stack;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
35
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
36 struct cont_interface { // General Return Continuation
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
37 __code (*ret)();
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
38 };
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
39
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
40 __code f_g0(int i,int k,stack sp) ;
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
41
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
42 __code f(int i,stack sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
43 int k,j;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
44 k = 3+i;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
45 goto f_g0(i,k,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
46 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
47
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
48 struct f_g0_interface { // Specialized Return Continuation
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
49 __code (*ret)();
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
50 int i_,k_,j_;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
51 };
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
52
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
53 __code f_g1(int j,stack sp);
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
54 __code g(int i,stack sp) ;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
55
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
56 __code f_g0(int i,int k,stack sp) { // Caller
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
57 struct f_g0_interface *c =
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
58 (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface));
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
59
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
60 c->ret = f_g1;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
61 c->k_ = k;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
62 c->i_ = i;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
63
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
64 goto g(i+3,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
65 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
66
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
67 __code f_g1(int j,stack sp) { // Continuation
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
68 struct f_g0_interface *c = (struct f_g0_interface *)sp;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
69 int k = c->k_;
158
7bc02f0800a9 fix conv1
kono
parents: 155
diff changeset
70 sp+=sizeof(struct f_g0_interface);
7bc02f0800a9 fix conv1
kono
parents: 155
diff changeset
71 c = (struct f_g0_interface *)sp;
7bc02f0800a9 fix conv1
kono
parents: 155
diff changeset
72 goto (c->ret)(k+4+j,sp);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
73 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
74
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
75 __code g_h1(int j,stack sp);
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
76 __code h(int i,stack sp) ;
572
388baa7d4bee more strict errors.
kono
parents: 427
diff changeset
77
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
78 __code g(int i,stack sp) { // Caller
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
79 struct f_g0_interface *c =
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
80 (struct f_g0_interface *)(sp -= sizeof(struct f_g0_interface));
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
81
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
82 c->ret = g_h1;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
83 c->i_ = i;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
84
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
85 goto h(i+3,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
86 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
87
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
88 __code g_h1(int j,stack sp) { // Continuation
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
89 struct f_g0_interface *c = (struct f_g0_interface *)sp;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
90 int i = c->i_;
158
7bc02f0800a9 fix conv1
kono
parents: 155
diff changeset
91 sp+=sizeof(struct f_g0_interface);
7bc02f0800a9 fix conv1
kono
parents: 155
diff changeset
92 c = (struct f_g0_interface *)sp;
7bc02f0800a9 fix conv1
kono
parents: 155
diff changeset
93 goto (c->ret)(j+i,sp);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
94 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
95
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
96 __code h(int i,stack sp) {
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
97 struct f_g0_interface *c = (struct f_g0_interface *)sp;
158
7bc02f0800a9 fix conv1
kono
parents: 155
diff changeset
98 goto (c->ret)(i+4,sp);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
99 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
100
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
101 struct main_continuation { // General Return Continuation
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
102 __code (*ret)();
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
103 __code (*main_ret)(int,void *);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
104 void *env;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
105 };
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
106
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
107 __code main_return(int i,stack sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
108 if (loop-->0)
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
109 goto f(233,sp);
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 729
diff changeset
110 printf("#0109:%d\n",i);
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
111 goto (( (struct main_continuation *)sp)->main_ret)(0,
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
112 ((struct main_continuation *)sp)->env);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
113 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
114
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
115 /* little optimzation without stack continuation (2) */
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
116
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
117 __code g2(int i,int k,int j,char *sp) ;
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
118
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
119 __code f2(int i,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
120 int k,j;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
121 k = 3+i;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
122 goto g2(i,k,i+3,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
123 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
124
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
125 __code h2(int i,int k,char *sp) ;
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
126
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
127 __code g2(int i,int k,int j,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
128 j = j+4;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
129 goto h2(i,k+4+j,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
130 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
131
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
132 __code main_return2(int i,stack sp) ;
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
133
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
134 __code h2_1(int i,int k,int j,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
135 goto main_return2(i+j,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
136 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
137
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
138 __code h2(int i,int k,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
139 goto h2_1(i,k,i+4,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
140 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
141
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
142 __code main_return2(int i,stack sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
143 if (loop-->0)
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
144 goto f2(233,sp);
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 729
diff changeset
145 printf("#0144:%d\n",i);
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
146 goto (( (struct main_continuation *)sp)->main_ret)(0,
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
147 ((struct main_continuation *)sp)->env);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
148 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
149
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
150 /* little optimizaed case (3) */
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
151
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
152 __code g2_1(int k,int i,char *sp) ;
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
153
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
154 __code f2_1(int i,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
155 int k,j;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
156 k = 3+i;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
157 goto g2_1(k,i+3,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
158 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
159
729
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
160 __code h2_11(int i,int k,char *sp) ;
07dce42b67af examples for gcc
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 725
diff changeset
161
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
162 __code g2_1(int k,int i,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
163 goto h2_11(k,i+4,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
164 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
165
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
166 __code f2_0_1(int k,int j,char *sp);
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
167 __code h2_1_1(int i,int k,int j,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
168 goto f2_0_1(k,i+j,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
169 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
170
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
171 __code h2_11(int i,int k,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
172 goto h2_1_1(i,k,i+4,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
173 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
174
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
175 __code f2_0_1(int k,int j,char *sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
176 goto (( (struct cont_interface *)sp)->ret)(k+4+j,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
177 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
178
622
682c8ec38d45 _code へ
kono
parents: 575
diff changeset
179 __code main_return2_1(int i,stack sp) {
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
180 if (loop-->0)
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
181 goto f2_1(233,sp);
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 729
diff changeset
182 printf("#0181:%d\n",i);
725
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
183 goto (( (struct main_continuation *)sp)->main_ret)(0,
3f1f6c0610c1 goto with enviornment syntax changed.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 720
diff changeset
184 ((struct main_continuation *)sp)->env);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
185 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
186
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
187 #define STACK_SIZE 2048
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
188 char main_stack[STACK_SIZE];
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
189 #define stack_last (main_stack+STACK_SIZE)
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
190
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
191 #endif
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
192
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
193 #define LOOP_COUNT 10000000
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
194
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
195 main(int ac,char *av[])
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
196 {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
197 #if !CC_ONLY
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
198 struct main_continuation *cont;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
199 stack sp = stack_last;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
200 #endif
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
201 int sw;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
202 int j;
172
096559f07a70 some check
kono
parents: 158
diff changeset
203 if (ac==2) sw = atoi(av[1]);
096559f07a70 some check
kono
parents: 158
diff changeset
204 else sw=3;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
205
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
206 if (sw==0) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
207 for(loop=0;loop<LOOP_COUNT;loop++) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
208 j = f0(233);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
209 }
748
c2c709727221 i64 continue... basic.s assembled.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 729
diff changeset
210 printf("#0209:%d\n",j);
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
211 #if !CC_ONLY
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
212 } else if (sw==1) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
213 loop = LOOP_COUNT;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
214 sp -= sizeof(*cont);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
215 cont = (struct main_continuation *)sp;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
216 cont->ret = main_return;
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
217 cont->main_ret = __return;
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
218 cont->env = __environment;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
219 goto f(233,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
220 } else if (sw==2) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
221 loop = LOOP_COUNT;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
222 sp -= sizeof(*cont);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
223 cont = (struct main_continuation *)sp;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
224 cont->ret = main_return2;
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
225 cont->main_ret = __return;
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
226 cont->env = __environment;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
227 goto f2(233,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
228 } else if (sw==3) {
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
229 loop = LOOP_COUNT;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
230 sp -= sizeof(*cont);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
231 cont = (struct main_continuation *)sp;
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
232 cont->ret = main_return2_1;
720
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
233 cont->main_ret = __return;
6b7372e17970 *** empty log message ***
kono
parents: 622
diff changeset
234 cont->env = __environment;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
235 goto f2_1(233,sp);
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
236 #endif
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
237 }
575
a4445cb1aa91 Example filex.
kono
parents: 573
diff changeset
238 return 0;
155
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
239 }
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
240
ccb2002d8a31 *** empty log message ***
kono
parents:
diff changeset
241 /* end */