diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-12-23 18:05:01 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2023-03-16 18:36:25 -0700 |
| commit | cd627d1232f2ae0b4f2bbfc80618410c01ffe7fb (patch) | |
| tree | 1381db2867b39abf82d3cd79060acab88eb60a17 /Source/Core | |
| parent | 34f39ee22ed8316505fd0da1e2f7b1bb8b72bb89 (diff) | |
PPCTables: Fix OPLOG system
Since OPLOG is defined in PPCTables.cpp only, it isn't visible elsewhere. This broke in 3ede866c37ff52db906dc307500ca5305de0a61a.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp | 13 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp | 13 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCTables.cpp | 17 | ||||
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCTables.h | 1 |
4 files changed, 18 insertions, 26 deletions
diff --git a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp index d17d009865..61eb1c9450 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit64_Tables.cpp @@ -491,16 +491,5 @@ void Jit64::CompileInstruction(PPCAnalyst::CodeOp& op) { (this->*s_dyna_op_table[op.inst.OPCD])(op.inst); - GekkoOPInfo* info = op.opinfo; - if (info) - { -#ifdef OPLOG - if (!strcmp(info->opname, OP_TO_LOG)) // "mcrfs" - { - rsplocations.push_back(js.compilerPC); - } -#endif - info->compileCount++; - info->lastUse = js.compilerPC; - } + PPCTables::CountInstructionCompile(op.opinfo, js.compilerPC); } diff --git a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp index 27327258b3..d75ba2a94a 100644 --- a/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp +++ b/Source/Core/Core/PowerPC/JitArm64/JitArm64_Tables.cpp @@ -491,16 +491,5 @@ void JitArm64::CompileInstruction(PPCAnalyst::CodeOp& op) { (this->*s_dyna_op_table[op.inst.OPCD])(op.inst); - GekkoOPInfo* info = op.opinfo; - if (info) - { -#ifdef OPLOG - if (!strcmp(info->opname, OP_TO_LOG)) - { ///"mcrfs" - rsplocations.push_back(js.compilerPC); - } -#endif - info->compileCount++; - info->lastUse = js.compilerPC; - } + PPCTables::CountInstructionCompile(op.opinfo, js.compilerPC); } diff --git a/Source/Core/Core/PowerPC/PPCTables.cpp b/Source/Core/Core/PowerPC/PPCTables.cpp index aed620a475..c87aea0ac6 100644 --- a/Source/Core/Core/PowerPC/PPCTables.cpp +++ b/Source/Core/Core/PowerPC/PPCTables.cpp @@ -110,8 +110,8 @@ bool UsesFPU(UGeckoInstruction inst) return (info->flags & FL_USE_FPU) != 0; } -#define OPLOG -#define OP_TO_LOG "mtfsb0x" +// #define OPLOG +// #define OP_TO_LOG "mtfsb0x" #ifdef OPLOG namespace @@ -141,6 +141,19 @@ void CountInstruction(UGeckoInstruction inst) } } +void CountInstructionCompile(GekkoOPInfo* info, u32 pc) +{ + info->compileCount++; + info->lastUse = pc; + +#ifdef OPLOG + if (!strcmp(info->opname, OP_TO_LOG)) + { + rsplocations.push_back(pc); + } +#endif +} + void PrintInstructionRunCounts() { typedef std::pair<const char*, u64> OpInfo; diff --git a/Source/Core/Core/PowerPC/PPCTables.h b/Source/Core/Core/PowerPC/PPCTables.h index 81567a452f..d6ea5c7791 100644 --- a/Source/Core/Core/PowerPC/PPCTables.h +++ b/Source/Core/Core/PowerPC/PPCTables.h @@ -127,6 +127,7 @@ bool IsValidInstruction(UGeckoInstruction inst); bool UsesFPU(UGeckoInstruction inst); void CountInstruction(UGeckoInstruction inst); +void CountInstructionCompile(GekkoOPInfo* info, u32 pc); void PrintInstructionRunCounts(); void LogCompiledInstructions(); const char* GetInstructionName(UGeckoInstruction inst); |
