diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit.h b/Source/Core/Core/Src/PowerPC/Jit64/Jit.h index c9a390a9f3..e4a613ba58 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit.h +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit.h @@ -57,6 +57,9 @@ struct CONTEXT #endif +// #define INSTRUCTION_START Default(inst); return; +// #define INSTRUCTION_START PPCTables::CountInstruction(inst); +#define INSTRUCTION_START class TrampolineCache : public Gen::XCodeBlock { diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Branch.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Branch.cpp index 3114a68fb1..61e12855ef 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Branch.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Branch.cpp @@ -46,6 +46,8 @@ using namespace Gen; if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff) {Default(inst); return;} // turn off from debugger + INSTRUCTION_START; + gpr.Flush(FLUSH_ALL); fpr.Flush(FLUSH_ALL); WriteExceptionExit(EXCEPTION_SYSCALL); @@ -56,6 +58,8 @@ using namespace Gen; if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff) {Default(inst); return;} // turn off from debugger + INSTRUCTION_START; + gpr.Flush(FLUSH_ALL); fpr.Flush(FLUSH_ALL); //Bits SRR1[0, 5-9, 16-23, 25-27, 30-31] are placed into the corresponding bits of the MSR. @@ -80,6 +84,8 @@ using namespace Gen; if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff) {Default(inst); return;} // turn off from debugger + INSTRUCTION_START; + if (inst.LK) MOV(32, M(&LR), Imm32(js.compilerPC + 4)); gpr.Flush(FLUSH_ALL); @@ -120,6 +126,8 @@ using namespace Gen; if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff) {Default(inst); return;} // turn off from debugger + INSTRUCTION_START; + // USES_CR _assert_msg_(DYNA_REC, js.isLastInstruction, "bcx not last instruction of block"); @@ -214,6 +222,8 @@ using namespace Gen; if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff) {Default(inst); return;} // turn off from debugger + INSTRUCTION_START; + gpr.Flush(FLUSH_ALL); fpr.Flush(FLUSH_ALL); @@ -256,6 +266,8 @@ using namespace Gen; if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff) {Default(inst); return;} // turn off from debugger + INSTRUCTION_START; + gpr.Flush(FLUSH_ALL); fpr.Flush(FLUSH_ALL); //Special case BLR diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp index 64bb657a40..3981ee93ab 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_FloatingPoint.cpp @@ -26,9 +26,6 @@ #include "JitCache.h" #include "JitRegCache.h" -#define INSTRUCTION_START -// #define INSTRUCTION_START Default(inst); return; - const u64 GC_ALIGNED16(psSignBits2[2]) = {0x8000000000000000ULL, 0x8000000000000000ULL}; const u64 GC_ALIGNED16(psAbsMask2[2]) = {0x7FFFFFFFFFFFFFFFULL, 0x7FFFFFFFFFFFFFFFULL}; const double GC_ALIGNED16(psOneOne2[2]) = {1.0, 1.0}; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp index 4861960012..ee02797f7c 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Integer.cpp @@ -25,9 +25,6 @@ #include "JitRegCache.h" #include "JitAsm.h" -// #define INSTRUCTION_START Default(inst); return; -#define INSTRUCTION_START - // Assumes that the flags were just set through an addition. void Jit64::GenerateCarry(Gen::X64Reg temp_reg) { // USES_XER diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp index 27e52d8bf4..cca440bec0 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStore.cpp @@ -36,9 +36,6 @@ #include "JitAsm.h" #include "JitRegCache.h" -// #define INSTRUCTION_START Default(inst); return; -#define INSTRUCTION_START - void Jit64::lbzx(UGeckoInstruction inst) { if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp index a6161e6575..b2409ea828 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStoreFloating.cpp @@ -36,9 +36,6 @@ #include "JitAsm.h" #include "JitRegCache.h" -// #define INSTRUCTION_START Default(inst); return; -#define INSTRUCTION_START - // pshufb todo: MOVQ const u8 GC_ALIGNED16(bswapShuffle1x4[16]) = {3, 2, 1, 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const u8 GC_ALIGNED16(bswapShuffle2x4[16]) = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15}; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStorePaired.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStorePaired.cpp index d98a0f9ece..70762255f5 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStorePaired.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_LoadStorePaired.cpp @@ -37,9 +37,6 @@ #include "JitAsm.h" #include "JitRegCache.h" -#define INSTRUCTION_START -// #define INSTRUCTION_START Default(inst); return; - const u8 GC_ALIGNED16(pbswapShuffle2x4[16]) = {3, 2, 1, 0, 7, 6, 5, 4, 8, 9, 10, 11, 12, 13, 14, 15}; const u8 GC_ALIGNED16(pbswapShuffleNoop[16]) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp index 91ca5829e5..dd2f95ba25 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_Paired.cpp @@ -35,9 +35,6 @@ // cmppd, andpd, andnpd, or // lfsx, ps_merge01 etc -// #define INSTRUCTION_START Default(inst); return; -#define INSTRUCTION_START - const u64 GC_ALIGNED16(psSignBits[2]) = {0x8000000000000000ULL, 0x8000000000000000ULL}; const u64 GC_ALIGNED16(psAbsMask[2]) = {0x7FFFFFFFFFFFFFFFULL, 0x7FFFFFFFFFFFFFFFULL}; const double GC_ALIGNED16(psOneOne[2]) = {1.0, 1.0}; diff --git a/Source/Core/Core/Src/PowerPC/Jit64/Jit_SystemRegisters.cpp b/Source/Core/Core/Src/PowerPC/Jit64/Jit_SystemRegisters.cpp index 4947ca9a67..df5261b2c7 100644 --- a/Source/Core/Core/Src/PowerPC/Jit64/Jit_SystemRegisters.cpp +++ b/Source/Core/Core/Src/PowerPC/Jit64/Jit_SystemRegisters.cpp @@ -30,9 +30,6 @@ #include "JitCache.h" #include "JitRegCache.h" -#define INSTRUCTION_START -// #define INSTRUCTION_START Default(inst); return; - void Jit64::mtspr(UGeckoInstruction inst) { if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff) diff --git a/Source/Core/Core/Src/PowerPC/PPCTables.cpp b/Source/Core/Core/Src/PowerPC/PPCTables.cpp index 72bcdc10d4..eb62f29f27 100644 --- a/Source/Core/Core/Src/PowerPC/PPCTables.cpp +++ b/Source/Core/Core/Src/PowerPC/PPCTables.cpp @@ -707,7 +707,7 @@ void PrintInstructionRunCounts() temp.push_back(x); } std::sort(temp.begin(), temp.end()); - for (int i = 0; i < m_numInstructions; i++) + for (int i = m_numInstructions; i > 1; i--) { LOG(GEKKO, "%s : %i", temp[i].name,temp[i].count); }