1 //===- ARM64Disassembler.h - Disassembler for ARM64 -------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
11 //===----------------------------------------------------------------------===//
13 #ifndef ARM64DISASSEMBLER_H
14 #define ARM64DISASSEMBLER_H
16 #include "llvm/MC/MCDisassembler.h"
24 class ARM64Disassembler : public MCDisassembler {
26 ARM64Disassembler(const MCSubtargetInfo &STI) : MCDisassembler(STI) {}
28 ~ARM64Disassembler() {}
30 /// getInstruction - See MCDisassembler.
31 MCDisassembler::DecodeStatus getInstruction(MCInst &instr, uint64_t &size,
32 const MemoryObject ®ion,
35 raw_ostream &cStream) const;
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;