blob: 8ee61d11aa8d28d06e786a799d6fe66d09066e95 [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,
Owen Andersond7b3f582010-12-09 01:51:07 +000021
22 // 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,
25
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,
Jim Grosbach662a8162010-12-06 23:57:07 +000036 // fixup_arm_branch - 24-bit PC relative relocation for direct branch
Jim Grosbachc466b932010-11-11 18:04:49 +000037 // instructions.
38 fixup_arm_branch,
Owen Andersonfb20d892010-12-09 00:27:41 +000039 // fixup_t2_branch - 20-bit PC relative relocation for Thumb2 direct branch
40 // instructions.
41 fixup_t2_branch,
Bill Wendlingdff2f712010-12-08 23:01:43 +000042
Bill Wendling09aa3f02010-12-09 00:39:08 +000043 // fixup_arm_thumb_blx - Fixup for Thumb BL instructions.
Jim Grosbach662a8162010-12-06 23:57:07 +000044 fixup_arm_thumb_bl,
Jim Grosbachc466b932010-11-11 18:04:49 +000045
Bill Wendling09aa3f02010-12-09 00:39:08 +000046 // fixup_arm_thumb_blx - Fixup for Thumb BLX instructions.
47 fixup_arm_thumb_blx,
48
Bill Wendlingdff2f712010-12-08 23:01:43 +000049 // fixup_arm_thumb_br - Fixup for Thumb branch instructions.
50 fixup_arm_thumb_br,
51
Bill Wendlingb8958b02010-12-08 01:57:09 +000052 // fixup_arm_thumb_cp - Fixup for Thumb load/store from constant pool instrs.
53 fixup_arm_thumb_cp,
54
Jason W Kim837caa92010-11-18 23:37:15 +000055 // The next two are for the movt/movw pair
56 // the 16bit imm field are split into imm{15-12} and imm{11-0}
57 // Fixme: We need new ones for Thumb.
58 fixup_arm_movt_hi16, // :upper16:
59 fixup_arm_movw_lo16, // :lower16:
60
Jim Grosbachc466b932010-11-11 18:04:49 +000061 // Marker
62 LastTargetFixupKind,
63 NumTargetFixupKinds = LastTargetFixupKind - FirstTargetFixupKind
Jim Grosbach70933262010-11-04 01:12:30 +000064};
65}
66}
67
68#endif