Index: src/arm/simulator-arm.cc |
=================================================================== |
--- src/arm/simulator-arm.cc (revision 12582) |
+++ src/arm/simulator-arm.cc (working copy) |
@@ -1498,10 +1498,18 @@ |
} |
case ROR: { |
- UNIMPLEMENTED(); |
+ if (shift_amount == 0) { |
+ *carry_out = c_flag_; |
+ } else { |
+ int32_t left = result >> shift_amount; |
Erik Corry
2012/09/27 14:45:44
How does this work with a negative input?
|
+ int32_t right = result << (32 - shift_amount); |
+ result = right | left; |
+ *carry_out = false; |
ulan
2012/09/27 14:55:30
The carry_out should contain the last shifted bit
|
+ } |
break; |
} |
ulan
2012/09/27 14:55:30
We can remove this empty line.
|
+ |
default: { |
UNREACHABLE(); |
break; |