aboutsummaryrefslogtreecommitdiff
path: root/tests/armv7
diff options
context:
space:
mode:
authorGrond <grond@grondhaus.net>2026-06-24 14:11:18 -0700
committeriximeow <me@iximeow.net>2026-07-28 02:53:24 +0000
commit44f91bf710081d98b465252487a6b168b2f2597e (patch)
tree4a345f7574fc83ccfa7d4fe7a757e39eacf2eb93 /tests/armv7
parent40743d84ffc8bbe0a4e24b9af4d65d58a1367b23 (diff)
Implement the RRX immediate shift type
Diffstat (limited to 'tests/armv7')
-rw-r--r--tests/armv7/mod.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/armv7/mod.rs b/tests/armv7/mod.rs
index 9a9e718..632bd3e 100644
--- a/tests/armv7/mod.rs
+++ b/tests/armv7/mod.rs
@@ -707,6 +707,11 @@ fn test_register_shift_rotate() {
// applied shift is 32.
test_armv6([0x21, 0x00, 0x20, 0x00], "eoreq r0, r0, r1, lsr 32");
test_armv6([0x41, 0x00, 0x20, 0x00], "eoreq r0, r0, r1, asr 32");
+
+ // When the argument of an immediate ROR shift is 0, it actually specifies an entirely
+ // different shift mode called RRX which only shifts by one to the right and populates the MSB
+ // with the carry flag.
+ test_all([0x62, 0x00, 0x01, 0xe0], "and r0, r1, r2, rrx");
}
static INSTRUCTION_BYTES: [u8; 4 * 60] = [