64-bit GP register/variable is now forbidden in 32-bit mode. (Issue #26).

This commit is contained in:
kobalicekp
2014-05-03 10:59:52 +02:00
parent 2f5fccbf3f
commit 00f9e5fe50
2 changed files with 5 additions and 3 deletions

View File

@@ -507,9 +507,11 @@ Error X86X64Compiler::_newVar(BaseVar* var, uint32_t vType, const char* name) {
ASMJIT_ASSERT(vType < kVarTypeCount); ASMJIT_ASSERT(vType < kVarTypeCount);
vType = _targetVarMapping[vType]; 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); VarData* vd = _newVd(vType, vInfo.getSize(), vInfo.getClass(), name);
if (vd == NULL) { if (vd == NULL) {
static_cast<X86Var*>(var)->reset(); static_cast<X86Var*>(var)->reset();
return getError(); return getError();

View File

@@ -3191,8 +3191,8 @@ const uint8_t _varMapping[kVarTypeCount] = {
/* 03: kVarTypeUInt16 */ kVarTypeUInt16, /* 03: kVarTypeUInt16 */ kVarTypeUInt16,
/* 04: kVarTypeInt32 */ kVarTypeInt32, /* 04: kVarTypeInt32 */ kVarTypeInt32,
/* 05: kVarTypeUInt32 */ kVarTypeUInt32, /* 05: kVarTypeUInt32 */ kVarTypeUInt32,
/* 06: kVarTypeInt64 */ kVarTypeInt32, // Remapped (Invalid in 32-bit mode). /* 06: kVarTypeInt64 */ kVarTypeInvalid, // Invalid in 32-bit mode.
/* 07: kVarTypeUInt64 */ kVarTypeUInt32, // Remapped (Invalid in 32-bit mode). /* 07: kVarTypeUInt64 */ kVarTypeInvalid, // Invalid in 32-bit mode.
/* 08: kVarTypeIntPtr */ kVarTypeInt32, // Remapped. /* 08: kVarTypeIntPtr */ kVarTypeInt32, // Remapped.
/* 09: kVarTypeUIntPtr */ kVarTypeUInt32, // Remapped. /* 09: kVarTypeUIntPtr */ kVarTypeUInt32, // Remapped.
/* 10: kVarTypeFp32 */ kVarTypeFp32, /* 10: kVarTypeFp32 */ kVarTypeFp32,