[llvm-commits] CVS: llvm/lib/Target/TargetData.cpp

Chris Lattner sabre at nondot.org
Fri Feb 16 15:12:09 PST 2007



Changes in directory llvm/lib/Target:

TargetData.cpp updated: 1.99 -> 1.100
---
Log message:

Fix CodeGen/PowerPC/2007-02-16-AlignPacked.ll


---
Diffs of the changes:  (+2 -2)

 TargetData.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


Index: llvm/lib/Target/TargetData.cpp
diff -u llvm/lib/Target/TargetData.cpp:1.99 llvm/lib/Target/TargetData.cpp:1.100
--- llvm/lib/Target/TargetData.cpp:1.99	Fri Feb 16 16:42:40 2007
+++ llvm/lib/Target/TargetData.cpp	Fri Feb 16 17:11:51 2007
@@ -186,7 +186,7 @@
   setAlignment(FLOAT_ALIGN,     8,  8, 64);  // double
   setAlignment(VECTOR_ALIGN,    8,  8, 64);  // v2i32
   setAlignment(VECTOR_ALIGN,   16, 16, 128); // v16i8, v8i16, v4i32, ...
-  setAlignment(AGGREGATE_ALIGN, 0,  0,  0);  // struct, union, class, ...
+  setAlignment(AGGREGATE_ALIGN, 0,  8,  0);  // struct, union, class, ...
   
   while (!temp.empty()) {
     std::string token = getToken(temp, "-");
@@ -458,7 +458,7 @@
     
   case Type::StructTyID: {
     // Packed structure types always have an ABI alignment of one.
-    if (cast<StructType>(Ty)->isPacked())
+    if (cast<StructType>(Ty)->isPacked() && abi_or_pref)
       return 1;
     
     // Get the layout annotation... which is lazily created on demand.






More information about the llvm-commits mailing list