2012-02-18 12:03:15 +00:00
|
|
|
//===-- PPCRelocations.h - PPC Code Relocations -----------------*- C++ -*-===//
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-11-23 05:57:38 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 20:36:04 +00:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-21 23:30:14 +00:00
|
|
|
//
|
2004-11-23 05:57:38 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines the PowerPC 32-bit target-specific relocation types.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2012-02-18 12:03:15 +00:00
|
|
|
#ifndef PPCRELOCATIONS_H
|
|
|
|
#define PPCRELOCATIONS_H
|
2004-11-23 05:57:38 +00:00
|
|
|
|
|
|
|
#include "llvm/CodeGen/MachineRelocation.h"
|
|
|
|
|
2005-07-27 05:53:44 +00:00
|
|
|
// Hack to rid us of a PPC pre-processor symbol which is erroneously
|
2005-06-08 17:44:48 +00:00
|
|
|
// defined in a PowerPC header file (bug in Linux/PPC)
|
|
|
|
#ifdef PPC
|
|
|
|
#undef PPC
|
|
|
|
#endif
|
|
|
|
|
2004-11-23 05:57:38 +00:00
|
|
|
namespace llvm {
|
|
|
|
namespace PPC {
|
|
|
|
enum RelocationType {
|
2006-09-10 23:03:44 +00:00
|
|
|
// reloc_vanilla - A standard relocation, where the address of the
|
|
|
|
// relocated object completely overwrites the address of the relocation.
|
|
|
|
reloc_vanilla,
|
|
|
|
|
2004-11-23 05:57:38 +00:00
|
|
|
// reloc_pcrel_bx - PC relative relocation, for the b or bl instructions.
|
|
|
|
reloc_pcrel_bx,
|
|
|
|
|
2006-07-27 18:21:10 +00:00
|
|
|
// reloc_pcrel_bcx - PC relative relocation, for BLT,BLE,BEQ,BGE,BGT,BNE,
|
|
|
|
// and other bcx instructions.
|
|
|
|
reloc_pcrel_bcx,
|
|
|
|
|
2004-11-24 22:30:08 +00:00
|
|
|
// reloc_absolute_high - Absolute relocation, for the loadhi instruction
|
2004-11-23 05:57:38 +00:00
|
|
|
// (which is really addis). Add the high 16-bits of the specified global
|
2004-11-24 22:30:08 +00:00
|
|
|
// address into the low 16-bits of the instruction.
|
|
|
|
reloc_absolute_high,
|
2004-11-23 05:57:38 +00:00
|
|
|
|
2004-11-24 22:30:08 +00:00
|
|
|
// reloc_absolute_low - Absolute relocation, for the la instruction (which
|
2006-07-12 21:23:20 +00:00
|
|
|
// is really an addi). Add the low 16-bits of the specified global
|
2004-11-24 22:30:08 +00:00
|
|
|
// address into the low 16-bits of the instruction.
|
|
|
|
reloc_absolute_low,
|
2006-07-12 21:23:20 +00:00
|
|
|
|
|
|
|
// reloc_absolute_low_ix - Absolute relocation for the 64-bit load/store
|
|
|
|
// instruction which have two implicit zero bits.
|
2006-09-08 22:42:09 +00:00
|
|
|
reloc_absolute_low_ix
|
2004-11-23 05:57:38 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|