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

Side by Side Diff: src/IceTargetLoweringMIPS32.cpp

Issue 2050473005: Adding float/double support in CopyToReg (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero@master
Patch Set: Changing the wrong condition 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 | « no previous file | 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 // 1 //
2 // The Subzero Code Generator 2 // The Subzero Code Generator
3 // 3 //
4 // This file is distributed under the University of Illinois Open Source 4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details. 5 // License. See LICENSE.TXT for details.
6 // 6 //
7 //===----------------------------------------------------------------------===// 7 //===----------------------------------------------------------------------===//
8 /// 8 ///
9 /// \file 9 /// \file
10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost 10 /// \brief Implements the TargetLoweringMIPS32 class, which consists almost
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 if (getFlags().getDisableTranslation()) 1558 if (getFlags().getDisableTranslation())
1559 return; 1559 return;
1560 UnimplementedError(getFlags()); 1560 UnimplementedError(getFlags());
1561 } 1561 }
1562 1562
1563 // Helper for legalize() to emit the right code to lower an operand to a 1563 // Helper for legalize() to emit the right code to lower an operand to a
1564 // register of the appropriate type. 1564 // register of the appropriate type.
1565 Variable *TargetMIPS32::copyToReg(Operand *Src, RegNumT RegNum) { 1565 Variable *TargetMIPS32::copyToReg(Operand *Src, RegNumT RegNum) {
1566 Type Ty = Src->getType(); 1566 Type Ty = Src->getType();
1567 Variable *Reg = makeReg(Ty, RegNum); 1567 Variable *Reg = makeReg(Ty, RegNum);
1568 if (isVectorType(Ty) || isFloatingType(Ty)) { 1568 if (isVectorType(Ty)) {
1569 UnimplementedError(getFlags()); 1569 UnimplementedError(getFlags());
1570 } else if (isFloatingType(Ty)) {
1571 (Ty == IceType_f32) ? _mov_s(Reg, llvm::dyn_cast<Variable>(Src))
1572 : _mov_d(Reg, llvm::dyn_cast<Variable>(Src));
1570 } else { 1573 } else {
1571 // Mov's Src operand can really only be the flexible second operand type 1574 // Mov's Src operand can really only be the flexible second operand type
1572 // or a register. Users should guarantee that. 1575 // or a register. Users should guarantee that.
1573 _mov(Reg, Src); 1576 _mov(Reg, Src);
1574 } 1577 }
1575 return Reg; 1578 return Reg;
1576 } 1579 }
1577 1580
1578 Operand *TargetMIPS32::legalize(Operand *From, LegalMask Allowed, 1581 Operand *TargetMIPS32::legalize(Operand *From, LegalMask Allowed,
1579 RegNumT RegNum) { 1582 RegNumT RegNum) {
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
1714 Str << "\t.set\t" 1717 Str << "\t.set\t"
1715 << "nomips16\n"; 1718 << "nomips16\n";
1716 } 1719 }
1717 1720
1718 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM]; 1721 SmallBitVector TargetMIPS32::TypeToRegisterSet[RCMIPS32_NUM];
1719 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM]; 1722 SmallBitVector TargetMIPS32::TypeToRegisterSetUnfiltered[RCMIPS32_NUM];
1720 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM]; 1723 SmallBitVector TargetMIPS32::RegisterAliases[RegMIPS32::Reg_NUM];
1721 1724
1722 } // end of namespace MIPS32 1725 } // end of namespace MIPS32
1723 } // end of namespace Ice 1726 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698