mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-17 12:34:35 +03:00
64-bit GP register/variable is now forbidden in 32-bit mode. (Issue #26).
This commit is contained in:
@@ -507,9 +507,11 @@ Error X86X64Compiler::_newVar(BaseVar* var, uint32_t vType, const char* name) {
|
||||
ASMJIT_ASSERT(vType < kVarTypeCount);
|
||||
|
||||
vType = _targetVarMapping[vType];
|
||||
const VarInfo& vInfo = _varInfo[vType];
|
||||
ASMJIT_ASSERT(vType != kVarTypeInvalid);
|
||||
|
||||
const VarInfo& vInfo = _varInfo[vType];
|
||||
VarData* vd = _newVd(vType, vInfo.getSize(), vInfo.getClass(), name);
|
||||
|
||||
if (vd == NULL) {
|
||||
static_cast<X86Var*>(var)->reset();
|
||||
return getError();
|
||||
|
||||
@@ -3191,8 +3191,8 @@ const uint8_t _varMapping[kVarTypeCount] = {
|
||||
/* 03: kVarTypeUInt16 */ kVarTypeUInt16,
|
||||
/* 04: kVarTypeInt32 */ kVarTypeInt32,
|
||||
/* 05: kVarTypeUInt32 */ kVarTypeUInt32,
|
||||
/* 06: kVarTypeInt64 */ kVarTypeInt32, // Remapped (Invalid in 32-bit mode).
|
||||
/* 07: kVarTypeUInt64 */ kVarTypeUInt32, // Remapped (Invalid in 32-bit mode).
|
||||
/* 06: kVarTypeInt64 */ kVarTypeInvalid, // Invalid in 32-bit mode.
|
||||
/* 07: kVarTypeUInt64 */ kVarTypeInvalid, // Invalid in 32-bit mode.
|
||||
/* 08: kVarTypeIntPtr */ kVarTypeInt32, // Remapped.
|
||||
/* 09: kVarTypeUIntPtr */ kVarTypeUInt32, // Remapped.
|
||||
/* 10: kVarTypeFp32 */ kVarTypeFp32,
|
||||
|
||||
Reference in New Issue
Block a user