Fix a number of bugs in the ppc disassembler, causing valid instructions to show up as (ill). Also fix some broken indentation. Plus a panicalert for illegal instructions in ppctables. Remove some deprecated compiler flags.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1528 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
hrydgard 2008-12-14 11:57:35 +00:00
parent cdf64b8199
commit 162351d832
4 changed files with 640 additions and 630 deletions

View File

@ -51,7 +51,6 @@
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4" DebugInformationFormat="4"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -116,7 +115,6 @@
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -179,7 +177,6 @@
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -245,7 +242,6 @@
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -308,7 +304,6 @@
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -374,7 +369,6 @@
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />

File diff suppressed because it is too large Load Diff

View File

@ -645,20 +645,28 @@ void PPCTables::InitTables()
} }
} }
// #define OPLOG
#ifdef OPLOG
namespace { namespace {
std::vector<u32> rsplocations; std::vector<u32> rsplocations;
} }
#endif
void PPCTables::CompileInstruction(UGeckoInstruction _inst) void PPCTables::CompileInstruction(UGeckoInstruction _inst)
{ {
dynaOpTable[_inst.OPCD](_inst); dynaOpTable[_inst.OPCD](_inst);
GekkoOPInfo *info = GetOpInfo(_inst); GekkoOPInfo *info = GetOpInfo(_inst);
if (info) { if (info) {
#ifdef OPLOG
if (!strcmp(info->opname, "mcrfs")) { if (!strcmp(info->opname, "mcrfs")) {
rsplocations.push_back(Jit64::js.compilerPC); rsplocations.push_back(Jit64::js.compilerPC);
} }
#endif
info->compileCount++; info->compileCount++;
info->lastUse = Jit64::js.compilerPC; info->lastUse = Jit64::js.compilerPC;
} else {
PanicAlert("Tried to compile illegal (or unknown) instruction %08x, at %08x", _inst.hex, Jit64::js.compilerPC);
} }
} }
@ -688,7 +696,6 @@ struct inf
void PPCTables::PrintInstructionRunCounts() void PPCTables::PrintInstructionRunCounts()
{ {
std::vector<inf> temp; std::vector<inf> temp;
for (int i = 0; i < m_numInstructions; i++) for (int i = 0; i < m_numInstructions; i++)
{ {
inf x; inf x;
@ -697,7 +704,6 @@ void PPCTables::PrintInstructionRunCounts()
temp.push_back(x); temp.push_back(x);
} }
std::sort(temp.begin(), temp.end()); std::sort(temp.begin(), temp.end());
for (int i = 0; i < m_numInstructions; i++) for (int i = 0; i < m_numInstructions; i++)
{ {
LOG(GEKKO, "%s : %i", temp[i].name,temp[i].count); LOG(GEKKO, "%s : %i", temp[i].name,temp[i].count);
@ -724,10 +730,12 @@ void PPCTables::LogCompiledInstructions()
} }
} }
fclose(f); fclose(f);
#ifdef OPLOG
f = fopen(StringFromFormat(FULL_LOGS_DIR "mcrfs_at.txt", time).c_str(), "w"); f = fopen(StringFromFormat(FULL_LOGS_DIR "mcrfs_at.txt", time).c_str(), "w");
for (size_t i = 0; i < rsplocations.size(); i++) { for (size_t i = 0; i < rsplocations.size(); i++) {
fprintf(f, "mcrfs: %08x\n", rsplocations[i]); fprintf(f, "mcrfs: %08x\n", rsplocations[i]);
} }
fclose(f); fclose(f);
#endif
time++; time++;
} }

View File

@ -55,7 +55,6 @@
AssemblerListingLocation="$(IntDir)\" AssemblerListingLocation="$(IntDir)\"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4" DebugInformationFormat="4"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -140,7 +139,6 @@
AssemblerListingLocation="$(IntDir)\" AssemblerListingLocation="$(IntDir)\"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -228,7 +226,6 @@
AssemblerListingLocation="$(IntDir)\" AssemblerListingLocation="$(IntDir)\"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -405,7 +402,6 @@
AssemblerListingLocation="$(IntDir)\" AssemblerListingLocation="$(IntDir)\"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />
@ -494,7 +490,6 @@
AssemblerListingLocation="$(IntDir)\" AssemblerListingLocation="$(IntDir)\"
WarningLevel="3" WarningLevel="3"
WarnAsError="false" WarnAsError="false"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3" DebugInformationFormat="3"
ForcedIncludeFiles="stdafx.h" ForcedIncludeFiles="stdafx.h"
/> />