Go to the documentation of this file.
31 std::unique_ptr<MCObjectWriter>
34 switch (TW->getFormat()) {
43 cast<MCWinCOFFObjectTargetWriter>(
std::move(TW)), OS);
46 cast<MCSPIRVObjectTargetWriter>(
std::move(TW)), OS);
52 cast<MCXCOFFObjectTargetWriter>(
std::move(TW)), OS);
55 cast<MCDXContainerTargetWriter>(
std::move(TW)), OS);
61 std::unique_ptr<MCObjectWriter>
65 switch (TW->getFormat()) {
68 cast<MCELFObjectTargetWriter>(
std::move(TW)), OS, DwoOS,
72 cast<MCWasmObjectTargetWriter>(
std::move(TW)), OS, DwoOS);
85 {
"FK_Data_1", 0, 8, 0},
86 {
"FK_Data_2", 0, 16, 0},
87 {
"FK_Data_4", 0, 32, 0},
88 {
"FK_Data_8", 0, 64, 0},
89 {
"FK_Data_6b", 0, 6, 0},
94 {
"FK_GPRel_1", 0, 8, 0},
95 {
"FK_GPRel_2", 0, 16, 0},
96 {
"FK_GPRel_4", 0, 32, 0},
97 {
"FK_GPRel_8", 0, 64, 0},
98 {
"FK_DTPRel_4", 0, 32, 0},
99 {
"FK_DTPRel_8", 0, 64, 0},
100 {
"FK_TPRel_4", 0, 32, 0},
101 {
"FK_TPRel_8", 0, 64, 0},
102 {
"FK_SecRel_1", 0, 8, 0},
103 {
"FK_SecRel_2", 0, 16, 0},
104 {
"FK_SecRel_4", 0, 32, 0},
105 {
"FK_SecRel_8", 0, 64, 0},
109 return Builtins[
Kind];
115 const bool WasForced)
const {
This is an optimization pass for GlobalISel generic memory operations.
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
std::unique_ptr< MCObjectWriter > createELFObjectWriter(std::unique_ptr< MCELFObjectTargetWriter > MOTW, raw_pwrite_stream &OS, bool IsLittleEndian)
Construct a new ELF writer instance.
virtual const MCFixupKindInfo & getFixupKindInfo(MCFixupKind Kind) const
Get information on a fixup kind.
std::unique_ptr< MCObjectWriter > createDXContainerObjectWriter(std::unique_ptr< MCDXContainerTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new DXContainer writer instance.
std::unique_ptr< MCObjectWriter > createWasmObjectWriter(std::unique_ptr< MCWasmObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new Wasm writer instance.
std::unique_ptr< MCObjectWriter > createSPIRVObjectWriter(std::unique_ptr< MCSPIRVObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new SPIR-V writer instance.
std::unique_ptr< MCObjectWriter > createDwoObjectWriter(raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS) const
Create an MCObjectWriter that writes two object files: a .o file which is linked into the final progr...
std::unique_ptr< MCObjectWriter > createWinCOFFObjectWriter(std::unique_ptr< MCWinCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
Construct a new Win COFF writer instance.
const support::endianness Endian
std::unique_ptr< MCObjectWriter > createXCOFFObjectWriter(std::unique_ptr< MCXCOFFObjectTargetWriter > MOTW, raw_pwrite_stream &OS)
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
std::unique_ptr< MCObjectWriter > createMachObjectWriter(std::unique_ptr< MCMachObjectTargetWriter > MOTW, raw_pwrite_stream &OS, bool IsLittleEndian)
Construct a new Mach-O writer instance.
An abstract base class for streams implementations that also support a pwrite operation.
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
@ FKF_IsPCRel
Is this fixup kind PCrelative? This is used by the assembler backend to evaluate fixup values in a ta...
virtual Optional< MCFixupKind > getFixupKind(StringRef Name) const
Map a relocation name used in .reloc to a fixup kind.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Target independent information on a fixup kind.
virtual bool fixupNeedsRelaxationAdvanced(const MCFixup &Fixup, bool Resolved, uint64_t Value, const MCRelaxableFragment *DF, const MCAsmLayout &Layout, const bool WasForced) const
Target specific predicate for whether a given fixup requires the associated instruction to be relaxed...
PowerPC TLS Dynamic Call Fixup
StringRef - Represent a constant reference to a string, i.e.
virtual std::unique_ptr< MCObjectTargetWriter > createObjectTargetWriter() const =0
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
Encapsulates the layout of an assembly file at a particular point in time.
virtual bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, const MCRelaxableFragment *DF, const MCAsmLayout &Layout) const =0
Simple predicate for targets where !Resolved implies requiring relaxation.
std::unique_ptr< MCObjectWriter > createELFDwoObjectWriter(std::unique_ptr< MCELFObjectTargetWriter > MOTW, raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS, bool IsLittleEndian)
MCFixupKind
Extensible enumeration to represent the type of a fixup.
std::unique_ptr< MCObjectWriter > createObjectWriter(raw_pwrite_stream &OS) const
Create a new MCObjectWriter instance for use by the assembler backend to emit the final object file.
std::unique_ptr< MCObjectWriter > createWasmDwoObjectWriter(std::unique_ptr< MCWasmObjectTargetWriter > MOTW, raw_pwrite_stream &OS, raw_pwrite_stream &DwoOS)
MCAsmBackend(support::endianness Endian)
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
LLVM Value Representation.