| Index: src/arm/lithium-arm.cc
|
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
|
| index 6e6f1fa1e13b95d82b1547824de6cb54cf7f4158..d63024a3b315182e900d224302f9b2b76d10b41b 100644
|
| --- a/src/arm/lithium-arm.cc
|
| +++ b/src/arm/lithium-arm.cc
|
| @@ -1237,12 +1237,15 @@ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
|
| if (instr->representation().IsDouble()) {
|
| return DoArithmeticD(Token::DIV, instr);
|
| } else if (instr->representation().IsInteger32()) {
|
| - // The temporary operand is necessary to ensure that right is not allocated
|
| - // into edx.
|
| - FixedTemp(r1);
|
| + // TODO(1042) The fixed register allocation
|
| + // is needed because we call GenericBinaryOpStub from
|
| + // the generated code, which requires registers r0
|
| + // and r1 to be used. We should remove that
|
| + // when we provide a native implementation.
|
| LOperand* value = UseFixed(instr->left(), r0);
|
| - LOperand* divisor = UseRegister(instr->right());
|
| - return AssignEnvironment(DefineFixed(new LDivI(value, divisor), r0));
|
| + LOperand* divisor = UseFixed(instr->right(), r1);
|
| + return AssignEnvironment(AssignPointerMap(
|
| + DefineFixed(new LDivI(value, divisor), r0)));
|
| } else {
|
| return DoArithmeticT(Token::DIV, instr);
|
| }
|
|
|