mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
VMCore/AsmWriter.cpp: Tweak to check #INF and #NAN earlier.
With MSVCRT, prior checker missed emission of #INF and #NAN. FIXME: Checking should be simpler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0f0c411079
commit
22bed5db2f
@ -719,7 +719,9 @@ static void WriteConstantInternal(raw_ostream &Out, const Constant *CV,
|
||||
bool ignored;
|
||||
bool isHalf = &CFP->getValueAPF().getSemantics()==&APFloat::IEEEhalf;
|
||||
bool isDouble = &CFP->getValueAPF().getSemantics()==&APFloat::IEEEdouble;
|
||||
if (!isHalf) {
|
||||
bool isInf = CFP->getValueAPF().isInfinity();
|
||||
bool isNaN = CFP->getValueAPF().isNaN();
|
||||
if (!isHalf && !isInf && !isNaN) {
|
||||
double Val = isDouble ? CFP->getValueAPF().convertToDouble() :
|
||||
CFP->getValueAPF().convertToFloat();
|
||||
SmallString<128> StrVal;
|
||||
|
Loading…
Reference in New Issue
Block a user