From 7877a8888b4e607c3df77c5d5f47e2c880cb9a24 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Wed, 5 May 2021 21:31:24 +0200 Subject: Fix aligned32 reads in interpreter mode An address check was missing to read aligned 32 (stm/ldm) data from high mem areas (0xX0000000). This fixes SM4 EU that for some reason has some weird memory access (perhaps a bug?) --- cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpu.c b/cpu.c index 5df8bb8..cd9bba6 100644 --- a/cpu.c +++ b/cpu.c @@ -1024,7 +1024,7 @@ const u32 psr_masks[16] = memory_region_access_read_u32[_address >> 24]++; \ memory_reads_u32++; \ } \ - if(map) \ + if(_address < 0x10000000 && map) \ { \ dest = address32(map, _address & 0x7FFF); \ } \ -- cgit v1.2.3