[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / CSKY / MCTargetDesc / CSKYAsmBackend.h
blobcdf688e9032a12b34224556322fb6dd4949053b5
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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H
10 #define LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H
12 #include "MCTargetDesc/CSKYFixupKinds.h"
13 #include "llvm/MC/MCAsmBackend.h"
14 #include "llvm/MC/MCTargetOptions.h"
16 namespace llvm {
18 class CSKYAsmBackend : public MCAsmBackend {
20 public:
21 CSKYAsmBackend(const MCSubtargetInfo &STI, const MCTargetOptions &OP)
22 : MCAsmBackend(support::little) {}
24 unsigned int getNumFixupKinds() const override {
25 return CSKY::NumTargetFixupKinds;
28 void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,
29 const MCValue &Target, MutableArrayRef<char> Data,
30 uint64_t Value, bool IsResolved,
31 const MCSubtargetInfo *STI) const override;
33 const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;
35 bool fixupNeedsRelaxation(const MCFixup &Fixup, uint64_t Value,
36 const MCRelaxableFragment *DF,
37 const MCAsmLayout &Layout) const override;
39 void relaxInstruction(MCInst &Inst,
40 const MCSubtargetInfo &STI) const override;
42 bool writeNopData(raw_ostream &OS, uint64_t Count) const override;
44 std::unique_ptr<MCObjectTargetWriter>
45 createObjectTargetWriter() const override;
47 } // namespace llvm
49 #endif // LLVM_LIB_TARGET_CSKY_MCTARGETDESC_CSKYASMBACKEND_H