2004-11-23 06:57:38 +01:00
|
|
|
//===- PPC32Relocations.h - PPC32 Code Relocations --------------*- C++ -*-===//
|
2005-04-22 01:30:14 +02:00
|
|
|
//
|
2004-11-23 06:57:38 +01:00
|
|
|
// 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.
|
2005-04-22 01:30:14 +02:00
|
|
|
//
|
2004-11-23 06:57:38 +01:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
//
|
|
|
|
// This file defines the PowerPC 32-bit target-specific relocation types.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef PPC32RELOCATIONS_H
|
|
|
|
#define PPC32RELOCATIONS_H
|
|
|
|
|
|
|
|
#include "llvm/CodeGen/MachineRelocation.h"
|
|
|
|
|
2005-07-27 07:53:44 +02:00
|
|
|
// Hack to rid us of a PPC pre-processor symbol which is erroneously
|
2005-06-08 19:44:48 +02:00
|
|
|
// defined in a PowerPC header file (bug in Linux/PPC)
|
|
|
|
#ifdef PPC
|
|
|
|
#undef PPC
|
|
|
|
#endif
|
|
|
|
|
2004-11-23 06:57:38 +01:00
|
|
|
namespace llvm {
|
|
|
|
namespace PPC {
|
|
|
|
enum RelocationType {
|
|
|
|
// reloc_pcrel_bx - PC relative relocation, for the b or bl instructions.
|
|
|
|
reloc_pcrel_bx,
|
|
|
|
|
2004-11-24 23:30:08 +01:00
|
|
|
// reloc_absolute_high - Absolute relocation, for the loadhi instruction
|
2004-11-23 06:57:38 +01:00
|
|
|
// (which is really addis). Add the high 16-bits of the specified global
|
2004-11-24 23:30:08 +01:00
|
|
|
// address into the low 16-bits of the instruction.
|
|
|
|
reloc_absolute_high,
|
2004-11-23 06:57:38 +01:00
|
|
|
|
2004-11-24 23:30:08 +01:00
|
|
|
// reloc_absolute_low - Absolute relocation, for the la instruction (which
|
2004-11-23 06:57:38 +01:00
|
|
|
// is really an addi). Add the low 16-bits of teh specified global
|
2004-11-24 23:30:08 +01:00
|
|
|
// address into the low 16-bits of the instruction.
|
|
|
|
reloc_absolute_low,
|
|
|
|
|
|
|
|
// reloc_absolute_ptr_high - Absolute relocation for references to lazy
|
|
|
|
// pointer stubs. In this case, the relocated instruction should be
|
|
|
|
// relocated to point to a POINTER to the indicated global. The low-16
|
|
|
|
// bits of the instruction are rewritten with the high 16-bits of the
|
|
|
|
// address of the pointer.
|
|
|
|
reloc_absolute_ptr_high,
|
|
|
|
|
|
|
|
// reloc_absolute_ptr_low - Absolute relocation for references to lazy
|
|
|
|
// pointer stubs. In this case, the relocated instruction should be
|
|
|
|
// relocated to point to a POINTER to the indicated global. The low-16
|
|
|
|
// bits of the instruction are rewritten with the low 16-bits of the
|
|
|
|
// address of the pointer.
|
|
|
|
reloc_absolute_ptr_low,
|
2004-11-23 06:57:38 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|