aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2024-03-17 09:22:32 +0000
committeriximeow <me@iximeow.net>2024-03-17 09:22:32 +0000
commitfe1662042b0bb6abfac96f1d582f1e5221a500d3 (patch)
tree94b7b482be01cde7bf079156d488faa961afad26
parent3479c054c06b69c001096a059f6ced24eba1d56c (diff)
ye olde "const array rebuilt in locals with simd but static is const" issue
-rw-r--r--src/armv8/a64.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/armv8/a64.rs b/src/armv8/a64.rs
index b94273f..20098b9 100644
--- a/src/armv8/a64.rs
+++ b/src/armv8/a64.rs
@@ -3195,7 +3195,7 @@ impl Decoder<ARMv8> for InstDecoder {
*/
let section_bits = word >> 25;
- let section = [
+ static SECTIONS: [Section; 16] = [
Section::SME, // 0000 // SME encodings
Section::Unallocated, // 0001
Section::SVE, // 0010 // SVE encodings
@@ -3212,7 +3212,8 @@ impl Decoder<ARMv8> for InstDecoder {
Section::DataProcessingReg, // 1101
Section::LoadStore, // 1110
Section::DataProcessingSimd2, // 1111
- ][(section_bits & 0x0f) as usize];
+ ];
+ let section = SECTIONS[(section_bits & 0x0f) as usize];
// crate::armv8::a64::std::eprintln!("word: {:#x}, bits: {:#b}", word, section_bits & 0xf);