# HG changeset patch # User William Astle # Date 1434425193 21600 # Node ID 362f8fb0695bfb68196ca8961236caa8bb89d93b # Parent c6d2a1f54e0c182f94e6472d455d5160b0207eff Make psh/pul error out if no registers given While the generated object code was technically correct for bare pshs, puls, pshu, and pulu, it was not helpful. Throw a bad operand error if no registers are given as an operand to such instructions. Thanks to Erik G for reporting the problem. diff -r c6d2a1f54e0c -r 362f8fb0695b lwasm/insn_rlist.c --- a/lwasm/insn_rlist.c Mon Jun 15 21:21:58 2015 -0600 +++ b/lwasm/insn_rlist.c Mon Jun 15 21:26:33 2015 -0600 @@ -55,6 +55,8 @@ rn = 1 << rn; rb |= rn; } + if (rb == 0) + lwasm_register_error(as, l, "Bad operand"); l -> len = OPLEN(instab[l -> insn].ops[0]) + 1; l -> pb = rb; }