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