From 3b834ed7b77cadb09e2f37fd6234f24925b875b8 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 1 Jan 2022 02:22:43 -0800 Subject: more inconvenient test case handling --- src/armv8/a64.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs index eb709d0..c0d61e6 100644 --- a/src/armv8/a64.rs +++ b/src/armv8/a64.rs @@ -7421,7 +7421,7 @@ impl Decoder for InstDecoder { return Err(DecodeError::InvalidOpcode); } - if opcode >= 0b001000 && Rn != 0b11111 { + if opcode >= 0b100000 { return Err(DecodeError::InvalidOperand); } @@ -7449,6 +7449,9 @@ impl Decoder for InstDecoder { if opcode < 0b001000 { Operand::RegisterOrSP(SizeCode::X, Rn) } else { + if Rn != 0b11111 { + return Err(DecodeError::InvalidOpcode); + } Operand::Nothing }, Operand::Nothing, -- cgit v1.1