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
|
|
@ -676,6 +676,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_arm_UXTH(block, REG_ARG0, src_reg, 0);
|
||||
}
|
||||
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_arm_MOV_IMM(block, REG_ARG0, uop->imm_data);
|
||||
|
|
@ -761,6 +791,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_arm_ADD_REG(block, REG_R0, seg_reg, addr_reg);
|
||||
if (uop->imm_data)
|
||||
host_arm_ADD_IMM(block, REG_R0, REG_R0, uop->imm_data);
|
||||
if (REG_IS_B(dest_size) || REG_IS_BH(dest_size))
|
||||
{
|
||||
host_arm_BL(block, (uintptr_t)codegen_mem_load_byte);
|
||||
|
|
@ -832,6 +864,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_arm_ADD_REG(block, REG_R0, seg_reg, addr_reg);
|
||||
if (uop->imm_data)
|
||||
host_arm_ADD_IMM(block, REG_R0, REG_R0, uop->imm_data);
|
||||
if (REG_IS_B(src_size))
|
||||
{
|
||||
host_arm_MOV_REG(block, REG_R1, src_reg);
|
||||
|
|
@ -1540,6 +1574,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