mirror of https://github.com/PCSX2/pcsx2.git
ee:profiler: add instructions counters
This commit is contained in:
parent
5b08bda5b8
commit
e75d3f759f
|
@ -15,6 +15,10 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
// Keep my nice alignment please!
|
||||
#define MOVZ MOVZtemp
|
||||
#define MOVN MOVNtemp
|
||||
|
||||
enum class eeOpcode {
|
||||
// Core
|
||||
special , regimm , J , JAL , BEQ , BNE , BLEZ , BGTZ ,
|
||||
|
@ -97,6 +101,9 @@ enum class eeOpcode {
|
|||
LAST
|
||||
};
|
||||
|
||||
#undef MOVZ
|
||||
#undef MOVN
|
||||
|
||||
static const char eeOpcodeName[][16] = {
|
||||
// "Core"
|
||||
"special" , "regimm" , "J" , "JAL" , "BEQ" , "BNE" , "BLEZ" , "BGTZ" ,
|
||||
|
|
|
@ -62,6 +62,8 @@ void recPLZCW()
|
|||
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PLZCW);
|
||||
|
||||
if( GPR_IS_CONST1(_Rs_) ) {
|
||||
_eeOnWriteReg(_Rd_, 0);
|
||||
_deleteEEreg(_Rd_, 0);
|
||||
|
@ -154,6 +156,8 @@ void recPMFHL()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMFHL);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_WRITED|XMMINFO_READLO|XMMINFO_READHI );
|
||||
|
||||
int t0reg;
|
||||
|
@ -221,6 +225,8 @@ void recPMTHL()
|
|||
{
|
||||
if ( _Sa_ != 0 ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMTHL);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READLO|XMMINFO_READHI|XMMINFO_WRITELO|XMMINFO_WRITEHI );
|
||||
|
||||
if ( x86caps.hasStreamingSIMD4Extensions ) {
|
||||
|
@ -284,6 +290,8 @@ void recPSRLH()
|
|||
{
|
||||
if ( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSRLH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( (_Sa_&0xf) == 0 ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -300,6 +308,8 @@ void recPSRLW()
|
|||
{
|
||||
if( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSRLW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Sa_ == 0 ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -316,6 +326,8 @@ void recPSRAH()
|
|||
{
|
||||
if ( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSRAH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( (_Sa_&0xf) == 0 ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -332,6 +344,8 @@ void recPSRAW()
|
|||
{
|
||||
if ( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSRAW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Sa_ == 0 ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -348,6 +362,8 @@ void recPSLLH()
|
|||
{
|
||||
if ( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSLLH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( (_Sa_&0xf) == 0 ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -364,6 +380,8 @@ void recPSLLW()
|
|||
{
|
||||
if ( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSLLW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Sa_ == 0 ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -434,6 +452,8 @@ void recPMAXW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMAXW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if ( x86caps.hasStreamingSIMD4Extensions ) {
|
||||
if( EEREC_S == EEREC_T ) xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -485,6 +505,8 @@ void recPPACW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PPACW);
|
||||
|
||||
int info = eeRecompileCodeXMM( ((_Rs_!=0)?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
|
||||
if( _Rs_ == 0 ) {
|
||||
|
@ -517,6 +539,8 @@ void recPPACH()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PPACH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
xPSHUF.LW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T), 0x88);
|
||||
|
@ -545,6 +569,8 @@ void recPPACB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PPACB);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
if( _hasFreeXMMreg() ) {
|
||||
|
@ -585,6 +611,8 @@ void recPEXT5()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXT5);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
int t1reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -621,6 +649,8 @@ void recPPAC5()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PPAC5);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
int t1reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -659,6 +689,8 @@ void recPMAXH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMAXH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPMAX.SW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPMAX.SW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -674,6 +706,8 @@ void recPCGTB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCGTB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D != EEREC_T ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -694,6 +728,8 @@ void recPCGTH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCGTH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D != EEREC_T ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -715,6 +751,8 @@ void recPCGTW()
|
|||
//TODO:optimize RS | RT== 0
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCGTW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D != EEREC_T ) {
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -735,6 +773,8 @@ void recPADDSB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDSB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPADD.SB(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPADD.SB(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -750,6 +790,8 @@ void recPADDSH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDSH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPADD.SW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPADD.SW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -766,6 +808,8 @@ void recPADDSW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDSW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
int t1reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -816,6 +860,8 @@ void recPSUBSB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBSB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPSUB.SB(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) {
|
||||
|
@ -837,6 +883,8 @@ void recPSUBSH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBSH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPSUB.SW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) {
|
||||
|
@ -859,6 +907,8 @@ void recPSUBSW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBSW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
int t1reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -914,6 +964,8 @@ void recPADDB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPADD.B(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPADD.B(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -929,6 +981,8 @@ void recPADDH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|(_Rt_!=0?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
if( _Rt_ == 0 ) xPXOR(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_D));
|
||||
|
@ -953,6 +1007,8 @@ void recPADDW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|(_Rt_!=0?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
if( _Rt_ == 0 ) xPXOR(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_D));
|
||||
|
@ -977,6 +1033,8 @@ void recPSUBB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPSUB.B(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) {
|
||||
|
@ -998,6 +1056,8 @@ void recPSUBH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPSUB.W(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) {
|
||||
|
@ -1019,6 +1079,8 @@ void recPSUBW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPSUB.D(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) {
|
||||
|
@ -1040,6 +1102,8 @@ void recPEXTLW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXTLW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
xPUNPCK.LDQ(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -1066,6 +1130,8 @@ void recPEXTLB()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXTLB);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
xPUNPCK.LBW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -1092,6 +1158,8 @@ void recPEXTLH()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXTLH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
xPUNPCK.LWD(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -1153,6 +1221,8 @@ void recPABSW() //needs clamping
|
|||
{
|
||||
if( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PABSW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
xPCMP.EQD(xRegisterSSE(t0reg), xRegisterSSE(t0reg));
|
||||
|
@ -1181,6 +1251,8 @@ void recPABSH()
|
|||
{
|
||||
if( !_Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PABSH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
xPCMP.EQW(xRegisterSSE(t0reg), xRegisterSSE(t0reg));
|
||||
|
@ -1208,6 +1280,8 @@ void recPMINW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMINW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if ( x86caps.hasStreamingSIMD4Extensions ) {
|
||||
if( EEREC_S == EEREC_T ) xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -1259,6 +1333,8 @@ void recPADSBH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADSBH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg;
|
||||
|
||||
|
@ -1298,6 +1374,8 @@ void recPADDUW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDUW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_?XMMINFO_READS:0)|(_Rt_?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
|
||||
if( _Rt_ == 0 ) {
|
||||
|
@ -1344,6 +1422,8 @@ void recPSUBUB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBUB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPSUB.USB(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) {
|
||||
|
@ -1365,6 +1445,8 @@ void recPSUBUH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBUH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPSUB.USW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) {
|
||||
|
@ -1386,6 +1468,8 @@ void recPSUBUW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSUBUW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
int t1reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -1432,6 +1516,8 @@ void recPEXTUH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXTUH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
xPUNPCK.HWD(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -1461,6 +1547,8 @@ void recQFSRV()
|
|||
if ( !_Rd_ ) return;
|
||||
//Console.WriteLn("recQFSRV()");
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::QFSRV);
|
||||
|
||||
if (_Rs_ == _Rt_ + 1) {
|
||||
_flushEEreg(_Rs_);
|
||||
_flushEEreg(_Rt_);
|
||||
|
@ -1486,6 +1574,8 @@ void recPEXTUB()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXTUB);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
|
||||
if( _Rs_ == 0 ) {
|
||||
|
@ -1514,6 +1604,8 @@ void recPEXTUW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXTUW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
xPUNPCK.HDQ(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -1541,6 +1633,8 @@ void recPMINH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMINH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPMIN.SW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPMIN.SW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -1556,6 +1650,8 @@ void recPCEQB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCEQB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPCMP.EQB(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPCMP.EQB(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -1571,6 +1667,8 @@ void recPCEQH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCEQH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPCMP.EQW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPCMP.EQW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -1586,6 +1684,8 @@ void recPCEQW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCEQW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPCMP.EQD(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPCMP.EQD(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -1601,6 +1701,8 @@ void recPADDUB()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDUB);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|(_Rt_?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
if( _Rt_ ) {
|
||||
if( EEREC_D == EEREC_S ) xPADD.USB(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -1619,6 +1721,8 @@ void recPADDUH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PADDUH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) xPADD.USW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
else if( EEREC_D == EEREC_T ) xPADD.USW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -1665,6 +1769,8 @@ REC_FUNC_DEL( PROT3W, _Rd_ );
|
|||
////////////////////////////////////////////////////
|
||||
void recPMADDW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMADDW);
|
||||
|
||||
if( !x86caps.hasStreamingSIMD4Extensions ) {
|
||||
_deleteEEreg(_Rd_, 0);
|
||||
recCall(Interp::PMADDW);
|
||||
|
@ -1714,6 +1820,8 @@ void recPSLLVW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSLLVW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_?XMMINFO_READS:0)|(_Rt_?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
if( _Rt_ == 0 ) {
|
||||
|
@ -1780,6 +1888,8 @@ void recPSRLVW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSRLVW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_?XMMINFO_READS:0)|(_Rt_?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
if( _Rt_ == 0 ) {
|
||||
|
@ -1844,6 +1954,8 @@ void recPSRLVW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPMSUBW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMSUBW);
|
||||
|
||||
if( !x86caps.hasStreamingSIMD4Extensions ) {
|
||||
_deleteEEreg(_Rd_, 0);
|
||||
recCall(Interp::PMSUBW);
|
||||
|
@ -1896,6 +2008,8 @@ void recPMSUBW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPMULTW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMULTW);
|
||||
|
||||
if( !x86caps.hasStreamingSIMD4Extensions ) {
|
||||
_deleteEEreg(_Rd_, 0);
|
||||
recCall(Interp::PMULTW);
|
||||
|
@ -1938,6 +2052,8 @@ void recPMULTW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPDIVW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PDIVW);
|
||||
|
||||
_deleteEEreg(_Rd_, 0);
|
||||
recCall(Interp::PDIVW);
|
||||
}
|
||||
|
@ -1945,6 +2061,8 @@ void recPDIVW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPDIVBW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PDIVBW);
|
||||
|
||||
_deleteEEreg(_Rd_, 0);
|
||||
recCall(Interp::PDIVBW); //--
|
||||
}
|
||||
|
@ -1955,6 +2073,8 @@ void recPDIVBW()
|
|||
//contains the upper multiplication result (before the addition with the lower multiplication result)
|
||||
void recPHMADH()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PHMADH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rd_?XMMINFO_WRITED:0)|XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITELO|XMMINFO_WRITEHI );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
||||
|
@ -1995,6 +2115,8 @@ void recPHMADH()
|
|||
|
||||
void recPMSUBH()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMSUBH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rd_?XMMINFO_WRITED:0)|XMMINFO_READS|XMMINFO_READT|XMMINFO_READLO|XMMINFO_READHI|XMMINFO_WRITELO|XMMINFO_WRITEHI );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
int t1reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -2057,6 +2179,8 @@ void recPMSUBH()
|
|||
//it contains the NOT of the upper multiplication result (before the substraction of the lower multiplication result)
|
||||
void recPHMSBH()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PHMSBH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rd_?XMMINFO_WRITED:0)|XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITELO|XMMINFO_WRITEHI );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
||||
|
@ -2092,6 +2216,8 @@ void recPEXEH()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXEH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
xPSHUF.LW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T), 0xc6);
|
||||
xPSHUF.HW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_D), 0xc6);
|
||||
|
@ -2103,6 +2229,7 @@ void recPREVH()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PREVH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
xPSHUF.LW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T), 0x1B);
|
||||
|
@ -2115,6 +2242,8 @@ void recPINTH()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PINTH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|XMMINFO_WRITED );
|
||||
if( EEREC_D == EEREC_S ) {
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -2134,6 +2263,8 @@ void recPEXEW()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXEW);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
xPSHUF.D(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T), 0xc6);
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2143,6 +2274,8 @@ void recPROT3W()
|
|||
{
|
||||
if (!_Rd_) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PROT3W);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
xPSHUF.D(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T), 0xc9);
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2150,6 +2283,8 @@ void recPROT3W()
|
|||
|
||||
void recPMULTH()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMULTH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_READT|(_Rd_?XMMINFO_WRITED:0)|XMMINFO_WRITELO|XMMINFO_WRITEHI );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
||||
|
@ -2187,6 +2322,8 @@ void recPMFHI()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMFHI);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_WRITED|XMMINFO_READHI );
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_HI));
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2197,6 +2334,8 @@ void recPMFLO()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PMFLO);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_WRITED|XMMINFO_READLO );
|
||||
xMOVDQA(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_LO));
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2207,6 +2346,8 @@ void recPAND()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PAND);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_WRITED|XMMINFO_READS|XMMINFO_READT );
|
||||
if( EEREC_D == EEREC_T ) {
|
||||
xPAND(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -2226,6 +2367,8 @@ void recPXOR()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PXOR);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_WRITED|XMMINFO_READS|XMMINFO_READT );
|
||||
if( EEREC_D == EEREC_T ) {
|
||||
xPXOR(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_S));
|
||||
|
@ -2245,6 +2388,8 @@ void recPCPYLD()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCPYLD);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_WRITED|(( _Rs_== 0) ? 0:XMMINFO_READS)|XMMINFO_READT );
|
||||
if( _Rs_ == 0 ) {
|
||||
xMOVQZX(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T));
|
||||
|
@ -2266,6 +2411,8 @@ void recPCPYLD()
|
|||
|
||||
void recPMADDH()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMADDH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rd_?XMMINFO_WRITED:0)|XMMINFO_READS|XMMINFO_READT|XMMINFO_READLO|XMMINFO_READHI|XMMINFO_WRITELO|XMMINFO_WRITEHI );
|
||||
int t0reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
int t1reg = _allocTempXMMreg(XMMT_INT, -1);
|
||||
|
@ -2353,6 +2500,8 @@ void recPSRAVW()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PSRAVW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_?XMMINFO_READS:0)|(_Rt_?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
if( _Rs_ == 0 ) {
|
||||
if( _Rt_ == 0 ) {
|
||||
|
@ -2423,6 +2572,8 @@ void recPINTEH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PINTEH);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_?XMMINFO_READS:0)|(_Rt_?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
|
||||
int t0reg = -1;
|
||||
|
@ -2472,6 +2623,8 @@ void recPINTEH()
|
|||
////////////////////////////////////////////////////
|
||||
void recPMULTUW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMULTUW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (((_Rs_)&&(_Rt_))?XMMINFO_READS:0)|(((_Rs_)&&(_Rt_))?XMMINFO_READT:0)|(_Rd_?XMMINFO_WRITED:0)|XMMINFO_WRITELO|XMMINFO_WRITEHI );
|
||||
if( !_Rs_ || !_Rt_ ) {
|
||||
if( _Rd_ ) xPXOR(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_D));
|
||||
|
@ -2518,6 +2671,8 @@ void recPMULTUW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPMADDUW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMADDUW);
|
||||
|
||||
int info = eeRecompileCodeXMM( (((_Rs_)&&(_Rt_))?XMMINFO_READS:0)|(((_Rs_)&&(_Rt_))?XMMINFO_READT:0)|(_Rd_?XMMINFO_WRITED:0)|XMMINFO_WRITELO|XMMINFO_WRITEHI|XMMINFO_READLO|XMMINFO_READHI );
|
||||
xSHUF.PS(xRegisterSSE(EEREC_LO), xRegisterSSE(EEREC_HI), 0x88);
|
||||
xPSHUF.D(xRegisterSSE(EEREC_LO), xRegisterSSE(EEREC_LO), 0xd8); // LO = {LO[0], HI[0], LO[2], HI[2]}
|
||||
|
@ -2569,6 +2724,8 @@ void recPMADDUW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPDIVUW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PDIVUW);
|
||||
|
||||
_deleteEEreg(_Rd_, 0);
|
||||
recCall(Interp::PDIVUW);
|
||||
}
|
||||
|
@ -2576,6 +2733,8 @@ void recPDIVUW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPEXCW()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXCW);
|
||||
|
||||
if (!_Rd_) return;
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
|
@ -2586,6 +2745,8 @@ void recPEXCW()
|
|||
////////////////////////////////////////////////////
|
||||
void recPEXCH()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PEXCH);
|
||||
|
||||
if (!_Rd_) return;
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
|
@ -2599,6 +2760,8 @@ void recPNOR()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PNOR);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|(_Rt_!=0?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
|
||||
if( _Rs_ == 0 ) {
|
||||
|
@ -2650,6 +2813,8 @@ void recPNOR()
|
|||
////////////////////////////////////////////////////
|
||||
void recPMTHI()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMTHI);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_WRITEHI );
|
||||
xMOVDQA(xRegisterSSE(EEREC_HI), xRegisterSSE(EEREC_S));
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2658,6 +2823,8 @@ void recPMTHI()
|
|||
////////////////////////////////////////////////////
|
||||
void recPMTLO()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::PMTLO);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|XMMINFO_WRITELO );
|
||||
xMOVDQA(xRegisterSSE(EEREC_LO), xRegisterSSE(EEREC_S));
|
||||
_clearNeededXMMregs();
|
||||
|
@ -2668,6 +2835,8 @@ void recPCPYUD()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCPYUD);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READS|(( _Rt_ == 0) ? 0:XMMINFO_READT)|XMMINFO_WRITED );
|
||||
|
||||
if( _Rt_ == 0 ) {
|
||||
|
@ -2705,6 +2874,8 @@ void recPOR()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::POR);
|
||||
|
||||
int info = eeRecompileCodeXMM( (_Rs_!=0?XMMINFO_READS:0)|(_Rt_!=0?XMMINFO_READT:0)|XMMINFO_WRITED );
|
||||
|
||||
if( _Rs_ == 0 ) {
|
||||
|
@ -2738,6 +2909,8 @@ void recPCPYH()
|
|||
{
|
||||
if ( ! _Rd_ ) return;
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::PCPYH);
|
||||
|
||||
int info = eeRecompileCodeXMM( XMMINFO_READT|XMMINFO_WRITED );
|
||||
xPSHUF.LW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_T), 0);
|
||||
xPSHUF.HW(xRegisterSSE(EEREC_D), xRegisterSSE(EEREC_D), 0);
|
||||
|
|
|
@ -134,12 +134,14 @@ typedef void (*R5900FNPTR_INFO)(int info);
|
|||
#define EERECOMPILE_CODE0(fn, xmminfo) \
|
||||
void rec##fn(void) \
|
||||
{ \
|
||||
EE::Profiler.EmitOp(eeOpcode::fn); \
|
||||
eeRecompileCode0(rec##fn##_const, rec##fn##_consts, rec##fn##_constt, rec##fn##_, xmminfo); \
|
||||
}
|
||||
|
||||
#define EERECOMPILE_CODEX(codename, fn) \
|
||||
void rec##fn(void) \
|
||||
{ \
|
||||
EE::Profiler.EmitOp(eeOpcode::fn); \
|
||||
codename(rec##fn##_const, rec##fn##_); \
|
||||
}
|
||||
|
||||
|
|
|
@ -848,6 +848,8 @@ static void recExecute()
|
|||
////////////////////////////////////////////////////
|
||||
void R5900::Dynarec::OpcodeImpl::recSYSCALL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::SYSCALL);
|
||||
|
||||
recCall(R5900::Interpreter::OpcodeImpl::SYSCALL);
|
||||
|
||||
xCMP(ptr32[&cpuRegs.pc], pc);
|
||||
|
@ -863,6 +865,8 @@ void R5900::Dynarec::OpcodeImpl::recSYSCALL()
|
|||
////////////////////////////////////////////////////
|
||||
void R5900::Dynarec::OpcodeImpl::recBREAK()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BREAK);
|
||||
|
||||
recCall(R5900::Interpreter::OpcodeImpl::BREAK);
|
||||
|
||||
xCMP(ptr32[&cpuRegs.pc], pc);
|
||||
|
|
|
@ -403,6 +403,8 @@ EERECOMPILE_CODE0(BNEL, XMMINFO_READS|XMMINFO_READT);
|
|||
////////////////////////////////////////////////////
|
||||
void recBLTZAL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BLTZAL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeOnWriteReg(31, 0);
|
||||
|
@ -442,6 +444,8 @@ void recBLTZAL()
|
|||
////////////////////////////////////////////////////
|
||||
void recBGEZAL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BGEZAL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeOnWriteReg(31, 0);
|
||||
|
@ -481,6 +485,8 @@ void recBGEZAL()
|
|||
////////////////////////////////////////////////////
|
||||
void recBLTZALL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BLTZALL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeOnWriteReg(31, 0);
|
||||
|
@ -515,6 +521,8 @@ void recBLTZALL()
|
|||
////////////////////////////////////////////////////
|
||||
void recBGEZALL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BGEZALL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeOnWriteReg(31, 0);
|
||||
|
@ -550,6 +558,8 @@ void recBGEZALL()
|
|||
//// BLEZ
|
||||
void recBLEZ()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BLEZ);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
@ -596,6 +606,8 @@ void recBLEZ()
|
|||
//// BGTZ
|
||||
void recBGTZ()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BGTZ);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
@ -642,6 +654,8 @@ void recBGTZ()
|
|||
////////////////////////////////////////////////////
|
||||
void recBLTZ()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BLTZ);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
@ -675,6 +689,8 @@ void recBLTZ()
|
|||
////////////////////////////////////////////////////
|
||||
void recBGEZ()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BGEZ);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
@ -708,6 +724,8 @@ void recBGEZ()
|
|||
////////////////////////////////////////////////////
|
||||
void recBLTZL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BLTZL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
@ -738,6 +756,8 @@ void recBLTZL()
|
|||
////////////////////////////////////////////////////
|
||||
void recBGEZL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BGEZL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
@ -775,6 +795,8 @@ void recBGEZL()
|
|||
////////////////////////////////////////////////////
|
||||
void recBLEZL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BLEZL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
@ -819,6 +841,8 @@ void recBLEZL()
|
|||
////////////////////////////////////////////////////
|
||||
void recBGTZL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::BGTZL);
|
||||
|
||||
u32 branchTo = ((s32)_Imm_ * 4) + pc;
|
||||
|
||||
_eeFlushAllUnused();
|
||||
|
|
|
@ -47,6 +47,8 @@ REC_SYS_DEL(JALR, _Rd_);
|
|||
////////////////////////////////////////////////////
|
||||
void recJ()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::J);
|
||||
|
||||
// SET_FPUSTATE;
|
||||
u32 newpc = (_Target_ << 2) + ( pc & 0xf0000000 );
|
||||
recompileNextInstruction(1);
|
||||
|
@ -59,6 +61,8 @@ void recJ()
|
|||
////////////////////////////////////////////////////
|
||||
void recJAL()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::JAL);
|
||||
|
||||
u32 newpc = (_Target_ << 2) + ( pc & 0xf0000000 );
|
||||
_deleteEEreg(31, 0);
|
||||
if(EE_CONST_PROP)
|
||||
|
@ -88,12 +92,16 @@ void recJAL()
|
|||
////////////////////////////////////////////////////
|
||||
void recJR()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::JR);
|
||||
|
||||
SetBranchReg( _Rs_);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
void recJALR()
|
||||
{
|
||||
EE::Profiler.EmitOp(eeOpcode::JALR);
|
||||
|
||||
int newpc = pc + 4;
|
||||
_allocX86reg(esi, X86TYPE_PCWRITEBACK, 0, MODE_WRITE);
|
||||
_eeMoveGPRtoR(esi, _Rs_);
|
||||
|
|
|
@ -238,20 +238,20 @@ void recStore(u32 bits)
|
|||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
void recLB() { recLoad32(8,true); }
|
||||
void recLBU() { recLoad32(8,false); }
|
||||
void recLH() { recLoad32(16,true); }
|
||||
void recLHU() { recLoad32(16,false); }
|
||||
void recLW() { recLoad32(32,true); }
|
||||
void recLWU() { recLoad32(32,false); }
|
||||
void recLD() { recLoad64(64,false); }
|
||||
void recLQ() { recLoad64(128,false); }
|
||||
void recLB() { recLoad32(8,true); EE::Profiler.EmitOp(eeOpcode::LB);}
|
||||
void recLBU() { recLoad32(8,false); EE::Profiler.EmitOp(eeOpcode::LBU);}
|
||||
void recLH() { recLoad32(16,true); EE::Profiler.EmitOp(eeOpcode::LH);}
|
||||
void recLHU() { recLoad32(16,false); EE::Profiler.EmitOp(eeOpcode::LHU);}
|
||||
void recLW() { recLoad32(32,true); EE::Profiler.EmitOp(eeOpcode::LW);}
|
||||
void recLWU() { recLoad32(32,false); EE::Profiler.EmitOp(eeOpcode::LWU);}
|
||||
void recLD() { recLoad64(64,false); EE::Profiler.EmitOp(eeOpcode::LD);}
|
||||
void recLQ() { recLoad64(128,false); EE::Profiler.EmitOp(eeOpcode::LQ);}
|
||||
|
||||
void recSB() { recStore(8); }
|
||||
void recSH() { recStore(16); }
|
||||
void recSW() { recStore(32); }
|
||||
void recSQ() { recStore(128); }
|
||||
void recSD() { recStore(64); }
|
||||
void recSB() { recStore(8); EE::Profiler.EmitOp(eeOpcode::SB);}
|
||||
void recSH() { recStore(16); EE::Profiler.EmitOp(eeOpcode::SH);}
|
||||
void recSW() { recStore(32); EE::Profiler.EmitOp(eeOpcode::SW);}
|
||||
void recSQ() { recStore(128); EE::Profiler.EmitOp(eeOpcode::SQ);}
|
||||
void recSD() { recStore(64); EE::Profiler.EmitOp(eeOpcode::SD);}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
|
@ -298,6 +298,8 @@ void recLWL()
|
|||
|
||||
recCall(LWL);
|
||||
#endif
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::LWL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -347,6 +349,8 @@ void recLWR()
|
|||
|
||||
recCall(LWR);
|
||||
#endif
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::LWR);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -395,6 +399,8 @@ void recSWL()
|
|||
_deleteEEreg(_Rt_, 1);
|
||||
recCall(SWL);
|
||||
#endif
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::SWL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -443,6 +449,8 @@ void recSWR()
|
|||
_deleteEEreg(_Rt_, 1);
|
||||
recCall(SWR);
|
||||
#endif
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::SWR);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -452,6 +460,8 @@ void recLDL()
|
|||
_deleteEEreg(_Rs_, 1);
|
||||
_deleteEEreg(_Rt_, 1);
|
||||
recCall(LDL);
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::LDL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -461,6 +471,8 @@ void recLDR()
|
|||
_deleteEEreg(_Rs_, 1);
|
||||
_deleteEEreg(_Rt_, 1);
|
||||
recCall(LDR);
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::LDR);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -471,6 +483,8 @@ void recSDL()
|
|||
_deleteEEreg(_Rs_, 1);
|
||||
_deleteEEreg(_Rt_, 1);
|
||||
recCall(SDL);
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::SDL);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -480,6 +494,8 @@ void recSDR()
|
|||
_deleteEEreg(_Rs_, 1);
|
||||
_deleteEEreg(_Rt_, 1);
|
||||
recCall(SDR);
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::SDR);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -511,6 +527,8 @@ void recLWC1()
|
|||
}
|
||||
|
||||
xMOV(ptr32[&fpuRegs.fpr[_Rt_].UL], eax);
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::LWC1);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -536,6 +554,8 @@ void recSWC1()
|
|||
|
||||
vtlb_DynGenWrite(32);
|
||||
}
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::SWC1);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -576,6 +596,8 @@ void recLQC2()
|
|||
|
||||
vtlb_DynGenRead64(128);
|
||||
}
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::LQC2);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -601,6 +623,8 @@ void recSQC2()
|
|||
|
||||
vtlb_DynGenWrite(128);
|
||||
}
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::SQC2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -84,7 +84,9 @@ void recLUI()
|
|||
xCDQ();
|
||||
xMOV(ptr[&cpuRegs.GPR.r[_Rt_].UL[0]], eax);
|
||||
xMOV(ptr[&cpuRegs.GPR.r[_Rt_].UL[1]], edx);
|
||||
}
|
||||
}
|
||||
|
||||
EE::Profiler.EmitOp(eeOpcode::LUI);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -285,21 +287,25 @@ void recMTHILO(int hi)
|
|||
void recMFHI()
|
||||
{
|
||||
recMFHILO(1);
|
||||
EE::Profiler.EmitOp(eeOpcode::MFHI);
|
||||
}
|
||||
|
||||
void recMFLO()
|
||||
{
|
||||
recMFHILO(0);
|
||||
EE::Profiler.EmitOp(eeOpcode::MFLO);
|
||||
}
|
||||
|
||||
void recMTHI()
|
||||
{
|
||||
recMTHILO(1);
|
||||
EE::Profiler.EmitOp(eeOpcode::MTHI);
|
||||
}
|
||||
|
||||
void recMTLO()
|
||||
{
|
||||
recMTHILO(0);
|
||||
EE::Profiler.EmitOp(eeOpcode::MTLO);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////
|
||||
|
@ -407,21 +413,25 @@ void recMTHILO1(int hi)
|
|||
void recMFHI1()
|
||||
{
|
||||
recMFHILO1(1);
|
||||
EE::Profiler.EmitOp(eeOpcode::MFHI1);
|
||||
}
|
||||
|
||||
void recMFLO1()
|
||||
{
|
||||
recMFHILO1(0);
|
||||
EE::Profiler.EmitOp(eeOpcode::MFLO1);
|
||||
}
|
||||
|
||||
void recMTHI1()
|
||||
{
|
||||
recMTHILO1(1);
|
||||
EE::Profiler.EmitOp(eeOpcode::MTHI1);
|
||||
}
|
||||
|
||||
void recMTLO1()
|
||||
{
|
||||
recMTHILO1(0);
|
||||
EE::Profiler.EmitOp(eeOpcode::MTLO1);
|
||||
}
|
||||
|
||||
//// MOVZ
|
||||
|
|
Loading…
Reference in New Issue