diff options
author | Duncan Sands <baldrick@free.fr> | 2007-11-05 00:04:43 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2007-11-05 00:04:43 +0000 |
commit | ca0ed744852a7d9625572fbb793f65e81225a3e8 (patch) | |
tree | dedf204008d224f4537fd9262cacd8b640ab4d35 /lib/Target/IA64 | |
parent | 83430bce1d21c8095438ed591cb9c72b5c666a07 (diff) | |
download | external_llvm-ca0ed744852a7d9625572fbb793f65e81225a3e8.zip external_llvm-ca0ed744852a7d9625572fbb793f65e81225a3e8.tar.gz external_llvm-ca0ed744852a7d9625572fbb793f65e81225a3e8.tar.bz2 |
Eliminate the remaining uses of getTypeSize. This
should only effect x86 when using long double. Now
12/16 bytes are output for long double globals (the
exact amount depends on the alignment). This brings
globals in line with the rest of LLVM: the space
reserved for an object is now always the ABI size.
One tricky point is that only 10 bytes should be
output for long double if it is a field in a packed
struct, which is the reason for the additional
argument to EmitGlobalConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43688 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/IA64')
-rw-r--r-- | lib/Target/IA64/IA64AsmPrinter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp index 08a27d4..cbc86ea 100644 --- a/lib/Target/IA64/IA64AsmPrinter.cpp +++ b/lib/Target/IA64/IA64AsmPrinter.cpp @@ -271,7 +271,7 @@ bool IA64AsmPrinter::doFinalization(Module &M) { O << "\n\n"; std::string name = Mang->getValueName(I); Constant *C = I->getInitializer(); - unsigned Size = TD->getTypeSize(C->getType()); + unsigned Size = TD->getABITypeSize(C->getType()); unsigned Align = TD->getPreferredTypeAlignmentShift(C->getType()); if (C->isNullValue() && @@ -279,11 +279,11 @@ bool IA64AsmPrinter::doFinalization(Module &M) { I->hasWeakLinkage() /* FIXME: Verify correct */)) { SwitchToDataSection(".data", I); if (I->hasInternalLinkage()) { - O << "\t.lcomm " << name << "#," << TD->getTypeSize(C->getType()) + O << "\t.lcomm " << name << "#," << TD->getABITypeSize(C->getType()) << "," << (1 << Align); O << "\n"; } else { - O << "\t.common " << name << "#," << TD->getTypeSize(C->getType()) + O << "\t.common " << name << "#," << TD->getABITypeSize(C->getType()) << "," << (1 << Align); O << "\n"; } |