]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Fix XSTORE for IRT_NUM constants.
authorMike Pall <mike>
Mon, 20 Dec 2010 18:34:15 +0000 (19:34 +0100)
committerMike Pall <mike>
Mon, 20 Dec 2010 18:34:15 +0000 (19:34 +0100)
src/lj_asm.c

index 27ccfe9a84b642b950c727be222b63a9aaee48d1..84c372757b778500b47a0bcf438cf8ab867acaad 100644 (file)
@@ -2056,7 +2056,8 @@ static void asm_fxstore(ASMState *as, IRIns *ir)
   /* The IRT_I16/IRT_U16 stores should never be simplified for constant
   ** values since mov word [mem], imm16 has a length-changing prefix.
   */
-  if (!asm_isk32(as, ir->op2, &k) || irt_isi16(ir->t) || irt_isu16(ir->t)) {
+  if (irt_isi16(ir->t) || irt_isu16(ir->t) || irt_isnum(ir->t) ||
+      !asm_isk32(as, ir->op2, &k)) {
     RegSet allow8 = irt_isnum(ir->t) ? RSET_FPR :
                    (irt_isi8(ir->t) || irt_isu8(ir->t)) ? RSET_GPR8 : RSET_GPR;
     src = osrc = ra_alloc1(as, ir->op2, allow8);