26 ~BPFAsmBackend()
override =
default;
30 uint64_t
Value,
bool IsResolved,
33 std::unique_ptr<MCObjectTargetWriter>
34 createObjectTargetWriter()
const override;
37 bool fixupNeedsRelaxation(
const MCFixup &Fixup, uint64_t
Value,
43 unsigned getNumFixupKinds()
const override {
return 1; }
45 bool mayNeedRelaxation(
const MCInst &Inst,
51 MCInst &Res)
const override {}
53 bool writeNopData(
raw_ostream &OS, uint64_t Count)
const override;
58 bool BPFAsmBackend::writeNopData(
raw_ostream &OS, uint64_t Count)
const {
62 for (uint64_t i = 0; i < Count; i += 8)
63 support::endian::write<uint64_t>(OS, 0x15000000, Endian);
76 support::endian::write<uint32_t>(&Data[Fixup.
getOffset()], Value, Endian);
78 support::endian::write<uint64_t>(&Data[Fixup.
getOffset()], Value, Endian);
90 Value = (uint16_t)((Value - 8) / 8);
91 support::endian::write<uint16_t>(&Data[Fixup.
getOffset() + 2], Value,
96 std::unique_ptr<MCObjectTargetWriter>
97 BPFAsmBackend::createObjectTargetWriter()
const {
void write32be(void *P, uint32_t V)
Compute iterated dominance frontiers using a linear time algorithm.
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
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