Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index cf76a086720a7282487f2d59ddd09f6938c79759..e264cc7c4df768fe192beafe55f5882120d9eebf 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -4886,7 +4886,13 @@ void LCodeGen::EmitNumberUntagD(Register input_reg, |
DeoptimizeIf(ne, env); |
} else { |
Label heap_number, convert; |
+ if (!deoptimize_on_minus_zero) { |
+ __ vldr(result_reg, input_reg, |
+ HeapNumber::kValueOffset - kHeapObjectTag, eq); |
+ __ b(eq, &done); |
+ } else { |
__ b(eq, &heap_number); |
Benedikt Meurer
2013/09/12 07:23:41
Nit: indentation.
|
+ } |
// Convert undefined (and hole) to NaN. |
__ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
@@ -4900,8 +4906,11 @@ void LCodeGen::EmitNumberUntagD(Register input_reg, |
__ bind(&heap_number); |
} |
+ |
// Heap number to double register conversion. |
- __ vldr(result_reg, input_reg, HeapNumber::kValueOffset - kHeapObjectTag); |
+ if (!can_convert_undefined_to_nan || deoptimize_on_minus_zero) { |
+ __ vldr(result_reg, input_reg, HeapNumber::kValueOffset - kHeapObjectTag); |
+ } |
if (deoptimize_on_minus_zero) { |
__ VmovLow(scratch, result_reg); |
__ cmp(scratch, Operand::Zero()); |
@@ -4925,6 +4934,7 @@ void LCodeGen::EmitNumberUntagD(Register input_reg, |
} |
+ |
Benedikt Meurer
2013/09/12 07:23:41
Nit: new line.
|
void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) { |
Register input_reg = ToRegister(instr->value()); |
Register scratch1 = scratch0(); |