ARM64: initial backend import
[oota-llvm.git] / lib / Target / ARM64 / Disassembler / ARM64Disassembler.h
1 //===- ARM64Disassembler.h - Disassembler for ARM64 -------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 //
11 //===----------------------------------------------------------------------===//
12
13 #ifndef ARM64DISASSEMBLER_H
14 #define ARM64DISASSEMBLER_H
15
16 #include "llvm/MC/MCDisassembler.h"
17
18 namespace llvm {
19
20 class MCInst;
21 class MemoryObject;
22 class raw_ostream;
23
24 class ARM64Disassembler : public MCDisassembler {
25 public:
26   ARM64Disassembler(const MCSubtargetInfo &STI) : MCDisassembler(STI) {}
27
28   ~ARM64Disassembler() {}
29
30   /// getInstruction - See MCDisassembler.
31   MCDisassembler::DecodeStatus getInstruction(MCInst &instr, uint64_t &size,
32                                               const MemoryObject &region,
33                                               uint64_t address,
34                                               raw_ostream &vStream,
35                                               raw_ostream &cStream) const;
36
37   /// tryAddingSymbolicOperand - tryAddingSymbolicOperand trys to add a symbolic
38   /// operand in place of the immediate Value in the MCInst.  The immediate
39   /// Value has not had any PC adjustment made by the caller. If the instruction
40   /// adds the PC to the immediate Value then InstsAddsAddressToValue is true,
41   /// else false.  If the getOpInfo() function was set as part of the
42   /// setupForSymbolicDisassembly() call then that function is called to get any
43   /// symbolic information at the Address for this instrution.  If that returns
44   /// non-zero then the symbolic information it returns is used to create an
45   /// MCExpr and that is added as an operand to the MCInst.  This function
46   /// returns true if it adds an operand to the MCInst and false otherwise.
47   bool tryAddingSymbolicOperand(uint64_t Address, int Value,
48                                 bool InstsAddsAddressToValue, uint64_t InstSize,
49                                 MCInst &MI, uint32_t insn = 0) const;
50 };
51
52 } // namespace llvm
53
54 #endif