diff options
| author | Mike Pall <mike> | 2026-07-20 10:20:28 +0200 |
|---|---|---|
| committer | Mike Pall <mike> | 2026-07-20 10:20:28 +0200 |
| commit | 6f2ec80c11c2bd23e2ba792ae27a4febc8dddc8c (patch) | |
| tree | 58ddd00fc12a6718b736ce893c4470cbceca2332 /src/lj_asm_x86.h | |
| parent | 329b7912088095a00685285180d705f6d131e6f0 (diff) | |
| parent | 14d8a7a27dc8c626ab9e7c7e9e50b6df6def4f03 (diff) | |
| download | luajit-temp-v3bp-syntax1.tar.gz luajit-temp-v3bp-syntax1.tar.bz2 luajit-temp-v3bp-syntax1.zip | |
Merge branch 'v2.1' into temp-v3bp-syntax1temp-v3bp-syntax1
Diffstat (limited to 'src/lj_asm_x86.h')
| -rw-r--r-- | src/lj_asm_x86.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/lj_asm_x86.h b/src/lj_asm_x86.h index 943cf2b77..3c024092c 100644 --- a/src/lj_asm_x86.h +++ b/src/lj_asm_x86.h | |||
| @@ -1112,10 +1112,12 @@ static void asm_tvptr(ASMState *as, Reg dest, IRRef ref, MSize mode) | |||
| 1112 | } else { | 1112 | } else { |
| 1113 | #if LJ_GC64 | 1113 | #if LJ_GC64 |
| 1114 | if (irref_isk(ref)) { | 1114 | if (irref_isk(ref)) { |
| 1115 | Reg tmp; | ||
| 1115 | TValue k; | 1116 | TValue k; |
| 1116 | lj_ir_kvalue(as->J->L, &k, ir); | 1117 | lj_ir_kvalue(as->J->L, &k, ir); |
| 1117 | emit_movmroi(as, dest, 4, k.u32.hi); | 1118 | tmp = ra_scratch(as, rset_exclude(RSET_GPR, dest)); |
| 1118 | emit_movmroi(as, dest, 0, k.u32.lo); | 1119 | emit_rmro(as, XO_MOVto, tmp|REX_64, dest, 0); |
| 1120 | emit_loadu64(as, tmp, k.u64); | ||
| 1119 | } else { | 1121 | } else { |
| 1120 | /* TODO: 64 bit store + 32 bit load-modify-store is suboptimal. */ | 1122 | /* TODO: 64 bit store + 32 bit load-modify-store is suboptimal. */ |
| 1121 | Reg src = ra_alloc1(as, ref, rset_exclude(RSET_GPR, dest)); | 1123 | Reg src = ra_alloc1(as, ref, rset_exclude(RSET_GPR, dest)); |
| @@ -2787,8 +2789,9 @@ static void asm_stack_restore(ASMState *as, SnapShot *snap) | |||
| 2787 | emit_i32(as, -1); | 2789 | emit_i32(as, -1); |
| 2788 | emit_rmro(as, XO_MOVmi, REX_64, RID_BASE, ofs); | 2790 | emit_rmro(as, XO_MOVmi, REX_64, RID_BASE, ofs); |
| 2789 | } else { | 2791 | } else { |
| 2790 | emit_movmroi(as, RID_BASE, ofs+4, k.u32.hi); | 2792 | Reg tmp = ra_scratch(as, rset_exclude(RSET_GPR, RID_BASE)); |
| 2791 | emit_movmroi(as, RID_BASE, ofs, k.u32.lo); | 2793 | emit_rmro(as, XO_MOVto, tmp|REX_64, RID_BASE, ofs); |
| 2794 | emit_loadu64(as, tmp, k.u64); | ||
| 2792 | } | 2795 | } |
| 2793 | #else | 2796 | #else |
| 2794 | } else if (!irt_ispri(ir->t)) { | 2797 | } else if (!irt_ispri(ir->t)) { |
