Index: src/x87/code-stubs-x87.cc |
diff --git a/src/x87/code-stubs-x87.cc b/src/x87/code-stubs-x87.cc |
index 4e39ab86297a8e52f75f198763eacb4e6da7e9d8..e6fc7b83e49a3b98b7fdb37d84e2b97ec37da04c 100644 |
--- a/src/x87/code-stubs-x87.cc |
+++ b/src/x87/code-stubs-x87.cc |
@@ -3258,7 +3258,7 @@ void CompareICStub::GenerateSmis(MacroAssembler* masm) { |
void CompareICStub::GenerateNumbers(MacroAssembler* masm) { |
DCHECK(state() == CompareICState::NUMBER); |
- Label generic_stub; |
+ Label generic_stub, check_left; |
Label unordered, maybe_undefined1, maybe_undefined2; |
Label miss; |
@@ -3271,13 +3271,13 @@ void CompareICStub::GenerateNumbers(MacroAssembler* masm) { |
// Inlining the double comparison and falling back to the general compare |
// stub if NaN is involved or SSE2 or CMOV is unsupported. |
- __ mov(ecx, edx); |
- __ and_(ecx, eax); |
- __ JumpIfSmi(ecx, &generic_stub, Label::kNear); |
- |
+ __ JumpIfSmi(eax, &check_left, Label::kNear); |
__ cmp(FieldOperand(eax, HeapObject::kMapOffset), |
isolate()->factory()->heap_number_map()); |
__ j(not_equal, &maybe_undefined1, Label::kNear); |
+ |
+ __ bind(&check_left); |
+ __ JumpIfSmi(edx, &generic_stub, Label::kNear); |
__ cmp(FieldOperand(edx, HeapObject::kMapOffset), |
isolate()->factory()->heap_number_map()); |
__ j(not_equal, &maybe_undefined2, Label::kNear); |