AArch64MCTargetDesc.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //===-- AArch64MCTargetDesc.h - AArch64 Target Descriptions -----*- 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. // This file provides AArch64 specific target descriptions.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64MCTARGETDESC_H
  13. #define LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64MCTARGETDESC_H
  14. #include "llvm/MC/MCInstrDesc.h"
  15. #include "llvm/Support/DataTypes.h"
  16. #include <memory>
  17. namespace llvm {
  18. class formatted_raw_ostream;
  19. class MCAsmBackend;
  20. class MCCodeEmitter;
  21. class MCContext;
  22. class MCInst;
  23. class MCInstrInfo;
  24. class MCInstPrinter;
  25. class MCRegisterInfo;
  26. class MCObjectTargetWriter;
  27. class MCStreamer;
  28. class MCSubtargetInfo;
  29. class MCTargetOptions;
  30. class MCTargetStreamer;
  31. class Target;
  32. class Triple;
  33. MCCodeEmitter *createAArch64MCCodeEmitter(const MCInstrInfo &MCII,
  34. MCContext &Ctx);
  35. MCAsmBackend *createAArch64leAsmBackend(const Target &T,
  36. const MCSubtargetInfo &STI,
  37. const MCRegisterInfo &MRI,
  38. const MCTargetOptions &Options);
  39. MCAsmBackend *createAArch64beAsmBackend(const Target &T,
  40. const MCSubtargetInfo &STI,
  41. const MCRegisterInfo &MRI,
  42. const MCTargetOptions &Options);
  43. std::unique_ptr<MCObjectTargetWriter>
  44. createAArch64ELFObjectWriter(uint8_t OSABI, bool IsILP32);
  45. std::unique_ptr<MCObjectTargetWriter>
  46. createAArch64MachObjectWriter(uint32_t CPUType, uint32_t CPUSubtype,
  47. bool IsILP32);
  48. std::unique_ptr<MCObjectTargetWriter>
  49. createAArch64WinCOFFObjectWriter(const Triple &TheTriple);
  50. MCTargetStreamer *createAArch64AsmTargetStreamer(MCStreamer &S,
  51. formatted_raw_ostream &OS,
  52. MCInstPrinter *InstPrint,
  53. bool isVerboseAsm);
  54. namespace AArch64_MC {
  55. void initLLVMToCVRegMapping(MCRegisterInfo *MRI);
  56. bool isQForm(const MCInst &MI, const MCInstrInfo *MCII);
  57. bool isFpOrNEON(const MCInst &MI, const MCInstrInfo *MCII);
  58. }
  59. namespace AArch64 {
  60. enum OperandType {
  61. OPERAND_IMPLICIT_IMM_0 = MCOI::OPERAND_FIRST_TARGET,
  62. };
  63. } // namespace AArch64
  64. } // End llvm namespace
  65. // Defines symbolic names for AArch64 registers. This defines a mapping from
  66. // register name to register number.
  67. //
  68. #define GET_REGINFO_ENUM
  69. #include "AArch64GenRegisterInfo.inc"
  70. // Defines symbolic names for the AArch64 instructions.
  71. //
  72. #define GET_INSTRINFO_ENUM
  73. #define GET_INSTRINFO_MC_HELPER_DECLS
  74. #include "AArch64GenInstrInfo.inc"
  75. #define GET_SUBTARGETINFO_ENUM
  76. #include "AArch64GenSubtargetInfo.inc"
  77. #endif