diff options
author | Dale Johannesen <dalej@apple.com> | 2010-02-03 00:36:40 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-02-03 00:36:40 +0000 |
commit | b0e94241dd36060cc325bf08c58299e94a95d662 (patch) | |
tree | e86c39ae1d954b5a1fb76dc4990a9715e4e82073 | |
parent | e7b635f430a0732d2790ef747fe9b4d7582de8a5 (diff) | |
download | external_llvm-b0e94241dd36060cc325bf08c58299e94a95d662.zip external_llvm-b0e94241dd36060cc325bf08c58299e94a95d662.tar.gz external_llvm-b0e94241dd36060cc325bf08c58299e94a95d662.tar.bz2 |
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
-rw-r--r-- | lib/Target/X86/AsmPrinter/X86MCInstLower.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp index 40b1f7b..1c0e63e 100644 --- a/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp +++ b/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp @@ -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 { |