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

Side by Side Diff: src/IceAssemblerMIPS32.cpp

Issue 2375923002: Subzero, MIPS32: SRAV instruction encoding (Closed)
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 | « src/IceAssemblerMIPS32.h ('k') | src/IceInstMIPS32.h » ('j') | 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 827 matching lines...) Expand 10 before | Expand all | Expand 10 after
838 static constexpr IValueT Opcode = 0x00000003; 838 static constexpr IValueT Opcode = 0x00000003;
839 emitRdRtSa(Opcode, OpRd, OpRt, Sa, "sra"); 839 emitRdRtSa(Opcode, OpRd, OpRt, Sa, "sra");
840 } 840 }
841 841
842 void AssemblerMIPS32::srl(const Operand *OpRd, const Operand *OpRt, 842 void AssemblerMIPS32::srl(const Operand *OpRd, const Operand *OpRt,
843 const uint32_t Sa) { 843 const uint32_t Sa) {
844 static constexpr IValueT Opcode = 0x00000002; 844 static constexpr IValueT Opcode = 0x00000002;
845 emitRdRtSa(Opcode, OpRd, OpRt, Sa, "srl"); 845 emitRdRtSa(Opcode, OpRd, OpRt, Sa, "srl");
846 } 846 }
847 847
848 void AssemblerMIPS32::srav(const Operand *OpRd, const Operand *OpRt,
849 const Operand *OpRs) {
850 static constexpr IValueT Opcode = 0x00000007;
851 emitRdRsRt(Opcode, OpRd, OpRs, OpRt, "srav");
852 }
853
848 void AssemblerMIPS32::srlv(const Operand *OpRd, const Operand *OpRt, 854 void AssemblerMIPS32::srlv(const Operand *OpRd, const Operand *OpRt,
849 const Operand *OpRs) { 855 const Operand *OpRs) {
850 static constexpr IValueT Opcode = 0x00000006; 856 static constexpr IValueT Opcode = 0x00000006;
851 emitRdRsRt(Opcode, OpRd, OpRs, OpRt, "srlv"); 857 emitRdRsRt(Opcode, OpRd, OpRs, OpRt, "srlv");
852 } 858 }
853 859
854 void AssemblerMIPS32::sub_d(const Operand *OpFd, const Operand *OpFs, 860 void AssemblerMIPS32::sub_d(const Operand *OpFd, const Operand *OpFs,
855 const Operand *OpFt) { 861 const Operand *OpFt) {
856 static constexpr IValueT Opcode = 0x44000001; 862 static constexpr IValueT Opcode = 0x44000001;
857 emitCOP1FmtFtFsFd(Opcode, DoublePrecision, OpFd, OpFs, OpFt, "sub.d"); 863 emitCOP1FmtFtFsFd(Opcode, DoublePrecision, OpFd, OpFs, OpFt, "sub.d");
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 emitBr(Cond, OpRs, OpRtNone, Dest); 1020 emitBr(Cond, OpRs, OpRtNone, Dest);
1015 return; 1021 return;
1016 } 1022 }
1017 const IOffsetT Position = Buffer.size(); 1023 const IOffsetT Position = Buffer.size();
1018 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition()); 1024 emitBr(Cond, OpRs, OpRtNone, TargetLabel->getEncodedPosition());
1019 TargetLabel->linkTo(*this, Position); 1025 TargetLabel->linkTo(*this, Position);
1020 } 1026 }
1021 1027
1022 } // end of namespace MIPS32 1028 } // end of namespace MIPS32
1023 } // end of namespace Ice 1029 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceAssemblerMIPS32.h ('k') | src/IceInstMIPS32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698