| OLD | NEW | 
|     1 //===- subzero/src/IceInstMIPS32.h - MIPS32 machine instrs --*- C++ -*-----===// |     1 //===- subzero/src/IceInstMIPS32.h - MIPS32 machine instrs --*- 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 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1193 using InstMIPS32Xor = InstMIPS32ThreeAddrGPR<InstMIPS32::Xor>; |  1193 using InstMIPS32Xor = InstMIPS32ThreeAddrGPR<InstMIPS32::Xor>; | 
|  1194 using InstMIPS32Xori = InstMIPS32Imm16<InstMIPS32::Xori>; |  1194 using InstMIPS32Xori = InstMIPS32Imm16<InstMIPS32::Xori>; | 
|  1195  |  1195  | 
|  1196 /// Handles (some of) vmov's various formats. |  1196 /// Handles (some of) vmov's various formats. | 
|  1197 class InstMIPS32Mov final : public InstMIPS32 { |  1197 class InstMIPS32Mov final : public InstMIPS32 { | 
|  1198   InstMIPS32Mov() = delete; |  1198   InstMIPS32Mov() = delete; | 
|  1199   InstMIPS32Mov(const InstMIPS32Mov &) = delete; |  1199   InstMIPS32Mov(const InstMIPS32Mov &) = delete; | 
|  1200   InstMIPS32Mov &operator=(const InstMIPS32Mov &) = delete; |  1200   InstMIPS32Mov &operator=(const InstMIPS32Mov &) = delete; | 
|  1201  |  1201  | 
|  1202 public: |  1202 public: | 
|  1203   static InstMIPS32Mov *create(Cfg *Func, Variable *Dest, Operand *Src) { |  1203   static InstMIPS32Mov *create(Cfg *Func, Variable *Dest, Operand *Src, | 
|  1204     return new (Func->allocate<InstMIPS32Mov>()) InstMIPS32Mov(Func, Dest, Src); |  1204                                Operand *Src2) { | 
 |  1205     return new (Func->allocate<InstMIPS32Mov>()) | 
 |  1206         InstMIPS32Mov(Func, Dest, Src, Src2); | 
|  1205   } |  1207   } | 
 |  1208  | 
|  1206   bool isRedundantAssign() const override { |  1209   bool isRedundantAssign() const override { | 
|  1207     return !isMultiDest() && !isMultiSource() && |  1210     return checkForRedundantAssign(getDest(), getSrc(0)); | 
|  1208            checkForRedundantAssign(getDest(), getSrc(0)); |  | 
|  1209   } |  1211   } | 
|  1210   // bool isSimpleAssign() const override { return true; } |  1212   // bool isSimpleAssign() const override { return true; } | 
|  1211   void emit(const Cfg *Func) const override; |  1213   void emit(const Cfg *Func) const override; | 
|  1212   void emitIAS(const Cfg *Func) const override; |  1214   void emitIAS(const Cfg *Func) const override; | 
|  1213   void dump(const Cfg *Func) const override; |  1215   void dump(const Cfg *Func) const override; | 
|  1214   static bool classof(const Inst *Inst) { return isClassof(Inst, Mov); } |  1216   static bool classof(const Inst *Inst) { return isClassof(Inst, Mov); } | 
|  1215  |  1217  | 
|  1216   bool isMultiDest() const { return DestHi != nullptr; } |  | 
|  1217  |  | 
|  1218   bool isMultiSource() const { |  | 
|  1219     assert(getSrcSize() == 1 || getSrcSize() == 2); |  | 
|  1220     return getSrcSize() == 2; |  | 
|  1221   } |  | 
|  1222  |  | 
|  1223   Variable *getDestHi() const { return DestHi; } |  1218   Variable *getDestHi() const { return DestHi; } | 
|  1224  |  1219  | 
|  1225 private: |  1220 private: | 
|  1226   InstMIPS32Mov(Cfg *Func, Variable *Dest, Operand *Src); |  1221   InstMIPS32Mov(Cfg *Func, Variable *Dest, Operand *Src, Operand *Src2); | 
|  1227  |  1222  | 
|  1228   void emitMultiDestSingleSource(const Cfg *Func) const; |  1223   void emitMultiDestSingleSource(const Cfg *Func) const; | 
|  1229   void emitSingleDestMultiSource(const Cfg *Func) const; |  1224   void emitSingleDestMultiSource(const Cfg *Func) const; | 
|  1230   void emitSingleDestSingleSource(const Cfg *Func) const; |  1225   void emitSingleDestSingleSource(const Cfg *Func) const; | 
|  1231  |  1226  | 
|  1232   Variable *DestHi = nullptr; |  1227   Variable *DestHi = nullptr; | 
|  1233 }; |  1228 }; | 
|  1234  |  1229  | 
|  1235 // Declare partial template specializations of emit() methods that already have |  1230 // Declare partial template specializations of emit() methods that already have | 
|  1236 // default implementations. Without this, there is the possibility of ODR |  1231 // default implementations. Without this, there is the possibility of ODR | 
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1323 template <> void InstMIPS32Trunc_l_s::emitIAS(const Cfg *Func) const; |  1318 template <> void InstMIPS32Trunc_l_s::emitIAS(const Cfg *Func) const; | 
|  1324 template <> void InstMIPS32Trunc_w_d::emitIAS(const Cfg *Func) const; |  1319 template <> void InstMIPS32Trunc_w_d::emitIAS(const Cfg *Func) const; | 
|  1325 template <> void InstMIPS32Trunc_w_s::emitIAS(const Cfg *Func) const; |  1320 template <> void InstMIPS32Trunc_w_s::emitIAS(const Cfg *Func) const; | 
|  1326 template <> void InstMIPS32Xor::emitIAS(const Cfg *Func) const; |  1321 template <> void InstMIPS32Xor::emitIAS(const Cfg *Func) const; | 
|  1327 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const; |  1322 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const; | 
|  1328  |  1323  | 
|  1329 } // end of namespace MIPS32 |  1324 } // end of namespace MIPS32 | 
|  1330 } // end of namespace Ice |  1325 } // end of namespace Ice | 
|  1331  |  1326  | 
|  1332 #endif // SUBZERO_SRC_ICEINSTMIPS32_H |  1327 #endif // SUBZERO_SRC_ICEINSTMIPS32_H | 
| OLD | NEW |