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

Side by Side Diff: src/IceTargetLoweringMIPS32.h

Issue 1993993004: Subzero, MIPS32: Introduction of floating point registers (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Added floating point register pairs Created 4 years, 6 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/IceRegistersMIPS32.h ('k') | no next file » | 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/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- C++-*-===// 1 //===- subzero/src/IceTargetLoweringMIPS32.h - MIPS32 lowering ---*- 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 170
171 void _br(CfgNode *TargetTrue, CfgNode *TargetFalse, Operand *Src0, 171 void _br(CfgNode *TargetTrue, CfgNode *TargetFalse, Operand *Src0,
172 CondMIPS32::Cond Condition) { 172 CondMIPS32::Cond Condition) {
173 Context.insert<InstMIPS32Br>(TargetTrue, TargetFalse, Src0, Condition); 173 Context.insert<InstMIPS32Br>(TargetTrue, TargetFalse, Src0, Condition);
174 } 174 }
175 175
176 void _ret(Variable *RA, Variable *Src0 = nullptr) { 176 void _ret(Variable *RA, Variable *Src0 = nullptr) {
177 Context.insert<InstMIPS32Ret>(RA, Src0); 177 Context.insert<InstMIPS32Ret>(RA, Src0);
178 } 178 }
179 179
180 void _add_d(Variable *Dest, Variable *Src0, Variable *Src1) {
181 Context.insert<InstMIPS32Add_d>(Dest, Src0, Src1);
182 }
183
184 void _add_s(Variable *Dest, Variable *Src0, Variable *Src1) {
185 Context.insert<InstMIPS32Add_s>(Dest, Src0, Src1);
186 }
187
180 void _addiu(Variable *Dest, Variable *Src, uint32_t Imm) { 188 void _addiu(Variable *Dest, Variable *Src, uint32_t Imm) {
181 Context.insert<InstMIPS32Addiu>(Dest, Src, Imm); 189 Context.insert<InstMIPS32Addiu>(Dest, Src, Imm);
182 } 190 }
183 191
184 void _div(Variable *Dest, Variable *Src0, Variable *Src1) { 192 void _div(Variable *Dest, Variable *Src0, Variable *Src1) {
185 Context.insert<InstMIPS32Div>(Dest, Src0, Src1); 193 Context.insert<InstMIPS32Div>(Dest, Src0, Src1);
186 } 194 }
187 195
196 void _div_d(Variable *Dest, Variable *Src0, Variable *Src1) {
197 Context.insert<InstMIPS32Div_d>(Dest, Src0, Src1);
198 }
199
200 void _div_s(Variable *Dest, Variable *Src0, Variable *Src1) {
201 Context.insert<InstMIPS32Div_s>(Dest, Src0, Src1);
202 }
203
188 void _divu(Variable *Dest, Variable *Src0, Variable *Src1) { 204 void _divu(Variable *Dest, Variable *Src0, Variable *Src1) {
189 Context.insert<InstMIPS32Divu>(Dest, Src0, Src1); 205 Context.insert<InstMIPS32Divu>(Dest, Src0, Src1);
190 } 206 }
191 207
192 void _lui(Variable *Dest, uint32_t Imm) { 208 void _lui(Variable *Dest, uint32_t Imm) {
193 Context.insert<InstMIPS32Lui>(Dest, Imm); 209 Context.insert<InstMIPS32Lui>(Dest, Imm);
194 } 210 }
195 211
196 void _mov(Variable *Dest, Operand *Src0) { 212 void _mov(Variable *Dest, Operand *Src0) {
197 assert(Dest != nullptr); 213 assert(Dest != nullptr);
198 // Variable* Src0_ = llvm::dyn_cast<Variable>(Src0); 214 // Variable* Src0_ = llvm::dyn_cast<Variable>(Src0);
199 if (llvm::isa<ConstantRelocatable>(Src0)) { 215 if (llvm::isa<ConstantRelocatable>(Src0)) {
200 Context.insert<InstMIPS32La>(Dest, Src0); 216 Context.insert<InstMIPS32La>(Dest, Src0);
201 } else { 217 } else {
202 auto *Instr = Context.insert<InstMIPS32Mov>(Dest, Src0); 218 auto *Instr = Context.insert<InstMIPS32Mov>(Dest, Src0);
203 if (Instr->isMultiDest()) { 219 if (Instr->isMultiDest()) {
204 // If Instr is multi-dest, then Dest must be a Variable64On32. We add a 220 // If Instr is multi-dest, then Dest must be a Variable64On32. We add a
205 // fake-def for Instr.DestHi here. 221 // fake-def for Instr.DestHi here.
206 assert(llvm::isa<Variable64On32>(Dest)); 222 assert(llvm::isa<Variable64On32>(Dest));
207 Context.insert<InstFakeDef>(Instr->getDestHi()); 223 Context.insert<InstFakeDef>(Instr->getDestHi());
208 } 224 }
209 } 225 }
210 } 226 }
211 227
228 void _mov_d(Variable *Dest, Variable *Src) {
229 Context.insert<InstMIPS32Mov_d>(Dest, Src);
230 }
231
232 void _mov_s(Variable *Dest, Variable *Src) {
233 Context.insert<InstMIPS32Mov_s>(Dest, Src);
234 }
235
236 void _mfc1(Variable *Dest, Variable *Src) {
237 Context.insert<InstMIPS32Mfc1>(Dest, Src);
238 }
239
212 void _mfhi(Variable *Dest, Operand *Src) { 240 void _mfhi(Variable *Dest, Operand *Src) {
213 Context.insert<InstMIPS32Mfhi>(Dest, Src); 241 Context.insert<InstMIPS32Mfhi>(Dest, Src);
214 } 242 }
215 243
216 void _mflo(Variable *Dest, Operand *Src) { 244 void _mflo(Variable *Dest, Operand *Src) {
217 Context.insert<InstMIPS32Mflo>(Dest, Src); 245 Context.insert<InstMIPS32Mflo>(Dest, Src);
218 } 246 }
219 247
248 void _mtc1(Variable *Dest, Variable *Src) {
249 Context.insert<InstMIPS32Mtc1>(Dest, Src);
250 }
251
220 void _mthi(Variable *Dest, Operand *Src) { 252 void _mthi(Variable *Dest, Operand *Src) {
221 Context.insert<InstMIPS32Mthi>(Dest, Src); 253 Context.insert<InstMIPS32Mthi>(Dest, Src);
222 } 254 }
223 255
224 void _mtlo(Variable *Dest, Operand *Src) { 256 void _mtlo(Variable *Dest, Operand *Src) {
225 Context.insert<InstMIPS32Mtlo>(Dest, Src); 257 Context.insert<InstMIPS32Mtlo>(Dest, Src);
226 } 258 }
227 259
228 void _mul(Variable *Dest, Variable *Src0, Variable *Src1) { 260 void _mul(Variable *Dest, Variable *Src0, Variable *Src1) {
229 Context.insert<InstMIPS32Mul>(Dest, Src0, Src1); 261 Context.insert<InstMIPS32Mul>(Dest, Src0, Src1);
230 } 262 }
231 263
264 void _mul_d(Variable *Dest, Variable *Src0, Variable *Src1) {
265 Context.insert<InstMIPS32Mul_d>(Dest, Src0, Src1);
266 }
267
268 void _mul_s(Variable *Dest, Variable *Src0, Variable *Src1) {
269 Context.insert<InstMIPS32Mul_s>(Dest, Src0, Src1);
270 }
271
232 void _mult(Variable *Dest, Variable *Src0, Variable *Src1) { 272 void _mult(Variable *Dest, Variable *Src0, Variable *Src1) {
233 Context.insert<InstMIPS32Mult>(Dest, Src0, Src1); 273 Context.insert<InstMIPS32Mult>(Dest, Src0, Src1);
234 } 274 }
235 275
236 void _multu(Variable *Dest, Variable *Src0, Variable *Src1) { 276 void _multu(Variable *Dest, Variable *Src0, Variable *Src1) {
237 Context.insert<InstMIPS32Multu>(Dest, Src0, Src1); 277 Context.insert<InstMIPS32Multu>(Dest, Src0, Src1);
238 } 278 }
239 279
240 void _or(Variable *Dest, Variable *Src0, Variable *Src1) { 280 void _or(Variable *Dest, Variable *Src0, Variable *Src1) {
241 Context.insert<InstMIPS32Or>(Dest, Src0, Src1); 281 Context.insert<InstMIPS32Or>(Dest, Src0, Src1);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 322 }
283 323
284 void _srlv(Variable *Dest, Variable *Src0, Variable *Src1) { 324 void _srlv(Variable *Dest, Variable *Src0, Variable *Src1) {
285 Context.insert<InstMIPS32Srlv>(Dest, Src0, Src1); 325 Context.insert<InstMIPS32Srlv>(Dest, Src0, Src1);
286 } 326 }
287 327
288 void _sub(Variable *Dest, Variable *Src0, Variable *Src1) { 328 void _sub(Variable *Dest, Variable *Src0, Variable *Src1) {
289 Context.insert<InstMIPS32Sub>(Dest, Src0, Src1); 329 Context.insert<InstMIPS32Sub>(Dest, Src0, Src1);
290 } 330 }
291 331
332 void _sub_d(Variable *Dest, Variable *Src0, Variable *Src1) {
333 Context.insert<InstMIPS32Sub_d>(Dest, Src0, Src1);
334 }
335
336 void _sub_s(Variable *Dest, Variable *Src0, Variable *Src1) {
337 Context.insert<InstMIPS32Sub_s>(Dest, Src0, Src1);
338 }
339
292 void _subu(Variable *Dest, Variable *Src0, Variable *Src1) { 340 void _subu(Variable *Dest, Variable *Src0, Variable *Src1) {
293 Context.insert<InstMIPS32Subu>(Dest, Src0, Src1); 341 Context.insert<InstMIPS32Subu>(Dest, Src0, Src1);
294 } 342 }
295 343
296 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) { 344 void _xor(Variable *Dest, Variable *Src0, Variable *Src1) {
297 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1); 345 Context.insert<InstMIPS32Xor>(Dest, Src0, Src1);
298 } 346 }
299 347
300 void _xori(Variable *Dest, Variable *Src, uint32_t Imm) { 348 void _xori(Variable *Dest, Variable *Src, uint32_t Imm) {
301 Context.insert<InstMIPS32Xori>(Dest, Src, Imm); 349 Context.insert<InstMIPS32Xori>(Dest, Src, Imm);
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 explicit TargetHeaderMIPS32(GlobalContext *Ctx); 553 explicit TargetHeaderMIPS32(GlobalContext *Ctx);
506 554
507 private: 555 private:
508 ~TargetHeaderMIPS32() = default; 556 ~TargetHeaderMIPS32() = default;
509 }; 557 };
510 558
511 } // end of namespace MIPS32 559 } // end of namespace MIPS32
512 } // end of namespace Ice 560 } // end of namespace Ice
513 561
514 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H 562 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H
OLDNEW
« no previous file with comments | « src/IceRegistersMIPS32.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698