Skip to content

Commit

Permalink
PPCTables: Remove prefixed underscores from parameter names
Browse files Browse the repository at this point in the history
  • Loading branch information
lioncash committed Mar 24, 2018
1 parent 2381aee commit 8a7abd7
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 34 deletions.
56 changes: 28 additions & 28 deletions Source/Core/Core/PowerPC/PPCTables.cpp
Expand Up @@ -43,69 +43,69 @@ const std::array<u64, 16> m_crTable = {{

namespace PPCTables
{
GekkoOPInfo* GetOpInfo(UGeckoInstruction _inst)
GekkoOPInfo* GetOpInfo(UGeckoInstruction inst)
{
GekkoOPInfo* info = m_infoTable[_inst.OPCD];
const GekkoOPInfo* info = m_infoTable[inst.OPCD];
if (info->type == OpType::Subtable)
{
switch (_inst.OPCD)
switch (inst.OPCD)
{
case 4:
return m_infoTable4[_inst.SUBOP10];
return m_infoTable4[inst.SUBOP10];
case 19:
return m_infoTable19[_inst.SUBOP10];
return m_infoTable19[inst.SUBOP10];
case 31:
return m_infoTable31[_inst.SUBOP10];
return m_infoTable31[inst.SUBOP10];
case 59:
return m_infoTable59[_inst.SUBOP5];
return m_infoTable59[inst.SUBOP5];
case 63:
return m_infoTable63[_inst.SUBOP10];
return m_infoTable63[inst.SUBOP10];
default:
ASSERT_MSG(POWERPC, 0, "GetOpInfo - invalid subtable op %08x @ %08x", _inst.hex, PC);
ASSERT_MSG(POWERPC, 0, "GetOpInfo - invalid subtable op %08x @ %08x", inst.hex, PC);
return nullptr;
}
}
else
{
if (info->type == OpType::Invalid)
{
ASSERT_MSG(POWERPC, 0, "GetOpInfo - invalid op %08x @ %08x", _inst.hex, PC);
ASSERT_MSG(POWERPC, 0, "GetOpInfo - invalid op %08x @ %08x", inst.hex, PC);
return nullptr;
}
return m_infoTable[_inst.OPCD];
return m_infoTable[inst.OPCD];
}
}

Interpreter::Instruction GetInterpreterOp(UGeckoInstruction _inst)
Interpreter::Instruction GetInterpreterOp(UGeckoInstruction inst)
{
const GekkoOPInfo* info = m_infoTable[_inst.OPCD];
const GekkoOPInfo* info = m_infoTable[inst.OPCD];
if (info->type == OpType::Subtable)
{
switch (_inst.OPCD)
switch (inst.OPCD)
{
case 4:
return Interpreter::m_op_table4[_inst.SUBOP10];
return Interpreter::m_op_table4[inst.SUBOP10];
case 19:
return Interpreter::m_op_table19[_inst.SUBOP10];
return Interpreter::m_op_table19[inst.SUBOP10];
case 31:
return Interpreter::m_op_table31[_inst.SUBOP10];
return Interpreter::m_op_table31[inst.SUBOP10];
case 59:
return Interpreter::m_op_table59[_inst.SUBOP5];
return Interpreter::m_op_table59[inst.SUBOP5];
case 63:
return Interpreter::m_op_table63[_inst.SUBOP10];
return Interpreter::m_op_table63[inst.SUBOP10];
default:
ASSERT_MSG(POWERPC, 0, "GetInterpreterOp - invalid subtable op %08x @ %08x", _inst.hex, PC);
ASSERT_MSG(POWERPC, 0, "GetInterpreterOp - invalid subtable op %08x @ %08x", inst.hex, PC);
return nullptr;
}
}
else
{
if (info->type == OpType::Invalid)
{
ASSERT_MSG(POWERPC, 0, "GetInterpreterOp - invalid op %08x @ %08x", _inst.hex, PC);
ASSERT_MSG(POWERPC, 0, "GetInterpreterOp - invalid op %08x @ %08x", inst.hex, PC);
return nullptr;
}
return Interpreter::m_op_table[_inst.OPCD];
return Interpreter::m_op_table[inst.OPCD];
}
}

Expand All @@ -126,21 +126,21 @@ std::vector<u32> rsplocations;
}
#endif

const char* GetInstructionName(UGeckoInstruction _inst)
const char* GetInstructionName(UGeckoInstruction inst)
{
const GekkoOPInfo* info = GetOpInfo(_inst);
const GekkoOPInfo* info = GetOpInfo(inst);
return info ? info->opname : nullptr;
}

bool IsValidInstruction(UGeckoInstruction _inst)
bool IsValidInstruction(UGeckoInstruction inst)
{
const GekkoOPInfo* info = GetOpInfo(_inst);
const GekkoOPInfo* info = GetOpInfo(inst);
return info != nullptr && info->type != OpType::Unknown;
}

void CountInstruction(UGeckoInstruction _inst)
void CountInstruction(UGeckoInstruction inst)
{
GekkoOPInfo* info = GetOpInfo(_inst);
GekkoOPInfo* info = GetOpInfo(inst);
if (info)
{
info->runCount++;
Expand Down
12 changes: 6 additions & 6 deletions Source/Core/Core/PowerPC/PPCTables.h
Expand Up @@ -107,14 +107,14 @@ extern size_t m_numInstructions;

namespace PPCTables
{
GekkoOPInfo* GetOpInfo(UGeckoInstruction _inst);
Interpreter::Instruction GetInterpreterOp(UGeckoInstruction _inst);
GekkoOPInfo* GetOpInfo(UGeckoInstruction inst);
Interpreter::Instruction GetInterpreterOp(UGeckoInstruction inst);

bool IsValidInstruction(UGeckoInstruction _instCode);
bool UsesFPU(UGeckoInstruction _inst);
bool IsValidInstruction(UGeckoInstruction inst);
bool UsesFPU(UGeckoInstruction inst);

void CountInstruction(UGeckoInstruction _inst);
void CountInstruction(UGeckoInstruction inst);
void PrintInstructionRunCounts();
void LogCompiledInstructions();
const char* GetInstructionName(UGeckoInstruction _inst);
const char* GetInstructionName(UGeckoInstruction inst);
} // namespace PPCTables

0 comments on commit 8a7abd7

Please sign in to comment.