Fix off by one bug
authorChris Lattner <sabre@nondot.org>
Thu, 21 Nov 2002 22:48:15 +0000 (22:48 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 21 Nov 2002 22:48:15 +0000 (22:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4816 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/Printer.cpp
lib/Target/X86/X86AsmPrinter.cpp

index 3c8585345829d84349bd5e4c0279c347f3e0b795..25c5ccc49e48370515cdbda91065db2f5fe15996 100644 (file)
@@ -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";
index 3c8585345829d84349bd5e4c0279c347f3e0b795..25c5ccc49e48370515cdbda91065db2f5fe15996 100644 (file)
@@ -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";