Add support for the mips inline asm 'm' output modifier.
[oota-llvm.git] / lib / Target / Mips / MipsAsmPrinter.cpp
index 6ed0513ac15f9c6b22d5081b146f7e9fc22a78de..ed8a1871a1f57cfd9017f1496c5aaab031fb56c3 100644 (file)
@@ -377,6 +377,11 @@ bool MipsAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
         return true;
       O << MO.getImm();
       return false;
+    case 'm': // decimal const int minus 1
+      if ((MO.getType()) != MachineOperand::MO_Immediate)
+        return true;
+      O << MO.getImm() - 1;
+      return false;
     }
   }