LLVM API Documentation

ARMFixupKinds.h
Go to the documentation of this file.
00001 //===-- ARMFixupKinds.h - ARM Specific Fixup Entries ------------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 
00010 #ifndef LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMFIXUPKINDS_H
00011 #define LLVM_LIB_TARGET_ARM_MCTARGETDESC_ARMFIXUPKINDS_H
00012 
00013 #include "llvm/MC/MCFixup.h"
00014 
00015 namespace llvm {
00016 namespace ARM {
00017 enum Fixups {
00018   // fixup_arm_ldst_pcrel_12 - 12-bit PC relative relocation for symbol
00019   // addresses
00020   fixup_arm_ldst_pcrel_12 = FirstTargetFixupKind,
00021 
00022   // fixup_t2_ldst_pcrel_12 - Equivalent to fixup_arm_ldst_pcrel_12, with
00023   // the 16-bit halfwords reordered.
00024   fixup_t2_ldst_pcrel_12,
00025 
00026   // fixup_arm_pcrel_10_unscaled - 10-bit PC relative relocation for symbol
00027   // addresses used in LDRD/LDRH/LDRB/etc. instructions. All bits are encoded.
00028   fixup_arm_pcrel_10_unscaled,
00029   // fixup_arm_pcrel_10 - 10-bit PC relative relocation for symbol addresses
00030   // used in VFP instructions where the lower 2 bits are not encoded
00031   // (so it's encoded as an 8-bit immediate).
00032   fixup_arm_pcrel_10,
00033   // fixup_t2_pcrel_10 - Equivalent to fixup_arm_pcrel_10, accounting for
00034   // the short-swapped encoding of Thumb2 instructions.
00035   fixup_t2_pcrel_10,
00036   // fixup_thumb_adr_pcrel_10 - 10-bit PC relative relocation for symbol
00037   // addresses where the lower 2 bits are not encoded (so it's encoded as an
00038   // 8-bit immediate).
00039   fixup_thumb_adr_pcrel_10,
00040   // fixup_arm_adr_pcrel_12 - 12-bit PC relative relocation for the ADR
00041   // instruction.
00042   fixup_arm_adr_pcrel_12,
00043   // fixup_t2_adr_pcrel_12 - 12-bit PC relative relocation for the ADR
00044   // instruction.
00045   fixup_t2_adr_pcrel_12,
00046   // fixup_arm_condbranch - 24-bit PC relative relocation for conditional branch
00047   // instructions. 
00048   fixup_arm_condbranch,
00049   // fixup_arm_uncondbranch - 24-bit PC relative relocation for 
00050   // branch instructions. (unconditional)
00051   fixup_arm_uncondbranch,
00052   // fixup_t2_condbranch - 20-bit PC relative relocation for Thumb2 direct
00053   // uconditional branch instructions.
00054   fixup_t2_condbranch,
00055   // fixup_t2_uncondbranch - 20-bit PC relative relocation for Thumb2 direct
00056   // branch unconditional branch instructions.
00057   fixup_t2_uncondbranch,
00058 
00059   // fixup_arm_thumb_br - 12-bit fixup for Thumb B instructions.
00060   fixup_arm_thumb_br,
00061 
00062   // The following fixups handle the ARM BL instructions. These can be
00063   // conditionalised; however, the ARM ELF ABI requires a different relocation
00064   // in that case: R_ARM_JUMP24 instead of R_ARM_CALL. The difference is that
00065   // R_ARM_CALL is allowed to change the instruction to a BLX inline, which has
00066   // no conditional version; R_ARM_JUMP24 would have to insert a veneer.
00067   //
00068   // MachO does not draw a distinction between the two cases, so it will treat
00069   // fixup_arm_uncondbl and fixup_arm_condbl as identical fixups.
00070 
00071   // fixup_arm_uncondbl - Fixup for unconditional ARM BL instructions.
00072   fixup_arm_uncondbl,
00073 
00074   // fixup_arm_condbl - Fixup for ARM BL instructions with nontrivial
00075   // conditionalisation.
00076   fixup_arm_condbl,
00077 
00078   // fixup_arm_blx - Fixup for ARM BLX instructions.
00079   fixup_arm_blx,
00080 
00081   // fixup_arm_thumb_bl - Fixup for Thumb BL instructions.
00082   fixup_arm_thumb_bl,
00083 
00084   // fixup_arm_thumb_blx - Fixup for Thumb BLX instructions.
00085   fixup_arm_thumb_blx,
00086 
00087   // fixup_arm_thumb_cb - Fixup for Thumb branch instructions.
00088   fixup_arm_thumb_cb,
00089 
00090   // fixup_arm_thumb_cp - Fixup for Thumb load/store from constant pool instrs.
00091   fixup_arm_thumb_cp,
00092 
00093   // fixup_arm_thumb_bcc - Fixup for Thumb conditional branching instructions.
00094   fixup_arm_thumb_bcc,
00095 
00096   // The next two are for the movt/movw pair
00097   // the 16bit imm field are split into imm{15-12} and imm{11-0}
00098   fixup_arm_movt_hi16, // :upper16:
00099   fixup_arm_movw_lo16, // :lower16:
00100   fixup_t2_movt_hi16, // :upper16:
00101   fixup_t2_movw_lo16, // :lower16:
00102 
00103   // Marker
00104   LastTargetFixupKind,
00105   NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
00106 };
00107 }
00108 }
00109 
00110 #endif