Revision: 16730
Author:   [email protected]
Date:     Mon Sep 16 12:38:41 2013 UTC
Log:      Make HCompareNumericAndBranch safe for snapshots on ia32.

[email protected]

Review URL: https://codereview.chromium.org/24078012
http://code.google.com/p/v8/source/detail?r=16730

Modified:
 /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc

=======================================
--- /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Fri Sep 13 12:01:32 2013 UTC +++ /branches/bleeding_edge/src/ia32/lithium-codegen-ia32.cc Mon Sep 16 12:38:41 2013 UTC
@@ -2556,10 +2556,18 @@
     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()) {

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to