diff options
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/Target/X86/X86AsmPrinter.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86AsmPrinter.cpp b/llvm/lib/Target/X86/X86AsmPrinter.cpp index 70eae63a8e3..09913c27189 100644 --- a/llvm/lib/Target/X86/X86AsmPrinter.cpp +++ b/llvm/lib/Target/X86/X86AsmPrinter.cpp @@ -106,7 +106,13 @@ namespace { // This method is used by the tablegen'erated instruction printer. void printOperand(const MachineOperand &MO, MVT::ValueType VT) { - printOp(MO); + if (MO.getType() == MachineOperand::MO_MachineRegister) { + assert(MRegisterInfo::isPhysicalRegister(MO.getReg())&&"Not physref??"); + // Bug Workaround: See note in Printer::doInitialization about %. + O << "%" << TM.getRegisterInfo()->get(MO.getReg()).Name; + } else { + printOp(MO); + } } void printImplUsesBefore(const TargetInstrDescriptor &Desc); |

