Fix up offset calculations in x86-64 absolute address opcode generation, and add pointer to RAM array in NO_IMMEDIATES blocks. Fixes crashes/segfaults with x86-64 recompiler.
This commit is contained in:
parent
57be2ef8d4
commit
b98a6d63b1
3 changed files with 74 additions and 16 deletions
|
|
@ -358,6 +358,8 @@ void codegen_backend_prologue(codeblock_t *block)
|
|||
host_x86_SUB32_REG_IMM(block, REG_EAX, block->TOP);
|
||||
host_x86_MOV32_BASE_OFFSET_REG(block, REG_RSP, IREG_TOP_diff_stack_offset, REG_EAX);
|
||||
}
|
||||
if (block->flags & CODEBLOCK_NO_IMMEDIATES)
|
||||
host_x86_MOV64_REG_IMM(block, REG_R12, (uintptr_t)ram);
|
||||
}
|
||||
|
||||
void codegen_backend_epilogue(codeblock_t *block)
|
||||
|
|
|
|||
Loading…
Reference in a new issue