Moved FPU register stack into cpu_state structure.
Fixed a couple of FPU bugs in x86-64 recompiler that were introduced in rev 543, fixes lightmap issues in Half-Life.
This commit is contained in:
parent
eb126fd822
commit
5a02b518b8
17 changed files with 907 additions and 883 deletions
17
src/x87.h
17
src/x87.h
|
|
@ -1,21 +1,6 @@
|
|||
uint32_t x87_pc_off,x87_op_off;
|
||||
uint16_t x87_pc_seg,x87_op_seg;
|
||||
extern uint16_t npxs, npxc;
|
||||
extern double ST[8];
|
||||
|
||||
typedef union MMX_REG
|
||||
{
|
||||
uint64_t q;
|
||||
int64_t sq;
|
||||
uint32_t l[2];
|
||||
int32_t sl[2];
|
||||
uint16_t w[5];
|
||||
int16_t sw[4];
|
||||
uint8_t b[8];
|
||||
int8_t sb[8];
|
||||
} MMX_REG;
|
||||
|
||||
extern MMX_REG MM[8];
|
||||
|
||||
static inline void x87_set_mmx();
|
||||
static inline void x87_emms();
|
||||
|
|
@ -23,5 +8,5 @@ static inline void x87_emms();
|
|||
uint16_t x87_gettag();
|
||||
void x87_settag(uint16_t new_tag);
|
||||
|
||||
/*Hack for FPU copy. If set then ST_i64 contains the 64-bit integer loaded by FILD*/
|
||||
/*Hack for FPU copy. If set then MM[].q contains the 64-bit integer loaded by FILD*/
|
||||
#define TAG_UINT64 (1 << 2)
|
||||
|
|
|
|||
Loading…
Reference in a new issue