OLD | NEW |
1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// | 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 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 // This file declares the TargetLoweringX8632 class, which | 10 // This file declares the TargetLoweringX8632 class, which |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 void _imul(Variable *Dest, Operand *Src0) { | 285 void _imul(Variable *Dest, Operand *Src0) { |
286 Context.insert(InstX8632Imul::create(Func, Dest, Src0)); | 286 Context.insert(InstX8632Imul::create(Func, Dest, Src0)); |
287 } | 287 } |
288 void _insertps(Variable *Dest, Operand *Src0, Operand *Src1) { | 288 void _insertps(Variable *Dest, Operand *Src0, Operand *Src1) { |
289 Context.insert(InstX8632Insertps::create(Func, Dest, Src0, Src1)); | 289 Context.insert(InstX8632Insertps::create(Func, Dest, Src0, Src1)); |
290 } | 290 } |
291 void _lea(Variable *Dest, Operand *Src0) { | 291 void _lea(Variable *Dest, Operand *Src0) { |
292 Context.insert(InstX8632Lea::create(Func, Dest, Src0)); | 292 Context.insert(InstX8632Lea::create(Func, Dest, Src0)); |
293 } | 293 } |
294 void _mfence() { Context.insert(InstX8632Mfence::create(Func)); } | 294 void _mfence() { Context.insert(InstX8632Mfence::create(Func)); } |
295 // If Dest=NULL is passed in, then a new variable is created, marked | 295 // If Dest=nullptr is passed in, then a new variable is created, |
296 // as infinite register allocation weight, and returned through the | 296 // marked as infinite register allocation weight, and returned |
297 // in/out Dest argument. | 297 // through the in/out Dest argument. |
298 void _mov(Variable *&Dest, Operand *Src0, | 298 void _mov(Variable *&Dest, Operand *Src0, |
299 int32_t RegNum = Variable::NoRegister) { | 299 int32_t RegNum = Variable::NoRegister) { |
300 if (Dest == NULL) | 300 if (Dest == nullptr) |
301 Dest = makeReg(Src0->getType(), RegNum); | 301 Dest = makeReg(Src0->getType(), RegNum); |
302 Context.insert(InstX8632Mov::create(Func, Dest, Src0)); | 302 Context.insert(InstX8632Mov::create(Func, Dest, Src0)); |
303 } | 303 } |
304 void _mov_nonkillable(Variable *Dest, Operand *Src0) { | 304 void _mov_nonkillable(Variable *Dest, Operand *Src0) { |
305 Inst *NewInst = InstX8632Mov::create(Func, Dest, Src0); | 305 Inst *NewInst = InstX8632Mov::create(Func, Dest, Src0); |
306 NewInst->setDestNonKillable(); | 306 NewInst->setDestNonKillable(); |
307 Context.insert(NewInst); | 307 Context.insert(NewInst); |
308 } | 308 } |
309 void _movd(Variable *Dest, Operand *Src0) { | 309 void _movd(Variable *Dest, Operand *Src0) { |
310 Context.insert(InstX8632Movd::create(Func, Dest, Src0)); | 310 Context.insert(InstX8632Movd::create(Func, Dest, Src0)); |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 } | 389 } |
390 void _psub(Variable *Dest, Operand *Src0) { | 390 void _psub(Variable *Dest, Operand *Src0) { |
391 Context.insert(InstX8632Psub::create(Func, Dest, Src0)); | 391 Context.insert(InstX8632Psub::create(Func, Dest, Src0)); |
392 } | 392 } |
393 void _push(Variable *Src0) { | 393 void _push(Variable *Src0) { |
394 Context.insert(InstX8632Push::create(Func, Src0)); | 394 Context.insert(InstX8632Push::create(Func, Src0)); |
395 } | 395 } |
396 void _pxor(Variable *Dest, Operand *Src0) { | 396 void _pxor(Variable *Dest, Operand *Src0) { |
397 Context.insert(InstX8632Pxor::create(Func, Dest, Src0)); | 397 Context.insert(InstX8632Pxor::create(Func, Dest, Src0)); |
398 } | 398 } |
399 void _ret(Variable *Src0 = NULL) { | 399 void _ret(Variable *Src0 = nullptr) { |
400 Context.insert(InstX8632Ret::create(Func, Src0)); | 400 Context.insert(InstX8632Ret::create(Func, Src0)); |
401 } | 401 } |
402 void _rol(Variable *Dest, Operand *Src0) { | 402 void _rol(Variable *Dest, Operand *Src0) { |
403 Context.insert(InstX8632Rol::create(Func, Dest, Src0)); | 403 Context.insert(InstX8632Rol::create(Func, Dest, Src0)); |
404 } | 404 } |
405 void _sar(Variable *Dest, Operand *Src0) { | 405 void _sar(Variable *Dest, Operand *Src0) { |
406 Context.insert(InstX8632Sar::create(Func, Dest, Src0)); | 406 Context.insert(InstX8632Sar::create(Func, Dest, Src0)); |
407 } | 407 } |
408 void _sbb(Variable *Dest, Operand *Src0) { | 408 void _sbb(Variable *Dest, Operand *Src0) { |
409 Context.insert(InstX8632Sbb::create(Func, Dest, Src0)); | 409 Context.insert(InstX8632Sbb::create(Func, Dest, Src0)); |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 }; | 509 }; |
510 | 510 |
511 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; | 511 template <> void ConstantInteger32::emit(GlobalContext *Ctx) const; |
512 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; | 512 template <> void ConstantInteger64::emit(GlobalContext *Ctx) const; |
513 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; | 513 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; |
514 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; | 514 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; |
515 | 515 |
516 } // end of namespace Ice | 516 } // end of namespace Ice |
517 | 517 |
518 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H | 518 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H |
OLD | NEW |