Files
asmjit-asmjit/src/asmjit/base/error.cpp
T
kobalicek 1a73e65534 - Minor reorganization of source code (split defs to operand and instruction info).
- Added JECXZ instruction.
- Doxyfile is now in project root.
- Documentation updates.
2014-05-10 21:19:50 +02:00

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"