LLVM API Documentation
00001 //===- PPCRelocations.h - PPC32 Code Relocations ----------------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines the PowerPC 32-bit target-specific relocation types. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef PPC32RELOCATIONS_H 00015 #define PPC32RELOCATIONS_H 00016 00017 #include "llvm/CodeGen/MachineRelocation.h" 00018 00019 // Hack to rid us of a PPC pre-processor symbol which is erroneously 00020 // defined in a PowerPC header file (bug in Linux/PPC) 00021 #ifdef PPC 00022 #undef PPC 00023 #endif 00024 00025 namespace llvm { 00026 namespace PPC { 00027 enum RelocationType { 00028 // reloc_pcrel_bx - PC relative relocation, for the b or bl instructions. 00029 reloc_pcrel_bx, 00030 00031 // reloc_absolute_high - Absolute relocation, for the loadhi instruction 00032 // (which is really addis). Add the high 16-bits of the specified global 00033 // address into the low 16-bits of the instruction. 00034 reloc_absolute_high, 00035 00036 // reloc_absolute_low - Absolute relocation, for the la instruction (which 00037 // is really an addi). Add the low 16-bits of teh specified global 00038 // address into the low 16-bits of the instruction. 00039 reloc_absolute_low, 00040 00041 // reloc_absolute_ptr_high - Absolute relocation for references to lazy 00042 // pointer stubs. In this case, the relocated instruction should be 00043 // relocated to point to a POINTER to the indicated global. The low-16 00044 // bits of the instruction are rewritten with the high 16-bits of the 00045 // address of the pointer. 00046 reloc_absolute_ptr_high, 00047 00048 // reloc_absolute_ptr_low - Absolute relocation for references to lazy 00049 // pointer stubs. In this case, the relocated instruction should be 00050 // relocated to point to a POINTER to the indicated global. The low-16 00051 // bits of the instruction are rewritten with the low 16-bits of the 00052 // address of the pointer. 00053 reloc_absolute_ptr_low, 00054 }; 00055 } 00056 } 00057 00058 #endif