OLD | NEW |
1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===// | 1 //===- subzero/src/IceInstMips32.cpp - Mips32 instruction implementation --===// |
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 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
963 template <> void InstMIPS32Movz_d::emitIAS(const Cfg *Func) const { | 963 template <> void InstMIPS32Movz_d::emitIAS(const Cfg *Func) const { |
964 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 964 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
965 Asm->movz_d(getDest(), getSrc(0), getSrc(1)); | 965 Asm->movz_d(getDest(), getSrc(0), getSrc(1)); |
966 } | 966 } |
967 | 967 |
968 template <> void InstMIPS32Movz_s::emitIAS(const Cfg *Func) const { | 968 template <> void InstMIPS32Movz_s::emitIAS(const Cfg *Func) const { |
969 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 969 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
970 Asm->movz_s(getDest(), getSrc(0), getSrc(1)); | 970 Asm->movz_s(getDest(), getSrc(0), getSrc(1)); |
971 } | 971 } |
972 | 972 |
| 973 template <> void InstMIPS32Mtc1::emit(const Cfg *Func) const { |
| 974 if (!BuildDefs::dump()) |
| 975 return; |
| 976 Ostream &Str = Func->getContext()->getStrEmit(); |
| 977 assert(getSrcSize() == 1); |
| 978 Str << "\t" << Opcode << "\t"; |
| 979 getSrc(0)->emit(Func); |
| 980 Str << ", "; |
| 981 getDest()->emit(Func); |
| 982 } |
| 983 |
973 template <> void InstMIPS32Mtc1::emitIAS(const Cfg *Func) const { | 984 template <> void InstMIPS32Mtc1::emitIAS(const Cfg *Func) const { |
974 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 985 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
975 Asm->mtc1(getDest(), getSrc(0)); | 986 Asm->mtc1(getDest(), getSrc(0)); |
976 } | 987 } |
977 | 988 |
978 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const { | 989 template <> void InstMIPS32Mtlo::emit(const Cfg *Func) const { |
979 if (!BuildDefs::dump()) | 990 if (!BuildDefs::dump()) |
980 return; | 991 return; |
981 emitUnaryopGPRTLoHi(Opcode, this, Func); | 992 emitUnaryopGPRTLoHi(Opcode, this, Func); |
982 } | 993 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 Asm->xor_(getDest(), getSrc(0), getSrc(1)); | 1133 Asm->xor_(getDest(), getSrc(0), getSrc(1)); |
1123 } | 1134 } |
1124 | 1135 |
1125 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { | 1136 template <> void InstMIPS32Xori::emitIAS(const Cfg *Func) const { |
1126 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); | 1137 auto *Asm = Func->getAssembler<MIPS32::AssemblerMIPS32>(); |
1127 Asm->xori(getDest(), getSrc(0), Imm); | 1138 Asm->xori(getDest(), getSrc(0), Imm); |
1128 } | 1139 } |
1129 | 1140 |
1130 } // end of namespace MIPS32 | 1141 } // end of namespace MIPS32 |
1131 } // end of namespace Ice | 1142 } // end of namespace Ice |
OLD | NEW |