X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=libpcsxcore%2Fnew_dynarec%2Fpcsxmem.c;h=0a75442b0a151e50813f48e16de3820440a22d71;hp=a42852ad7af43e81553c6970a36f84feaa00e590;hb=578c68827e20b1e4c0a1a6352dd4a74ab3d05ef2;hpb=9705788a21dc36515ba498d45ba2f197f7bcd628 diff --git a/libpcsxcore/new_dynarec/pcsxmem.c b/libpcsxcore/new_dynarec/pcsxmem.c index a42852ad..0a75442b 100644 --- a/libpcsxcore/new_dynarec/pcsxmem.c +++ b/libpcsxcore/new_dynarec/pcsxmem.c @@ -30,7 +30,12 @@ static u32 mem_ffwtab[(1+2+4) * 0x1000 / 4]; //static u32 mem_unmrtab[(1+2+4) * 0x1000 / 4]; static u32 mem_unmwtab[(1+2+4) * 0x1000 / 4]; +// When this is called in a loop, and 'h' is a function pointer, clang will crash. +#ifdef __clang__ +static __attribute__ ((noinline)) void map_item(u32 *out, const void *h, u32 flag) +#else static void map_item(u32 *out, const void *h, u32 flag) +#endif { u32 hv = (u32)h; if (hv & 1) { @@ -338,11 +343,17 @@ void new_dyna_pcsx_mem_init(void) // scratchpad map_l1_mem(mem_readtab, 0, 0x1f800000, 0x1000, psxH); + map_l1_mem(mem_readtab, 0, 0x9f800000, 0x1000, psxH); map_l1_mem(mem_writetab, 0, 0x1f800000, 0x1000, psxH); + map_l1_mem(mem_writetab, 0, 0x9f800000, 0x1000, psxH); // I/O map_item(&mem_readtab[0x1f801000 >> 12], mem_iortab, 1); + map_item(&mem_readtab[0x9f801000 >> 12], mem_iortab, 1); + map_item(&mem_readtab[0xbf801000 >> 12], mem_iortab, 1); map_item(&mem_writetab[0x1f801000 >> 12], mem_iowtab, 1); + map_item(&mem_writetab[0x9f801000 >> 12], mem_iowtab, 1); + map_item(&mem_writetab[0xbf801000 >> 12], mem_iowtab, 1); // L2 // unmapped tables