aboutsummaryrefslogtreecommitdiff
path: root/src/lj_asm_x86.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_asm_x86.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h
index 48c31fe3..5eb18365 100644
--- a/src/lj_asm_x86.h
+++ b/src/lj_asm_x86.h
@@ -1700,7 +1700,8 @@ static void asm_sload(ASMState *as, IRIns *ir)
1700 lj_assertA(irt_isguard(t) || !(ir->op2 & IRSLOAD_TYPECHECK), 1700 lj_assertA(irt_isguard(t) || !(ir->op2 & IRSLOAD_TYPECHECK),
1701 "inconsistent SLOAD variant"); 1701 "inconsistent SLOAD variant");
1702 lj_assertA(LJ_DUALNUM || 1702 lj_assertA(LJ_DUALNUM ||
1703 !irt_isint(t) || (ir->op2 & (IRSLOAD_CONVERT|IRSLOAD_FRAME)), 1703 !irt_isint(t) ||
1704 (ir->op2 & (IRSLOAD_CONVERT|IRSLOAD_FRAME|IRSLOAD_KEYINDEX)),
1704 "bad SLOAD type"); 1705 "bad SLOAD type");
1705 if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(t) && irt_isint(t)) { 1706 if ((ir->op2 & IRSLOAD_CONVERT) && irt_isguard(t) && irt_isint(t)) {
1706 Reg left = ra_scratch(as, RSET_FPR); 1707 Reg left = ra_scratch(as, RSET_FPR);
@@ -2727,7 +2728,15 @@ static void asm_stack_restore(ASMState *as, SnapShot *snap)
2727 IRIns *ir = IR(ref); 2728 IRIns *ir = IR(ref);
2728 if ((sn & SNAP_NORESTORE)) 2729 if ((sn & SNAP_NORESTORE))
2729 continue; 2730 continue;
2730 if (irt_isnum(ir->t)) { 2731 if ((sn & SNAP_KEYINDEX)) {
2732 emit_movmroi(as, RID_BASE, ofs+4, LJ_KEYINDEX);
2733 if (irref_isk(ref)) {
2734 emit_movmroi(as, RID_BASE, ofs, ir->i);
2735 } else {
2736 Reg src = ra_alloc1(as, ref, rset_exclude(RSET_GPR, RID_BASE));
2737 emit_movtomro(as, src, RID_BASE, ofs);
2738 }
2739 } else if (irt_isnum(ir->t)) {
2731 Reg src = ra_alloc1(as, ref, RSET_FPR); 2740 Reg src = ra_alloc1(as, ref, RSET_FPR);
2732 emit_rmro(as, XO_MOVSDto, src, RID_BASE, ofs); 2741 emit_rmro(as, XO_MOVSDto, src, RID_BASE, ofs);
2733 } else { 2742 } else {