aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2010-12-20 19:34:15 +0100
committerMike Pall <mike>2010-12-20 19:34:15 +0100
commitc8d6f078a52adb840e370ed52138ee5d379fe945 (patch)
tree4f947e748cea17e4350aa76f2841b56c7d9ba798 /src
parent1eb6e23730be4dfde6388fd64fadb000088811be (diff)
downloadluajit-c8d6f078a52adb840e370ed52138ee5d379fe945.tar.gz
luajit-c8d6f078a52adb840e370ed52138ee5d379fe945.tar.bz2
luajit-c8d6f078a52adb840e370ed52138ee5d379fe945.zip
Fix XSTORE for IRT_NUM constants.
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm.c3
1 files changed, 2 insertions, 1 deletions
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)
2056 /* The IRT_I16/IRT_U16 stores should never be simplified for constant 2056 /* The IRT_I16/IRT_U16 stores should never be simplified for constant
2057 ** values since mov word [mem], imm16 has a length-changing prefix. 2057 ** values since mov word [mem], imm16 has a length-changing prefix.
2058 */ 2058 */
2059 if (!asm_isk32(as, ir->op2, &k) || irt_isi16(ir->t) || irt_isu16(ir->t)) { 2059 if (irt_isi16(ir->t) || irt_isu16(ir->t) || irt_isnum(ir->t) ||
2060 !asm_isk32(as, ir->op2, &k)) {
2060 RegSet allow8 = irt_isnum(ir->t) ? RSET_FPR : 2061 RegSet allow8 = irt_isnum(ir->t) ? RSET_FPR :
2061 (irt_isi8(ir->t) || irt_isu8(ir->t)) ? RSET_GPR8 : RSET_GPR; 2062 (irt_isi8(ir->t) || irt_isu8(ir->t)) ? RSET_GPR8 : RSET_GPR;
2062 src = osrc = ra_alloc1(as, ir->op2, allow8); 2063 src = osrc = ra_alloc1(as, ir->op2, allow8);