mirror of https://github.com/PCSX2/pcsx2.git
Remove some unused code such as data moves and tags in iCore.
The code was sitting there only serving to confuse people. The tags were a way of setting an 'isXMMreg' inside a function and the values actually didn't mean anything.
This commit is contained in:
parent
02b19b7686
commit
f484f35d85
|
@ -35,7 +35,6 @@
|
||||||
#define MODE_NOFRAME 0x40 // when allocating x86regs, don't use ebp reg
|
#define MODE_NOFRAME 0x40 // when allocating x86regs, don't use ebp reg
|
||||||
#define MODE_8BITREG 0x80 // when allocating x86regs, use only eax, ecx, edx, and ebx
|
#define MODE_8BITREG 0x80 // when allocating x86regs, use only eax, ecx, edx, and ebx
|
||||||
|
|
||||||
//#define PROCESS_EE_MMX 0x01 // removed
|
|
||||||
#define PROCESS_EE_XMM 0x02
|
#define PROCESS_EE_XMM 0x02
|
||||||
|
|
||||||
// currently only used in FPU
|
// currently only used in FPU
|
||||||
|
@ -191,9 +190,6 @@ void _signExtendSFtoM(u32 mem);
|
||||||
// a negative shift is for sign extension
|
// a negative shift is for sign extension
|
||||||
int _signExtendXMMtoM(u32 to, x86SSERegType from, int candestroy); // returns true if reg destroyed
|
int _signExtendXMMtoM(u32 to, x86SSERegType from, int candestroy); // returns true if reg destroyed
|
||||||
|
|
||||||
static const int MEM_MMXTAG = 0x0800; // mmreg is mmxreg
|
|
||||||
static const int MEM_XMMTAG = 0x8000; // mmreg is xmmreg
|
|
||||||
|
|
||||||
//////////////////////
|
//////////////////////
|
||||||
// Instruction Info //
|
// Instruction Info //
|
||||||
//////////////////////
|
//////////////////////
|
||||||
|
@ -318,9 +314,6 @@ int _signExtendMtoMMX(x86MMXRegType to, u32 mem);
|
||||||
int _signExtendGPRMMXtoMMX(x86MMXRegType to, u32 gprreg, x86MMXRegType from, u32 gprfromreg);
|
int _signExtendGPRMMXtoMMX(x86MMXRegType to, u32 gprreg, x86MMXRegType from, u32 gprfromreg);
|
||||||
int _allocCheckGPRtoMMX(EEINST* pinst, int reg, int mode);
|
int _allocCheckGPRtoMMX(EEINST* pinst, int reg, int mode);
|
||||||
|
|
||||||
void _recMove128RmOffsettoM(u32 to, u32 offset);
|
|
||||||
void _recMove128MtoRmOffset(u32 offset, u32 from);
|
|
||||||
|
|
||||||
// returns new index of reg, lower 32 bits already in mmx
|
// returns new index of reg, lower 32 bits already in mmx
|
||||||
// shift is used when the data is in the top bits of the mmx reg to begin with
|
// shift is used when the data is in the top bits of the mmx reg to begin with
|
||||||
// a negative shift is for sign extension
|
// a negative shift is for sign extension
|
||||||
|
@ -373,9 +366,6 @@ extern u16 x86FpuState;
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// Utility Functions -- that should probably be part of the Emitter.
|
// Utility Functions -- that should probably be part of the Emitter.
|
||||||
|
|
||||||
// Moves 128 bits of data using EAX/EDX (used by iCOP2 only currently)
|
|
||||||
extern void _recMove128MtoM(u32 to, u32 from);
|
|
||||||
|
|
||||||
// op = 0, and
|
// op = 0, and
|
||||||
// op = 1, or
|
// op = 1, or
|
||||||
// op = 2, xor
|
// op = 2, xor
|
||||||
|
|
|
@ -56,8 +56,8 @@ REC_FUNC_DEL( PSLLW, _Rd_ );
|
||||||
|
|
||||||
void recPLZCW()
|
void recPLZCW()
|
||||||
{
|
{
|
||||||
//int regd = -1;
|
bool isXMMreg = false;
|
||||||
int regs = 0;
|
int regs = -1;
|
||||||
|
|
||||||
if ( ! _Rd_ ) return;
|
if ( ! _Rd_ ) return;
|
||||||
|
|
||||||
|
@ -90,16 +90,14 @@ void recPLZCW()
|
||||||
|
|
||||||
if( (regs = _checkXMMreg(XMMTYPE_GPRREG, _Rs_, MODE_READ)) >= 0 ) {
|
if( (regs = _checkXMMreg(XMMTYPE_GPRREG, _Rs_, MODE_READ)) >= 0 ) {
|
||||||
SSE2_MOVD_XMM_to_R(EAX, regs);
|
SSE2_MOVD_XMM_to_R(EAX, regs);
|
||||||
regs |= MEM_XMMTAG;
|
isXMMreg = true;
|
||||||
}
|
}
|
||||||
else if( (regs = _checkMMXreg(MMX_GPR+_Rs_, MODE_READ)) >= 0 ) {
|
else if( (regs = _checkMMXreg(MMX_GPR+_Rs_, MODE_READ)) >= 0 ) {
|
||||||
MOVD32MMXtoR(EAX, regs);
|
MOVD32MMXtoR(EAX, regs);
|
||||||
SetMMXstate();
|
SetMMXstate();
|
||||||
regs |= MEM_MMXTAG;
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]);
|
MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]);
|
||||||
regs = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_deleteEEreg(_Rd_, 0);
|
_deleteEEreg(_Rd_, 0);
|
||||||
|
@ -130,18 +128,22 @@ void recPLZCW()
|
||||||
|
|
||||||
// second word
|
// second word
|
||||||
|
|
||||||
if( regs >= 0 && (regs & MEM_XMMTAG) ) {
|
if( regs >= 0) {
|
||||||
|
// Check if it was an XMM reg or MMX reg
|
||||||
|
if (isXMMreg) {
|
||||||
SSE2_PSHUFD_XMM_to_XMM(regs&0xf, regs&0xf, 0xe1);
|
SSE2_PSHUFD_XMM_to_XMM(regs&0xf, regs&0xf, 0xe1);
|
||||||
SSE2_MOVD_XMM_to_R(EAX, regs&0xf);
|
SSE2_MOVD_XMM_to_R(EAX, regs&0xf);
|
||||||
SSE2_PSHUFD_XMM_to_XMM(regs&0xf, regs&0xf, 0xe1);
|
SSE2_PSHUFD_XMM_to_XMM(regs&0xf, regs&0xf, 0xe1);
|
||||||
}
|
} else {
|
||||||
else if( regs >= 0 && (regs & MEM_MMXTAG) ) {
|
|
||||||
PSHUFWRtoR(regs&0xf, regs&0xf, 0x4e);
|
PSHUFWRtoR(regs&0xf, regs&0xf, 0x4e);
|
||||||
MOVD32MMXtoR(EAX, regs&0xf);
|
MOVD32MMXtoR(EAX, regs&0xf);
|
||||||
PSHUFWRtoR(regs&0xf, regs&0xf, 0x4e);
|
PSHUFWRtoR(regs&0xf, regs&0xf, 0x4e);
|
||||||
SetMMXstate();
|
SetMMXstate();
|
||||||
}
|
}
|
||||||
else MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 1 ]);
|
}
|
||||||
|
else {
|
||||||
|
MOV32MtoR(EAX, (uptr)&cpuRegs.GPR.r[ _Rs_ ].UL[ 1 ]);
|
||||||
|
}
|
||||||
|
|
||||||
MOV32ItoR(ECX, 31);
|
MOV32ItoR(ECX, 31);
|
||||||
TEST32RtoR(EAX, EAX); // TEST sets the sign flag accordingly.
|
TEST32RtoR(EAX, EAX); // TEST sets the sign flag accordingly.
|
||||||
|
|
|
@ -923,46 +923,6 @@ int _allocCheckGPRtoMMX(EEINST* pinst, int reg, int mode)
|
||||||
return _checkMMXreg(MMX_GPR+reg, mode);
|
return _checkMMXreg(MMX_GPR+reg, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// fixme - yay stupid? This sucks, and is used from iCOP2.cpp only.
|
|
||||||
// Surely there is a better way!
|
|
||||||
void _recMove128MtoM(u32 to, u32 from)
|
|
||||||
{
|
|
||||||
MOV32MtoR(EAX, from);
|
|
||||||
MOV32MtoR(EDX, from+4);
|
|
||||||
MOV32RtoM(to, EAX);
|
|
||||||
MOV32RtoM(to+4, EDX);
|
|
||||||
MOV32MtoR(EAX, from+8);
|
|
||||||
MOV32MtoR(EDX, from+12);
|
|
||||||
MOV32RtoM(to+8, EAX);
|
|
||||||
MOV32RtoM(to+12, EDX);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fixme - see above function!
|
|
||||||
void _recMove128RmOffsettoM(u32 to, u32 offset)
|
|
||||||
{
|
|
||||||
MOV32RmtoR(EAX, ECX, offset);
|
|
||||||
MOV32RmtoR(EDX, ECX, offset+4);
|
|
||||||
MOV32RtoM(to, EAX);
|
|
||||||
MOV32RtoM(to+4, EDX);
|
|
||||||
MOV32RmtoR(EAX, ECX, offset+8);
|
|
||||||
MOV32RmtoR(EDX, ECX, offset+12);
|
|
||||||
MOV32RtoM(to+8, EAX);
|
|
||||||
MOV32RtoM(to+12, EDX);
|
|
||||||
}
|
|
||||||
|
|
||||||
// fixme - see above function again!
|
|
||||||
void _recMove128MtoRmOffset(u32 offset, u32 from)
|
|
||||||
{
|
|
||||||
MOV32MtoR(EAX, from);
|
|
||||||
MOV32MtoR(EDX, from+4);
|
|
||||||
MOV32RtoRm(ECX, EAX, offset);
|
|
||||||
MOV32RtoRm(ECX, EDX, offset+4);
|
|
||||||
MOV32MtoR(EAX, from+8);
|
|
||||||
MOV32MtoR(EDX, from+12);
|
|
||||||
MOV32RtoRm(ECX, EAX, offset+8);
|
|
||||||
MOV32RtoRm(ECX, EDX, offset+12);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const __aligned16 u32 s_ones[2] = {0xffffffff, 0xffffffff};
|
static const __aligned16 u32 s_ones[2] = {0xffffffff, 0xffffffff};
|
||||||
|
|
||||||
void LogicalOpRtoR(x86MMXRegType to, x86MMXRegType from, int op)
|
void LogicalOpRtoR(x86MMXRegType to, x86MMXRegType from, int op)
|
||||||
|
|
|
@ -91,7 +91,6 @@ void recWritebackHILO(int info, int writed, int upper)
|
||||||
regd = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, MODE_WRITE|MODE_READ);
|
regd = _checkXMMreg(XMMTYPE_GPRREG, _Rd_, MODE_WRITE|MODE_READ);
|
||||||
if( regd >= 0 ) {
|
if( regd >= 0 ) {
|
||||||
SSE_MOVLPS_M64_to_XMM(regd, loaddr);
|
SSE_MOVLPS_M64_to_XMM(regd, loaddr);
|
||||||
regd |= MEM_XMMTAG;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue