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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 11568044: Add DoubleToSmi optimistically, preventing boxing/unboxing of doubles and propagate smi-nessof the … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years 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 | « runtime/vm/intermediate_language_x64.cc ('k') | tests/standalone/double_to_int_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
===================================================================
--- runtime/vm/intrinsifier_x64.cc (revision 16233)
+++ runtime/vm/intrinsifier_x64.cc (working copy)
@@ -1392,8 +1392,9 @@
// Overflow is signalled with minint.
Label fall_through;
// Check for overflow and that it fits into Smi.
- __ cmpq(RAX, Immediate(0xC000000000000000));
- __ j(NEGATIVE, &fall_through, Assembler::kNearJump);
+ __ movq(TMP, RAX);
Vyacheslav Egorov (Google) 2012/12/18 11:45:10 I thought only Assembler could use TMP?
srdjan 2012/12/18 16:29:47 You are correct. Switched to using RCX instead.
+ __ shlq(TMP, Immediate(1));
+ __ j(OVERFLOW, &fall_through, Assembler::kNearJump);
__ SmiTag(RAX);
__ ret();
__ Bind(&fall_through);
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | tests/standalone/double_to_int_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698