Added recompiled versions of JMP indirect, JMP far, RETF, LxS, XLAT and LEAVE.
This commit is contained in:
parent
1aadfd436d
commit
592b07be63
14 changed files with 475 additions and 19 deletions
|
|
@ -602,6 +602,36 @@ static int codegen_JMP(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_LOAD_FUNC_ARG0(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
int src_reg = HOST_REG_GET(uop->src_reg_a_real);
|
||||
int src_size = IREG_GET_SIZE(uop->src_reg_a_real);
|
||||
|
||||
if (REG_IS_W(src_size))
|
||||
{
|
||||
host_arm64_AND_IMM(block, REG_ARG0, src_reg, 0xffff);
|
||||
}
|
||||
else
|
||||
fatal("codegen_LOAD_FUNC_ARG0 %02x\n", uop->src_reg_a_real);
|
||||
|
||||
return 0;
|
||||
}
|
||||
static int codegen_LOAD_FUNC_ARG1(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
fatal("codegen_LOAD_FUNC_ARG1 %02x\n", uop->src_reg_a_real);
|
||||
return 0;
|
||||
}
|
||||
static int codegen_LOAD_FUNC_ARG2(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
fatal("codegen_LOAD_FUNC_ARG2 %02x\n", uop->src_reg_a_real);
|
||||
return 0;
|
||||
}
|
||||
static int codegen_LOAD_FUNC_ARG3(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
fatal("codegen_LOAD_FUNC_ARG3 %02x\n", uop->src_reg_a_real);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_LOAD_FUNC_ARG0_IMM(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
host_arm64_mov_imm(block, REG_ARG0, uop->imm_data);
|
||||
|
|
@ -690,6 +720,8 @@ static int codegen_MEM_LOAD_REG(codeblock_t *block, uop_t *uop)
|
|||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real);
|
||||
|
||||
host_arm64_ADD_REG(block, REG_X0, seg_reg, addr_reg, 0);
|
||||
if (uop->imm_data)
|
||||
host_arm64_ADD_IMM(block, REG_X0, REG_X0, uop->imm_data);
|
||||
if (REG_IS_B(dest_size) || REG_IS_BH(dest_size))
|
||||
{
|
||||
host_arm64_call(block, codegen_mem_load_byte);
|
||||
|
|
@ -763,6 +795,8 @@ static int codegen_MEM_STORE_REG(codeblock_t *block, uop_t *uop)
|
|||
int src_size = IREG_GET_SIZE(uop->src_reg_c_real);
|
||||
|
||||
host_arm64_ADD_REG(block, REG_W0, seg_reg, addr_reg, 0);
|
||||
if (uop->imm_data)
|
||||
host_arm64_ADD_IMM(block, REG_X0, REG_X0, uop->imm_data);
|
||||
if (REG_IS_B(src_size))
|
||||
{
|
||||
host_arm64_AND_IMM(block, REG_W1, src_reg, 0xff);
|
||||
|
|
@ -1460,6 +1494,11 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
|
||||
[UOP_LOAD_SEG & UOP_MASK] = codegen_LOAD_SEG,
|
||||
|
||||
[UOP_LOAD_FUNC_ARG_0 & UOP_MASK] = codegen_LOAD_FUNC_ARG0,
|
||||
[UOP_LOAD_FUNC_ARG_1 & UOP_MASK] = codegen_LOAD_FUNC_ARG1,
|
||||
[UOP_LOAD_FUNC_ARG_2 & UOP_MASK] = codegen_LOAD_FUNC_ARG2,
|
||||
[UOP_LOAD_FUNC_ARG_3 & UOP_MASK] = codegen_LOAD_FUNC_ARG3,
|
||||
|
||||
[UOP_LOAD_FUNC_ARG_0_IMM & UOP_MASK] = codegen_LOAD_FUNC_ARG0_IMM,
|
||||
[UOP_LOAD_FUNC_ARG_1_IMM & UOP_MASK] = codegen_LOAD_FUNC_ARG1_IMM,
|
||||
[UOP_LOAD_FUNC_ARG_2_IMM & UOP_MASK] = codegen_LOAD_FUNC_ARG2_IMM,
|
||||
|
|
|
|||
Loading…
Reference in a new issue