[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
Nate Begeman
natebegeman at mac.com
Thu Aug 4 14:04:20 PDT 2005
Changes in directory llvm/lib/Target/PowerPC:
PowerPCAsmPrinter.cpp updated: 1.84 -> 1.85
---
Log message:
Hack to naturally align doubles in the constant pool. Remove this once we
know what The Right Thing To Do is.
---
Diffs of the changes: (+6 -1)
PowerPCAsmPrinter.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
Index: llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp
diff -u llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.84 llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.85
--- llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp:1.84 Tue Aug 2 14:25:03 2005
+++ llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp Thu Aug 4 16:04:09 2005
@@ -427,7 +427,12 @@
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
O << "\t.const\n";
- emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
+ // FIXME: force doubles to be naturally aligned. We should handle this
+ // more correctly in the future.
+ if (Type::DoubleTy == CP[i]->getType())
+ emitAlignment(3);
+ else
+ emitAlignment(TD.getTypeAlignmentShift(CP[i]->getType()));
O << ".CPI" << CurrentFnName << "_" << i << ":\t\t\t\t\t" << CommentString
<< *CP[i] << "\n";
emitGlobalConstant(CP[i]);
More information about the llvm-commits
mailing list