Coverage Report

Created: 2018-09-25 17:16

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/Sparc/SparcGenCallingConv.inc
Line
Count
Source (jump to first uncovered line)
1
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2
|*                                                                            *|
3
|* Calling Convention Implementation Fragment                                 *|
4
|*                                                                            *|
5
|* Automatically generated file, do not edit!                                 *|
6
|*                                                                            *|
7
\*===----------------------------------------------------------------------===*/
8
9
static bool CC_Sparc32(unsigned ValNo, MVT ValVT,
10
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
11
                       ISD::ArgFlagsTy ArgFlags, CCState &State);
12
static bool CC_Sparc64(unsigned ValNo, MVT ValVT,
13
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
14
                       ISD::ArgFlagsTy ArgFlags, CCState &State);
15
static bool RetCC_Sparc32(unsigned ValNo, MVT ValVT,
16
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
17
                          ISD::ArgFlagsTy ArgFlags, CCState &State);
18
static bool RetCC_Sparc64(unsigned ValNo, MVT ValVT,
19
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
20
                          ISD::ArgFlagsTy ArgFlags, CCState &State);
21
22
23
static bool CC_Sparc32(unsigned ValNo, MVT ValVT,
24
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
25
1.40k
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
26
1.40k
27
1.40k
  if (ArgFlags.isSRet()) {
28
56
    if (CC_Sparc_Assign_SRet(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
29
56
        return false;
30
1.34k
  }
31
1.34k
32
1.34k
  if (LocVT == MVT::i32 ||
33
1.34k
      
LocVT == MVT::f32124
) {
34
1.27k
    static const MCPhysReg RegList1[] = {
35
1.27k
      SP::I0, SP::I1, SP::I2, SP::I3, SP::I4, SP::I5
36
1.27k
    };
37
1.27k
    if (unsigned Reg = State.AllocateReg(RegList1)) {
38
1.16k
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
39
1.16k
      return false;
40
1.16k
    }
41
179
  }
42
179
43
179
  if (LocVT == MVT::f64) {
44
68
    if (CC_Sparc_Assign_Split_64(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
45
68
        return false;
46
111
  }
47
111
48
111
  if (LocVT == MVT::v2i32) {
49
0
    if (CC_Sparc_Assign_Split_64(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
50
0
        return false;
51
111
  }
52
111
53
111
  unsigned Offset2 = State.AllocateStack(4, 4);
54
111
  State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
55
111
  return false;
56
111
57
111
  
return true0
; // CC didn't match.
58
111
}
59
60
61
static bool CC_Sparc64(unsigned ValNo, MVT ValVT,
62
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
63
994
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
64
994
65
994
  if (ArgFlags.isInReg()) {
66
47
    if (LocVT == MVT::i32 ||
67
47
        
LocVT == MVT::f328
) {
68
47
      if (CC_Sparc64_Half(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
69
47
            return false;
70
947
    }
71
47
  }
72
947
73
947
  if (LocVT == MVT::i32) {
74
304
    LocVT = MVT::i64;
75
304
    if (ArgFlags.isSExt())
76
16
        LocInfo = CCValAssign::SExt;
77
288
    else if (ArgFlags.isZExt())
78
41
        LocInfo = CCValAssign::ZExt;
79
247
    else
80
247
        LocInfo = CCValAssign::AExt;
81
304
  }
82
947
83
947
  if (CC_Sparc64_Full(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
84
947
    return false;
85
0
86
0
  return true;  // CC didn't match.
87
0
}
88
89
90
static bool RetCC_Sparc32(unsigned ValNo, MVT ValVT,
91
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
92
551
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
93
551
94
551
  if (LocVT == MVT::i32) {
95
453
    static const MCPhysReg RegList1[] = {
96
453
      SP::I0, SP::I1, SP::I2, SP::I3, SP::I4, SP::I5
97
453
    };
98
453
    if (unsigned Reg = State.AllocateReg(RegList1)) {
99
453
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
100
453
      return false;
101
453
    }
102
98
  }
103
98
104
98
  if (LocVT == MVT::f32) {
105
28
    static const MCPhysReg RegList2[] = {
106
28
      SP::F0, SP::F1, SP::F2, SP::F3
107
28
    };
108
28
    if (unsigned Reg = State.AllocateReg(RegList2)) {
109
28
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
110
28
      return false;
111
28
    }
112
70
  }
113
70
114
70
  if (LocVT == MVT::f64) {
115
62
    static const MCPhysReg RegList3[] = {
116
62
      SP::D0, SP::D1
117
62
    };
118
62
    if (unsigned Reg = State.AllocateReg(RegList3)) {
119
62
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
120
62
      return false;
121
62
    }
122
8
  }
123
8
124
8
  if (LocVT == MVT::v2i32) {
125
8
    if (CC_Sparc_Assign_Ret_Split_64(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
126
8
        return false;
127
0
  }
128
0
129
0
  return true;  // CC didn't match.
130
0
}
131
132
133
static bool RetCC_Sparc64(unsigned ValNo, MVT ValVT,
134
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
135
290
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
136
290
137
290
  if (LocVT == MVT::f32) {
138
16
    if (CC_Sparc64_Half(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
139
16
        return false;
140
274
  }
141
274
142
274
  if (!CC_Sparc64(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
143
274
    return false;
144
0
145
0
  return true;  // CC didn't match.
146
0
}