mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
ARM64: Fix IR_HREF code generation.
This commit is contained in:
parent
4a70bd71ac
commit
e4b4d94514
@ -791,7 +791,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
|
|||||||
}
|
}
|
||||||
} else if (irt_isaddr(kt)) {
|
} else if (irt_isaddr(kt)) {
|
||||||
if (isk) {
|
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);
|
scr = ra_allock(as, kk, allow);
|
||||||
} else {
|
} else {
|
||||||
scr = ra_scratch(as, allow);
|
scr = ra_scratch(as, allow);
|
||||||
@ -799,7 +799,7 @@ static void asm_href(ASMState *as, IRIns *ir, IROp merge)
|
|||||||
rset_clear(allow, scr);
|
rset_clear(allow, scr);
|
||||||
} else {
|
} else {
|
||||||
lj_assertA(irt_ispri(kt) && !irt_isnil(kt), "bad HREF key type");
|
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));
|
scr = ra_scratch(as, rset_clear(allow, type));
|
||||||
rset_clear(allow, scr);
|
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));
|
emit_lso(as, A64I_LDRx, scr, dest, offsetof(Node, key.u64));
|
||||||
}
|
}
|
||||||
} else {
|
} 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));
|
emit_lso(as, A64I_LDRx, scr, dest, offsetof(Node, key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user