aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Pall <mike>2023-09-09 14:15:18 +0200
committerMike Pall <mike>2023-09-09 14:15:18 +0200
commit4651ff2fbc30a8326bcfc8e9d719fbf30856f5e2 (patch)
tree354463b823dec57a607766e7b24d5316ceb21d42 /src
parent9daf9f9003ff29551ef3b6fe19f4abf868bfd414 (diff)
downloadluajit-4651ff2fbc30a8326bcfc8e9d719fbf30856f5e2.tar.gz
luajit-4651ff2fbc30a8326bcfc8e9d719fbf30856f5e2.tar.bz2
luajit-4651ff2fbc30a8326bcfc8e9d719fbf30856f5e2.zip
ARM64: Inline only use of emit_loada.
Thanks to Peter Cawley. #1065
Diffstat (limited to 'src')
-rw-r--r--src/lj_asm_arm64.h9
-rw-r--r--src/lj_emit_arm64.h2
2 files changed, 6 insertions, 5 deletions
diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h
index 5e690308..a575269b 100644
--- a/src/lj_asm_arm64.h
+++ b/src/lj_asm_arm64.h
@@ -831,10 +831,13 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
831 /* Key not found in chain: jump to exit (if merged) or load niltv. */ 831 /* Key not found in chain: jump to exit (if merged) or load niltv. */
832 l_end = emit_label(as); 832 l_end = emit_label(as);
833 as->invmcp = NULL; 833 as->invmcp = NULL;
834 if (merge == IR_NE) 834 if (merge == IR_NE) {
835 asm_guardcc(as, CC_AL); 835 asm_guardcc(as, CC_AL);
836 else if (destused) 836 } else if (destused) {
837 emit_loada(as, dest, niltvg(J2G(as->J))); 837 uint32_t k12 = emit_isk12(offsetof(global_State, nilnode.val));
838 lj_assertA(k12 != 0, "Cannot k12 encode niltv(L)");
839 emit_dn(as, A64I_ADDx^k12, dest, RID_GL);
840 }
838 841
839 /* Follow hash chain until the end. */ 842 /* Follow hash chain until the end. */
840 l_loop = --as->mcp; 843 l_loop = --as->mcp;
diff --git a/src/lj_emit_arm64.h b/src/lj_emit_arm64.h
index 7205ce78..73df508c 100644
--- a/src/lj_emit_arm64.h
+++ b/src/lj_emit_arm64.h
@@ -230,8 +230,6 @@ static void emit_loadk(ASMState *as, Reg rd, uint64_t u64, int is64)
230/* Load a 64 bit constant into a GPR. */ 230/* Load a 64 bit constant into a GPR. */
231#define emit_loadu64(as, rd, i) emit_loadk(as, rd, i, A64I_X) 231#define emit_loadu64(as, rd, i) emit_loadk(as, rd, i, A64I_X)
232 232
233#define emit_loada(as, r, addr) emit_loadu64(as, (r), (uintptr_t)(addr))
234
235#define glofs(as, k) \ 233#define glofs(as, k) \
236 ((intptr_t)((uintptr_t)(k) - (uintptr_t)&J2GG(as->J)->g)) 234 ((intptr_t)((uintptr_t)(k) - (uintptr_t)&J2GG(as->J)->g))
237#define mcpofs(as, k) \ 235#define mcpofs(as, k) \