From ee19aba4c34f495d29c87b6d2c9d32614ba62cf8 Mon Sep 17 00:00:00 2001 From: iximeow Date: Mon, 3 Aug 2026 00:25:39 +0000 Subject: decode unknown wide hints like any other hints --- src/armv7/thumb.rs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/armv7') 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::Address, ::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, + ]; } } } -- cgit v1.1