diff --git a/lib/Target/X86/Printer.cpp b/lib/Target/X86/Printer.cpp index 3c858534582..25c5ccc49e4 100644 --- a/lib/Target/X86/Printer.cpp +++ b/lib/Target/X86/Printer.cpp @@ -483,7 +483,7 @@ void X86InstrInfo::print(const MachineInstr *MI, std::ostream &O, if (MI->getNumOperands() == 3) { unsigned Size = 4; - emitConstant(O, MI->getOperand(1).getImmedValue(), Size); + emitConstant(O, MI->getOperand(2).getImmedValue(), Size); } O << "\n\t\t\t\t"; diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp index 3c858534582..25c5ccc49e4 100644 --- a/lib/Target/X86/X86AsmPrinter.cpp +++ b/lib/Target/X86/X86AsmPrinter.cpp @@ -483,7 +483,7 @@ void X86InstrInfo::print(const MachineInstr *MI, std::ostream &O, if (MI->getNumOperands() == 3) { unsigned Size = 4; - emitConstant(O, MI->getOperand(1).getImmedValue(), Size); + emitConstant(O, MI->getOperand(2).getImmedValue(), Size); } O << "\n\t\t\t\t";