ARMRelocations.h revision 36b56886974eae4f9c5ebc96befd3e7bfe5de338
11176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//===-- ARMRelocations.h - ARM Code Relocations -----------------*- C++ -*-===//
21176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//
31176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//                     The LLVM Compiler Infrastructure
41176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//
51176bdada62cabc6ec4b0308a930e83b679d5d36John Reck// This file is distributed under the University of Illinois Open Source
61176bdada62cabc6ec4b0308a930e83b679d5d36John Reck// License. See LICENSE.TXT for details.
71176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//
81176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//===----------------------------------------------------------------------===//
91176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//
101176bdada62cabc6ec4b0308a930e83b679d5d36John Reck// This file defines the ARM target-specific relocation types.
111176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//
121176bdada62cabc6ec4b0308a930e83b679d5d36John Reck//===----------------------------------------------------------------------===//
131176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
141176bdada62cabc6ec4b0308a930e83b679d5d36John Reck#ifndef ARMRELOCATIONS_H
151176bdada62cabc6ec4b0308a930e83b679d5d36John Reck#define ARMRELOCATIONS_H
161176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
171176bdada62cabc6ec4b0308a930e83b679d5d36John Reck#include "llvm/CodeGen/MachineRelocation.h"
181176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
191176bdada62cabc6ec4b0308a930e83b679d5d36John Recknamespace llvm {
201176bdada62cabc6ec4b0308a930e83b679d5d36John Reck  namespace ARM {
211176bdada62cabc6ec4b0308a930e83b679d5d36John Reck    enum RelocationType {
221176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_absolute - Absolute relocation, just add the relocated value
231176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // to the value already in memory.
241176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_absolute,
251176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
261176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_relative - PC relative relocation, add the relocated value to
271176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // the value already in memory, after we adjust it for where the PC is.
281176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_relative,
291176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
301176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_cp_entry - PC relative relocation for constpool_entry's whose
311176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // addresses are kept locally in a map.
321176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_cp_entry,
331176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
341176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_vfp_cp_entry - Same as reloc_arm_cp_entry except the offset
351176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // should be divided by 4.
361176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_vfp_cp_entry,
371176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
381176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_machine_cp_entry - Relocation of a ARM machine constantpool
391176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // entry.
401176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_machine_cp_entry,
411176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
421176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_jt_base - PC relative relocation for jump tables whose
431176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // addresses are kept locally in a map.
441176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_jt_base,
451176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
461176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_pic_jt - PIC jump table entry relocation: dest bb - jt base.
471176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_pic_jt,
481176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
491176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_branch - Branch address relocation.
501176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_branch,
511176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
521176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_movt  - MOVT immediate relocation.
531176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_movt,
541176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
551176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      // reloc_arm_movw  - MOVW immediate relocation.
561176bdada62cabc6ec4b0308a930e83b679d5d36John Reck      reloc_arm_movw
571176bdada62cabc6ec4b0308a930e83b679d5d36John Reck    };
581176bdada62cabc6ec4b0308a930e83b679d5d36John Reck  }
591176bdada62cabc6ec4b0308a930e83b679d5d36John Reck}
601176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
611176bdada62cabc6ec4b0308a930e83b679d5d36John Reck#endif
621176bdada62cabc6ec4b0308a930e83b679d5d36John Reck
631176bdada62cabc6ec4b0308a930e83b679d5d36John Reck