23 SparcELFObjectWriter(
bool Is64Bit,
bool IsV8Plus,
uint8_t OSABI)
30 ~SparcELFObjectWriter()
override =
default;
37 unsigned Type)
const override;
41unsigned SparcELFObjectWriter::getRelocType(
MCContext &Ctx,
51 return ELF::R_SPARC_DISP32;
55 switch(
Fixup.getTargetKind()) {
58 case FK_Data_1:
return ELF::R_SPARC_DISP8;
59 case FK_Data_2:
return ELF::R_SPARC_DISP16;
60 case FK_Data_4:
return ELF::R_SPARC_DISP32;
61 case FK_Data_8:
return ELF::R_SPARC_DISP64;
66 return ELF::R_SPARC_WDISP16;
73 switch(
Fixup.getTargetKind()) {
76 case FK_NONE:
return ELF::R_SPARC_NONE;
124 return ELF::R_SPARC_NONE;
127bool SparcELFObjectWriter::needsRelocateWithSymbol(
const MCValue &,
129 unsigned Type)
const {
138 case ELF::R_SPARC_GOT10:
139 case ELF::R_SPARC_GOT13:
140 case ELF::R_SPARC_GOT22:
141 case ELF::R_SPARC_GOTDATA_HIX22:
142 case ELF::R_SPARC_GOTDATA_LOX10:
143 case ELF::R_SPARC_GOTDATA_OP_HIX22:
144 case ELF::R_SPARC_GOTDATA_OP_LOX10:
149std::unique_ptr<MCObjectTargetWriter>
151 return std::make_unique<SparcELFObjectWriter>(Is64Bit, IsV8Plus, OSABI);
PowerPC TLS Dynamic Call Fixup
Context object for machine code objects.
virtual bool needsRelocateWithSymbol(const MCValue &Val, const MCSymbol &Sym, unsigned Type) const
virtual unsigned getRelocType(MCContext &Ctx, const MCValue &Target, const MCFixup &Fixup, bool IsPCRel) const =0
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
This represents an "assembler immediate".
Target - Wrapper for Target specific information.
The instances of the Type class are immutable: once they are created, they are never changed.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ fixup_sparc_lo10
fixup_sparc_lo10 - 10-bit fixup corresponding to lo(foo)
@ fixup_sparc_br16
fixup_sparc_bpr - 16-bit fixup for bpr
@ fixup_sparc_lm
fixup_sparc_lm - 22-bit fixup corresponding to lm(foo)
@ fixup_sparc_lox10
13-bit fixup corresponding to lox(foo)
@ fixup_sparc_hi22
fixup_sparc_hi22 - 22-bit fixup corresponding to hi(foo) for sethi
@ fixup_sparc_tls_gd_call
@ fixup_sparc_tls_ldo_lox10
@ fixup_sparc_tls_ldm_add
@ fixup_sparc_tls_le_hix22
@ fixup_sparc_m44
fixup_sparc_m44 - 10-bit fixup corresponding to m44(foo)
@ fixup_sparc_tls_ie_hi22
@ fixup_sparc_gotdata_hix22
22-bit fixup corresponding to gdop_hix22(foo)
@ fixup_sparc_hh
fixup_sparc_hh - 22-bit fixup corresponding to hh(foo)
@ fixup_sparc_got10
fixup_sparc_got10 - 10-bit fixup corresponding to got10(foo)
@ fixup_sparc_tls_le_lox10
@ fixup_sparc_got13
fixup_sparc_got13 - 13-bit fixup corresponding to got13(foo)
@ fixup_sparc_tls_ldo_hix22
@ fixup_sparc_tls_ldo_add
@ fixup_sparc_gotdata_op
32-bit fixup corresponding to gdop(foo)
@ fixup_sparc_tls_gd_hi22
fixups for Thread Local Storage
@ fixup_sparc_br19
fixup_sparc_br19 - 19-bit PC relative relocation for branches on icc/xcc
@ fixup_sparc_13
fixup_sparc_13 - 13-bit fixup
@ fixup_sparc_hix22
22-bit fixup corresponding to hix(foo)
@ fixup_sparc_tls_gd_lo10
@ fixup_sparc_got22
fixup_sparc_got22 - 22-bit fixup corresponding to got22(foo)
@ fixup_sparc_h44
fixup_sparc_h44 - 22-bit fixup corresponding to h44(foo)
@ fixup_sparc_tls_ldm_lo10
@ fixup_sparc_tls_ldm_call
@ fixup_sparc_tls_ie_lo10
@ fixup_sparc_pc22
fixup_sparc_pc22 - 22-bit fixup corresponding to pc22(foo)
@ fixup_sparc_tls_ldm_hi22
@ fixup_sparc_br22
fixup_sparc_br22 - 22-bit PC relative relocation for branches
@ fixup_sparc_l44
fixup_sparc_l44 - 12-bit fixup corresponding to l44(foo)
@ fixup_sparc_gotdata_lox10
13-bit fixup corresponding to gdop_lox10(foo)
@ fixup_sparc_pc10
fixup_sparc_pc10 - 10-bit fixup corresponding to pc10(foo)
@ fixup_sparc_hm
fixup_sparc_hm - 10-bit fixup corresponding to hm(foo)
@ fixup_sparc_wplt30
fixup_sparc_wplt30
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< MCObjectTargetWriter > createSparcELFObjectWriter(bool Is64Bit, bool IsV8Plus, uint8_t OSABI)
MCFixupKind
Extensible enumeration to represent the type of a fixup.
@ FirstLiteralRelocationKind
The range [FirstLiteralRelocationKind, MaxTargetFixupKind) is used for relocations coming from ....
@ FK_Data_8
A eight-byte fixup.
@ FK_Data_1
A one-byte fixup.
@ FK_Data_4
A four-byte fixup.
@ FK_Data_2
A two-byte fixup.