Path: blob/main/contrib/llvm-project/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
35294 views
//===-- MipsAsmBackend.h - Mips Asm 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//===----------------------------------------------------------------------===//7//8// This file defines the MipsAsmBackend class.9//10//===----------------------------------------------------------------------===//11//1213#ifndef LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSASMBACKEND_H14#define LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSASMBACKEND_H1516#include "MCTargetDesc/MipsFixupKinds.h"17#include "llvm/MC/MCAsmBackend.h"18#include "llvm/TargetParser/Triple.h"1920namespace llvm {2122class MCAssembler;23struct MCFixupKindInfo;24class MCRegisterInfo;25class Target;2627class MipsAsmBackend : public MCAsmBackend {28Triple TheTriple;29bool IsN32;3031public:32MipsAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT,33StringRef CPU, bool N32)34: MCAsmBackend(TT.isLittleEndian() ? llvm::endianness::little35: llvm::endianness::big),36TheTriple(TT), IsN32(N32) {}3738std::unique_ptr<MCObjectTargetWriter>39createObjectTargetWriter() const override;4041void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,42const MCValue &Target, MutableArrayRef<char> Data,43uint64_t Value, bool IsResolved,44const MCSubtargetInfo *STI) const override;4546std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;47const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;4849unsigned getNumFixupKinds() const override {50return Mips::NumTargetFixupKinds;51}5253bool writeNopData(raw_ostream &OS, uint64_t Count,54const MCSubtargetInfo *STI) const override;5556bool shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup,57const MCValue &Target,58const MCSubtargetInfo *STI) override;5960bool isMicroMips(const MCSymbol *Sym) const override;61}; // class MipsAsmBackend6263} // namespace6465#endif666768