From c4b57774f0b4794ad22e3e8c9fb4be760431b64e Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Thu, 2 Mar 2023 19:38:23 +0100 Subject: [DYNAREC] Finetuned the jump table memory allocation --- src/include/box64context.h | 1 - src/include/custommem.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/box64context.h b/src/include/box64context.h index c8360017..3e55ff44 100755 --- a/src/include/box64context.h +++ b/src/include/box64context.h @@ -33,7 +33,6 @@ typedef struct mmaplist_s mmaplist_t; typedef struct kh_dynablocks_s kh_dynablocks_t; #endif #define DYNAMAP_SHIFT 16 -#define JMPTABL_SHIFT 16 typedef void* (*procaddess_t)(const char* name); typedef void* (*vkprocaddess_t)(void* instance, const char* name); diff --git a/src/include/custommem.h b/src/include/custommem.h index acea9e21..b1645133 100644 --- a/src/include/custommem.h +++ b/src/include/custommem.h @@ -34,6 +34,19 @@ int isJumpTableDefault64(void* addr); uintptr_t getJumpTable64(); uintptr_t getJumpTableAddress64(uintptr_t addr); uintptr_t getJumpAddress64(uintptr_t addr); + +#define JMPTABL_SHIFT3 18 +#define JMPTABL_SHIFT2 18 +#define JMPTABL_SHIFT1 18 +#define JMPTABL_SHIFT0 10 +#define JMPTABL_START3 (JMPTABL_SHIFT0+JMPTABL_SHIFT1+JMPTABL_SHIFT2) +#define JMPTABL_START2 (JMPTABL_SHIFT0+JMPTABL_SHIFT1) +#define JMPTABL_START1 (JMPTABL_SHIFT0) +#define JMPTABL_START0 0 +#define JMPTABLE_MASK3 ((1<