| 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 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 } | 646 } |
| 647 case IceType_f64: { | 647 case IceType_f64: { |
| 648 static constexpr IValueT Opcode = 0xF4000000; | 648 static constexpr IValueT Opcode = 0xF4000000; |
| 649 emitFtRsImm16(Opcode, OpRt, OpBase, Offset, "sdc1"); | 649 emitFtRsImm16(Opcode, OpRt, OpBase, Offset, "sdc1"); |
| 650 break; | 650 break; |
| 651 } | 651 } |
| 652 default: { UnimplementedError(getFlags()); } | 652 default: { UnimplementedError(getFlags()); } |
| 653 } | 653 } |
| 654 } | 654 } |
| 655 | 655 |
| 656 void AssemblerMIPS32::teq(const Operand *OpRs, const Operand *OpRt, |
| 657 const uint32_t TrapCode) { |
| 658 IValueT Opcode = 0x00000034; |
| 659 const IValueT Rs = encodeGPRegister(OpRs, "Rs", "teq"); |
| 660 const IValueT Rt = encodeGPRegister(OpRt, "Rt", "teq"); |
| 661 Opcode |= TrapCode << 6; |
| 662 Opcode |= Rt << 16; |
| 663 Opcode |= Rs << 21; |
| 664 emitInst(Opcode); |
| 665 } |
| 666 |
| 656 void AssemblerMIPS32::trunc_l_d(const Operand *OpFd, const Operand *OpFs) { | 667 void AssemblerMIPS32::trunc_l_d(const Operand *OpFd, const Operand *OpFs) { |
| 657 static constexpr IValueT Opcode = 0x4400000D; | 668 static constexpr IValueT Opcode = 0x4400000D; |
| 658 emitCOP1FmtFsFd(Opcode, Long, OpFd, OpFs, "trunc.l.d"); | 669 emitCOP1FmtFsFd(Opcode, Long, OpFd, OpFs, "trunc.l.d"); |
| 659 } | 670 } |
| 660 | 671 |
| 661 void AssemblerMIPS32::trunc_l_s(const Operand *OpFd, const Operand *OpFs) { | 672 void AssemblerMIPS32::trunc_l_s(const Operand *OpFd, const Operand *OpFs) { |
| 662 static constexpr IValueT Opcode = 0x4400000D; | 673 static constexpr IValueT Opcode = 0x4400000D; |
| 663 emitCOP1FmtFsFd(Opcode, Long, OpFd, OpFs, "trunc.l.s"); | 674 emitCOP1FmtFsFd(Opcode, Long, OpFd, OpFs, "trunc.l.s"); |
| 664 } | 675 } |
| 665 | 676 |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 emitBr(Cond, OpRs, OpRtNone, Dest); | 765 emitBr(Cond, OpRs, OpRtNone, Dest); |
| 755 return; | 766 return; |
| 756 } | 767 } |
| 757 const IOffsetT Position = Buffer.size(); | 768 const IOffsetT Position = Buffer.size(); |
| 758 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition()); | 769 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition()); |
| 759 TargetLabel->linkTo(*this, Position); | 770 TargetLabel->linkTo(*this, Position); |
| 760 } | 771 } |
| 761 | 772 |
| 762 } // end of namespace MIPS32 | 773 } // end of namespace MIPS32 |
| 763 } // end of namespace Ice | 774 } // end of namespace Ice |
| OLD | NEW |