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.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/armv7.rs') diff --git a/src/armv7.rs b/src/armv7.rs index a67067f..01c1827 100644 --- a/src/armv7.rs +++ b/src/armv7.rs @@ -161,6 +161,16 @@ pub enum Opcode { SEV, CSDB, YIELD, + /// ARM generally does not have a blanket `hint #123` instruction, but does have a section of + /// opcode space reserved for architectural hinting. this is where `nop`, `yield`, `wfe`, etc + /// are defined. those "hints" have defined architectural (non-)effects and have their own + /// Opcode variants. for the bit patterns not yet defined to a specific hint, the ARM reference + /// manual says the execution on historical processors is as if `op2 is set to 0b00000000` + /// (that is, `nop`), but that software must not use these unallocated encodings. + /// + /// so, `hint` exists to describe these "execute-as-nop" instructions which have at least one + /// operand describing possible future behavior. instructions that are defined in this space + /// are expected to be decoded as distinct opcodes. HINT, NOP, LEAVEX, -- cgit v1.1