mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 04:24:37 +03:00
Make asmjit compile with all possible ASMJIT_DISABLE_... options
This commit is contained in:
@@ -110,7 +110,7 @@ protected:
|
||||
Error err,
|
||||
uint32_t instId, uint32_t options, const Operand_& o0, const Operand_& o1, const Operand_& o2, const Operand_& o3);
|
||||
#else
|
||||
ASMJIT_INLINE _emitFailed(
|
||||
ASMJIT_INLINE Error _emitFailed(
|
||||
uint32_t err,
|
||||
uint32_t instId, uint32_t options, const Operand_& o0, const Operand_& o1, const Operand_& o2, const Operand_& o3) {
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#if !defined(ASMJIT_DISABLE_LOGGING)
|
||||
|
||||
// [Dependencies]
|
||||
#include "../base/codeholder.h"
|
||||
#include "../base/codeemitter.h"
|
||||
#include "../base/logging.h"
|
||||
#include "../base/utils.h"
|
||||
|
||||
@@ -21,6 +23,8 @@
|
||||
|
||||
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||
# include "../base/codecompiler.h"
|
||||
#else
|
||||
namespace asmjit { class VirtReg; }
|
||||
#endif // !ASMJIT_DISABLE_COMPILER
|
||||
|
||||
#if defined(ASMJIT_BUILD_X86)
|
||||
@@ -35,6 +39,7 @@
|
||||
#include "../asmjit_apibegin.h"
|
||||
|
||||
namespace asmjit {
|
||||
|
||||
// ============================================================================
|
||||
// [asmjit::Logger - Construction / Destruction]
|
||||
// ============================================================================
|
||||
@@ -323,8 +328,10 @@ static Error formatFuncRets(
|
||||
if (i) ASMJIT_PROPAGATE(sb.appendString(", "));
|
||||
ASMJIT_PROPAGATE(formatFuncDetailValue(sb, logOptions, emitter, fd.getRet(i)));
|
||||
|
||||
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||
if (vRegs)
|
||||
ASMJIT_PROPAGATE(sb.appendFormat(" {%s}", vRegs[i]->getName()));
|
||||
#endif // !ASMJIT_DISABLE_COMPILER
|
||||
}
|
||||
|
||||
return kErrorOk;
|
||||
@@ -341,8 +348,10 @@ static Error formatFuncArgs(
|
||||
if (i) ASMJIT_PROPAGATE(sb.appendString(", "));
|
||||
ASMJIT_PROPAGATE(formatFuncDetailValue(sb, logOptions, emitter, fd.getArg(i)));
|
||||
|
||||
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||
if (vRegs)
|
||||
ASMJIT_PROPAGATE(sb.appendFormat(" {%s}", vRegs[i]->getName()));
|
||||
#endif // !ASMJIT_DISABLE_COMPILER
|
||||
}
|
||||
|
||||
return kErrorOk;
|
||||
|
||||
@@ -536,6 +536,7 @@ ASMJIT_FAVOR_SIZE Error X86Logging::formatRegister(
|
||||
ASMJIT_UNUSED(archType);
|
||||
|
||||
if (Operand::isPackedId(rId)) {
|
||||
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||
if (emitter && emitter->getType() == CodeEmitter::kTypeCompiler) {
|
||||
const CodeCompiler* cc = static_cast<const CodeCompiler*>(emitter);
|
||||
|
||||
@@ -550,6 +551,7 @@ ASMJIT_FAVOR_SIZE Error X86Logging::formatRegister(
|
||||
return sb.appendFormat("v%u", static_cast<unsigned int>(Operand::unpackId(rId)));
|
||||
}
|
||||
}
|
||||
#endif // !ASMJIT_DISABLE_COMPILER
|
||||
|
||||
return sb.appendFormat("VirtReg<Type=%u Id=%u>", rType, rId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user