Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/Mips/Mips16HardFloatInfo.cpp
Line
Count
Source
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
190
extern FuncSignature const *findFuncSignature(const char *name) {
38
190
  const char *name_;
39
190
  int i = 0;
40
1.52k
  while (PredefinedFuncs[i].Name) {
41
1.44k
    name_ = PredefinedFuncs[i].Name;
42
1.44k
    if (strcmp(name, name_) == 0)
43
102
      return &PredefinedFuncs[i].Signature;
44
1.33k
    i++;
45
1.33k
  }
46
190
  
return nullptr88
;
47
190
}
48
}
49
}