X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FPowerPC%2FPPCRelocations.h;h=a33e7e03370c7414d871dab9c5cb67dd2fc67ac3;hb=40e0bad33193112eab0cc40a556ed347e6568cfe;hp=54de9a6fa292398702a5e05df96b87d7d3738c16;hpb=42edd31209a14710196262c728d4863e19a1c5a9;p=oota-llvm.git diff --git a/lib/Target/PowerPC/PPCRelocations.h b/lib/Target/PowerPC/PPCRelocations.h index 54de9a6fa29..a33e7e03370 100644 --- a/lib/Target/PowerPC/PPCRelocations.h +++ b/lib/Target/PowerPC/PPCRelocations.h @@ -1,10 +1,10 @@ -//===- PPC32Relocations.h - PPC32 Code Relocations --------------*- C++ -*-===// -// +//===- PPCRelocations.h - PPC32 Code Relocations ----------------*- C++ -*-===// +// // The LLVM Compiler Infrastructure // -// This file was developed by the LLVM research group and is distributed under -// the University of Illinois Open Source License. See LICENSE.TXT for details. -// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// //===----------------------------------------------------------------------===// // // This file defines the PowerPC 32-bit target-specific relocation types. @@ -16,21 +16,39 @@ #include "llvm/CodeGen/MachineRelocation.h" +// Hack to rid us of a PPC pre-processor symbol which is erroneously +// defined in a PowerPC header file (bug in Linux/PPC) +#ifdef PPC +#undef PPC +#endif + namespace llvm { namespace PPC { enum RelocationType { + // reloc_vanilla - A standard relocation, where the address of the + // relocated object completely overwrites the address of the relocation. + reloc_vanilla, + // reloc_pcrel_bx - PC relative relocation, for the b or bl instructions. reloc_pcrel_bx, - // reloc_absolute_loadhi - Absolute relocation, for the loadhi instruction + // reloc_pcrel_bcx - PC relative relocation, for BLT,BLE,BEQ,BGE,BGT,BNE, + // and other bcx instructions. + reloc_pcrel_bcx, + + // reloc_absolute_high - Absolute relocation, for the loadhi instruction // (which is really addis). Add the high 16-bits of the specified global - // address into the immediate field of the addis. - reloc_absolute_loadhi, + // address into the low 16-bits of the instruction. + reloc_absolute_high, - // reloc_absolute_la - Absolute relocation, for the la instruction (which - // is really an addi). Add the low 16-bits of teh specified global - // address into the immediate field of the addi. - reloc_absolute_la, + // reloc_absolute_low - Absolute relocation, for the la instruction (which + // is really an addi). Add the low 16-bits of the specified global + // address into the low 16-bits of the instruction. + reloc_absolute_low, + + // reloc_absolute_low_ix - Absolute relocation for the 64-bit load/store + // instruction which have two implicit zero bits. + reloc_absolute_low_ix }; } }