Recorganized the cpu_state struct to be like PCem's, fixes MMX bugs on 64-bit old recompiler (possibly on the new one as well?).

This commit is contained in:
OBattler
2020-12-13 13:35:58 +01:00
parent 9d6f6b38ea
commit 3c23626eaf

View File

@@ -240,35 +240,22 @@ typedef struct {
uint64_t fcr2, fcr3;
} msr_t;
typedef union {
uint32_t l;
uint16_t w;
} cr0_t;
typedef struct {
x86reg regs[8];
uint8_t tag[8];
int8_t ssegs, ismmx,
abrt, pad;
uint16_t npxs, npxc, flags, eflags,
old_npxc, new_npxc;
uint16_t MM_w4[8];
int _cycles,
flags_op, TOP;
uint32_t flags_res,
flags_op1, flags_op2,
pc, oldpc, eaaddr, op32;
cr0_t CR0;
x86seg *ea_seg;
uint32_t eaaddr;
int flags_op;
uint32_t flags_res,
flags_op1, flags_op2;
uint32_t pc,
oldpc, op32;
int TOP;
union {
struct {
@@ -279,10 +266,21 @@ typedef struct {
int32_t rm_mod_reg_data;
} rm_data;
int8_t ssegs, ismmx,
abrt, pad;
int _cycles;
uint16_t npxs, npxc;
double ST[8];
uint16_t MM_w4[8];
MMX_REG MM[8];
uint16_t old_npxc, new_npxc;
#ifdef USE_NEW_DYNAREC
uint32_t old_fp_control, new_fp_control;
#if defined i386 || defined __i386 || defined __i386__ || defined _X86_ || defined _M_IX86
@@ -295,6 +293,13 @@ typedef struct {
x86seg seg_cs, seg_ds, seg_es, seg_ss,
seg_fs, seg_gs;
union {
uint32_t l;
uint16_t w;
} CR0;
uint16_t flags, eflags;
} cpu_state_t;
/*The cpu_state.flags below must match in both cpu_cur_status and block->status for a block