LLVM API Documentation
00001 //===-- X86Relocations.h - X86 Code Relocations -----------------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines the X86 target-specific relocation types. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef LLVM_LIB_TARGET_X86_X86RELOCATIONS_H 00015 #define LLVM_LIB_TARGET_X86_X86RELOCATIONS_H 00016 00017 #include "llvm/CodeGen/MachineRelocation.h" 00018 00019 namespace llvm { 00020 namespace X86 { 00021 /// RelocationType - An enum for the x86 relocation codes. Note that 00022 /// the terminology here doesn't follow x86 convention - word means 00023 /// 32-bit and dword means 64-bit. The relocations will be treated 00024 /// by JIT or ObjectCode emitters, this is transparent to the x86 code 00025 /// emitter but JIT and ObjectCode will treat them differently 00026 enum RelocationType { 00027 /// reloc_pcrel_word - PC relative relocation, add the relocated value to 00028 /// the value already in memory, after we adjust it for where the PC is. 00029 reloc_pcrel_word = 0, 00030 00031 /// reloc_picrel_word - PIC base relative relocation, add the relocated 00032 /// value to the value already in memory, after we adjust it for where the 00033 /// PIC base is. 00034 reloc_picrel_word = 1, 00035 00036 /// reloc_absolute_word - absolute relocation, just add the relocated 00037 /// value to the value already in memory. 00038 reloc_absolute_word = 2, 00039 00040 /// reloc_absolute_word_sext - absolute relocation, just add the relocated 00041 /// value to the value already in memory. In object files, it represents a 00042 /// value which must be sign-extended when resolving the relocation. 00043 reloc_absolute_word_sext = 3, 00044 00045 /// reloc_absolute_dword - absolute relocation, just add the relocated 00046 /// value to the value already in memory. 00047 reloc_absolute_dword = 4 00048 }; 00049 } 00050 } 00051 00052 #endif