AArch64FixupKinds.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //===-- AArch64FixupKinds.h - AArch64 Specific Fixup Entries ----*- 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. #ifndef LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64FIXUPKINDS_H
  9. #define LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64FIXUPKINDS_H
  10. #include "llvm/MC/MCFixup.h"
  11. namespace llvm {
  12. namespace AArch64 {
  13. enum Fixups {
  14. // A 21-bit pc-relative immediate inserted into an ADR instruction.
  15. fixup_aarch64_pcrel_adr_imm21 = FirstTargetFixupKind,
  16. // A 21-bit pc-relative immediate inserted into an ADRP instruction.
  17. fixup_aarch64_pcrel_adrp_imm21,
  18. // 12-bit fixup for add/sub instructions. No alignment adjustment. All value
  19. // bits are encoded.
  20. fixup_aarch64_add_imm12,
  21. // unsigned 12-bit fixups for load and store instructions.
  22. fixup_aarch64_ldst_imm12_scale1,
  23. fixup_aarch64_ldst_imm12_scale2,
  24. fixup_aarch64_ldst_imm12_scale4,
  25. fixup_aarch64_ldst_imm12_scale8,
  26. fixup_aarch64_ldst_imm12_scale16,
  27. // The high 19 bits of a 21-bit pc-relative immediate. Same encoding as
  28. // fixup_aarch64_pcrel_adrhi, except this is used by pc-relative loads and
  29. // generates relocations directly when necessary.
  30. fixup_aarch64_ldr_pcrel_imm19,
  31. // FIXME: comment
  32. fixup_aarch64_movw,
  33. // The high 14 bits of a 21-bit pc-relative immediate.
  34. fixup_aarch64_pcrel_branch14,
  35. // The high 19 bits of a 21-bit pc-relative immediate. Same encoding as
  36. // fixup_aarch64_pcrel_adrhi, except this is use by b.cc and generates
  37. // relocations directly when necessary.
  38. fixup_aarch64_pcrel_branch19,
  39. // The high 26 bits of a 28-bit pc-relative immediate.
  40. fixup_aarch64_pcrel_branch26,
  41. // The high 26 bits of a 28-bit pc-relative immediate. Distinguished from
  42. // branch26 only on ELF.
  43. fixup_aarch64_pcrel_call26,
  44. // Marker
  45. LastTargetFixupKind,
  46. NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
  47. };
  48. } // end namespace AArch64
  49. } // end namespace llvm
  50. #endif