Index: src/arm64/simulator-arm64.cc |
diff --git a/src/arm64/simulator-arm64.cc b/src/arm64/simulator-arm64.cc |
index c88b9b79a8e579ae98398f51cac8227080ae8fc1..3c970f854a07a6f2bb64ca186d074b7a4cce981c 100644 |
--- a/src/arm64/simulator-arm64.cc |
+++ b/src/arm64/simulator-arm64.cc |
@@ -1979,7 +1979,8 @@ void Simulator::VisitDataProcessing2Source(Instruction* instr) { |
if (shift_op != NO_SHIFT) { |
// Shift distance encoded in the least-significant five/six bits of the |
// register. |
- int mask = (instr->SixtyFourBits() == 1) ? 0x3f : 0x1f; |
+ int mask = (instr->SixtyFourBits() == 1) ? kShiftAmountXRegMask |
+ : kShiftAmountWRegMask; |
unsigned shift = wreg(instr->Rm()) & mask; |
result = ShiftOperand(reg_size, reg(reg_size, instr->Rn()), shift_op, |
shift); |