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 | 283207a71c580cf50b31a4a24a3170190083a4ae (patch) | |
| tree | d0e32e55f9acace2fbb283b4d600ee39bc3830d6 /llvm/lib/Target/Sparc | |
| parent | f36987c79b9aaa7ff7c76c7b2bf7d064d4490b6d (diff) | |
| download | bcm5719-llvm-283207a71c580cf50b31a4a24a3170190083a4ae.tar.gz bcm5719-llvm-283207a71c580cf50b31a4a24a3170190083a4ae.zip | |
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.
llvm-svn: 43688
Diffstat (limited to 'llvm/lib/Target/Sparc')
| -rw-r--r-- | llvm/lib/Target/Sparc/SparcAsmPrinter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp index 98d59ee8cb9..bf47930e2ff 100644 --- a/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -228,7 +228,7 @@ bool SparcAsmPrinter::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->getPrefTypeAlignment(C->getType()); if (C->isNullValue() && @@ -238,7 +238,7 @@ bool SparcAsmPrinter::doFinalization(Module &M) { if (I->hasInternalLinkage()) O << "\t.local " << name << "\n"; - O << "\t.comm " << name << "," << TD->getTypeSize(C->getType()) + O << "\t.comm " << name << "," << TD->getABITypeSize(C->getType()) << "," << Align; O << "\n"; } else { |

