summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCDisassembler.h
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2011-09-07 17:24:38 +0000
committerJames Molloy <james.molloy@arm.com>2011-09-07 17:24:38 +0000
commitb950585cc5a0d665e9accfe5ce490cd269756f2e (patch)
tree70f25e269b3e66fe882501df4ae7caeacf154eee /include/llvm/MC/MCDisassembler.h
parent758ba1f4edfe2a2876c91022f921180a6dbece01 (diff)
downloadllvm-b950585cc5a0d665e9accfe5ce490cd269756f2e.tar.gz
llvm-b950585cc5a0d665e9accfe5ce490cd269756f2e.tar.bz2
llvm-b950585cc5a0d665e9accfe5ce490cd269756f2e.tar.xz
Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= handling to llvm-mc. Reviewed by Owen Anderson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139237 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCDisassembler.h')
-rw-r--r--include/llvm/MC/MCDisassembler.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/llvm/MC/MCDisassembler.h b/include/llvm/MC/MCDisassembler.h
index adcb88254e..404b8aa985 100644
--- a/include/llvm/MC/MCDisassembler.h
+++ b/include/llvm/MC/MCDisassembler.h
@@ -15,6 +15,7 @@
namespace llvm {
class MCInst;
+class MCSubtargetInfo;
class MemoryObject;
class raw_ostream;
class MCContext;
@@ -54,7 +55,7 @@ public:
};
/// Constructor - Performs initial setup for the disassembler.
- MCDisassembler() : GetOpInfo(0), DisInfo(0), Ctx(0) {}
+ MCDisassembler(const MCSubtargetInfo &STI) : GetOpInfo(0), DisInfo(0), Ctx(0), STI(STI) {}
virtual ~MCDisassembler();
@@ -98,6 +99,9 @@ private:
// The assembly context for creating symbols and MCExprs in place of
// immediate operands when there is symbolic information.
MCContext *Ctx;
+protected:
+ // Subtarget information, for instruction decoding predicates if required.
+ const MCSubtargetInfo &STI;
public:
void setupForSymbolicDisassembly(LLVMOpInfoCallback getOpInfo,