Index: src/arm/simulator-arm.cc |
diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc |
index 5b8ba2adae0d5178145ef523691f11033a602ecf..5cdba9c467a65c1b23862ccbf3638837784152a6 100644 |
--- a/src/arm/simulator-arm.cc |
+++ b/src/arm/simulator-arm.cc |
@@ -1459,7 +1459,14 @@ int32_t Simulator::GetShiftRm(Instruction* instr, bool* carry_out) { |
} |
case ROR: { |
- UNIMPLEMENTED(); |
+ if (shift_amount == 0) { |
+ *carry_out = c_flag_; |
+ } else { |
+ uint32_t left = static_cast<uint32_t>(result) >> shift_amount; |
+ uint32_t right = static_cast<uint32_t>(result) << (32 - shift_amount); |
+ result = right | left; |
+ *carry_out = (static_cast<uint32_t>(result) >> 31) != 0; |
+ } |
break; |
} |