Jim Grosbach | 7093326 | 2010-11-04 01:12:30 +0000 | [diff] [blame] | 1 | //===-- ARM/ARMFixupKinds.h - ARM 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_ARM_ARMFIXUPKINDS_H |
| 11 | #define LLVM_ARM_ARMFIXUPKINDS_H |
| 12 | |
| 13 | #include "llvm/MC/MCFixup.h" |
| 14 | |
| 15 | namespace llvm { |
| 16 | namespace ARM { |
| 17 | enum Fixups { |
Jim Grosbach | dff84b0 | 2010-12-02 00:28:45 +0000 | [diff] [blame] | 18 | // fixup_arm_ldst_pcrel_12 - 12-bit PC relative relocation for symbol |
| 19 | // addresses |
| 20 | fixup_arm_ldst_pcrel_12 = FirstTargetFixupKind, |
Owen Anderson | 9d63d90 | 2010-12-01 19:18:46 +0000 | [diff] [blame] | 21 | // fixup_arm_pcrel_10 - 10-bit PC relative relocation for symbol addresses |
Owen Anderson | d8e351b | 2010-12-08 00:18:36 +0000 | [diff] [blame] | 22 | // used in VFP instructions where the lower 2 bits are not encoded |
Owen Anderson | 9d63d90 | 2010-12-01 19:18:46 +0000 | [diff] [blame] | 23 | // (so it's encoded as an 8-bit immediate). |
| 24 | fixup_arm_pcrel_10, |
Owen Anderson | d8e351b | 2010-12-08 00:18:36 +0000 | [diff] [blame] | 25 | // fixup_t2_pcrel_10 - Equivalent to fixup_arm_pcrel_10, accounting for |
Owen Anderson | fb20d89 | 2010-12-09 00:27:41 +0000 | [diff] [blame^] | 26 | // the short-swapped encoding of Thumb2 instructions. |
Owen Anderson | d8e351b | 2010-12-08 00:18:36 +0000 | [diff] [blame] | 27 | fixup_t2_pcrel_10, |
Jim Grosbach | dff84b0 | 2010-12-02 00:28:45 +0000 | [diff] [blame] | 28 | // fixup_arm_adr_pcrel_12 - 12-bit PC relative relocation for the ADR |
| 29 | // instruction. |
| 30 | fixup_arm_adr_pcrel_12, |
Jim Grosbach | 662a816 | 2010-12-06 23:57:07 +0000 | [diff] [blame] | 31 | // fixup_arm_branch - 24-bit PC relative relocation for direct branch |
Jim Grosbach | c466b93 | 2010-11-11 18:04:49 +0000 | [diff] [blame] | 32 | // instructions. |
| 33 | fixup_arm_branch, |
Owen Anderson | fb20d89 | 2010-12-09 00:27:41 +0000 | [diff] [blame^] | 34 | // fixup_t2_branch - 20-bit PC relative relocation for Thumb2 direct branch |
| 35 | // instructions. |
| 36 | fixup_t2_branch, |
Bill Wendling | dff2f71 | 2010-12-08 23:01:43 +0000 | [diff] [blame] | 37 | |
Jim Grosbach | 662a816 | 2010-12-06 23:57:07 +0000 | [diff] [blame] | 38 | // fixup_arm_thumb_bl - Fixup for Thumb BL/BLX instructions. |
| 39 | fixup_arm_thumb_bl, |
Jim Grosbach | c466b93 | 2010-11-11 18:04:49 +0000 | [diff] [blame] | 40 | |
Bill Wendling | dff2f71 | 2010-12-08 23:01:43 +0000 | [diff] [blame] | 41 | // fixup_arm_thumb_br - Fixup for Thumb branch instructions. |
| 42 | fixup_arm_thumb_br, |
| 43 | |
Bill Wendling | b8958b0 | 2010-12-08 01:57:09 +0000 | [diff] [blame] | 44 | // fixup_arm_thumb_cp - Fixup for Thumb load/store from constant pool instrs. |
| 45 | fixup_arm_thumb_cp, |
| 46 | |
Jason W Kim | 837caa9 | 2010-11-18 23:37:15 +0000 | [diff] [blame] | 47 | // The next two are for the movt/movw pair |
| 48 | // the 16bit imm field are split into imm{15-12} and imm{11-0} |
| 49 | // Fixme: We need new ones for Thumb. |
| 50 | fixup_arm_movt_hi16, // :upper16: |
| 51 | fixup_arm_movw_lo16, // :lower16: |
| 52 | |
Jim Grosbach | c466b93 | 2010-11-11 18:04:49 +0000 | [diff] [blame] | 53 | // Marker |
| 54 | LastTargetFixupKind, |
| 55 | NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind |
Jim Grosbach | 7093326 | 2010-11-04 01:12:30 +0000 | [diff] [blame] | 56 | }; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | #endif |