First round of fixes for the x86 fixes for the x86 move accumulator from/to memory...
[oota-llvm.git] / lib / Target / X86 / InstPrinter / X86IntelInstPrinter.cpp
index 9dfc9a9aa7471a2394e543b4cb0b59cf08898c3a..e7e7b151c3bd30891788b6759935adcdd0024b36 100644 (file)
@@ -200,3 +200,19 @@ void X86IntelInstPrinter::printMemReference(const MCInst *MI, unsigned Op,
   
   O << ']';
 }
+
+void X86IntelInstPrinter::printMemOffset(const MCInst *MI, unsigned Op,
+                                         raw_ostream &O) {
+  const MCOperand &DispSpec = MI->getOperand(Op);
+
+  O << '[';
+
+  if (DispSpec.isImm()) {
+    O << formatImm(DispSpec.getImm());
+  } else {
+    assert(DispSpec.isExpr() && "non-immediate displacement?");
+    O << *DispSpec.getExpr();
+  }
+
+  O << ']';
+}