OLD | NEW |
1 //===- subzero/src/IceInstX8632.h - Low-level x86 instructions --*- C++ -*-===// | 1 //===- subzero/src/IceInstX8632.h - Low-level x86 instructions --*- 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 InstX8632 and OperandX8632 classes and | 10 // This file declares the InstX8632 and OperandX8632 classes and |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 335 |
336 // Conditional and unconditional branch instruction. | 336 // Conditional and unconditional branch instruction. |
337 class InstX8632Br : public InstX8632 { | 337 class InstX8632Br : public InstX8632 { |
338 InstX8632Br(const InstX8632Br &) = delete; | 338 InstX8632Br(const InstX8632Br &) = delete; |
339 InstX8632Br &operator=(const InstX8632Br &) = delete; | 339 InstX8632Br &operator=(const InstX8632Br &) = delete; |
340 | 340 |
341 public: | 341 public: |
342 // Create a conditional branch to a node. | 342 // Create a conditional branch to a node. |
343 static InstX8632Br *create(Cfg *Func, CfgNode *TargetTrue, | 343 static InstX8632Br *create(Cfg *Func, CfgNode *TargetTrue, |
344 CfgNode *TargetFalse, CondX86::BrCond Condition) { | 344 CfgNode *TargetFalse, CondX86::BrCond Condition) { |
| 345 assert(Condition != CondX86::Br_None); |
345 const InstX8632Label *NoLabel = NULL; | 346 const InstX8632Label *NoLabel = NULL; |
346 return new (Func->allocate<InstX8632Br>()) | 347 return new (Func->allocate<InstX8632Br>()) |
347 InstX8632Br(Func, TargetTrue, TargetFalse, NoLabel, Condition); | 348 InstX8632Br(Func, TargetTrue, TargetFalse, NoLabel, Condition); |
348 } | 349 } |
349 // Create an unconditional branch to a node. | 350 // Create an unconditional branch to a node. |
350 static InstX8632Br *create(Cfg *Func, CfgNode *Target) { | 351 static InstX8632Br *create(Cfg *Func, CfgNode *Target) { |
351 const CfgNode *NoCondTarget = NULL; | 352 const CfgNode *NoCondTarget = NULL; |
352 const InstX8632Label *NoLabel = NULL; | 353 const InstX8632Label *NoLabel = NULL; |
353 return new (Func->allocate<InstX8632Br>()) | 354 return new (Func->allocate<InstX8632Br>()) |
354 InstX8632Br(Func, NoCondTarget, Target, NoLabel, CondX86::Br_None); | 355 InstX8632Br(Func, NoCondTarget, Target, NoLabel, CondX86::Br_None); |
355 } | 356 } |
356 // Create a non-terminator conditional branch to a node, with a | 357 // Create a non-terminator conditional branch to a node, with a |
357 // fallthrough to the next instruction in the current node. This is | 358 // fallthrough to the next instruction in the current node. This is |
358 // used for switch lowering. | 359 // used for switch lowering. |
359 static InstX8632Br *create(Cfg *Func, CfgNode *Target, | 360 static InstX8632Br *create(Cfg *Func, CfgNode *Target, |
360 CondX86::BrCond Condition) { | 361 CondX86::BrCond Condition) { |
| 362 assert(Condition != CondX86::Br_None); |
361 const CfgNode *NoUncondTarget = NULL; | 363 const CfgNode *NoUncondTarget = NULL; |
362 const InstX8632Label *NoLabel = NULL; | 364 const InstX8632Label *NoLabel = NULL; |
363 return new (Func->allocate<InstX8632Br>()) | 365 return new (Func->allocate<InstX8632Br>()) |
364 InstX8632Br(Func, Target, NoUncondTarget, NoLabel, Condition); | 366 InstX8632Br(Func, Target, NoUncondTarget, NoLabel, Condition); |
365 } | 367 } |
366 // Create a conditional intra-block branch (or unconditional, if | 368 // Create a conditional intra-block branch (or unconditional, if |
367 // Condition==Br_None) to a label in the current block. | 369 // Condition==Br_None) to a label in the current block. |
368 static InstX8632Br *create(Cfg *Func, InstX8632Label *Label, | 370 static InstX8632Br *create(Cfg *Func, InstX8632Label *Label, |
369 CondX86::BrCond Condition) { | 371 CondX86::BrCond Condition) { |
370 const CfgNode *NoCondTarget = NULL; | 372 const CfgNode *NoCondTarget = NULL; |
(...skipping 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; | 1546 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; |
1545 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; | 1547 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; |
1546 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; | 1548 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; |
1547 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; | 1549 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; |
1548 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; | 1550 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; |
1549 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; | 1551 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; |
1550 | 1552 |
1551 } // end of namespace Ice | 1553 } // end of namespace Ice |
1552 | 1554 |
1553 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1555 #endif // SUBZERO_SRC_ICEINSTX8632_H |
OLD | NEW |