mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Add APInt interfaces to APFloat (allows directly
access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41858 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -250,11 +250,11 @@ CppWriter::printCFP(const ConstantFP *CFP) {
|
||||
}
|
||||
else if (CFP->getType() == Type::DoubleTy)
|
||||
Out << "BitsToDouble(0x" << std::hex
|
||||
<< DoubleToBits(CFP->getValueAPF().convertToDouble())
|
||||
<< *CFP->getValueAPF().convertToAPInt().getRawData()
|
||||
<< std::dec << "ULL) /* " << StrVal << " */";
|
||||
else
|
||||
Out << "BitsToFloat(0x" << std::hex
|
||||
<< FloatToBits(CFP->getValueAPF().convertToFloat())
|
||||
<< (uint32_t)*CFP->getValueAPF().convertToAPInt().getRawData()
|
||||
<< std::dec << "U) /* " << StrVal << " */";
|
||||
Out << ")";
|
||||
#if HAVE_PRINTF_A
|
||||
|
Reference in New Issue
Block a user