// SPDX-License-Identifier: GPL-3.0-or-later #ifndef RCC_TARGET_RISCV_RISCVASMBACKEND_H #define RCC_TARGET_RISCV_RISCVASMBACKEND_H #include "rcc/MC/MCAsmBackend.h" namespace rcc::riscv { class RISCVAsmBackend final : public mc::MCAsmBackend { public: [[nodiscard]] Expected fixupKindInfo(mc::MCFixupKind Kind) const override; [[nodiscard]] Expected applyFixup(mc::MCFixupKind Kind, std::span Data, std::uint64_t Offset, std::int64_t Value) const override; [[nodiscard]] Expected relocationType(const mc::MCFixup &Fixup, const mc::MCValue &Value) const override; [[nodiscard]] Expected> relocationsForFixup(const mc::MCFixup &Fixup, const mc::MCValue &Value) const override; [[nodiscard]] bool mayNeedRelaxation(const mc::MCInst &Instruction) const noexcept override; [[nodiscard]] Expected fixupNeedsRelaxation(const mc::MCFixup &Fixup, std::int64_t Value) const override; [[nodiscard]] Expected relaxInstruction(const mc::MCInst &Instruction) const override; [[nodiscard]] std::uint32_t objectFlags() const noexcept override; }; } // namespace rcc::riscv #endif // RCC_TARGET_RISCV_RISCVASMBACKEND_H