brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 40b5853 Raw
55 lines · c
1//===-- MipsAsmBackend.h - Mips Asm 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-exception6//7//===----------------------------------------------------------------------===//8//9// This file defines the MipsAsmBackend class.10//11//===----------------------------------------------------------------------===//12//13 14#ifndef LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSASMBACKEND_H15#define LLVM_LIB_TARGET_MIPS_MCTARGETDESC_MIPSASMBACKEND_H16 17#include "MCTargetDesc/MipsFixupKinds.h"18#include "llvm/MC/MCAsmBackend.h"19#include "llvm/TargetParser/Triple.h"20 21namespace llvm {22 23class MCAssembler;24struct MCFixupKindInfo;25class MCRegisterInfo;26class Target;27 28class MipsAsmBackend : public MCAsmBackend {29  Triple TheTriple;30  bool IsN32;31 32public:33  MipsAsmBackend(const Target &T, const MCRegisterInfo &MRI, const Triple &TT,34                 StringRef CPU, bool N32)35      : MCAsmBackend(TT.isLittleEndian() ? llvm::endianness::little36                                         : llvm::endianness::big),37        TheTriple(TT), IsN32(N32) {}38 39  std::unique_ptr<MCObjectTargetWriter>40  createObjectTargetWriter() const override;41 42  void applyFixup(const MCFragment &, const MCFixup &, const MCValue &Target,43                  uint8_t *Data, uint64_t Value, bool IsResolved) override;44 45  std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;46  MCFixupKindInfo getFixupKindInfo(MCFixupKind Kind) const override;47 48  bool writeNopData(raw_ostream &OS, uint64_t Count,49                    const MCSubtargetInfo *STI) const override;50}; // class MipsAsmBackend51 52} // namespace53 54#endif55