diff --git a/src/dynarec/dynablock_private.h b/src/dynarec/dynablock_private.h index 18666e04e..4bf7dd7ad 100644 --- a/src/dynarec/dynablock_private.h +++ b/src/dynarec/dynablock_private.h @@ -10,14 +10,15 @@ typedef struct dynablock_s { void* block; // block-sizeof(void*) == self void* actual_block; // the actual start of the block (so block-sizeof(void*)) struct dynablock_s* previous; // a previous block that might need to be freed - int size; void* x64_addr; uintptr_t x64_size; + int size; uint32_t hash; uint8_t done; uint8_t gone; - uint8_t always_test; uint8_t dirty; // if need to be tested as soon as it's created + uint8_t always_test:1; + uint8_t is32bits:1; int isize; instsize_t* instsize; void* jmpnext; // a branch jmpnext code when block is marked diff --git a/src/dynarec/dynarec_native.c b/src/dynarec/dynarec_native.c index e7cad50da..dc0e18305 100644 --- a/src/dynarec/dynarec_native.c +++ b/src/dynarec/dynarec_native.c @@ -514,7 +514,7 @@ uintptr_t native_pass1(dynarec_native_t* dyn, uintptr_t addr, int alternate, int uintptr_t native_pass2(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits); uintptr_t native_pass3(dynarec_native_t* dyn, uintptr_t addr, int alternate, int is32bits); -void* CreateEmptyBlock(dynablock_t* block, uintptr_t addr) { +void* CreateEmptyBlock(dynablock_t* block, uintptr_t addr, int is32bits) { block->isize = 0; block->done = 0; size_t sz = 4*sizeof(void*); @@ -529,6 +529,7 @@ void* CreateEmptyBlock(dynablock_t* block, uintptr_t addr) { block->actual_block = actual_p; block->block = p; block->jmpnext = p; + block->is32bits = is32bits; *(dynablock_t**)actual_p = block; *(void**)(p+2*sizeof(void*)) = native_epilog; CreateJmpNext(block->jmpnext, p+2*sizeof(void*)); @@ -553,7 +554,7 @@ void* FillBlock64(dynablock_t* block, uintptr_t addr, int alternate, int is32bit */ if(addr>=box64_nodynarec_start && addrjmpnext = next+sizeof(void*); block->always_test = helper.always_test; block->dirty = block->always_test; + block->is32bits = is32bits; *(dynablock_t**)next = block; *(void**)(next+3*sizeof(void*)) = native_next; CreateJmpNext(block->jmpnext, next+3*sizeof(void*));