mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
Print FPImm a less kludgy way; APFloat.toString seems
to have some problems anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95171 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e7b635f430
commit
b0e94241dd
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user