diff options
author | Dale Johannesen <dalej@apple.com> | 2009-03-23 21:16:53 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-03-23 21:16:53 +0000 |
commit | 93eefa004308c8b3e1202cc3f9342526a3a378bd (patch) | |
tree | cda2caf113edd506150c199d404f1be45195d048 /llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | |
parent | 2441a7df96359e47f70814729f64c3bff664492f (diff) | |
download | bcm5719-llvm-93eefa004308c8b3e1202cc3f9342526a3a378bd.tar.gz bcm5719-llvm-93eefa004308c8b3e1202cc3f9342526a3a378bd.zip |
Fix internal representation of fp80 to be the
same as a normal i80 {low64, high16} rather
than its own {high64, low16}. A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.
llvm-svn: 67562
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index 2a64524860e..79d14f7aeb6 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -1046,10 +1046,13 @@ void AsmPrinter::EmitGlobalConstantFP(const ConstantFP *CFP, DoubleVal.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven, &ignored); if (TD->isBigEndian()) { - O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 48) + O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1]) << '\t' << TAI->getCommentString() << " long double most significant halfword of ~" << DoubleVal.convertToDouble() << '\n'; + O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 48) + << '\t' << TAI->getCommentString() + << " long double next halfword\n"; O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 32) << '\t' << TAI->getCommentString() << " long double next halfword\n"; @@ -1058,18 +1061,12 @@ void AsmPrinter::EmitGlobalConstantFP(const ConstantFP *CFP, << " long double next halfword\n"; O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0]) << '\t' << TAI->getCommentString() - << " long double next halfword\n"; - O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1]) - << '\t' << TAI->getCommentString() << " long double least significant halfword\n"; } else { - O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1]) + O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0]) << '\t' << TAI->getCommentString() << " long double least significant halfword of ~" << DoubleVal.convertToDouble() << '\n'; - O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0]) - << '\t' << TAI->getCommentString() - << " long double next halfword\n"; O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 16) << '\t' << TAI->getCommentString() << " long double next halfword\n"; @@ -1078,6 +1075,9 @@ void AsmPrinter::EmitGlobalConstantFP(const ConstantFP *CFP, << " long double next halfword\n"; O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[0] >> 48) << '\t' << TAI->getCommentString() + << " long double next halfword\n"; + O << TAI->getData16bitsDirective(AddrSpace) << uint16_t(p[1]) + << '\t' << TAI->getCommentString() << " long double most significant halfword\n"; } EmitZeros(TD->getTypePaddedSize(Type::X86_FP80Ty) - |