x87: Fix Final Reality discolored screen for all dynarecs
This commit is contained in:
@@ -3571,6 +3571,8 @@ FP_FLD(int reg)
|
||||
addbyte(0x89); /*MOV [TOP], EBX*/
|
||||
addbyte(0x5d);
|
||||
addbyte((uint8_t) cpu_state_offset(TOP));
|
||||
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -3688,6 +3690,8 @@ FP_LOAD_S(void)
|
||||
addbyte(0x44);
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag));
|
||||
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
static __inline void
|
||||
FP_LOAD_D(void)
|
||||
@@ -3717,6 +3721,8 @@ FP_LOAD_D(void)
|
||||
addbyte(0x44);
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag));
|
||||
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -3754,6 +3760,8 @@ FP_LOAD_IW(void)
|
||||
addbyte(0x44);
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag));
|
||||
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
static __inline void
|
||||
FP_LOAD_IL(void)
|
||||
@@ -3787,6 +3795,8 @@ FP_LOAD_IL(void)
|
||||
addbyte(0x44);
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag));
|
||||
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
static __inline void
|
||||
FP_LOAD_IQ(void)
|
||||
@@ -3831,6 +3841,8 @@ FP_LOAD_IQ(void)
|
||||
addbyte(0x44);
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag));
|
||||
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -3863,6 +3875,8 @@ FP_LOAD_IMM_Q(uint64_t v)
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag));
|
||||
addbyte(v ? 0 : 1);
|
||||
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
|
||||
@@ -1794,6 +1794,7 @@ FP_FLD(int reg)
|
||||
addbyte(0x5d);
|
||||
addbyte((uint8_t) cpu_state_offset(TOP));
|
||||
}
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -2037,6 +2038,7 @@ FP_LOAD_S(void)
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag[0]));
|
||||
}
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
static __inline void
|
||||
FP_LOAD_D(void)
|
||||
@@ -2096,6 +2098,7 @@ FP_LOAD_D(void)
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag[0]));
|
||||
}
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
static __inline void
|
||||
FP_LOAD_IW(void)
|
||||
@@ -2154,6 +2157,7 @@ FP_LOAD_IW(void)
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag[0]));
|
||||
}
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
static __inline void
|
||||
FP_LOAD_IL(void)
|
||||
@@ -2210,6 +2214,7 @@ FP_LOAD_IL(void)
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag[0]));
|
||||
}
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
static __inline void
|
||||
FP_LOAD_IQ(void)
|
||||
@@ -2285,6 +2290,7 @@ FP_LOAD_IQ(void)
|
||||
addbyte(0x1d);
|
||||
addbyte((uint8_t) cpu_state_offset(tag[0]));
|
||||
}
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
@@ -2336,6 +2342,7 @@ FP_LOAD_IMM_Q(uint64_t v)
|
||||
addbyte(0x5d);
|
||||
addbyte((uint8_t) cpu_state_offset(TOP));
|
||||
}
|
||||
CALL_FUNC((uintptr_t) x87_to_mmxreg);
|
||||
}
|
||||
|
||||
static __inline int
|
||||
|
||||
Reference in New Issue
Block a user