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