Add 8-bit regclass and pattern for sext_inreg
[llvm/msp430.git] / lib / Target / PowerPC / PPCMachOWriterInfo.h
blobd46334df26028f337757484b5f146ede40094ba2
1 //===-- PPCMachOWriterInfo.h - Mach-O Writer Info for PowerPC ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file implements Mach-O writer information for the PowerPC backend.
12 //===----------------------------------------------------------------------===//
14 #ifndef PPC_MACHO_WRITER_INFO_H
15 #define PPC_MACHO_WRITER_INFO_H
17 #include "llvm/Target/TargetMachOWriterInfo.h"
19 namespace llvm {
21 // Forward declarations
22 class MachineRelocation;
23 class OutputBuffer;
24 class PPCTargetMachine;
26 class PPCMachOWriterInfo : public TargetMachOWriterInfo {
27 public:
28 PPCMachOWriterInfo(const PPCTargetMachine &TM);
29 virtual ~PPCMachOWriterInfo();
31 virtual unsigned GetTargetRelocation(MachineRelocation &MR,
32 unsigned FromIdx,
33 unsigned ToAddr,
34 unsigned ToIdx,
35 OutputBuffer &RelocOut,
36 OutputBuffer &SecOut,
37 bool Scattered, bool Extern) const;
39 // Constants for the relocation r_type field.
40 // See <mach-o/ppc/reloc.h>
41 enum {
42 PPC_RELOC_VANILLA, // generic relocation
43 PPC_RELOC_PAIR, // the second relocation entry of a pair
44 PPC_RELOC_BR14, // 14 bit branch displacement to word address
45 PPC_RELOC_BR24, // 24 bit branch displacement to word address
46 PPC_RELOC_HI16, // a PAIR follows with the low 16 bits
47 PPC_RELOC_LO16, // a PAIR follows with the high 16 bits
48 PPC_RELOC_HA16, // a PAIR follows, which is sign extended to 32b
49 PPC_RELOC_LO14 // LO16 with low 2 bits implicitly zero
53 } // end llvm namespace
55 #endif // PPC_MACHO_WRITER_INFO_H