Chromium Code Reviews| 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; |
| } |