28 ~BPFAsmBackend()
override =
default;
32 uint64_t
Value,
bool IsResolved,
35 std::unique_ptr<MCObjectTargetWriter>
36 createObjectTargetWriter()
const override;
39 bool fixupNeedsRelaxation(
const MCFixup &Fixup, uint64_t
Value,
45 unsigned getNumFixupKinds()
const override {
return 1; }
47 bool mayNeedRelaxation(
const MCInst &Inst,
53 MCInst &Res)
const override {}
55 bool writeNopData(
raw_ostream &OS, uint64_t Count)
const override;
60 bool BPFAsmBackend::writeNopData(
raw_ostream &OS, uint64_t Count)
const {
64 for (uint64_t i = 0; i < Count; i += 8)
65 support::endian::write<uint64_t>(OS, 0x15000000, Endian);
79 "Unsupported relocation: try to compile with -O2 or above, " 80 "or check your static variable usage");
83 support::endian::write<uint32_t>(&Data[Fixup.
getOffset()], Value, Endian);
85 support::endian::write<uint64_t>(&Data[Fixup.
getOffset()], Value, Endian);
97 Value = (uint16_t)((Value - 8) / 8);
98 support::endian::write<uint16_t>(&Data[Fixup.
getOffset() + 2], Value,
103 std::unique_ptr<MCObjectTargetWriter>
104 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)...
MCContext & getContext() const
Encapsulates the layout of an assembly file at a particular point in time.
A four-byte section relative fixup.
Context object for machine code objects.
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...
void reportError(SMLoc L, const Twine &Msg)
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