• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- AArch64FixupKinds.h - AArch64 Specific Fixup Entries ----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64FIXUPKINDS_H
11 #define LLVM_LIB_TARGET_AARCH64_MCTARGETDESC_AARCH64FIXUPKINDS_H
12 
13 #include "llvm/MC/MCFixup.h"
14 
15 namespace llvm {
16 namespace AArch64 {
17 
18 enum Fixups {
19   // A 21-bit pc-relative immediate inserted into an ADR instruction.
20   fixup_aarch64_pcrel_adr_imm21 = FirstTargetFixupKind,
21 
22   // A 21-bit pc-relative immediate inserted into an ADRP instruction.
23   fixup_aarch64_pcrel_adrp_imm21,
24 
25   // 12-bit fixup for add/sub instructions. No alignment adjustment. All value
26   // bits are encoded.
27   fixup_aarch64_add_imm12,
28 
29   // unsigned 12-bit fixups for load and store instructions.
30   fixup_aarch64_ldst_imm12_scale1,
31   fixup_aarch64_ldst_imm12_scale2,
32   fixup_aarch64_ldst_imm12_scale4,
33   fixup_aarch64_ldst_imm12_scale8,
34   fixup_aarch64_ldst_imm12_scale16,
35 
36   // The high 19 bits of a 21-bit pc-relative immediate. Same encoding as
37   // fixup_aarch64_pcrel_adrhi, except this is used by pc-relative loads and
38   // generates relocations directly when necessary.
39   fixup_aarch64_ldr_pcrel_imm19,
40 
41   // FIXME: comment
42   fixup_aarch64_movw,
43 
44   // The high 14 bits of a 21-bit pc-relative immediate.
45   fixup_aarch64_pcrel_branch14,
46 
47   // The high 19 bits of a 21-bit pc-relative immediate. Same encoding as
48   // fixup_aarch64_pcrel_adrhi, except this is use by b.cc and generates
49   // relocations directly when necessary.
50   fixup_aarch64_pcrel_branch19,
51 
52   // The high 26 bits of a 28-bit pc-relative immediate.
53   fixup_aarch64_pcrel_branch26,
54 
55   // The high 26 bits of a 28-bit pc-relative immediate. Distinguished from
56   // branch26 only on ELF.
57   fixup_aarch64_pcrel_call26,
58 
59   // zero-space placeholder for the ELF R_AARCH64_TLSDESC_CALL relocation.
60   fixup_aarch64_tlsdesc_call,
61 
62   // Marker
63   LastTargetFixupKind,
64   NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
65 };
66 
67 } // end namespace AArch64
68 } // end namespace llvm
69 
70 #endif
71