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

Side by Side Diff: src/IceAssemblerMIPS32.cpp

Issue 2355413008: Subzero, MIPS32: Fix floating point comparison crosstest (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 3 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 //===- 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 emitCOP1FmtFtFsFd(Opcode, SinglePrecision, OpFd, OpFs, OpFt, "div.s"); 521 emitCOP1FmtFtFsFd(Opcode, SinglePrecision, OpFd, OpFs, OpFt, "div.s");
522 } 522 }
523 523
524 void AssemblerMIPS32::lw(const Operand *OpRt, const Operand *OpBase, 524 void AssemblerMIPS32::lw(const Operand *OpRt, const Operand *OpBase,
525 const uint32_t Offset) { 525 const uint32_t Offset) {
526 switch (OpRt->getType()) { 526 switch (OpRt->getType()) {
527 case IceType_i1: 527 case IceType_i1:
528 case IceType_i8: { 528 case IceType_i8: {
529 static constexpr IValueT Opcode = 0x80000000; 529 static constexpr IValueT Opcode = 0x80000000;
530 emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "lb"); 530 emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "lb");
531 break;
531 } 532 }
532 case IceType_i16: { 533 case IceType_i16: {
533 static constexpr IValueT Opcode = 0x84000000; 534 static constexpr IValueT Opcode = 0x84000000;
534 emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "lh"); 535 emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "lh");
536 break;
535 } 537 }
536 case IceType_i32: { 538 case IceType_i32: {
537 static constexpr IValueT Opcode = 0x8C000000; 539 static constexpr IValueT Opcode = 0x8C000000;
538 emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "lw"); 540 emitRtRsImm16(Opcode, OpRt, OpBase, Offset, "lw");
539 break; 541 break;
540 } 542 }
541 case IceType_f32: { 543 case IceType_f32: {
542 static constexpr IValueT Opcode = 0xC4000000; 544 static constexpr IValueT Opcode = 0xC4000000;
543 emitFtRsImm16(Opcode, OpRt, OpBase, Offset, "lwc1"); 545 emitFtRsImm16(Opcode, OpRt, OpBase, Offset, "lwc1");
546 break;
544 } 547 }
545 case IceType_f64: { 548 case IceType_f64: {
546 static constexpr IValueT Opcode = 0xD4000000; 549 static constexpr IValueT Opcode = 0xD4000000;
547 emitFtRsImm16(Opcode, OpRt, OpBase, Offset, "ldc1"); 550 emitFtRsImm16(Opcode, OpRt, OpBase, Offset, "ldc1");
548 break; 551 break;
549 } 552 }
550 default: { UnimplementedError(getFlags()); } 553 default: { UnimplementedError(getFlags()); }
551 } 554 }
552 } 555 }
553 556
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
919 emitBr(Cond, OpRs, OpRtNone, Dest); 922 emitBr(Cond, OpRs, OpRtNone, Dest);
920 return; 923 return;
921 } 924 }
922 const IOffsetT Position = Buffer.size(); 925 const IOffsetT Position = Buffer.size();
923 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition()); 926 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition());
924 TargetLabel->linkTo(*this, Position); 927 TargetLabel->linkTo(*this, Position);
925 } 928 }
926 929
927 } // end of namespace MIPS32 930 } // end of namespace MIPS32
928 } // end of namespace Ice 931 } // 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