Fix codegen pointer register reads.
This commit is contained in:
parent
335cea3ee1
commit
356f406b22
9 changed files with 118 additions and 1 deletions
|
|
@ -2687,6 +2687,13 @@ void codegen_direct_read_64(codeblock_t *block, int host_reg, void *p)
|
|||
else
|
||||
fatal("codegen_direct_read_double - not in range\n");
|
||||
}
|
||||
void codegen_direct_read_pointer(codeblock_t *block, int host_reg, void *p)
|
||||
{
|
||||
if (in_range12_q((uintptr_t)p - (uintptr_t)&cpu_state))
|
||||
host_arm64_LDR_IMM_X(block, host_reg, REG_CPUSTATE, (uintptr_t)p - (uintptr_t)&cpu_state);
|
||||
else
|
||||
fatal("codegen_direct_read_pointer - not in range\n");
|
||||
}
|
||||
void codegen_direct_read_double(codeblock_t *block, int host_reg, void *p)
|
||||
{
|
||||
if (in_range12_q((uintptr_t)p - (uintptr_t)&cpu_state))
|
||||
|
|
@ -2801,6 +2808,13 @@ void codegen_direct_read_32_stack(codeblock_t *block, int host_reg, int stack_of
|
|||
else
|
||||
fatal("codegen_direct_read_32_stack - not in range\n");
|
||||
}
|
||||
void codegen_direct_read_pointer_stack(codeblock_t *block, int host_reg, int stack_offset)
|
||||
{
|
||||
if (in_range12_q(stack_offset))
|
||||
host_arm64_LDR_IMM_X(block, host_reg, REG_SP, stack_offset);
|
||||
else
|
||||
fatal("codegen_direct_read_pointer_stack - not in range\n");
|
||||
}
|
||||
void codegen_direct_read_64_stack(codeblock_t *block, int host_reg, int stack_offset)
|
||||
{
|
||||
host_arm64_LDR_IMM_F64(block, host_reg, REG_SP, stack_offset);
|
||||
|
|
|
|||
Loading…
Reference in a new issue