Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: src/IceInstMIPS32.h

Issue 2359713003: [Subzero][MIPS32] Implements 64-bit shl, lshr, ashr for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Added lowering of shifts operations with constant shift amount Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 static InstMIPS32MovConditional *create(Cfg *Func, Variable *Dest, 996 static InstMIPS32MovConditional *create(Cfg *Func, Variable *Dest,
997 Variable *Src, Operand *FCC) { 997 Variable *Src, Operand *FCC) {
998 return new (Func->allocate<InstMIPS32MovConditional>()) 998 return new (Func->allocate<InstMIPS32MovConditional>())
999 InstMIPS32MovConditional(Func, Dest, Src, FCC); 999 InstMIPS32MovConditional(Func, Dest, Src, FCC);
1000 } 1000 }
1001 1001
1002 void emit(const Cfg *Func) const override { 1002 void emit(const Cfg *Func) const override {
1003 if (!BuildDefs::dump()) 1003 if (!BuildDefs::dump())
1004 return; 1004 return;
1005 Ostream &Str = Func->getContext()->getStrEmit(); 1005 Ostream &Str = Func->getContext()->getStrEmit();
1006 assert(getSrcSize() == 2); 1006 assert(getSrcSize() == 3);
1007 Str << "\t" << Opcode << "\t"; 1007 Str << "\t" << Opcode << "\t";
1008 getDest()->emit(Func); 1008 getDest()->emit(Func);
1009 Str << ", "; 1009 Str << ", ";
1010 getSrc(0)->emit(Func); 1010 getSrc(0)->emit(Func);
1011 Str << ", "; 1011 Str << ", ";
1012 getSrc(1)->emit(Func); 1012 getSrc(1)->emit(Func);
1013 } 1013 }
1014 1014
1015 void emitIAS(const Cfg *Func) const override { 1015 void emitIAS(const Cfg *Func) const override {
1016 (void)Func; 1016 (void)Func;
(...skipping 11 matching lines...) Expand all
1028 dumpSources(Func); 1028 dumpSources(Func);
1029 } 1029 }
1030 static bool classof(const Inst *Inst) { return isClassof(Inst, K); } 1030 static bool classof(const Inst *Inst) { return isClassof(Inst, K); }
1031 1031
1032 private: 1032 private:
1033 InstMIPS32MovConditional(Cfg *Func, Variable *Dest, Variable *Src, 1033 InstMIPS32MovConditional(Cfg *Func, Variable *Dest, Variable *Src,
1034 Operand *FCC) 1034 Operand *FCC)
1035 : InstMIPS32(Func, K, 2, Dest) { 1035 : InstMIPS32(Func, K, 2, Dest) {
1036 addSource(Src); 1036 addSource(Src);
1037 addSource(FCC); 1037 addSource(FCC);
1038 addSource(Dest);
Jim Stichnoth 2016/09/23 18:49:11 I think this change should be reverted - it should
1038 } 1039 }
1039 1040
1040 static const char *Opcode; 1041 static const char *Opcode;
1041 }; 1042 };
1042 1043
1043 using InstMIPS32Abs_d = InstMIPS32TwoAddrFPR<InstMIPS32::Abs_d>; 1044 using InstMIPS32Abs_d = InstMIPS32TwoAddrFPR<InstMIPS32::Abs_d>;
1044 using InstMIPS32Abs_s = InstMIPS32TwoAddrFPR<InstMIPS32::Abs_s>; 1045 using InstMIPS32Abs_s = InstMIPS32TwoAddrFPR<InstMIPS32::Abs_s>;
1045 using InstMIPS32Add = InstMIPS32ThreeAddrGPR<InstMIPS32::Add>; 1046 using InstMIPS32Add = InstMIPS32ThreeAddrGPR<InstMIPS32::Add>;
1046 using InstMIPS32Add_d = InstMIPS32ThreeAddrFPR<InstMIPS32::Add_d>; 1047 using InstMIPS32Add_d = InstMIPS32ThreeAddrFPR<InstMIPS32::Add_d>;
1047 using InstMIPS32Add_s = InstMIPS32ThreeAddrFPR<InstMIPS32::Add_s>; 1048 using InstMIPS32Add_s = InstMIPS32ThreeAddrFPR<InstMIPS32::Add_s>;
(...skipping 29 matching lines...) Expand all
1077 using InstMIPS32Ldc1 = InstMIPS32Load<InstMIPS32::Ldc1>; 1078 using InstMIPS32Ldc1 = InstMIPS32Load<InstMIPS32::Ldc1>;
1078 using InstMIPS32Lui = InstMIPS32UnaryopGPR<InstMIPS32::Lui>; 1079 using InstMIPS32Lui = InstMIPS32UnaryopGPR<InstMIPS32::Lui>;
1079 using InstMIPS32Lw = InstMIPS32Load<InstMIPS32::Lw>; 1080 using InstMIPS32Lw = InstMIPS32Load<InstMIPS32::Lw>;
1080 using InstMIPS32Lwc1 = InstMIPS32Load<InstMIPS32::Lwc1>; 1081 using InstMIPS32Lwc1 = InstMIPS32Load<InstMIPS32::Lwc1>;
1081 using InstMIPS32Mfc1 = InstMIPS32TwoAddrGPR<InstMIPS32::Mfc1>; 1082 using InstMIPS32Mfc1 = InstMIPS32TwoAddrGPR<InstMIPS32::Mfc1>;
1082 using InstMIPS32Mfhi = InstMIPS32UnaryopGPR<InstMIPS32::Mfhi>; 1083 using InstMIPS32Mfhi = InstMIPS32UnaryopGPR<InstMIPS32::Mfhi>;
1083 using InstMIPS32Mflo = InstMIPS32UnaryopGPR<InstMIPS32::Mflo>; 1084 using InstMIPS32Mflo = InstMIPS32UnaryopGPR<InstMIPS32::Mflo>;
1084 using InstMIPS32Mov_d = InstMIPS32TwoAddrFPR<InstMIPS32::Mov_d>; 1085 using InstMIPS32Mov_d = InstMIPS32TwoAddrFPR<InstMIPS32::Mov_d>;
1085 using InstMIPS32Mov_s = InstMIPS32TwoAddrFPR<InstMIPS32::Mov_s>; 1086 using InstMIPS32Mov_s = InstMIPS32TwoAddrFPR<InstMIPS32::Mov_s>;
1086 using InstMIPS32Movf = InstMIPS32MovConditional<InstMIPS32::Movf>; 1087 using InstMIPS32Movf = InstMIPS32MovConditional<InstMIPS32::Movf>;
1087 using InstMIPS32Movn = InstMIPS32ThreeAddrGPR<InstMIPS32::Movn>; 1088 using InstMIPS32Movn = InstMIPS32MovConditional<InstMIPS32::Movn>;
1088 using InstMIPS32Movn_d = InstMIPS32ThreeAddrGPR<InstMIPS32::Movn_d>; 1089 using InstMIPS32Movn_d = InstMIPS32ThreeAddrGPR<InstMIPS32::Movn_d>;
1089 using InstMIPS32Movn_s = InstMIPS32ThreeAddrGPR<InstMIPS32::Movn_s>; 1090 using InstMIPS32Movn_s = InstMIPS32ThreeAddrGPR<InstMIPS32::Movn_s>;
1090 using InstMIPS32Movt = InstMIPS32MovConditional<InstMIPS32::Movt>; 1091 using InstMIPS32Movt = InstMIPS32MovConditional<InstMIPS32::Movt>;
1091 using InstMIPS32Movz = InstMIPS32ThreeAddrGPR<InstMIPS32::Movz>; 1092 using InstMIPS32Movz = InstMIPS32ThreeAddrGPR<InstMIPS32::Movz>;
1092 using InstMIPS32Movz_d = InstMIPS32ThreeAddrGPR<InstMIPS32::Movz_d>; 1093 using InstMIPS32Movz_d = InstMIPS32ThreeAddrGPR<InstMIPS32::Movz_d>;
1093 using InstMIPS32Movz_s = InstMIPS32ThreeAddrGPR<InstMIPS32::Movz_s>; 1094 using InstMIPS32Movz_s = InstMIPS32ThreeAddrGPR<InstMIPS32::Movz_s>;
1094 using InstMIPS32Mtc1 = InstMIPS32TwoAddrGPR<InstMIPS32::Mtc1>; 1095 using InstMIPS32Mtc1 = InstMIPS32TwoAddrGPR<InstMIPS32::Mtc1>;
1095 using InstMIPS32Mthi = InstMIPS32UnaryopGPR<InstMIPS32::Mthi>; 1096 using InstMIPS32Mthi = InstMIPS32UnaryopGPR<InstMIPS32::Mthi>;
1096 using InstMIPS32Mtlo = InstMIPS32UnaryopGPR<InstMIPS32::Mtlo>; 1097 using InstMIPS32Mtlo = InstMIPS32UnaryopGPR<InstMIPS32::Mtlo>;
1097 using InstMIPS32Mul = InstMIPS32ThreeAddrGPR<InstMIPS32::Mul>; 1098 using InstMIPS32Mul = InstMIPS32ThreeAddrGPR<InstMIPS32::Mul>;
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 template <> void InstMIPS32Addu::emitIAS(const Cfg *Func) const; 1195 template <> void InstMIPS32Addu::emitIAS(const Cfg *Func) const;
1195 template <> void InstMIPS32Slt::emitIAS(const Cfg *Func) const; 1196 template <> void InstMIPS32Slt::emitIAS(const Cfg *Func) const;
1196 template <> void InstMIPS32Sltu::emitIAS(const Cfg *Func) const; 1197 template <> void InstMIPS32Sltu::emitIAS(const Cfg *Func) const;
1197 template <> void InstMIPS32Sw::emitIAS(const Cfg *Func) const; 1198 template <> void InstMIPS32Sw::emitIAS(const Cfg *Func) const;
1198 template <> void InstMIPS32Lw::emitIAS(const Cfg *Func) const; 1199 template <> void InstMIPS32Lw::emitIAS(const Cfg *Func) const;
1199 1200
1200 } // end of namespace MIPS32 1201 } // end of namespace MIPS32
1201 } // end of namespace Ice 1202 } // end of namespace Ice
1202 1203
1203 #endif // SUBZERO_SRC_ICEINSTMIPS32_H 1204 #endif // SUBZERO_SRC_ICEINSTMIPS32_H
OLDNEW
« no previous file with comments | « no previous file | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698