Bug 1534492 - Prevent RegAlloc from allocating an argument register for a temp used in passAbiArg base operand. r=sstangl

Differential Revision: https://phabricator.services.mozilla.com/D25944

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas B. Pierron 2019-04-04 13:33:34 +00:00
Родитель 6137929bc0
Коммит 207369bbb9
3 изменённых файлов: 11 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,6 @@
x = [0];
for (let i = 0; i < 1; ++i) {
try {
Math.cos(x[0])(Math.sin(x[0]));
} catch (e) {}
}

Просмотреть файл

@ -3409,7 +3409,8 @@ void LIRGenerator::visitSinCos(MSinCos* ins) {
ins->input()->type() == MIRType::Int32);
LSinCos* lir = new (alloc()) LSinCos(useRegisterAtStart(ins->input()),
tempFixed(CallTempReg0), temp());
tempFixed(CallTempNonArgRegs[0]),
tempFixed(CallTempNonArgRegs[1]));
defineSinCos(lir, ins);
}

Просмотреть файл

@ -44,6 +44,9 @@ static constexpr Register CallTempReg3{Registers::invalid_reg};
static constexpr Register CallTempReg4{Registers::invalid_reg};
static constexpr Register CallTempReg5{Registers::invalid_reg};
static constexpr Register InvalidReg{Registers::invalid_reg};
static constexpr Register CallTempNonArgRegs[] = {InvalidReg, InvalidReg};
static const uint32_t NumCallTempNonArgRegs =
mozilla::ArrayLength(CallTempNonArgRegs);
static constexpr Register IntArgReg0{Registers::invalid_reg};
static constexpr Register IntArgReg1{Registers::invalid_reg};