diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-02-16 12:17:42 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-02-16 12:17:42 +0100 |
| commit | 8f4e8ed1e7b6dff16396a84c5cb23ab72008035a (patch) | |
| tree | ba2a8f553261159ab398981b028c9ed98465cbfc /src/dynarec/dynarec_native.c | |
| parent | 0e10ead81adc6756cebc075f8b041a22d08d3c2d (diff) | |
| download | box64-8f4e8ed1e7b6dff16396a84c5cb23ab72008035a.tar.gz box64-8f4e8ed1e7b6dff16396a84c5cb23ab72008035a.zip | |
[DYNAREC] Various small fixes and improvment on Dynarec
Diffstat (limited to 'src/dynarec/dynarec_native.c')
| -rwxr-xr-x | src/dynarec/dynarec_native.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/dynarec/dynarec_native.c b/src/dynarec/dynarec_native.c index 506eaf0f..c2cf1387 100755 --- a/src/dynarec/dynarec_native.c +++ b/src/dynarec/dynarec_native.c @@ -425,6 +425,19 @@ void* CreateEmptyBlock(dynablock_t* block, uintptr_t addr) { } void* FillBlock64(dynablock_t* block, uintptr_t addr) { + /* + A Block must have this layout: + + 0x0000..0x0007 : dynablock_t* : self + 0x0008..8+4*n : actual Native instructions, (n is the total number) + A .. A+8*n : Table64: n 64bits values + B .. B+7 : dynablock_t* : self (as part of JmpNext, that simulate another block) + B+8 .. B+15 : 2 Native code for jmpnext (or jmp epilog in case of empty block) + B+16 .. B+23 : jmpnext (or jmp_epilog) address + B+24 .. B+31 : empty (in case an architecture needs more than 2 opcodes) + B+32 .. B+32+sz : instsize (compressed array with each instruction lenght on x64 and native side) + + */ if(IsInHotPage(addr)) { dynarec_log(LOG_DEBUG, "Cancelling dynarec FillBlock on hotpage for %p\n", (void*)addr); return NULL; |