AArch64Disassembler.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //===- AArch64Disassembler.h - Disassembler for AArch64 ---------*- C++ -*-===//
  2. //
  3. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  4. // See https://llvm.org/LICENSE.txt for license information.
  5. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. //
  10. //===----------------------------------------------------------------------===//
  11. #ifndef LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64DISASSEMBLER_H
  12. #define LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64DISASSEMBLER_H
  13. #include "llvm/MC/MCDisassembler/MCDisassembler.h"
  14. #include "llvm/MC/MCInstrInfo.h"
  15. namespace llvm {
  16. class AArch64Disassembler : public MCDisassembler {
  17. std::unique_ptr<const MCInstrInfo> const MCII;
  18. public:
  19. AArch64Disassembler(const MCSubtargetInfo &STI, MCContext &Ctx,
  20. MCInstrInfo const *MCII)
  21. : MCDisassembler(STI, Ctx), MCII(MCII) {}
  22. ~AArch64Disassembler() override = default;
  23. MCDisassembler::DecodeStatus
  24. getInstruction(MCInst &Instr, uint64_t &Size, ArrayRef<uint8_t> Bytes,
  25. uint64_t Address, raw_ostream &CStream) const override;
  26. uint64_t suggestBytesToSkip(ArrayRef<uint8_t> Bytes,
  27. uint64_t Address) const override;
  28. };
  29. } // end namespace llvm
  30. #endif // LLVM_LIB_TARGET_AARCH64_DISASSEMBLER_AARCH64DISASSEMBLER_H