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

Unified Diff: runtime/vm/intermediate_language_x64.cc

Issue 10542079: Implement Smi binops ia32 (new compiler). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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
« runtime/vm/code_generator.cc ('K') | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language_x64.cc
===================================================================
--- runtime/vm/intermediate_language_x64.cc (revision 8442)
+++ runtime/vm/intermediate_language_x64.cc (working copy)
@@ -815,9 +815,7 @@
}
-// TODO(srdjan): Implement variations.
static void EmitSmiBinaryOp(FlowGraphCompiler* compiler, BinaryOpComp* comp) {
- // TODO(srdjan): need to allocate a temporary register (now using r10)
Register left = comp->locs()->in(0).reg();
Register right = comp->locs()->in(1).reg();
Register result = comp->locs()->out().reg();
@@ -890,7 +888,8 @@
break;
}
case Token::kSHR: {
- const Immediate kCountLimit = Immediate(0x1F);
+ // The count is masked to 6 bits on x64.
Vyacheslav Egorov (Google) 2012/06/08 16:43:25 It's not masking. It's clamping between 0 and numb
srdjan 2012/06/08 16:50:33 Clarifying comment: sarq operations masks the coun
+ const Immediate kCountLimit = Immediate(0x3F);
Vyacheslav Egorov (Google) 2012/06/08 16:43:25 Nice catch! Can we add a regression test to ensur
srdjan 2012/06/08 16:50:33 The previous worked as well, we just went to slow
__ cmpq(right, Immediate(0));
__ j(LESS, deopt);
__ SmiUntag(right);
@@ -899,7 +898,7 @@
__ j(LESS, &count_ok, Assembler::kNearJump);
__ movq(right, kCountLimit);
__ Bind(&count_ok);
- ASSERT(right == RCX); // Count must be in ECX
+ ASSERT(right == RCX); // Count must be in RCX
__ SmiUntag(left);
__ sarq(left, right);
__ SmiTag(left);
@@ -948,7 +947,7 @@
}
-static bool EmitDoubleBinaryOp(FlowGraphCompiler* compiler,
+static void EmitDoubleBinaryOp(FlowGraphCompiler* compiler,
BinaryOpComp* comp) {
Register left = comp->locs()->in(0).reg();
Register right = comp->locs()->in(1).reg();
@@ -991,7 +990,6 @@
}
__ movsd(FieldAddress(result, Double::value_offset()), XMM0);
- return true;
}
« runtime/vm/code_generator.cc ('K') | « runtime/vm/intermediate_language_ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698