mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user