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,
|
Error err,
|
||||||
uint32_t instId, uint32_t options, const Operand_& o0, const Operand_& o1, const Operand_& o2, const Operand_& o3);
|
uint32_t instId, uint32_t options, const Operand_& o0, const Operand_& o1, const Operand_& o2, const Operand_& o3);
|
||||||
#else
|
#else
|
||||||
ASMJIT_INLINE _emitFailed(
|
ASMJIT_INLINE Error _emitFailed(
|
||||||
uint32_t err,
|
uint32_t err,
|
||||||
uint32_t instId, uint32_t options, const Operand_& o0, const Operand_& o1, const Operand_& o2, const Operand_& o3) {
|
uint32_t instId, uint32_t options, const Operand_& o0, const Operand_& o1, const Operand_& o2, const Operand_& o3) {
|
||||||
|
|
||||||
|
|||||||
@@ -12,29 +12,34 @@
|
|||||||
#if !defined(ASMJIT_DISABLE_LOGGING)
|
#if !defined(ASMJIT_DISABLE_LOGGING)
|
||||||
|
|
||||||
// [Dependencies]
|
// [Dependencies]
|
||||||
|
#include "../base/codeholder.h"
|
||||||
|
#include "../base/codeemitter.h"
|
||||||
#include "../base/logging.h"
|
#include "../base/logging.h"
|
||||||
#include "../base/utils.h"
|
#include "../base/utils.h"
|
||||||
|
|
||||||
#if !defined(ASMJIT_DISABLE_BUILDER)
|
#if !defined(ASMJIT_DISABLE_BUILDER)
|
||||||
#include "../base/codebuilder.h"
|
# include "../base/codebuilder.h"
|
||||||
#endif // !ASMJIT_DISABLE_BUILDER
|
#endif // !ASMJIT_DISABLE_BUILDER
|
||||||
|
|
||||||
#if !defined(ASMJIT_DISABLE_COMPILER)
|
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||||
#include "../base/codecompiler.h"
|
# include "../base/codecompiler.h"
|
||||||
|
#else
|
||||||
|
namespace asmjit { class VirtReg; }
|
||||||
#endif // !ASMJIT_DISABLE_COMPILER
|
#endif // !ASMJIT_DISABLE_COMPILER
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if defined(ASMJIT_BUILD_X86)
|
||||||
#include "../x86/x86logging_p.h"
|
# include "../x86/x86logging_p.h"
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // ASMJIT_BUILD_X86
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_ARM)
|
#if defined(ASMJIT_BUILD_ARM)
|
||||||
#include "../arm/armlogging_p.h"
|
# include "../arm/armlogging_p.h"
|
||||||
#endif // ASMJIT_BUILD_ARM
|
#endif // ASMJIT_BUILD_ARM
|
||||||
|
|
||||||
// [Api-Begin]
|
// [Api-Begin]
|
||||||
#include "../asmjit_apibegin.h"
|
#include "../asmjit_apibegin.h"
|
||||||
|
|
||||||
namespace asmjit {
|
namespace asmjit {
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// [asmjit::Logger - Construction / Destruction]
|
// [asmjit::Logger - Construction / Destruction]
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -323,8 +328,10 @@ static Error formatFuncRets(
|
|||||||
if (i) ASMJIT_PROPAGATE(sb.appendString(", "));
|
if (i) ASMJIT_PROPAGATE(sb.appendString(", "));
|
||||||
ASMJIT_PROPAGATE(formatFuncDetailValue(sb, logOptions, emitter, fd.getRet(i)));
|
ASMJIT_PROPAGATE(formatFuncDetailValue(sb, logOptions, emitter, fd.getRet(i)));
|
||||||
|
|
||||||
|
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||||
if (vRegs)
|
if (vRegs)
|
||||||
ASMJIT_PROPAGATE(sb.appendFormat(" {%s}", vRegs[i]->getName()));
|
ASMJIT_PROPAGATE(sb.appendFormat(" {%s}", vRegs[i]->getName()));
|
||||||
|
#endif // !ASMJIT_DISABLE_COMPILER
|
||||||
}
|
}
|
||||||
|
|
||||||
return kErrorOk;
|
return kErrorOk;
|
||||||
@@ -341,8 +348,10 @@ static Error formatFuncArgs(
|
|||||||
if (i) ASMJIT_PROPAGATE(sb.appendString(", "));
|
if (i) ASMJIT_PROPAGATE(sb.appendString(", "));
|
||||||
ASMJIT_PROPAGATE(formatFuncDetailValue(sb, logOptions, emitter, fd.getArg(i)));
|
ASMJIT_PROPAGATE(formatFuncDetailValue(sb, logOptions, emitter, fd.getArg(i)));
|
||||||
|
|
||||||
|
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||||
if (vRegs)
|
if (vRegs)
|
||||||
ASMJIT_PROPAGATE(sb.appendFormat(" {%s}", vRegs[i]->getName()));
|
ASMJIT_PROPAGATE(sb.appendFormat(" {%s}", vRegs[i]->getName()));
|
||||||
|
#endif // !ASMJIT_DISABLE_COMPILER
|
||||||
}
|
}
|
||||||
|
|
||||||
return kErrorOk;
|
return kErrorOk;
|
||||||
|
|||||||
@@ -536,6 +536,7 @@ ASMJIT_FAVOR_SIZE Error X86Logging::formatRegister(
|
|||||||
ASMJIT_UNUSED(archType);
|
ASMJIT_UNUSED(archType);
|
||||||
|
|
||||||
if (Operand::isPackedId(rId)) {
|
if (Operand::isPackedId(rId)) {
|
||||||
|
#if !defined(ASMJIT_DISABLE_COMPILER)
|
||||||
if (emitter && emitter->getType() == CodeEmitter::kTypeCompiler) {
|
if (emitter && emitter->getType() == CodeEmitter::kTypeCompiler) {
|
||||||
const CodeCompiler* cc = static_cast<const CodeCompiler*>(emitter);
|
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)));
|
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);
|
return sb.appendFormat("VirtReg<Type=%u Id=%u>", rType, rId);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user