Index: src/ia32/codegen-ia32.cc |
diff --git a/src/ia32/codegen-ia32.cc b/src/ia32/codegen-ia32.cc |
index 86e31bd77cfcee40499282fc21c45672014a698d..74a343bf3930c671a680d30a2dcfa0f4b164ac2e 100644 |
--- a/src/ia32/codegen-ia32.cc |
+++ b/src/ia32/codegen-ia32.cc |
@@ -2497,7 +2497,9 @@ void CodeGenerator::Comparison(AstNode* node, |
// by reconstituting them on the non-fall-through path. |
if (left_side.is_smi()) { |
- if (FLAG_debug_code) __ AbortIfNotSmi(left_side.reg()); |
+ if (FLAG_debug_code) { |
+ __ AbortIfNotSmi(left_side.reg()); |
+ } |
} else { |
JumpTarget is_smi; |
__ test(left_side.reg(), Immediate(kSmiTagMask)); |
@@ -2526,7 +2528,7 @@ void CodeGenerator::Comparison(AstNode* node, |
__ cvtsi2sd(xmm0, Operand(temp.reg())); |
temp.Unuse(); |
} |
- __ comisd(xmm1, xmm0); |
+ __ ucomisd(xmm1, xmm0); |
// Jump to builtin for NaN. |
not_number.Branch(parity_even, &left_side); |
left_side.Unuse(); |
@@ -2817,11 +2819,7 @@ void CodeGenerator::Comparison(AstNode* node, |
// number comparison in the stub if it was inlined. |
CompareStub stub(cc, strict, nan_info, !inline_number_compare); |
Result answer = frame_->CallStub(&stub, &left_side, &right_side); |
- if (cc == equal) { |
- __ test(answer.reg(), Operand(answer.reg())); |
- } else { |
- __ cmp(answer.reg(), 0); |
- } |
+ __ test(answer.reg(), Operand(answer.reg())); |
answer.Unuse(); |
dest->true_target()->Branch(cc); |
dest->false_target()->Jump(); |