diff options
| author | Lioncash <mathew1800@gmail.com> | 2016-09-26 19:58:21 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2016-09-26 20:04:17 -0400 |
| commit | 082275d785e725504e82cc6cb1e1d2cd2af868bc (patch) | |
| tree | 828588cbc196e56649ff22b21aae386a449ce671 /Source/Core | |
| parent | a9473915567e0636f60adb40f888e9895592613e (diff) | |
PPCAnalyst: Convert #define into a constant
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/PowerPC/PPCAnalyst.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index 97fc26b7eb..9f38df5ade 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -34,6 +34,8 @@ constexpr int CODEBUFFER_SIZE = 32000; // 0 does not perform block merging constexpr u32 FUNCTION_FOLLOWING_THRESHOLD = 16; +constexpr u32 INVALID_BRANCH_TARGET = 0xFFFFFFFF; + CodeBuffer::CodeBuffer(int size) { codebuffer = new PPCAnalyst::CodeOp[size]; @@ -45,8 +47,6 @@ CodeBuffer::~CodeBuffer() delete[] codebuffer; } -#define INVALID_TARGET ((u32)-1) - static u32 EvaluateBranchTarget(UGeckoInstruction instr, u32 pc) { switch (instr.OPCD) @@ -60,7 +60,7 @@ static u32 EvaluateBranchTarget(UGeckoInstruction instr, u32 pc) return target; } default: - return INVALID_TARGET; + return INVALID_BRANCH_TARGET; } } @@ -168,7 +168,7 @@ bool AnalyzeFunction(u32 startAddr, Symbol& func, int max_size) else { u32 target = EvaluateBranchTarget(instr, addr); - if (target != INVALID_TARGET && instr.LK) + if (target != INVALID_BRANCH_TARGET && instr.LK) { // we found a branch-n-link! func.calls.emplace_back(target, addr); |
