30 BPFAsmBackend(
bool IsLittleEndian)
32 ~BPFAsmBackend()
override {}
35 uint64_t
Value,
bool IsPCRel)
const override;
46 unsigned getNumFixupKinds()
const override {
return 1; }
48 bool mayNeedRelaxation(
const MCInst &Inst)
const override {
return false; }
50 void relaxInstruction(
const MCInst &Inst,
MCInst &Res)
const override {}
52 bool writeNopData(uint64_t Count,
MCObjectWriter *OW)
const override;
55 bool BPFAsmBackend::writeNopData(uint64_t Count,
MCObjectWriter *OW)
const {
59 for (uint64_t i = 0; i < Count; i += 8)
66 unsigned DataSize, uint64_t
Value,
74 Value = (uint16_t)((Value - 8) / 8);
76 Data[Fixup.
getOffset() + 2] = Value & 0xFF;
80 Data[Fixup.
getOffset() + 3] = Value & 0xFF;
92 return new BPFAsmBackend(
true);
98 return new BPFAsmBackend(
false);
void write64(uint64_t Value)
MCObjectWriter * createBPFELFObjectWriter(raw_pwrite_stream &OS, uint8_t OSABI, bool IsLittleEndian)
Defines the object file and target independent interfaces used by the assembler backend to write nati...
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.
uint32_t getOffset() const
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...
MCFixupKind getKind() const
Triple - Helper class for working with autoconf configuration names.
MCAsmBackend * createBPFAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU)
PowerPC TLS Dynamic Call Fixup
A two-byte pc relative fixup.
Target - Wrapper for Target specific information.
MCAsmBackend * createBPFbeAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT, StringRef CPU)
A eight-byte section relative fixup.
An abstract base class for streams implementations that also support a pwrite operation.
LLVM Value Representation.
Generic interface to target specific assembler backends.
StringRef - Represent a constant reference to a string, i.e.