OLD | NEW |
---|---|
1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- C++-*-===// | 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- C++-*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 /// | 9 /// |
10 /// \file | 10 /// \file |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 } | 184 } |
185 | 185 |
186 void _add_s(Variable *Dest, Variable *Src0, Variable *Src1) { | 186 void _add_s(Variable *Dest, Variable *Src0, Variable *Src1) { |
187 Context.insert<InstMIPS32Add_s>(Dest, Src0, Src1); | 187 Context.insert<InstMIPS32Add_s>(Dest, Src0, Src1); |
188 } | 188 } |
189 | 189 |
190 void _addiu(Variable *Dest, Variable *Src, uint32_t Imm) { | 190 void _addiu(Variable *Dest, Variable *Src, uint32_t Imm) { |
191 Context.insert<InstMIPS32Addiu>(Dest, Src, Imm); | 191 Context.insert<InstMIPS32Addiu>(Dest, Src, Imm); |
192 } | 192 } |
193 | 193 |
194 //void _bc1t(...) { | |
John
2016/06/01 15:01:05
what do these comments mean?
obucinac
2016/06/01 16:38:10
Removed for now.
| |
195 // Context.insert<InstMIPS32Bc1t>(...); // new base class needed | |
196 //} | |
197 | |
198 //void _c_le_d(...) { | |
199 // Context.insert<InstMIPS32C_le_d>(...); // new base class needed | |
200 //} | |
201 | |
202 void _cvt_d_l(Variable *Dest, Variable *Src) { | |
203 Context.insert<InstMIPS32Cvt_d_l>(Dest, Src); | |
204 } | |
205 | |
206 void _cvt_d_s(Variable *Dest, Variable *Src) { | |
207 Context.insert<InstMIPS32Cvt_d_s>(Dest, Src); | |
208 } | |
209 | |
210 void _cvt_d_w(Variable *Dest, Variable *Src) { | |
211 Context.insert<InstMIPS32Cvt_d_w>(Dest, Src); | |
212 } | |
213 | |
214 void _cvt_s_d(Variable *Dest, Variable *Src) { | |
215 Context.insert<InstMIPS32Cvt_s_d>(Dest, Src); | |
216 } | |
217 | |
218 void _cvt_s_l(Variable *Dest, Variable *Src) { | |
219 Context.insert<InstMIPS32Cvt_s_l>(Dest, Src); | |
220 } | |
221 | |
222 void _cvt_s_w(Variable *Dest, Variable *Src) { | |
223 Context.insert<InstMIPS32Cvt_s_w>(Dest, Src); | |
224 } | |
225 | |
194 void _div(Variable *Dest, Variable *Src0, Variable *Src1) { | 226 void _div(Variable *Dest, Variable *Src0, Variable *Src1) { |
195 Context.insert<InstMIPS32Div>(Dest, Src0, Src1); | 227 Context.insert<InstMIPS32Div>(Dest, Src0, Src1); |
196 } | 228 } |
197 | 229 |
198 void _div_d(Variable *Dest, Variable *Src0, Variable *Src1) { | 230 void _div_d(Variable *Dest, Variable *Src0, Variable *Src1) { |
199 Context.insert<InstMIPS32Div_d>(Dest, Src0, Src1); | 231 Context.insert<InstMIPS32Div_d>(Dest, Src0, Src1); |
200 } | 232 } |
201 | 233 |
202 void _div_s(Variable *Dest, Variable *Src0, Variable *Src1) { | 234 void _div_s(Variable *Dest, Variable *Src0, Variable *Src1) { |
203 Context.insert<InstMIPS32Div_s>(Dest, Src0, Src1); | 235 Context.insert<InstMIPS32Div_s>(Dest, Src0, Src1); |
204 } | 236 } |
205 | 237 |
206 void _divu(Variable *Dest, Variable *Src0, Variable *Src1) { | 238 void _divu(Variable *Dest, Variable *Src0, Variable *Src1) { |
207 Context.insert<InstMIPS32Divu>(Dest, Src0, Src1); | 239 Context.insert<InstMIPS32Divu>(Dest, Src0, Src1); |
208 } | 240 } |
209 | 241 |
242 void _ldc1(Variable *Value, OperandMIPS32Mem *Mem) { | |
243 Context.insert<InstMIPS32Ldc1>(Value, Mem); | |
244 } | |
245 | |
246 void _lwc1(Variable *Value, OperandMIPS32Mem *Mem) { | |
247 Context.insert<InstMIPS32Lwc1>(Value, Mem); | |
248 } | |
249 | |
210 void _lui(Variable *Dest, uint32_t Imm) { | 250 void _lui(Variable *Dest, uint32_t Imm) { |
211 Context.insert<InstMIPS32Lui>(Dest, Imm); | 251 Context.insert<InstMIPS32Lui>(Dest, Imm); |
212 } | 252 } |
213 | 253 |
214 void _mov(Variable *Dest, Operand *Src0) { | 254 void _mov(Variable *Dest, Operand *Src0) { |
215 assert(Dest != nullptr); | 255 assert(Dest != nullptr); |
216 // Variable* Src0_ = llvm::dyn_cast<Variable>(Src0); | 256 // Variable* Src0_ = llvm::dyn_cast<Variable>(Src0); |
217 if (llvm::isa<ConstantRelocatable>(Src0)) { | 257 if (llvm::isa<ConstantRelocatable>(Src0)) { |
218 Context.insert<InstMIPS32La>(Dest, Src0); | 258 Context.insert<InstMIPS32La>(Dest, Src0); |
219 } else { | 259 } else { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
280 } | 320 } |
281 | 321 |
282 void _or(Variable *Dest, Variable *Src0, Variable *Src1) { | 322 void _or(Variable *Dest, Variable *Src0, Variable *Src1) { |
283 Context.insert<InstMIPS32Or>(Dest, Src0, Src1); | 323 Context.insert<InstMIPS32Or>(Dest, Src0, Src1); |
284 } | 324 } |
285 | 325 |
286 void _ori(Variable *Dest, Variable *Src, uint32_t Imm) { | 326 void _ori(Variable *Dest, Variable *Src, uint32_t Imm) { |
287 Context.insert<InstMIPS32Ori>(Dest, Src, Imm); | 327 Context.insert<InstMIPS32Ori>(Dest, Src, Imm); |
288 } | 328 } |
289 | 329 |
330 void _sdc1(Variable *Value, OperandMIPS32Mem *Mem) { | |
331 Context.insert<InstMIPS32Sdc1>(Value, Mem); | |
332 } | |
333 | |
290 void _sll(Variable *Dest, Variable *Src, uint32_t Imm) { | 334 void _sll(Variable *Dest, Variable *Src, uint32_t Imm) { |
291 Context.insert<InstMIPS32Sll>(Dest, Src, Imm); | 335 Context.insert<InstMIPS32Sll>(Dest, Src, Imm); |
292 } | 336 } |
293 | 337 |
294 void _sllv(Variable *Dest, Variable *Src0, Variable *Src1) { | 338 void _sllv(Variable *Dest, Variable *Src0, Variable *Src1) { |
295 Context.insert<InstMIPS32Sllv>(Dest, Src0, Src1); | 339 Context.insert<InstMIPS32Sllv>(Dest, Src0, Src1); |
296 } | 340 } |
297 | 341 |
298 void _slt(Variable *Dest, Variable *Src0, Variable *Src1) { | 342 void _slt(Variable *Dest, Variable *Src0, Variable *Src1) { |
299 Context.insert<InstMIPS32Slt>(Dest, Src0, Src1); | 343 Context.insert<InstMIPS32Slt>(Dest, Src0, Src1); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
340 } | 384 } |
341 | 385 |
342 void _subu(Variable *Dest, Variable *Src0, Variable *Src1) { | 386 void _subu(Variable *Dest, Variable *Src0, Variable *Src1) { |
343 Context.insert<InstMIPS32Subu>(Dest, Src0, Src1); | 387 Context.insert<InstMIPS32Subu>(Dest, Src0, Src1); |
344 } | 388 } |
345 | 389 |
346 void _sw(Variable *Value, OperandMIPS32Mem *Mem) { | 390 void _sw(Variable *Value, OperandMIPS32Mem *Mem) { |
347 Context.insert<InstMIPS32Sw>(Value, Mem); | 391 Context.insert<InstMIPS32Sw>(Value, Mem); |
348 } | 392 } |
349 | 393 |
394 void _swc1(Variable *Value, OperandMIPS32Mem *Mem) { | |
395 Context.insert<InstMIPS32Swc1>(Value, Mem); | |
396 } | |
397 | |
398 void _trunc_l_d(Variable *Dest, Variable *Src) { | |
399 Context.insert<InstMIPS32Trunc_l_d>(Dest, Src); | |
400 } | |
401 | |
402 void _trunc_l_s(Variable *Dest, Variable *Src) { | |
403 Context.insert<InstMIPS32Trunc_l_s>(Dest, Src); | |
404 } | |
405 | |
406 void _trunc_w_d(Variable *Dest, Variable *Src) { | |
407 Context.insert<InstMIPS32Trunc_w_d>(Dest, Src); | |
408 } | |
409 | |
410 void _trunc_w_s(Variable *Dest, Variable *Src) { | |
411 Context.insert<InstMIPS32Trunc_w_s>(Dest, Src); | |
412 } | |
413 | |
350 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) { | 414 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) { |
351 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1); | 415 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1); |
352 } | 416 } |
353 | 417 |
354 void _xori(Variable *Dest, Variable *Src, uint32_t Imm) { | 418 void _xori(Variable *Dest, Variable *Src, uint32_t Imm) { |
355 Context.insert<InstMIPS32Xori>(Dest, Src, Imm); | 419 Context.insert<InstMIPS32Xori>(Dest, Src, Imm); |
356 } | 420 } |
357 | 421 |
358 void lowerArguments() override; | 422 void lowerArguments() override; |
359 | 423 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
561 explicit TargetHeaderMIPS32(GlobalContext *Ctx); | 625 explicit TargetHeaderMIPS32(GlobalContext *Ctx); |
562 | 626 |
563 private: | 627 private: |
564 ~TargetHeaderMIPS32() = default; | 628 ~TargetHeaderMIPS32() = default; |
565 }; | 629 }; |
566 | 630 |
567 } // end of namespace MIPS32 | 631 } // end of namespace MIPS32 |
568 } // end of namespace Ice | 632 } // end of namespace Ice |
569 | 633 |
570 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H | 634 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H |
OLD | NEW |