summaryrefslogtreecommitdiff
path: root/lib/Target/X86/InstPrinter
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2011-09-15 18:36:29 +0000
committerOwen Anderson <resistor@mac.com>2011-09-15 18:36:29 +0000
commitede042dc8d59ff48a48ef8e2271f2a7ee8324ba5 (patch)
tree1863d77a0f4430e093ef2933f38f299a5992c74b /lib/Target/X86/InstPrinter
parent01afdb3a45f63af540b43b414c6094220a8f91e7 (diff)
downloadllvm-ede042dc8d59ff48a48ef8e2271f2a7ee8324ba5.tar.gz
llvm-ede042dc8d59ff48a48ef8e2271f2a7ee8324ba5.tar.bz2
llvm-ede042dc8d59ff48a48ef8e2271f2a7ee8324ba5.tar.xz
Add support for stored annotations to MCInst, and provide facilities for MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139820 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/InstPrinter')
-rw-r--r--lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp4
-rw-r--r--lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp4
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp b/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
index 591b583831..76a1da4959 100644
--- a/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
+++ b/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp
@@ -45,8 +45,10 @@ void X86ATTInstPrinter::printInst(const MCInst *MI, raw_ostream &OS) {
printInstruction(MI, OS);
// If verbose assembly is enabled, we can print some informative comments.
- if (CommentStream)
+ if (CommentStream) {
+ printAnnotations(MI, *CommentStream);
EmitAnyX86InstComments(MI, *CommentStream, getRegisterName);
+ }
}
StringRef X86ATTInstPrinter::getOpcodeName(unsigned Opcode) const {
diff --git a/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp b/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
index 506e26cbf7..6cca1d19b3 100644
--- a/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
+++ b/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp
@@ -36,8 +36,10 @@ void X86IntelInstPrinter::printInst(const MCInst *MI, raw_ostream &OS) {
printInstruction(MI, OS);
// If verbose assembly is enabled, we can print some informative comments.
- if (CommentStream)
+ if (CommentStream) {
+ printAnnotations(MI, *CommentStream);
EmitAnyX86InstComments(MI, *CommentStream, getRegisterName);
+ }
}
StringRef X86IntelInstPrinter::getOpcodeName(unsigned Opcode) const {
return getInstructionName(Opcode);