27 ~BPFAsmBackend()
override =
default;
31 uint64_t
Value,
bool IsResolved,
34 std::unique_ptr<MCObjectTargetWriter>
35 createObjectTargetWriter()
const override;
38 bool fixupNeedsRelaxation(
const MCFixup &Fixup, uint64_t
Value,
44 unsigned getNumFixupKinds()
const override {
return 1; }
46 bool mayNeedRelaxation(
const MCInst &Inst,
52 MCInst &Res)
const override {}
54 bool writeNopData(
raw_ostream &OS, uint64_t Count)
const override;
59 bool BPFAsmBackend::writeNopData(
raw_ostream &OS, uint64_t Count)
const {
63 for (uint64_t i = 0; i < Count; i += 8)
64 support::endian::write<uint64_t>(OS, 0x15000000, Endian);
77 assert(Value <= UINT32_MAX);
78 support::endian::write<uint32_t>(&Data[Fixup.
getOffset() + 4],
82 support::endian::write<uint32_t>(&Data[Fixup.
getOffset()],
Value, Endian);
84 support::endian::write<uint64_t>(&Data[Fixup.
getOffset()],
Value, Endian);
97 support::endian::write<uint16_t>(&Data[Fixup.
getOffset() + 2],
Value,
102 std::unique_ptr<MCObjectTargetWriter>
103 BPFAsmBackend::createObjectTargetWriter()
const {
void write32be(void *P, uint32_t V)
This class represents lattice values for constants.
std::unique_ptr< MCObjectTargetWriter > createBPFELFObjectWriter(uint8_t OSABI)
This represents an "assembler immediate".
void write32le(void *P, uint32_t V)
Encode information on a single operation to perform on a byte sequence (e.g., an encoded instruction)...
Encapsulates the layout of an assembly file at a particular point in time.
A four-byte section relative fixup.
MCAsmBackend * createBPFAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
Instances of this class represent a single low-level machine instruction.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
A relaxable fragment holds on to its MCInst, since it may need to be relaxed during the assembler lay...
unsigned const MachineRegisterInfo * MRI
MutableArrayRef - Represent a mutable reference to an array (0 or more elements consecutively in memo...
uint32_t getOffset() const
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
A two-byte pc relative fixup.
A four-byte pc relative fixup.
MCAsmBackend * createBPFbeAsmBackend(const Target &T, const MCSubtargetInfo &STI, const MCRegisterInfo &MRI, const MCTargetOptions &Options)
Target - Wrapper for Target specific information.
A eight-byte section relative fixup.
Generic base class for all target subtargets.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
Generic interface to target specific assembler backends.
This class implements an extremely fast bulk output stream that can only output to a stream...
MCFixupKind getKind() const