From f36709e65142736031062d553e07c91fc0601ec1 Mon Sep 17 00:00:00 2001 From: kub Date: Sat, 8 Feb 2020 13:29:32 +0100 Subject: [PATCH] sh2 drc: fix for crash in generated code on x86_64 --- cpu/drc/emit_x86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpu/drc/emit_x86.c b/cpu/drc/emit_x86.c index ec13551e..80ec0444 100644 --- a/cpu/drc/emit_x86.c +++ b/cpu/drc/emit_x86.c @@ -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__ -- 2.39.5