diff options
Diffstat (limited to 'src/lj_asm.c')
-rw-r--r-- | src/lj_asm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lj_asm.c b/src/lj_asm.c index 0d6875a6..fb364c74 100644 --- a/src/lj_asm.c +++ b/src/lj_asm.c | |||
@@ -699,7 +699,7 @@ static void ra_left(ASMState *as, Reg dest, IRRef lref) | |||
699 | emit_loadu64(as, dest, ir_kint64(ir)->u64); | 699 | emit_loadu64(as, dest, ir_kint64(ir)->u64); |
700 | return; | 700 | return; |
701 | #endif | 701 | #endif |
702 | } else { | 702 | } else if (ir->o != IR_KPRI) { |
703 | lua_assert(ir->o == IR_KINT || ir->o == IR_KGC || | 703 | lua_assert(ir->o == IR_KINT || ir->o == IR_KGC || |
704 | ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL); | 704 | ir->o == IR_KPTR || ir->o == IR_KKPTR || ir->o == IR_KNULL); |
705 | emit_loadi(as, dest, ir->i); | 705 | emit_loadi(as, dest, ir->i); |
@@ -1191,6 +1191,16 @@ static void asm_newref(ASMState *as, IRIns *ir) | |||
1191 | asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op2); | 1191 | asm_tvptr(as, ra_releasetmp(as, ASMREF_TMP1), ir->op2); |
1192 | } | 1192 | } |
1193 | 1193 | ||
1194 | static void asm_lref(ASMState *as, IRIns *ir) | ||
1195 | { | ||
1196 | Reg r = ra_dest(as, ir, RSET_GPR); | ||
1197 | #if LJ_TARGET_X86ORX64 | ||
1198 | ra_left(as, r, ASMREF_L); | ||
1199 | #else | ||
1200 | ra_leftov(as, r, ASMREF_L); | ||
1201 | #endif | ||
1202 | } | ||
1203 | |||
1194 | /* -- Calls --------------------------------------------------------------- */ | 1204 | /* -- Calls --------------------------------------------------------------- */ |
1195 | 1205 | ||
1196 | /* Collect arguments from CALL* and CARG instructions. */ | 1206 | /* Collect arguments from CALL* and CARG instructions. */ |
@@ -1624,6 +1634,7 @@ static void asm_ir(ASMState *as, IRIns *ir) | |||
1624 | case IR_UREFO: case IR_UREFC: asm_uref(as, ir); break; | 1634 | case IR_UREFO: case IR_UREFC: asm_uref(as, ir); break; |
1625 | case IR_FREF: asm_fref(as, ir); break; | 1635 | case IR_FREF: asm_fref(as, ir); break; |
1626 | case IR_STRREF: asm_strref(as, ir); break; | 1636 | case IR_STRREF: asm_strref(as, ir); break; |
1637 | case IR_LREF: asm_lref(as, ir); break; | ||
1627 | 1638 | ||
1628 | /* Loads and stores. */ | 1639 | /* Loads and stores. */ |
1629 | case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: | 1640 | case IR_ALOAD: case IR_HLOAD: case IR_ULOAD: case IR_VLOAD: |