comparison lwasm/insn_indexed.c @ 458:3948c874901b

Make offset,R operand size warning work properly Make the offset,R operand size check warning work for non-lea operations. Also exclude offset,W from the check since there is no 8 bit offset.
author William Astle <lost@l-w.ca>
date Sat, 17 Feb 2018 00:13:46 -0700
parents cad5937314cb
children 42be9eec7935
comparison
equal deleted inserted replaced
457:7d6eacd87370 458:3948c874901b
707 { 707 {
708 lwasm_register_error(as, l, E_BYTE_OVERFLOW); 708 lwasm_register_error(as, l, E_BYTE_OVERFLOW);
709 } 709 }
710 } 710 }
711 711
712 if (l -> lint == 2 && CURPRAGMA(l, PRAGMA_OPERANDSIZE)) 712 // exclude expr,W since that can only be 16 bits
713 if (l -> lint == 2 && CURPRAGMA(l, PRAGMA_OPERANDSIZE) && (l -> pb != 0xAF && l -> pb != 0xB0))
713 { 714 {
714 int offs; 715 int offs;
715 e = lwasm_fetch_expr(l, 0); 716 e = lwasm_fetch_expr(l, 0);
716 if (lw_expr_istype(e, lw_expr_type_int)) 717 if (lw_expr_istype(e, lw_expr_type_int))
717 { 718 {