diff options
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/ExecutionEngine.cpp | 8 | ||||
-rw-r--r-- | lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/ExecutionEngine/ExecutionEngine.cpp b/lib/ExecutionEngine/ExecutionEngine.cpp index 9b51e3c798..e376b85510 100644 --- a/lib/ExecutionEngine/ExecutionEngine.cpp +++ b/lib/ExecutionEngine/ExecutionEngine.cpp @@ -132,7 +132,7 @@ void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr, Ptr->Untyped[2] = (Val.UIntVal >> 16) & 255; Ptr->Untyped[3] = (Val.UIntVal >> 24) & 255; break; - case Type::PointerTyID: if (CurMod.has32BitPointers()) + case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64) goto Store4BytesLittleEndian; case Type::DoubleTyID: case Type::ULongTyID: @@ -165,7 +165,7 @@ void ExecutionEngine::StoreValueToMemory(GenericValue Val, GenericValue *Ptr, Ptr->Untyped[1] = (Val.UIntVal >> 16) & 255; Ptr->Untyped[0] = (Val.UIntVal >> 24) & 255; break; - case Type::PointerTyID: if (CurMod.has32BitPointers()) + case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64) goto Store4BytesBigEndian; case Type::DoubleTyID: case Type::ULongTyID: @@ -204,7 +204,7 @@ GenericValue ExecutionEngine::LoadValueFromMemory(GenericValue *Ptr, ((unsigned)Ptr->Untyped[2] << 16) | ((unsigned)Ptr->Untyped[3] << 24); break; - case Type::PointerTyID: if (getModule().has32BitPointers()) + case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64) goto Load4BytesLittleEndian; case Type::DoubleTyID: case Type::ULongTyID: @@ -238,7 +238,7 @@ GenericValue ExecutionEngine::LoadValueFromMemory(GenericValue *Ptr, ((unsigned)Ptr->Untyped[1] << 16) | ((unsigned)Ptr->Untyped[0] << 24); break; - case Type::PointerTyID: if (getModule().has32BitPointers()) + case Type::PointerTyID: if (CurMod.getPointerSize() != Module::Pointer64) goto Load4BytesBigEndian; case Type::DoubleTyID: case Type::ULongTyID: diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 73deed9ab2..d24557abe0 100644 --- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -308,7 +308,8 @@ GenericValue lle_X_sprintf(FunctionType *M, const vector<GenericValue> &Args) { case 'u': case 'o': case 'x': case 'X': if (HowLong >= 1) { - if (HowLong == 1 && TheInterpreter->getModule().has64BitPointers() && + if (HowLong == 1 && + TheInterpreter->getModule().getPointerSize()==Module::Pointer64 && sizeof(long) < sizeof(long long)) { // Make sure we use %lld with a 64 bit argument because we might be // compiling LLI on a 32 bit compiler. |