mirror of
https://github.com/TomHarte/CLK.git
synced 2024-10-06 15:00:05 +00:00
Print out summary of failure.
This commit is contained in:
parent
5af03d74ec
commit
a59ad06438
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
@ -261,7 +262,8 @@ template <typename M68000> struct Tester {
|
|||||||
// Use a fixed seed to guarantee continuity across repeated runs.
|
// Use a fixed seed to guarantee continuity across repeated runs.
|
||||||
srand(68000);
|
srand(68000);
|
||||||
|
|
||||||
for(int c = 0x4e72; c < 65536; c++) {
|
std::set<InstructionSet::M68k::Operation> failing_operations;
|
||||||
|
for(int c = 0; c < 65536; c++) {
|
||||||
printf("%04x\n", c);
|
printf("%04x\n", c);
|
||||||
|
|
||||||
// Test only defined opcodes.
|
// Test only defined opcodes.
|
||||||
@ -346,6 +348,7 @@ template <typename M68000> struct Tester {
|
|||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|
||||||
|
failing_operations.insert(instruction.operation);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -366,11 +369,17 @@ template <typename M68000> struct Tester {
|
|||||||
mismatch |= oldState.supervisor_stack_pointer != newState.registers.supervisor_stack_pointer;
|
mismatch |= oldState.supervisor_stack_pointer != newState.registers.supervisor_stack_pointer;
|
||||||
|
|
||||||
if(mismatch) {
|
if(mismatch) {
|
||||||
|
failing_operations.insert(instruction.operation);
|
||||||
printf("Registers don't match after %s, test %d\n", instruction.to_string().c_str(), test);
|
printf("Registers don't match after %s, test %d\n", instruction.to_string().c_str(), test);
|
||||||
// TODO: more detail here!
|
// TODO: more detail here!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("\nAll failing operations:\n");
|
||||||
|
for(const auto operation: failing_operations) {
|
||||||
|
printf("%d,\n", int(operation));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
Loading…
Reference in New Issue
Block a user