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

Side by Side Diff: src/IceTargetLoweringMIPS32.h

Issue 2404803002: [Subzero][MIPS32] Implement bitcast operation for both 32-bit and 64-bit operands (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addressed 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
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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 } 334 }
335 335
336 void _mfhi(Variable *Dest, Operand *Src) { 336 void _mfhi(Variable *Dest, Operand *Src) {
337 Context.insert<InstMIPS32Mfhi>(Dest, Src); 337 Context.insert<InstMIPS32Mfhi>(Dest, Src);
338 } 338 }
339 339
340 void _mflo(Variable *Dest, Operand *Src) { 340 void _mflo(Variable *Dest, Operand *Src) {
341 Context.insert<InstMIPS32Mflo>(Dest, Src); 341 Context.insert<InstMIPS32Mflo>(Dest, Src);
342 } 342 }
343 343
344 void _mov(Variable *Dest, Operand *Src0) { 344 void _mov(Variable *Dest, Operand *Src0, Operand *Src1 = nullptr) {
345 assert(Dest != nullptr); 345 assert(Dest != nullptr);
346 // Variable* Src0_ = llvm::dyn_cast<Variable>(Src0); 346 // Variable* Src0_ = llvm::dyn_cast<Variable>(Src0);
347 if (llvm::isa<ConstantRelocatable>(Src0)) { 347 if (llvm::isa<ConstantRelocatable>(Src0)) {
348 Context.insert<InstMIPS32La>(Dest, Src0); 348 Context.insert<InstMIPS32La>(Dest, Src0);
349 } else { 349 } else {
350 auto *Instr = Context.insert<InstMIPS32Mov>(Dest, Src0); 350 auto *Instr = Context.insert<InstMIPS32Mov>(Dest, Src0, Src1);
351 if (Instr->isMultiDest()) { 351 if (Instr->getDestHi() != nullptr) {
352 // If Instr is multi-dest, then Dest must be a Variable64On32. We add a 352 // If DestHi is available, then Dest must be a Variable64On32. We add a
353 // fake-def for Instr.DestHi here. 353 // fake-def for Instr.DestHi here.
354 assert(llvm::isa<Variable64On32>(Dest)); 354 assert(llvm::isa<Variable64On32>(Dest));
355 Context.insert<InstFakeDef>(Instr->getDestHi()); 355 Context.insert<InstFakeDef>(Instr->getDestHi());
356 } 356 }
357 } 357 }
358 } 358 }
359 359
360 void _mov_d(Variable *Dest, Variable *Src) { 360 void _mov_d(Variable *Dest, Variable *Src) {
361 Context.insert<InstMIPS32Mov_d>(Dest, Src); 361 Context.insert<InstMIPS32Mov_d>(Dest, Src);
362 } 362 }
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 explicit TargetHeaderMIPS32(GlobalContext *Ctx); 868 explicit TargetHeaderMIPS32(GlobalContext *Ctx);
869 869
870 private: 870 private:
871 ~TargetHeaderMIPS32() = default; 871 ~TargetHeaderMIPS32() = default;
872 }; 872 };
873 873
874 } // end of namespace MIPS32 874 } // end of namespace MIPS32
875 } // end of namespace Ice 875 } // end of namespace Ice
876 876
877 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H 877 #endif // SUBZERO_SRC_ICETARGETLOWERINGMIPS32_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698