Removed a stray MOV in increase_addr_reg, fixed decrease_addr_reg. NR should work now.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5329 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st
2010-04-11 14:06:46 +00:00
parent 800595980e
commit 945f8089b8
4 changed files with 41 additions and 33 deletions

View File

@ -1,5 +1,15 @@
#include "DSPJitTester.h"
DSPJitTester::DSPJitTester(u16 opcode, u16 opcode_ext, bool verbose)
: be_verbose(verbose), run_count(0), fail_count(0)
{
instruction = opcode << 9 | opcode_ext;
opcode_template = GetOpTemplate(instruction);
sprintf(instruction_name, "%s", opcode_template->name);
if (opcode_template->extended)
sprintf(&instruction_name[strlen(instruction_name)], "'%s",
extOpTable[instruction & (((instruction >> 12) == 0x3) ? 0x7F : 0xFF)]->name);
}
bool DSPJitTester::Test(SDSP dsp_settings)
{
if (be_verbose)
@ -64,6 +74,18 @@ void DSPJitTester::Report()
{
printf("%s (0x%04x): Ran %d times, Failed %d times.\n", instruction_name, instruction, run_count, fail_count);
}
void DSPJitTester::DumpJittedCode()
{
ResetJit();
const u8* code = jit.GetCodePtr();
jit.WriteCallInterpreter(instruction);
int code_size = jit.GetCodePtr() - code;
printf("%s emitted: ", instruction_name);
for (int i = 0; i < code_size; i++)
printf("%02x ", code[i]);
printf("\n");
}
void DSPJitTester::Initialize()
{
//init int