Added recompiled versions of MOVD and MOVQ.
This commit is contained in:
parent
f545d9d57f
commit
76115568f2
10 changed files with 320 additions and 15 deletions
|
|
@ -649,6 +649,26 @@ static int codegen_FP_ENTER(codeblock_t *block, uop_t *uop)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_MMX_ENTER(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
uint8_t *branch_offset;
|
||||
|
||||
host_x86_MOV32_REG_ABS(block, REG_ECX, &cr0);
|
||||
host_x86_TEST32_REG_IMM(block, REG_ECX, 0xc);
|
||||
branch_offset = host_x86_JZ_short(block);
|
||||
host_x86_MOV32_ABS_IMM(block, &cpu_state.oldpc, uop->imm_data);
|
||||
host_x86_MOV32_STACK_IMM(block, STACK_ARG0, 7);
|
||||
host_x86_CALL(block, x86_int);
|
||||
host_x86_JMP(block, &block->data[BLOCK_EXIT_OFFSET]);
|
||||
*branch_offset = (uint8_t)((uintptr_t)&block->data[block_pos] - (uintptr_t)branch_offset) - 1;
|
||||
host_x86_MOV32_ABS_IMM(block, &cpu_state.tag[0], 0);
|
||||
host_x86_MOV32_ABS_IMM(block, &cpu_state.tag[4], 0);
|
||||
host_x86_MOV32_ABS_IMM(block, &cpu_state.TOP, 0);
|
||||
host_x86_MOV8_ABS_IMM(block, &cpu_state.ismmx, 1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int codegen_JMP(codeblock_t *block, uop_t *uop)
|
||||
{
|
||||
host_x86_JMP(block, uop->p);
|
||||
|
|
@ -1073,7 +1093,15 @@ static int codegen_MOVZX(codeblock_t *block, uop_t *uop)
|
|||
int dest_reg = HOST_REG_GET(uop->dest_reg_a_real), src_reg = HOST_REG_GET(uop->src_reg_a_real);
|
||||
int dest_size = IREG_GET_SIZE(uop->dest_reg_a_real), src_size = IREG_GET_SIZE(uop->src_reg_a_real);
|
||||
|
||||
if (REG_IS_L(dest_size) && REG_IS_W(src_size))
|
||||
if (REG_IS_Q(dest_size) && REG_IS_L(src_size))
|
||||
{
|
||||
host_x86_MOVD_XREG_REG(block, dest_reg, src_reg);
|
||||
}
|
||||
else if (REG_IS_L(dest_size) && REG_IS_Q(src_size))
|
||||
{
|
||||
host_x86_MOVD_REG_XREG(block, dest_reg, src_reg);
|
||||
}
|
||||
else if (REG_IS_L(dest_size) && REG_IS_W(src_size))
|
||||
{
|
||||
host_x86_MOVZX_REG_32_16(block, dest_reg, src_reg);
|
||||
}
|
||||
|
|
@ -1642,7 +1670,8 @@ const uOpFn uop_handlers[UOP_MAX] =
|
|||
[UOP_TEST_JNS_DEST & UOP_MASK] = codegen_TEST_JNS_DEST,
|
||||
[UOP_TEST_JS_DEST & UOP_MASK] = codegen_TEST_JS_DEST,
|
||||
|
||||
[UOP_FP_ENTER & UOP_MASK] = codegen_FP_ENTER,
|
||||
[UOP_FP_ENTER & UOP_MASK] = codegen_FP_ENTER,
|
||||
[UOP_MMX_ENTER & UOP_MASK] = codegen_MMX_ENTER,
|
||||
|
||||
[UOP_FADD & UOP_MASK] = codegen_FADD,
|
||||
[UOP_FDIV & UOP_MASK] = codegen_FDIV,
|
||||
|
|
|
|||
Loading…
Reference in a new issue