[Bug] Fixed a bug in X86Compiler::getIntPtr() not promoting intptr to int32/int64.

Minor changes.
This commit is contained in:
kobalicek
2016-03-24 03:26:41 +01:00
parent 185a96a46a
commit b81004bc99
4 changed files with 10 additions and 6 deletions

View File

@@ -249,7 +249,7 @@ struct PodVectorTmp : public PodVector<T> {
}; };
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// [Data] // [Construction / Destruction]
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
//! Create a new instance of `PodVectorTmp<T>`. //! Create a new instance of `PodVectorTmp<T>`.

View File

@@ -159,7 +159,7 @@ char* Zone::sdup(const char* str) noexcept {
if (len == 0) if (len == 0)
return nullptr; return nullptr;
// Include nullptr terminator and limit string length. // Include NULL terminator and limit string length.
if (++len > 256) if (++len > 256)
len = 256; len = 256;

View File

@@ -862,8 +862,8 @@ typedef unsigned __int64 uint64_t;
#define ASMJIT_NO_COPY(...) \ #define ASMJIT_NO_COPY(...) \
private: \ private: \
ASMJIT_INLINE __VA_ARGS__(const __VA_ARGS__& other); \ ASMJIT_INLINE __VA_ARGS__(const __VA_ARGS__& other) ASMJIT_NOEXCEPT; \
ASMJIT_INLINE __VA_ARGS__& operator=(const __VA_ARGS__& other); \ ASMJIT_INLINE __VA_ARGS__& operator=(const __VA_ARGS__& other) ASMJIT_NOEXCEPT; \
public: public:
// ============================================================================ // ============================================================================

View File

@@ -1013,7 +1013,9 @@ struct ASMJIT_VIRTAPI X86Compiler : public Compiler {
\ \
type var(NoInit); \ type var(NoInit); \
\ \
vType = _targetVarMapping[vType]; \
const VarInfo& vInfo = _x86VarInfo[vType]; \ const VarInfo& vInfo = _x86VarInfo[vType]; \
\
var._init_packed_op_sz_w0_id(Operand::kTypeVar, vInfo.getSize(), vInfo.getRegType() << 8, id); \ var._init_packed_op_sz_w0_id(Operand::kTypeVar, vInfo.getSize(), vInfo.getRegType() << 8, id); \
var._vreg.vType = vType; \ var._vreg.vType = vType; \
\ \
@@ -1035,9 +1037,11 @@ struct ASMJIT_VIRTAPI X86Compiler : public Compiler {
ASMJIT_INLINE type get##func##ById(uint32_t id) { \ ASMJIT_INLINE type get##func##ById(uint32_t id) { \
type var(NoInit); \ 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._init_packed_op_sz_w0_id(Operand::kTypeVar, vInfo.getSize(), vInfo.getRegType() << 8, id); \
var._vreg.vType = typeId; \ var._vreg.vType = vType; \
\ \
return var; \ return var; \
} \ } \