mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Issue #3049 - loongarch64: fix JIT value boxing and unboxing
This commit is contained in:
parent
ce543a4132
commit
95c0370fb0
2 changed files with 6 additions and 6 deletions
|
|
@ -3995,7 +3995,8 @@ void MacroAssemblerLOONGARCH64Compat::tagValue(JSValueType type, Register payloa
|
||||||
as_or(scratch, payload, zero);
|
as_or(scratch, payload, zero);
|
||||||
payload = scratch;
|
payload = scratch;
|
||||||
}
|
}
|
||||||
ma_li(dest.valueReg(), ImmWord(JSVAL_TYPE_TO_SHIFTED_TAG(type)));
|
ma_li(dest.valueReg(), Imm32(int32_t(JSVAL_TYPE_TO_TAG(type))));
|
||||||
|
as_slli_d(dest.valueReg(), dest.valueReg(), JSVAL_TAG_SHIFT);
|
||||||
if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) {
|
if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) {
|
||||||
as_bstrins_d(dest.valueReg(), payload, 31, 0);
|
as_bstrins_d(dest.valueReg(), payload, 31, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -864,10 +864,8 @@ class MacroAssemblerLOONGARCH64Compat : public MacroAssemblerLOONGARCH64 {
|
||||||
as_slli_w(dest, src, 0);
|
as_slli_w(dest, src, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ScratchRegisterScope scratch(asMasm());
|
|
||||||
MOZ_ASSERT(scratch != src);
|
as_bstrpick_d(dest, src, JSVAL_TAG_SHIFT - 1, 0);
|
||||||
mov(ImmWord(JSVAL_TYPE_TO_SHIFTED_TAG(type)), scratch);
|
|
||||||
as_xor(dest, src, scratch);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|
@ -1089,7 +1087,8 @@ class MacroAssemblerLOONGARCH64Compat : public MacroAssemblerLOONGARCH64 {
|
||||||
bind(&upper32BitsSignExtended);
|
bind(&upper32BitsSignExtended);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
ma_li(dest, ImmWord(JSVAL_TYPE_TO_SHIFTED_TAG(type)));
|
ma_li(dest, Imm32(int32_t(JSVAL_TYPE_TO_TAG(type))));
|
||||||
|
as_slli_d(dest, dest, JSVAL_TAG_SHIFT);
|
||||||
if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) {
|
if (type == JSVAL_TYPE_INT32 || type == JSVAL_TYPE_BOOLEAN) {
|
||||||
as_bstrins_d(dest, src, 31, 0);
|
as_bstrins_d(dest, src, 31, 0);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue