From: Chris Lattner Date: Thu, 21 Nov 2002 22:48:15 +0000 (+0000) Subject: Fix off by one bug X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=128a7a96f01864cde6f807075e6a1a5e92132852;p=oota-llvm.git Fix off by one bug git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4816 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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";