From b9deebeead9c29c3a14b7293015913734aa66702 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 2 Aug 2026 19:44:54 +0000 Subject: thumb SIMD encoding should have returned Incomplete --- CHANGELOG | 10 ++++++++++ src/armv7/thumb.rs | 1 + 2 files changed, 11 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index b552484..20c885d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -44,6 +44,16 @@ as well as thumb2 fixes from @brandonros: thank you for the patches! +additionally, one of the cases where thumb-mode SIMD instructions should have +been rejected with DecodeError::Incomplete instead fell through to report a +successful decode result of the provided instruction. this now results in +DecodeError::Incomplete as expected. + +when decoding into an instruction multiple times (such as `Decoder::decode_into`) +the provided instruction would be left in an incoherent state mostly consiting +of its previous data. when decoding as through `Decoder::decode`, the returned +instruction had opcode `Invalid`. + ## 0.4.0 * ARMv7 and A64 `Opcode` and `Operand` are now `#[non_exhaustive]`. diff --git a/src/armv7/thumb.rs b/src/armv7/thumb.rs index 439c3a6..b8d1192 100644 --- a/src/armv7/thumb.rs +++ b/src/armv7/thumb.rs @@ -2212,6 +2212,7 @@ pub fn decode_into::Address, ::Word>>(d } else { // `Advanced SIMD element or structure load/store instructions` // (`A7-273`) + return Err(DecodeError::Incomplete); } } else { // this section is a merger of three tables: -- cgit v1.1