1*e8d8bef9SDimitry Andric //===-- CSKYAsmBackend.h - CSKY Assembler Backend -------------------------===// 2*e8d8bef9SDimitry Andric // 3*e8d8bef9SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*e8d8bef9SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*e8d8bef9SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*e8d8bef9SDimitry Andric // 7*e8d8bef9SDimitry Andric //===----------------------------------------------------------------------===// 8*e8d8bef9SDimitry Andric 9*e8d8bef9SDimitry Andric #ifndef LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H 10*e8d8bef9SDimitry Andric #define LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H 11*e8d8bef9SDimitry Andric 12*e8d8bef9SDimitry Andric #include "llvm/MC/MCAsmBackend.h" 13*e8d8bef9SDimitry Andric #include "llvm/MC/MCTargetOptions.h" 14*e8d8bef9SDimitry Andric 15*e8d8bef9SDimitry Andric namespace llvm { 16*e8d8bef9SDimitry Andric 17*e8d8bef9SDimitry Andric class CSKYAsmBackend : public MCAsmBackend { 18*e8d8bef9SDimitry Andric 19*e8d8bef9SDimitry Andric public: 20*e8d8bef9SDimitry Andric CSKYAsmBackend(const MCSubtargetInfo &STI, const MCTargetOptions &OP) 21*e8d8bef9SDimitry Andric : MCAsmBackend(support::little) {} 22*e8d8bef9SDimitry Andric 23*e8d8bef9SDimitry Andric unsigned int getNumFixupKinds() const override; 24*e8d8bef9SDimitry Andric void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup, 25*e8d8bef9SDimitry Andric const MCValue &Target, MutableArrayRef<char> Data, 26*e8d8bef9SDimitry Andric uint64_t Value, bool IsResolved, 27*e8d8bef9SDimitry Andric const MCSubtargetInfo *STI) const override; 28*e8d8bef9SDimitry Andric bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value, 29*e8d8bef9SDimitry Andric const MCRelaxableFragment *DF, 30*e8d8bef9SDimitry Andric const MCAsmLayout &Layout) const override; 31*e8d8bef9SDimitry Andric void relaxInstruction(MCInst &Inst, 32*e8d8bef9SDimitry Andric const MCSubtargetInfo &STI) const override; 33*e8d8bef9SDimitry Andric bool writeNopData(raw_ostream &OS, uint64_t Count) const override; 34*e8d8bef9SDimitry Andric std::unique_ptr<MCObjectTargetWriter> 35*e8d8bef9SDimitry Andric createObjectTargetWriter() const override; 36*e8d8bef9SDimitry Andric }; 37*e8d8bef9SDimitry Andric } // namespace llvm 38*e8d8bef9SDimitry Andric 39*e8d8bef9SDimitry Andric #endif // LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H 40