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
This commit is contained in:
Nate Begeman 2005-08-04 21:04:09 +00:00
parent 3d72d14887
commit 99558806f8

View File

@ -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]);