[llvm-commits] CVS: llvm/tools/lli/ExecutionEngine.cpp lli.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Aug 24 09:04:36 PDT 2003
Changes in directory llvm/tools/lli:
ExecutionEngine.cpp updated: 1.21 -> 1.22
lli.cpp updated: 1.19 -> 1.20
---
Log message:
Add preliminary support for "any" pointersize/endianness. This will need
to change soon though.
---
Diffs of the changes:
Index: llvm/tools/lli/ExecutionEngine.cpp
diff -u llvm/tools/lli/ExecutionEngine.cpp:1.21 llvm/tools/lli/ExecutionEngine.cpp:1.22
--- llvm/tools/lli/ExecutionEngine.cpp:1.21 Mon Aug 18 12:33:15 2003
+++ llvm/tools/lli/ExecutionEngine.cpp Sun Aug 24 09:02:43 2003
@@ -132,7 +132,7 @@
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 @@
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 @@
((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 @@
((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:
Index: llvm/tools/lli/lli.cpp
diff -u llvm/tools/lli/lli.cpp:1.19 llvm/tools/lli/lli.cpp:1.20
--- llvm/tools/lli/lli.cpp:1.19 Thu Aug 21 16:12:26 2003
+++ llvm/tools/lli/lli.cpp Sun Aug 24 09:02:43 2003
@@ -75,8 +75,10 @@
}
#endif
- unsigned Config = (M->isLittleEndian() ? TM::LittleEndian : TM::BigEndian) |
- (M->has32BitPointers() ? TM::PtrSize32 : TM::PtrSize64);
+ // FIXME: in adddition to being gross, this is also wrong: This should use the
+ // pointersize/endianness of the host if the pointer size is not specified!!
+ unsigned Config = (M->getEndianness() != Module::BigEndian ? TM::LittleEndian : TM::BigEndian) |
+ (M->getPointerSize() != Module::Pointer64 ? TM::PtrSize32 : TM::PtrSize64);
ExecutionEngine *EE = 0;
// If there is nothing that is forcing us to use the interpreter, make a JIT.
More information about the llvm-commits
mailing list