mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Add a "loses information" return value to APFloat::convert
and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1000,8 +1000,11 @@ void AsmPrinter::EmitGlobalConstant(const Constant *CV) {
|
||||
// api needed to prevent premature destruction
|
||||
APInt api = CFP->getValueAPF().bitcastToAPInt();
|
||||
const uint64_t *p = api.getRawData();
|
||||
// Convert to double so we can print the approximate val as a comment.
|
||||
APFloat DoubleVal = CFP->getValueAPF();
|
||||
DoubleVal.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven);
|
||||
bool ignored;
|
||||
DoubleVal.convert(APFloat::IEEEdouble, APFloat::rmNearestTiesToEven,
|
||||
&ignored);
|
||||
if (TD->isBigEndian()) {
|
||||
O << TAI->getData16bitsDirective() << uint16_t(p[0] >> 48)
|
||||
<< '\t' << TAI->getCommentString()
|
||||
|
||||
Reference in New Issue
Block a user