mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 20:44:37 +03:00
[ABI] Build improvements - replaced ASMJIT_BUIlD_X86 with ASMJIT_NO_X86 and other changes...
This commit is contained in:
6
.gitignore
vendored
6
.gitignore
vendored
@@ -1,6 +1,6 @@
|
|||||||
|
/build
|
||||||
|
/build_*
|
||||||
|
/tools/asmdb
|
||||||
.vscode
|
.vscode
|
||||||
.kdev4
|
.kdev4
|
||||||
*.kdev4
|
*.kdev4
|
||||||
build
|
|
||||||
build_*
|
|
||||||
tools/asmdb
|
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ endif()
|
|||||||
# [AsmJit - Configuration]
|
# [AsmJit - Configuration]
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
|
|
||||||
|
if (NOT DEFINED ASMJIT_TEST)
|
||||||
|
set(ASMJIT_TEST FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED ASMJIT_EMBED)
|
if (NOT DEFINED ASMJIT_EMBED)
|
||||||
set(ASMJIT_EMBED FALSE)
|
set(ASMJIT_EMBED FALSE)
|
||||||
endif()
|
endif()
|
||||||
@@ -45,29 +49,40 @@ if (NOT DEFINED ASMJIT_STATIC)
|
|||||||
set(ASMJIT_STATIC ${ASMJIT_EMBED})
|
set(ASMJIT_STATIC ${ASMJIT_EMBED})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED ASMJIT_BUILD_X86)
|
if (NOT DEFINED ASMJIT_SANITIZE)
|
||||||
set(ASMJIT_BUILD_X86 FALSE)
|
set(ASMJIT_SANITIZE FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED ASMJIT_TEST)
|
if (NOT DEFINED ASMJIT_NO_X86)
|
||||||
set(ASMJIT_TEST FALSE)
|
set(ASMJIT_NO_X86 FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED ASMJIT_NO_FOREIGN)
|
||||||
|
set(ASMJIT_NO_FOREIGN FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT DEFINED ASMJIT_NO_NATVIS)
|
if (NOT DEFINED ASMJIT_NO_NATVIS)
|
||||||
set(ASMJIT_NO_NATVIS FALSE)
|
set(ASMJIT_NO_NATVIS FALSE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED ASMJIT_NO_CUSTOM_FLAGS)
|
||||||
|
set(ASMJIT_NO_CUSTOM_FLAGS FALSE)
|
||||||
|
endif()
|
||||||
|
|
||||||
# EMBED implies STATIC.
|
# EMBED implies STATIC.
|
||||||
if (ASMJIT_EMBED AND NOT ASMJIT_STATIC)
|
if (ASMJIT_EMBED AND NOT ASMJIT_STATIC)
|
||||||
set(ASMJIT_STATIC TRUE)
|
set(ASMJIT_STATIC TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(ASMJIT_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Location of 'asmjit'")
|
set(ASMJIT_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE PATH "Location of 'asmjit'")
|
||||||
set(ASMJIT_TEST ${ASMJIT_TEST} CACHE BOOL "Build 'asmjit' test applications")
|
set(ASMJIT_TEST "${ASMJIT_TEST}" CACHE BOOL "Build 'asmjit' test applications")
|
||||||
set(ASMJIT_EMBED ${ASMJIT_EMBED} CACHE BOOL "Embed 'asmjit' library (no targets)")
|
set(ASMJIT_EMBED "${ASMJIT_EMBED}" CACHE BOOL "Embed 'asmjit' library (no targets)")
|
||||||
set(ASMJIT_STATIC ${ASMJIT_STATIC} CACHE BOOL "Build 'asmjit' library as static")
|
set(ASMJIT_STATIC "${ASMJIT_STATIC}" CACHE BOOL "Build 'asmjit' library as static")
|
||||||
set(ASMJIT_SANITIZE ${ASMJIT_SANITIZE} CACHE STRING "Build with sanitizers: 'address', 'undefined', etc...")
|
set(ASMJIT_SANITIZE "${ASMJIT_SANITIZE}" CACHE STRING "Build with sanitizers: 'address', 'undefined', etc...")
|
||||||
set(ASMJIT_BUILD_X86 ${ASMJIT_BUILD_X86} CACHE BOOL "Build X86 backends (X86 and X86_64)")
|
set(ASMJIT_NO_X86 "${ASMJIT_NO_X86}" CACHE BOOL "Disable X86/X64 backend")
|
||||||
|
set(ASMJIT_NO_FOREIGN "${ASMJIT_NO_FOREIGN}" CACHE BOOL "Disable all foreign architectures (builds only host backend)")
|
||||||
|
set(ASMJIT_NO_NATVIS "${ASMJIT_NO_NATVIS}" CACHE BOOL "Disable natvis support (embedding asmjit.natvis in PDB)")
|
||||||
|
set(ASMJIT_NO_CUSTOM_FLAGS "${ASMJIT_NO_CUSTOM_FLAGS}" CACHE BOOL "Disable extra compilation flags added by AsmJit to its targets")
|
||||||
|
|
||||||
# =============================================================================
|
# =============================================================================
|
||||||
# [AsmJit - Project]
|
# [AsmJit - Project]
|
||||||
@@ -250,7 +265,10 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(build_option ASMJIT_STATIC
|
foreach(build_option ASMJIT_STATIC
|
||||||
ASMJIT_BUILD_X86
|
# AsmJit backends selection.
|
||||||
|
ASMJIT_NO_X86
|
||||||
|
ASMJIT_NO_FOREIGN
|
||||||
|
# AsmJit features selection.
|
||||||
ASMJIT_NO_DEPRECATED
|
ASMJIT_NO_DEPRECATED
|
||||||
ASMJIT_NO_JIT
|
ASMJIT_NO_JIT
|
||||||
ASMJIT_NO_LOGGING
|
ASMJIT_NO_LOGGING
|
||||||
|
|||||||
@@ -26,12 +26,8 @@
|
|||||||
|
|
||||||
#include "./core.h"
|
#include "./core.h"
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#ifndef ASMJIT_NO_X86
|
||||||
#include "./x86.h"
|
#include "./x86.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_ARM
|
|
||||||
#include "./arm.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // ASMJIT_ASMJIT_H_INCLUDED
|
#endif // ASMJIT_ASMJIT_H_INCLUDED
|
||||||
|
|||||||
@@ -237,9 +237,9 @@ namespace asmjit {
|
|||||||
//! backends in the future. By default AsmJit builds only the host backend, which
|
//! backends in the future. By default AsmJit builds only the host backend, which
|
||||||
//! is autodetected at compile-time, but this can be overridden.
|
//! is autodetected at compile-time, but this can be overridden.
|
||||||
//!
|
//!
|
||||||
//! - \ref ASMJIT_BUILD_X86 - Always build X86 backend (X86 and X86_64).
|
//! - \ref ASMJIT_NO_X86 - Disable X86/X64 backends.
|
||||||
//! - \ref ASMJIT_BUILD_ARM - Always build ARM backend (ARM and AArch64).
|
//! - \ref ASMJIT_NO_FOREIGN - Disables the support for foreign architectures.
|
||||||
//! - \ref ASMJIT_BUILD_HOST - Always build the host backend.
|
//! If defined, it would internally set \ref ASMJIT_BUILD_HOST to true.
|
||||||
//!
|
//!
|
||||||
//! ### Features Selection
|
//! ### Features Selection
|
||||||
//!
|
//!
|
||||||
@@ -252,9 +252,6 @@ namespace asmjit {
|
|||||||
//! attempt to use such API. This includes deprecated classes, namespaces,
|
//! attempt to use such API. This includes deprecated classes, namespaces,
|
||||||
//! enumerations, and functions.
|
//! enumerations, and functions.
|
||||||
//!
|
//!
|
||||||
//! - \ref ASMJIT_NO_FOREIGN - Disables the support for foreign architectures.
|
|
||||||
//! If defined, it would internally set \ref ASMJIT_BUILD_HOST to true.
|
|
||||||
//!
|
|
||||||
//! - \ref ASMJIT_NO_BUILDER - Disables \ref asmjit_builder functionality
|
//! - \ref ASMJIT_NO_BUILDER - Disables \ref asmjit_builder functionality
|
||||||
//! completely. This implies \ref ASMJIT_NO_COMPILER as \ref asmjit_compiler
|
//! completely. This implies \ref ASMJIT_NO_COMPILER as \ref asmjit_compiler
|
||||||
//! cannot be used without \ref asmjit_builder.
|
//! cannot be used without \ref asmjit_builder.
|
||||||
|
|||||||
@@ -65,18 +65,15 @@ namespace asmjit {
|
|||||||
//! \note Can be defined explicitly to bypass autodetection.
|
//! \note Can be defined explicitly to bypass autodetection.
|
||||||
#define ASMJIT_BUILD_RELEASE
|
#define ASMJIT_BUILD_RELEASE
|
||||||
|
|
||||||
//! Defined to build X86/X64 backend.
|
//! Disables X86/X64 backends.
|
||||||
#define ASMJIT_BUILD_X86
|
#define ASMJIT_NO_X86
|
||||||
|
|
||||||
//! Defined to build host backend autodetected at compile-time.
|
//! Disables non-host backends entirely (useful for JIT compilers to minimize the library size).
|
||||||
#define ASMJIT_BUILD_HOST
|
|
||||||
|
|
||||||
//! Disables deprecated API at compile time.
|
|
||||||
#define ASMJIT_NO_DEPRECATED
|
|
||||||
|
|
||||||
//! Disable non-host architectures entirely.
|
|
||||||
#define ASMJIT_NO_FOREIGN
|
#define ASMJIT_NO_FOREIGN
|
||||||
|
|
||||||
|
//! Disables deprecated API at compile time (deprecated API won't be available).
|
||||||
|
#define ASMJIT_NO_DEPRECATED
|
||||||
|
|
||||||
//! Disables \ref asmjit_builder functionality completely.
|
//! Disables \ref asmjit_builder functionality completely.
|
||||||
#define ASMJIT_NO_BUILDER
|
#define ASMJIT_NO_BUILDER
|
||||||
|
|
||||||
@@ -99,6 +96,13 @@ namespace asmjit {
|
|||||||
#define ASMJIT_NO_INTROSPECTION
|
#define ASMJIT_NO_INTROSPECTION
|
||||||
|
|
||||||
// Avoid doxygen preprocessor using feature-selection definitions.
|
// Avoid doxygen preprocessor using feature-selection definitions.
|
||||||
|
#undef ASMJIT_BUILD_EMBNED
|
||||||
|
#undef ASMJIT_BUILD_STATIC
|
||||||
|
#undef ASMJIT_BUILD_DEBUG
|
||||||
|
#undef ASMJIT_BUILD_RELEASE
|
||||||
|
#undef ASMJIT_NO_X86
|
||||||
|
#undef ASMJIT_NO_FOREIGN
|
||||||
|
// (keep ASMJIT_NO_DEPRECATED defined, we don't document deprecated APIs).
|
||||||
#undef ASMJIT_NO_BUILDER
|
#undef ASMJIT_NO_BUILDER
|
||||||
#undef ASMJIT_NO_COMPILER
|
#undef ASMJIT_NO_COMPILER
|
||||||
#undef ASMJIT_NO_JIT
|
#undef ASMJIT_NO_JIT
|
||||||
@@ -112,13 +116,6 @@ namespace asmjit {
|
|||||||
} // {asmjit}
|
} // {asmjit}
|
||||||
#endif // _DOXYGEN
|
#endif // _DOXYGEN
|
||||||
|
|
||||||
// Enable all features at IDE level, so it's properly highlighted and indexed.
|
|
||||||
#ifdef __INTELLISENSE__
|
|
||||||
#ifndef ASMJIT_BUILD_X86
|
|
||||||
#define ASMJIT_BUILD_X86
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// [asmjit::Dependencies]
|
// [asmjit::Dependencies]
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
@@ -243,24 +240,13 @@ namespace asmjit {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// [asmjit::Build - Globals - Build Architectures Definitions]
|
// [asmjit::Build - Globals - Backends]
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#if !defined(ASMJIT_NO_FOREIGN)
|
#if defined(ASMJIT_NO_FOREIGN)
|
||||||
// If 'ASMJIT_NO_FOREIGN' is not defined then all architectures will be built.
|
#if !ASMJIT_ARCH_X86 && !defined(ASMJIT_NO_X86)
|
||||||
#if !defined(ASMJIT_BUILD_X86)
|
#define ASMJIT_NO_X86
|
||||||
#define ASMJIT_BUILD_X86
|
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
// Detect architectures to build if building only for the host architecture.
|
|
||||||
#if ASMJIT_ARCH_X86 && !defined(ASMJIT_BUILD_X86)
|
|
||||||
#define ASMJIT_BUILD_X86
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Define 'ASMJIT_BUILD_HOST' if we know that host architecture will be built.
|
|
||||||
#if !defined(ASMJIT_BUILD_HOST) && ASMJIT_ARCH_X86 && defined(ASMJIT_BUILD_X86)
|
|
||||||
#define ASMJIT_BUILD_HOST
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
#include "../core/archtraits.h"
|
#include "../core/archtraits.h"
|
||||||
#include "../core/misc_p.h"
|
#include "../core/misc_p.h"
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include "../x86/x86archtraits_p.h"
|
#include "../x86/x86archtraits_p.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ ASMJIT_VARAPI const ArchTraits _archTraits[Environment::kArchCount] = {
|
|||||||
noArchTraits,
|
noArchTraits,
|
||||||
|
|
||||||
// X86/X86 architectures.
|
// X86/X86 architectures.
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
x86::x86ArchTraits,
|
x86::x86ArchTraits,
|
||||||
x86::x64ArchTraits,
|
x86::x64ArchTraits,
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ static inline uint32_t detectHWThreadCount() noexcept {
|
|||||||
// [asmjit::CpuInfo - Detect - CPU Features]
|
// [asmjit::CpuInfo - Detect - CPU Features]
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
namespace x86 { void detectCpu(CpuInfo& cpu) noexcept; }
|
namespace x86 { void detectCpu(CpuInfo& cpu) noexcept; }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ const CpuInfo& CpuInfo::host() noexcept {
|
|||||||
if (!cpuInfoInitialized) {
|
if (!cpuInfoInitialized) {
|
||||||
CpuInfo cpuInfoLocal;
|
CpuInfo cpuInfoLocal;
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
x86::detectCpu(cpuInfoLocal);
|
x86::detectCpu(cpuInfoLocal);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -27,10 +27,10 @@
|
|||||||
#include "../core/logger.h"
|
#include "../core/logger.h"
|
||||||
#include "../core/support.h"
|
#include "../core/support.h"
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include "../x86/x86emithelper_p.h"
|
#include "../x86/x86emithelper_p.h"
|
||||||
#include "../x86/x86instdb_p.h"
|
#include "../x86/x86instdb_p.h"
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_ARM
|
#ifdef ASMJIT_BUILD_ARM
|
||||||
#include "../arm/a64emithelper_p.h"
|
#include "../arm/a64emithelper_p.h"
|
||||||
@@ -255,7 +255,7 @@ ASMJIT_FAVOR_SIZE Error BaseEmitter::emitProlog(const FuncFrame& frame) {
|
|||||||
if (ASMJIT_UNLIKELY(!_code))
|
if (ASMJIT_UNLIKELY(!_code))
|
||||||
return DebugUtils::errored(kErrorNotInitialized);
|
return DebugUtils::errored(kErrorNotInitialized);
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (environment().isFamilyX86()) {
|
if (environment().isFamilyX86()) {
|
||||||
x86::EmitHelper emitHelper(this, frame.isAvxEnabled(), frame.isAvx512Enabled());
|
x86::EmitHelper emitHelper(this, frame.isAvxEnabled(), frame.isAvx512Enabled());
|
||||||
return emitHelper.emitProlog(frame);
|
return emitHelper.emitProlog(frame);
|
||||||
@@ -276,7 +276,7 @@ ASMJIT_FAVOR_SIZE Error BaseEmitter::emitEpilog(const FuncFrame& frame) {
|
|||||||
if (ASMJIT_UNLIKELY(!_code))
|
if (ASMJIT_UNLIKELY(!_code))
|
||||||
return DebugUtils::errored(kErrorNotInitialized);
|
return DebugUtils::errored(kErrorNotInitialized);
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (environment().isFamilyX86()) {
|
if (environment().isFamilyX86()) {
|
||||||
x86::EmitHelper emitHelper(this, frame.isAvxEnabled(), frame.isAvx512Enabled());
|
x86::EmitHelper emitHelper(this, frame.isAvxEnabled(), frame.isAvx512Enabled());
|
||||||
return emitHelper.emitEpilog(frame);
|
return emitHelper.emitEpilog(frame);
|
||||||
@@ -297,7 +297,7 @@ ASMJIT_FAVOR_SIZE Error BaseEmitter::emitArgsAssignment(const FuncFrame& frame,
|
|||||||
if (ASMJIT_UNLIKELY(!_code))
|
if (ASMJIT_UNLIKELY(!_code))
|
||||||
return DebugUtils::errored(kErrorNotInitialized);
|
return DebugUtils::errored(kErrorNotInitialized);
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (environment().isFamilyX86()) {
|
if (environment().isFamilyX86()) {
|
||||||
x86::EmitHelper emitHelper(this, frame.isAvxEnabled(), frame.isAvx512Enabled());
|
x86::EmitHelper emitHelper(this, frame.isAvxEnabled(), frame.isAvx512Enabled());
|
||||||
return emitHelper.emitArgsAssignment(frame, args);
|
return emitHelper.emitArgsAssignment(frame, args);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
#include "../core/support.h"
|
#include "../core/support.h"
|
||||||
#include "../core/type.h"
|
#include "../core/type.h"
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include "../x86/x86formatter_p.h"
|
#include "../x86/x86formatter_p.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -101,7 +101,7 @@ Error formatFeature(
|
|||||||
uint32_t arch,
|
uint32_t arch,
|
||||||
uint32_t featureId) noexcept {
|
uint32_t featureId) noexcept {
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::FormatterInternal::formatFeature(sb, featureId);
|
return x86::FormatterInternal::formatFeature(sb, featureId);
|
||||||
#endif
|
#endif
|
||||||
@@ -155,7 +155,7 @@ Error formatRegister(
|
|||||||
uint32_t regType,
|
uint32_t regType,
|
||||||
uint32_t regId) noexcept {
|
uint32_t regId) noexcept {
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::FormatterInternal::formatRegister(sb, formatFlags, emitter, arch, regType, regId);
|
return x86::FormatterInternal::formatRegister(sb, formatFlags, emitter, arch, regType, regId);
|
||||||
#endif
|
#endif
|
||||||
@@ -175,7 +175,7 @@ Error formatOperand(
|
|||||||
uint32_t arch,
|
uint32_t arch,
|
||||||
const Operand_& op) noexcept {
|
const Operand_& op) noexcept {
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::FormatterInternal::formatOperand(sb, formatFlags, emitter, arch, op);
|
return x86::FormatterInternal::formatOperand(sb, formatFlags, emitter, arch, op);
|
||||||
#endif
|
#endif
|
||||||
@@ -195,7 +195,7 @@ Error formatInstruction(
|
|||||||
uint32_t arch,
|
uint32_t arch,
|
||||||
const BaseInst& inst, const Operand_* operands, size_t opCount) noexcept {
|
const BaseInst& inst, const Operand_* operands, size_t opCount) noexcept {
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::FormatterInternal::formatInstruction(sb, formatFlags, emitter, arch, inst, operands, opCount);
|
return x86::FormatterInternal::formatInstruction(sb, formatFlags, emitter, arch, inst, operands, opCount);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
#include "../core/type.h"
|
#include "../core/type.h"
|
||||||
#include "../core/funcargscontext_p.h"
|
#include "../core/funcargscontext_p.h"
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include "../x86/x86func_p.h"
|
#include "../x86/x86func_p.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ ASMJIT_BEGIN_NAMESPACE
|
|||||||
ASMJIT_FAVOR_SIZE Error CallConv::init(uint32_t ccId, const Environment& environment) noexcept {
|
ASMJIT_FAVOR_SIZE Error CallConv::init(uint32_t ccId, const Environment& environment) noexcept {
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (environment.isFamilyX86())
|
if (environment.isFamilyX86())
|
||||||
return x86::FuncInternal::initCallConv(*this, ccId, environment);
|
return x86::FuncInternal::initCallConv(*this, ccId, environment);
|
||||||
#endif
|
#endif
|
||||||
@@ -87,7 +87,7 @@ ASMJIT_FAVOR_SIZE Error FuncDetail::init(const FuncSignature& signature, const E
|
|||||||
if (ret != Type::kIdVoid)
|
if (ret != Type::kIdVoid)
|
||||||
_rets[0].initTypeId(Type::deabstract(ret, deabstractDelta));
|
_rets[0].initTypeId(Type::deabstract(ret, deabstractDelta));
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (environment.isFamilyX86())
|
if (environment.isFamilyX86())
|
||||||
return x86::FuncInternal::initFuncDetail(*this, signature, registerSize);
|
return x86::FuncInternal::initFuncDetail(*this, signature, registerSize);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -22,12 +22,10 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#ifdef ASMJIT_BUILD_X86
|
|
||||||
|
|
||||||
#include "../core/archtraits.h"
|
#include "../core/archtraits.h"
|
||||||
#include "../core/inst.h"
|
#include "../core/inst.h"
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include "../x86/x86instapi_p.h"
|
#include "../x86/x86instapi_p.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -43,7 +41,7 @@ ASMJIT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
#ifndef ASMJIT_NO_TEXT
|
#ifndef ASMJIT_NO_TEXT
|
||||||
Error InstAPI::instIdToString(uint32_t arch, uint32_t instId, String& output) noexcept {
|
Error InstAPI::instIdToString(uint32_t arch, uint32_t instId, String& output) noexcept {
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::InstInternal::instIdToString(arch, instId, output);
|
return x86::InstInternal::instIdToString(arch, instId, output);
|
||||||
#endif
|
#endif
|
||||||
@@ -57,7 +55,7 @@ Error InstAPI::instIdToString(uint32_t arch, uint32_t instId, String& output) no
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t InstAPI::stringToInstId(uint32_t arch, const char* s, size_t len) noexcept {
|
uint32_t InstAPI::stringToInstId(uint32_t arch, const char* s, size_t len) noexcept {
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::InstInternal::stringToInstId(arch, s, len);
|
return x86::InstInternal::stringToInstId(arch, s, len);
|
||||||
#endif
|
#endif
|
||||||
@@ -77,7 +75,7 @@ uint32_t InstAPI::stringToInstId(uint32_t arch, const char* s, size_t len) noexc
|
|||||||
|
|
||||||
#ifndef ASMJIT_NO_VALIDATION
|
#ifndef ASMJIT_NO_VALIDATION
|
||||||
Error InstAPI::validate(uint32_t arch, const BaseInst& inst, const Operand_* operands, size_t opCount, uint32_t validationFlags) noexcept {
|
Error InstAPI::validate(uint32_t arch, const BaseInst& inst, const Operand_* operands, size_t opCount, uint32_t validationFlags) noexcept {
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::InstInternal::validate(arch, inst, operands, opCount, validationFlags);
|
return x86::InstInternal::validate(arch, inst, operands, opCount, validationFlags);
|
||||||
#endif
|
#endif
|
||||||
@@ -100,7 +98,7 @@ Error InstAPI::queryRWInfo(uint32_t arch, const BaseInst& inst, const Operand_*
|
|||||||
if (ASMJIT_UNLIKELY(opCount > Globals::kMaxOpCount))
|
if (ASMJIT_UNLIKELY(opCount > Globals::kMaxOpCount))
|
||||||
return DebugUtils::errored(kErrorInvalidArgument);
|
return DebugUtils::errored(kErrorInvalidArgument);
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::InstInternal::queryRWInfo(arch, inst, operands, opCount, out);
|
return x86::InstInternal::queryRWInfo(arch, inst, operands, opCount, out);
|
||||||
#endif
|
#endif
|
||||||
@@ -120,7 +118,7 @@ Error InstAPI::queryRWInfo(uint32_t arch, const BaseInst& inst, const Operand_*
|
|||||||
|
|
||||||
#ifndef ASMJIT_NO_INTROSPECTION
|
#ifndef ASMJIT_NO_INTROSPECTION
|
||||||
Error InstAPI::queryFeatures(uint32_t arch, const BaseInst& inst, const Operand_* operands, size_t opCount, BaseFeatures* out) noexcept {
|
Error InstAPI::queryFeatures(uint32_t arch, const BaseInst& inst, const Operand_* operands, size_t opCount, BaseFeatures* out) noexcept {
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if (Environment::isFamilyX86(arch))
|
if (Environment::isFamilyX86(arch))
|
||||||
return x86::InstInternal::queryFeatures(arch, inst, operands, opCount, out);
|
return x86::InstInternal::queryFeatures(arch, inst, operands, opCount, out);
|
||||||
#endif
|
#endif
|
||||||
@@ -135,5 +133,3 @@ Error InstAPI::queryFeatures(uint32_t arch, const BaseInst& inst, const Operand_
|
|||||||
#endif // !ASMJIT_NO_INTROSPECTION
|
#endif // !ASMJIT_NO_INTROSPECTION
|
||||||
|
|
||||||
ASMJIT_END_NAMESPACE
|
ASMJIT_END_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include "../core/assembler.h"
|
#include "../core/assembler.h"
|
||||||
#include "../core/codewriter_p.h"
|
#include "../core/codewriter_p.h"
|
||||||
@@ -5144,4 +5144,4 @@ Error Assembler::onDetach(CodeHolder* code) noexcept {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#if defined(ASMJIT_BUILD_X86) && !defined(ASMJIT_NO_BUILDER)
|
#if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_BUILDER)
|
||||||
|
|
||||||
#include "../x86/x86assembler.h"
|
#include "../x86/x86assembler.h"
|
||||||
#include "../x86/x86builder.h"
|
#include "../x86/x86builder.h"
|
||||||
@@ -65,4 +65,4 @@ Error Builder::onAttach(CodeHolder* code) noexcept {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86 && !ASMJIT_NO_BUILDER
|
#endif // !ASMJIT_NO_X86 && !ASMJIT_NO_BUILDER
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#if defined(ASMJIT_BUILD_X86) && !defined(ASMJIT_NO_COMPILER)
|
#if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_COMPILER)
|
||||||
|
|
||||||
#include "../x86/x86assembler.h"
|
#include "../x86/x86assembler.h"
|
||||||
#include "../x86/x86compiler.h"
|
#include "../x86/x86compiler.h"
|
||||||
@@ -74,4 +74,4 @@ Error Compiler::onAttach(CodeHolder* code) noexcept {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86 && !ASMJIT_NO_COMPILER
|
#endif // !ASMJIT_NO_X86 && !ASMJIT_NO_COMPILER
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include "../core/formatter.h"
|
#include "../core/formatter.h"
|
||||||
#include "../core/funcargscontext_p.h"
|
#include "../core/funcargscontext_p.h"
|
||||||
@@ -598,4 +598,4 @@ ASMJIT_FAVOR_SIZE Error EmitHelper::emitEpilog(const FuncFrame& frame) {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
|
|
||||||
#include "../core/cpuinfo.h"
|
#include "../core/cpuinfo.h"
|
||||||
#include "../core/support.h"
|
#include "../core/support.h"
|
||||||
@@ -449,4 +449,4 @@ ASMJIT_FAVOR_SIZE void detectCpu(CpuInfo& cpu) noexcept {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86 && ASMJIT_ARCH_X86
|
#endif // !ASMJIT_NO_X86 && ASMJIT_ARCH_X86
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include "../x86/x86func_p.h"
|
#include "../x86/x86func_p.h"
|
||||||
#include "../x86/x86emithelper_p.h"
|
#include "../x86/x86emithelper_p.h"
|
||||||
@@ -528,4 +528,4 @@ ASMJIT_FAVOR_SIZE Error initFuncDetail(FuncDetail& func, const FuncSignature& si
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include "../core/cpuinfo.h"
|
#include "../core/cpuinfo.h"
|
||||||
#include "../core/misc_p.h"
|
#include "../core/misc_p.h"
|
||||||
@@ -1670,4 +1670,4 @@ UNIT(x86_inst_api_text) {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include "../core/cpuinfo.h"
|
#include "../core/cpuinfo.h"
|
||||||
#include "../core/misc_p.h"
|
#include "../core/misc_p.h"
|
||||||
@@ -4216,4 +4216,4 @@ UNIT(x86_inst_db) {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include "../core/misc_p.h"
|
#include "../core/misc_p.h"
|
||||||
#include "../x86/x86operand.h"
|
#include "../x86/x86operand.h"
|
||||||
@@ -245,4 +245,4 @@ UNIT(x86_operand) {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include "../core/api-build_p.h"
|
#include "../core/api-build_p.h"
|
||||||
#if defined(ASMJIT_BUILD_X86) && !defined(ASMJIT_NO_COMPILER)
|
#if !defined(ASMJIT_NO_X86) && !defined(ASMJIT_NO_COMPILER)
|
||||||
|
|
||||||
#include "../core/cpuinfo.h"
|
#include "../core/cpuinfo.h"
|
||||||
#include "../core/support.h"
|
#include "../core/support.h"
|
||||||
@@ -1453,4 +1453,4 @@ Error X86RAPass::emitPreCall(InvokeNode* invokeNode) noexcept {
|
|||||||
|
|
||||||
ASMJIT_END_SUB_NAMESPACE
|
ASMJIT_END_SUB_NAMESPACE
|
||||||
|
|
||||||
#endif // ASMJIT_BUILD_X86 && !ASMJIT_NO_COMPILER
|
#endif // !ASMJIT_NO_X86 && !ASMJIT_NO_COMPILER
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
bool testX86Assembler(const TestSettings& settings) noexcept;
|
bool testX86Assembler(const TestSettings& settings) noexcept;
|
||||||
bool testX64Assembler(const TestSettings& settings) noexcept;
|
bool testX64Assembler(const TestSettings& settings) noexcept;
|
||||||
#endif
|
#endif
|
||||||
@@ -60,7 +60,7 @@ int main(int argc, char* argv[]) {
|
|||||||
bool x86Failed = false;
|
bool x86Failed = false;
|
||||||
bool x64Failed = false;
|
bool x64Failed = false;
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
if ((strcmp(arch, "all") == 0 || strcmp(arch, "x86") == 0))
|
if ((strcmp(arch, "all") == 0 || strcmp(arch, "x86") == 0))
|
||||||
x86Failed = !testX86Assembler(settings);
|
x86Failed = !testX86Assembler(settings);
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -8225,4 +8225,4 @@ bool testX64Assembler(const TestSettings& settings) noexcept {
|
|||||||
|
|
||||||
#undef TEST_INSTRUCTION
|
#undef TEST_INSTRUCTION
|
||||||
|
|
||||||
#endif
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
|
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -7670,4 +7670,4 @@ bool testX86Assembler(const TestSettings& settings) noexcept {
|
|||||||
|
|
||||||
#undef TEST_INSTRUCTION
|
#undef TEST_INSTRUCTION
|
||||||
|
|
||||||
#endif
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
#include "asmjit_test_compiler.h"
|
#include "asmjit_test_compiler.h"
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
void compiler_add_x86_tests(TestApp& app);
|
void compiler_add_x86_tests(TestApp& app);
|
||||||
#endif
|
#endif
|
||||||
@@ -46,7 +46,7 @@ void compiler_add_x86_tests(TestApp& app);
|
|||||||
void compiler_add_a64_tests(TestApp& app);
|
void compiler_add_a64_tests(TestApp& app);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
#define ASMJIT_HAVE_WORKING_JIT
|
#define ASMJIT_HAVE_WORKING_JIT
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ int TestApp::run() {
|
|||||||
if (_verbose) printf("\n");
|
if (_verbose) printf("\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
x86::Compiler cc(&code);
|
x86::Compiler cc(&code);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -254,7 +254,7 @@ int main(int argc, char* argv[]) {
|
|||||||
app.handleArgs(argc, argv);
|
app.handleArgs(argc, argv);
|
||||||
app.showInfo();
|
app.showInfo();
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
compiler_add_x86_tests(app);
|
compiler_add_x86_tests(app);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
// 3. This notice may not be removed or altered from any source distribution.
|
// 3. This notice may not be removed or altered from any source distribution.
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
|
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
@@ -4319,4 +4319,4 @@ void compiler_add_x86_tests(TestApp& app) {
|
|||||||
app.addT<X86Test_MiscUnfollow>();
|
app.addT<X86Test_MiscUnfollow>();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif // !ASMJIT_NO_X86 && ASMJIT_ARCH_X86
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -209,4 +209,4 @@ int main() {
|
|||||||
printf("AsmJit X86 Emitter Test is disabled on non-x86 host\n\n");
|
printf("AsmJit X86 Emitter Test is disabled on non-x86 host\n\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // !ASMJIT_NO_X86 && ASMJIT_ARCH_X86
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ static void printInfoExtra(uint32_t arch, uint32_t instId, uint32_t options, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void testX86Arch() {
|
static void testX86Arch() {
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
using namespace x86;
|
using namespace x86;
|
||||||
uint32_t arch = Environment::kArchX64;
|
uint32_t arch = Environment::kArchX64;
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
using namespace asmjit;
|
using namespace asmjit;
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
void benchmarkX86Emitters(uint32_t numIterations, bool testX86, bool testX64) noexcept;
|
void benchmarkX86Emitters(uint32_t numIterations, bool testX86, bool testX64) noexcept;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
const char* arch = cmdLine.valueOf("--arch", "all");
|
const char* arch = cmdLine.valueOf("--arch", "all");
|
||||||
|
|
||||||
#if defined(ASMJIT_BUILD_X86)
|
#if !defined(ASMJIT_NO_X86)
|
||||||
bool testX86 = strcmp(arch, "all") == 0 || strcmp(arch, "x86") == 0;
|
bool testX86 = strcmp(arch, "all") == 0 || strcmp(arch, "x86") == 0;
|
||||||
bool testX64 = strcmp(arch, "all") == 0 || strcmp(arch, "x64") == 0;
|
bool testX64 = strcmp(arch, "all") == 0 || strcmp(arch, "x64") == 0;
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
@@ -5046,4 +5046,5 @@ void benchmarkX86Emitters(uint32_t numIterations, bool testX86, bool testX64) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#endif // !ASMJIT_NO_X86
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ static void dumpSizeOf(void) noexcept {
|
|||||||
DUMP_TYPE(FuncArgsAssignment);
|
DUMP_TYPE(FuncArgsAssignment);
|
||||||
INFO("");
|
INFO("");
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_BUILDER
|
#if !defined(ASMJIT_NO_BUILDER)
|
||||||
INFO("Size of builder classes:");
|
INFO("Size of builder classes:");
|
||||||
DUMP_TYPE(BaseBuilder);
|
DUMP_TYPE(BaseBuilder);
|
||||||
DUMP_TYPE(BaseNode);
|
DUMP_TYPE(BaseNode);
|
||||||
@@ -160,7 +160,7 @@ static void dumpSizeOf(void) noexcept {
|
|||||||
INFO("");
|
INFO("");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#if !defined(ASMJIT_NO_COMPILER)
|
||||||
INFO("Size of compiler classes:");
|
INFO("Size of compiler classes:");
|
||||||
DUMP_TYPE(BaseCompiler);
|
DUMP_TYPE(BaseCompiler);
|
||||||
DUMP_TYPE(FuncNode);
|
DUMP_TYPE(FuncNode);
|
||||||
@@ -169,13 +169,13 @@ static void dumpSizeOf(void) noexcept {
|
|||||||
INFO("");
|
INFO("");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ASMJIT_BUILD_X86
|
#if !defined(ASMJIT_NO_X86)
|
||||||
INFO("Size of x86-specific classes:");
|
INFO("Size of x86-specific classes:");
|
||||||
DUMP_TYPE(x86::Assembler);
|
DUMP_TYPE(x86::Assembler);
|
||||||
#ifndef ASMJIT_NO_BUILDER
|
#if !defined(ASMJIT_NO_BUILDER)
|
||||||
DUMP_TYPE(x86::Builder);
|
DUMP_TYPE(x86::Builder);
|
||||||
#endif
|
#endif
|
||||||
#ifndef ASMJIT_NO_COMPILER
|
#if !defined(ASMJIT_NO_COMPILER)
|
||||||
DUMP_TYPE(x86::Compiler);
|
DUMP_TYPE(x86::Compiler);
|
||||||
#endif
|
#endif
|
||||||
DUMP_TYPE(x86::InstDB::InstInfo);
|
DUMP_TYPE(x86::InstDB::InstInfo);
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <asmjit/core.h>
|
#include <asmjit/core.h>
|
||||||
#if defined(ASMJIT_BUILD_X86) && ASMJIT_ARCH_X86
|
#if !defined(ASMJIT_NO_X86) && ASMJIT_ARCH_X86
|
||||||
|
|
||||||
#include <asmjit/x86.h>
|
#include <asmjit/x86.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@@ -182,4 +182,4 @@ int main() {
|
|||||||
printf("AsmJit X86 Sections Test is disabled on non-x86 host\n\n");
|
printf("AsmJit X86 Sections Test is disabled on non-x86 host\n\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // !ASMJIT_NO_X86 && ASMJIT_ARCH_X86
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CURRENT_DIR=`pwd`
|
CURRENT_DIR="`pwd`"
|
||||||
BUILD_DIR="build"
|
BUILD_DIR="${CURRENT_DIR}/../build"
|
||||||
BUILD_OPTIONS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"
|
BUILD_OPTIONS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"
|
||||||
|
|
||||||
echo "** Configuring ${BUILD_DIR}_dbg [Debug Build] **"
|
echo "== [Configuring Build - Debug] =="
|
||||||
mkdir -p ../${BUILD_DIR}_dbg
|
mkdir -p "${BUILD_DIR}/Debug"
|
||||||
cd ../${BUILD_DIR}_dbg
|
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Debug" -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS}
|
||||||
eval cmake .. -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS}
|
echo ""
|
||||||
cd ${CURRENT_DIR}
|
|
||||||
|
|
||||||
echo "** Configuring ${BUILD_DIR}_rel [Release Build] **"
|
echo "== [Configuring Build - Release] =="
|
||||||
mkdir -p ../${BUILD_DIR}_rel
|
mkdir -p "${BUILD_DIR}/Release"
|
||||||
cd ../${BUILD_DIR}_rel
|
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Release" -DCMAKE_BUILD_TYPE=Release ${BUILD_OPTIONS}
|
||||||
eval cmake .. -DCMAKE_BUILD_TYPE=Release ${BUILD_OPTIONS}
|
echo ""
|
||||||
cd ${CURRENT_DIR}
|
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CURRENT_DIR=`pwd`
|
CURRENT_DIR="`pwd`"
|
||||||
BUILD_DIR="build"
|
BUILD_DIR="${CURRENT_DIR}/../build"
|
||||||
BUILD_OPTIONS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"
|
BUILD_OPTIONS="-G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"
|
||||||
|
|
||||||
echo "** Configuring ${BUILD_DIR}_dbg [Debug Build] **"
|
echo "== [Configuring Build - Debug] =="
|
||||||
mkdir -p ../${BUILD_DIR}_dbg
|
mkdir -p "${BUILD_DIR}/Debug"
|
||||||
cd ../${BUILD_DIR}_dbg
|
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Debug" -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS}
|
||||||
eval cmake .. -G"Ninja" -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS}
|
echo ""
|
||||||
cd ${CURRENT_DIR}
|
|
||||||
|
|
||||||
echo "** Configuring ${BUILD_DIR}_rel [Release Build] **"
|
echo "== [Configuring Build - Release] =="
|
||||||
mkdir -p ../${BUILD_DIR}_rel
|
mkdir -p "${BUILD_DIR}/Release"
|
||||||
cd ../${BUILD_DIR}_rel
|
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Release" -DCMAKE_BUILD_TYPE=Release ${BUILD_OPTIONS}
|
||||||
eval cmake .. -G"Ninja" -DCMAKE_BUILD_TYPE=Release ${BUILD_OPTIONS}
|
echo ""
|
||||||
cd ${CURRENT_DIR}
|
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CURRENT_DIR=`pwd`
|
CURRENT_DIR="`pwd`"
|
||||||
BUILD_DIR="build"
|
BUILD_DIR="${CURRENT_DIR}/../build"
|
||||||
BUILD_OPTIONS="-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"
|
BUILD_OPTIONS="-G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"
|
||||||
|
|
||||||
echo "** Configuring '${BUILD_DIR}_rel_asan' [Sanitize=Address] **"
|
echo "== [Configuring Build - Release_ASAN] =="
|
||||||
mkdir -p ../${BUILD_DIR}_dbg_asan
|
mkdir -p "${BUILD_DIR}/Release_ASAN"
|
||||||
cd ../${BUILD_DIR}_dbg_asan
|
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Release_ASAN" ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DASMJIT_SANITIZE=address
|
||||||
eval cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} -DASMJIT_SANITIZE=address
|
echo ""
|
||||||
cd ${CURRENT_DIR}
|
|
||||||
|
|
||||||
echo "** Configuring '${BUILD_DIR}_rel_ubsan' [Sanitize=Undefined] **"
|
echo "== [Configuring Build - Release_UBSAN] =="
|
||||||
mkdir -p ../${BUILD_DIR}_dbg_ubsan
|
mkdir -p "${BUILD_DIR}/Release_UBSAN"
|
||||||
cd ../${BUILD_DIR}_dbg_ubsan
|
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}/Release_UBSAN" ${BUILD_OPTIONS} -DCMAKE_BUILD_TYPE=Release -DASMJIT_SANITIZE=undefined
|
||||||
eval cmake .. -GNinja -DCMAKE_BUILD_TYPE=Debug ${BUILD_OPTIONS} -DASMJIT_SANITIZE=undefined
|
echo ""
|
||||||
cd ${CURRENT_DIR}
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
BUILD_DIR="build_xcode"
|
CURRENT_DIR="`pwd`"
|
||||||
CURRENT_DIR=`pwd`
|
BUILD_DIR="${CURRENT_DIR}/../build"
|
||||||
|
BUILD_OPTIONS="-G Xcode -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DASMJIT_TEST=1"
|
||||||
|
|
||||||
mkdir -p ../${BUILD_DIR}
|
mkdir -p "${BUILD_DIR}"
|
||||||
cd ../${BUILD_DIR}
|
eval cmake "${CURRENT_DIR}/.." -B "${BUILD_DIR}" ${BUILD_OPTIONS}
|
||||||
cmake .. -G"Xcode" -DASMJIT_TEST=1
|
|
||||||
cd ${CURRENT_DIR}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user