Mercurial > hg > index.cgi
comparison lwasm/insn_indexed.c @ 463:42be9eec7935
Make pcr relative forward references better able to select 8 bit offsets
author | William Astle <lost@l-w.ca> |
---|---|
date | Wed, 28 Feb 2018 23:00:59 -0700 |
parents | 3948c874901b |
children | 9134f6426c57 |
comparison
equal
deleted
inserted
replaced
462:da72c084e0ac | 463:42be9eec7935 |
---|---|
467 lwasm_reduce_expr(as, e2); | 467 lwasm_reduce_expr(as, e2); |
468 // l -> len += 1; | 468 // l -> len += 1; |
469 // e3 = lw_expr_copy(e); | 469 // e3 = lw_expr_copy(e); |
470 // lwasm_reduce_expr(as, e3); | 470 // lwasm_reduce_expr(as, e3); |
471 l -> len = -1; | 471 l -> len = -1; |
472 if (!lw_expr_istype(e2, lw_expr_type_int)) | |
473 { | |
474 v = as -> pretendmax; | |
475 as -> pretendmax = 1; | |
476 lwasm_reduce_expr(as, e2); | |
477 as -> pretendmax = v; | |
478 } | |
472 if (lw_expr_istype(e2, lw_expr_type_int)) | 479 if (lw_expr_istype(e2, lw_expr_type_int)) |
473 { | 480 { |
474 v = lw_expr_intval(e2); | 481 v = lw_expr_intval(e2); |
475 // we have a reducible expression here which depends on | 482 // we have a reducible expression here which depends on |
476 // the size of this instruction | 483 // the size of this instruction |