[ABI] Completely reworked instruction DB and generators

* Instruction database is now part of asmjit to keep it in sync
  * X86/X64 ISA data has been reworked, now in a proper JSON format
  * ARM32 ISA data has been added (currently only DB, support later)
  * ARM64 ISA data has been added
  * ARM features detection has been updated
This commit is contained in:
kobalicek
2023-09-10 00:09:34 +02:00
parent 8e2f4de484
commit e4e61c4f15
60 changed files with 28000 additions and 10671 deletions

View File

@@ -52,7 +52,7 @@ public:
assembler.addDiagnosticOptions(asmjit::DiagnosticOptions::kValidateAssembler);
}
ASMJIT_NOINLINE bool testInstruction(const char* expectedOpcode, const char* s, uint32_t err) noexcept {
ASMJIT_NOINLINE bool testValidInstruction(const char* s, const char* expectedOpcode, asmjit::Error err) noexcept {
count++;
if (err) {
@@ -80,6 +80,29 @@ public:
prepare();
return true;
}
ASMJIT_NOINLINE bool testInvalidInstruction(const char* s, asmjit::Error expectedError, asmjit::Error err) noexcept {
count++;
if (err == asmjit::kErrorOk) {
printf(" !! %s passed, but should have failed with <%s> error\n", s, asmjit::DebugUtils::errorAsString(expectedError));
prepare();
return false;
}
if (err != asmjit::kErrorOk) {
printf(" !! %s failed with <%s>, but should have failed with <%s>\n", s, asmjit::DebugUtils::errorAsString(err), asmjit::DebugUtils::errorAsString(expectedError));
prepare();
return false;
}
if (settings.verbose)
printf(" OK [%s] <- %s\n", asmjit::DebugUtils::errorAsString(err), s);
passed++;
prepare();
return true;
}
};
#endif // ASMJIT_TEST_ASSEMBLER_H_INCLUDED