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 | e3cbe1027dde1711e244f3cd7494ea5700f524f2 (patch) | |
| tree | 32f67f3b44ef4c307ee94285e1e929dcb5f94a8a /llvm/lib | |
| parent | 295ea906346b189706f504137886a9b115bc2fbf (diff) | |
| download | bcm5719-llvm-e3cbe1027dde1711e244f3cd7494ea5700f524f2.tar.gz bcm5719-llvm-e3cbe1027dde1711e244f3cd7494ea5700f524f2.zip | |
Hack to naturally align doubles in the constant pool. Remove this once we
know what The Right Thing To Do is.
llvm-svn: 22660
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp index 90abbd22f65..55007a49100 100644 --- a/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.cpp +++ b/llvm/lib/Target/PowerPC/PowerPCAsmPrinter.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]); |

