diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-08-04 21:04:09 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-08-04 21:04:09 +0000 |
commit | 99558806f8c4c6867a335fe896350302b126a2b5 (patch) | |
tree | ce505db4e428ccff933a63052e99a63492c8610d /lib | |
parent | 3d72d148871918cfdd930919cb11767a8c2bb7e6 (diff) |
Hack to naturally align doubles in the constant pool. Remove this once we
know what The Right Thing To Do is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22660 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/PowerPC/PPCAsmPrinter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp index 90abbd22f6..55007a4910 100644 --- a/lib/Target/PowerPC/PPCAsmPrinter.cpp +++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp @@ -427,7 +427,12 @@ void DarwinAsmPrinter::printConstantPool(MachineConstantPool *MCP) { 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]); |