Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index 2f34d6915f75ab34a9b3e21ea8b12f360fa2f890..7c1f65ffc30e090d2df59611f7129b448b1781b4 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -758,13 +758,10 @@ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op, |
ASSERT(instr->left()->representation().IsDouble()); |
ASSERT(instr->right()->representation().IsDouble()); |
if (op == Token::MOD) { |
- LOperand* left = UseFixedDouble(instr->left(), d1); |
- LOperand* right = UseFixedDouble(instr->right(), d2); |
+ LOperand* left = UseFixedDouble(instr->left(), d0); |
+ LOperand* right = UseFixedDouble(instr->right(), d1); |
LArithmeticD* result = new(zone()) LArithmeticD(op, left, right); |
- // We call a C function for double modulo. It can't trigger a GC. We need |
- // to use fixed result register for the call. |
- // TODO(fschneider): Allow any register as input registers. |
- return MarkAsCall(DefineFixedDouble(result, d1), instr); |
+ return MarkAsCall(DefineFixedDouble(result, d0), instr); |
} else { |
LOperand* left = UseRegisterAtStart(instr->left()); |
LOperand* right = UseRegisterAtStart(instr->right()); |
@@ -1269,17 +1266,16 @@ LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) { |
LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) { |
- LOperand* input = UseRegister(instr->value()); |
+ LOperand* input = UseRegisterAtStart(instr->value()); |
LMathSqrt* result = new(zone()) LMathSqrt(input); |
return DefineAsRegister(result); |
} |
LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) { |
- LOperand* input = UseFixedDouble(instr->value(), d2); |
- LOperand* temp = FixedTemp(d3); |
- LMathPowHalf* result = new(zone()) LMathPowHalf(input, temp); |
- return DefineFixedDouble(result, d2); |
+ LOperand* input = UseRegisterAtStart(instr->value()); |
+ LMathPowHalf* result = new(zone()) LMathPowHalf(input); |
+ return DefineAsRegister(result); |
} |
@@ -1718,12 +1714,12 @@ LInstruction* LChunkBuilder::DoPower(HPower* instr) { |
// We need to use fixed result register for the call. |
Representation exponent_type = instr->right()->representation(); |
ASSERT(instr->left()->representation().IsDouble()); |
- LOperand* left = UseFixedDouble(instr->left(), d1); |
+ LOperand* left = UseFixedDouble(instr->left(), d0); |
LOperand* right = exponent_type.IsDouble() ? |
- UseFixedDouble(instr->right(), d2) : |
+ UseFixedDouble(instr->right(), d1) : |
UseFixed(instr->right(), r2); |
LPower* result = new(zone()) LPower(left, right); |
- return MarkAsCall(DefineFixedDouble(result, d3), |
+ return MarkAsCall(DefineFixedDouble(result, d2), |
instr, |
CAN_DEOPTIMIZE_EAGERLY); |
} |