Path: blob/main/contrib/llvm-project/llvm/lib/Target/CSKY/MCTargetDesc/CSKYAsmBackend.h
35294 views
//===-- CSKYAsmBackend.h - CSKY Assembler Backend -------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H9#define LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H1011#include "MCTargetDesc/CSKYFixupKinds.h"12#include "llvm/MC/MCAsmBackend.h"13#include "llvm/MC/MCSubtargetInfo.h"14#include "llvm/MC/MCTargetOptions.h"1516namespace llvm {1718class CSKYAsmBackend : public MCAsmBackend {1920public:21CSKYAsmBackend(const MCSubtargetInfo &STI, const MCTargetOptions &OP)22: MCAsmBackend(llvm::endianness::little) {}2324unsigned int getNumFixupKinds() const override {25return CSKY::NumTargetFixupKinds;26}2728void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,29const MCValue &Target, MutableArrayRef<char> Data,30uint64_t Value, bool IsResolved,31const MCSubtargetInfo *STI) const override;3233const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;3435bool fixupNeedsRelaxation(const MCFixup &Fixup,36uint64_t Value) const override;3738void relaxInstruction(MCInst &Inst,39const MCSubtargetInfo &STI) const override;4041bool mayNeedRelaxation(const MCInst &Inst,42const MCSubtargetInfo &STI) const override;4344bool fixupNeedsRelaxationAdvanced(const MCAssembler &Asm,45const MCFixup &Fixup, bool Resolved,46uint64_t Value,47const MCRelaxableFragment *DF,48const bool WasForced) const override;4950bool writeNopData(raw_ostream &OS, uint64_t Count,51const MCSubtargetInfo *STI) const override;5253bool shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup,54const MCValue &Target,55const MCSubtargetInfo *STI) override;5657std::unique_ptr<MCObjectTargetWriter>58createObjectTargetWriter() const override;59};60} // namespace llvm6162#endif // LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H636465