summaryrefslogtreecommitdiffstats
path: root/llvm/include
diff options
context:
space:
mode:
authorAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2017-10-16 11:14:29 +0000
committerAndrew V. Tischenko <andrew.v.tischenko@gmail.com>2017-10-16 11:14:29 +0000
commitbfc9061593307bf6b09106216445eacb1c5215d1 (patch)
treeb27f6f29da414fb794f53873cfb572758b7a2891 /llvm/include
parent6f60ff84cd2b27f801df4809099f211ee04399b1 (diff)
downloadbcm5719-llvm-bfc9061593307bf6b09106216445eacb1c5215d1.tar.gz
bcm5719-llvm-bfc9061593307bf6b09106216445eacb1c5215d1.zip
This patch is a result of D37262: The issues with X86 prefixes. It closes PR7709, PR17697, PR19251, PR32809 and PR21640. There could be other bugs closed by this patch.
llvm-svn: 315899
Diffstat (limited to 'llvm/include')
-rw-r--r--llvm/include/llvm/MC/MCInst.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/include/llvm/MC/MCInst.h b/llvm/include/llvm/MC/MCInst.h
index 9bf440ea96d..db28fd0fd6d 100644
--- a/llvm/include/llvm/MC/MCInst.h
+++ b/llvm/include/llvm/MC/MCInst.h
@@ -160,6 +160,10 @@ class MCInst {
unsigned Opcode = 0;
SMLoc Loc;
SmallVector<MCOperand, 8> Operands;
+ // These flags could be used to pass some info from one target subcomponent
+ // to another, for example, from disassembler to asm printer. The values of
+ // the flags have any sense on target level only (e.g. prefixes on x86).
+ unsigned Flags = 0;
public:
MCInst() = default;
@@ -167,6 +171,9 @@ public:
void setOpcode(unsigned Op) { Opcode = Op; }
unsigned getOpcode() const { return Opcode; }
+ void setFlags(unsigned F) { Flags = F; }
+ unsigned getFlags() const { return Flags; }
+
void setLoc(SMLoc loc) { Loc = loc; }
SMLoc getLoc() const { return Loc; }
OpenPOWER on IntegriCloud