Lines Matching refs:instr
75 void PrintRs(Instruction* instr);
76 void PrintRt(Instruction* instr);
77 void PrintRd(Instruction* instr);
78 void PrintFs(Instruction* instr);
79 void PrintFt(Instruction* instr);
80 void PrintFd(Instruction* instr);
81 void PrintSa(Instruction* instr);
82 void PrintLsaSa(Instruction* instr);
83 void PrintSd(Instruction* instr);
84 void PrintSs1(Instruction* instr);
85 void PrintSs2(Instruction* instr);
86 void PrintBc(Instruction* instr);
87 void PrintCc(Instruction* instr);
88 void PrintBp2(Instruction* instr);
89 void PrintFunction(Instruction* instr);
90 void PrintSecondaryField(Instruction* instr);
91 void PrintUImm9(Instruction* instr);
92 void PrintSImm9(Instruction* instr);
93 void PrintUImm16(Instruction* instr);
94 void PrintSImm16(Instruction* instr);
95 void PrintXImm16(Instruction* instr);
96 void PrintPCImm16(Instruction* instr, int delta_pc, int n_bits);
97 void PrintXImm18(Instruction* instr);
98 void PrintSImm18(Instruction* instr);
99 void PrintXImm19(Instruction* instr);
100 void PrintSImm19(Instruction* instr);
101 void PrintXImm21(Instruction* instr);
102 void PrintSImm21(Instruction* instr);
103 void PrintPCImm21(Instruction* instr, int delta_pc, int n_bits);
104 void PrintXImm26(Instruction* instr);
105 void PrintSImm26(Instruction* instr);
106 void PrintPCImm26(Instruction* instr, int delta_pc, int n_bits);
107 void PrintPCImm26(Instruction* instr);
108 void PrintCode(Instruction* instr); // For break and trap instructions.
109 void PrintFormat(Instruction* instr); // For floating format postfix.
110 void PrintMsaDataFormat(Instruction* instr);
111 void PrintMsaXImm8(Instruction* instr);
112 void PrintMsaImm8(Instruction* instr);
113 void PrintMsaImm5(Instruction* instr);
114 void PrintMsaSImm5(Instruction* instr);
115 void PrintMsaSImm10(Instruction* instr, bool is_mi10 = false);
116 void PrintMsaImmBit(Instruction* instr);
117 void PrintMsaImmElm(Instruction* instr);
118 void PrintMsaCopy(Instruction* instr);
120 void PrintInstructionName(Instruction* instr);
123 int FormatRegister(Instruction* instr, const char* option);
124 int FormatFPURegister(Instruction* instr, const char* option);
125 int FormatMSARegister(Instruction* instr, const char* option);
126 int FormatOption(Instruction* instr, const char* option);
127 void Format(Instruction* instr, const char* format);
128 void Unknown(Instruction* instr);
131 bool DecodeTypeRegisterRsType(Instruction* instr);
132 void DecodeTypeRegisterSRsType(Instruction* instr);
133 void DecodeTypeRegisterDRsType(Instruction* instr);
134 void DecodeTypeRegisterLRsType(Instruction* instr);
135 void DecodeTypeRegisterWRsType(Instruction* instr);
136 void DecodeTypeRegisterSPECIAL(Instruction* instr);
137 void DecodeTypeRegisterSPECIAL2(Instruction* instr);
138 void DecodeTypeRegisterSPECIAL3(Instruction* instr);
139 void DecodeTypeRegister(Instruction* instr);
140 void DecodeTypeImmediate(Instruction* instr);
141 void DecodeTypeImmediateSPECIAL3(Instruction* instr);
142 void DecodeTypeJump(Instruction* instr);
143 void DecodeTypeMsaI8(Instruction* instr);
144 void DecodeTypeMsaI5(Instruction* instr);
145 void DecodeTypeMsaI10(Instruction* instr);
146 void DecodeTypeMsaELM(Instruction* instr);
147 void DecodeTypeMsaBIT(Instruction* instr);
148 void DecodeTypeMsaMI10(Instruction* instr);
149 void DecodeTypeMsa3R(Instruction* instr);
150 void DecodeTypeMsa3RF(Instruction* instr);
151 void DecodeTypeMsaVec(Instruction* instr);
152 void DecodeTypeMsa2R(Instruction* instr);
153 void DecodeTypeMsa2RF(Instruction* instr);
182 void Decoder::PrintRs(Instruction* instr) {
183 int reg = instr->RsValue();
187 void Decoder::PrintRt(Instruction* instr) {
188 int reg = instr->RtValue();
192 void Decoder::PrintRd(Instruction* instr) {
193 int reg = instr->RdValue();
227 void Decoder::PrintFs(Instruction* instr) {
228 int freg = instr->RsValue();
232 void Decoder::PrintFt(Instruction* instr) {
233 int freg = instr->RtValue();
237 void Decoder::PrintFd(Instruction* instr) {
238 int freg = instr->RdValue();
243 void Decoder::PrintSa(Instruction* instr) {
244 int sa = instr->SaValue();
249 void Decoder::PrintLsaSa(Instruction* instr) {
250 int sa = instr->LsaSaValue() + 1;
255 void Decoder::PrintSd(Instruction* instr) {
256 int sd = instr->RdValue();
261 void Decoder::PrintSs1(Instruction* instr) {
262 int ss = instr->RdValue();
268 void Decoder::PrintSs2(Instruction* instr) {
269 int ss = instr->RdValue();
270 int pos = instr->SaValue();
276 void Decoder::PrintBc(Instruction* instr) {
277 int cc = instr->FBccValue();
282 void Decoder::PrintCc(Instruction* instr) {
283 int cc = instr->FCccValue();
288 void Decoder::PrintBp2(Instruction* instr) {
289 int bp2 = instr->Bp2Value();
294 void Decoder::PrintUImm9(Instruction* instr) {
295 int32_t imm = instr->Imm9Value();
300 void Decoder::PrintSImm9(Instruction* instr) {
301 int32_t imm = ((instr->Imm9Value()) << 23) >> 23;
306 void Decoder::PrintUImm16(Instruction* instr) {
307 int32_t imm = instr->Imm16Value();
312 void Decoder::PrintSImm16(Instruction* instr) {
313 int32_t imm = ((instr->Imm16Value()) << 16) >> 16;
318 void Decoder::PrintXImm16(Instruction* instr) {
319 int32_t imm = instr->Imm16Value();
326 void Decoder::PrintPCImm16(Instruction* instr, int delta_pc, int n_bits) {
327 int16_t offset = instr->Imm16Value();
330 converter_.NameOfAddress(reinterpret_cast<byte*>(instr) +
335 void Decoder::PrintSImm18(Instruction* instr) {
337 ((instr->Imm18Value()) << (32 - kImm18Bits)) >> (32 - kImm18Bits);
342 void Decoder::PrintXImm18(Instruction* instr) {
343 int32_t imm = instr->Imm18Value();
348 void Decoder::PrintXImm19(Instruction* instr) {
349 int32_t imm = instr->Imm19Value();
354 void Decoder::PrintSImm19(Instruction* instr) {
355 int32_t imm19 = instr->Imm19Value();
363 void Decoder::PrintXImm21(Instruction* instr) {
364 uint32_t imm = instr->Imm21Value();
369 void Decoder::PrintSImm21(Instruction* instr) {
370 int32_t imm21 = instr->Imm21Value();
380 void Decoder::PrintPCImm21(Instruction* instr, int delta_pc, int n_bits) {
381 int32_t imm21 = instr->Imm21Value();
387 converter_.NameOfAddress(reinterpret_cast<byte*>(instr) +
392 void Decoder::PrintXImm26(Instruction* instr) {
393 uint32_t target = static_cast<uint32_t>(instr->Imm26Value())
395 target = (reinterpret_cast<uint32_t>(instr) & ~0xFFFFFFF) | target;
401 void Decoder::PrintSImm26(Instruction* instr) {
402 int32_t imm26 = instr->Imm26Value();
412 void Decoder::PrintPCImm26(Instruction* instr, int delta_pc, int n_bits) {
413 int32_t imm26 = instr->Imm26Value();
419 converter_.NameOfAddress(reinterpret_cast<byte*>(instr) +
426 void Decoder::PrintPCImm26(Instruction* instr) {
427 int32_t imm26 = instr->Imm26Value();
429 uint32_t pc = ((uint32_t)(instr + 1) & pc_mask) | (imm26 << 2);
436 void Decoder::PrintCode(Instruction* instr) {
437 if (instr->OpcodeFieldRaw() != SPECIAL)
439 switch (instr->FunctionFieldRaw()) {
441 int32_t code = instr->Bits(25, 6);
452 int32_t code = instr->Bits(15, 6);
462 void Decoder::PrintMsaXImm8(Instruction* instr) {
463 int32_t imm = instr->MsaImm8Value();
467 void Decoder::PrintMsaImm8(Instruction* instr) {
468 int32_t imm = instr->MsaImm8Value();
472 void Decoder::PrintMsaImm5(Instruction* instr) {
473 int32_t imm = instr->MsaImm5Value();
477 void Decoder::PrintMsaSImm5(Instruction* instr) {
478 int32_t imm = instr->MsaImm5Value();
484 void Decoder::PrintMsaSImm10(Instruction* instr, bool is_mi10) {
485 int32_t imm = is_mi10 ? instr->MsaImmMI10Value() : instr->MsaImm10Value();
491 void Decoder::PrintMsaImmBit(Instruction* instr) {
492 int32_t m = instr->MsaBitMValue();
496 void Decoder::PrintMsaImmElm(Instruction* instr) {
497 int32_t n = instr->MsaElmNValue();
501 void Decoder::PrintMsaCopy(Instruction* instr) {
502 int32_t rd = instr->WdValue();
503 int32_t ws = instr->WsValue();
504 int32_t n = instr->MsaElmNValue();
510 void Decoder::PrintFormat(Instruction* instr) {
512 switch (instr->RsFieldRaw()) {
531 void Decoder::PrintMsaDataFormat(Instruction* instr) {
532 DCHECK(instr->IsMSAInstr());
534 if (instr->IsMSABranchInstr()) {
535 switch (instr->RsFieldRaw()) {
561 switch (instr->MSAMinorOpcodeField()) {
565 df = DF[instr->Bits(22, 21)];
568 df = DF[instr->Bits(1, 0)];
571 df = DF[instr->MsaBitDf()];
574 df = DF[instr->MsaElmDf()];
577 uint32_t opcode = instr->InstructionBits() & kMsa3RFMask;
587 df = DF[1 + instr->Bit(21)];
590 df = DF[2 + instr->Bit(21)];
595 df = DF[instr->Bits(17, 16)];
598 df = DF[2 + instr->Bit(16)];
609 void Decoder::PrintInstructionName(Instruction* instr) {}
613 int Decoder::FormatRegister(Instruction* instr, const char* format) {
616 int reg = instr->RsValue();
620 int reg = instr->RtValue();
624 int reg = instr->RdValue();
633 int Decoder::FormatFPURegister(Instruction* instr, const char* format) {
635 if ((CTC1 == instr->RsFieldRaw()) || (CFC1 == instr->RsFieldRaw())) {
637 int reg = instr->FsValue();
641 int reg = instr->FtValue();
645 int reg = instr->FdValue();
649 int reg = instr->FrValue();
655 int reg = instr->FsValue();
659 int reg = instr->FtValue();
663 int reg = instr->FdValue();
667 int reg = instr->FrValue();
677 int Decoder::FormatMSARegister(Instruction* instr, const char* format) {
680 int reg = instr->WsValue();
684 int reg = instr->WtValue();
688 int reg = instr->WdValue();
701 int Decoder::FormatOption(Instruction* instr, const char* format) {
705 PrintCode(instr);
715 PrintSImm16(instr);
719 PrintSImm16(instr);
723 PrintXImm16(instr);
737 PrintPCImm16(instr, delta_pc, n_bits);
750 PrintSImm18(instr);
754 PrintXImm18(instr);
763 PrintSImm19(instr);
767 PrintXImm19(instr);
775 PrintMsaSImm10(instr, false);
778 PrintMsaSImm10(instr, true);
787 PrintSImm21(instr);
791 PrintXImm21(instr);
805 PrintPCImm21(instr, delta_pc, n_bits);
818 PrintSImm26(instr);
822 PrintXImm26(instr);
836 PrintPCImm26(instr, delta_pc, n_bits);
844 PrintPCImm26(instr);
853 PrintMsaImm5(instr);
856 PrintMsaSImm5(instr);
861 PrintMsaImm8(instr);
867 PrintUImm9(instr);
870 PrintSImm9(instr);
875 PrintMsaImmBit(instr);
879 PrintMsaImmElm(instr);
885 return FormatRegister(instr, format);
888 return FormatFPURegister(instr, format);
891 return FormatMSARegister(instr, format);
898 PrintLsaSa(instr);
902 PrintSa(instr);
907 PrintSd(instr);
913 PrintSs1(instr);
917 PrintSs2(instr);
927 PrintBc(instr);
934 PrintBp2(instr);
943 PrintCc(instr);
947 if (instr->IsMSAInstr()) {
948 PrintMsaDataFormat(instr);
950 PrintFormat(instr);
960 void Decoder::Format(Instruction* instr, const char* format) {
964 format += FormatOption(instr, format);
973 // For currently unimplemented decodings the disassembler calls Unknown(instr)
975 void Decoder::Unknown(Instruction* instr) { Format(instr, "unknown"); }
977 bool Decoder::DecodeTypeRegisterRsType(Instruction* instr) {
978 switch (instr->FunctionFieldRaw()) {
980 Format(instr, "rint.'t 'fd, 'fs");
983 Format(instr, "min.'t 'fd, 'fs, 'ft");
986 Format(instr, "max.'t 'fd, 'fs, 'ft");
989 Format(instr, "mina.'t 'fd, 'fs, 'ft");
992 Format(instr, "maxa.'t 'fd, 'fs, 'ft");
995 Format(instr, "sel.'t 'fd, 'fs, 'ft");
998 Format(instr, "seleqz.'t 'fd, 'fs, 'ft");
1001 Format(instr, "selnez.'t 'fd, 'fs, 'ft");
1004 Format(instr, "movz.'t 'fd, 'fs, 'rt");
1007 Format(instr, "movn.'t 'fd, 'fs, 'rt");
1010 if (instr->Bit(16)) {
1011 Format(instr, "movt.'t 'fd, 'fs, 'Cc");
1013 Format(instr, "movf.'t 'fd, 'fs, 'Cc");
1017 Format(instr, "add.'t 'fd, 'fs, 'ft");
1020 Format(instr, "sub.'t 'fd, 'fs, 'ft");
1023 Format(instr, "mul.'t 'fd, 'fs, 'ft");
1026 Format(instr, "div.'t 'fd, 'fs, 'ft");
1029 Format(instr, "abs.'t 'fd, 'fs");
1032 Format(instr, "mov.'t 'fd, 'fs");
1035 Format(instr, "neg.'t 'fd, 'fs");
1038 Format(instr, "sqrt.'t 'fd, 'fs");
1041 Format(instr, "recip.'t 'fd, 'fs");
1044 Format(instr, "rsqrt.'t 'fd, 'fs");
1047 Format(instr, "cvt.w.'t 'fd, 'fs");
1050 Format(instr, "cvt.l.'t 'fd, 'fs");
1053 Format(instr, "trunc.w.'t 'fd, 'fs");
1056 Format(instr, "trunc.l.'t 'fd, 'fs");
1059 Format(instr, "round.w.'t 'fd, 'fs");
1062 Format(instr, "round.l.'t 'fd, 'fs");
1065 Format(instr, "floor.w.'t 'fd, 'fs");
1068 Format(instr, "floor.l.'t 'fd, 'fs");
1071 Format(instr, "ceil.w.'t 'fd, 'fs");
1074 Format(instr, "class.'t 'fd, 'fs");
1077 Format(instr, "ceil.l.'t 'fd, 'fs");
1080 Format(instr, "cvt.s.'t 'fd, 'fs");
1083 Format(instr, "c.f.'t 'fs, 'ft, 'Cc");
1086 Format(instr, "c.un.'t 'fs, 'ft, 'Cc");
1089 Format(instr, "c.eq.'t 'fs, 'ft, 'Cc");
1092 Format(instr, "c.ueq.'t 'fs, 'ft, 'Cc");
1095 Format(instr, "c.olt.'t 'fs, 'ft, 'Cc");
1098 Format(instr, "c.ult.'t 'fs, 'ft, 'Cc");
1101 Format(instr, "c.ole.'t 'fs, 'ft, 'Cc");
1104 Format(instr, "c.ule.'t 'fs, 'ft, 'Cc");
1112 void Decoder::DecodeTypeRegisterSRsType(Instruction* instr) {
1113 if (!DecodeTypeRegisterRsType(instr)) {
1114 switch (instr->FunctionFieldRaw()) {
1116 Format(instr, "cvt.d.'t 'fd, 'fs");
1119 Format(instr, "maddf.s 'fd, 'fs, 'ft");
1122 Format(instr, "msubf.s 'fd, 'fs, 'ft");
1125 Format(instr, "unknown.cop1.'t");
1131 void Decoder::DecodeTypeRegisterDRsType(Instruction* instr) {
1132 if (!DecodeTypeRegisterRsType(instr)) {
1133 switch (instr->FunctionFieldRaw()) {
1135 Format(instr, "maddf.d 'fd, 'fs, 'ft");
1138 Format(instr, "msubf.d 'fd, 'fs, 'ft");
1141 Format(instr, "unknown.cop1.'t");
1147 void Decoder::DecodeTypeRegisterLRsType(Instruction* instr) {
1148 switch (instr->FunctionFieldRaw()) {
1150 Format(instr, "cvt.d.l 'fd, 'fs");
1153 Format(instr, "cvt.s.l 'fd, 'fs");
1156 Format(instr, "cmp.af.d 'fd, 'fs, 'ft");
1159 Format(instr, "cmp.un.d 'fd, 'fs, 'ft");
1162 Format(instr, "cmp.eq.d 'fd, 'fs, 'ft");
1165 Format(instr, "cmp.ueq.d 'fd, 'fs, 'ft");
1168 Format(instr, "cmp.lt.d 'fd, 'fs, 'ft");
1171 Format(instr, "cmp.ult.d 'fd, 'fs, 'ft");
1174 Format(instr, "cmp.le.d 'fd, 'fs, 'ft");
1177 Format(instr, "cmp.ule.d 'fd, 'fs, 'ft");
1180 Format(instr, "cmp.or.d 'fd, 'fs, 'ft");
1183 Format(instr, "cmp.une.d 'fd, 'fs, 'ft");
1186 Format(instr, "cmp.ne.d 'fd, 'fs, 'ft");
1193 void Decoder::DecodeTypeRegisterWRsType(Instruction* instr) {
1194 switch (instr->FunctionValue()) {
1196 Format(instr, "cvt.s.w 'fd, 'fs");
1199 Format(instr, "cvt.d.w 'fd, 'fs");
1202 Format(instr, "cmp.af.s 'fd, 'fs, 'ft");
1205 Format(instr, "cmp.un.s 'fd, 'fs, 'ft");
1208 Format(instr, "cmp.eq.s 'fd, 'fs, 'ft");
1211 Format(instr, "cmp.ueq.s 'fd, 'fs, 'ft");
1214 Format(instr, "cmp.lt.s 'fd, 'fs, 'ft");
1217 Format(instr, "cmp.ult.s 'fd, 'fs, 'ft");
1220 Format(instr, "cmp.le.s 'fd, 'fs, 'ft");
1223 Format(instr, "cmp.ule.s 'fd, 'fs, 'ft");
1226 Format(instr, "cmp.or.s 'fd, 'fs, 'ft");
1229 Format(instr, "cmp.une.s 'fd, 'fs, 'ft");
1232 Format(instr, "cmp.ne.s 'fd, 'fs, 'ft");
1239 void Decoder::DecodeTypeRegisterSPECIAL(Instruction* instr) {
1240 switch (instr->FunctionFieldRaw()) {
1242 Format(instr, "jr 'rs");
1245 Format(instr, "jalr 'rs, 'rd");
1248 if (0x0 == static_cast<int>(instr->InstructionBits()))
1249 Format(instr, "nop");
1251 Format(instr, "sll 'rd, 'rt, 'sa");
1254 if (instr->RsValue() == 0) {
1255 Format(instr, "srl 'rd, 'rt, 'sa");
1258 Format(instr, "rotr 'rd, 'rt, 'sa");
1260 Unknown(instr);
1265 Format(instr, "sra 'rd, 'rt, 'sa");
1268 Format(instr, "sllv 'rd, 'rt, 'rs");
1271 if (instr->SaValue() == 0) {
1272 Format(instr, "srlv 'rd, 'rt, 'rs");
1275 Format(instr, "rotrv 'rd, 'rt, 'rs");
1277 Unknown(instr);
1282 Format(instr, "srav 'rd, 'rt, 'rs");
1285 Format(instr, "lsa 'rd, 'rt, 'rs, 'sa2");
1288 if (instr->Bits(25, 16) == 0) {
1289 Format(instr, "mfhi 'rd");
1291 if ((instr->FunctionFieldRaw() == CLZ_R6) && (instr->FdValue() == 1)) {
1292 Format(instr, "clz 'rd, 'rs");
1293 } else if ((instr->FunctionFieldRaw() == CLO_R6) &&
1294 (instr->FdValue() == 1)) {
1295 Format(instr, "clo 'rd, 'rs");
1300 Format(instr, "mflo 'rd");
1304 Format(instr, "mult 'rs, 'rt");
1306 if (instr->SaValue() == MUL_OP) {
1307 Format(instr, "mul 'rd, 'rs, 'rt");
1309 Format(instr, "muh 'rd, 'rs, 'rt");
1315 Format(instr, "multu 'rs, 'rt");
1317 if (instr->SaValue() == MUL_OP) {
1318 Format(instr, "mulu 'rd, 'rs, 'rt");
1320 Format(instr, "muhu 'rd, 'rs, 'rt");
1326 Format(instr, "div 'rs, 'rt");
1328 if (instr->SaValue() == DIV_OP) {
1329 Format(instr, "div 'rd, 'rs, 'rt");
1331 Format(instr, "mod 'rd, 'rs, 'rt");
1337 Format(instr, "divu 'rs, 'rt");
1339 if (instr->SaValue() == DIV_OP) {
1340 Format(instr, "divu 'rd, 'rs, 'rt");
1342 Format(instr, "modu 'rd, 'rs, 'rt");
1347 Format(instr, "add 'rd, 'rs, 'rt");
1350 Format(instr, "addu 'rd, 'rs, 'rt");
1353 Format(instr, "sub 'rd, 'rs, 'rt");
1356 Format(instr, "subu 'rd, 'rs, 'rt");
1359 Format(instr, "and 'rd, 'rs, 'rt");
1362 if (0 == instr->RsValue()) {
1363 Format(instr, "mov 'rd, 'rt");
1364 } else if (0 == instr->RtValue()) {
1365 Format(instr, "mov 'rd, 'rs");
1367 Format(instr, "or 'rd, 'rs, 'rt");
1371 Format(instr, "xor 'rd, 'rs, 'rt");
1374 Format(instr, "nor 'rd, 'rs, 'rt");
1377 Format(instr, "slt 'rd, 'rs, 'rt");
1380 Format(instr, "sltu 'rd, 'rs, 'rt");
1383 Format(instr, "break, code: 'code");
1386 Format(instr, "tge 'rs, 'rt, code: 'code");
1389 Format(instr, "tgeu 'rs, 'rt, code: 'code");
1392 Format(instr, "tlt 'rs, 'rt, code: 'code");
1395 Format(instr, "tltu 'rs, 'rt, code: 'code");
1398 Format(instr, "teq 'rs, 'rt, code: 'code");
1401 Format(instr, "tne 'rs, 'rt, code: 'code");
1404 Format(instr, "sync");
1407 Format(instr, "movz 'rd, 'rs, 'rt");
1410 Format(instr, "movn 'rd, 'rs, 'rt");
1413 if (instr->Bit(16)) {
1414 Format(instr, "movt 'rd, 'rs, 'bc");
1416 Format(instr, "movf 'rd, 'rs, 'bc");
1420 Format(instr, "seleqz 'rd, 'rs, 'rt");
1423 Format(instr, "selnez 'rd, 'rs, 'rt");
1430 void Decoder::DecodeTypeRegisterSPECIAL2(Instruction* instr) {
1431 switch (instr->FunctionFieldRaw()) {
1433 Format(instr, "mul 'rd, 'rs, 'rt");
1437 Format(instr, "clz 'rd, 'rs");
1445 void Decoder::DecodeTypeRegisterSPECIAL3(Instruction* instr) {
1446 switch (instr->FunctionFieldRaw()) {
1449 Format(instr, "ins 'rt, 'rs, 'sa, 'ss2");
1451 Unknown(instr);
1457 Format(instr, "ext 'rt, 'rs, 'sa, 'ss1");
1459 Unknown(instr);
1464 int sa = instr->SaFieldRaw() >> kSaShift;
1468 Format(instr, "bitswap 'rd, 'rt");
1470 Unknown(instr);
1476 Format(instr, "seb 'rd, 'rt");
1478 Unknown(instr);
1484 Format(instr, "seh 'rd, 'rt");
1486 Unknown(instr);
1492 Format(instr, "wsbh 'rd, 'rt");
1494 Unknown(instr);
1500 Format(instr, "llwp 'rd, 'rt, 0('rs)");
1505 Format(instr, "scwp 'rd, 'rt, 0('rs)");
1513 Format(instr, "align 'rd, 'rs, 'rt, 'bp2");
1515 Unknown(instr);
1531 void Decoder::DecodeTypeRegister(Instruction* instr) {
1532 switch (instr->OpcodeFieldRaw()) {
1534 switch (instr->RsFieldRaw()) {
1538 Format(instr, "mfc1 'rt, 'fs");
1541 Format(instr, "mfhc1 'rt, 'fs");
1544 Format(instr, "mtc1 'rt, 'fs");
1548 Format(instr, "ctc1 'rt, 'fs");
1551 Format(instr, "cfc1 'rt, 'fs");
1554 Format(instr, "mthc1 'rt, 'fs");
1557 DecodeTypeRegisterSRsType(instr);
1560 DecodeTypeRegisterDRsType(instr);
1563 DecodeTypeRegisterLRsType(instr);
1566 DecodeTypeRegisterWRsType(instr);
1576 switch (instr->FunctionFieldRaw()) {
1578 Format(instr, "madd.s 'fd, 'fr, 'fs, 'ft");
1581 Format(instr, "madd.d 'fd, 'fr, 'fs, 'ft");
1584 Format(instr, "msub.s 'fd, 'fr, 'fs, 'ft");
1587 Format(instr, "msub.d 'fd, 'fr, 'fs, 'ft");
1594 DecodeTypeRegisterSPECIAL(instr);
1597 DecodeTypeRegisterSPECIAL2(instr);
1600 DecodeTypeRegisterSPECIAL3(instr);
1603 switch (instr->MSAMinorOpcodeField()) {
1605 DecodeTypeMsa3R(instr);
1608 DecodeTypeMsa3RF(instr);
1611 DecodeTypeMsaVec(instr);
1614 DecodeTypeMsa2R(instr);
1617 DecodeTypeMsa2RF(instr);
1620 DecodeTypeMsaELM(instr);
1631 void Decoder::DecodeTypeImmediateSPECIAL3(Instruction* instr) {
1632 switch (instr->FunctionFieldRaw()) {
1635 if (instr->Bit(6)) {
1636 Format(instr, "llx 'rt, 'imm9s('rs)");
1638 Format(instr, "ll 'rt, 'imm9s('rs)");
1641 Unknown(instr);
1647 if (instr->Bit(6)) {
1648 Format(instr, "scx 'rt, 'imm9s('rs)");
1650 Format(instr, "sc 'rt, 'imm9s('rs)");
1653 Unknown(instr);
1662 void Decoder::DecodeTypeImmediate(Instruction* instr) {
1663 switch (instr->OpcodeFieldRaw()) {
1665 switch (instr->RsFieldRaw()) {
1667 if (instr->FBtrueValue()) {
1668 Format(instr, "bc1t 'bc, 'imm16u -> 'imm16p4s2");
1670 Format(instr, "bc1f 'bc, 'imm16u -> 'imm16p4s2");
1674 Format(instr, "bc1eqz 'ft, 'imm16u -> 'imm16p4s2");
1677 Format(instr, "bc1nez 'ft, 'imm16u -> 'imm16p4s2");
1684 Format(instr, "bz.'t 'wt, 'imm16s -> 'imm16p4s2");
1691 Format(instr, "bnz.'t 'wt, 'imm16s -> 'imm16p4s2");
1700 switch (instr->RtFieldRaw()) {
1702 Format(instr, "bltz 'rs, 'imm16u -> 'imm16p4s2");
1705 if (instr->RsValue() == 0) {
1706 Format(instr, "nal");
1708 Format(instr, "bltzal 'rs, 'imm16u -> 'imm16p4s2");
1712 Format(instr, "bgez 'rs, 'imm16u -> 'imm16p4s2");
1715 if (instr->RsValue() == 0)
1716 Format(instr, "bal 'imm16s -> 'imm16p4s2");
1718 Format(instr, "bgezal 'rs, 'imm16u -> 'imm16p4s2");
1722 Format(instr, "bgezall 'rs, 'imm16u -> 'imm16p4s2");
1730 Format(instr, "beq 'rs, 'rt, 'imm16u -> 'imm16p4s2");
1733 Format(instr, "bc 'imm26s -> 'imm26p4s2");
1736 Format(instr, "balc 'imm26s -> 'imm26p4s2");
1739 Format(instr, "bne 'rs, 'rt, 'imm16u -> 'imm16p4s2");
1742 if ((instr->RtValue() == 0) && (instr->RsValue() != 0)) {
1743 Format(instr, "blez 'rs, 'imm16u -> 'imm16p4s2");
1744 } else if ((instr->RtValue() != instr->RsValue()) &&
1745 (instr->RsValue() != 0) && (instr->RtValue() != 0)) {
1746 Format(instr, "bgeuc 'rs, 'rt, 'imm16u -> 'imm16p4s2");
1747 } else if ((instr->RtValue() == instr->RsValue()) &&
1748 (instr->RtValue() != 0)) {
1749 Format(instr, "bgezalc 'rs, 'imm16u -> 'imm16p4s2");
1750 } else if ((instr->RsValue() == 0) && (instr->RtValue() != 0)) {
1751 Format(instr, "blezalc 'rt, 'imm16u -> 'imm16p4s2");
1757 if ((instr->RtValue() == 0) && (instr->RsValue() != 0)) {
1758 Format(instr, "bgtz 'rs, 'imm16u -> 'imm16p4s2");
1759 } else if ((instr->RtValue() != instr->RsValue()) &&
1760 (instr->RsValue() != 0) && (instr->RtValue() != 0)) {
1761 Format(instr, "bltuc 'rs, 'rt, 'imm16u -> 'imm16p4s2");
1762 } else if ((instr->RtValue() == instr->RsValue()) &&
1763 (instr->RtValue() != 0)) {
1764 Format(instr, "bltzalc 'rt, 'imm16u -> 'imm16p4s2");
1765 } else if ((instr->RsValue() == 0) && (instr->RtValue() != 0)) {
1766 Format(instr, "bgtzalc 'rt, 'imm16u -> 'imm16p4s2");
1772 if ((instr->RtValue() == instr->RsValue()) && (instr->RtValue() != 0)) {
1773 Format(instr, "bgezc 'rt, 'imm16u -> 'imm16p4s2");
1774 } else if ((instr->RtValue() != instr->RsValue()) &&
1775 (instr->RsValue() != 0) && (instr->RtValue() != 0)) {
1776 Format(instr, "bgec 'rs, 'rt, 'imm16u -> 'imm16p4s2");
1777 } else if ((instr->RsValue() == 0) && (instr->RtValue() != 0)) {
1778 Format(instr, "blezc 'rt, 'imm16u -> 'imm16p4s2");
1784 if ((instr->RtValue() == instr->RsValue()) && (instr->RtValue() != 0)) {
1785 Format(instr, "bltzc 'rt, 'imm16u -> 'imm16p4s2");
1786 } else if ((instr->RtValue() != instr->RsValue()) &&
1787 (instr->RsValue() != 0) && (instr->RtValue() != 0)) {
1788 Format(instr, "bltc 'rs, 'rt, 'imm16u -> 'imm16p4s2");
1789 } else if ((instr->RsValue() == 0) && (instr->RtValue() != 0)) {
1790 Format(instr, "bgtzc 'rt, 'imm16u -> 'imm16p4s2");
1796 if (instr->RsValue() == JIC) {
1797 Format(instr, "jic 'rt, 'imm16s");
1799 Format(instr, "beqzc 'rs, 'imm21s -> 'imm21p4s2");
1803 if (instr->RsValue() == JIALC) {
1804 Format(instr, "jialc 'rt, 'imm16s");
1806 Format(instr, "bnezc 'rs, 'imm21s -> 'imm21p4s2");
1812 Format(instr, "addi 'rt, 'rs, 'imm16s");
1814 int rs_reg = instr->RsValue();
1815 int rt_reg = instr->RtValue();
1818 Format(instr, "bovc 'rs, 'rt, 'imm16s -> 'imm16p4s2");
1822 Format(instr, "beqzalc 'rt, 'imm16s -> 'imm16p4s2");
1824 Format(instr, "beqc 'rs, 'rt, 'imm16s -> 'imm16p4s2");
1831 int rs_reg = instr->RsValue();
1832 int rt_reg = instr->RtValue();
1835 Format(instr, "bnvc 'rs, 'rt, 'imm16s -> 'imm16p4s2");
1839 Format(instr, "bnezalc 'rt, 'imm16s -> 'imm16p4s2");
1841 Format(instr, "bnec 'rs, 'rt, 'imm16s -> 'imm16p4s2");
1847 Format(instr, "addiu 'rt, 'rs, 'imm16s");
1850 Format(instr, "slti 'rt, 'rs, 'imm16s");
1853 Format(instr, "sltiu 'rt, 'rs, 'imm16u");
1856 Format(instr, "andi 'rt, 'rs, 'imm16x");
1859 Format(instr, "ori 'rt, 'rs, 'imm16x");
1862 Format(instr, "xori 'rt, 'rs, 'imm16x");
1866 Format(instr, "lui 'rt, 'imm16x");
1868 if (instr->RsValue() != 0) {
1869 Format(instr, "aui 'rt, 'rs, 'imm16x");
1871 Format(instr, "lui 'rt, 'imm16x");
1877 Format(instr, "lb 'rt, 'imm16s('rs)");
1880 Format(instr, "lh 'rt, 'imm16s('rs)");
1883 Format(instr, "lwl 'rt, 'imm16s('rs)");
1886 Format(instr, "lw 'rt, 'imm16s('rs)");
1889 Format(instr, "lbu 'rt, 'imm16s('rs)");
1892 Format(instr, "lhu 'rt, 'imm16s('rs)");
1895 Format(instr, "lwr 'rt, 'imm16s('rs)");
1898 Format(instr, "pref 'rt, 'imm16s('rs)");
1901 Format(instr, "sb 'rt, 'imm16s('rs)");
1904 Format(instr, "sh 'rt, 'imm16s('rs)");
1907 Format(instr, "swl 'rt, 'imm16s('rs)");
1910 Format(instr, "sw 'rt, 'imm16s('rs)");
1913 Format(instr, "swr 'rt, 'imm16s('rs)");
1917 Unknown(instr);
1919 Format(instr, "ll 'rt, 'imm16s('rs)");
1924 Unknown(instr);
1926 Format(instr, "sc 'rt, 'imm16s('rs)");
1930 Format(instr, "lwc1 'ft, 'imm16s('rs)");
1933 Format(instr, "ldc1 'ft, 'imm16s('rs)");
1936 Format(instr, "swc1 'ft, 'imm16s('rs)");
1939 Format(instr, "sdc1 'ft, 'imm16s('rs)");
1942 int32_t imm21 = instr->Imm21Value();
1947 Format(instr, "aluipc 'rs, 'imm16s");
1950 Format(instr, "auipc 'rs, 'imm16s");
1957 Format(instr, "lwpc 'rs, 'imm19s");
1960 Format(instr, "addiupc 'rs, 'imm19s");
1970 DecodeTypeImmediateSPECIAL3(instr);
1973 switch (instr->MSAMinorOpcodeField()) {
1975 DecodeTypeMsaI8(instr);
1978 DecodeTypeMsaI5(instr);
1981 DecodeTypeMsaI10(instr);
1984 DecodeTypeMsaELM(instr);
1987 DecodeTypeMsaBIT(instr);
1990 DecodeTypeMsaMI10(instr);
1997 printf("a 0x%x \n", instr->OpcodeFieldRaw());
2002 void Decoder::DecodeTypeJump(Instruction* instr) {
2003 switch (instr->OpcodeFieldRaw()) {
2005 Format(instr, "j 'imm26x -> 'imm26j");
2008 Format(instr, "jal 'imm26x -> 'imm26j");
2015 void Decoder::DecodeTypeMsaI8(Instruction* instr) {
2016 uint32_t opcode = instr->InstructionBits() & kMsaI8Mask;
2020 Format(instr, "andi.b 'wd, 'ws, 'imm8");
2023 Format(instr, "ori.b 'wd, 'ws, 'imm8");
2026 Format(instr, "nori.b 'wd, 'ws, 'imm8");
2029 Format(instr, "xori.b 'wd, 'ws, 'imm8");
2032 Format(instr, "bmnzi.b 'wd, 'ws, 'imm8");
2035 Format(instr, "bmzi.b 'wd, 'ws, 'imm8");
2038 Format(instr, "bseli.b 'wd, 'ws, 'imm8");
2041 Format(instr, "shf.b 'wd, 'ws, 'imm8");
2044 Format(instr, "shf.h 'wd, 'ws, 'imm8");
2047 Format(instr, "shf.w 'wd, 'ws, 'imm8");
2054 void Decoder::DecodeTypeMsaI5(Instruction* instr) {
2055 uint32_t opcode = instr->InstructionBits() & kMsaI5Mask;
2059 Format(instr, "addvi.'t 'wd, 'ws, 'imm5u");
2062 Format(instr, "subvi.'t 'wd, 'ws, 'imm5u");
2065 Format(instr, "maxi_s.'t 'wd, 'ws, 'imm5s");
2068 Format(instr, "maxi_u.'t 'wd, 'ws, 'imm5u");
2071 Format(instr, "mini_s.'t 'wd, 'ws, 'imm5s");
2074 Format(instr, "mini_u.'t 'wd, 'ws, 'imm5u");
2077 Format(instr, "ceqi.'t 'wd, 'ws, 'imm5s");
2080 Format(instr, "clti_s.'t 'wd, 'ws, 'imm5s");
2083 Format(instr, "clti_u.'t 'wd, 'ws, 'imm5u");
2086 Format(instr, "clei_s.'t 'wd, 'ws, 'imm5s");
2089 Format(instr, "clei_u.'t 'wd, 'ws, 'imm5u");
2096 void Decoder::DecodeTypeMsaI10(Instruction* instr) {
2097 uint32_t opcode = instr->InstructionBits() & kMsaI5Mask;
2099 Format(instr, "ldi.'t 'wd, 'imm10s1");
2105 void Decoder::DecodeTypeMsaELM(Instruction* instr) {
2106 uint32_t opcode = instr->InstructionBits() & kMsaELMMask;
2109 if (instr->Bits(21, 16) == 0x3E) {
2110 Format(instr, "ctcmsa ");
2111 PrintMSAControlRegister(instr->WdValue());
2113 PrintRegister(instr->WsValue());
2115 Format(instr, "sldi.'t 'wd, 'ws['imme]");
2119 if (instr->Bits(21, 16) == 0x3E) {
2120 Format(instr, "cfcmsa ");
2121 PrintRegister(instr->WdValue());
2123 PrintMSAControlRegister(instr->WsValue());
2125 Format(instr, "splati.'t 'wd, 'ws['imme]");
2129 if (instr->Bits(21, 16) == 0x3E) {
2130 Format(instr, "move.v 'wd, 'ws");
2132 Format(instr, "copy_s.'t ");
2133 PrintMsaCopy(instr);
2137 Format(instr, "copy_u.'t ");
2138 PrintMsaCopy(instr);
2141 Format(instr, "insert.'t 'wd['imme], ");
2142 PrintRegister(instr->WsValue());
2145 Format(instr, "insve.'t 'wd['imme], 'ws[0]");
2152 void Decoder::DecodeTypeMsaBIT(Instruction* instr) {
2153 uint32_t opcode = instr->InstructionBits() & kMsaBITMask;
2157 Format(instr, "slli.'t 'wd, 'ws, 'immb");
2160 Format(instr, "srai.'t 'wd, 'ws, 'immb");
2163 Format(instr, "srli.'t 'wd, 'ws, 'immb");
2166 Format(instr, "bclri.'t 'wd, 'ws, 'immb");
2169 Format(instr, "bseti.'t 'wd, 'ws, 'immb");
2172 Format(instr, "bnegi.'t 'wd, 'ws, 'immb");
2175 Format(instr, "binsli.'t 'wd, 'ws, 'immb");
2178 Format(instr, "binsri.'t 'wd, 'ws, 'immb");
2181 Format(instr, "sat_s.'t 'wd, 'ws, 'immb");
2184 Format(instr, "sat_u.'t 'wd, 'ws, 'immb");
2187 Format(instr, "srari.'t 'wd, 'ws, 'immb");
2190 Format(instr, "srlri.'t 'wd, 'ws, 'immb");
2197 void Decoder::DecodeTypeMsaMI10(Instruction* instr) {
2198 uint32_t opcode = instr->InstructionBits() & kMsaMI10Mask;
2200 Format(instr, "ld.'t 'wd, 'imm10s2(");
2201 PrintRegister(instr->WsValue());
2204 Format(instr, "st.'t 'wd, 'imm10s2(");
2205 PrintRegister(instr->WsValue());
2212 void Decoder::DecodeTypeMsa3R(Instruction* instr) {
2213 uint32_t opcode = instr->InstructionBits() & kMsa3RMask;
2216 Format(instr, "sll.'t 'wd, 'ws, 'wt");
2219 Format(instr, "sra.'t 'wd, 'ws, 'wt");
2222 Format(instr, "srl.'t 'wd, 'ws, 'wt");
2225 Format(instr, "bclr.'t 'wd, 'ws, 'wt");
2228 Format(instr, "bset.'t 'wd, 'ws, 'wt");
2231 Format(instr, "bneg.'t 'wd, 'ws, 'wt");
2234 Format(instr, "binsl.'t 'wd, 'ws, 'wt");
2237 Format(instr, "binsr.'t 'wd, 'ws, 'wt");
2240 Format(instr, "addv.'t 'wd, 'ws, 'wt");
2243 Format(instr, "subv.'t 'wd, 'ws, 'wt");
2246 Format(instr, "max_s.'t 'wd, 'ws, 'wt");
2249 Format(instr, "max_u.'t 'wd, 'ws, 'wt");
2252 Format(instr, "min_s.'t 'wd, 'ws, 'wt");
2255 Format(instr, "min_u.'t 'wd, 'ws, 'wt");
2258 Format(instr, "max_a.'t 'wd, 'ws, 'wt");
2261 Format(instr, "min_a.'t 'wd, 'ws, 'wt");
2264 Format(instr, "ceq.'t 'wd, 'ws, 'wt");
2267 Format(instr, "clt_s.'t 'wd, 'ws, 'wt");
2270 Format(instr, "clt_u.'t 'wd, 'ws, 'wt");
2273 Format(instr, "cle_s.'t 'wd, 'ws, 'wt");
2276 Format(instr, "cle_u.'t 'wd, 'ws, 'wt");
2279 Format(instr, "add_a.'t 'wd, 'ws, 'wt");
2282 Format(instr, "adds_a.'t 'wd, 'ws, 'wt");
2285 Format(instr, "adds_s.'t 'wd, 'ws, 'wt");
2288 Format(instr, "adds_u.'t 'wd, 'ws, 'wt");
2291 Format(instr, "ave_s.'t 'wd, 'ws, 'wt");
2294 Format(instr, "ave_u.'t 'wd, 'ws, 'wt");
2297 Format(instr, "aver_s.'t 'wd, 'ws, 'wt");
2300 Format(instr, "aver_u.'t 'wd, 'ws, 'wt");
2303 Format(instr, "subs_s.'t 'wd, 'ws, 'wt");
2306 Format(instr, "subs_u.'t 'wd, 'ws, 'wt");
2309 Format(instr, "subsus_u.'t 'wd, 'ws, 'wt");
2312 Format(instr, "subsuu_s.'t 'wd, 'ws, 'wt");
2315 Format(instr, "asub_s.'t 'wd, 'ws, 'wt");
2318 Format(instr, "asub_u.'t 'wd, 'ws, 'wt");
2321 Format(instr, "mulv.'t 'wd, 'ws, 'wt");
2324 Format(instr, "maddv.'t 'wd, 'ws, 'wt");
2327 Format(instr, "msubv.'t 'wd, 'ws, 'wt");
2330 Format(instr, "div_s.'t 'wd, 'ws, 'wt");
2333 Format(instr, "div_u.'t 'wd, 'ws, 'wt");
2336 Format(instr, "mod_s.'t 'wd, 'ws, 'wt");
2339 Format(instr, "mod_u.'t 'wd, 'ws, 'wt");
2342 Format(instr, "dotp_s.'t 'wd, 'ws, 'wt");
2345 Format(instr, "dotp_u.'t 'wd, 'ws, 'wt");
2348 Format(instr, "dpadd_s.'t 'wd, 'ws, 'wt");
2351 Format(instr, "dpadd_u.'t 'wd, 'ws, 'wt");
2354 Format(instr, "dpsub_s.'t 'wd, 'ws, 'wt");
2357 Format(instr, "dpsub_u.'t 'wd, 'ws, 'wt");
2360 Format(instr, "sld.'t 'wd, 'ws['rt]");
2363 Format(instr, "splat.'t 'wd, 'ws['rt]");
2366 Format(instr, "pckev.'t 'wd, 'ws, 'wt");
2369 Format(instr, "pckod.'t 'wd, 'ws, 'wt");
2372 Format(instr, "ilvl.'t 'wd, 'ws, 'wt");
2375 Format(instr, "ilvr.'t 'wd, 'ws, 'wt");
2378 Format(instr, "ilvev.'t 'wd, 'ws, 'wt");
2381 Format(instr, "ilvod.'t 'wd, 'ws, 'wt");
2384 Format(instr, "vshf.'t 'wd, 'ws, 'wt");
2387 Format(instr, "srar.'t 'wd, 'ws, 'wt");
2390 Format(instr, "srlr.'t 'wd, 'ws, 'wt");
2393 Format(instr, "hadd_s.'t 'wd, 'ws, 'wt");
2396 Format(instr, "hadd_u.'t 'wd, 'ws, 'wt");
2399 Format(instr, "hsub_s.'t 'wd, 'ws, 'wt");
2402 Format(instr, "hsub_u.'t 'wd, 'ws, 'wt");
2409 void Decoder::DecodeTypeMsa3RF(Instruction* instr) {
2410 uint32_t opcode = instr->InstructionBits() & kMsa3RFMask;
2413 Format(instr, "fcaf.'t 'wd, 'ws, 'wt");
2416 Format(instr, "fcun.'t 'wd, 'ws, 'wt");
2419 Format(instr, "fceq.'t 'wd, 'ws, 'wt");
2422 Format(instr, "fcueq.'t 'wd, 'ws, 'wt");
2425 Format(instr, "fclt.'t 'wd, 'ws, 'wt");
2428 Format(instr, "fcult.'t 'wd, 'ws, 'wt");
2431 Format(instr, "fcle.'t 'wd, 'ws, 'wt");
2434 Format(instr, "fcule.'t 'wd, 'ws, 'wt");
2437 Format(instr, "fsaf.'t 'wd, 'ws, 'wt");
2440 Format(instr, "fsun.'t 'wd, 'ws, 'wt");
2443 Format(instr, "fseq.'t 'wd, 'ws, 'wt");
2446 Format(instr, "fsueq.'t 'wd, 'ws, 'wt");
2449 Format(instr, "fslt.'t 'wd, 'ws, 'wt");
2452 Format(instr, "fsult.'t 'wd, 'ws, 'wt");
2455 Format(instr, "fsle.'t 'wd, 'ws, 'wt");
2458 Format(instr, "fsule.'t 'wd, 'ws, 'wt");
2461 Format(instr, "fadd.'t 'wd, 'ws, 'wt");
2464 Format(instr, "fsub.'t 'wd, 'ws, 'wt");
2467 Format(instr, "fmul.'t 'wd, 'ws, 'wt");
2470 Format(instr, "fdiv.'t 'wd, 'ws, 'wt");
2473 Format(instr, "fmadd.'t 'wd, 'ws, 'wt");
2476 Format(instr, "fmsub.'t 'wd, 'ws, 'wt");
2479 Format(instr, "fexp2.'t 'wd, 'ws, 'wt");
2482 Format(instr, "fexdo.'t 'wd, 'ws, 'wt");
2485 Format(instr, "ftq.'t 'wd, 'ws, 'wt");
2488 Format(instr, "fmin.'t 'wd, 'ws, 'wt");
2491 Format(instr, "fmin_a.'t 'wd, 'ws, 'wt");
2494 Format(instr, "fmax.'t 'wd, 'ws, 'wt");
2497 Format(instr, "fmax_a.'t 'wd, 'ws, 'wt");
2500 Format(instr, "fcor.'t 'wd, 'ws, 'wt");
2503 Format(instr, "fcune.'t 'wd, 'ws, 'wt");
2506 Format(instr, "fcne.'t 'wd, 'ws, 'wt");
2509 Format(instr, "mul_q.'t 'wd, 'ws, 'wt");
2512 Format(instr, "madd_q.'t 'wd, 'ws, 'wt");
2515 Format(instr, "msub_q.'t 'wd, 'ws, 'wt");
2518 Format(instr, "fsor.'t 'wd, 'ws, 'wt");
2521 Format(instr, "fsune.'t 'wd, 'ws, 'wt");
2524 Format(instr, "fsne.'t 'wd, 'ws, 'wt");
2527 Format(instr, "mulr_q.'t 'wd, 'ws, 'wt");
2530 Format(instr, "maddr_q.'t 'wd, 'ws, 'wt");
2533 Format(instr, "msubr_q.'t 'wd, 'ws, 'wt");
2540 void Decoder::DecodeTypeMsaVec(Instruction* instr) {
2541 uint32_t opcode = instr->InstructionBits() & kMsaVECMask;
2544 Format(instr, "and.v 'wd, 'ws, 'wt");
2547 Format(instr, "or.v 'wd, 'ws, 'wt");
2550 Format(instr, "nor.v 'wd, 'ws, 'wt");
2553 Format(instr, "xor.v 'wd, 'ws, 'wt");
2556 Format(instr, "bmnz.v 'wd, 'ws, 'wt");
2559 Format(instr, "bmz.v 'wd, 'ws, 'wt");
2562 Format(instr, "bsel.v 'wd, 'ws, 'wt");
2569 void Decoder::DecodeTypeMsa2R(Instruction* instr) {
2570 uint32_t opcode = instr->InstructionBits() & kMsa2RMask;
2573 Format(instr, "fill.'t 'wd, ");
2574 PrintRegister(instr->WsValue()); // rs value is in ws field
2577 Format(instr, "pcnt.'t 'wd, 'ws");
2580 Format(instr, "nloc.'t 'wd, 'ws");
2583 Format(instr, "nlzc.'t 'wd, 'ws");
2590 void Decoder::DecodeTypeMsa2RF(Instruction* instr) {
2591 uint32_t opcode = instr->InstructionBits() & kMsa2RFMask;
2594 Format(instr, "fclass.'t 'wd, 'ws");
2597 Format(instr, "ftrunc_s.'t 'wd, 'ws");
2600 Format(instr, "ftrunc_u.'t 'wd, 'ws");
2603 Format(instr, "fsqrt.'t 'wd, 'ws");
2606 Format(instr, "frsqrt.'t 'wd, 'ws");
2609 Format(instr, "frcp.'t 'wd, 'ws");
2612 Format(instr, "frint.'t 'wd, 'ws");
2615 Format(instr, "flog2.'t 'wd, 'ws");
2618 Format(instr, "fexupl.'t 'wd, 'ws");
2621 Format(instr, "fexupr.'t 'wd, 'ws");
2624 Format(instr, "ffql.'t 'wd, 'ws");
2627 Format(instr, "ffqr.'t 'wd, 'ws");
2630 Format(instr, "ftint_s.'t 'wd, 'ws");
2633 Format(instr, "ftint_u.'t 'wd, 'ws");
2636 Format(instr, "ffint_s.'t 'wd, 'ws");
2639 Format(instr, "ffint_u.'t 'wd, 'ws");
2648 Instruction* instr = Instruction::At(instr_ptr);
2651 "%08x ", instr->InstructionBits());
2652 switch (instr->InstructionType()) {
2654 DecodeTypeRegister(instr);
2658 DecodeTypeImmediate(instr);
2662 DecodeTypeJump(instr);
2666 Format(instr, "UNSUPPORTED");