Path: blob/main/contrib/llvm-project/llvm/lib/Target/AVR/MCTargetDesc/AVRAsmBackend.h
35294 views
//===-- AVRAsmBackend.h - AVR 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// \file The AVR assembly backend implementation.9//10//===----------------------------------------------------------------------===//11//1213#ifndef LLVM_AVR_ASM_BACKEND_H14#define LLVM_AVR_ASM_BACKEND_H1516#include "MCTargetDesc/AVRFixupKinds.h"1718#include "llvm/MC/MCAsmBackend.h"19#include "llvm/TargetParser/Triple.h"2021namespace llvm {2223class MCAssembler;24class MCContext;25struct MCFixupKindInfo;2627/// Utilities for manipulating generated AVR machine code.28class AVRAsmBackend : public MCAsmBackend {29public:30AVRAsmBackend(Triple::OSType OSType)31: MCAsmBackend(llvm::endianness::little), OSType(OSType) {}3233void adjustFixupValue(const MCFixup &Fixup, const MCValue &Target,34uint64_t &Value, MCContext *Ctx = nullptr) const;3536std::unique_ptr<MCObjectTargetWriter>37createObjectTargetWriter() const override;3839void applyFixup(const MCAssembler &Asm, const MCFixup &Fixup,40const MCValue &Target, MutableArrayRef<char> Data,41uint64_t Value, bool IsResolved,42const MCSubtargetInfo *STI) const override;4344std::optional<MCFixupKind> getFixupKind(StringRef Name) const override;45const MCFixupKindInfo &getFixupKindInfo(MCFixupKind Kind) const override;4647unsigned getNumFixupKinds() const override {48return AVR::NumTargetFixupKinds;49}5051bool writeNopData(raw_ostream &OS, uint64_t Count,52const MCSubtargetInfo *STI) const override;5354bool shouldForceRelocation(const MCAssembler &Asm, const MCFixup &Fixup,55const MCValue &Target,56const MCSubtargetInfo *STI) override;5758private:59Triple::OSType OSType;60};6162} // end namespace llvm6364#endif // LLVM_AVR_ASM_BACKEND_H656667