Index: src/mips/code-stubs-mips.cc |
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc |
index 6d7892d5c3f3434f1803981264d09f39a3e70729..befe77aa507ed855f7a6ed43b5faf2052da08f12 100644 |
--- a/src/mips/code-stubs-mips.cc |
+++ b/src/mips/code-stubs-mips.cc |
@@ -857,7 +857,7 @@ void MathPowStub::Generate(MacroAssembler* masm) { |
// double_scratch can be overwritten in the delay slot. |
// Calculates square root of base. Check for the special case of |
// Math.pow(-Infinity, 0.5) == Infinity (ECMA spec, 15.8.2.13). |
- __ Move(double_scratch, std::numeric_limits<double>::infinity()); |
+ __ Move(double_scratch, -std::numeric_limits<double>::infinity()); |
__ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch); |
__ neg_d(double_result, double_scratch); |
@@ -877,7 +877,7 @@ void MathPowStub::Generate(MacroAssembler* masm) { |
// double_scratch can be overwritten in the delay slot. |
// Calculates square root of base. Check for the special case of |
// Math.pow(-Infinity, -0.5) == 0 (ECMA spec, 15.8.2.13). |
- __ Move(double_scratch, std::numeric_limits<double>::infinity()); |
+ __ Move(double_scratch, -std::numeric_limits<double>::infinity()); |
__ BranchF(USE_DELAY_SLOT, &done, NULL, eq, double_base, double_scratch); |
__ Move(double_result, kDoubleRegZero); |