Path: blob/main/contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloatInfo.cpp
35266 views
//===---- Mips16HardFloatInfo.cpp for Mips16 Hard Float -----===//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 contains the Mips16 implementation of Mips16HardFloatInfo9// namespace.10//11//===----------------------------------------------------------------------===//1213#include "Mips16HardFloatInfo.h"14#include <string.h>1516namespace llvm {1718namespace Mips16HardFloatInfo {1920const FuncNameSignature PredefinedFuncs[] = {21{ "__floatdidf", { NoSig, DRet } },22{ "__floatdisf", { NoSig, FRet } },23{ "__floatundidf", { NoSig, DRet } },24{ "__fixsfdi", { FSig, NoFPRet } },25{ "__fixunsdfsi", { DSig, NoFPRet } },26{ "__fixunsdfdi", { DSig, NoFPRet } },27{ "__fixdfdi", { DSig, NoFPRet } },28{ "__fixunssfsi", { FSig, NoFPRet } },29{ "__fixunssfdi", { FSig, NoFPRet } },30{ "__floatundisf", { NoSig, FRet } },31{ nullptr, { NoSig, NoFPRet } }32};3334// just do a search for now. there are very few of these special cases.35//36extern FuncSignature const *findFuncSignature(const char *name) {37const char *name_;38int i = 0;39while (PredefinedFuncs[i].Name) {40name_ = PredefinedFuncs[i].Name;41if (strcmp(name, name_) == 0)42return &PredefinedFuncs[i].Signature;43i++;44}45return nullptr;46}47}48}495051