summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2014-01-22 15:08:08 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2014-01-22 15:08:08 +0000
commit2ef8d9c05cb4133383fda0c8b85f1443b873a758 (patch)
treed1f27d1422177113f0e44e1754baf65306e42612 /llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
parentdb1ad12ae2a51edbdc68ce96031e61a08ee19c44 (diff)
downloadbcm5719-llvm-2ef8d9c05cb4133383fda0c8b85f1443b873a758.tar.gz
bcm5719-llvm-2ef8d9c05cb4133383fda0c8b85f1443b873a758.zip
[x86] Allow segment and address-size overrides for LODS[BWLQ] (PR9385)
llvm-svn: 199803
Diffstat (limited to 'llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp')
-rw-r--r--llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp b/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
index 11a9ada41e5..4cd445765af 100644
--- a/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
+++ b/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
@@ -226,6 +226,25 @@ void X86ATTInstPrinter::printMemReference(const MCInst *MI, unsigned Op,
O << markup(">");
}
+void X86ATTInstPrinter::printSrcIdx(const MCInst *MI, unsigned Op,
+ raw_ostream &O) {
+ const MCOperand &SegReg = MI->getOperand(Op+1);
+
+ O << markup("<mem:");
+
+ // If this has a segment register, print it.
+ if (SegReg.getReg()) {
+ printOperand(MI, Op+1, O);
+ O << ':';
+ }
+
+ O << "(";
+ printOperand(MI, Op, O);
+ O << ")";
+
+ O << markup(">");
+}
+
void X86ATTInstPrinter::printMemOffset(const MCInst *MI, unsigned Op,
raw_ostream &O) {
const MCOperand &DispSpec = MI->getOperand(Op);
OpenPOWER on IntegriCloud