diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-03-02 19:38:23 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-03-02 19:38:23 +0100 |
| commit | c4b57774f0b4794ad22e3e8c9fb4be760431b64e (patch) | |
| tree | 7bed6efa782cceaec1634bd75f20c3dd564c4ec6 /src/include/custommem.h | |
| parent | f7acded7a1d3b3e349f55dd41f56818da0e5a283 (diff) | |
| download | box64-c4b57774f0b4794ad22e3e8c9fb4be760431b64e.tar.gz box64-c4b57774f0b4794ad22e3e8c9fb4be760431b64e.zip | |
[DYNAREC] Finetuned the jump table memory allocation
Diffstat (limited to 'src/include/custommem.h')
| -rw-r--r-- | src/include/custommem.h | 13 |
1 files changed, 13 insertions, 0 deletions
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 |