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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 Cvt, | 189 Cvt, |
190 Div, | 190 Div, |
191 Divps, | 191 Divps, |
192 Divss, | 192 Divss, |
193 Fld, | 193 Fld, |
194 Fstp, | 194 Fstp, |
195 Icmp, | 195 Icmp, |
196 Idiv, | 196 Idiv, |
197 Imul, | 197 Imul, |
198 Insertps, | 198 Insertps, |
| 199 Jmp, |
199 Label, | 200 Label, |
200 Lea, | 201 Lea, |
201 Load, | 202 Load, |
202 Mfence, | 203 Mfence, |
203 Mov, | 204 Mov, |
204 Movd, | 205 Movd, |
205 Movp, | 206 Movp, |
206 Movq, | 207 Movq, |
207 MovssRegs, | 208 MovssRegs, |
208 Movsx, | 209 Movsx, |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 private: | 394 private: |
394 InstX8632Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, | 395 InstX8632Br(Cfg *Func, const CfgNode *TargetTrue, const CfgNode *TargetFalse, |
395 const InstX8632Label *Label, CondX86::BrCond Condition); | 396 const InstX8632Label *Label, CondX86::BrCond Condition); |
396 ~InstX8632Br() override {} | 397 ~InstX8632Br() override {} |
397 CondX86::BrCond Condition; | 398 CondX86::BrCond Condition; |
398 const CfgNode *TargetTrue; | 399 const CfgNode *TargetTrue; |
399 const CfgNode *TargetFalse; | 400 const CfgNode *TargetFalse; |
400 const InstX8632Label *Label; // Intra-block branch target | 401 const InstX8632Label *Label; // Intra-block branch target |
401 }; | 402 }; |
402 | 403 |
| 404 // Jump to a target outside this function, such as tailcall, nacljump, |
| 405 // naclret, unreachable. This is different from a Branch instruction |
| 406 // in that there is no intra-function control flow to represent. |
| 407 class InstX8632Jmp : public InstX8632 { |
| 408 InstX8632Jmp(const InstX8632Jmp &) = delete; |
| 409 InstX8632Jmp &operator=(const InstX8632Jmp &) = delete; |
| 410 |
| 411 public: |
| 412 static InstX8632Jmp *create(Cfg *Func, Operand *Target) { |
| 413 return new (Func->allocate<InstX8632Jmp>()) InstX8632Jmp(Func, Target); |
| 414 } |
| 415 void emit(const Cfg *Func) const override; |
| 416 void emitIAS(const Cfg *Func) const override; |
| 417 void dump(const Cfg *Func) const override; |
| 418 static bool classof(const Inst *Inst) { return isClassof(Inst, Jmp); } |
| 419 |
| 420 private: |
| 421 InstX8632Jmp(Cfg *Func, Operand *Target); |
| 422 }; |
| 423 |
403 // AdjustStack instruction - subtracts esp by the given amount and | 424 // AdjustStack instruction - subtracts esp by the given amount and |
404 // updates the stack offset during code emission. | 425 // updates the stack offset during code emission. |
405 class InstX8632AdjustStack : public InstX8632 { | 426 class InstX8632AdjustStack : public InstX8632 { |
406 InstX8632AdjustStack(const InstX8632AdjustStack &) = delete; | 427 InstX8632AdjustStack(const InstX8632AdjustStack &) = delete; |
407 InstX8632AdjustStack &operator=(const InstX8632AdjustStack &) = delete; | 428 InstX8632AdjustStack &operator=(const InstX8632AdjustStack &) = delete; |
408 | 429 |
409 public: | 430 public: |
410 static InstX8632AdjustStack *create(Cfg *Func, SizeT Amount, Variable *Esp) { | 431 static InstX8632AdjustStack *create(Cfg *Func, SizeT Amount, Variable *Esp) { |
411 return new (Func->allocate<InstX8632AdjustStack>()) | 432 return new (Func->allocate<InstX8632AdjustStack>()) |
412 InstX8632AdjustStack(Func, Amount, Esp); | 433 InstX8632AdjustStack(Func, Amount, Esp); |
(...skipping 1169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; | 1603 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; |
1583 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; | 1604 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; |
1584 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; | 1605 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; |
1585 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; | 1606 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; |
1586 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; | 1607 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; |
1587 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; | 1608 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; |
1588 | 1609 |
1589 } // end of namespace Ice | 1610 } // end of namespace Ice |
1590 | 1611 |
1591 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1612 #endif // SUBZERO_SRC_ICEINSTX8632_H |
OLD | NEW |