comparison lwasm/insn_indexed.c @ 481:62720ac9e28d

Exclude extended indirect from operandsizewarning pragma Constant indirect addressing is only available in "extended" variety (16 bits) so make sure no warning appears when plain extended indirect addressing is used.
author William Astle <lost@l-w.ca>
date Wed, 12 Dec 2018 21:18:20 -0700
parents 2c1c5dd84024
children
comparison
equal deleted inserted replaced
480:ceed9fb3a362 481:62720ac9e28d
798 else 798 else
799 { 799 {
800 lwasm_register_error(as, l, E_EXPRESSION_NOT_RESOLVED); 800 lwasm_register_error(as, l, E_EXPRESSION_NOT_RESOLVED);
801 } 801 }
802 } 802 }
803 else if (l -> lint == 2 && CURPRAGMA(l, PRAGMA_OPERANDSIZE) && (l -> pb != 0xAF && l -> pb != 0xB0)) 803 // note that extended indirect (post byte 0x9f) can only be 16 bits
804 else if (l -> lint == 2 && CURPRAGMA(l, PRAGMA_OPERANDSIZE) && (l -> pb != 0xAF && l -> pb != 0xB0 && l -> pb != 0x9f))
804 { 805 {
805 int offs; 806 int offs;
806 e = lwasm_fetch_expr(l, 0); 807 e = lwasm_fetch_expr(l, 0);
807 if (lw_expr_istype(e, lw_expr_type_int)) 808 if (lw_expr_istype(e, lw_expr_type_int))
808 { 809 {