blob: fce88de0d652bf10ab37b703b157d8044bddd260 [file] [log] [blame]
Jim Grosbach0fb841f2010-11-04 01:12:30 +00001//===-- 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
15namespace llvm {
16namespace ARM {
17enum Fixups {
Jim Grosbachce2bd8d2010-12-02 00:28:45 +000018 // fixup_arm_ldst_pcrel_12 - 12-bit PC relative relocation for symbol
19 // addresses
20 fixup_arm_ldst_pcrel_12 = FirstTargetFixupKind,
Jim Grosbachd96bd532010-12-14 21:28:29 +000021
Owen Anderson3e6ee1d2010-12-09 01:51:07 +000022 // fixup_t2_ldst_pcrel_12 - Equivalent to fixup_arm_ldst_pcrel_12, with
23 // the 16-bit halfwords reordered.
24 fixup_t2_ldst_pcrel_12,
Jim Grosbachd96bd532010-12-14 21:28:29 +000025
Owen Anderson943fb602010-12-01 19:18:46 +000026 // fixup_arm_pcrel_10 - 10-bit PC relative relocation for symbol addresses
Owen Anderson0f7142d2010-12-08 00:18:36 +000027 // used in VFP instructions where the lower 2 bits are not encoded
Owen Anderson943fb602010-12-01 19:18:46 +000028 // (so it's encoded as an 8-bit immediate).
29 fixup_arm_pcrel_10,
Owen Anderson0f7142d2010-12-08 00:18:36 +000030 // fixup_t2_pcrel_10 - Equivalent to fixup_arm_pcrel_10, accounting for
Owen Anderson302d5fd2010-12-09 00:27:41 +000031 // the short-swapped encoding of Thumb2 instructions.
Owen Anderson0f7142d2010-12-08 00:18:36 +000032 fixup_t2_pcrel_10,
Jim Grosbachce2bd8d2010-12-02 00:28:45 +000033 // fixup_arm_adr_pcrel_12 - 12-bit PC relative relocation for the ADR
34 // instruction.
35 fixup_arm_adr_pcrel_12,
Owen Anderson6d375e52010-12-14 00:36:49 +000036 // fixup_t2_adr_pcrel_12 - 12-bit PC relative relocation for the ADR
37 // instruction.
38 fixup_t2_adr_pcrel_12,
Jim Grosbach9e199462010-12-06 23:57:07 +000039 // fixup_arm_branch - 24-bit PC relative relocation for direct branch
Jim Grosbach9d6d77a2010-11-11 18:04:49 +000040 // instructions.
41 fixup_arm_branch,
Jim Grosbachd96bd532010-12-14 21:28:29 +000042 // fixup_t2_condbranch - 20-bit PC relative relocation for Thumb2 direct
Owen Anderson578074b2010-12-13 19:31:11 +000043 // uconditional branch instructions.
44 fixup_t2_condbranch,
Jim Grosbachd96bd532010-12-14 21:28:29 +000045 // fixup_t2_uncondbranch - 20-bit PC relative relocation for Thumb2 direct
Owen Anderson578074b2010-12-13 19:31:11 +000046 // branch unconditional branch instructions.
47 fixup_t2_uncondbranch,
Bill Wendlinga7d6aa92010-12-08 23:01:43 +000048
Jim Grosbache119da12010-12-10 18:21:33 +000049 // fixup_arm_thumb_br - 12-bit fixup for Thumb B instructions.
50 fixup_arm_thumb_br,
51
Bill Wendling3392bfc2010-12-09 00:39:08 +000052 // fixup_arm_thumb_blx - Fixup for Thumb BL instructions.
Jim Grosbach9e199462010-12-06 23:57:07 +000053 fixup_arm_thumb_bl,
Jim Grosbach9d6d77a2010-11-11 18:04:49 +000054
Bill Wendling3392bfc2010-12-09 00:39:08 +000055 // fixup_arm_thumb_blx - Fixup for Thumb BLX instructions.
56 fixup_arm_thumb_blx,
57
Jim Grosbach68b27eb2010-12-09 19:50:12 +000058 // fixup_arm_thumb_cb - Fixup for Thumb branch instructions.
59 fixup_arm_thumb_cb,
Bill Wendlinga7d6aa92010-12-08 23:01:43 +000060
Bill Wendling8a6449c2010-12-08 01:57:09 +000061 // fixup_arm_thumb_cp - Fixup for Thumb load/store from constant pool instrs.
62 fixup_arm_thumb_cp,
63
Jim Grosbach78485ad2010-12-10 17:13:40 +000064 // fixup_arm_thumb_bcc - Fixup for Thumb load/store from constant pool instrs.
65 fixup_arm_thumb_bcc,
66
Jason W Kim5a97bd82010-11-18 23:37:15 +000067 // The next two are for the movt/movw pair
68 // the 16bit imm field are split into imm{15-12} and imm{11-0}
69 // Fixme: We need new ones for Thumb.
70 fixup_arm_movt_hi16, // :upper16:
71 fixup_arm_movw_lo16, // :lower16:
72
Jim Grosbach9d6d77a2010-11-11 18:04:49 +000073 // Marker
74 LastTargetFixupKind,
75 NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
Jim Grosbach0fb841f2010-11-04 01:12:30 +000076};
77}
78}
79
80#endif