Fix the LxS fix on the new recompiler.
This commit is contained in:
@@ -998,10 +998,9 @@ codegen_MEM_LOAD_REG(codeblock_t *block, uop_t *uop)
|
|||||||
|
|
||||||
host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg);
|
host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg);
|
||||||
if (uop->imm_data) {
|
if (uop->imm_data) {
|
||||||
|
host_x86_ADD32_REG_IMM(block, REG_ESI, uop->imm_data);
|
||||||
if (uop->is_a16) {
|
if (uop->is_a16) {
|
||||||
host_x86_ADD16_REG_IMM(block, REG_SI, uop->imm_data);
|
host_x86_AND32_REG_IMM(block, REG_ESI, 0x0000ffff);
|
||||||
} else {
|
|
||||||
host_x86_ADD32_REG_IMM(block, REG_ESI, uop->imm_data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (REG_IS_B(dest_size)) {
|
if (REG_IS_B(dest_size)) {
|
||||||
|
|||||||
@@ -982,10 +982,9 @@ codegen_MEM_LOAD_REG(codeblock_t *block, uop_t *uop)
|
|||||||
|
|
||||||
host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg);
|
host_x86_LEA_REG_REG(block, REG_ESI, seg_reg, addr_reg);
|
||||||
if (uop->imm_data) {
|
if (uop->imm_data) {
|
||||||
|
host_x86_ADD32_REG_IMM(block, REG_ESI, uop->imm_data);
|
||||||
if (uop->is_a16) {
|
if (uop->is_a16) {
|
||||||
host_x86_ADD16_REG_IMM(block, REG_SI, uop->imm_data);
|
host_x86_AND32_REG_IMM(block, REG_ESI, 0x0000ffff);
|
||||||
} else {
|
|
||||||
host_x86_ADD32_REG_IMM(block, REG_ESI, uop->imm_data);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (REG_IS_B(dest_size)) {
|
if (REG_IS_B(dest_size)) {
|
||||||
|
|||||||
@@ -491,13 +491,14 @@ uop_gen_reg_dst_src2_imm(uint32_t uop_type, ir_data_t *ir, int dest_reg, int src
|
|||||||
uop_t *uop = uop_alloc(ir, uop_type);
|
uop_t *uop = uop_alloc(ir, uop_type);
|
||||||
|
|
||||||
uop->type = uop_type;
|
uop->type = uop_type;
|
||||||
uop->src_reg_a = codegen_reg_read(src_reg_a);
|
|
||||||
uop->is_a16 = 0;
|
uop->is_a16 = 0;
|
||||||
|
uop->src_reg_a = codegen_reg_read(src_reg_a);
|
||||||
if (src_reg_b == IREG_eaa16) {
|
if (src_reg_b == IREG_eaa16) {
|
||||||
uop->src_reg_b = codegen_reg_read(IREG_eaaddr);
|
uop->src_reg_b = codegen_reg_read(IREG_eaaddr);
|
||||||
uop->is_a16 = 1;
|
uop->is_a16 = 1;
|
||||||
} else
|
} else
|
||||||
uop->src_reg_b = codegen_reg_read(src_reg_b);
|
uop->src_reg_b = codegen_reg_read(src_reg_b);
|
||||||
|
uop->is_a16 = 0;
|
||||||
uop->dest_reg_a = codegen_reg_write(dest_reg, ir->wr_pos - 1);
|
uop->dest_reg_a = codegen_reg_write(dest_reg, ir->wr_pos - 1);
|
||||||
uop->imm_data = imm;
|
uop->imm_data = imm;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user