Index: src/arm/simulator-arm.cc |
diff --git a/src/arm/simulator-arm.cc b/src/arm/simulator-arm.cc |
index 91df404f9af3a00a191d8d232d4c5858e4d3155b..578dc4329bd4f2c05b537ad79b0e05303d1a1268 100644 |
--- a/src/arm/simulator-arm.cc |
+++ b/src/arm/simulator-arm.cc |
@@ -1426,7 +1426,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; |
} |