From: Mike Pall Date: Mon, 20 Dec 2010 18:34:15 +0000 (+0100) Subject: Fix XSTORE for IRT_NUM constants. X-Git-Tag: v2.0.0-beta6~130 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8d6f078a52adb840e370ed52138ee5d379fe945;p=thirdparty%2FLuaJIT.git Fix XSTORE for IRT_NUM constants. --- diff --git a/src/lj_asm.c b/src/lj_asm.c index 27ccfe9a..84c37275 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c @@ -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);