Adjusted to fit some gcc weirdness

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1584 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2008-12-18 11:51:11 +00:00
parent 772a29df28
commit 74c1950495
1 changed files with 14 additions and 11 deletions

View File

@ -16,6 +16,7 @@
// http://code.google.com/p/dolphin-emu/ // http://code.google.com/p/dolphin-emu/
#include <algorithm> #include <algorithm>
#include <vector>
#include "Common.h" #include "Common.h"
#include "PPCTables.h" #include "PPCTables.h"
@ -41,6 +42,16 @@ struct GekkoOPTemplate
int runCount; int runCount;
}; };
struct inf
{
const char *name;
int count;
bool operator < (const inf &o) const
{
return count > o.count;
}
};
static GekkoOPInfo *m_infoTable[64]; static GekkoOPInfo *m_infoTable[64];
static GekkoOPInfo *m_infoTable4[1024]; static GekkoOPInfo *m_infoTable4[1024];
static GekkoOPInfo *m_infoTable19[1024]; static GekkoOPInfo *m_infoTable19[1024];
@ -656,7 +667,7 @@ namespace {
} }
#endif #endif
void PPCTables::CompileInstruction(UGeckoInstruction _inst) void CompileInstruction(UGeckoInstruction _inst)
{ {
dynaOpTable[_inst.OPCD](_inst); dynaOpTable[_inst.OPCD](_inst);
GekkoOPInfo *info = GetOpInfo(_inst); GekkoOPInfo *info = GetOpInfo(_inst);
@ -688,15 +699,7 @@ void CountInstruction(UGeckoInstruction _inst)
void PrintInstructionRunCounts() void PrintInstructionRunCounts()
{ {
struct inf
{
const char *name;
int count;
bool operator < (const inf &o) const
{
return count > o.count;
}
};
std::vector<inf> temp; std::vector<inf> temp;
for (int i = 0; i < m_numInstructions; i++) for (int i = 0; i < m_numInstructions; i++)
{ {
@ -742,4 +745,4 @@ void LogCompiledInstructions()
time++; time++;
} }
} // namespace } // namespace