Mercurial > hg > index.cgi
diff 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 |
line wrap: on
line diff
--- a/lwasm/insn_indexed.c Fri Feb 16 23:40:53 2018 -0700 +++ b/lwasm/insn_indexed.c Sat Feb 17 00:13:46 2018 -0700 @@ -709,7 +709,8 @@ } } - if (l -> lint == 2 && CURPRAGMA(l, PRAGMA_OPERANDSIZE)) + // exclude expr,W since that can only be 16 bits + if (l -> lint == 2 && CURPRAGMA(l, PRAGMA_OPERANDSIZE) && (l -> pb != 0xAF && l -> pb != 0xB0)) { int offs; e = lwasm_fetch_expr(l, 0);