From a91c1c50a39ff68a7e73cef70829e8a5b08b4b6b Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 17 Mar 2024 02:44:57 +0000 Subject: be more explicit about undefined system instructions being invalid --- src/armv8/a64.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/armv8') diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs index 19440ba..a228027 100644 --- a/src/armv8/a64.rs +++ b/src/armv8/a64.rs @@ -10454,7 +10454,12 @@ impl Decoder for InstDecoder { ]; } 0b100 => { + // quote C5.1.2: + // All encodings with L==1 and op0==0b0x are UNDEFINED, except + // for encodings in the area reserved for IMPLEMENTATION + // DEFINED use inst.opcode = Opcode::Invalid; + return Err(DecodeError::InvalidOpcode); } 0b101 => { let Rt = word & 0b11111; @@ -10484,6 +10489,7 @@ impl Decoder for InstDecoder { } _ => { inst.opcode = Opcode::Invalid; + return Err(DecodeError::InvalidOpcode); } } } -- cgit v1.1