mirror of
https://github.com/asmjit/asmjit
synced 2026-06-08 13:13:30 +00:00
f1ce2383ba
- Documentation - removed verbose @brief and switched to markdown syntax which Doxygen supports. - Added inline documentation to AVX/AVX2 instructions. - Added more documentation notes to utility classes. - Modified documentation groups to be compatible with the new code layout (base/x86). - Renamed VirtualMemoryManager to VMemMgr. - Removed MemoryManager interface (not needed). - Changed JitRuntime to always create a new isolated VMemMgr instance. - Fixed WinRemoteRuntime to work with the new changes. - Added missing insertps instruction to database, assembler and compiler. - Moved global functions in x86cpuinfo to CpuUtil class. - Should notify Issue #10
73 lines
1.7 KiB
C++
73 lines
1.7 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 short jump",
|
|
|
|
"No function defined",
|
|
"Incomplete function",
|
|
"Overlapped arguments",
|
|
"No registers",
|
|
"Overlapped registers",
|
|
"Incompatible argument",
|
|
"Incompatible return",
|
|
|
|
"Unknown error"
|
|
};
|
|
|
|
const char* ErrorUtil::asString(Error e) {
|
|
return errorMessages[IntUtil::iMin<Error>(e, kErrorCount)];
|
|
}
|
|
|
|
} // asmjit namespace
|
|
|
|
// [Api-End]
|
|
#include "../apiend.h"
|