aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2026-08-02 19:58:02 +0000
committeriximeow <me@iximeow.net>2026-08-02 19:58:02 +0000
commitfa428aefa6789c744e1e887a719fc2a07ad00188 (patch)
treef8236bb0addeb42c62c77c70dc55e519a873b914 /src
parent2037c3a87532f39963fb0e39ac06f0fffbb6ae2e (diff)
sufficiently advanced SIMD is indistinguishable from coprocessors
Diffstat (limited to 'src')
-rw-r--r--src/armv7/thumb.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/armv7/thumb.rs b/src/armv7/thumb.rs
index 1f0cdf5..2259dee 100644
--- a/src/armv7/thumb.rs
+++ b/src/armv7/thumb.rs
@@ -4149,6 +4149,32 @@ fn decode_table_a6_30(decoder: &InstDecoder, inst: &mut Instruction, instr2: Bit
return Err(DecodeError::Incomplete);
} else {
let coproc = lower2[8..12].load::<u8>();
+ // TODO: this become more structured in v8 thumb, compare with what became
+ // > Coprocessor, floating-point, and vector instructions
+ //
+ // where the "coproc" field is interpreted as only three bits, and values >= 0b100 are
+ // vector/float operations of some sort, except 0b110 which is "architected coprocessor
+ // data-processing instructions"
+ //
+ // using those definitions first, piece out the SIMD instructions..
+ if coproc >= 0b1000 {
+ if coproc & 0b1110 != 0b1100 {
+ // Vector move instructions,
+ // Floating-point data-processing, minNum/maxNum, and convert,
+ // Floating-point and vector move (register)
+ // Vector immediate and register, and coprocessor data-processing instructions
+ // the last one may seem curious, but afaict from DDI0553B.z there are actually no
+ // coprocessor data-processing instructions that are not just vector ops.
+ return Err(DecodeError::Incomplete);
+ }
+
+ // by DDI0487M.c (ARMv8.4?) section
+ // > F3.1.14 Additional Advanced SIMD and floating-point instructions
+ //
+ // seems to have fully consumed the coproc = 0b1xxx space for simd
+ return Err(DecodeError::Incomplete);
+ }
+
if coproc & 0b1110 != 0b1010 {
// `not 101x` rows
if op1 == 0b000100 {