BPFMCTargetDesc.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //===-- BPFMCTargetDesc.h - BPF 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 BPF specific target descriptions.
  10. //
  11. //===----------------------------------------------------------------------===//
  12. #ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H
  13. #define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCTARGETDESC_H
  14. #include "llvm/Config/config.h"
  15. #include "llvm/Support/DataTypes.h"
  16. #include <memory>
  17. namespace llvm {
  18. class MCAsmBackend;
  19. class MCCodeEmitter;
  20. class MCContext;
  21. class MCInstrInfo;
  22. class MCObjectTargetWriter;
  23. class MCRegisterInfo;
  24. class MCSubtargetInfo;
  25. class MCTargetOptions;
  26. class Target;
  27. MCCodeEmitter *createBPFMCCodeEmitter(const MCInstrInfo &MCII,
  28. const MCRegisterInfo &MRI,
  29. MCContext &Ctx);
  30. MCCodeEmitter *createBPFbeMCCodeEmitter(const MCInstrInfo &MCII,
  31. const MCRegisterInfo &MRI,
  32. MCContext &Ctx);
  33. MCAsmBackend *createBPFAsmBackend(const Target &T, const MCSubtargetInfo &STI,
  34. const MCRegisterInfo &MRI,
  35. const MCTargetOptions &Options);
  36. MCAsmBackend *createBPFbeAsmBackend(const Target &T, const MCSubtargetInfo &STI,
  37. const MCRegisterInfo &MRI,
  38. const MCTargetOptions &Options);
  39. std::unique_ptr<MCObjectTargetWriter> createBPFELFObjectWriter(uint8_t OSABI);
  40. }
  41. // Defines symbolic names for BPF registers. This defines a mapping from
  42. // register name to register number.
  43. //
  44. #define GET_REGINFO_ENUM
  45. #include "BPFGenRegisterInfo.inc"
  46. // Defines symbolic names for the BPF instructions.
  47. //
  48. #define GET_INSTRINFO_ENUM
  49. #include "BPFGenInstrInfo.inc"
  50. #define GET_SUBTARGETINFO_ENUM
  51. #include "BPFGenSubtargetInfo.inc"
  52. #endif