1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

Print FPImm a less kludgy way; APFloat.toString seems

to have some problems anyway.

llvm-svn: 95171
This commit is contained in:
Dale Johannesen 2010-02-03 00:36:40 +00:00
parent cabb8bea4c
commit 7c4c39e651

View File

@ -440,12 +440,9 @@ void X86AsmPrinter::EmitInstruction(const MachineInstr *MI) {
} else if (MI->getOperand(0).getType()==MachineOperand::MO_FPImmediate) {
// This is more naturally done in printOperand, but since the only use
// of such an operand is in this comment and that is temporary, we
// prefer to keep this mess localized.
SmallVectorImpl<char> Str(20);
APFloat APF = MI->getOperand(0).getFPImm()->getValueAPF();
APF.toString(Str, 0, 0);
for (unsigned i=0; i<Str.size()-1; i++)
O << Str[i];
// prefer to keep this localized.
O << '$';
MI->getOperand(0).print(O, &TM);
} else
printOperand(MI, 0);
} else {