LLVM API Documentation

PPCRelocations.h
Go to the documentation of this file.
00001 //===-- PPCRelocations.h - PPC 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 PowerPC 32-bit target-specific relocation types.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_LIB_TARGET_POWERPC_PPCRELOCATIONS_H
00015 #define LLVM_LIB_TARGET_POWERPC_PPCRELOCATIONS_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_vanilla - A standard relocation, where the address of the
00029       // relocated object completely overwrites the address of the relocation.
00030       reloc_vanilla,
00031     
00032       // reloc_pcrel_bx - PC relative relocation, for the b or bl instructions.
00033       reloc_pcrel_bx,
00034 
00035       // reloc_pcrel_bcx - PC relative relocation, for BLT,BLE,BEQ,BGE,BGT,BNE,
00036       // and other bcx instructions.
00037       reloc_pcrel_bcx,
00038 
00039       // reloc_absolute_high - Absolute relocation, for the loadhi instruction
00040       // (which is really addis).  Add the high 16-bits of the specified global
00041       // address into the low 16-bits of the instruction.
00042       reloc_absolute_high,
00043 
00044       // reloc_absolute_low - Absolute relocation, for the la instruction (which
00045       // is really an addi).  Add the low 16-bits of the specified global
00046       // address into the low 16-bits of the instruction.
00047       reloc_absolute_low,
00048       
00049       // reloc_absolute_low_ix - Absolute relocation for the 64-bit load/store
00050       // instruction which have two implicit zero bits.
00051       reloc_absolute_low_ix
00052     };
00053   }
00054 }
00055 
00056 #endif