llvm/lld/ELF/Arch/MipsArchTree.cpp

//===- MipsArchTree.cpp --------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===---------------------------------------------------------------------===//
//
// This file contains a helper function for the Writer.
//
//===---------------------------------------------------------------------===//

#include "InputFiles.h"
#include "SymbolTable.h"
#include "Target.h"
#include "Writer.h"

#include "lld/Common/ErrorHandler.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/Support/MipsABIFlags.h"

usingnamespacellvm;
usingnamespacellvm::object;
usingnamespacellvm::ELF;

usingnamespacelld;
usingnamespacelld::elf;

namespace {
struct ArchTreeEdge {};

struct FileFlags {};
} // namespace

static StringRef getAbiName(uint32_t flags) {}

static StringRef getNanName(bool isNan2008) {}

static StringRef getFpName(bool isFp64) {}

static void checkFlags(Ctx &ctx, ArrayRef<FileFlags> files) {}

static uint32_t getMiscFlags(ArrayRef<FileFlags> files) {}

static uint32_t getPicFlags(ArrayRef<FileFlags> files) {}

static ArchTreeEdge archTree[] =;

static bool isArchMatched(uint32_t newFlags, uint32_t res) {}

static StringRef getMachName(uint32_t flags) {}

static StringRef getArchName(uint32_t flags) {}

static std::string getFullArchName(uint32_t flags) {}

// There are (arguably too) many MIPS ISAs out there. Their relationships
// can be represented as a forest. If all input files have ISAs which
// reachable by repeated proceeding from the single child to the parent,
// these input files are compatible. In that case we need to return "highest"
// ISA. If there are incompatible input files, we show an error.
// For example, mips1 is a "parent" of mips2 and such files are compatible.
// Output file gets EF_MIPS_ARCH_2 flag. From the other side mips3 and mips32
// are incompatible because nor mips3 is a parent for misp32, nor mips32
// is a parent for mips3.
static uint32_t getArchFlags(ArrayRef<FileFlags> files) {}

template <class ELFT> uint32_t elf::calcMipsEFlags(Ctx &ctx) {}

static int compareMipsFpAbi(uint8_t fpA, uint8_t fpB) {}

static StringRef getMipsFpAbiName(uint8_t fpAbi) {}

uint8_t elf::getMipsFpAbiFlag(uint8_t oldFlag, uint8_t newFlag,
                              StringRef fileName) {}

template <class ELFT> static bool isN32Abi(const InputFile &f) {}

bool elf::isMipsN32Abi(Ctx &ctx, const InputFile &f) {}

bool elf::isMicroMips(Ctx &ctx) {}

bool elf::isMipsR6(Ctx &ctx) {}

template uint32_t elf::calcMipsEFlags<ELF32LE>(Ctx &);
template uint32_t elf::calcMipsEFlags<ELF32BE>(Ctx &);
template uint32_t elf::calcMipsEFlags<ELF64LE>(Ctx &);
template uint32_t elf::calcMipsEFlags<ELF64BE>(Ctx &);