Bug 1201793 - correct scratch register scope r=nbp CLOSED TREE

This commit is contained in:
Lars T Hansen 2015-09-08 12:58:49 +02:00
parent 2ff9f5eab9
commit 1af063ce60

View File

@ -547,12 +547,14 @@ CodeGeneratorARM::visitDivI(LDivI* ins)
if (mir->canTruncateRemainder()) {
masm.ma_sdiv(lhs, rhs, output);
} else {
ScratchRegisterScope scratch(masm);
masm.ma_sdiv(lhs, rhs, scratch);
masm.ma_mul(scratch, rhs, temp);
masm.ma_cmp(lhs, temp);
{
ScratchRegisterScope scratch(masm);
masm.ma_sdiv(lhs, rhs, temp);
masm.ma_mul(temp, rhs, scratch);
masm.ma_cmp(lhs, scratch);
}
bailoutIf(Assembler::NotEqual, ins->snapshot());
masm.ma_mov(scratch, output);
masm.ma_mov(temp, output);
}
masm.bind(&done);