From: Brian Gaeke Date: Wed, 29 Sep 2004 19:59:06 +0000 (+0000) Subject: Don't use .quad to output double constants. The assembler must have a bug or X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6fdd9e1f3566ec9cc7a66c0ca2cd742057ac95f0;p=oota-llvm.git Don't use .quad to output double constants. The assembler must have a bug or something, because the wrong bit patterns get output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16590 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/Sparc/SparcAsmPrinter.cpp b/lib/Target/Sparc/SparcAsmPrinter.cpp index c2a596873a4..56ec97a0882 100644 --- a/lib/Target/Sparc/SparcAsmPrinter.cpp +++ b/lib/Target/Sparc/SparcAsmPrinter.cpp @@ -261,7 +261,8 @@ void V8Printer::emitGlobalConstant(const Constant *CV) { uint64_t UVal; } U; U.FVal = Val; - O << ".quad\t" << U.UVal << "\t! double " << Val << "\n"; + O << ".word\t0x" << std::hex << (U.UVal >> 32) << std::dec << "\t! double " << Val << "\n"; + O << ".word\t0x" << std::hex << (U.UVal & 0xffffffffUL) << std::dec << "\t! double " << Val << "\n"; return; } } diff --git a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp index c2a596873a4..56ec97a0882 100644 --- a/lib/Target/SparcV8/SparcV8AsmPrinter.cpp +++ b/lib/Target/SparcV8/SparcV8AsmPrinter.cpp @@ -261,7 +261,8 @@ void V8Printer::emitGlobalConstant(const Constant *CV) { uint64_t UVal; } U; U.FVal = Val; - O << ".quad\t" << U.UVal << "\t! double " << Val << "\n"; + O << ".word\t0x" << std::hex << (U.UVal >> 32) << std::dec << "\t! double " << Val << "\n"; + O << ".word\t0x" << std::hex << (U.UVal & 0xffffffffUL) << std::dec << "\t! double " << Val << "\n"; return; } }