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

Side by Side Diff: src/IceInstMIPS32.cpp

Issue 2356293002: Subzero, MIPS32: Instruction NOR, pseudoinstruction NOT (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressing review comments Created 4 years, 2 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 | « src/IceInstMIPS32.h ('k') | src/IceTargetLoweringMIPS32.h » ('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.cpp - Mips32 instruction implementation --===// 1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===//
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 template <> const char *InstMIPS32Movz_d::Opcode = "movz.d"; 112 template <> const char *InstMIPS32Movz_d::Opcode = "movz.d";
113 template <> const char *InstMIPS32Movz_s::Opcode = "movz.s"; 113 template <> const char *InstMIPS32Movz_s::Opcode = "movz.s";
114 template <> const char *InstMIPS32Mtc1::Opcode = "mtc1"; 114 template <> const char *InstMIPS32Mtc1::Opcode = "mtc1";
115 template <> const char *InstMIPS32Mthi::Opcode = "mthi"; 115 template <> const char *InstMIPS32Mthi::Opcode = "mthi";
116 template <> const char *InstMIPS32Mtlo::Opcode = "mtlo"; 116 template <> const char *InstMIPS32Mtlo::Opcode = "mtlo";
117 template <> const char *InstMIPS32Mul::Opcode = "mul"; 117 template <> const char *InstMIPS32Mul::Opcode = "mul";
118 template <> const char *InstMIPS32Mul_d::Opcode = "mul.d"; 118 template <> const char *InstMIPS32Mul_d::Opcode = "mul.d";
119 template <> const char *InstMIPS32Mul_s::Opcode = "mul.s"; 119 template <> const char *InstMIPS32Mul_s::Opcode = "mul.s";
120 template <> const char *InstMIPS32Mult::Opcode = "mult"; 120 template <> const char *InstMIPS32Mult::Opcode = "mult";
121 template <> const char *InstMIPS32Multu::Opcode = "multu"; 121 template <> const char *InstMIPS32Multu::Opcode = "multu";
122 template <> const char *InstMIPS32Nor::Opcode = "nor";
122 template <> const char *InstMIPS32Or::Opcode = "or"; 123 template <> const char *InstMIPS32Or::Opcode = "or";
123 template <> const char *InstMIPS32Ori::Opcode = "ori"; 124 template <> const char *InstMIPS32Ori::Opcode = "ori";
124 template <> const char *InstMIPS32Sdc1::Opcode = "sdc1"; 125 template <> const char *InstMIPS32Sdc1::Opcode = "sdc1";
125 template <> const char *InstMIPS32Sll::Opcode = "sll"; 126 template <> const char *InstMIPS32Sll::Opcode = "sll";
126 template <> const char *InstMIPS32Sllv::Opcode = "sllv"; 127 template <> const char *InstMIPS32Sllv::Opcode = "sllv";
127 template <> const char *InstMIPS32Slt::Opcode = "slt"; 128 template <> const char *InstMIPS32Slt::Opcode = "slt";
128 template <> const char *InstMIPS32Slti::Opcode = "slti"; 129 template <> const char *InstMIPS32Slti::Opcode = "slti";
129 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu"; 130 template <> const char *InstMIPS32Sltiu::Opcode = "sltiu";
130 template <> const char *InstMIPS32Sltu::Opcode = "sltu"; 131 template <> const char *InstMIPS32Sltu::Opcode = "sltu";
131 template <> const char *InstMIPS32Sqrt_d::Opcode = "sqrt.d"; 132 template <> const char *InstMIPS32Sqrt_d::Opcode = "sqrt.d";
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 return; 991 return;
991 emitThreeAddrLoHi(Opcode, this, Func); 992 emitThreeAddrLoHi(Opcode, this, Func);
992 } 993 }
993 994
994 template <> void InstMIPS32Multu::emit(const Cfg *Func) const { 995 template <> void InstMIPS32Multu::emit(const Cfg *Func) const {
995 if (!BuildDefs::dump()) 996 if (!BuildDefs::dump())
996 return; 997 return;
997 emitThreeAddrLoHi(Opcode, this, Func); 998 emitThreeAddrLoHi(Opcode, this, Func);
998 } 999 }
999 1000
1001 template <> void InstMIPS32Nor::emitIAS(const Cfg *Func) const {
1002 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1003 Asm->nor(getDest(), getSrc(0), getSrc(1));
1004 }
1005
1000 template <> void InstMIPS32Or::emitIAS(const Cfg *Func) const { 1006 template <> void InstMIPS32Or::emitIAS(const Cfg *Func) const {
1001 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1007 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1002 Asm->or_(getDest(), getSrc(0), getSrc(1)); 1008 Asm->or_(getDest(), getSrc(0), getSrc(1));
1003 } 1009 }
1004 1010
1005 template <> void InstMIPS32Ori::emitIAS(const Cfg *Func) const { 1011 template <> void InstMIPS32Ori::emitIAS(const Cfg *Func) const {
1006 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1012 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1007 Asm->ori(getDest(), getSrc(0), Imm); 1013 Asm->ori(getDest(), getSrc(0), Imm);
1008 } 1014 }
1009 1015
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 Asm->xor_(getDest(), getSrc(0), getSrc(1)); 1106 Asm->xor_(getDest(), getSrc(0), getSrc(1));
1101 } 1107 }
1102 1108
1103 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { 1109 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const {
1104 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); 1110 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>();
1105 Asm->xori(getDest(), getSrc(0), Imm); 1111 Asm->xori(getDest(), getSrc(0), Imm);
1106 } 1112 }
1107 1113
1108 } // end of namespace MIPS32 1114 } // end of namespace MIPS32
1109 } // end of namespace Ice 1115 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInstMIPS32.h ('k') | src/IceTargetLoweringMIPS32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698