Index: src/arm/lithium-codegen-arm.cc |
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc |
index 8049b689eacf5e4ca579e42fa61d130eaccb8dff..a809ffd3cc236d997725a190b9cbba38005030dd 100644 |
--- a/src/arm/lithium-codegen-arm.cc |
+++ b/src/arm/lithium-codegen-arm.cc |
@@ -2472,6 +2472,34 @@ void LCodeGen::DoCmpHoleAndBranch(LCmpHoleAndBranch* instr) { |
} |
+void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) { |
+ Representation rep = instr->hydrogen()->value()->representation(); |
+ ASSERT(!rep.IsInteger32()); |
+ Label if_false; |
+ Register scratch = ToRegister(instr->temp()); |
+ |
+ if (rep.IsDouble()) { |
+ DwVfpRegister value = ToDoubleRegister(instr->value()); |
+ __ VFPCompareAndSetFlags(value, 0.0); |
+ __ b(ne, &if_false); |
+ __ VmovHigh(scratch, value); |
+ __ cmp(scratch, Operand(0x80000000)); |
+ } else { |
+ Register value = ToRegister(instr->value()); |
+ __ CheckMap( |
+ value, scratch, Heap::kHeapNumberMapRootIndex, &if_false, DO_SMI_CHECK); |
+ __ ldr(scratch, FieldMemOperand(value, HeapNumber::kExponentOffset)); |
+ __ ldr(ip, FieldMemOperand(value, HeapNumber::kMantissaOffset)); |
+ __ cmp(scratch, Operand(0x80000000)); |
+ __ cmp(ip, Operand(0x00000000), eq); |
+ } |
+ EmitBranch(instr, eq); |
+ |
+ __ bind(&if_false); |
+ EmitFalseBranch(instr, al); |
+} |
+ |
+ |
Condition LCodeGen::EmitIsObject(Register input, |
Register temp1, |
Label* is_not_object, |