mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-28 22:55:52 +00:00
Simplify code, alignment must be specified now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26074 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7a1e2152c
commit
74b7d27ab1
@ -112,16 +112,7 @@ void AsmPrinter::EmitConstantPool(MachineConstantPool *MCP) {
|
|||||||
|
|
||||||
SwitchSection(ConstantPoolSection, 0);
|
SwitchSection(ConstantPoolSection, 0);
|
||||||
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
|
for (unsigned i = 0, e = CP.size(); i != e; ++i) {
|
||||||
// FIXME: force doubles to be naturally aligned. We should handle this
|
EmitAlignment(CP[i].second);
|
||||||
// more correctly in the future.
|
|
||||||
unsigned Alignment = CP[i].second;
|
|
||||||
if (Alignment == 0) {
|
|
||||||
Alignment = TD.getTypeAlignmentShift(CP[i].first->getType());
|
|
||||||
if (CP[i].first->getType() == Type::DoubleTy && Alignment < 3)
|
|
||||||
Alignment = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
EmitAlignment(Alignment);
|
|
||||||
O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << '_' << i
|
O << PrivateGlobalPrefix << "CPI" << getFunctionNumber() << '_' << i
|
||||||
<< ":\t\t\t\t\t" << CommentString << *CP[i].first << '\n';
|
<< ":\t\t\t\t\t" << CommentString << *CP[i].first << '\n';
|
||||||
EmitGlobalConstant(CP[i].first);
|
EmitGlobalConstant(CP[i].first);
|
||||||
|
Loading…
Reference in New Issue
Block a user