diff options
| author | iximeow <me@iximeow.net> | 2026-08-02 19:44:54 +0000 |
|---|---|---|
| committer | iximeow <me@iximeow.net> | 2026-08-02 19:44:54 +0000 |
| commit | b9deebeead9c29c3a14b7293015913734aa66702 (patch) | |
| tree | 739ae1e41c07c0c60dc0689e06ec45df29a6bfed | |
| parent | 345eacf8f1dc29cb4cd836e3d585d30497e7ea72 (diff) | |
thumb SIMD encoding should have returned Incomplete
| -rw-r--r-- | CHANGELOG | 10 | ||||
| -rw-r--r-- | src/armv7/thumb.rs | 1 |
2 files changed, 11 insertions, 0 deletions
@@ -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<T: Reader<<ARMv7 as Arch>::Address, <ARMv7 as Arch>::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: |
