Prevent t2reg from having a chance of being assigned to the same register as t1reg. Turn FPU_ADD_SUB_HACK off for 64 bit builds.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@432 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
arcum42 2008-12-15 02:49:30 +00:00 committed by Gregory Hainaut
parent 1bb944821c
commit 59e37dad4b
3 changed files with 12 additions and 6 deletions

View File

@ -49,7 +49,11 @@
#define FPUflagSO 0X00000010 #define FPUflagSO 0X00000010
#define FPUflagSU 0X00000008 #define FPUflagSU 0X00000008
#ifndef __x86_64__
#define FPU_ADD_SUB_HACK 1 // Add/Sub opcodes produce more ps2-like results if set to 1 #define FPU_ADD_SUB_HACK 1 // Add/Sub opcodes produce more ps2-like results if set to 1
#else
#define FPU_ADD_SUB_HACK 0 // DEC32R doesn't work on 64 bits
#endif
extern PCSX2_ALIGNED16_DECL(u32 g_minvals[4]); extern PCSX2_ALIGNED16_DECL(u32 g_minvals[4]);
extern PCSX2_ALIGNED16_DECL(u32 g_maxvals[4]); extern PCSX2_ALIGNED16_DECL(u32 g_maxvals[4]);

View File

@ -3589,7 +3589,7 @@ void recVUMI_FTOI0(VURegs *VU, int info)
t1reg = _vuGetTempXMMreg(info); t1reg = _vuGetTempXMMreg(info);
if( t1reg >= 0 ) { // If theres a temp XMM reg available if( t1reg >= 0 ) { // If theres a temp XMM reg available
for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) ); t2reg++) for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) || (t2reg == t1reg) ); t2reg++)
; // Find unused reg (For second temp reg) ; // Find unused reg (For second temp reg)
SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg
@ -3645,7 +3645,7 @@ void recVUMI_FTOI0(VURegs *VU, int info)
t1reg = _vuGetTempXMMreg(info); t1reg = _vuGetTempXMMreg(info);
if( t1reg >= 0 ) { // If theres a temp XMM reg available if( t1reg >= 0 ) { // If theres a temp XMM reg available
for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) ); t2reg++) for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) || (t2reg == t1reg)); t2reg++)
; // Find unused reg (For second temp reg) ; // Find unused reg (For second temp reg)
SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg
@ -3691,7 +3691,7 @@ void recVUMI_FTOIX(VURegs *VU, int addr, int info)
t1reg = _vuGetTempXMMreg(info); t1reg = _vuGetTempXMMreg(info);
if( t1reg >= 0 ) { // If theres a temp XMM reg available if( t1reg >= 0 ) { // If theres a temp XMM reg available
for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) ); t2reg++) for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) || (t2reg == t1reg)); t2reg++)
; // Find unused reg (For second temp reg) ; // Find unused reg (For second temp reg)
SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg
@ -3749,7 +3749,7 @@ void recVUMI_FTOIX(VURegs *VU, int addr, int info)
t1reg = _vuGetTempXMMreg(info); t1reg = _vuGetTempXMMreg(info);
if( t1reg >= 0 ) { // If theres a temp XMM reg available if( t1reg >= 0 ) { // If theres a temp XMM reg available
for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) ); t2reg++) for (t2reg = 0; ( (t2reg == EEREC_S) || (t2reg == EEREC_T) || (t2reg == EEREC_TEMP) || (t2reg == t1reg)); t2reg++)
; // Find unused reg (For second temp reg) ; // Find unused reg (For second temp reg)
SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg SSE_MOVAPS_XMM_to_M128((uptr)FTIO_Temp1, t2reg); // Backup XMM reg

View File

@ -131,6 +131,8 @@ extern void (*recSVU_LOWER_OPCODE[128])();
#define INST_MAC_WRITE 0x0100 #define INST_MAC_WRITE 0x0100
#define INST_Q_WRITE 0x0200 #define INST_Q_WRITE 0x0200
#define INST_CACHE_VI 0x0400 // write old vi value to s_VIBranchDelay #define INST_CACHE_VI 0x0400 // write old vi value to s_VIBranchDelay
// Let's tempt fate by defining two different constants with almost identical names
#define INST_DUMMY_ 0x8000 #define INST_DUMMY_ 0x8000
#define INST_DUMMY 0x83c0 #define INST_DUMMY 0x83c0