EX and EXRL need special scaffolding and treatment.
Part of fixing https://bugs.kde.org/show_bug.cgi?id=510840
disasm-test --all
For all opcodes known to disasm-test, generate testcases and
- verify the disassembly. This is how disasm-test is invoked
+ verify the disassembly.
+
+disasm-test --all-except-exrl
+ As the option name suggests. This is how disasm-test is invoked
during regression testing.
disasm-test --generate OPCODE_NAMEs
All opcodes which are implemented in valgrind are considered.
-TODO
-----
+NOTES
+-----
(1) Testcase generation for the "Rotate and ..." family of opcodes needs
to be improved. Several interesting cases involving the T- and Z-bit
are not considered.
(5) For D20XB and D12XB operands add a test with B == X and B != 0
Not exactly easy to do.
+
+(6) For objdump-based disassembly the offset in the EXRL insn is expected
+ to denote a decodable insn. This is obviously not the case here and
+ therefore causing a miscompare.
-Total: 148764 tests generated
-Total: 148672 insns verified
+Total: 148757 tests generated
+Total: 148665 insns verified
Total: 0 disassembly mismatches
Total: 92 specification exceptions
#
prereq: ./disasm-test --check-prereq
prog: /bin/true
-post: ./disasm-test --all --summary
+post: ./disasm-test --all-except-exrl --summary
int
main(int argc, char *argv[])
{
- int all = 0, verify = 0, generate = 0, unit_test = 0;
+ int all = 0, verify = 0, generate = 0, unit_test = 0, all_except_exrl = 0;
int num_clargs = 0;
int run = 0, check_prereq = 0;
const char *clargs[argc];
verify = 1;
} else if (CHECK_CLO(clo, "--generate")) {
generate = 1;
+ } else if (CHECK_CLO(clo, "--all-except-exrl")) {
+ all = 1;
+ all_except_exrl = 1;
} else if (CHECK_CLO(clo, "--all")) {
all = 1;
} else if (CHECK_CLO(clo, "--verbose")) {
for (int i = 0; i < num_opcodes; ++i) {
opcode *opc = get_opcode_by_index(i); // never NULL
+ if (all_except_exrl && strcmp(opc->name, "exrl") == 0)
+ continue;
+
if (opcode_has_errors(opc)) {
error("Opcode '%s' ignored due to syntax errors\n",
opc->name);
dis_irsb = emptyIRSB();
}
- /* Otherwise we won't make it through s390_irgen_EXRL. */
- last_execute_target = 42;
+ /* Otherwise we won't make it through s390_irgen_EX. */
+#define Invalid_execute_target 1
+ last_execute_target = Invalid_execute_target;
}