summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Guillen Fandos2021-05-05 21:31:24 +0200
committerDavid G. F2021-05-05 21:33:48 +0200
commit7877a8888b4e607c3df77c5d5f47e2c880cb9a24 (patch)
tree8acc3a9b6a1a22a7d74b66bd2777c401b24445bc
parent883f07f487ecd2e803cf2f924ab1e9a51e5f4fa9 (diff)
downloadpicogpsp-7877a8888b4e607c3df77c5d5f47e2c880cb9a24.tar.gz
picogpsp-7877a8888b4e607c3df77c5d5f47e2c880cb9a24.tar.bz2
picogpsp-7877a8888b4e607c3df77c5d5f47e2c880cb9a24.zip
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?)
-rw-r--r--cpu.c2
1 files changed, 1 insertions, 1 deletions
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); \
} \