And fix the op_32 stuff.

This commit is contained in:
OBattler
2025-04-07 06:29:57 +02:00
parent 6884dc5736
commit 576d643c4f
3 changed files with 4 additions and 4 deletions

View File

@@ -600,12 +600,12 @@ ropMOV_seg_w(UNUSED(uint8_t opcode), uint32_t fetchdat, uint32_t op_32, uint32_t
MEM_LOAD_ADDR_EA_L(target_seg); \ MEM_LOAD_ADDR_EA_L(target_seg); \
STORE_HOST_REG_ADDR((uintptr_t) &codegen_temp, 0); \ STORE_HOST_REG_ADDR((uintptr_t) &codegen_temp, 0); \
LOAD_EA(); \ LOAD_EA(); \
MEM_LOAD_ADDR_EA_W_OFFSET(target_seg, 4); \ MEM_LOAD_ADDR_EA_W_OFFSET(target_seg, 4, op_32); \
} else { \ } else { \
MEM_LOAD_ADDR_EA_W(target_seg); \ MEM_LOAD_ADDR_EA_W(target_seg); \
STORE_HOST_REG_ADDR_W((uintptr_t) &codegen_temp, 0); \ STORE_HOST_REG_ADDR_W((uintptr_t) &codegen_temp, 0); \
LOAD_EA(); \ LOAD_EA(); \
MEM_LOAD_ADDR_EA_W_OFFSET(target_seg, 2); \ MEM_LOAD_ADDR_EA_W_OFFSET(target_seg, 2, op_32); \
} \ } \
LOAD_SEG(0, &rseg); \ LOAD_SEG(0, &rseg); \
if (op_32 & 0x100) { \ if (op_32 & 0x100) { \

View File

@@ -1049,7 +1049,7 @@ MEM_LOAD_ADDR_EA_W(x86seg *seg)
/*done:*/ /*done:*/
} }
static __inline void static __inline void
MEM_LOAD_ADDR_EA_W_OFFSET(x86seg *seg, int offset) MEM_LOAD_ADDR_EA_W_OFFSET(x86seg *seg, int offset, int op_32)
{ {
addbyte(0x83); /*ADD EAX, offset*/ addbyte(0x83); /*ADD EAX, offset*/
addbyte(0xc0); addbyte(0xc0);

View File

@@ -789,7 +789,7 @@ MEM_LOAD_ADDR_EA_W(x86seg *seg)
host_reg_mapping[0] = 8; host_reg_mapping[0] = 8;
} }
static __inline void static __inline void
MEM_LOAD_ADDR_EA_W_OFFSET(x86seg *seg, int offset) MEM_LOAD_ADDR_EA_W_OFFSET(x86seg *seg, int offset, int op_32)
{ {
if ((seg == &cpu_state.seg_ds && codegen_flat_ds && !(cpu_cur_status & CPU_STATUS_NOTFLATDS)) || (seg == &cpu_state.seg_ss && codegen_flat_ss && !(cpu_cur_status & CPU_STATUS_NOTFLATSS))) { if ((seg == &cpu_state.seg_ds && codegen_flat_ds && !(cpu_cur_status & CPU_STATUS_NOTFLATDS)) || (seg == &cpu_state.seg_ss && codegen_flat_ss && !(cpu_cur_status & CPU_STATUS_NOTFLATSS))) {
addbyte(0x31); /*XOR EDX, EDX*/ addbyte(0x31); /*XOR EDX, EDX*/