diff options
| author | Grond <grond@grondhaus.net> | 2026-06-24 18:19:33 -0700 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2026-07-28 02:53:24 +0000 |
| commit | 88db0bb355e14ba58658026df7708e62696978b2 (patch) | |
| tree | ed1adb7639a0d71a3026a4905e582c800df9e0c5 /tests/armv7 | |
| parent | e987f1c7ea59ed2e7d09368e7b110fc213f00ff9 (diff) | |
Simplify decoding of register-shifted-register data-processing instructions
Previously, immediate-shifted-register and register-shifted-register
data-processing instructions were decoded using separate decoding paths,
which caused extra complexity. These two forms differ only in the
interpretation of their shifting constructs, which is already handled
through the `RegShift` type.
This change also fixes instructions like `cmp r0, r1, lsl r2` from being
decoded with an extra operand.
Diffstat (limited to 'tests/armv7')
| -rw-r--r-- | tests/armv7/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/armv7/mod.rs b/tests/armv7/mod.rs index 58f7e0c..78d725b 100644 --- a/tests/armv7/mod.rs +++ b/tests/armv7/mod.rs @@ -740,8 +740,10 @@ fn test_cmp_immediate_decode() { fn test_cmp_register_decode() { test_all([0x01, 0x00, 0x52, 0xe1], "cmps r2, r1"); test_all([0x01, 0x03, 0x52, 0xe1], "cmps r2, r1, lsl 6"); + test_all([0x11, 0x03, 0x52, 0xe1], "cmps r2, r1, lsl r3"); test_all([0x01, 0x00, 0x72, 0xe1], "cmns r2, r1"); test_all([0x01, 0x03, 0x72, 0xe1], "cmns r2, r1, lsl 6"); + test_all([0x11, 0x03, 0x72, 0xe1], "cmns r2, r1, lsl r3"); } static INSTRUCTION_BYTES: [u8; 4 * 60] = [ |
