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

Side by Side Diff: src/IceAssemblerMIPS32.cpp

Issue 2357143002: [SubZero] Fix floating-point comparison for MIPS (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: 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 | « no previous file | src/IceInstMIPS32.h » ('j') | src/IceTargetLoweringMIPS32.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceAssemblerMIPS32.cpp - MIPS32 Assembler --------------===// 1 //===- subzero/src/IceAssemblerMIPS32.cpp - MIPS32 Assembler --------------===//
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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 620
621 void AssemblerMIPS32::movn_s(const Operand *OpFd, const Operand *OpFs, 621 void AssemblerMIPS32::movn_s(const Operand *OpFd, const Operand *OpFs,
622 const Operand *OpFt) { 622 const Operand *OpFt) {
623 static constexpr IValueT Opcode = 0x44000013; 623 static constexpr IValueT Opcode = 0x44000013;
624 emitCOP1FmtFtFsFd(Opcode, SinglePrecision, OpFd, OpFs, OpFt, "movn.s"); 624 emitCOP1FmtFtFsFd(Opcode, SinglePrecision, OpFd, OpFs, OpFt, "movn.s");
625 } 625 }
626 626
627 void AssemblerMIPS32::movt(const Operand *OpRd, const Operand *OpRs, 627 void AssemblerMIPS32::movt(const Operand *OpRd, const Operand *OpRs,
628 const Operand *OpCc) { 628 const Operand *OpCc) {
629 IValueT Opcode = 0x00000001; 629 IValueT Opcode = 0x00000001;
630 const IValueT Rd = encodeGPRegister(OpRd, "Rd", "movf"); 630 const IValueT Rd = encodeGPRegister(OpRd, "Rd", "movt");
631 const IValueT Rs = encodeGPRegister(OpRs, "Rs", "movf"); 631 const IValueT Rs = encodeGPRegister(OpRs, "Rs", "movt");
632 OperandMIPS32FCC::FCC Cc = OperandMIPS32FCC::FCC0; 632 OperandMIPS32FCC::FCC Cc = OperandMIPS32FCC::FCC0;
633 if (const auto *OpFCC = llvm::dyn_cast<OperandMIPS32FCC>(OpCc)) { 633 if (const auto *OpFCC = llvm::dyn_cast<OperandMIPS32FCC>(OpCc)) {
634 Cc = OpFCC->getFCC(); 634 Cc = OpFCC->getFCC();
635 } 635 }
636 const IValueT InstEncodingTrue = 1; 636 const IValueT InstEncodingTrue = 1;
637 Opcode |= Rd << 11; 637 Opcode |= Rd << 11;
638 Opcode |= InstEncodingTrue << 16; 638 Opcode |= InstEncodingTrue << 16;
639 Opcode |= Cc << 18; 639 Opcode |= Cc << 18;
640 Opcode |= Rs << 21; 640 Opcode |= Rs << 21;
641 emitInst(Opcode); 641 emitInst(Opcode);
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 emitBr(Cond, OpRs, OpRtNone, Dest); 897 emitBr(Cond, OpRs, OpRtNone, Dest);
898 return; 898 return;
899 } 899 }
900 const IOffsetT Position = Buffer.size(); 900 const IOffsetT Position = Buffer.size();
901 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition()); 901 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition());
902 TargetLabel->linkTo(*this, Position); 902 TargetLabel->linkTo(*this, Position);
903 } 903 }
904 904
905 } // end of namespace MIPS32 905 } // end of namespace MIPS32
906 } // end of namespace Ice 906 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceInstMIPS32.h » ('j') | src/IceTargetLoweringMIPS32.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698