sh2 drc: fix for crash in generated code on x86_64
authorkub <derkub@gmail.com>
Sat, 8 Feb 2020 12:29:32 +0000 (13:29 +0100)
committerkub <derkub@gmail.com>
Sat, 8 Feb 2020 14:14:04 +0000 (15:14 +0100)
cpu/drc/emit_x86.c

index ec13551..80ec044 100644 (file)
@@ -1007,7 +1007,8 @@ enum { xAX = 0, xCX, xDX, xBX, xSP, xBP, xSI, xDI,        // x86-64,i386 common
 #define host_instructions_updated(base, end)   (void)(base),(void)(end)
 #define        emith_update_cache()    /**/
 
-#define emith_rw_offs_max()    0xffffffff
+// NB this MUST be <0x40000000 to avoid overflow in address calculations
+#define emith_rw_offs_max()    0xfffffff // for better perfomance: <0x10000000
 
 #ifdef __x86_64__