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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 class InstX8632 : public InstTarget { | 132 class InstX8632 : public InstTarget { |
133 public: | 133 public: |
134 enum InstKindX8632 { | 134 enum InstKindX8632 { |
135 k__Start = Inst::Target, | 135 k__Start = Inst::Target, |
136 Adc, | 136 Adc, |
137 Add, | 137 Add, |
138 Addps, | 138 Addps, |
139 Addss, | 139 Addss, |
140 And, | 140 And, |
| 141 Blendvps, |
141 Br, | 142 Br, |
142 Bsf, | 143 Bsf, |
143 Bsr, | 144 Bsr, |
144 Bswap, | 145 Bswap, |
145 Call, | 146 Call, |
146 Cdq, | 147 Cdq, |
147 Cmov, | 148 Cmov, |
148 Cmpps, | 149 Cmpps, |
149 Cmpxchg, | 150 Cmpxchg, |
150 Cmpxchg8b, | 151 Cmpxchg8b, |
151 Cvt, | 152 Cvt, |
152 Div, | 153 Div, |
153 Divps, | 154 Divps, |
154 Divss, | 155 Divss, |
155 Fld, | 156 Fld, |
156 Fstp, | 157 Fstp, |
157 Icmp, | 158 Icmp, |
158 Idiv, | 159 Idiv, |
159 Imul, | 160 Imul, |
| 161 Insertps, |
160 Label, | 162 Label, |
161 Lea, | 163 Lea, |
162 Load, | 164 Load, |
163 Mfence, | 165 Mfence, |
164 Mov, | 166 Mov, |
165 Movd, | 167 Movd, |
166 Movp, | 168 Movp, |
167 Movq, | 169 Movq, |
168 Movss, | 170 Movss, |
169 Movsx, | 171 Movsx, |
170 Movzx, | 172 Movzx, |
171 Mul, | 173 Mul, |
172 Mulps, | 174 Mulps, |
173 Mulss, | 175 Mulss, |
174 Neg, | 176 Neg, |
175 Or, | 177 Or, |
176 Padd, | 178 Padd, |
177 Pand, | 179 Pand, |
178 Pandn, | 180 Pandn, |
| 181 Pblendvb, |
179 Pcmpeq, | 182 Pcmpeq, |
180 Pcmpgt, | 183 Pcmpgt, |
181 Pextrw, | 184 Pextr, |
182 Pinsrw, | 185 Pinsr, |
183 Pmullw, | 186 Pmull, |
184 Pmuludq, | 187 Pmuludq, |
185 Pop, | 188 Pop, |
186 Por, | 189 Por, |
187 Pshufd, | 190 Pshufd, |
188 Psll, | 191 Psll, |
189 Psra, | 192 Psra, |
190 Psub, | 193 Psub, |
191 Push, | 194 Push, |
192 Pxor, | 195 Pxor, |
193 Ret, | 196 Ret, |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 typedef InstX8632Binop<InstX8632::And> InstX8632And; | 569 typedef InstX8632Binop<InstX8632::And> InstX8632And; |
567 typedef InstX8632Binop<InstX8632::Pand> InstX8632Pand; | 570 typedef InstX8632Binop<InstX8632::Pand> InstX8632Pand; |
568 typedef InstX8632Binop<InstX8632::Pandn> InstX8632Pandn; | 571 typedef InstX8632Binop<InstX8632::Pandn> InstX8632Pandn; |
569 typedef InstX8632Binop<InstX8632::Or> InstX8632Or; | 572 typedef InstX8632Binop<InstX8632::Or> InstX8632Or; |
570 typedef InstX8632Binop<InstX8632::Por> InstX8632Por; | 573 typedef InstX8632Binop<InstX8632::Por> InstX8632Por; |
571 typedef InstX8632Binop<InstX8632::Xor> InstX8632Xor; | 574 typedef InstX8632Binop<InstX8632::Xor> InstX8632Xor; |
572 typedef InstX8632Binop<InstX8632::Pxor> InstX8632Pxor; | 575 typedef InstX8632Binop<InstX8632::Pxor> InstX8632Pxor; |
573 typedef InstX8632Binop<InstX8632::Imul> InstX8632Imul; | 576 typedef InstX8632Binop<InstX8632::Imul> InstX8632Imul; |
574 typedef InstX8632Binop<InstX8632::Mulps> InstX8632Mulps; | 577 typedef InstX8632Binop<InstX8632::Mulps> InstX8632Mulps; |
575 typedef InstX8632Binop<InstX8632::Mulss> InstX8632Mulss; | 578 typedef InstX8632Binop<InstX8632::Mulss> InstX8632Mulss; |
576 typedef InstX8632Binop<InstX8632::Pmullw> InstX8632Pmullw; | 579 typedef InstX8632Binop<InstX8632::Pmull> InstX8632Pmull; |
577 typedef InstX8632Binop<InstX8632::Pmuludq> InstX8632Pmuludq; | 580 typedef InstX8632Binop<InstX8632::Pmuludq> InstX8632Pmuludq; |
578 typedef InstX8632Binop<InstX8632::Divps> InstX8632Divps; | 581 typedef InstX8632Binop<InstX8632::Divps> InstX8632Divps; |
579 typedef InstX8632Binop<InstX8632::Divss> InstX8632Divss; | 582 typedef InstX8632Binop<InstX8632::Divss> InstX8632Divss; |
580 typedef InstX8632Binop<InstX8632::Rol, true> InstX8632Rol; | 583 typedef InstX8632Binop<InstX8632::Rol, true> InstX8632Rol; |
581 typedef InstX8632Binop<InstX8632::Shl, true> InstX8632Shl; | 584 typedef InstX8632Binop<InstX8632::Shl, true> InstX8632Shl; |
582 typedef InstX8632Binop<InstX8632::Psll> InstX8632Psll; | 585 typedef InstX8632Binop<InstX8632::Psll> InstX8632Psll; |
583 typedef InstX8632Binop<InstX8632::Shr, true> InstX8632Shr; | 586 typedef InstX8632Binop<InstX8632::Shr, true> InstX8632Shr; |
584 typedef InstX8632Binop<InstX8632::Sar, true> InstX8632Sar; | 587 typedef InstX8632Binop<InstX8632::Sar, true> InstX8632Sar; |
585 typedef InstX8632Binop<InstX8632::Psra> InstX8632Psra; | 588 typedef InstX8632Binop<InstX8632::Psra> InstX8632Psra; |
586 typedef InstX8632Binop<InstX8632::Pcmpeq> InstX8632Pcmpeq; | 589 typedef InstX8632Binop<InstX8632::Pcmpeq> InstX8632Pcmpeq; |
587 typedef InstX8632Binop<InstX8632::Pcmpgt> InstX8632Pcmpgt; | 590 typedef InstX8632Binop<InstX8632::Pcmpgt> InstX8632Pcmpgt; |
588 // TODO: movss is only a binary operation when the source and dest | 591 // TODO: movss is only a binary operation when the source and dest |
589 // operands are both registers. In other cases, it behaves like a copy | 592 // operands are both registers. In other cases, it behaves like a copy |
590 // (mov-like) operation. Eventually, InstX8632Movss should assert that | 593 // (mov-like) operation. Eventually, InstX8632Movss should assert that |
591 // both its source and dest operands are registers, and the lowering | 594 // both its source and dest operands are registers, and the lowering |
592 // code should use _mov instead of _movss in cases where a copy | 595 // code should use _mov instead of _movss in cases where a copy |
593 // operation is intended. | 596 // operation is intended. |
594 typedef InstX8632Binop<InstX8632::Movss> InstX8632Movss; | 597 typedef InstX8632Binop<InstX8632::Movss> InstX8632Movss; |
595 typedef InstX8632Ternop<InstX8632::Idiv> InstX8632Idiv; | 598 typedef InstX8632Ternop<InstX8632::Idiv> InstX8632Idiv; |
596 typedef InstX8632Ternop<InstX8632::Div> InstX8632Div; | 599 typedef InstX8632Ternop<InstX8632::Div> InstX8632Div; |
597 typedef InstX8632Ternop<InstX8632::Pinsrw> InstX8632Pinsrw; | 600 typedef InstX8632Ternop<InstX8632::Insertps> InstX8632Insertps; |
| 601 typedef InstX8632Ternop<InstX8632::Pinsr> InstX8632Pinsr; |
598 typedef InstX8632Ternop<InstX8632::Shufps> InstX8632Shufps; | 602 typedef InstX8632Ternop<InstX8632::Shufps> InstX8632Shufps; |
599 typedef InstX8632ThreeAddressop<InstX8632::Pextrw> InstX8632Pextrw; | 603 typedef InstX8632Ternop<InstX8632::Blendvps> InstX8632Blendvps; |
| 604 typedef InstX8632Ternop<InstX8632::Pblendvb> InstX8632Pblendvb; |
| 605 typedef InstX8632ThreeAddressop<InstX8632::Pextr> InstX8632Pextr; |
600 typedef InstX8632ThreeAddressop<InstX8632::Pshufd> InstX8632Pshufd; | 606 typedef InstX8632ThreeAddressop<InstX8632::Pshufd> InstX8632Pshufd; |
601 | 607 |
602 // Base class for a lockable x86-32 instruction (emits a locked prefix). | 608 // Base class for a lockable x86-32 instruction (emits a locked prefix). |
603 class InstX8632Lockable : public InstX8632 { | 609 class InstX8632Lockable : public InstX8632 { |
604 public: | 610 public: |
605 virtual void emit(const Cfg *Func) const = 0; | 611 virtual void emit(const Cfg *Func) const = 0; |
606 virtual void dump(const Cfg *Func) const; | 612 virtual void dump(const Cfg *Func) const; |
607 | 613 |
608 protected: | 614 protected: |
609 bool Locked; | 615 bool Locked; |
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 private: | 1185 private: |
1180 InstX8632Xchg(Cfg *Func, Operand *Dest, Variable *Source); | 1186 InstX8632Xchg(Cfg *Func, Operand *Dest, Variable *Source); |
1181 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; | 1187 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; |
1182 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; | 1188 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; |
1183 virtual ~InstX8632Xchg() {} | 1189 virtual ~InstX8632Xchg() {} |
1184 }; | 1190 }; |
1185 | 1191 |
1186 } // end of namespace Ice | 1192 } // end of namespace Ice |
1187 | 1193 |
1188 #endif // SUBZERO_SRC_ICEINSTX8632_H | 1194 #endif // SUBZERO_SRC_ICEINSTX8632_H |
OLD | NEW |