| Index: src/x64/lithium-codegen-x64.cc
|
| ===================================================================
|
| --- src/x64/lithium-codegen-x64.cc (revision 14364)
|
| +++ src/x64/lithium-codegen-x64.cc (working copy)
|
| @@ -1498,11 +1498,15 @@
|
| }
|
| break;
|
| case Token::SHR:
|
| - if (shift_count == 0 && instr->can_deopt()) {
|
| + if (shift_count != 0) {
|
| + __ shrl(ToRegister(left), Immediate(shift_count));
|
| + } else if (instr->can_deopt()) {
|
| __ testl(ToRegister(left), ToRegister(left));
|
| DeoptimizeIf(negative, instr->environment());
|
| } else {
|
| - __ shrl(ToRegister(left), Immediate(shift_count));
|
| + // Even if the shift is zero, we have to zero out the high bits with
|
| + // a movl for negative inputs.
|
| + __ movl(ToRegister(left), ToRegister(left));
|
| }
|
| break;
|
| case Token::SHL:
|
|
|