aboutsummaryrefslogtreecommitdiff
path: root/src/armv7/thumb.rs
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-08-03 00:25:39 +0000
committeriximeow <me@iximeow.net>2026-08-03 00:25:39 +0000
commitee19aba4c34f495d29c87b6d2c9d32614ba62cf8 (patch)
tree0a8b685c4dfe3328cf3a58e5c83ca32b9a69b8c9 /src/armv7/thumb.rs
parent1158b671a39d01ce3de822c814d4d3bae3466918 (diff)
decode unknown wide hints like any other hints
Diffstat (limited to 'src/armv7/thumb.rs')
-rw-r--r--src/armv7/thumb.rs21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/armv7/thumb.rs b/src/armv7/thumb.rs
index ab3f94b..cba18a4 100644
--- a/src/armv7/thumb.rs
+++ b/src/armv7/thumb.rs
@@ -1808,8 +1808,25 @@ pub fn decode_into<T: Reader<<ARMv7 as Arch>::Address, <ARMv7 as Arch>::Word>>(d
Operand::Nothing,
];
}
- _ => {
- return Err(DecodeError::Undefined);
+ hint => {
+ // from DDI0406 C.d (v7):
+ // > Encodings with op1 set to 0b000 and a value of
+ // > op2 that is not shown in the table are
+ // > unallocated hints, and behave as if op2 is set
+ // > to 0b00000000. These unallocated hint encodings
+ // > are reserved and software must not use them.
+ //
+ // so.. it would be "right" to report these as
+ // "nop", but the hint operand is interesting for
+ // forward compatibility. guess that means we
+ // invent a "hint" instruction too?
+ inst.opcode = Opcode::HINT;
+ inst.operands = [
+ Operand::Imm12(hint as u16),
+ Operand::Nothing,
+ Operand::Nothing,
+ Operand::Nothing,
+ ];
}
}
}