Coverage Report

Created: 2018-07-12 09:57

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/clang-build/lib/Target/Mips/MipsGenCallingConv.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_Mips(unsigned ValNo, MVT ValVT,
10
                    MVT LocVT, CCValAssign::LocInfo LocInfo,
11
                    ISD::ArgFlagsTy ArgFlags, CCState &State);
12
static bool CC_Mips16RetHelper(unsigned ValNo, MVT ValVT,
13
                               MVT LocVT, CCValAssign::LocInfo LocInfo,
14
                               ISD::ArgFlagsTy ArgFlags, CCState &State);
15
static bool CC_MipsN(unsigned ValNo, MVT ValVT,
16
                     MVT LocVT, CCValAssign::LocInfo LocInfo,
17
                     ISD::ArgFlagsTy ArgFlags, CCState &State);
18
static bool CC_MipsN_FastCC(unsigned ValNo, MVT ValVT,
19
                            MVT LocVT, CCValAssign::LocInfo LocInfo,
20
                            ISD::ArgFlagsTy ArgFlags, CCState &State);
21
static bool CC_MipsN_SoftFloat(unsigned ValNo, MVT ValVT,
22
                               MVT LocVT, CCValAssign::LocInfo LocInfo,
23
                               ISD::ArgFlagsTy ArgFlags, CCState &State);
24
static bool CC_MipsN_VarArg(unsigned ValNo, MVT ValVT,
25
                            MVT LocVT, CCValAssign::LocInfo LocInfo,
26
                            ISD::ArgFlagsTy ArgFlags, CCState &State);
27
static bool CC_MipsO32(unsigned ValNo, MVT ValVT,
28
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
29
                       ISD::ArgFlagsTy ArgFlags, CCState &State);
30
static bool CC_MipsO32_FP(unsigned ValNo, MVT ValVT,
31
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
32
                          ISD::ArgFlagsTy ArgFlags, CCState &State);
33
static bool CC_MipsO32_FastCC(unsigned ValNo, MVT ValVT,
34
                              MVT LocVT, CCValAssign::LocInfo LocInfo,
35
                              ISD::ArgFlagsTy ArgFlags, CCState &State);
36
static bool CC_Mips_ByVal(unsigned ValNo, MVT ValVT,
37
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
38
                          ISD::ArgFlagsTy ArgFlags, CCState &State);
39
static bool CC_Mips_FastCC(unsigned ValNo, MVT ValVT,
40
                           MVT LocVT, CCValAssign::LocInfo LocInfo,
41
                           ISD::ArgFlagsTy ArgFlags, CCState &State);
42
static bool CC_Mips_FixedArg(unsigned ValNo, MVT ValVT,
43
                             MVT LocVT, CCValAssign::LocInfo LocInfo,
44
                             ISD::ArgFlagsTy ArgFlags, CCState &State);
45
static bool CC_Mips_VarArg(unsigned ValNo, MVT ValVT,
46
                           MVT LocVT, CCValAssign::LocInfo LocInfo,
47
                           ISD::ArgFlagsTy ArgFlags, CCState &State);
48
static bool RetCC_F128(unsigned ValNo, MVT ValVT,
49
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
50
                       ISD::ArgFlagsTy ArgFlags, CCState &State);
51
static bool RetCC_F128HardFloat(unsigned ValNo, MVT ValVT,
52
                                MVT LocVT, CCValAssign::LocInfo LocInfo,
53
                                ISD::ArgFlagsTy ArgFlags, CCState &State);
54
static bool RetCC_F128SoftFloat(unsigned ValNo, MVT ValVT,
55
                                MVT LocVT, CCValAssign::LocInfo LocInfo,
56
                                ISD::ArgFlagsTy ArgFlags, CCState &State);
57
static bool RetCC_Mips(unsigned ValNo, MVT ValVT,
58
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
59
                       ISD::ArgFlagsTy ArgFlags, CCState &State);
60
static bool RetCC_MipsN(unsigned ValNo, MVT ValVT,
61
                        MVT LocVT, CCValAssign::LocInfo LocInfo,
62
                        ISD::ArgFlagsTy ArgFlags, CCState &State);
63
static bool RetCC_MipsO32(unsigned ValNo, MVT ValVT,
64
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
65
                          ISD::ArgFlagsTy ArgFlags, CCState &State);
66
67
68
static bool CC_Mips(unsigned ValNo, MVT ValVT,
69
                    MVT LocVT, CCValAssign::LocInfo LocInfo,
70
5.81k
                    ISD::ArgFlagsTy ArgFlags, CCState &State) {
71
5.81k
72
5.81k
  if (State.isVarArg()) {
73
516
    if (!static_cast<MipsCCState *>(&State)->IsCallOperandFixed(ValNo)) {
74
381
      if (!CC_Mips_VarArg(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
75
381
        return false;
76
5.43k
    }
77
516
  }
78
5.43k
79
5.43k
  if (!CC_Mips_FixedArg(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
80
5.43k
    return false;
81
0
82
0
  return true;  // CC didn't match.
83
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_Mips(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_Mips(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
70
5.81k
                    ISD::ArgFlagsTy ArgFlags, CCState &State) {
71
5.81k
72
5.81k
  if (State.isVarArg()) {
73
516
    if (!static_cast<MipsCCState *>(&State)->IsCallOperandFixed(ValNo)) {
74
381
      if (!CC_Mips_VarArg(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
75
381
        return false;
76
5.43k
    }
77
516
  }
78
5.43k
79
5.43k
  if (!CC_Mips_FixedArg(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
80
5.43k
    return false;
81
0
82
0
  return true;  // CC didn't match.
83
0
}
84
85
86
static bool CC_Mips16RetHelper(unsigned ValNo, MVT ValVT,
87
                               MVT LocVT, CCValAssign::LocInfo LocInfo,
88
56
                               ISD::ArgFlagsTy ArgFlags, CCState &State) {
89
56
90
56
  if (ArgFlags.isByVal()) {
91
0
    if (!CC_Mips_ByVal(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
92
0
      return false;
93
56
  }
94
56
95
56
  if (LocVT == MVT::i32) {
96
56
    static const MCPhysReg RegList1[] = {
97
56
      Mips::V0, Mips::V1, Mips::A0, Mips::A1
98
56
    };
99
56
    if (unsigned Reg = State.AllocateReg(RegList1)) {
100
56
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
101
56
      return false;
102
56
    }
103
0
  }
104
0
105
0
  return true;  // CC didn't match.
106
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_Mips16RetHelper(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_Mips16RetHelper(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
88
56
                               ISD::ArgFlagsTy ArgFlags, CCState &State) {
89
56
90
56
  if (ArgFlags.isByVal()) {
91
0
    if (!CC_Mips_ByVal(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
92
0
      return false;
93
56
  }
94
56
95
56
  if (LocVT == MVT::i32) {
96
56
    static const MCPhysReg RegList1[] = {
97
56
      Mips::V0, Mips::V1, Mips::A0, Mips::A1
98
56
    };
99
56
    if (unsigned Reg = State.AllocateReg(RegList1)) {
100
56
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
101
56
      return false;
102
56
    }
103
0
  }
104
0
105
0
  return true;  // CC didn't match.
106
0
}
107
108
109
static bool CC_MipsN(unsigned ValNo, MVT ValVT,
110
                     MVT LocVT, CCValAssign::LocInfo LocInfo,
111
8.17k
                     ISD::ArgFlagsTy ArgFlags, CCState &State) {
112
8.17k
113
8.17k
  if (LocVT == MVT::i8 ||
114
8.17k
      LocVT == MVT::i16 ||
115
8.17k
      LocVT == MVT::i32 ||
116
8.17k
      
LocVT == MVT::i644.79k
) {
117
6.69k
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
118
4.37k
      if (ArgFlags.isInReg()) {
119
10
        LocVT = MVT::i64;
120
10
        if (ArgFlags.isSExt())
121
0
                LocInfo = CCValAssign::SExtUpper;
122
10
        else if (ArgFlags.isZExt())
123
0
                LocInfo = CCValAssign::ZExtUpper;
124
10
        else
125
10
                LocInfo = CCValAssign::AExtUpper;
126
10
      }
127
4.37k
    }
128
6.69k
  }
129
8.17k
130
8.17k
  if (LocVT == MVT::i8 ||
131
8.17k
      LocVT == MVT::i16 ||
132
8.17k
      LocVT == MVT::i32) {
133
3.37k
    if (!static_cast<MipsCCState *>(&State)->WasOriginalArgFloat(ValNo)) {
134
3.31k
      LocVT = MVT::i64;
135
3.31k
      if (ArgFlags.isSExt())
136
1.88k
            LocInfo = CCValAssign::SExt;
137
1.42k
      else if (ArgFlags.isZExt())
138
112
            LocInfo = CCValAssign::ZExt;
139
1.31k
      else
140
1.31k
            LocInfo = CCValAssign::AExt;
141
3.31k
    }
142
3.37k
  }
143
8.17k
144
8.17k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
145
953
    if (LocVT == MVT::i32) {
146
59
      if (!CC_MipsN_SoftFloat(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
147
59
        return false;
148
8.11k
    }
149
953
  }
150
8.11k
151
8.11k
  if (LocVT == MVT::i64) {
152
6.63k
    static const MCPhysReg RegList1[] = {
153
6.63k
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
154
6.63k
    };
155
6.63k
    static const MCPhysReg RegList2[] = {
156
6.63k
      Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
157
6.63k
    };
158
6.63k
    if (unsigned Reg = State.AllocateReg(RegList1, RegList2)) {
159
6.54k
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
160
6.54k
      return false;
161
6.54k
    }
162
1.56k
  }
163
1.56k
164
1.56k
  if (LocVT == MVT::f32) {
165
760
    static const MCPhysReg RegList3[] = {
166
760
      Mips::F12, Mips::F13, Mips::F14, Mips::F15, Mips::F16, Mips::F17, Mips::F18, Mips::F19
167
760
    };
168
760
    static const MCPhysReg RegList4[] = {
169
760
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
170
760
    };
171
760
    if (unsigned Reg = State.AllocateReg(RegList3, RegList4)) {
172
756
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
173
756
      return false;
174
756
    }
175
809
  }
176
809
177
809
  if (LocVT == MVT::f64) {
178
720
    static const MCPhysReg RegList5[] = {
179
720
      Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
180
720
    };
181
720
    static const MCPhysReg RegList6[] = {
182
720
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
183
720
    };
184
720
    if (unsigned Reg = State.AllocateReg(RegList5, RegList6)) {
185
708
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
186
708
      return false;
187
708
    }
188
101
  }
189
101
190
101
  if (LocVT == MVT::f32) {
191
4
    unsigned Offset7 = State.AllocateStack(4, 8);
192
4
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset7, LocVT, LocInfo));
193
4
    return false;
194
4
  }
195
97
196
97
  if (LocVT == MVT::i64 ||
197
97
      
LocVT == MVT::f6412
) {
198
97
    unsigned Offset8 = State.AllocateStack(8, 8);
199
97
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset8, LocVT, LocInfo));
200
97
    return false;
201
97
  }
202
0
203
0
  return true;  // CC didn't match.
204
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_MipsN(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_MipsN(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
111
8.17k
                     ISD::ArgFlagsTy ArgFlags, CCState &State) {
112
8.17k
113
8.17k
  if (LocVT == MVT::i8 ||
114
8.17k
      LocVT == MVT::i16 ||
115
8.17k
      LocVT == MVT::i32 ||
116
8.17k
      
LocVT == MVT::i644.79k
) {
117
6.69k
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
118
4.37k
      if (ArgFlags.isInReg()) {
119
10
        LocVT = MVT::i64;
120
10
        if (ArgFlags.isSExt())
121
0
                LocInfo = CCValAssign::SExtUpper;
122
10
        else if (ArgFlags.isZExt())
123
0
                LocInfo = CCValAssign::ZExtUpper;
124
10
        else
125
10
                LocInfo = CCValAssign::AExtUpper;
126
10
      }
127
4.37k
    }
128
6.69k
  }
129
8.17k
130
8.17k
  if (LocVT == MVT::i8 ||
131
8.17k
      LocVT == MVT::i16 ||
132
8.17k
      LocVT == MVT::i32) {
133
3.37k
    if (!static_cast<MipsCCState *>(&State)->WasOriginalArgFloat(ValNo)) {
134
3.31k
      LocVT = MVT::i64;
135
3.31k
      if (ArgFlags.isSExt())
136
1.88k
            LocInfo = CCValAssign::SExt;
137
1.42k
      else if (ArgFlags.isZExt())
138
112
            LocInfo = CCValAssign::ZExt;
139
1.31k
      else
140
1.31k
            LocInfo = CCValAssign::AExt;
141
3.31k
    }
142
3.37k
  }
143
8.17k
144
8.17k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
145
953
    if (LocVT == MVT::i32) {
146
59
      if (!CC_MipsN_SoftFloat(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
147
59
        return false;
148
8.11k
    }
149
953
  }
150
8.11k
151
8.11k
  if (LocVT == MVT::i64) {
152
6.63k
    static const MCPhysReg RegList1[] = {
153
6.63k
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
154
6.63k
    };
155
6.63k
    static const MCPhysReg RegList2[] = {
156
6.63k
      Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
157
6.63k
    };
158
6.63k
    if (unsigned Reg = State.AllocateReg(RegList1, RegList2)) {
159
6.54k
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
160
6.54k
      return false;
161
6.54k
    }
162
1.56k
  }
163
1.56k
164
1.56k
  if (LocVT == MVT::f32) {
165
760
    static const MCPhysReg RegList3[] = {
166
760
      Mips::F12, Mips::F13, Mips::F14, Mips::F15, Mips::F16, Mips::F17, Mips::F18, Mips::F19
167
760
    };
168
760
    static const MCPhysReg RegList4[] = {
169
760
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
170
760
    };
171
760
    if (unsigned Reg = State.AllocateReg(RegList3, RegList4)) {
172
756
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
173
756
      return false;
174
756
    }
175
809
  }
176
809
177
809
  if (LocVT == MVT::f64) {
178
720
    static const MCPhysReg RegList5[] = {
179
720
      Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
180
720
    };
181
720
    static const MCPhysReg RegList6[] = {
182
720
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
183
720
    };
184
720
    if (unsigned Reg = State.AllocateReg(RegList5, RegList6)) {
185
708
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
186
708
      return false;
187
708
    }
188
101
  }
189
101
190
101
  if (LocVT == MVT::f32) {
191
4
    unsigned Offset7 = State.AllocateStack(4, 8);
192
4
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset7, LocVT, LocInfo));
193
4
    return false;
194
4
  }
195
97
196
97
  if (LocVT == MVT::i64 ||
197
97
      
LocVT == MVT::f6412
) {
198
97
    unsigned Offset8 = State.AllocateStack(8, 8);
199
97
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset8, LocVT, LocInfo));
200
97
    return false;
201
97
  }
202
0
203
0
  return true;  // CC didn't match.
204
0
}
205
206
207
static bool CC_MipsN_FastCC(unsigned ValNo, MVT ValVT,
208
                            MVT LocVT, CCValAssign::LocInfo LocInfo,
209
0
                            ISD::ArgFlagsTy ArgFlags, CCState &State) {
210
0
211
0
  if (LocVT == MVT::i64) {
212
0
    static const MCPhysReg RegList1[] = {
213
0
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64, Mips::T4_64, Mips::T5_64, Mips::T6_64, Mips::T7_64, Mips::T8_64, Mips::V1_64
214
0
    };
215
0
    if (unsigned Reg = State.AllocateReg(RegList1)) {
216
0
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
217
0
      return false;
218
0
    }
219
0
  }
220
0
221
0
  if (LocVT == MVT::f64) {
222
0
    static const MCPhysReg RegList2[] = {
223
0
      Mips::D0_64, Mips::D1_64, Mips::D2_64, Mips::D3_64, Mips::D4_64, Mips::D5_64, Mips::D6_64, Mips::D7_64, Mips::D8_64, Mips::D9_64, Mips::D10_64, Mips::D11_64, Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
224
0
    };
225
0
    if (unsigned Reg = State.AllocateReg(RegList2)) {
226
0
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
227
0
      return false;
228
0
    }
229
0
  }
230
0
231
0
  if (LocVT == MVT::i64 ||
232
0
      LocVT == MVT::f64) {
233
0
    unsigned Offset3 = State.AllocateStack(8, 8);
234
0
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset3, LocVT, LocInfo));
235
0
    return false;
236
0
  }
237
0
238
0
  return true;  // CC didn't match.
239
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_MipsN_FastCC(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Unexecuted instantiation: MipsISelLowering.cpp:CC_MipsN_FastCC(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
240
241
242
static bool CC_MipsN_SoftFloat(unsigned ValNo, MVT ValVT,
243
                               MVT LocVT, CCValAssign::LocInfo LocInfo,
244
59
                               ISD::ArgFlagsTy ArgFlags, CCState &State) {
245
59
246
59
  static const MCPhysReg RegList1[] = {
247
59
    Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3
248
59
  };
249
59
  static const MCPhysReg RegList2[] = {
250
59
    Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
251
59
  };
252
59
  if (unsigned Reg = State.AllocateReg(RegList1, RegList2)) {
253
51
    State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
254
51
    return false;
255
51
  }
256
8
257
8
  unsigned Offset3 = State.AllocateStack(4, 8);
258
8
  State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset3, LocVT, LocInfo));
259
8
  return false;
260
8
261
8
  
return true0
; // CC didn't match.
262
8
}
Unexecuted instantiation: MipsFastISel.cpp:CC_MipsN_SoftFloat(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_MipsN_SoftFloat(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
244
59
                               ISD::ArgFlagsTy ArgFlags, CCState &State) {
245
59
246
59
  static const MCPhysReg RegList1[] = {
247
59
    Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3
248
59
  };
249
59
  static const MCPhysReg RegList2[] = {
250
59
    Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
251
59
  };
252
59
  if (unsigned Reg = State.AllocateReg(RegList1, RegList2)) {
253
51
    State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
254
51
    return false;
255
51
  }
256
8
257
8
  unsigned Offset3 = State.AllocateStack(4, 8);
258
8
  State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset3, LocVT, LocInfo));
259
8
  return false;
260
8
261
8
  
return true0
; // CC didn't match.
262
8
}
263
264
265
static bool CC_MipsN_VarArg(unsigned ValNo, MVT ValVT,
266
                            MVT LocVT, CCValAssign::LocInfo LocInfo,
267
32
                            ISD::ArgFlagsTy ArgFlags, CCState &State) {
268
32
269
32
  if (LocVT == MVT::i8 ||
270
32
      LocVT == MVT::i16 ||
271
32
      LocVT == MVT::i32 ||
272
32
      
LocVT == MVT::i649
) {
273
32
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
274
24
      if (ArgFlags.isInReg()) {
275
24
        LocVT = MVT::i64;
276
24
        if (ArgFlags.isSExt())
277
0
                LocInfo = CCValAssign::SExtUpper;
278
24
        else if (ArgFlags.isZExt())
279
0
                LocInfo = CCValAssign::ZExtUpper;
280
24
        else
281
24
                LocInfo = CCValAssign::AExtUpper;
282
24
      }
283
24
    }
284
32
  }
285
32
286
32
  if (LocVT == MVT::i8 ||
287
32
      LocVT == MVT::i16 ||
288
32
      LocVT == MVT::i32) {
289
8
    LocVT = MVT::i64;
290
8
    if (ArgFlags.isSExt())
291
0
        LocInfo = CCValAssign::SExt;
292
8
    else if (ArgFlags.isZExt())
293
0
        LocInfo = CCValAssign::ZExt;
294
8
    else
295
8
        LocInfo = CCValAssign::AExt;
296
8
  }
297
32
298
32
  if (LocVT == MVT::f32) {
299
0
    static const MCPhysReg RegList1[] = {
300
0
      Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3
301
0
    };
302
0
    if (unsigned Reg = State.AllocateReg(RegList1)) {
303
0
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
304
0
      return false;
305
0
    }
306
32
  }
307
32
308
32
  if (LocVT == MVT::i64 ||
309
32
      
LocVT == MVT::f640
) {
310
32
    static const MCPhysReg RegList2[] = {
311
32
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
312
32
    };
313
32
    if (unsigned Reg = State.AllocateReg(RegList2)) {
314
30
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
315
30
      return false;
316
30
    }
317
2
  }
318
2
319
2
  if (LocVT == MVT::f32) {
320
0
    unsigned Offset3 = State.AllocateStack(4, 8);
321
0
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset3, LocVT, LocInfo));
322
0
    return false;
323
0
  }
324
2
325
2
  if (LocVT == MVT::i64 ||
326
2
      
LocVT == MVT::f640
) {
327
2
    unsigned Offset4 = State.AllocateStack(8, 8);
328
2
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset4, LocVT, LocInfo));
329
2
    return false;
330
2
  }
331
0
332
0
  return true;  // CC didn't match.
333
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_MipsN_VarArg(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_MipsN_VarArg(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
267
32
                            ISD::ArgFlagsTy ArgFlags, CCState &State) {
268
32
269
32
  if (LocVT == MVT::i8 ||
270
32
      LocVT == MVT::i16 ||
271
32
      LocVT == MVT::i32 ||
272
32
      
LocVT == MVT::i649
) {
273
32
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
274
24
      if (ArgFlags.isInReg()) {
275
24
        LocVT = MVT::i64;
276
24
        if (ArgFlags.isSExt())
277
0
                LocInfo = CCValAssign::SExtUpper;
278
24
        else if (ArgFlags.isZExt())
279
0
                LocInfo = CCValAssign::ZExtUpper;
280
24
        else
281
24
                LocInfo = CCValAssign::AExtUpper;
282
24
      }
283
24
    }
284
32
  }
285
32
286
32
  if (LocVT == MVT::i8 ||
287
32
      LocVT == MVT::i16 ||
288
32
      LocVT == MVT::i32) {
289
8
    LocVT = MVT::i64;
290
8
    if (ArgFlags.isSExt())
291
0
        LocInfo = CCValAssign::SExt;
292
8
    else if (ArgFlags.isZExt())
293
0
        LocInfo = CCValAssign::ZExt;
294
8
    else
295
8
        LocInfo = CCValAssign::AExt;
296
8
  }
297
32
298
32
  if (LocVT == MVT::f32) {
299
0
    static const MCPhysReg RegList1[] = {
300
0
      Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3
301
0
    };
302
0
    if (unsigned Reg = State.AllocateReg(RegList1)) {
303
0
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
304
0
      return false;
305
0
    }
306
32
  }
307
32
308
32
  if (LocVT == MVT::i64 ||
309
32
      
LocVT == MVT::f640
) {
310
32
    static const MCPhysReg RegList2[] = {
311
32
      Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64
312
32
    };
313
32
    if (unsigned Reg = State.AllocateReg(RegList2)) {
314
30
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
315
30
      return false;
316
30
    }
317
2
  }
318
2
319
2
  if (LocVT == MVT::f32) {
320
0
    unsigned Offset3 = State.AllocateStack(4, 8);
321
0
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset3, LocVT, LocInfo));
322
0
    return false;
323
0
  }
324
2
325
2
  if (LocVT == MVT::i64 ||
326
2
      
LocVT == MVT::f640
) {
327
2
    unsigned Offset4 = State.AllocateStack(8, 8);
328
2
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset4, LocVT, LocInfo));
329
2
    return false;
330
2
  }
331
0
332
0
  return true;  // CC didn't match.
333
0
}
334
335
336
static bool CC_MipsO32(unsigned ValNo, MVT ValVT,
337
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
338
156
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
339
156
340
156
  if (LocVT == MVT::i1 ||
341
156
      LocVT == MVT::i8 ||
342
156
      
LocVT == MVT::i16134
) {
343
42
    LocVT = MVT::i32;
344
42
    if (ArgFlags.isSExt())
345
0
        LocInfo = CCValAssign::SExt;
346
42
    else if (ArgFlags.isZExt())
347
0
        LocInfo = CCValAssign::ZExt;
348
42
    else
349
42
        LocInfo = CCValAssign::AExt;
350
42
  }
351
156
352
156
  if (LocVT == MVT::i32 ||
353
156
      
LocVT == MVT::f3236
) {
354
150
    unsigned Offset1 = State.AllocateStack(4, 4);
355
150
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset1, LocVT, LocInfo));
356
150
    return false;
357
150
  }
358
6
359
6
  if (LocVT == MVT::f64) {
360
6
    unsigned Offset2 = State.AllocateStack(8, 8);
361
6
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
362
6
    return false;
363
6
  }
364
0
365
0
  return true;  // CC didn't match.
366
0
}
MipsFastISel.cpp:CC_MipsO32(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
338
156
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
339
156
340
156
  if (LocVT == MVT::i1 ||
341
156
      LocVT == MVT::i8 ||
342
156
      
LocVT == MVT::i16134
) {
343
42
    LocVT = MVT::i32;
344
42
    if (ArgFlags.isSExt())
345
0
        LocInfo = CCValAssign::SExt;
346
42
    else if (ArgFlags.isZExt())
347
0
        LocInfo = CCValAssign::ZExt;
348
42
    else
349
42
        LocInfo = CCValAssign::AExt;
350
42
  }
351
156
352
156
  if (LocVT == MVT::i32 ||
353
156
      
LocVT == MVT::f3236
) {
354
150
    unsigned Offset1 = State.AllocateStack(4, 4);
355
150
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset1, LocVT, LocInfo));
356
150
    return false;
357
150
  }
358
6
359
6
  if (LocVT == MVT::f64) {
360
6
    unsigned Offset2 = State.AllocateStack(8, 8);
361
6
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset2, LocVT, LocInfo));
362
6
    return false;
363
6
  }
364
0
365
0
  return true;  // CC didn't match.
366
0
}
Unexecuted instantiation: MipsISelLowering.cpp:CC_MipsO32(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
367
368
369
static bool CC_MipsO32_FP(unsigned ValNo, MVT ValVT,
370
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
371
15.7k
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
372
15.7k
373
15.7k
  if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
374
9.79k
    if (!CC_MipsO32_FP32(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
375
9.79k
      return false;
376
5.99k
  }
377
5.99k
378
5.99k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
379
5.99k
    if (!CC_MipsO32_FP64(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
380
5.99k
      return false;
381
0
  }
382
0
383
0
  return true;  // CC didn't match.
384
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_MipsO32_FP(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_MipsO32_FP(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
371
15.7k
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
372
15.7k
373
15.7k
  if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
374
9.79k
    if (!CC_MipsO32_FP32(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
375
9.79k
      return false;
376
5.99k
  }
377
5.99k
378
5.99k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
379
5.99k
    if (!CC_MipsO32_FP64(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
380
5.99k
      return false;
381
0
  }
382
0
383
0
  return true;  // CC didn't match.
384
0
}
385
386
387
static bool CC_MipsO32_FastCC(unsigned ValNo, MVT ValVT,
388
                              MVT LocVT, CCValAssign::LocInfo LocInfo,
389
88
                              ISD::ArgFlagsTy ArgFlags, CCState &State) {
390
88
391
88
  if (LocVT == MVT::f64) {
392
88
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
393
66
      static const MCPhysReg RegList1[] = {
394
66
        Mips::D0, Mips::D1, Mips::D2, Mips::D3, Mips::D4, Mips::D5, Mips::D6, Mips::D7, Mips::D8, Mips::D9
395
66
      };
396
66
      if (unsigned Reg = State.AllocateReg(RegList1)) {
397
60
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
398
60
        return false;
399
60
      }
400
28
    }
401
88
  }
402
28
403
28
  if (LocVT == MVT::f64) {
404
28
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
405
22
      if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useOddSPReg()) {
406
0
        static const MCPhysReg RegList2[] = {
407
0
          Mips::D0_64, Mips::D1_64, Mips::D2_64, Mips::D3_64, Mips::D4_64, Mips::D5_64, Mips::D6_64, Mips::D7_64, Mips::D8_64, Mips::D9_64, Mips::D10_64, Mips::D11_64, Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
408
0
        };
409
0
        if (unsigned Reg = State.AllocateReg(RegList2)) {
410
0
          State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
411
0
          return false;
412
0
        }
413
28
      }
414
22
    }
415
28
  }
416
28
417
28
  if (LocVT == MVT::f64) {
418
28
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
419
22
      if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).noOddSPReg()) {
420
22
        static const MCPhysReg RegList3[] = {
421
22
          Mips::D0_64, Mips::D2_64, Mips::D4_64, Mips::D6_64, Mips::D8_64, Mips::D10_64, Mips::D12_64, Mips::D14_64, Mips::D16_64, Mips::D18_64
422
22
        };
423
22
        if (unsigned Reg = State.AllocateReg(RegList3)) {
424
20
          State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
425
20
          return false;
426
20
        }
427
8
      }
428
22
    }
429
28
  }
430
8
431
8
  if (LocVT == MVT::f64) {
432
8
    unsigned Offset4 = State.AllocateStack(8, 8);
433
8
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset4, LocVT, LocInfo));
434
8
    return false;
435
8
  }
436
0
437
0
  return true;  // CC didn't match.
438
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_MipsO32_FastCC(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_MipsO32_FastCC(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
389
88
                              ISD::ArgFlagsTy ArgFlags, CCState &State) {
390
88
391
88
  if (LocVT == MVT::f64) {
392
88
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
393
66
      static const MCPhysReg RegList1[] = {
394
66
        Mips::D0, Mips::D1, Mips::D2, Mips::D3, Mips::D4, Mips::D5, Mips::D6, Mips::D7, Mips::D8, Mips::D9
395
66
      };
396
66
      if (unsigned Reg = State.AllocateReg(RegList1)) {
397
60
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
398
60
        return false;
399
60
      }
400
28
    }
401
88
  }
402
28
403
28
  if (LocVT == MVT::f64) {
404
28
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
405
22
      if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useOddSPReg()) {
406
0
        static const MCPhysReg RegList2[] = {
407
0
          Mips::D0_64, Mips::D1_64, Mips::D2_64, Mips::D3_64, Mips::D4_64, Mips::D5_64, Mips::D6_64, Mips::D7_64, Mips::D8_64, Mips::D9_64, Mips::D10_64, Mips::D11_64, Mips::D12_64, Mips::D13_64, Mips::D14_64, Mips::D15_64, Mips::D16_64, Mips::D17_64, Mips::D18_64, Mips::D19_64
408
0
        };
409
0
        if (unsigned Reg = State.AllocateReg(RegList2)) {
410
0
          State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
411
0
          return false;
412
0
        }
413
28
      }
414
22
    }
415
28
  }
416
28
417
28
  if (LocVT == MVT::f64) {
418
28
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
419
22
      if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).noOddSPReg()) {
420
22
        static const MCPhysReg RegList3[] = {
421
22
          Mips::D0_64, Mips::D2_64, Mips::D4_64, Mips::D6_64, Mips::D8_64, Mips::D10_64, Mips::D12_64, Mips::D14_64, Mips::D16_64, Mips::D18_64
422
22
        };
423
22
        if (unsigned Reg = State.AllocateReg(RegList3)) {
424
20
          State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
425
20
          return false;
426
20
        }
427
8
      }
428
22
    }
429
28
  }
430
8
431
8
  if (LocVT == MVT::f64) {
432
8
    unsigned Offset4 = State.AllocateStack(8, 8);
433
8
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset4, LocVT, LocInfo));
434
8
    return false;
435
8
  }
436
0
437
0
  return true;  // CC didn't match.
438
0
}
439
440
441
static bool CC_Mips_ByVal(unsigned ValNo, MVT ValVT,
442
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
443
80
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
444
80
445
80
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
446
58
    if (ArgFlags.isByVal()) {
447
58
      State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 4, 4, ArgFlags);
448
58
      return false;
449
58
    }
450
22
  }
451
22
452
22
  if (ArgFlags.isByVal()) {
453
22
    State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 8, 8, ArgFlags);
454
22
    return false;
455
22
  }
456
0
457
0
  return true;  // CC didn't match.
458
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_Mips_ByVal(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_Mips_ByVal(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
443
80
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
444
80
445
80
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
446
58
    if (ArgFlags.isByVal()) {
447
58
      State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 4, 4, ArgFlags);
448
58
      return false;
449
58
    }
450
22
  }
451
22
452
22
  if (ArgFlags.isByVal()) {
453
22
    State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 8, 8, ArgFlags);
454
22
    return false;
455
22
  }
456
0
457
0
  return true;  // CC didn't match.
458
0
}
459
460
461
static bool CC_Mips_FastCC(unsigned ValNo, MVT ValVT,
462
                           MVT LocVT, CCValAssign::LocInfo LocInfo,
463
744
                           ISD::ArgFlagsTy ArgFlags, CCState &State) {
464
744
465
744
  if (ArgFlags.isByVal()) {
466
0
    State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 4, 4, ArgFlags);
467
0
    return false;
468
0
  }
469
744
470
744
  if (LocVT == MVT::i8 ||
471
744
      LocVT == MVT::i16) {
472
0
    LocVT = MVT::i32;
473
0
    if (ArgFlags.isSExt())
474
0
        LocInfo = CCValAssign::SExt;
475
0
    else if (ArgFlags.isZExt())
476
0
        LocInfo = CCValAssign::ZExt;
477
0
    else
478
0
        LocInfo = CCValAssign::AExt;
479
0
  }
480
744
481
744
  if (LocVT == MVT::i32) {
482
400
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isTargetNaCl()) {
483
366
      static const MCPhysReg RegList1[] = {
484
366
        Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3, Mips::T4, Mips::T5, Mips::T6, Mips::T7, Mips::T8, Mips::V1
485
366
      };
486
366
      if (unsigned Reg = State.AllocateReg(RegList1)) {
487
348
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
488
348
        return false;
489
348
      }
490
396
    }
491
400
  }
492
396
493
396
  if (LocVT == MVT::i32) {
494
52
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isTargetNaCl()) {
495
34
      static const MCPhysReg RegList2[] = {
496
34
        Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3, Mips::T4, Mips::T5, Mips::V1
497
34
      };
498
34
      if (unsigned Reg = State.AllocateReg(RegList2)) {
499
22
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
500
22
        return false;
501
22
      }
502
374
    }
503
52
  }
504
374
505
374
  if (LocVT == MVT::f32) {
506
256
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useOddSPReg()) {
507
128
      static const MCPhysReg RegList3[] = {
508
128
        Mips::F0, Mips::F1, Mips::F2, Mips::F3, Mips::F4, Mips::F5, Mips::F6, Mips::F7, Mips::F8, Mips::F9, Mips::F10, Mips::F11, Mips::F12, Mips::F13, Mips::F14, Mips::F15, Mips::F16, Mips::F17, Mips::F18, Mips::F19
509
128
      };
510
128
      if (unsigned Reg = State.AllocateReg(RegList3)) {
511
124
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
512
124
        return false;
513
124
      }
514
250
    }
515
256
  }
516
250
517
250
  if (LocVT == MVT::f32) {
518
132
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).noOddSPReg()) {
519
128
      static const MCPhysReg RegList4[] = {
520
128
        Mips::F0, Mips::F2, Mips::F4, Mips::F6, Mips::F8, Mips::F10, Mips::F12, Mips::F14, Mips::F16, Mips::F18
521
128
      };
522
128
      if (unsigned Reg = State.AllocateReg(RegList4)) {
523
80
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
524
80
        return false;
525
80
      }
526
170
    }
527
132
  }
528
170
529
170
  if (LocVT == MVT::i32 ||
530
170
      
LocVT == MVT::f32140
) {
531
82
    unsigned Offset5 = State.AllocateStack(4, 4);
532
82
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset5, LocVT, LocInfo));
533
82
    return false;
534
82
  }
535
88
536
88
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
537
88
    if (!CC_MipsO32_FastCC(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
538
88
      return false;
539
0
  }
540
0
541
0
  if (!CC_MipsN_FastCC(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
542
0
    return false;
543
0
544
0
  return true;  // CC didn't match.
545
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_Mips_FastCC(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_Mips_FastCC(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
463
744
                           ISD::ArgFlagsTy ArgFlags, CCState &State) {
464
744
465
744
  if (ArgFlags.isByVal()) {
466
0
    State.HandleByVal(ValNo, ValVT, LocVT, LocInfo, 4, 4, ArgFlags);
467
0
    return false;
468
0
  }
469
744
470
744
  if (LocVT == MVT::i8 ||
471
744
      LocVT == MVT::i16) {
472
0
    LocVT = MVT::i32;
473
0
    if (ArgFlags.isSExt())
474
0
        LocInfo = CCValAssign::SExt;
475
0
    else if (ArgFlags.isZExt())
476
0
        LocInfo = CCValAssign::ZExt;
477
0
    else
478
0
        LocInfo = CCValAssign::AExt;
479
0
  }
480
744
481
744
  if (LocVT == MVT::i32) {
482
400
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isTargetNaCl()) {
483
366
      static const MCPhysReg RegList1[] = {
484
366
        Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3, Mips::T4, Mips::T5, Mips::T6, Mips::T7, Mips::T8, Mips::V1
485
366
      };
486
366
      if (unsigned Reg = State.AllocateReg(RegList1)) {
487
348
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
488
348
        return false;
489
348
      }
490
396
    }
491
400
  }
492
396
493
396
  if (LocVT == MVT::i32) {
494
52
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isTargetNaCl()) {
495
34
      static const MCPhysReg RegList2[] = {
496
34
        Mips::A0, Mips::A1, Mips::A2, Mips::A3, Mips::T0, Mips::T1, Mips::T2, Mips::T3, Mips::T4, Mips::T5, Mips::V1
497
34
      };
498
34
      if (unsigned Reg = State.AllocateReg(RegList2)) {
499
22
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
500
22
        return false;
501
22
      }
502
374
    }
503
52
  }
504
374
505
374
  if (LocVT == MVT::f32) {
506
256
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useOddSPReg()) {
507
128
      static const MCPhysReg RegList3[] = {
508
128
        Mips::F0, Mips::F1, Mips::F2, Mips::F3, Mips::F4, Mips::F5, Mips::F6, Mips::F7, Mips::F8, Mips::F9, Mips::F10, Mips::F11, Mips::F12, Mips::F13, Mips::F14, Mips::F15, Mips::F16, Mips::F17, Mips::F18, Mips::F19
509
128
      };
510
128
      if (unsigned Reg = State.AllocateReg(RegList3)) {
511
124
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
512
124
        return false;
513
124
      }
514
250
    }
515
256
  }
516
250
517
250
  if (LocVT == MVT::f32) {
518
132
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).noOddSPReg()) {
519
128
      static const MCPhysReg RegList4[] = {
520
128
        Mips::F0, Mips::F2, Mips::F4, Mips::F6, Mips::F8, Mips::F10, Mips::F12, Mips::F14, Mips::F16, Mips::F18
521
128
      };
522
128
      if (unsigned Reg = State.AllocateReg(RegList4)) {
523
80
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
524
80
        return false;
525
80
      }
526
170
    }
527
132
  }
528
170
529
170
  if (LocVT == MVT::i32 ||
530
170
      
LocVT == MVT::f32140
) {
531
82
    unsigned Offset5 = State.AllocateStack(4, 4);
532
82
    State.addLoc(CCValAssign::getMem(ValNo, ValVT, Offset5, LocVT, LocInfo));
533
82
    return false;
534
82
  }
535
88
536
88
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
537
88
    if (!CC_MipsO32_FastCC(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
538
88
      return false;
539
0
  }
540
0
541
0
  if (!CC_MipsN_FastCC(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
542
0
    return false;
543
0
544
0
  return true;  // CC didn't match.
545
0
}
546
547
548
static bool CC_Mips_FixedArg(unsigned ValNo, MVT ValVT,
549
                             MVT LocVT, CCValAssign::LocInfo LocInfo,
550
24.4k
                             ISD::ArgFlagsTy ArgFlags, CCState &State) {
551
24.4k
552
24.4k
  if (State.getCallingConv() != CallingConv::Fast) {
553
23.7k
    if (static_cast<MipsCCState *>(&State)->getSpecialCallingConv() == MipsCCState::Mips16RetHelperConv) {
554
56
      if (!CC_Mips16RetHelper(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
555
56
        return false;
556
24.4k
    }
557
23.7k
  }
558
24.4k
559
24.4k
  if (ArgFlags.isByVal()) {
560
80
    if (!CC_Mips_ByVal(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
561
80
      return false;
562
24.3k
  }
563
24.3k
564
24.3k
  if (LocVT == MVT::i64) {
565
3.37k
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
566
2.56k
      if (static_cast<MipsCCState *>(&State)->WasOriginalArgF128(ValNo)) {
567
60
        LocVT = MVT::f64;
568
60
        LocInfo = CCValAssign::BCvt;
569
60
      }
570
2.56k
    }
571
3.37k
  }
572
24.3k
573
24.3k
  if (State.getCallingConv() == CallingConv::Fast) {
574
744
    if (!CC_Mips_FastCC(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
575
744
      return false;
576
23.6k
  }
577
23.6k
578
23.6k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
579
15.4k
    if (!CC_MipsO32_FP(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
580
15.4k
      return false;
581
8.17k
  }
582
8.17k
583
8.17k
  if (!CC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
584
8.17k
    return false;
585
0
586
0
  return true;  // CC didn't match.
587
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_Mips_FixedArg(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_Mips_FixedArg(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
550
24.4k
                             ISD::ArgFlagsTy ArgFlags, CCState &State) {
551
24.4k
552
24.4k
  if (State.getCallingConv() != CallingConv::Fast) {
553
23.7k
    if (static_cast<MipsCCState *>(&State)->getSpecialCallingConv() == MipsCCState::Mips16RetHelperConv) {
554
56
      if (!CC_Mips16RetHelper(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
555
56
        return false;
556
24.4k
    }
557
23.7k
  }
558
24.4k
559
24.4k
  if (ArgFlags.isByVal()) {
560
80
    if (!CC_Mips_ByVal(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
561
80
      return false;
562
24.3k
  }
563
24.3k
564
24.3k
  if (LocVT == MVT::i64) {
565
3.37k
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
566
2.56k
      if (static_cast<MipsCCState *>(&State)->WasOriginalArgF128(ValNo)) {
567
60
        LocVT = MVT::f64;
568
60
        LocInfo = CCValAssign::BCvt;
569
60
      }
570
2.56k
    }
571
3.37k
  }
572
24.3k
573
24.3k
  if (State.getCallingConv() == CallingConv::Fast) {
574
744
    if (!CC_Mips_FastCC(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
575
744
      return false;
576
23.6k
  }
577
23.6k
578
23.6k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
579
15.4k
    if (!CC_MipsO32_FP(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
580
15.4k
      return false;
581
8.17k
  }
582
8.17k
583
8.17k
  if (!CC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
584
8.17k
    return false;
585
0
586
0
  return true;  // CC didn't match.
587
0
}
588
589
590
static bool CC_Mips_VarArg(unsigned ValNo, MVT ValVT,
591
                           MVT LocVT, CCValAssign::LocInfo LocInfo,
592
381
                           ISD::ArgFlagsTy ArgFlags, CCState &State) {
593
381
594
381
  if (ArgFlags.isByVal()) {
595
0
    if (!CC_Mips_ByVal(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
596
0
      return false;
597
381
  }
598
381
599
381
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
600
349
    if (!CC_MipsO32_FP(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
601
349
      return false;
602
32
  }
603
32
604
32
  if (!CC_MipsN_VarArg(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
605
32
    return false;
606
0
607
0
  return true;  // CC didn't match.
608
0
}
Unexecuted instantiation: MipsFastISel.cpp:CC_Mips_VarArg(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:CC_Mips_VarArg(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
592
381
                           ISD::ArgFlagsTy ArgFlags, CCState &State) {
593
381
594
381
  if (ArgFlags.isByVal()) {
595
0
    if (!CC_Mips_ByVal(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
596
0
      return false;
597
381
  }
598
381
599
381
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_O32()) {
600
349
    if (!CC_MipsO32_FP(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
601
349
      return false;
602
32
  }
603
32
604
32
  if (!CC_MipsN_VarArg(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
605
32
    return false;
606
0
607
0
  return true;  // CC didn't match.
608
0
}
609
610
611
static bool RetCC_F128(unsigned ValNo, MVT ValVT,
612
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
613
1.16k
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
614
1.16k
615
1.16k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
616
1.11k
    if (LocVT == MVT::i64) {
617
1.11k
      if (!RetCC_F128SoftFloat(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
618
1.11k
        return false;
619
48
    }
620
1.11k
  }
621
48
622
48
  if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
623
48
    if (LocVT == MVT::i64) {
624
48
      if (!RetCC_F128HardFloat(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
625
48
        return false;
626
0
    }
627
48
  }
628
0
629
0
  return true;  // CC didn't match.
630
0
}
Unexecuted instantiation: MipsFastISel.cpp:RetCC_F128(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:RetCC_F128(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
613
1.16k
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
614
1.16k
615
1.16k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
616
1.11k
    if (LocVT == MVT::i64) {
617
1.11k
      if (!RetCC_F128SoftFloat(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
618
1.11k
        return false;
619
48
    }
620
1.11k
  }
621
48
622
48
  if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).useSoftFloat()) {
623
48
    if (LocVT == MVT::i64) {
624
48
      if (!RetCC_F128HardFloat(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
625
48
        return false;
626
0
    }
627
48
  }
628
0
629
0
  return true;  // CC didn't match.
630
0
}
631
632
633
static bool RetCC_F128HardFloat(unsigned ValNo, MVT ValVT,
634
                                MVT LocVT, CCValAssign::LocInfo LocInfo,
635
48
                                ISD::ArgFlagsTy ArgFlags, CCState &State) {
636
48
637
48
  LocVT = MVT::f64;
638
48
  LocInfo = CCValAssign::BCvt;
639
48
640
48
  if (ArgFlags.isInReg()) {
641
16
    static const MCPhysReg RegList1[] = {
642
16
      Mips::D0_64, Mips::D1_64
643
16
    };
644
16
    if (unsigned Reg = State.AllocateReg(RegList1)) {
645
16
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
646
16
      return false;
647
16
    }
648
32
  }
649
32
650
32
  static const MCPhysReg RegList2[] = {
651
32
    Mips::D0_64, Mips::D2_64
652
32
  };
653
32
  if (unsigned Reg = State.AllocateReg(RegList2)) {
654
32
    State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
655
32
    return false;
656
32
  }
657
0
658
0
  return true;  // CC didn't match.
659
0
}
Unexecuted instantiation: MipsFastISel.cpp:RetCC_F128HardFloat(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:RetCC_F128HardFloat(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
635
48
                                ISD::ArgFlagsTy ArgFlags, CCState &State) {
636
48
637
48
  LocVT = MVT::f64;
638
48
  LocInfo = CCValAssign::BCvt;
639
48
640
48
  if (ArgFlags.isInReg()) {
641
16
    static const MCPhysReg RegList1[] = {
642
16
      Mips::D0_64, Mips::D1_64
643
16
    };
644
16
    if (unsigned Reg = State.AllocateReg(RegList1)) {
645
16
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
646
16
      return false;
647
16
    }
648
32
  }
649
32
650
32
  static const MCPhysReg RegList2[] = {
651
32
    Mips::D0_64, Mips::D2_64
652
32
  };
653
32
  if (unsigned Reg = State.AllocateReg(RegList2)) {
654
32
    State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
655
32
    return false;
656
32
  }
657
0
658
0
  return true;  // CC didn't match.
659
0
}
660
661
662
static bool RetCC_F128SoftFloat(unsigned ValNo, MVT ValVT,
663
                                MVT LocVT, CCValAssign::LocInfo LocInfo,
664
1.11k
                                ISD::ArgFlagsTy ArgFlags, CCState &State) {
665
1.11k
666
1.11k
  static const MCPhysReg RegList1[] = {
667
1.11k
    Mips::V0_64, Mips::A0_64
668
1.11k
  };
669
1.11k
  if (unsigned Reg = State.AllocateReg(RegList1)) {
670
1.11k
    State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
671
1.11k
    return false;
672
1.11k
  }
673
0
674
0
  return true;  // CC didn't match.
675
0
}
Unexecuted instantiation: MipsFastISel.cpp:RetCC_F128SoftFloat(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:RetCC_F128SoftFloat(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
664
1.11k
                                ISD::ArgFlagsTy ArgFlags, CCState &State) {
665
1.11k
666
1.11k
  static const MCPhysReg RegList1[] = {
667
1.11k
    Mips::V0_64, Mips::A0_64
668
1.11k
  };
669
1.11k
  if (unsigned Reg = State.AllocateReg(RegList1)) {
670
1.11k
    State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
671
1.11k
    return false;
672
1.11k
  }
673
0
674
0
  return true;  // CC didn't match.
675
0
}
676
677
678
static bool RetCC_Mips(unsigned ValNo, MVT ValVT,
679
                       MVT LocVT, CCValAssign::LocInfo LocInfo,
680
23.7k
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
681
23.7k
682
23.7k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_N32()) {
683
375
    if (!RetCC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
684
246
      return false;
685
23.4k
  }
686
23.4k
687
23.4k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_N64()) {
688
8.95k
    if (!RetCC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
689
5.27k
      return false;
690
18.1k
  }
691
18.1k
692
18.1k
  if (!RetCC_MipsO32(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
693
18.1k
    return false;
694
55
695
55
  return true;  // CC didn't match.
696
55
}
MipsFastISel.cpp:RetCC_Mips(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
680
57
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
681
57
682
57
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_N32()) {
683
0
    if (!RetCC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
684
0
      return false;
685
57
  }
686
57
687
57
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_N64()) {
688
0
    if (!RetCC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
689
0
      return false;
690
57
  }
691
57
692
57
  if (!RetCC_MipsO32(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
693
57
    return false;
694
0
695
0
  return true;  // CC didn't match.
696
0
}
MipsISelLowering.cpp:RetCC_Mips(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
680
23.6k
                       ISD::ArgFlagsTy ArgFlags, CCState &State) {
681
23.6k
682
23.6k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_N32()) {
683
375
    if (!RetCC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
684
246
      return false;
685
23.4k
  }
686
23.4k
687
23.4k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isABI_N64()) {
688
8.95k
    if (!RetCC_MipsN(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
689
5.27k
      return false;
690
18.1k
  }
691
18.1k
692
18.1k
  if (!RetCC_MipsO32(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
693
18.0k
    return false;
694
55
695
55
  return true;  // CC didn't match.
696
55
}
697
698
699
static bool RetCC_MipsN(unsigned ValNo, MVT ValVT,
700
                        MVT LocVT, CCValAssign::LocInfo LocInfo,
701
9.32k
                        ISD::ArgFlagsTy ArgFlags, CCState &State) {
702
9.32k
703
9.32k
  if (LocVT == MVT::i64) {
704
4.29k
    if (static_cast<MipsCCState *>(&State)->WasOriginalArgF128(ValNo)) {
705
1.16k
      if (!RetCC_F128(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
706
1.16k
        return false;
707
8.16k
    }
708
4.29k
  }
709
8.16k
710
8.16k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
711
2.67k
    if (LocVT == MVT::i8 ||
712
2.67k
        LocVT == MVT::i16 ||
713
2.67k
        LocVT == MVT::i32 ||
714
2.67k
        
LocVT == MVT::i641.65k
) {
715
2.04k
      if (ArgFlags.isInReg()) {
716
12
        LocVT = MVT::i64;
717
12
        if (ArgFlags.isSExt())
718
0
                LocInfo = CCValAssign::SExt;
719
12
        else if (ArgFlags.isZExt())
720
0
                LocInfo = CCValAssign::ZExt;
721
12
        else
722
12
                LocInfo = CCValAssign::AExt;
723
12
      }
724
2.04k
    }
725
2.67k
  }
726
8.16k
727
8.16k
  if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
728
5.48k
    if (LocVT == MVT::i8 ||
729
5.48k
        LocVT == MVT::i16 ||
730
5.48k
        LocVT == MVT::i32 ||
731
5.48k
        
LocVT == MVT::i642.69k
) {
732
4.90k
      if (ArgFlags.isInReg()) {
733
12
        LocVT = MVT::i64;
734
12
        if (ArgFlags.isSExt())
735
0
                LocInfo = CCValAssign::SExtUpper;
736
12
        else if (ArgFlags.isZExt())
737
0
                LocInfo = CCValAssign::ZExtUpper;
738
12
        else
739
12
                LocInfo = CCValAssign::AExtUpper;
740
12
      }
741
4.90k
    }
742
5.48k
  }
743
8.16k
744
8.16k
  if (LocVT == MVT::i64) {
745
3.15k
    static const MCPhysReg RegList1[] = {
746
3.15k
      Mips::V0_64, Mips::V1_64
747
3.15k
    };
748
3.15k
    if (unsigned Reg = State.AllocateReg(RegList1)) {
749
3.15k
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
750
3.15k
      return false;
751
3.15k
    }
752
5.01k
  }
753
5.01k
754
5.01k
  if (LocVT == MVT::f32) {
755
706
    static const MCPhysReg RegList2[] = {
756
706
      Mips::F0, Mips::F2
757
706
    };
758
706
    if (unsigned Reg = State.AllocateReg(RegList2)) {
759
706
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
760
706
      return false;
761
706
    }
762
4.30k
  }
763
4.30k
764
4.30k
  if (LocVT == MVT::f64) {
765
504
    static const MCPhysReg RegList3[] = {
766
504
      Mips::D0_64, Mips::D2_64
767
504
    };
768
504
    if (unsigned Reg = State.AllocateReg(RegList3)) {
769
504
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
770
504
      return false;
771
504
    }
772
3.80k
  }
773
3.80k
774
3.80k
  return true;  // CC didn't match.
775
3.80k
}
Unexecuted instantiation: MipsFastISel.cpp:RetCC_MipsN(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
MipsISelLowering.cpp:RetCC_MipsN(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
701
9.32k
                        ISD::ArgFlagsTy ArgFlags, CCState &State) {
702
9.32k
703
9.32k
  if (LocVT == MVT::i64) {
704
4.29k
    if (static_cast<MipsCCState *>(&State)->WasOriginalArgF128(ValNo)) {
705
1.16k
      if (!RetCC_F128(ValNo, ValVT, LocVT, LocInfo, ArgFlags, State))
706
1.16k
        return false;
707
8.16k
    }
708
4.29k
  }
709
8.16k
710
8.16k
  if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
711
2.67k
    if (LocVT == MVT::i8 ||
712
2.67k
        LocVT == MVT::i16 ||
713
2.67k
        LocVT == MVT::i32 ||
714
2.67k
        
LocVT == MVT::i641.65k
) {
715
2.04k
      if (ArgFlags.isInReg()) {
716
12
        LocVT = MVT::i64;
717
12
        if (ArgFlags.isSExt())
718
0
                LocInfo = CCValAssign::SExt;
719
12
        else if (ArgFlags.isZExt())
720
0
                LocInfo = CCValAssign::ZExt;
721
12
        else
722
12
                LocInfo = CCValAssign::AExt;
723
12
      }
724
2.04k
    }
725
2.67k
  }
726
8.16k
727
8.16k
  if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isLittle()) {
728
5.48k
    if (LocVT == MVT::i8 ||
729
5.48k
        LocVT == MVT::i16 ||
730
5.48k
        LocVT == MVT::i32 ||
731
5.48k
        
LocVT == MVT::i642.69k
) {
732
4.90k
      if (ArgFlags.isInReg()) {
733
12
        LocVT = MVT::i64;
734
12
        if (ArgFlags.isSExt())
735
0
                LocInfo = CCValAssign::SExtUpper;
736
12
        else if (ArgFlags.isZExt())
737
0
                LocInfo = CCValAssign::ZExtUpper;
738
12
        else
739
12
                LocInfo = CCValAssign::AExtUpper;
740
12
      }
741
4.90k
    }
742
5.48k
  }
743
8.16k
744
8.16k
  if (LocVT == MVT::i64) {
745
3.15k
    static const MCPhysReg RegList1[] = {
746
3.15k
      Mips::V0_64, Mips::V1_64
747
3.15k
    };
748
3.15k
    if (unsigned Reg = State.AllocateReg(RegList1)) {
749
3.15k
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
750
3.15k
      return false;
751
3.15k
    }
752
5.01k
  }
753
5.01k
754
5.01k
  if (LocVT == MVT::f32) {
755
706
    static const MCPhysReg RegList2[] = {
756
706
      Mips::F0, Mips::F2
757
706
    };
758
706
    if (unsigned Reg = State.AllocateReg(RegList2)) {
759
706
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
760
706
      return false;
761
706
    }
762
4.30k
  }
763
4.30k
764
4.30k
  if (LocVT == MVT::f64) {
765
504
    static const MCPhysReg RegList3[] = {
766
504
      Mips::D0_64, Mips::D2_64
767
504
    };
768
504
    if (unsigned Reg = State.AllocateReg(RegList3)) {
769
504
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
770
504
      return false;
771
504
    }
772
3.80k
  }
773
3.80k
774
3.80k
  return true;  // CC didn't match.
775
3.80k
}
776
777
778
static bool RetCC_MipsO32(unsigned ValNo, MVT ValVT,
779
                          MVT LocVT, CCValAssign::LocInfo LocInfo,
780
18.1k
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
781
18.1k
782
18.1k
  if (LocVT == MVT::i1 ||
783
18.1k
      LocVT == MVT::i8 ||
784
18.1k
      LocVT == MVT::i16) {
785
0
    LocVT = MVT::i32;
786
0
    if (ArgFlags.isSExt())
787
0
        LocInfo = CCValAssign::SExt;
788
0
    else if (ArgFlags.isZExt())
789
0
        LocInfo = CCValAssign::ZExt;
790
0
    else
791
0
        LocInfo = CCValAssign::AExt;
792
0
  }
793
18.1k
794
18.1k
  if (!static_cast<MipsCCState *>(&State)->WasOriginalRetVectorFloat(ValNo)) {
795
18.1k
    if (LocVT == MVT::i32) {
796
16.5k
      static const MCPhysReg RegList1[] = {
797
16.5k
        Mips::V0, Mips::V1, Mips::A0, Mips::A1
798
16.5k
      };
799
16.5k
      if (unsigned Reg = State.AllocateReg(RegList1)) {
800
16.5k
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
801
16.5k
        return false;
802
16.5k
      }
803
1.62k
    }
804
18.1k
  }
805
1.62k
806
1.62k
  if (LocVT == MVT::f32) {
807
765
    static const MCPhysReg RegList2[] = {
808
765
      Mips::F0, Mips::F2
809
765
    };
810
765
    if (unsigned Reg = State.AllocateReg(RegList2)) {
811
765
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
812
765
      return false;
813
765
    }
814
855
  }
815
855
816
855
  if (LocVT == MVT::f64) {
817
800
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
818
276
      static const MCPhysReg RegList3[] = {
819
276
        Mips::D0_64, Mips::D2_64
820
276
      };
821
276
      if (unsigned Reg = State.AllocateReg(RegList3)) {
822
276
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
823
276
        return false;
824
276
      }
825
579
    }
826
800
  }
827
579
828
579
  if (LocVT == MVT::f64) {
829
524
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
830
524
      static const MCPhysReg RegList4[] = {
831
524
        Mips::D0, Mips::D1
832
524
      };
833
524
      if (unsigned Reg = State.AllocateReg(RegList4)) {
834
524
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
835
524
        return false;
836
524
      }
837
55
    }
838
524
  }
839
55
840
55
  return true;  // CC didn't match.
841
55
}
MipsFastISel.cpp:RetCC_MipsO32(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
780
57
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
781
57
782
57
  if (LocVT == MVT::i1 ||
783
57
      LocVT == MVT::i8 ||
784
57
      LocVT == MVT::i16) {
785
0
    LocVT = MVT::i32;
786
0
    if (ArgFlags.isSExt())
787
0
        LocInfo = CCValAssign::SExt;
788
0
    else if (ArgFlags.isZExt())
789
0
        LocInfo = CCValAssign::ZExt;
790
0
    else
791
0
        LocInfo = CCValAssign::AExt;
792
0
  }
793
57
794
57
  if (!static_cast<MipsCCState *>(&State)->WasOriginalRetVectorFloat(ValNo)) {
795
57
    if (LocVT == MVT::i32) {
796
49
      static const MCPhysReg RegList1[] = {
797
49
        Mips::V0, Mips::V1, Mips::A0, Mips::A1
798
49
      };
799
49
      if (unsigned Reg = State.AllocateReg(RegList1)) {
800
49
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
801
49
        return false;
802
49
      }
803
8
    }
804
57
  }
805
8
806
8
  if (LocVT == MVT::f32) {
807
3
    static const MCPhysReg RegList2[] = {
808
3
      Mips::F0, Mips::F2
809
3
    };
810
3
    if (unsigned Reg = State.AllocateReg(RegList2)) {
811
3
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
812
3
      return false;
813
3
    }
814
5
  }
815
5
816
5
  if (LocVT == MVT::f64) {
817
5
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
818
0
      static const MCPhysReg RegList3[] = {
819
0
        Mips::D0_64, Mips::D2_64
820
0
      };
821
0
      if (unsigned Reg = State.AllocateReg(RegList3)) {
822
0
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
823
0
        return false;
824
0
      }
825
5
    }
826
5
  }
827
5
828
5
  if (LocVT == MVT::f64) {
829
5
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
830
5
      static const MCPhysReg RegList4[] = {
831
5
        Mips::D0, Mips::D1
832
5
      };
833
5
      if (unsigned Reg = State.AllocateReg(RegList4)) {
834
5
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
835
5
        return false;
836
5
      }
837
0
    }
838
5
  }
839
0
840
0
  return true;  // CC didn't match.
841
0
}
MipsISelLowering.cpp:RetCC_MipsO32(unsigned int, llvm::MVT, llvm::MVT, llvm::CCValAssign::LocInfo, llvm::ISD::ArgFlagsTy, llvm::CCState&)
Line
Count
Source
780
18.1k
                          ISD::ArgFlagsTy ArgFlags, CCState &State) {
781
18.1k
782
18.1k
  if (LocVT == MVT::i1 ||
783
18.1k
      LocVT == MVT::i8 ||
784
18.1k
      LocVT == MVT::i16) {
785
0
    LocVT = MVT::i32;
786
0
    if (ArgFlags.isSExt())
787
0
        LocInfo = CCValAssign::SExt;
788
0
    else if (ArgFlags.isZExt())
789
0
        LocInfo = CCValAssign::ZExt;
790
0
    else
791
0
        LocInfo = CCValAssign::AExt;
792
0
  }
793
18.1k
794
18.1k
  if (!static_cast<MipsCCState *>(&State)->WasOriginalRetVectorFloat(ValNo)) {
795
18.0k
    if (LocVT == MVT::i32) {
796
16.5k
      static const MCPhysReg RegList1[] = {
797
16.5k
        Mips::V0, Mips::V1, Mips::A0, Mips::A1
798
16.5k
      };
799
16.5k
      if (unsigned Reg = State.AllocateReg(RegList1)) {
800
16.5k
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
801
16.5k
        return false;
802
16.5k
      }
803
1.61k
    }
804
18.0k
  }
805
1.61k
806
1.61k
  if (LocVT == MVT::f32) {
807
762
    static const MCPhysReg RegList2[] = {
808
762
      Mips::F0, Mips::F2
809
762
    };
810
762
    if (unsigned Reg = State.AllocateReg(RegList2)) {
811
762
      State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
812
762
      return false;
813
762
    }
814
850
  }
815
850
816
850
  if (LocVT == MVT::f64) {
817
795
    if (static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
818
276
      static const MCPhysReg RegList3[] = {
819
276
        Mips::D0_64, Mips::D2_64
820
276
      };
821
276
      if (unsigned Reg = State.AllocateReg(RegList3)) {
822
276
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
823
276
        return false;
824
276
      }
825
574
    }
826
795
  }
827
574
828
574
  if (LocVT == MVT::f64) {
829
519
    if (!static_cast<const MipsSubtarget&>(State.getMachineFunction().getSubtarget()).isFP64bit()) {
830
519
      static const MCPhysReg RegList4[] = {
831
519
        Mips::D0, Mips::D1
832
519
      };
833
519
      if (unsigned Reg = State.AllocateReg(RegList4)) {
834
519
        State.addLoc(CCValAssign::getReg(ValNo, ValVT, Reg, LocVT, LocInfo));
835
519
        return false;
836
519
      }
837
55
    }
838
519
  }
839
55
840
55
  return true;  // CC didn't match.
841
55
}