зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1448809 - [MIPS] Fix build failures after final changes in Bug 1428453; r=bbouvier
This commit is contained in:
Родитель
74e6b6b1e9
Коммит
a79aa14f3b
|
@ -2389,7 +2389,7 @@ CodeGenerator::visitWasmAddOffset(LWasmAddOffset* lir)
|
|||
Register out = ToRegister(lir->output());
|
||||
|
||||
Label ok;
|
||||
masm.ma_addTestCarryClear(out, base, Imm32(mir->offset()), &ok);
|
||||
masm.ma_addTestCarry(Assembler::CarryClear, out, base, Imm32(mir->offset()), &ok);
|
||||
masm.wasmTrap(wasm::Trap::OutOfBounds, mir->bytecodeOffset());
|
||||
masm.bind(&ok);
|
||||
}
|
||||
|
|
|
@ -637,8 +637,9 @@ MacroAssembler::branchAdd32(Condition cond, T src, Register dest, Label* overflo
|
|||
case Overflow:
|
||||
ma_addTestOverflow(dest, dest, src, overflow);
|
||||
break;
|
||||
case CarryClear:
|
||||
case CarrySet:
|
||||
ma_addTestCarry(dest, dest, src, overflow);
|
||||
ma_addTestCarry(cond, dest, dest, src, overflow);
|
||||
break;
|
||||
default:
|
||||
MOZ_CRASH("NYI");
|
||||
|
|
|
@ -327,19 +327,23 @@ MacroAssemblerMIPSShared::ma_addu(Register rd, Imm32 imm)
|
|||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSShared::ma_addTestCarry(Register rd, Register rs, Register rt, Label* overflow)
|
||||
MacroAssemblerMIPSShared::ma_addTestCarry(Condition cond, Register rd, Register rs, Register rt,
|
||||
Label* overflow)
|
||||
{
|
||||
MOZ_ASSERT(cond == Assembler::CarrySet || cond == Assembler::CarryClear);
|
||||
MOZ_ASSERT_IF(rd == rs, rt != rd);
|
||||
as_addu(rd, rs, rt);
|
||||
as_sltu(SecondScratchReg, rd, rd == rs? rt : rs);
|
||||
ma_b(SecondScratchReg, SecondScratchReg, overflow, Assembler::NonZero);
|
||||
as_sltu(SecondScratchReg, rd, rd == rs ? rt : rs);
|
||||
ma_b(SecondScratchReg, SecondScratchReg, overflow,
|
||||
cond == Assembler::CarrySet ? Assembler::NonZero : Assembler:: Zero);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssemblerMIPSShared::ma_addTestCarry(Register rd, Register rs, Imm32 imm, Label* overflow)
|
||||
MacroAssemblerMIPSShared::ma_addTestCarry(Condition cond, Register rd, Register rs, Imm32 imm,
|
||||
Label* overflow)
|
||||
{
|
||||
ma_li(ScratchRegister, imm);
|
||||
ma_addTestCarry(rd, rs, ScratchRegister, overflow);
|
||||
ma_addTestCarry(cond, rd, rs, ScratchRegister, overflow);
|
||||
}
|
||||
|
||||
// Subtract.
|
||||
|
|
|
@ -130,8 +130,8 @@ class MacroAssemblerMIPSShared : public Assembler
|
|||
void ma_addu(Register rd, Register rs, Imm32 imm);
|
||||
void ma_addu(Register rd, Register rs);
|
||||
void ma_addu(Register rd, Imm32 imm);
|
||||
void ma_addTestCarry(Register rd, Register rs, Register rt, Label* overflow);
|
||||
void ma_addTestCarry(Register rd, Register rs, Imm32 imm, Label* overflow);
|
||||
void ma_addTestCarry(Condition cond, Register rd, Register rs, Register rt, Label* overflow);
|
||||
void ma_addTestCarry(Condition cond, Register rd, Register rs, Imm32 imm, Label* overflow);
|
||||
|
||||
// subtract
|
||||
void ma_subu(Register rd, Register rs, Imm32 imm);
|
||||
|
|
|
@ -2473,16 +2473,18 @@ MacroAssembler::storeUnboxedValue(const ConstantOrRegister& value, MIRType value
|
|||
|
||||
|
||||
void
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Register boundsCheckLimit, Label* label)
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Register boundsCheckLimit,
|
||||
Label* label)
|
||||
{
|
||||
ma_b(index, boundsCheckLimit, label, cond);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Address boundsCheckLimit, Label* label)
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Address boundsCheckLimit,
|
||||
Label* label)
|
||||
{
|
||||
SecondScratchRegisterScope scratch2(*this);
|
||||
load32(boundsCheckLimit,SecondScratchReg);
|
||||
load32(boundsCheckLimit, SecondScratchReg);
|
||||
ma_b(index, SecondScratchReg, label, cond);
|
||||
}
|
||||
|
||||
|
|
|
@ -2310,13 +2310,15 @@ MacroAssembler::storeUnboxedValue(const ConstantOrRegister& value, MIRType value
|
|||
|
||||
|
||||
void
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Register boundsCheckLimit, Label* label)
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Register boundsCheckLimit,
|
||||
Label* label)
|
||||
{
|
||||
ma_b(index, boundsCheckLimit, label, cond);
|
||||
}
|
||||
|
||||
void
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Address boundsCheckLimit, Label* label)
|
||||
MacroAssembler::wasmBoundsCheck(Condition cond, Register index, Address boundsCheckLimit,
|
||||
Label* label)
|
||||
{
|
||||
SecondScratchRegisterScope scratch2(*this);
|
||||
load32(boundsCheckLimit, SecondScratchReg);
|
||||
|
|
Загрузка…
Ссылка в новой задаче