From b81004bc992e22d5576fcfaaf5a0d88ff59700d4 Mon Sep 17 00:00:00 2001 From: kobalicek Date: Thu, 24 Mar 2016 03:26:41 +0100 Subject: [PATCH] [Bug] Fixed a bug in X86Compiler::getIntPtr() not promoting intptr to int32/int64. Minor changes. --- src/asmjit/base/podvector.h | 2 +- src/asmjit/base/zone.cpp | 2 +- src/asmjit/build.h | 4 ++-- src/asmjit/x86/x86compiler.h | 8 ++++++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/asmjit/base/podvector.h b/src/asmjit/base/podvector.h index 51aa8c8..7b23620 100644 --- a/src/asmjit/base/podvector.h +++ b/src/asmjit/base/podvector.h @@ -249,7 +249,7 @@ struct PodVectorTmp : public PodVector { }; // -------------------------------------------------------------------------- - // [Data] + // [Construction / Destruction] // -------------------------------------------------------------------------- //! Create a new instance of `PodVectorTmp`. diff --git a/src/asmjit/base/zone.cpp b/src/asmjit/base/zone.cpp index 1c7ceb9..e879269 100644 --- a/src/asmjit/base/zone.cpp +++ b/src/asmjit/base/zone.cpp @@ -159,7 +159,7 @@ char* Zone::sdup(const char* str) noexcept { if (len == 0) return nullptr; - // Include nullptr terminator and limit string length. + // Include NULL terminator and limit string length. if (++len > 256) len = 256; diff --git a/src/asmjit/build.h b/src/asmjit/build.h index 1e991c7..c525879 100644 --- a/src/asmjit/build.h +++ b/src/asmjit/build.h @@ -862,8 +862,8 @@ typedef unsigned __int64 uint64_t; #define ASMJIT_NO_COPY(...) \ private: \ - ASMJIT_INLINE __VA_ARGS__(const __VA_ARGS__& other); \ - ASMJIT_INLINE __VA_ARGS__& operator=(const __VA_ARGS__& other); \ + ASMJIT_INLINE __VA_ARGS__(const __VA_ARGS__& other) ASMJIT_NOEXCEPT; \ + ASMJIT_INLINE __VA_ARGS__& operator=(const __VA_ARGS__& other) ASMJIT_NOEXCEPT; \ public: // ============================================================================ diff --git a/src/asmjit/x86/x86compiler.h b/src/asmjit/x86/x86compiler.h index 84b83ef..41c5201 100644 --- a/src/asmjit/x86/x86compiler.h +++ b/src/asmjit/x86/x86compiler.h @@ -1013,7 +1013,9 @@ struct ASMJIT_VIRTAPI X86Compiler : public Compiler { \ type var(NoInit); \ \ + vType = _targetVarMapping[vType]; \ const VarInfo& vInfo = _x86VarInfo[vType]; \ + \ var._init_packed_op_sz_w0_id(Operand::kTypeVar, vInfo.getSize(), vInfo.getRegType() << 8, id); \ var._vreg.vType = vType; \ \ @@ -1035,9 +1037,11 @@ struct ASMJIT_VIRTAPI X86Compiler : public Compiler { ASMJIT_INLINE type get##func##ById(uint32_t id) { \ type var(NoInit); \ \ - const VarInfo& vInfo = _x86VarInfo[typeId]; \ + uint32_t vType = _targetVarMapping[typeId]; \ + const VarInfo& vInfo = _x86VarInfo[vType]; \ + \ var._init_packed_op_sz_w0_id(Operand::kTypeVar, vInfo.getSize(), vInfo.getRegType() << 8, id); \ - var._vreg.vType = typeId; \ + var._vreg.vType = vType; \ \ return var; \ } \