Commit 73b03b89 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Make HCompareNumericAndBranch safe for snapshots on ia32.

R=danno@chromium.org

Review URL: https://codereview.chromium.org/24078012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7b41d6d4
......@@ -2556,10 +2556,18 @@ void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
EmitGoto(next_block);
} else {
if (instr->is_double()) {
CpuFeatureScope scope(masm(), SSE2);
if (CpuFeatures::IsSafeForSnapshot(SSE2)) {
CpuFeatureScope scope(masm(), SSE2);
__ ucomisd(ToDoubleRegister(left), ToDoubleRegister(right));
} else {
X87Fxch(ToX87Register(right));
X87Fxch(ToX87Register(left), 1);
__ fld(0);
__ fld(2);
__ FCmp();
}
// Don't base result on EFLAGS when a NaN is involved. Instead
// jump to the false block.
__ ucomisd(ToDoubleRegister(left), ToDoubleRegister(right));
__ j(parity_even, instr->FalseLabel(chunk_));
} else {
if (right->IsConstantOperand()) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment