xref: /freebsd-src/contrib/llvm-project/llvm/lib/Target/Mips/Mips16HardFloatInfo.h (revision 0b57cec536236d46e3dba9bd041533462f33dbb7)
1*0b57cec5SDimitry Andric //===---- Mips16HardFloatInfo.h for Mips16 Hard Float              --------===//
2*0b57cec5SDimitry Andric //
3*0b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4*0b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5*0b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6*0b57cec5SDimitry Andric //
7*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
8*0b57cec5SDimitry Andric //
9*0b57cec5SDimitry Andric // This file defines some data structures relevant to the implementation of
10*0b57cec5SDimitry Andric // Mips16 hard float.
11*0b57cec5SDimitry Andric //
12*0b57cec5SDimitry Andric //
13*0b57cec5SDimitry Andric //===----------------------------------------------------------------------===//
14*0b57cec5SDimitry Andric 
15*0b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_MIPS_MIPS16HARDFLOATINFO_H
16*0b57cec5SDimitry Andric #define LLVM_LIB_TARGET_MIPS_MIPS16HARDFLOATINFO_H
17*0b57cec5SDimitry Andric 
18*0b57cec5SDimitry Andric namespace llvm {
19*0b57cec5SDimitry Andric 
20*0b57cec5SDimitry Andric namespace Mips16HardFloatInfo {
21*0b57cec5SDimitry Andric 
22*0b57cec5SDimitry Andric // Return types that matter for hard float are:
23*0b57cec5SDimitry Andric // float, double, complex float, and complex double
24*0b57cec5SDimitry Andric //
25*0b57cec5SDimitry Andric enum FPReturnVariant { FRet, DRet, CFRet, CDRet, NoFPRet };
26*0b57cec5SDimitry Andric 
27*0b57cec5SDimitry Andric //
28*0b57cec5SDimitry Andric // Parameter type that matter are float, (float, float), (float, double),
29*0b57cec5SDimitry Andric // double, (double, double), (double, float)
30*0b57cec5SDimitry Andric //
31*0b57cec5SDimitry Andric enum FPParamVariant { FSig, FFSig, FDSig, DSig, DDSig, DFSig, NoSig };
32*0b57cec5SDimitry Andric 
33*0b57cec5SDimitry Andric struct FuncSignature {
34*0b57cec5SDimitry Andric   FPParamVariant ParamSig;
35*0b57cec5SDimitry Andric   FPReturnVariant RetSig;
36*0b57cec5SDimitry Andric };
37*0b57cec5SDimitry Andric 
38*0b57cec5SDimitry Andric struct FuncNameSignature {
39*0b57cec5SDimitry Andric   const char *Name;
40*0b57cec5SDimitry Andric   FuncSignature Signature;
41*0b57cec5SDimitry Andric };
42*0b57cec5SDimitry Andric 
43*0b57cec5SDimitry Andric extern const FuncNameSignature PredefinedFuncs[];
44*0b57cec5SDimitry Andric 
45*0b57cec5SDimitry Andric extern FuncSignature const *findFuncSignature(const char *name);
46*0b57cec5SDimitry Andric }
47*0b57cec5SDimitry Andric }
48*0b57cec5SDimitry Andric 
49*0b57cec5SDimitry Andric #endif
50