From c8cff8b16eaea1c75d83bb689a060194f8a449cc Mon Sep 17 00:00:00 2001 From: kobalicekp Date: Sun, 9 Feb 2014 13:39:01 +0100 Subject: [PATCH] Minor. --- src/asmjit/base/assembler.h | 4 +- src/asmjit/base/compiler.h | 4 +- src/asmjit/base/defs.h | 28 +++++----- src/asmjit/base/globals.h | 27 +++++----- src/asmjit/base/string.h | 4 +- src/asmjit/build.h | 22 ++++---- src/asmjit/x86/x86compiler.h | 10 ++-- src/asmjit/x86/x86defs.cpp | 6 +-- src/asmjit/x86/x86defs.h | 100 +++++++++++++++++------------------ 9 files changed, 101 insertions(+), 104 deletions(-) diff --git a/src/asmjit/base/assembler.h b/src/asmjit/base/assembler.h index f409fbf..9648d12 100644 --- a/src/asmjit/base/assembler.h +++ b/src/asmjit/base/assembler.h @@ -318,7 +318,7 @@ struct BaseAssembler : public CodeGen { //! @brief Create and return new label. ASMJIT_INLINE Label newLabel() { - Label result(DontInitialize); + Label result(NoInit); _newLabel(&result); return result; } @@ -463,7 +463,7 @@ struct BaseAssembler : public CodeGen { // [Defined-Later] // ============================================================================ -ASMJIT_INLINE Label::Label(BaseAssembler& a) : Operand(DontInitialize) { +ASMJIT_INLINE Label::Label(BaseAssembler& a) : Operand(NoInit) { a._newLabel(this); } diff --git a/src/asmjit/base/compiler.h b/src/asmjit/base/compiler.h index 1b6fdb9..7896f81 100644 --- a/src/asmjit/base/compiler.h +++ b/src/asmjit/base/compiler.h @@ -1792,7 +1792,7 @@ struct BaseCompiler : public CodeGen { //! @brief Create and return new label. ASMJIT_INLINE Label newLabel() { - Label result(DontInitialize); + Label result(NoInit); _newLabel(&result); return result; } @@ -1958,7 +1958,7 @@ struct BaseCompiler : public CodeGen { // [Defined-Later] // ============================================================================ -ASMJIT_INLINE Label::Label(BaseCompiler& c) : Operand(DontInitialize) { +ASMJIT_INLINE Label::Label(BaseCompiler& c) : Operand(NoInit) { c._newLabel(this); } diff --git a/src/asmjit/base/defs.h b/src/asmjit/base/defs.h index 0c50e14..c9070ff 100644 --- a/src/asmjit/base/defs.h +++ b/src/asmjit/base/defs.h @@ -406,7 +406,7 @@ struct Operand { _init(other); } - explicit ASMJIT_INLINE Operand(const _DontInitialize&) {} + explicit ASMJIT_INLINE Operand(const _NoInit&) {} // -------------------------------------------------------------------------- // [Operand] @@ -601,17 +601,17 @@ struct BaseReg : public Operand { // -------------------------------------------------------------------------- //! @brief Create a dummy base register. - ASMJIT_INLINE BaseReg() : Operand(DontInitialize) + ASMJIT_INLINE BaseReg() : Operand(NoInit) { _init_packed_op_sz_w0_id(kOperandTypeReg, 0, (kInvalidReg << 8) + kInvalidReg, kInvalidValue); } //! @brief Create a new base register. - ASMJIT_INLINE BaseReg(uint32_t type, uint32_t index, uint32_t size) : Operand(DontInitialize) + ASMJIT_INLINE BaseReg(uint32_t type, uint32_t index, uint32_t size) : Operand(NoInit) { _init_packed_op_sz_w0_id(kOperandTypeReg, size, (type << 8) + index, kInvalidValue); } //! @brief Create a new reference to @a other. ASMJIT_INLINE BaseReg(const BaseReg& other) : Operand(other) {} - explicit ASMJIT_INLINE BaseReg(const _DontInitialize&) : Operand(DontInitialize) {} + explicit ASMJIT_INLINE BaseReg(const _NoInit&) : Operand(NoInit) {} // -------------------------------------------------------------------------- // [BaseReg Specific] @@ -704,12 +704,12 @@ struct BaseMem : public Operand { // [Construction / Destruction] // -------------------------------------------------------------------------- - ASMJIT_INLINE BaseMem() : Operand(DontInitialize) { + ASMJIT_INLINE BaseMem() : Operand(NoInit) { reset(); } ASMJIT_INLINE BaseMem(const BaseMem& other) : Operand(other) {} - explicit ASMJIT_INLINE BaseMem(const _DontInitialize&) : Operand(DontInitialize) {} + explicit ASMJIT_INLINE BaseMem(const _NoInit&) : Operand(NoInit) {} // -------------------------------------------------------------------------- // [BaseMem Specific] @@ -779,14 +779,14 @@ struct BaseVar : public Operand { // [Construction / Destruction] // -------------------------------------------------------------------------- - ASMJIT_INLINE BaseVar() : Operand(DontInitialize) { + ASMJIT_INLINE BaseVar() : Operand(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeVar, 0, 0, 0, kInvalidValue); _init_packed_d2_d3(kInvalidValue, kInvalidValue); } ASMJIT_INLINE BaseVar(const BaseVar& other) : Operand(other) {} - explicit ASMJIT_INLINE BaseVar(const _DontInitialize&) : Operand(DontInitialize) {} + explicit ASMJIT_INLINE BaseVar(const _NoInit&) : Operand(NoInit) {} // -------------------------------------------------------------------------- // [BaseVar Specific] @@ -831,13 +831,13 @@ struct Imm : public Operand { // -------------------------------------------------------------------------- //! @brief Create a new immediate value (initial value is 0). - Imm() : Operand(DontInitialize) { + Imm() : Operand(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeImm, 0, 0, 0, kInvalidValue); _imm.value._i64[0] = 0; } //! @brief Create a new signed immediate value, assigning the value to @a val. - explicit Imm(int64_t val) : Operand(DontInitialize) { + explicit Imm(int64_t val) : Operand(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeImm, 0, 0, 0, kInvalidValue); _imm.value._i64[0] = val; } @@ -845,7 +845,7 @@ struct Imm : public Operand { //! @brief Create a new immediate value from @a other. ASMJIT_INLINE Imm(const Imm& other) : Operand(other) {} - explicit ASMJIT_INLINE Imm(const _DontInitialize&) : Operand(DontInitialize) {} + explicit ASMJIT_INLINE Imm(const _NoInit&) : Operand(NoInit) {} // -------------------------------------------------------------------------- // [Immediate Specific] @@ -1113,12 +1113,12 @@ struct Label : public Operand { // -------------------------------------------------------------------------- //! @brief Create new, unassociated label. - ASMJIT_INLINE Label() : Operand(DontInitialize) { + ASMJIT_INLINE Label() : Operand(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeLabel, 0, 0, 0, kInvalidValue); _init_packed_d2_d3(0, 0); } - explicit ASMJIT_INLINE Label(uint32_t id) : Operand(DontInitialize) { + explicit ASMJIT_INLINE Label(uint32_t id) : Operand(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeLabel, 0, 0, 0, id); _init_packed_d2_d3(0, 0); } @@ -1131,7 +1131,7 @@ struct Label : public Operand { //! @brief Create reference to another label. ASMJIT_INLINE Label(const Label& other) : Operand(other) {} - explicit ASMJIT_INLINE Label(const _DontInitialize&) : Operand(DontInitialize) {} + explicit ASMJIT_INLINE Label(const _NoInit&) : Operand(NoInit) {} // -------------------------------------------------------------------------- // [Operator Overload] diff --git a/src/asmjit/base/globals.h b/src/asmjit/base/globals.h index 6ea0515..68093d3 100644 --- a/src/asmjit/base/globals.h +++ b/src/asmjit/base/globals.h @@ -20,10 +20,12 @@ namespace asmjit { //! @{ // ============================================================================ -// [asmjit::kGlobal] +// [asmjit::kGlobals] // ============================================================================ -ASMJIT_ENUM(kGlobal) { +static const size_t kInvalidIndex = ~static_cast(0); + +ASMJIT_ENUM(kGlobals) { //! @brief Invalid operand id. kInvalidValue = 0xFFFFFFFF, @@ -38,10 +40,11 @@ ASMJIT_ENUM(kGlobal) { //! @brief Memory grow threshold. //! - //! If the grow threshold is reached capacity is not doubled anymore. + //! After the grow threshold is reached the capacity won't be doubled + //! anymore. kMemAllocGrowMax = 8192 * 1024, - //! @brief An overhead of the host memory allocator. + //! @brief Host memory allocator overhead. //! //! We decrement the overhead from our pools so the host operating system //! doesn't need allocate an extra virtual page to put the data it needs @@ -51,8 +54,6 @@ ASMJIT_ENUM(kGlobal) { kMemAllocOverhead = sizeof(intptr_t) * 4, }; -static const size_t kInvalidIndex = ~static_cast(0); - // ============================================================================ // [asmjit::kArch] // ============================================================================ @@ -87,18 +88,14 @@ ASMJIT_ENUM(kArch) { }; // ============================================================================ -// [asmjit::_Initialize] +// [asmjit::Init / NoInit] // ============================================================================ -struct _Initialize {}; -static const _Initialize Initialize = {}; +struct _Init {}; +static const _Init Init = {}; -// ============================================================================ -// [asmjit::_DontInitialize] -// ============================================================================ - -struct _DontInitialize {}; -static const _DontInitialize DontInitialize = {}; +struct _NoInit {}; +static const _NoInit NoInit = {}; //! @} diff --git a/src/asmjit/base/string.h b/src/asmjit/base/string.h index 831e3e2..c4f3c2e 100644 --- a/src/asmjit/base/string.h +++ b/src/asmjit/base/string.h @@ -84,7 +84,7 @@ struct StringBuilder { ASMJIT_API StringBuilder(); ASMJIT_API ~StringBuilder(); - ASMJIT_INLINE StringBuilder(const _DontInitialize&) {} + ASMJIT_INLINE StringBuilder(const _NoInit&) {} // -------------------------------------------------------------------------- // [Accessors] @@ -323,7 +323,7 @@ struct StringBuilderT : public StringBuilder { // [Construction / Destruction] // -------------------------------------------------------------------------- - ASMJIT_INLINE StringBuilderT() : StringBuilder(DontInitialize) { + ASMJIT_INLINE StringBuilderT() : StringBuilder(NoInit) { _data = _embeddedData; _data[0] = 0; diff --git a/src/asmjit/build.h b/src/asmjit/build.h index f439317..d2c402d 100644 --- a/src/asmjit/build.h +++ b/src/asmjit/build.h @@ -13,7 +13,7 @@ #include "config.h" #endif // !ASMJIT_CONFIG_FILE -// Turn of deprecation warnings for this compiler when compiling AsmJit. +// Turn off deprecation warnings when compiling AsmJit. #if defined(ASMJIT_EXPORTS) && defined(_MSC_VER) # if !defined(_CRT_SECURE_NO_DEPRECATE) # define _CRT_SECURE_NO_DEPRECATE @@ -172,16 +172,6 @@ #define ASMJIT_ARRAY_SIZE(_Array_) (sizeof(_Array_) / sizeof(*_Array_)) -// ============================================================================ -// [asmjit::build - ASMJIT_NO_COPY] -// ============================================================================ - -#define ASMJIT_NO_COPY(_Type_) \ -private: \ - ASMJIT_INLINE _Type_(const _Type_& other); \ - ASMJIT_INLINE _Type_& operator=(const _Type_& other); \ -public: - // ============================================================================ // [asmjit::build - ASMJIT_DEBUG] // ============================================================================ @@ -211,6 +201,16 @@ public: # define ASMJIT_NOP() ((void)0) #endif // ASMJIT_NOP +// ============================================================================ +// [asmjit::build - ASMJIT_NO_COPY] +// ============================================================================ + +#define ASMJIT_NO_COPY(_Type_) \ +private: \ + ASMJIT_INLINE _Type_(const _Type_& other); \ + ASMJIT_INLINE _Type_& operator=(const _Type_& other); \ +public: + // ============================================================================ // [asmjit::build - StdInt] // ============================================================================ diff --git a/src/asmjit/x86/x86compiler.h b/src/asmjit/x86/x86compiler.h index f122fa7..5cd2d64 100644 --- a/src/asmjit/x86/x86compiler.h +++ b/src/asmjit/x86/x86compiler.h @@ -1387,7 +1387,7 @@ struct X86X64Compiler : public BaseCompiler { ASMJIT_ASSERT(vType < kVarTypeCount); ASMJIT_ASSERT(IntUtil::inInterval(vType, _kVarTypeIntStart, _kVarTypeIntEnd)); - GpVar var(DontInitialize); + GpVar var(NoInit); _newVar(&var, vType, name); return var; } @@ -1397,7 +1397,7 @@ struct X86X64Compiler : public BaseCompiler { ASMJIT_ASSERT(vType < kVarTypeCount); ASMJIT_ASSERT(IntUtil::inInterval(vType, _kVarTypeMmStart, _kVarTypeMmEnd)); - MmVar var(DontInitialize); + MmVar var(NoInit); _newVar(&var, vType, name); return var; } @@ -1407,7 +1407,7 @@ struct X86X64Compiler : public BaseCompiler { ASMJIT_ASSERT(vType < kVarTypeCount); ASMJIT_ASSERT(IntUtil::inInterval(vType, _kVarTypeXmmStart, _kVarTypeXmmEnd)); - XmmVar var(DontInitialize); + XmmVar var(NoInit); _newVar(&var, vType, name); return var; } @@ -1417,7 +1417,7 @@ struct X86X64Compiler : public BaseCompiler { ASMJIT_ASSERT(vType < kVarTypeCount); ASMJIT_ASSERT(IntUtil::inInterval(vType, _kVarTypeYmmStart, _kVarTypeYmmEnd)); - YmmVar var(DontInitialize); + YmmVar var(NoInit); _newVar(&var, vType, name); return var; } @@ -1458,7 +1458,7 @@ struct X86X64Compiler : public BaseCompiler { //! @brief Create a new memory chunk allocated on the stack. ASMJIT_INLINE Mem newStack(uint32_t size, uint32_t alignment, const char* name = NULL) { - Mem m(DontInitialize); + Mem m(NoInit); _newStack(&m, size, alignment, name); return m; } diff --git a/src/asmjit/x86/x86defs.cpp b/src/asmjit/x86/x86defs.cpp index aad862e..2fe46e4 100644 --- a/src/asmjit/x86/x86defs.cpp +++ b/src/asmjit/x86/x86defs.cpp @@ -3134,7 +3134,7 @@ const SegReg gs(kRegTypeSeg, kSegGs, 2); // ============================================================================ Mem ptr_abs(Ptr pAbs, int32_t disp, uint32_t size) { - Mem m(DontInitialize); + Mem m(NoInit); m._init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeAbsolute, 0, kInvalidValue); m._vmem.index = kInvalidValue; @@ -3144,7 +3144,7 @@ Mem ptr_abs(Ptr pAbs, int32_t disp, uint32_t size) { } Mem ptr_abs(Ptr pAbs, const X86Reg& index, uint32_t shift, int32_t disp, uint32_t size) { - Mem m(DontInitialize); + Mem m(NoInit); uint32_t flags = shift << kMemShiftIndex; if (index.isXmm()) flags |= kMemVSibXmm << kMemVSibIndex; @@ -3158,7 +3158,7 @@ Mem ptr_abs(Ptr pAbs, const X86Reg& index, uint32_t shift, int32_t disp, uint32_ } Mem ptr_abs(Ptr pAbs, const X86Var& index, uint32_t shift, int32_t disp, uint32_t size) { - Mem m(DontInitialize); + Mem m(NoInit); uint32_t flags = shift << kMemShiftIndex; if (index.isXmm()) flags |= kMemVSibXmm << kMemVSibIndex; diff --git a/src/asmjit/x86/x86defs.h b/src/asmjit/x86/x86defs.h index 5507ec9..c83f50e 100644 --- a/src/asmjit/x86/x86defs.h +++ b/src/asmjit/x86/x86defs.h @@ -2241,7 +2241,7 @@ struct X86Reg : public BaseReg { //! @brief Create a reference to @a other X86 register. ASMJIT_INLINE X86Reg(const X86Reg& other) : BaseReg(other) {} //! @brief Create non-initialized X86 register. - explicit ASMJIT_INLINE X86Reg(const _DontInitialize&) : BaseReg(DontInitialize) {} + explicit ASMJIT_INLINE X86Reg(const _NoInit&) : BaseReg(NoInit) {} // -------------------------------------------------------------------------- // [X86Reg Specific] @@ -2294,7 +2294,7 @@ struct GpReg : public X86Reg { //! @brief Create a custom Gp register. ASMJIT_INLINE GpReg(uint32_t type, uint32_t index, uint32_t size) : X86Reg(type, index, size) {} //! @brief Create non-initialized Gp register. - explicit ASMJIT_INLINE GpReg(const _DontInitialize&) : X86Reg(DontInitialize) {} + explicit ASMJIT_INLINE GpReg(const _NoInit&) : X86Reg(NoInit) {} // -------------------------------------------------------------------------- // [GpReg Specific] @@ -2320,7 +2320,7 @@ struct FpReg : public X86Reg { //! @brief Create a custom Fp register. ASMJIT_INLINE FpReg(uint32_t type, uint32_t index, uint32_t size) : X86Reg(type, index, size) {} //! @brief Create non-initialized Fp register. - explicit ASMJIT_INLINE FpReg(const _DontInitialize&) : X86Reg(DontInitialize) {} + explicit ASMJIT_INLINE FpReg(const _NoInit&) : X86Reg(NoInit) {} // -------------------------------------------------------------------------- // [FpReg Specific] @@ -2346,7 +2346,7 @@ struct MmReg : public X86Reg { //! @brief Create a custom Mm register. ASMJIT_INLINE MmReg(uint32_t type, uint32_t index, uint32_t size) : X86Reg(type, index, size) {} //! @brief Create non-initialized Mm register. - explicit ASMJIT_INLINE MmReg(const _DontInitialize&) : X86Reg(DontInitialize) {} + explicit ASMJIT_INLINE MmReg(const _NoInit&) : X86Reg(NoInit) {} // -------------------------------------------------------------------------- // [MmReg Specific] @@ -2372,7 +2372,7 @@ struct XmmReg : public X86Reg { //! @brief Create a custom Xmm register. ASMJIT_INLINE XmmReg(uint32_t type, uint32_t index, uint32_t size) : X86Reg(type, index, size) {} //! @brief Create non-initialized Xmm register. - explicit ASMJIT_INLINE XmmReg(const _DontInitialize&) : X86Reg(DontInitialize) {} + explicit ASMJIT_INLINE XmmReg(const _NoInit&) : X86Reg(NoInit) {} // -------------------------------------------------------------------------- // [XmmReg Specific] @@ -2398,7 +2398,7 @@ struct YmmReg : public X86Reg { //! @brief Create a custom Ymm register. ASMJIT_INLINE YmmReg(uint32_t type, uint32_t index, uint32_t size) : X86Reg(type, index, size) {} //! @brief Create non-initialized Ymm register. - explicit ASMJIT_INLINE YmmReg(const _DontInitialize&) : X86Reg(DontInitialize) {} + explicit ASMJIT_INLINE YmmReg(const _NoInit&) : X86Reg(NoInit) {} // -------------------------------------------------------------------------- // [YmmReg Specific] @@ -2424,7 +2424,7 @@ struct SegReg : public X86Reg { //! @brief Create a custom segment register. ASMJIT_INLINE SegReg(uint32_t type, uint32_t index, uint32_t size) : X86Reg(type, index, size) {} //! @brief Create non-initialized segment register. - explicit ASMJIT_INLINE SegReg(const _DontInitialize&) : X86Reg(DontInitialize) {} + explicit ASMJIT_INLINE SegReg(const _NoInit&) : X86Reg(NoInit) {} // -------------------------------------------------------------------------- // [SegReg Specific] @@ -2445,16 +2445,16 @@ struct Mem : public BaseMem { // [Construction / Destruction] // -------------------------------------------------------------------------- - ASMJIT_INLINE Mem() : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem() : BaseMem(NoInit) { reset(); } - ASMJIT_INLINE Mem(const Label& label, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const Label& label, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeLabel, 0, label._base.id); _init_packed_d2_d3(kInvalidValue, disp); } - ASMJIT_INLINE Mem(const Label& label, const GpReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const Label& label, const GpReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeLabel, @@ -2465,7 +2465,7 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const Label& label, const GpVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const Label& label, const GpVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeLabel, @@ -2476,7 +2476,7 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const GpReg& base, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpReg& base, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, _getGpdFlags(base) + (kMemVSibGpz << kMemVSibIndex), @@ -2484,7 +2484,7 @@ struct Mem : public BaseMem { _init_packed_d2_d3(kInvalidValue, disp); } - ASMJIT_INLINE Mem(const GpReg& base, const GpReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpReg& base, const GpReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, @@ -2494,7 +2494,7 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const GpReg& base, const XmmReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpReg& base, const XmmReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, @@ -2506,7 +2506,7 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const GpReg& base, const YmmReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpReg& base, const YmmReg& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, @@ -2518,7 +2518,7 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const GpVar& base, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpVar& base, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, _getGpdFlags(reinterpret_cast(base)) + (kMemVSibGpz << kMemVSibIndex), @@ -2527,7 +2527,7 @@ struct Mem : public BaseMem { } - ASMJIT_INLINE Mem(const GpVar& base, const GpVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpVar& base, const GpVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, @@ -2538,7 +2538,7 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const GpVar& base, const XmmVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpVar& base, const XmmVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, @@ -2550,7 +2550,7 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const GpVar& base, const YmmVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const GpVar& base, const YmmVar& index, uint32_t shift, int32_t disp, uint32_t size = 0) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, kMemTypeBaseIndex, @@ -2562,13 +2562,13 @@ struct Mem : public BaseMem { _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const _Initialize&, uint32_t memType, const X86Var& base, int32_t disp, uint32_t size) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const _Init&, uint32_t memType, const X86Var& base, int32_t disp, uint32_t size) : BaseMem(NoInit) { _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, memType, 0, _OP_ID(base)); _vmem.index = kInvalidValue; _vmem.displacement = disp; } - ASMJIT_INLINE Mem(const _Initialize&, uint32_t memType, const X86Var& base, const GpVar& index, uint32_t shift, int32_t disp, uint32_t size) : BaseMem(DontInitialize) { + ASMJIT_INLINE Mem(const _Init&, uint32_t memType, const X86Var& base, const GpVar& index, uint32_t shift, int32_t disp, uint32_t size) : BaseMem(NoInit) { ASMJIT_ASSERT(shift <= 3); _init_packed_op_sz_b0_b1_id(kOperandTypeMem, size, memType, shift << kMemShiftIndex, _OP_ID(base)); @@ -2577,7 +2577,7 @@ struct Mem : public BaseMem { } ASMJIT_INLINE Mem(const Mem& other) : BaseMem(other) {} - explicit ASMJIT_INLINE Mem(const _DontInitialize&) : BaseMem(DontInitialize) {} + explicit ASMJIT_INLINE Mem(const _NoInit&) : BaseMem(NoInit) {} // -------------------------------------------------------------------------- // [Mem Specific] @@ -2884,13 +2884,13 @@ struct X86Var : public BaseVar { // [Construction / Destruction] // -------------------------------------------------------------------------- - ASMJIT_INLINE X86Var() : BaseVar(DontInitialize) { + ASMJIT_INLINE X86Var() : BaseVar(NoInit) { reset(); } ASMJIT_INLINE X86Var(const X86Var& other) : BaseVar(other) {} - explicit ASMJIT_INLINE X86Var(const _DontInitialize&) : BaseVar(DontInitialize) {} + explicit ASMJIT_INLINE X86Var(const _NoInit&) : BaseVar(NoInit) {} // -------------------------------------------------------------------------- // [X86Var Specific] @@ -2947,67 +2947,67 @@ struct X86Var : public BaseVar { //! @note Size of operand depends on native variable type, you can use other //! variants if you want specific one. ASMJIT_INLINE Mem m(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, getSize()); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, getSize()); } //! @overload ASMJIT_INLINE Mem m(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, getSize()); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, getSize()); } //! @brief Cast this variable to 8-bit memory operand. ASMJIT_INLINE Mem m8(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, 1); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, 1); } //! @overload ASMJIT_INLINE Mem m8(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, 1); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, 1); } //! @brief Cast this variable to 16-bit memory operand. ASMJIT_INLINE Mem m16(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, 2); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, 2); } //! @overload ASMJIT_INLINE Mem m16(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, 2); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, 2); } //! @brief Cast this variable to 32-bit memory operand. ASMJIT_INLINE Mem m32(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, 4); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, 4); } //! @overload ASMJIT_INLINE Mem m32(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, 4); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, 4); } //! @brief Cast this variable to 64-bit memory operand. ASMJIT_INLINE Mem m64(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, 8); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, 8); } //! @overload ASMJIT_INLINE Mem m64(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, 8); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, 8); } //! @brief Cast this variable to 80-bit memory operand (long double). ASMJIT_INLINE Mem m80(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, 10); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, 10); } //! @overload ASMJIT_INLINE Mem m80(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, 10); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, 10); } //! @brief Cast this variable to 128-bit memory operand. ASMJIT_INLINE Mem m128(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, 16); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, 16); } //! @overload ASMJIT_INLINE Mem m128(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, 16); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, 16); } //! @brief Cast this variable to 256-bit memory operand. ASMJIT_INLINE Mem m256(int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, disp, 32); } + { return Mem(Init, kMemTypeStackIndex, *this, disp, 32); } //! @overload ASMJIT_INLINE Mem m256(const GpVar& index, uint32_t shift = 0, int32_t disp = 0) const - { return Mem(Initialize, kMemTypeStackIndex, *this, index, shift, disp, 32); } + { return Mem(Init, kMemTypeStackIndex, *this, index, shift, disp, 32); } // -------------------------------------------------------------------------- // [Operator Overload] @@ -3023,7 +3023,7 @@ struct X86Var : public BaseVar { // -------------------------------------------------------------------------- protected: - ASMJIT_INLINE X86Var(const X86Var& other, uint32_t reg, uint32_t size) : BaseVar(DontInitialize) + ASMJIT_INLINE X86Var(const X86Var& other, uint32_t reg, uint32_t size) : BaseVar(NoInit) { _init_packed_op_sz_w0_id(kOperandTypeVar, size, (reg << 8) + other._vreg.index, other._base.id); _vreg.vType = other._vreg.vType; @@ -3044,7 +3044,7 @@ struct GpVar : public X86Var { ASMJIT_INLINE GpVar() : X86Var() {} //! @brief Create new initialized @c GpVar instance. - ASMJIT_INLINE GpVar(BaseCompiler& c, uint32_t type = kVarTypeIntPtr, const char* name = NULL) : X86Var(DontInitialize) { + ASMJIT_INLINE GpVar(BaseCompiler& c, uint32_t type = kVarTypeIntPtr, const char* name = NULL) : X86Var(NoInit) { c._newVar(this, type, name); } @@ -3056,7 +3056,7 @@ struct GpVar : public X86Var { ASMJIT_INLINE GpVar(const GpVar& other) : X86Var(other) {} //! @brief Create new uninitialized @c GpVar instance (internal). - explicit ASMJIT_INLINE GpVar(const _DontInitialize&) : X86Var(DontInitialize) {} + explicit ASMJIT_INLINE GpVar(const _NoInit&) : X86Var(NoInit) {} // -------------------------------------------------------------------------- // [GpVar Specific] @@ -3122,7 +3122,7 @@ struct FpVar : public X86Var { ASMJIT_INLINE FpVar(const FpVar& other) : X86Var(other) {} //! @brief Create new uninitialized @c FpVar instance (internal). - explicit ASMJIT_INLINE FpVar(const _DontInitialize&) : X86Var(DontInitialize) {} + explicit ASMJIT_INLINE FpVar(const _NoInit&) : X86Var(NoInit) {} // -------------------------------------------------------------------------- // [FpVar Specific] @@ -3161,7 +3161,7 @@ struct MmVar : public X86Var { //! @brief Create new uninitialized @c MmVar instance. ASMJIT_INLINE MmVar() : X86Var() {} //! @brief Create new initialized @c MmVar instance. - ASMJIT_INLINE MmVar(BaseCompiler& c, uint32_t type = kVarTypeMm, const char* name = NULL) : X86Var(DontInitialize) { + ASMJIT_INLINE MmVar(BaseCompiler& c, uint32_t type = kVarTypeMm, const char* name = NULL) : X86Var(NoInit) { c._newVar(this, type, name); } @@ -3173,7 +3173,7 @@ struct MmVar : public X86Var { ASMJIT_INLINE MmVar(const MmVar& other) : X86Var(other) {} //! @brief Create new uninitialized @c MmVar instance (internal). - explicit ASMJIT_INLINE MmVar(const _DontInitialize&) : X86Var(DontInitialize) {} + explicit ASMJIT_INLINE MmVar(const _NoInit&) : X86Var(NoInit) {} // -------------------------------------------------------------------------- // [MmVar Specific] @@ -3212,14 +3212,14 @@ struct XmmVar : public X86Var { //! @brief Create new uninitialized @c XmmVar instance. ASMJIT_INLINE XmmVar() : X86Var() {} //! @brief Create new initialized @c XmmVar instance. - ASMJIT_INLINE XmmVar(BaseCompiler& c, uint32_t type = kVarTypeXmm, const char* name = NULL) : X86Var(DontInitialize) { + ASMJIT_INLINE XmmVar(BaseCompiler& c, uint32_t type = kVarTypeXmm, const char* name = NULL) : X86Var(NoInit) { c._newVar(this, type, name); } ASMJIT_INLINE XmmVar(const XmmVar& other) : X86Var(other) {} //! @brief Create new uninitialized @c XmmVar instance (internal). - explicit ASMJIT_INLINE XmmVar(const _DontInitialize&) : X86Var(DontInitialize) {} + explicit ASMJIT_INLINE XmmVar(const _NoInit&) : X86Var(NoInit) {} // -------------------------------------------------------------------------- // [XmmVar Specific] @@ -3258,14 +3258,14 @@ struct YmmVar : public X86Var { //! @brief Create new uninitialized @c YmmVar instance. ASMJIT_INLINE YmmVar() : X86Var() {} //! @brief Create new initialized @c YmmVar instance. - ASMJIT_INLINE YmmVar(BaseCompiler& c, uint32_t type = kVarTypeYmm, const char* name = NULL) : X86Var(DontInitialize) { + ASMJIT_INLINE YmmVar(BaseCompiler& c, uint32_t type = kVarTypeYmm, const char* name = NULL) : X86Var(NoInit) { c._newVar(this, type, name); } ASMJIT_INLINE YmmVar(const YmmVar& other) : X86Var(other) {} //! @brief Create new uninitialized @c YmmVar instance (internal). - explicit ASMJIT_INLINE YmmVar(const _DontInitialize&) : X86Var(DontInitialize) {} + explicit ASMJIT_INLINE YmmVar(const _NoInit&) : X86Var(NoInit) {} // -------------------------------------------------------------------------- // [YmmVar Specific]