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