summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2014-02-14 23:11:06 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2014-02-14 23:11:06 -0600
commitb2c0d5d5e679585e502d342ec3ebe57b25bfb314 (patch)
treeebf2a246bf11f19bc9aaf7942d6ba3e17ce82dbe /Source/Core
parent8e5067500bb33618604e205a09576a25f7259918 (diff)
parent867d0f01a24f24329ef6f618e742467548130d3f (diff)
Merge pull request #71 from lioncash/jit-cleanup
Remove unused code in the JIT recompiler.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp4
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp17
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp41
-rw-r--r--Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp32
4 files changed, 14 insertions, 80 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp b/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp
index 1be04a0d5d..6e4815ec0d 100644
--- a/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/JitRegCache.cpp
@@ -360,10 +360,6 @@ void FPURegCache::StoreFromRegister(int i)
regs[i].location = newLoc;
regs[i].away = false;
}
- else
- {
- // _assert_msg_(DYNA_REC,0,"already stored");
- }
}
void RegCache::Flush(FlushMode mode)
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp
index bc056e6bd1..b99d04e52c 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStoreFloating.cpp
@@ -80,7 +80,9 @@ void Jit64::lfd(UGeckoInstruction inst)
fpr.Lock(d);
fpr.BindToRegister(d, true);
X64Reg xd = fpr.RX(d);
- if (cpu_info.bSSSE3) {
+
+ if (cpu_info.bSSSE3)
+ {
#ifdef _M_X64
MOVQ_xmm(XMM0, MComplex(RBX, ABI_PARAM1, SCALE_1, offset));
#else
@@ -116,20 +118,9 @@ void Jit64::lfd(UGeckoInstruction inst)
MOVSD(xd, R(XMM0));
MEMCHECK_END
-#if 0
- // Alternate implementation; possibly faster
- AND(32, R(ABI_PARAM1), Imm32(Memory::MEMVIEW32_MASK));
- MOVQ_xmm(XMM0, MDisp(ABI_PARAM1, (u32)Memory::base + offset));
- PSHUFLW(XMM0, R(XMM0), 0x1B);
- PSRLW(XMM0, 8);
- MOVSD(xd, R(XMM0));
- MOVQ_xmm(XMM0, MDisp(ABI_PARAM1, (u32)Memory::base + offset));
- PSHUFLW(XMM0, R(XMM0), 0x1B);
- PSLLW(XMM0, 8);
- POR(xd, R(XMM0));
-#endif
#endif
}
+
gpr.UnlockAll();
gpr.UnlockAllX();
fpr.UnlockAll();
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp
index a2cb0784d1..14fa4cf08f 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_LoadStorePaired.cpp
@@ -14,18 +14,6 @@
const u8 GC_ALIGNED16(pbswapShuffle2x4[16]) = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15};
-//static u64 GC_ALIGNED16(temp64); // unused?
-
-// TODO(ector): Improve 64-bit version
-#if 0
-static void WriteDual32(u64 value, u32 address)
-{
- MOV(32, M(&PC), Imm32(jit->js.compilerPC)); // Helps external systems know which instruction triggered the write
- Memory::Write_U32((u32)(value >> 32), address);
- Memory::Write_U32((u32)value, address + 4);
-}
-#endif
-
// The big problem is likely instructions that set the quantizers in the same block.
// We will have to break block after quantizers are written to.
void Jit64::psq_st(UGeckoInstruction inst)
@@ -48,33 +36,6 @@ void Jit64::psq_st(UGeckoInstruction inst)
int a = inst.RA;
int s = inst.RS; // Fp numbers
- const UGQR gqr(rSPR(SPR_GQR0 + inst.I));
-#if 0
- u16 store_gqr = gqr.Hex & 0xFFFF;
-
- const EQuantizeType stType = static_cast<EQuantizeType>(gqr.ST_TYPE);
- int stScale = gqr.ST_SCALE;
-
- // Is this specialization still worth it? Let's keep it for now. It's probably
- // not very risky since a game most likely wouldn't use the same code to process
- // floats as integers (but you never know....).
- if (stType == QUANTIZE_FLOAT)
- {
- if (gpr.R(a).IsImm() && !update && cpu_info.bSSSE3)
- {
- u32 addr = (u32)(gpr.R(a).offset + offset);
- if (addr == 0xCC008000) {
- // Writing to FIFO. Let's do fast method.
- CVTPD2PS(XMM0, fpr.R(s));
- PSHUFB(XMM0, M((void*)&pbswapShuffle2x4));
- CALL((void*)asm_routines.fifoDirectWriteXmm64);
- js.fifoBytesThisBlock += 8;
- return;
- }
- }
- }
-#endif
-
gpr.FlushLockX(EAX, EDX);
gpr.FlushLockX(ECX);
if (update)
@@ -120,8 +81,6 @@ void Jit64::psq_l(UGeckoInstruction inst)
return;
}
- const UGQR gqr(rSPR(SPR_GQR0 + inst.I));
-
bool update = inst.OPCD == 57;
int offset = inst.SIMM_12;
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
index 573feb3756..f2e6d70b90 100644
--- a/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
+++ b/Source/Core/Core/PowerPC/Jit64/Jit_SystemRegisters.cpp
@@ -19,7 +19,6 @@ void Jit64::mtspr(UGeckoInstruction inst)
switch (iIndex)
{
-
case SPR_DMAU:
case SPR_SPRG0:
@@ -46,20 +45,9 @@ void Jit64::mtspr(UGeckoInstruction inst)
case SPR_GQR0 + 5:
case SPR_GQR0 + 6:
case SPR_GQR0 + 7:
- // Prevent recompiler from compiling in old quantizer values.
- // If the value changed, destroy all blocks using this quantizer
- // This will create a little bit of block churn, but hopefully not too bad.
- {
- /*
- MOV(32, R(EAX), M(&PowerPC::ppcState.spr[iIndex])); // Load old value
- CMP(32, R(EAX), gpr.R(inst.RD));
- FixupBranch skip_destroy = J_CC(CC_E, false);
- int gqr = iIndex - SPR_GQR0;
- ABI_CallFunctionC(ProtectFunction(&Jit64::DestroyBlocksWithFlag, 1), (u32)BLOCK_USE_GQR0 << gqr);
- SetJumpTarget(skip_destroy);*/
- }
+ // These are safe to do the easy way, see the bottom of this function.
break;
- // TODO - break block if quantizers are written to.
+
default:
Default(inst);
return;
@@ -276,40 +264,40 @@ void Jit64::crXXX(UGeckoInstruction inst)
// Compute combined bit
switch(inst.SUBOP10)
{
- case 33: // crnor
+ case 33: // crnor
OR(8, R(EAX), R(ECX));
NOT(8, R(EAX));
break;
- case 129: // crandc
+ case 129: // crandc
NOT(8, R(ECX));
AND(8, R(EAX), R(ECX));
break;
- case 193: // crxor
+ case 193: // crxor
XOR(8, R(EAX), R(ECX));
break;
- case 225: // crnand
+ case 225: // crnand
AND(8, R(EAX), R(ECX));
NOT(8, R(EAX));
break;
- case 257: // crand
+ case 257: // crand
AND(8, R(EAX), R(ECX));
break;
- case 289: // creqv
+ case 289: // creqv
XOR(8, R(EAX), R(ECX));
NOT(8, R(EAX));
break;
- case 417: // crorc
+ case 417: // crorc
NOT(8, R(ECX));
OR(8, R(EAX), R(ECX));
break;
- case 449: // cror
+ case 449: // cror
OR(8, R(EAX), R(ECX));
break;
}