Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(352)

Unified Diff: src/x64/code-stubs-x64.cc

Issue 3748007: Do not return the constant singleton float -0.0 from UnaryOpStub, because it ... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/smi-negative-zero.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | test/mjsunit/smi-negative-zero.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698