mirror of
https://github.com/asmjit/asmjit
synced 2026-06-08 13:13:30 +00:00
1a73e65534
- Added JECXZ instruction. - Doxyfile is now in project root. - Documentation updates.
67 lines
1.5 KiB
C++
67 lines
1.5 KiB
C++
// [AsmJit]
|
|
// Complete x86/x64 JIT and Remote Assembler for C++.
|
|
//
|
|
// [License]
|
|
// Zlib - See LICENSE.md file in the package.
|
|
|
|
// [Export]
|
|
#define ASMJIT_EXPORTS
|
|
|
|
// [Dependencies - AsmJit]
|
|
#include "../base/error.h"
|
|
#include "../base/intutil.h"
|
|
|
|
// [Api-Begin]
|
|
#include "../apibegin.h"
|
|
|
|
namespace asmjit {
|
|
|
|
// ============================================================================
|
|
// [asmjit::ErrorHandler - Construction / Destruction]
|
|
// ============================================================================
|
|
|
|
ErrorHandler::ErrorHandler() {}
|
|
ErrorHandler::~ErrorHandler() {}
|
|
|
|
// ============================================================================
|
|
// [asmjit::ErrorHandler - Interface]
|
|
// ============================================================================
|
|
|
|
ErrorHandler* ErrorHandler::addRef() const {
|
|
return const_cast<ErrorHandler*>(this);
|
|
}
|
|
|
|
void ErrorHandler::release() {}
|
|
|
|
// ============================================================================
|
|
// [asmjit::ErrorUtil - AsString]
|
|
// ============================================================================
|
|
|
|
static const char* errorMessages[] = {
|
|
"Ok",
|
|
|
|
"No heap memory",
|
|
"No virtual memory",
|
|
|
|
"Invalid argument",
|
|
"Invalid state",
|
|
|
|
"Unknown instruction",
|
|
"Illegal instruction",
|
|
"Illegal addressing",
|
|
"Illegal displacement",
|
|
|
|
"Invalid function",
|
|
"Overlapped arguments",
|
|
"Unknown error"
|
|
};
|
|
|
|
const char* ErrorUtil::asString(Error e) {
|
|
return errorMessages[IntUtil::iMin<Error>(e, kErrorCount)];
|
|
}
|
|
|
|
} // asmjit namespace
|
|
|
|
// [Api-End]
|
|
#include "../apiend.h"
|