LLVM
20.0.0git
lib
Target
Mips
Mips16HardFloatInfo.cpp
Go to the documentation of this file.
1
//===---- Mips16HardFloatInfo.cpp for Mips16 Hard Float -----===//
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-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file contains the Mips16 implementation of Mips16HardFloatInfo
10
// namespace.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#include "
Mips16HardFloatInfo.h
"
15
#include <string.h>
16
17
namespace
llvm
{
18
19
namespace
Mips16HardFloatInfo {
20
21
const
FuncNameSignature
PredefinedFuncs
[] = {
22
{
"__floatdidf"
, {
NoSig
,
DRet
} },
23
{
"__floatdisf"
, {
NoSig
,
FRet
} },
24
{
"__floatundidf"
, {
NoSig
,
DRet
} },
25
{
"__fixsfdi"
, {
FSig
,
NoFPRet
} },
26
{
"__fixunsdfsi"
, {
DSig
,
NoFPRet
} },
27
{
"__fixunsdfdi"
, {
DSig
,
NoFPRet
} },
28
{
"__fixdfdi"
, {
DSig
,
NoFPRet
} },
29
{
"__fixunssfsi"
, {
FSig
,
NoFPRet
} },
30
{
"__fixunssfdi"
, {
FSig
,
NoFPRet
} },
31
{
"__floatundisf"
, {
NoSig
,
FRet
} },
32
{
nullptr
, {
NoSig
,
NoFPRet
} }
33
};
34
35
// just do a search for now. there are very few of these special cases.
36
//
37
extern
FuncSignature
const
*
findFuncSignature
(
const
char
*
name
) {
38
const
char
*name_;
39
int
i = 0;
40
while
(
PredefinedFuncs
[i].
Name
) {
41
name_ =
PredefinedFuncs
[i].
Name
;
42
if
(strcmp(
name
, name_) == 0)
43
return
&
PredefinedFuncs
[i].
Signature
;
44
i++;
45
}
46
return
nullptr
;
47
}
48
}
49
}
Name
std::string Name
Definition:
ELFObjHandler.cpp:77
Mips16HardFloatInfo.h
name
static const char * name
Definition:
SMEABIPass.cpp:50
llvm::Mips16HardFloatInfo::DSig
@ DSig
Definition:
Mips16HardFloatInfo.h:31
llvm::Mips16HardFloatInfo::NoSig
@ NoSig
Definition:
Mips16HardFloatInfo.h:31
llvm::Mips16HardFloatInfo::FSig
@ FSig
Definition:
Mips16HardFloatInfo.h:31
llvm::Mips16HardFloatInfo::PredefinedFuncs
const FuncNameSignature PredefinedFuncs[]
Definition:
Mips16HardFloatInfo.cpp:21
llvm::Mips16HardFloatInfo::DRet
@ DRet
Definition:
Mips16HardFloatInfo.h:25
llvm::Mips16HardFloatInfo::NoFPRet
@ NoFPRet
Definition:
Mips16HardFloatInfo.h:25
llvm::Mips16HardFloatInfo::FRet
@ FRet
Definition:
Mips16HardFloatInfo.h:25
llvm::Mips16HardFloatInfo::findFuncSignature
FuncSignature const * findFuncSignature(const char *name)
Definition:
Mips16HardFloatInfo.cpp:37
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:
AddressRanges.h:18
llvm::Mips16HardFloatInfo::FuncNameSignature
Definition:
Mips16HardFloatInfo.h:38
llvm::Mips16HardFloatInfo::FuncNameSignature::Signature
FuncSignature Signature
Definition:
Mips16HardFloatInfo.h:40
llvm::Mips16HardFloatInfo::FuncNameSignature::Name
const char * Name
Definition:
Mips16HardFloatInfo.h:39
llvm::Mips16HardFloatInfo::FuncSignature
Definition:
Mips16HardFloatInfo.h:33
Generated on Sun Oct 6 2024 10:12:09 for LLVM by
1.9.6