Index: src/ia32/macro-assembler-ia32.cc |
diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc |
index f938d500182161151c5ebf633dc6f5a8315790aa..fb0acb29ad97ef3190a17e2d07d2a0c311e78b67 100644 |
--- a/src/ia32/macro-assembler-ia32.cc |
+++ b/src/ia32/macro-assembler-ia32.cc |
@@ -250,18 +250,17 @@ void MacroAssembler::TruncateDoubleToI(Register result_reg, |
} |
-void MacroAssembler::DoubleToI(Register result_reg, |
- XMMRegister input_reg, |
+void MacroAssembler::DoubleToI(Register result_reg, XMMRegister input_reg, |
XMMRegister scratch, |
MinusZeroMode minus_zero_mode, |
- Label* conversion_failed, |
- Label::Distance dst) { |
+ Label* lost_precision, Label* is_nan, |
+ Label* minus_zero, Label::Distance dst) { |
DCHECK(!input_reg.is(scratch)); |
cvttsd2si(result_reg, Operand(input_reg)); |
Cvtsi2sd(scratch, Operand(result_reg)); |
ucomisd(scratch, input_reg); |
- j(not_equal, conversion_failed, dst); |
- j(parity_even, conversion_failed, dst); // NaN. |
+ j(not_equal, lost_precision, dst); |
+ j(parity_even, is_nan, dst); |
if (minus_zero_mode == FAIL_ON_MINUS_ZERO) { |
Label done; |
// The integer converted back is equal to the original. We |
@@ -271,9 +270,9 @@ void MacroAssembler::DoubleToI(Register result_reg, |
movmskpd(result_reg, input_reg); |
// Bit 0 contains the sign of the double in input_reg. |
// If input was positive, we are ok and return 0, otherwise |
- // jump to conversion_failed. |
+ // jump to minus_zero. |
and_(result_reg, 1); |
- j(not_zero, conversion_failed, dst); |
+ j(not_zero, minus_zero, dst); |
bind(&done); |
} |
} |