diff --git a/src/ia32/lithium-codegen-ia32.cc b/src/ia32/lithium-codegen-ia32.cc index 5e947e5f45..86118ebf6b 100644 --- a/src/ia32/lithium-codegen-ia32.cc +++ b/src/ia32/lithium-codegen-ia32.cc @@ -4156,7 +4156,7 @@ void LCodeGen::DoMathLog(LMathLog* instr) { __ xorps(xmm_scratch, xmm_scratch); __ ucomisd(input_reg, xmm_scratch); __ j(above, &positive, Label::kNear); - __ j(equal, &zero, Label::kNear); + __ j(not_carry, &zero, Label::kNear); ExternalReference nan = ExternalReference::address_of_canonical_non_hole_nan(); __ movsd(input_reg, Operand::StaticVariable(nan)); diff --git a/src/x64/lithium-codegen-x64.cc b/src/x64/lithium-codegen-x64.cc index 8a1b679a5c..c392b455d5 100644 --- a/src/x64/lithium-codegen-x64.cc +++ b/src/x64/lithium-codegen-x64.cc @@ -3726,7 +3726,7 @@ void LCodeGen::DoMathLog(LMathLog* instr) { __ xorps(xmm_scratch, xmm_scratch); __ ucomisd(input_reg, xmm_scratch); __ j(above, &positive, Label::kNear); - __ j(equal, &zero, Label::kNear); + __ j(not_carry, &zero, Label::kNear); ExternalReference nan = ExternalReference::address_of_canonical_non_hole_nan(); Operand nan_operand = masm()->ExternalOperand(nan);