diff --git a/src/codegen/codegen_x86-64.c b/src/codegen/codegen_x86-64.c index adb97169d..c424cf8c5 100644 --- a/src/codegen/codegen_x86-64.c +++ b/src/codegen/codegen_x86-64.c @@ -819,7 +819,7 @@ codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_p int pc_off = 0; int test_modrm = 1; int c; - uint16_t op87 = 0x0000; + uint32_t op87 = 0x00000000; op_ea_seg = &cpu_state.seg_ds; op_ssegs = 0; @@ -1010,7 +1010,7 @@ generate_call: } if (op87 != 0x0000) { - STORE_IMM_ADDR_W((uintptr_t) &x87_op, op87); + STORE_IMM_ADDR_L((uintptr_t) &x87_op, op87); } if (recomp_op_table && recomp_op_table[(opcode | op_32) & 0x1ff]) { diff --git a/src/codegen/codegen_x86.c b/src/codegen/codegen_x86.c index cb635d4f1..bf34c2de8 100644 --- a/src/codegen/codegen_x86.c +++ b/src/codegen/codegen_x86.c @@ -1858,7 +1858,7 @@ codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_p int pc_off = 0; int test_modrm = 1; int c; - uint16_t op87 = 0x0000; + uint32_t op87 = 0x00000000; op_ea_seg = &cpu_state.seg_ds; op_ssegs = 0; @@ -2051,7 +2051,7 @@ generate_call: } if (op87 != 0x0000) { - STORE_IMM_ADDR_W((uintptr_t) &x87_op, op87); + STORE_IMM_ADDR_L((uintptr_t) &x87_op, op87); } if (recomp_op_table && recomp_op_table[(opcode | op_32) & 0x1ff]) { diff --git a/src/cpu/386_common.c b/src/cpu/386_common.c index ecd83966c..c6a759d36 100644 --- a/src/cpu/386_common.c +++ b/src/cpu/386_common.c @@ -113,7 +113,7 @@ uint8_t is_smint = 0; uint16_t io_port = 0x0000; uint32_t io_val = 0x00000000; -uint16_t x87_op = 0x0000; +uint32_t x87_op = 0x00000000; int opcode_has_modrm[256] = { 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*00*/ diff --git a/src/cpu/cpu.h b/src/cpu/cpu.h index 63b831d84..b76e2d622 100644 --- a/src/cpu/cpu.h +++ b/src/cpu/cpu.h @@ -784,7 +784,7 @@ typedef struct { uint32_t smhr; } cyrix_t; -extern uint16_t x87_op; +extern uint32_t x87_op; extern uint32_t addr64; extern uint32_t addr64_2;