From e4b4d9451402be704d5b47a359f640a29db4977f Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Sat, 2 Oct 2021 17:49:50 +0200 Subject: [PATCH] ARM64: Fix IR_HREF code generation. --- src/lj_asm_arm64.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lj_asm_arm64.h b/src/lj_asm_arm64.h index 5decfff4..67c53ee2 100644 --- a/src/lj_asm_arm64.h +++ b/src/lj_asm_arm64.h @@ -791,7 +791,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge) } } else if (irt_isaddr(kt)) { if (isk) { - int64_t kk = ((int64_t)irt_toitype(irkey->t) << 47) | irkey[1].tv.u64; + int64_t kk = ((int64_t)irt_toitype(kt) << 47) | irkey[1].tv.u64; scr = ra_allock(as, kk, allow); } else { scr = ra_scratch(as, allow); @@ -799,7 +799,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge) rset_clear(allow, scr); } else { lj_assertA(irt_ispri(kt) && !irt_isnil(kt), "bad HREF key type"); - type = ra_allock(as, ~((int64_t)~irt_toitype(ir->t) << 47), allow); + type = ra_allock(as, ~((int64_t)~irt_toitype(kt) << 47), allow); scr = ra_scratch(as, rset_clear(allow, type)); rset_clear(allow, scr); } @@ -848,7 +848,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge) emit_lso(as, A64I_LDRx, scr, dest, offsetof(Node, key.u64)); } } else { - emit_nm(as, A64I_CMPw, scr, type); + emit_nm(as, A64I_CMPx, scr, type); emit_lso(as, A64I_LDRx, scr, dest, offsetof(Node, key)); }