diff options
Diffstat (limited to 'src/include')
| -rwxr-xr-x | src/include/box64context.h | 1 | ||||
| -rw-r--r-- | src/include/custommem.h | 13 |
2 files changed, 13 insertions, 1 deletions
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<<JMPTABL_SHIFT3)-1) +#define JMPTABLE_MASK2 ((1<<JMPTABL_SHIFT2)-1) +#define JMPTABLE_MASK1 ((1<<JMPTABL_SHIFT1)-1) +#define JMPTABLE_MASK0 ((1<<JMPTABL_SHIFT0)-1) #endif #define PROT_DYNAREC 0x80 |