summaryrefslogtreecommitdiff
path: root/Source/UnitTests
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-11-13 16:17:42 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2013-11-13 16:17:42 -0600
commit2a23bdde6f76c0bff0906bbbee298480b52ba0c2 (patch)
tree22a7bccfb1cb25d4c9f247ca3d43904a4a6d79dc /Source/UnitTests
parent3c7613fc83981f9ef8efa2e4ac478af9fe23bdec (diff)
parent63a9dff3bb8c88cdc5b941db1f3813843c7a8564 (diff)
Merge branch 'master' into android-new-control-input-overlay
Conflicts: Source/Core/DolphinWX/Src/Android/ButtonManager.h
Diffstat (limited to 'Source/UnitTests')
-rw-r--r--Source/UnitTests/AudioJitTests.cpp28
-rw-r--r--Source/UnitTests/DSPJitTester.cpp6
-rw-r--r--Source/UnitTests/DSPJitTester.h36
3 files changed, 35 insertions, 35 deletions
diff --git a/Source/UnitTests/AudioJitTests.cpp b/Source/UnitTests/AudioJitTests.cpp
index 7712f59fc3..f078e8541b 100644
--- a/Source/UnitTests/AudioJitTests.cpp
+++ b/Source/UnitTests/AudioJitTests.cpp
@@ -86,7 +86,7 @@ void sbset()
tester.Report();
}
-void nx_s()
+void nx_s()
{
DSPJitTester tester(0x8000, 0x0020);
tester.AddTestData(DSP_REG_AR0);
@@ -96,7 +96,7 @@ void nx_s()
tester.Report();
}
-void nx_sn()
+void nx_sn()
{
DSPJitTester tester(0x8000, 0x0024);
tester.AddTestData(DSP_REG_AR0);
@@ -107,7 +107,7 @@ void nx_sn()
tester.Report();
}
-void nx_l()
+void nx_l()
{
DSPJitTester tester(0x8000, 0x0040);
@@ -118,7 +118,7 @@ void nx_l()
tester.Report();
}
-void set16_l()
+void set16_l()
{
DSPJitTester tester(0x8e00, 0x0070);
@@ -131,7 +131,7 @@ void set16_l()
tester.Report();
}
-void nx_ln()
+void nx_ln()
{
DSPJitTester tester(0x8000, 0x0044);
tester.AddTestData(DSP_REG_AR0);
@@ -142,7 +142,7 @@ void nx_ln()
tester.Report();
}
-void nx_ls()
+void nx_ls()
{
DSPJitTester tester1(0x8000, 0x0080);
tester1.AddTestData(DSP_REG_ACM0);
@@ -159,7 +159,7 @@ void nx_ls()
tester2.Report();
}
-void nx_lsn()
+void nx_lsn()
{
DSPJitTester tester1(0x8000, 0x0084);
tester1.AddTestData(DSP_REG_ACM0);
@@ -177,7 +177,7 @@ void nx_lsn()
tester2.Report();
}
-void nx_lsm()
+void nx_lsm()
{
DSPJitTester tester1(0x8000, 0x0088);
tester1.AddTestData(DSP_REG_ACM0);
@@ -195,7 +195,7 @@ void nx_lsm()
tester2.Report();
}
-void nx_lsnm()
+void nx_lsnm()
{
DSPJitTester tester1(0x8000, 0x008c);
tester1.AddTestData(DSP_REG_ACM0);
@@ -214,7 +214,7 @@ void nx_lsnm()
tester2.Report();
}
-void nx_sl()
+void nx_sl()
{
DSPJitTester tester1(0x8000, 0x0082);
tester1.AddTestData(DSP_REG_ACM0);
@@ -231,7 +231,7 @@ void nx_sl()
tester2.Report();
}
-void nx_sln()
+void nx_sln()
{
DSPJitTester tester1(0x8000, 0x0086);
tester1.AddTestData(DSP_REG_ACM0);
@@ -249,7 +249,7 @@ void nx_sln()
tester2.Report();
}
-void nx_slm()
+void nx_slm()
{
DSPJitTester tester1(0x8000, 0x008a);
tester1.AddTestData(DSP_REG_ACM0);
@@ -267,7 +267,7 @@ void nx_slm()
tester2.Report();
}
-void nx_slnm()
+void nx_slnm()
{
DSPJitTester tester1(0x8000, 0x008e);
tester1.AddTestData(DSP_REG_ACM0);
@@ -286,7 +286,7 @@ void nx_slnm()
tester2.Report();
}
-void nx_ld()
+void nx_ld()
{
DSPJitTester tester1(0x8000, 0x00c0);
tester1.AddTestData(DSP_REG_AXL0,0xdead);
diff --git a/Source/UnitTests/DSPJitTester.cpp b/Source/UnitTests/DSPJitTester.cpp
index 8980391c56..a0c37057c5 100644
--- a/Source/UnitTests/DSPJitTester.cpp
+++ b/Source/UnitTests/DSPJitTester.cpp
@@ -6,8 +6,8 @@ DSPJitTester::DSPJitTester(u16 opcode, u16 opcode_ext, bool verbose, bool only_f
instruction = opcode | opcode_ext;
opcode_template = GetOpTemplate(instruction);
sprintf(instruction_name, "%s", opcode_template->name);
- if (opcode_template->extended)
- sprintf(&instruction_name[strlen(instruction_name)], "'%s",
+ 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)
@@ -17,7 +17,7 @@ bool DSPJitTester::Test(SDSP dsp_settings)
printf("Running %s: ", instruction_name);
DumpRegs(dsp_settings);
}
-
+
last_input_dsp = dsp_settings;
last_int_dsp = RunInterpreter(dsp_settings);
last_jit_dsp = RunJit(dsp_settings);
diff --git a/Source/UnitTests/DSPJitTester.h b/Source/UnitTests/DSPJitTester.h
index ac40fa41c0..e507d6dca8 100644
--- a/Source/UnitTests/DSPJitTester.h
+++ b/Source/UnitTests/DSPJitTester.h
@@ -1,62 +1,62 @@
// How to use the DSPJitTester:
-//
+//
// == Before running ==
// Make sure to call Initialize to set initial stuff required by int and jit:
// DSPJitTester::Initialize();
-//
+//
// == Creation of a testcase ==
// Create a testcase for a normal operation:
// DSPJitTester tester(0x0004); //taken from DSPTables.cpp, opcodes[]
-//
+//
// Create a testcase for an extended operation:
// DSPJitTester tester(0x8000, 0x0004); //NX from opcodes, DR from opcodes_ext
-//
+//
// By default, no messages are written.
// To log all operations, set verbose to true:
// DSPJitTester tester(0x8000, 0x0004, true);
-//
+//
// You can also choose to only print failing tests:
// DSPJitTester tester(0x8000, 0x0004, verbosity_setting, true);
-// verbose = true will give the same output as verbose,
+// verbose = true will give the same output as verbose,
// while verbose = false will only (really!) print failing tests.
-//
+//
// == Setting up values ==
// You can set the tester up with values for each DSP register:
// tester.AddTestData(DSP_REG_ACC0, 1);
// tester.AddTestData(DSP_REG_ACC0, 2);
// tester.AddTestData(DSP_REG_ACC0, 3);
-//
+//
// You can also choose to have a few predefined values added for a register:
// tester.AddTestData(DSP_REG_ACC0); //see the method body for the values added
-//
+//
// == Running the tests ==
-// After setup, you can either run JIT against the interpreter
+// After setup, you can either run JIT against the interpreter
// using all predefined register values, pass your own set of
// registers or run either of the two independently from each other.
-//
+//
// int failed_tests = tester.TestAll(); //run jit against int, using values from AddTestData
// int failed_tests = tester.TestAll(true); //override the value for only_failed to show failure
-//
+//
// SDSP dsp = GetCustomSetOfRegisters();
// bool success = tester.Test(dsp); //run jit against int, using a custom set of register values
-//
+//
// SDSP result = tester.RunInterpreter(dsp); //run int alone
// SDSP result = tester.RunJit(dsp); //run jit alone
-//
+//
// == Examining results ==
// When either verbose or only_failed is set to true, the tester will automatically report
// failure to stdout, along with input registers and the differences in output registers.
-//
+//
// tester.Report(); //display a small report afterwards
-//
+//
// SDSP int = tester.GetLastInterpreterDSP(); //examine the DSP set left after running int
// SDSP jit = tester.GetLastJitDSP(); //same for jit
-//
+//
// int tests_run = tester.GetRunCount();
// int tests_failed = tester.GetFailCount();
// const char* tested_instruction = tester.GetInstructionName();
// printf("%s ran %d tests and failed %d times\n", tested_instruction, tests_run, tests_failed);
-//
+//
// tester.DumpJittedCode(); //prints the code bytes produced by jit (examine with udcli/udis86 or similar)
#ifndef __DSP_JIT_TESTER_