blob: eb568da38efa45cff406f4fe1a9e4be45353a6b7 [file] [log] [blame]
Jim Grosbach70933262010-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 Grosbachdff84b02010-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 Grosbach8d6d7d62010-12-14 21:28:29 +000021
Owen Andersond7b3f582010-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 Grosbach8d6d7d62010-12-14 21:28:29 +000025
Owen Anderson9d63d902010-12-01 19:18:46 +000026 // fixup_arm_pcrel_10 - 10-bit PC relative relocation for symbol addresses
Owen Andersond8e351b2010-12-08 00:18:36 +000027 // used in VFP instructions where the lower 2 bits are not encoded
Owen Anderson9d63d902010-12-01 19:18:46 +000028 // (so it's encoded as an 8-bit immediate).
29 fixup_arm_pcrel_10,
Owen Andersond8e351b2010-12-08 00:18:36 +000030 // fixup_t2_pcrel_10 - Equivalent to fixup_arm_pcrel_10, accounting for
Owen Andersonfb20d892010-12-09 00:27:41 +000031 // the short-swapped encoding of Thumb2 instructions.
Owen Andersond8e351b2010-12-08 00:18:36 +000032 fixup_t2_pcrel_10,
Jim Grosbachdff84b02010-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 Andersona838a252010-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 Grosbach662a8162010-12-06 23:57:07 +000039 // fixup_arm_branch - 24-bit PC relative relocation for direct branch
Jim Grosbachc466b932010-11-11 18:04:49 +000040 // instructions.
41 fixup_arm_branch,
Jim Grosbach8d6d7d62010-12-14 21:28:29 +000042 // fixup_t2_condbranch - 20-bit PC relative relocation for Thumb2 direct
Owen Andersonc2666002010-12-13 19:31:11 +000043 // uconditional branch instructions.
44 fixup_t2_condbranch,
Jim Grosbach8d6d7d62010-12-14 21:28:29 +000045 // fixup_t2_uncondbranch - 20-bit PC relative relocation for Thumb2 direct
Owen Andersonc2666002010-12-13 19:31:11 +000046 // branch unconditional branch instructions.
47 fixup_t2_uncondbranch,
Bill Wendlingdff2f712010-12-08 23:01:43 +000048
Jim Grosbache2467172010-12-10 18:21:33 +000049 // fixup_arm_thumb_br - 12-bit fixup for Thumb B instructions.
50 fixup_arm_thumb_br,
51
Bill Wendling09aa3f02010-12-09 00:39:08 +000052 // fixup_arm_thumb_blx - Fixup for Thumb BL instructions.
Jim Grosbach662a8162010-12-06 23:57:07 +000053 fixup_arm_thumb_bl,
Jim Grosbachc466b932010-11-11 18:04:49 +000054
Bill Wendling09aa3f02010-12-09 00:39:08 +000055 // fixup_arm_thumb_blx - Fixup for Thumb BLX instructions.
56 fixup_arm_thumb_blx,
57
Jim Grosbachb492a7c2010-12-09 19:50:12 +000058 // fixup_arm_thumb_cb - Fixup for Thumb branch instructions.
59 fixup_arm_thumb_cb,
Bill Wendlingdff2f712010-12-08 23:01:43 +000060
Bill Wendlingb8958b02010-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
Bill Wendlingee2b3502010-12-14 22:26:49 +000064 // fixup_arm_thumb_bcc - Fixup for Thumb conditional branching instructions.
Jim Grosbach01086452010-12-10 17:13:40 +000065 fixup_arm_thumb_bcc,
66
Jason W Kim837caa92010-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 Grosbachc466b932010-11-11 18:04:49 +000073 // Marker
74 LastTargetFixupKind,
75 NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
Jim Grosbach70933262010-11-04 01:12:30 +000076};
77}
78}
79
80#endif