OSDN Git Service

radeonsi: initial WIP SI code
[android-x86/external-mesa.git] / src / gallium / drivers / radeon / AMDILELFWriterInfo.h
1 //===-- AMDILELFWriterInfo.h - Elf Writer Info for AMDIL ---------------===//
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 ELF writer information for the AMDIL backend.
11 //
12 //===---------------------------------------------------------------------===//
13 #ifndef _AMDIL_ELF_WRITER_INFO_H_
14 #define _AMDIL_ELF_WRITER_INFO_H_
15 #include "llvm/Target/TargetELFWriterInfo.h"
16
17 namespace llvm {
18   class AMDILELFWriterInfo : public TargetELFWriterInfo {
19   public:
20     AMDILELFWriterInfo(bool is64Bit_, bool isLittleEndian_);
21     virtual ~AMDILELFWriterInfo();
22
23     /// getRelocationType - Returns the target specific ELF Relocation type.
24     /// 'MachineRelTy' contains the object code independent relocation type
25     virtual unsigned getRelocationType(unsigned MachineRelTy) const;
26
27     /// 'hasRelocationAddend - True if the target uses and addend in the
28     /// ELF relocation entry.
29     virtual bool hasRelocationAddend() const;
30
31     /// getDefaultAddendForRelTy - Gets the default addend value for a
32     /// relocation entry based on the target ELF relocation type.
33     virtual long int getDefaultAddendForRelTy(unsigned RelTy,
34                                               long int Modifier = 0) const;
35
36     /// getRelTySize - Returns the size of relocatble field in bits
37     virtual unsigned getRelocationTySize(unsigned RelTy) const;
38
39     /// isPCRelativeRel - True if the relocation type is pc relative
40     virtual bool isPCRelativeRel(unsigned RelTy) const;
41
42     /// getJumpTableRelocationTy - Returns the machine relocation type used
43     /// to reference a jumptable.
44     virtual unsigned getAbsoluteLabelMachineRelTy() const;
45
46     /// computeRelocation - Some relocatable fields could be relocated
47     /// directly, avoiding the relocation symbol emission, compute the
48     /// final relocation value for this symbol.
49     virtual long int computeRelocation(unsigned SymOffset,
50                                        unsigned RelOffset,
51                                        unsigned RelTy) const;
52   };
53 } // namespace llvm
54 #endif // _AMDIL_ELF_WRITER_INFO_H_