Reviewers: Kevin Millikin,

Description:
Do not return the constant singleton float -0.0 from UnaryOpStub, because it may
be overwritten, on X64 platform.

Please review this at http://codereview.chromium.org/3748007/show

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/x64/code-stubs-x64.cc


Index: src/x64/code-stubs-x64.cc
===================================================================
--- src/x64/code-stubs-x64.cc   (revision 5628)
+++ src/x64/code-stubs-x64.cc   (working copy)
@@ -1413,20 +1413,8 @@
         __ j(equal, &done);
       }
       __ SmiNeg(rax, rax, &done);
+      __ jmp(&slow);  // zero, if not handled above, and Smi::kMinValue.

-      // Either zero or Smi::kMinValue, neither of which become a smi when
-      // negated. We handle negative zero here if required. We always enter
-      // the runtime system if we have Smi::kMinValue.
-      if (negative_zero_ == kStrictNegativeZero) {
-        __ SmiCompare(rax, Smi::FromInt(0));
-        __ j(not_equal, &slow);
-        __ Move(rax, Factory::minus_zero_value());
-        __ jmp(&done);
-      } else  {
-        __ SmiCompare(rax, Smi::FromInt(Smi::kMinValue));
-        __ j(equal, &slow);
-        __ jmp(&done);
-      }
       // Try floating point case.
       __ bind(&try_float);
     } else if (FLAG_debug_code) {


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to