comparison lwasm/pseudo.c @ 254:c7a41b4c89b3 2.x

Added struct support to LWASM
author lost
date Sat, 19 Dec 2009 06:38:43 +0000
parents f9f01a499525
children e27279180a73
comparison
equal deleted inserted replaced
253:c537a3a723fc 254:c7a41b4c89b3
220 } 220 }
221 r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST | EXPR_PASS1CONST, &v, -1); 221 r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST | EXPR_PASS1CONST, &v, -1);
222 if (r != 0) 222 if (r != 0)
223 return; 223 return;
224 l -> nocodelen = v; 224 l -> nocodelen = v;
225 if (as -> instruct)
226 return;
225 as -> addr += v; 227 as -> addr += v;
226 } 228 }
227 229
228 OPFUNC(pseudo_rmd) 230 OPFUNC(pseudo_rmd)
229 { 231 {
238 r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST | EXPR_PASS1CONST, &v, 0); 240 r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST | EXPR_PASS1CONST, &v, 0);
239 if (r != 0) 241 if (r != 0)
240 return; 242 return;
241 v *= 2; 243 v *= 2;
242 l -> nocodelen = v; 244 l -> nocodelen = v;
245 if (as -> instruct)
246 return;
243 as -> addr += v; 247 as -> addr += v;
244 } 248 }
245 249
246 OPFUNC(pseudo_rmq) 250 OPFUNC(pseudo_rmq)
247 { 251 {
256 r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST | EXPR_PASS1CONST, &v, 0); 260 r = lwasm_expr_result2(as, l, p, EXPR_SECTCONST | EXPR_PASS1CONST, &v, 0);
257 if (r != 0) 261 if (r != 0)
258 return; 262 return;
259 v *= 4; 263 v *= 4;
260 l -> nocodelen = v; 264 l -> nocodelen = v;
265 if (as -> instruct)
266 return;
261 as -> addr += v; 267 as -> addr += v;
262 } 268 }
263 269
264 OPFUNC(pseudo_zmb) 270 OPFUNC(pseudo_zmb)
265 { 271 {