blob: b225f480e4ed9a7be46e179452d4bdddabd4b323 [file] [log] [blame]
Chris Lattner8dad0132004-11-20 23:54:19 +00001//===- X86Relocations.h - X86 Code Relocations ------------------*- C++ -*-===//
Misha Brukman0e0a7a452005-04-21 23:38:14 +00002//
Chris Lattner8dad0132004-11-20 23:54:19 +00003// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Misha Brukman0e0a7a452005-04-21 23:38:14 +00007//
Chris Lattner8dad0132004-11-20 23:54:19 +00008//===----------------------------------------------------------------------===//
9//
10// This file defines the X86 target-specific relocation types.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef X86RELOCATIONS_H
15#define X86RELOCATIONS_H
16
17#include "llvm/CodeGen/MachineRelocation.h"
18
19namespace llvm {
20 namespace X86 {
Dan Gohmanc9f3cc32008-10-24 01:57:54 +000021 /// RelocationType - An enum for the x86 relocation codes. Note that
22 /// the terminology here doesn't follow x86 convention - word means
23 /// 32-bit and dword means 64-bit.
Chris Lattner8dad0132004-11-20 23:54:19 +000024 enum RelocationType {
25 // reloc_pcrel_word - PC relative relocation, add the relocated value to
26 // the value already in memory, after we adjust it for where the PC is.
27 reloc_pcrel_word = 0,
28
Evan Chengaabe38b2007-12-22 09:40:20 +000029 // reloc_picrel_word - PIC base relative relocation, add the relocated
30 // value to the value already in memory, after we adjust it for where the
31 // PIC base is.
32 reloc_picrel_word = 1,
33
Evan Cheng19f2ffc2006-12-05 04:01:03 +000034 // reloc_absolute_word, reloc_absolute_dword - Absolute relocation, just
35 // add the relocated value to the value already in memory.
Evan Chengaabe38b2007-12-22 09:40:20 +000036 reloc_absolute_word = 2,
37 reloc_absolute_dword = 3
Chris Lattner8dad0132004-11-20 23:54:19 +000038 };
39 }
40}
41
42#endif