Chromium Code Reviews| Index: src/arm/lithium-codegen-arm.cc |
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
| index 94f5116415c46847122d3e36f59b1e5c04661684..ea2ed6d9dcf13b3b564cb32775ea650a3c145c46 100644 |
| --- a/src/arm/lithium-codegen-arm.cc |
| +++ b/src/arm/lithium-codegen-arm.cc |
| @@ -3385,20 +3385,26 @@ void LCodeGen::DoDoubleToI(LDoubleToI* instr) { |
| scratch2); |
| // Deoptimize if we had a vfp invalid exception. |
| DeoptimizeIf(ne, instr->environment()); |
| + |
| // Retrieve the result. |
| __ vmov(result_reg, single_scratch); |
| - if (instr->truncating() && |
| - instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| - Label done; |
| - __ cmp(result_reg, Operand(0)); |
| - __ b(ne, &done); |
| - // Check for -0. |
| - __ vmov(scratch1, double_input.high()); |
| - __ tst(scratch1, Operand(HeapNumber::kSignMask)); |
| + if (!instr->truncating()) { |
|
Søren Thygesen Gjesse
2011/02/24 09:09:17
Please add a comment here explaining the conversio
|
| + __ vmov(single_scratch, result_reg); |
| + __ vcvt_f64_s32(double_scratch0(), single_scratch); |
| + __ VFPCompareAndSetFlags(double_scratch0(), double_input); |
| DeoptimizeIf(ne, instr->environment()); |
| + if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
| + Label done; |
| + __ cmp(result_reg, Operand(0)); |
| + __ b(ne, &done); |
| + // Check for -0. |
| + __ vmov(scratch1, double_input.high()); |
| + __ tst(scratch1, Operand(HeapNumber::kSignMask)); |
| + DeoptimizeIf(ne, instr->environment()); |
| - __ bind(&done); |
| + __ bind(&done); |
| + } |
| } |
| } |