diff --git a/src/asmjit/base/assembler.h b/src/asmjit/base/assembler.h index 5dee5b4..f48c150 100644 --- a/src/asmjit/base/assembler.h +++ b/src/asmjit/base/assembler.h @@ -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) { diff --git a/src/asmjit/base/logging.cpp b/src/asmjit/base/logging.cpp index 372715a..22141f7 100644 --- a/src/asmjit/base/logging.cpp +++ b/src/asmjit/base/logging.cpp @@ -12,29 +12,34 @@ #if !defined(ASMJIT_DISABLE_LOGGING) // [Dependencies] +#include "../base/codeholder.h" +#include "../base/codeemitter.h" #include "../base/logging.h" #include "../base/utils.h" #if !defined(ASMJIT_DISABLE_BUILDER) -#include "../base/codebuilder.h" +# include "../base/codebuilder.h" #endif // !ASMJIT_DISABLE_BUILDER #if !defined(ASMJIT_DISABLE_COMPILER) -#include "../base/codecompiler.h" +# include "../base/codecompiler.h" +#else +namespace asmjit { class VirtReg; } #endif // !ASMJIT_DISABLE_COMPILER #if defined(ASMJIT_BUILD_X86) -#include "../x86/x86logging_p.h" +# include "../x86/x86logging_p.h" #endif // ASMJIT_BUILD_X86 #if defined(ASMJIT_BUILD_ARM) -#include "../arm/armlogging_p.h" +# include "../arm/armlogging_p.h" #endif // ASMJIT_BUILD_ARM // [Api-Begin] #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; diff --git a/src/asmjit/x86/x86logging.cpp b/src/asmjit/x86/x86logging.cpp index d1dcad3..6019036 100644 --- a/src/asmjit/x86/x86logging.cpp +++ b/src/asmjit/x86/x86logging.cpp @@ -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(emitter); @@ -550,6 +551,7 @@ ASMJIT_FAVOR_SIZE Error X86Logging::formatRegister( return sb.appendFormat("v%u", static_cast(Operand::unpackId(rId))); } } +#endif // !ASMJIT_DISABLE_COMPILER return sb.appendFormat("VirtReg", rType, rId); }