aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGrond <grond@grondhaus.net>2026-06-24 18:58:33 -0700
committeriximeow <me@iximeow.net>2026-07-28 02:53:24 +0000
commit485aaac0f82e6b5546ae392b6be626c4558cc26a (patch)
tree24f0717953d8b8db7c892d88727f5b60c9ce5a02 /src
parent88db0bb355e14ba58658026df7708e62696978b2 (diff)
Decode the correct number of operands for TST/TEQ (immediate/register)
Diffstat (limited to 'src')
-rw-r--r--src/armv7.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/armv7.rs b/src/armv7.rs
index f23d0c9..c2c232b 100644
--- a/src/armv7.rs
+++ b/src/armv7.rs
@@ -2606,6 +2606,7 @@ impl Decoder<ARMv7> for InstDecoder {
];
}
+ Opcode::TST | Opcode::TEQ |
Opcode::CMP | Opcode::CMN => {
if self.should_is_must {
if Rd != 0 {
@@ -2731,6 +2732,8 @@ impl Decoder<ARMv7> for InstDecoder {
inst.opcode = Opcode::ADR;
}
match opcode {
+ // TST/TEQ (immediate)
+ 0b1000 | 0b1001 |
// CMP/CMN (immediate)
0b1010 | 0b1011 => {
// According to A8-368, there are 4 bits right above the immediate that