mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
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:
parent
3d72d14887
commit
99558806f8
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user