| OLD | NEW |
| 1 //===- subzero/src/IceInstX86Base.h - Generic x86 instructions -*- C++ -*--===// | 1 //===- subzero/src/IceInstX86Base.h - Generic 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 /// \file | 10 /// \file |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 Cbwdq, | 60 Cbwdq, |
| 61 Cmov, | 61 Cmov, |
| 62 Cmpps, | 62 Cmpps, |
| 63 Cmpxchg, | 63 Cmpxchg, |
| 64 Cmpxchg8b, | 64 Cmpxchg8b, |
| 65 Cvt, | 65 Cvt, |
| 66 Div, | 66 Div, |
| 67 Divps, | 67 Divps, |
| 68 Divss, | 68 Divss, |
| 69 FakeRMW, | 69 FakeRMW, |
| 70 GetIP, |
| 70 Fld, | 71 Fld, |
| 71 Fstp, | 72 Fstp, |
| 72 Icmp, | 73 Icmp, |
| 73 Idiv, | 74 Idiv, |
| 74 Imul, | 75 Imul, |
| 75 ImulImm, | 76 ImulImm, |
| 76 Insertps, | 77 Insertps, |
| 77 Jmp, | 78 Jmp, |
| 78 Label, | 79 Label, |
| 79 Lea, | 80 Lea, |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 static bool classof(const Inst *Inst) { | 234 static bool classof(const Inst *Inst) { |
| 234 return InstX86Base<Machine>::isClassof(Inst, InstX86Base<Machine>::FakeRMW); | 235 return InstX86Base<Machine>::isClassof(Inst, InstX86Base<Machine>::FakeRMW); |
| 235 } | 236 } |
| 236 | 237 |
| 237 private: | 238 private: |
| 238 InstArithmetic::OpKind Op; | 239 InstArithmetic::OpKind Op; |
| 239 InstX86FakeRMW(Cfg *Func, Operand *Data, Operand *Addr, | 240 InstX86FakeRMW(Cfg *Func, Operand *Data, Operand *Addr, |
| 240 InstArithmetic::OpKind Op, Variable *Beacon); | 241 InstArithmetic::OpKind Op, Variable *Beacon); |
| 241 }; | 242 }; |
| 242 | 243 |
| 244 template <class Machine> |
| 245 class InstX86GetIP final : public InstX86Base<Machine> { |
| 246 InstX86GetIP() = delete; |
| 247 InstX86GetIP(const InstX86GetIP &) = delete; |
| 248 InstX86GetIP &operator=(const InstX86GetIP &) = delete; |
| 249 |
| 250 public: |
| 251 static InstX86GetIP *create(Cfg *Func, Variable *Dest) { |
| 252 return new (Func->allocate<InstX86GetIP>()) InstX86GetIP(Func, Dest); |
| 253 } |
| 254 void emit(const Cfg *Func) const override; |
| 255 void emitIAS(const Cfg *Func) const override; |
| 256 void dump(const Cfg *Func) const override; |
| 257 static bool classof(const Inst *Inst) { |
| 258 return InstX86Base<Machine>::isClassof(Inst, InstX86Base<Machine>::GetIP); |
| 259 } |
| 260 |
| 261 private: |
| 262 InstX86GetIP(Cfg *Func, Variable *Dest); |
| 263 }; |
| 264 |
| 243 /// InstX86Label represents an intra-block label that is the target of an | 265 /// InstX86Label represents an intra-block label that is the target of an |
| 244 /// intra-block branch. The offset between the label and the branch must be fit | 266 /// intra-block branch. The offset between the label and the branch must be fit |
| 245 /// into one byte (considered "near"). These are used for lowering i1 | 267 /// into one byte (considered "near"). These are used for lowering i1 |
| 246 /// calculations, Select instructions, and 64-bit compares on a 32-bit | 268 /// calculations, Select instructions, and 64-bit compares on a 32-bit |
| 247 /// architecture, without basic block splitting. Basic block splitting is not so | 269 /// architecture, without basic block splitting. Basic block splitting is not so |
| 248 /// desirable for several reasons, one of which is the impact on decisions based | 270 /// desirable for several reasons, one of which is the impact on decisions based |
| 249 /// on whether a variable's live range spans multiple basic blocks. | 271 /// on whether a variable's live range spans multiple basic blocks. |
| 250 /// | 272 /// |
| 251 /// Intra-block control flow must be used with caution. Consider the sequence | 273 /// Intra-block control flow must be used with caution. Consider the sequence |
| 252 /// for "c = (a >= b ? x : y)". | 274 /// for "c = (a >= b ? x : y)". |
| (...skipping 3181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3434 &InstX86Base<Machine>::Traits::Assembler::psrl}; \ | 3456 &InstX86Base<Machine>::Traits::Assembler::psrl}; \ |
| 3435 } \ | 3457 } \ |
| 3436 } | 3458 } |
| 3437 | 3459 |
| 3438 } // end of namespace X86Internal | 3460 } // end of namespace X86Internal |
| 3439 } // end of namespace Ice | 3461 } // end of namespace Ice |
| 3440 | 3462 |
| 3441 #include "IceInstX86BaseImpl.h" | 3463 #include "IceInstX86BaseImpl.h" |
| 3442 | 3464 |
| 3443 #endif // SUBZERO_SRC_ICEINSTX86BASE_H | 3465 #endif // SUBZERO_SRC_ICEINSTX86BASE_H |
| OLD | NEW |