From fe1662042b0bb6abfac96f1d582f1e5221a500d3 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sun, 17 Mar 2024 09:22:32 +0000 Subject: ye olde "const array rebuilt in locals with simd but static is const" issue --- src/armv8/a64.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/armv8') 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 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 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); -- cgit v1.1