OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |