mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-29 02:27:30 +09:00
Bug 1424978 - IonMonkey: MIPS64: Fix unboxNonDouble for Int32
Tag: #1542
This commit is contained in:
parent
dc7fd7cdfd
commit
73011b18fe
1 changed files with 30 additions and 0 deletions
|
|
@ -1366,22 +1366,52 @@ MacroAssemblerMIPS64Compat::testUndefinedSet(Condition cond, const ValueOperand&
|
||||||
void
|
void
|
||||||
MacroAssemblerMIPS64Compat::unboxNonDouble(const ValueOperand& operand, Register dest)
|
MacroAssemblerMIPS64Compat::unboxNonDouble(const ValueOperand& operand, Register dest)
|
||||||
{
|
{
|
||||||
|
Label isInt32, done;
|
||||||
|
Register tag = splitTagForTest(operand);
|
||||||
|
asMasm().branchTestInt32(Assembler::Equal, tag, &isInt32);
|
||||||
|
|
||||||
ma_dext(dest, operand.valueReg(), Imm32(0), Imm32(JSVAL_TAG_SHIFT));
|
ma_dext(dest, operand.valueReg(), Imm32(0), Imm32(JSVAL_TAG_SHIFT));
|
||||||
|
jump(&done);
|
||||||
|
|
||||||
|
bind(&isInt32);
|
||||||
|
ma_sll(dest, operand.valueReg(), Imm32(0));
|
||||||
|
|
||||||
|
bind(&done);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssemblerMIPS64Compat::unboxNonDouble(const Address& src, Register dest)
|
MacroAssemblerMIPS64Compat::unboxNonDouble(const Address& src, Register dest)
|
||||||
{
|
{
|
||||||
|
Label isInt32, done;
|
||||||
loadPtr(Address(src.base, src.offset), dest);
|
loadPtr(Address(src.base, src.offset), dest);
|
||||||
|
splitTag(dest, SecondScratchReg);
|
||||||
|
asMasm().branchTestInt32(Assembler::Equal, SecondScratchReg, &isInt32);
|
||||||
|
|
||||||
ma_dext(dest, dest, Imm32(0), Imm32(JSVAL_TAG_SHIFT));
|
ma_dext(dest, dest, Imm32(0), Imm32(JSVAL_TAG_SHIFT));
|
||||||
|
jump(&done);
|
||||||
|
|
||||||
|
bind(&isInt32);
|
||||||
|
ma_sll(dest, dest, Imm32(0));
|
||||||
|
|
||||||
|
bind(&done);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
MacroAssemblerMIPS64Compat::unboxNonDouble(const BaseIndex& src, Register dest)
|
MacroAssemblerMIPS64Compat::unboxNonDouble(const BaseIndex& src, Register dest)
|
||||||
{
|
{
|
||||||
|
Label isInt32, done;
|
||||||
computeScaledAddress(src, SecondScratchReg);
|
computeScaledAddress(src, SecondScratchReg);
|
||||||
loadPtr(Address(SecondScratchReg, src.offset), dest);
|
loadPtr(Address(SecondScratchReg, src.offset), dest);
|
||||||
|
splitTag(dest, SecondScratchReg);
|
||||||
|
asMasm().branchTestInt32(Assembler::Equal, SecondScratchReg, &isInt32);
|
||||||
|
|
||||||
ma_dext(dest, dest, Imm32(0), Imm32(JSVAL_TAG_SHIFT));
|
ma_dext(dest, dest, Imm32(0), Imm32(JSVAL_TAG_SHIFT));
|
||||||
|
jump(&done);
|
||||||
|
|
||||||
|
bind(&isInt32);
|
||||||
|
ma_sll(dest, dest, Imm32(0));
|
||||||
|
|
||||||
|
bind(&done);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue