Lines Matching refs:instr
53 void PrintRj(Instruction* instr);
54 void PrintRk(Instruction* instr);
55 void PrintRd(Instruction* instr);
56 void PrintFj(Instruction* instr);
57 void PrintFk(Instruction* instr);
58 void PrintFd(Instruction* instr);
59 void PrintFa(Instruction* instr);
60 void PrintSa2(Instruction* instr);
61 void PrintSa3(Instruction* instr);
62 void PrintUi5(Instruction* instr);
63 void PrintUi6(Instruction* instr);
64 void PrintUi12(Instruction* instr);
65 void PrintMsbw(Instruction* instr);
66 void PrintLsbw(Instruction* instr);
67 void PrintMsbd(Instruction* instr);
68 void PrintLsbd(Instruction* instr);
69 // void PrintCond(Instruction* instr);
70 void PrintSi12(Instruction* instr);
71 void PrintSi14(Instruction* instr);
72 void PrintSi16(Instruction* instr);
73 void PrintSi20(Instruction* instr);
74 void PrintXi12(Instruction* instr);
75 void PrintXi20(Instruction* instr);
76 void PrintCj(Instruction* instr);
77 void PrintCd(Instruction* instr);
78 void PrintCa(Instruction* instr);
79 void PrintCode(Instruction* instr);
80 void PrintHint5(Instruction* instr);
81 void PrintHint15(Instruction* instr);
82 void PrintPCOffs16(Instruction* instr);
83 void PrintPCOffs21(Instruction* instr);
84 void PrintPCOffs26(Instruction* instr);
85 void PrintOffs16(Instruction* instr);
86 void PrintOffs21(Instruction* instr);
87 void PrintOffs26(Instruction* instr);
90 int FormatRegister(Instruction* instr, const char* option);
91 int FormatFPURegister(Instruction* instr, const char* option);
92 int FormatOption(Instruction* instr, const char* option);
93 void Format(Instruction* instr, const char* format);
94 void Unknown(Instruction* instr);
95 int DecodeBreakInstr(Instruction* instr);
98 int InstructionDecode(Instruction* instr);
99 void DecodeTypekOp6(Instruction* instr);
100 void DecodeTypekOp7(Instruction* instr);
101 void DecodeTypekOp8(Instruction* instr);
102 void DecodeTypekOp10(Instruction* instr);
103 void DecodeTypekOp12(Instruction* instr);
104 void DecodeTypekOp14(Instruction* instr);
105 int DecodeTypekOp17(Instruction* instr);
106 void DecodeTypekOp22(Instruction* instr);
135 void Decoder::PrintRj(Instruction* instr) {
136 int reg = instr->RjValue();
140 void Decoder::PrintRk(Instruction* instr) {
141 int reg = instr->RkValue();
145 void Decoder::PrintRd(Instruction* instr) {
146 int reg = instr->RdValue();
155 void Decoder::PrintFj(Instruction* instr) {
156 int freg = instr->FjValue();
160 void Decoder::PrintFk(Instruction* instr) {
161 int freg = instr->FkValue();
165 void Decoder::PrintFd(Instruction* instr) {
166 int freg = instr->FdValue();
170 void Decoder::PrintFa(Instruction* instr) {
171 int freg = instr->FaValue();
176 void Decoder::PrintSa2(Instruction* instr) {
177 int sa = instr->Sa2Value();
178 uint32_t opcode = (instr->InstructionBits() >> 18) << 18;
185 void Decoder::PrintSa3(Instruction* instr) {
186 int sa = instr->Sa3Value();
190 void Decoder::PrintUi5(Instruction* instr) {
191 int ui = instr->Ui5Value();
195 void Decoder::PrintUi6(Instruction* instr) {
196 int ui = instr->Ui6Value();
200 void Decoder::PrintUi12(Instruction* instr) {
201 int ui = instr->Ui12Value();
205 void Decoder::PrintXi12(Instruction* instr) {
206 int xi = instr->Ui12Value();
210 void Decoder::PrintXi20(Instruction* instr) {
211 int xi = instr->Si20Value();
215 void Decoder::PrintMsbd(Instruction* instr) {
216 int msbd = instr->MsbdValue();
220 void Decoder::PrintLsbd(Instruction* instr) {
221 int lsbd = instr->LsbdValue();
225 void Decoder::PrintMsbw(Instruction* instr) {
226 int msbw = instr->MsbwValue();
230 void Decoder::PrintLsbw(Instruction* instr) {
231 int lsbw = instr->LsbwValue();
235 void Decoder::PrintSi12(Instruction* instr) {
236 int si = ((instr->Si12Value()) << (32 - kSi12Bits)) >> (32 - kSi12Bits);
238 si, instr->Si12Value());
241 void Decoder::PrintSi14(Instruction* instr) {
242 int si = ((instr->Si14Value()) << (32 - kSi14Bits)) >> (32 - kSi14Bits);
245 si, instr->Si14Value() << 2);
248 void Decoder::PrintSi16(Instruction* instr) {
249 int si = ((instr->Si16Value()) << (32 - kSi16Bits)) >> (32 - kSi16Bits);
251 si, instr->Si16Value());
254 void Decoder::PrintSi20(Instruction* instr) {
255 int si = ((instr->Si20Value()) << (32 - kSi20Bits)) >> (32 - kSi20Bits);
257 si, instr->Si20Value());
260 void Decoder::PrintCj(Instruction* instr) {
261 int cj = instr->CjValue();
265 void Decoder::PrintCd(Instruction* instr) {
266 int cd = instr->CdValue();
270 void Decoder::PrintCa(Instruction* instr) {
271 int ca = instr->CaValue();
275 void Decoder::PrintCode(Instruction* instr) {
276 int code = instr->CodeValue();
281 void Decoder::PrintHint5(Instruction* instr) {
282 int hint = instr->Hint5Value();
287 void Decoder::PrintHint15(Instruction* instr) {
288 int hint = instr->Hint15Value();
293 void Decoder::PrintPCOffs16(Instruction* instr) {
295 int offs = instr->Offs16Value();
300 converter_.NameOfAddress(reinterpret_cast<byte*>(instr) + target));
303 void Decoder::PrintPCOffs21(Instruction* instr) {
305 int offs = instr->Offs21Value();
311 converter_.NameOfAddress(reinterpret_cast<byte*>(instr) + target));
314 void Decoder::PrintPCOffs26(Instruction* instr) {
316 int offs = instr->Offs26Value();
322 converter_.NameOfAddress(reinterpret_cast<byte*>(instr) + target));
325 void Decoder::PrintOffs16(Instruction* instr) {
326 int offs = instr->Offs16Value();
331 void Decoder::PrintOffs21(Instruction* instr) {
332 int offs = instr->Offs21Value();
337 void Decoder::PrintOffs26(Instruction* instr) {
338 int offs = instr->Offs26Value();
345 int Decoder::FormatRegister(Instruction* instr, const char* format) {
348 int reg = instr->RjValue();
352 int reg = instr->RkValue();
356 int reg = instr->RdValue();
365 int Decoder::FormatFPURegister(Instruction* instr, const char* format) {
368 int reg = instr->FjValue();
372 int reg = instr->FkValue();
376 int reg = instr->FdValue();
380 int reg = instr->FaValue();
392 int Decoder::FormatOption(Instruction* instr, const char* format) {
398 PrintCa(instr);
402 PrintCd(instr);
406 PrintCj(instr);
410 PrintCode(instr);
415 return FormatFPURegister(instr, format);
420 PrintHint5(instr);
424 PrintHint15(instr);
433 PrintLsbw(instr);
437 PrintLsbd(instr);
446 PrintMsbw(instr);
449 PrintMsbd(instr);
457 PrintOffs16(instr);
462 PrintOffs21(instr);
466 PrintOffs26(instr);
476 PrintPCOffs16(instr);
481 PrintPCOffs21(instr);
485 PrintPCOffs26(instr);
492 return FormatRegister(instr, format);
499 PrintSa2(instr);
502 PrintSa3(instr);
508 PrintSi20(instr);
514 PrintSi12(instr);
518 PrintSi14(instr);
522 PrintSi16(instr);
537 PrintUi5(instr);
541 PrintUi6(instr);
545 PrintUi12(instr);
553 PrintXi20(instr);
557 PrintXi12(instr);
571 void Decoder::Format(Instruction* instr, const char* format) {
575 format += FormatOption(instr, format);
584 // For currently unimplemented decodings the disassembler calls Unknown(instr)
586 void Decoder::Unknown(Instruction* instr) { Format(instr, "unknown"); }
588 int Decoder::DecodeBreakInstr(Instruction* instr) {
589 // This is already known to be BREAK instr, just extract the code.
590 /*if (instr->Bits(14, 0) == static_cast<int>(kMaxStopCode)) {
592 Format(instr, "break, code: 'code");
595 static_cast<void*>(reinterpret_cast<int32_t*>(instr + kInstrSize)),
597 *reinterpret_cast<char**>(instr + kInstrSize)));
598 // Size 3: the break_ instr, plus embedded 64-bit char pointer.
601 Format(instr, "break, code: 'code");
604 Format(instr, "break code: 'code");
608 void Decoder::DecodeTypekOp6(Instruction* instr) {
609 switch (instr->Bits(31, 26) << 26) {
611 Format(instr, "addu16i.d 'rd, 'rj, 'si16");
614 Format(instr, "beqz 'rj, 'offs21 -> 'pcoffs21");
617 Format(instr, "bnez 'rj, 'offs21 -> 'pcoffs21");
620 if (instr->Bit(8))
621 Format(instr, "bcnez fcc'cj, 'offs21 -> 'pcoffs21");
623 Format(instr, "bceqz fcc'cj, 'offs21 -> 'pcoffs21");
626 Format(instr, "jirl 'rd, 'rj, 'offs16");
629 Format(instr, "b 'offs26 -> 'pcoffs26");
632 Format(instr, "bl 'offs26 -> 'pcoffs26");
635 Format(instr, "beq 'rj, 'rd, 'offs16 -> 'pcoffs16");
638 Format(instr, "bne 'rj, 'rd, 'offs16 -> 'pcoffs16");
641 Format(instr, "blt 'rj, 'rd, 'offs16 -> 'pcoffs16");
644 Format(instr, "bge 'rj, 'rd, 'offs16 -> 'pcoffs16");
647 Format(instr, "bltu 'rj, 'rd, 'offs16 -> 'pcoffs16");
650 Format(instr, "bgeu 'rj, 'rd, 'offs16 -> 'pcoffs16");
657 void Decoder::DecodeTypekOp7(Instruction* instr) {
658 switch (instr->Bits(31, 25) << 25) {
660 Format(instr, "lu12i.w 'rd, 'xi20");
663 Format(instr, "lu32i.d 'rd, 'xi20");
666 Format(instr, "pcaddi 'rd, 'xi20");
669 Format(instr, "pcalau12i 'rd, 'xi20");
672 Format(instr, "pcaddu12i 'rd, 'xi20");
675 Format(instr, "pcaddu18i 'rd, 'xi20");
682 void Decoder::DecodeTypekOp8(Instruction* instr) {
683 switch (instr->Bits(31, 24) << 24) {
685 Format(instr, "ldptr.w 'rd, 'rj, 'si14");
688 Format(instr, "stptr.w 'rd, 'rj, 'si14");
691 Format(instr, "ldptr.d 'rd, 'rj, 'si14");
694 Format(instr, "stptr.d 'rd, 'rj, 'si14");
697 Format(instr, "ll.w 'rd, 'rj, 'si14");
700 Format(instr, "sc.w 'rd, 'rj, 'si14");
703 Format(instr, "ll.d 'rd, 'rj, 'si14");
706 Format(instr, "sc.d 'rd, 'rj, 'si14");
713 void Decoder::DecodeTypekOp10(Instruction* instr) {
714 switch (instr->Bits(31, 22) << 22) {
716 if (instr->Bit(21) != 0) {
717 if (instr->Bit(15) == 0) {
718 Format(instr, "bstrins.w 'rd, 'rj, 'msbw, 'lsbw");
720 Format(instr, "bstrpick.w 'rd, 'rj, 'msbw, 'lsbw");
726 Format(instr, "bstrins.d 'rd, 'rj, 'msbd, 'lsbd");
729 Format(instr, "bstrpick.d 'rd, 'rj, 'msbd, 'lsbd");
732 Format(instr, "slti 'rd, 'rj, 'si12");
735 Format(instr, "sltui 'rd, 'rj, 'si12");
738 Format(instr, "addi.w 'rd, 'rj, 'si12");
741 Format(instr, "addi.d 'rd, 'rj, 'si12");
744 Format(instr, "lu52i.d 'rd, 'rj, 'xi12");
747 Format(instr, "andi 'rd, 'rj, 'xi12");
750 Format(instr, "ori 'rd, 'rj, 'xi12");
753 Format(instr, "xori 'rd, 'rj, 'xi12");
756 Format(instr, "ld.b 'rd, 'rj, 'si12");
759 Format(instr, "ld.h 'rd, 'rj, 'si12");
762 Format(instr, "ld.w 'rd, 'rj, 'si12");
765 Format(instr, "ld.d 'rd, 'rj, 'si12");
768 Format(instr, "st.b 'rd, 'rj, 'si12");
771 Format(instr, "st.h 'rd, 'rj, 'si12");
774 Format(instr, "st.w 'rd, 'rj, 'si12");
777 Format(instr, "st.d 'rd, 'rj, 'si12");
780 Format(instr, "ld.bu 'rd, 'rj, 'si12");
783 Format(instr, "ld.hu 'rd, 'rj, 'si12");
786 Format(instr, "ld.wu 'rd, 'rj, 'si12");
789 Format(instr, "fld.s 'fd, 'rj, 'si12");
792 Format(instr, "fst.s 'fd, 'rj, 'si12");
795 Format(instr, "fld.d 'fd, 'rj, 'si12");
798 Format(instr, "fst.d 'fd, 'rj, 'si12");
805 void Decoder::DecodeTypekOp12(Instruction* instr) {
806 switch (instr->Bits(31, 20) << 20) {
808 Format(instr, "fmadd.s 'fd, 'fj, 'fk, 'fa");
811 Format(instr, "fmadd.d 'fd, 'fj, 'fk, 'fa");
814 Format(instr, "fmsub.s 'fd, 'fj, 'fk, 'fa");
817 Format(instr, "fmsub.d 'fd, 'fj, 'fk, 'fa");
820 Format(instr, "fnmadd.s 'fd, 'fj, 'fk, 'fa");
823 Format(instr, "fnmadd.d 'fd, 'fj, 'fk, 'fa");
826 Format(instr, "fnmsub.s 'fd, 'fj, 'fk, 'fa");
829 Format(instr, "fnmsub.d 'fd, 'fj, 'fk, 'fa");
832 switch (instr->Bits(19, 15)) {
834 Format(instr, "fcmp.caf.s fcc'cd, 'fj, 'fk");
837 Format(instr, "fcmp.saf.s fcc'cd, 'fj, 'fk");
840 Format(instr, "fcmp.clt.s fcc'cd, 'fj, 'fk");
843 Format(instr, "fcmp.ceq.s fcc'cd, 'fj, 'fk");
846 Format(instr, "fcmp.seq.s fcc'cd, 'fj, 'fk");
849 Format(instr, "fcmp.cle.s fcc'cd, 'fj, 'fk");
852 Format(instr, "fcmp.sle.s fcc'cd, 'fj, 'fk");
855 Format(instr, "fcmp.cun.s fcc'cd, 'fj, 'fk");
858 Format(instr, "fcmp.sun.s fcc'cd, 'fj, 'fk");
861 Format(instr, "fcmp.cult.s fcc'cd, 'fj, 'fk");
864 Format(instr, "fcmp.sult.s fcc'cd, 'fj, 'fk");
867 Format(instr, "fcmp.cueq.s fcc'cd, 'fj, 'fk");
870 Format(instr, "fcmp.sueq.s fcc'cd, 'fj, 'fk");
873 Format(instr, "fcmp.cule.s fcc'cd, 'fj, 'fk");
876 Format(instr, "fcmp.sule.s fcc'cd, 'fj, 'fk");
879 Format(instr, "fcmp.cne.s fcc'cd, 'fj, 'fk");
882 Format(instr, "fcmp.sne.s fcc'cd, 'fj, 'fk");
885 Format(instr, "fcmp.cor.s fcc'cd, 'fj, 'fk");
888 Format(instr, "fcmp.sor.s fcc'cd, 'fj, 'fk");
891 Format(instr, "fcmp.cune.s fcc'cd, 'fj, 'fk");
894 Format(instr, "fcmp.sune.s fcc'cd, 'fj, 'fk");
901 switch (instr->Bits(19, 15)) {
903 Format(instr, "fcmp.caf.d fcc'cd, 'fj, 'fk");
906 Format(instr, "fcmp.saf.d fcc'cd, 'fj, 'fk");
909 Format(instr, "fcmp.clt.d fcc'cd, 'fj, 'fk");
912 Format(instr, "fcmp.ceq.d fcc'cd, 'fj, 'fk");
915 Format(instr, "fcmp.seq.d fcc'cd, 'fj, 'fk");
918 Format(instr, "fcmp.cle.d fcc'cd, 'fj, 'fk");
921 Format(instr, "fcmp.sle.d fcc'cd, 'fj, 'fk");
924 Format(instr, "fcmp.cun.d fcc'cd, 'fj, 'fk");
927 Format(instr, "fcmp.sun.d fcc'cd, 'fj, 'fk");
930 Format(instr, "fcmp.cult.d fcc'cd, 'fj, 'fk");
933 Format(instr, "fcmp.sult.d fcc'cd, 'fj, 'fk");
936 Format(instr, "fcmp.cueq.d fcc'cd, 'fj, 'fk");
939 Format(instr, "fcmp.sueq.d fcc'cd, 'fj, 'fk");
942 Format(instr, "fcmp.cule.d fcc'cd, 'fj, 'fk");
945 Format(instr, "fcmp.sule.d fcc'cd, 'fj, 'fk");
948 Format(instr, "fcmp.cne.d fcc'cd, 'fj, 'fk");
951 Format(instr, "fcmp.sne.d fcc'cd, 'fj, 'fk");
954 Format(instr, "fcmp.cor.d fcc'cd, 'fj, 'fk");
957 Format(instr, "fcmp.sor.d fcc'cd, 'fj, 'fk");
960 Format(instr, "fcmp.cune.d fcc'cd, 'fj, 'fk");
963 Format(instr, "fcmp.sune.d fcc'cd, 'fj, 'fk");
970 Format(instr, "fsel 'fd, 'fj, 'fk, fcc'ca");
977 void Decoder::DecodeTypekOp14(Instruction* instr) {
978 switch (instr->Bits(31, 18) << 18) {
980 if (instr->Bit(17))
981 Format(instr, "alsl.wu 'rd, 'rj, 'rk, 'sa2");
983 Format(instr, "alsl.w 'rd, 'rj, 'rk, 'sa2");
986 Format(instr, "bytepick.w 'rd, 'rj, 'rk, 'sa2");
989 Format(instr, "bytepick.d 'rd, 'rj, 'rk, 'sa3");
992 Format(instr, "alsl.d 'rd, 'rj, 'rk, 'sa2");
995 if (instr->Bit(16))
996 Format(instr, "slli.d 'rd, 'rj, 'ui6");
998 Format(instr, "slli.w 'rd, 'rj, 'ui5");
1001 if (instr->Bit(16))
1002 Format(instr, "srli.d 'rd, 'rj, 'ui6");
1004 Format(instr, "srli.w 'rd, 'rj, 'ui5");
1007 if (instr->Bit(16))
1008 Format(instr, "srai.d 'rd, 'rj, 'ui6");
1010 Format(instr, "srai.w 'rd, 'rj, 'ui5");
1013 if (instr->Bit(16))
1014 Format(instr, "rotri.d 'rd, 'rj, 'ui6");
1016 Format(instr, "rotri.w 'rd, 'rj, 'ui5");
1023 int Decoder::DecodeTypekOp17(Instruction* instr) {
1024 switch (instr->Bits(31, 15) << 15) {
1026 Format(instr, "add.w 'rd, 'rj, 'rk");
1029 Format(instr, "add.d 'rd, 'rj, 'rk");
1032 Format(instr, "sub.w 'rd, 'rj, 'rk");
1035 Format(instr, "sub.d 'rd, 'rj, 'rk");
1038 Format(instr, "slt 'rd, 'rj, 'rk");
1041 Format(instr, "sltu 'rd, 'rj, 'rk");
1044 Format(instr, "maskeqz 'rd, 'rj, 'rk");
1047 Format(instr, "masknez 'rd, 'rj, 'rk");
1050 Format(instr, "nor 'rd, 'rj, 'rk");
1053 Format(instr, "and 'rd, 'rj, 'rk");
1056 Format(instr, "or 'rd, 'rj, 'rk");
1059 Format(instr, "xor 'rd, 'rj, 'rk");
1062 Format(instr, "orn 'rd, 'rj, 'rk");
1065 Format(instr, "andn 'rd, 'rj, 'rk");
1068 Format(instr, "sll.w 'rd, 'rj, 'rk");
1071 Format(instr, "srl.w 'rd, 'rj, 'rk");
1074 Format(instr, "sra.w 'rd, 'rj, 'rk");
1077 Format(instr, "sll.d 'rd, 'rj, 'rk");
1080 Format(instr, "srl.d 'rd, 'rj, 'rk");
1083 Format(instr, "sra.d 'rd, 'rj, 'rk");
1086 Format(instr, "rotr.d 'rd, 'rj, 'rk");
1089 Format(instr, "rotr.w 'rd, 'rj, 'rk");
1092 Format(instr, "mul.w 'rd, 'rj, 'rk");
1095 Format(instr, "mulh.w 'rd, 'rj, 'rk");
1098 Format(instr, "mulh.wu 'rd, 'rj, 'rk");
1101 Format(instr, "mul.d 'rd, 'rj, 'rk");
1104 Format(instr, "mulh.d 'rd, 'rj, 'rk");
1107 Format(instr, "mulh.du 'rd, 'rj, 'rk");
1110 Format(instr, "mulw.d.w 'rd, 'rj, 'rk");
1113 Format(instr, "mulw.d.wu 'rd, 'rj, 'rk");
1116 Format(instr, "div.w 'rd, 'rj, 'rk");
1119 Format(instr, "mod.w 'rd, 'rj, 'rk");
1122 Format(instr, "div.wu 'rd, 'rj, 'rk");
1125 Format(instr, "mod.wu 'rd, 'rj, 'rk");
1128 Format(instr, "div.d 'rd, 'rj, 'rk");
1131 Format(instr, "mod.d 'rd, 'rj, 'rk");
1134 Format(instr, "div.du 'rd, 'rj, 'rk");
1137 Format(instr, "mod.du 'rd, 'rj, 'rk");
1140 return DecodeBreakInstr(instr);
1142 Format(instr, "fadd.s 'fd, 'fj, 'fk");
1145 Format(instr, "fadd.d 'fd, 'fj, 'fk");
1148 Format(instr, "fsub.s 'fd, 'fj, 'fk");
1151 Format(instr, "fsub.d 'fd, 'fj, 'fk");
1154 Format(instr, "fmul.s 'fd, 'fj, 'fk");
1157 Format(instr, "fmul.d 'fd, 'fj, 'fk");
1160 Format(instr, "fdiv.s 'fd, 'fj, 'fk");
1163 Format(instr, "fdiv.d 'fd, 'fj, 'fk");
1166 Format(instr, "fmax.s 'fd, 'fj, 'fk");
1169 Format(instr, "fmax.d 'fd, 'fj, 'fk");
1172 Format(instr, "fmin.s 'fd, 'fj, 'fk");
1175 Format(instr, "fmin.d 'fd, 'fj, 'fk");
1178 Format(instr, "fmaxa.s 'fd, 'fj, 'fk");
1181 Format(instr, "fmaxa.d 'fd, 'fj, 'fk");
1184 Format(instr, "fmina.s 'fd, 'fj, 'fk");
1187 Format(instr, "fmina.d 'fd, 'fj, 'fk");
1190 Format(instr, "ldx.b 'rd, 'rj, 'rk");
1193 Format(instr, "ldx.h 'rd, 'rj, 'rk");
1196 Format(instr, "ldx.w 'rd, 'rj, 'rk");
1199 Format(instr, "ldx.d 'rd, 'rj, 'rk");
1202 Format(instr, "stx.b 'rd, 'rj, 'rk");
1205 Format(instr, "stx.h 'rd, 'rj, 'rk");
1208 Format(instr, "stx.w 'rd, 'rj, 'rk");
1211 Format(instr, "stx.d 'rd, 'rj, 'rk");
1214 Format(instr, "ldx.bu 'rd, 'rj, 'rk");
1217 Format(instr, "ldx.hu 'rd, 'rj, 'rk");
1220 Format(instr, "ldx.wu 'rd, 'rj, 'rk");
1223 Format(instr, "fldx.s 'fd, 'rj, 'rk");
1226 Format(instr, "fldx.d 'fd, 'rj, 'rk");
1229 Format(instr, "fstx.s 'fd, 'rj, 'rk");
1232 Format(instr, "fstx.d 'fd, 'rj, 'rk");
1235 Format(instr, "amswap.w 'rd, 'rk, 'rj");
1238 Format(instr, "amswap.d 'rd, 'rk, 'rj");
1241 Format(instr, "amadd.w 'rd, 'rk, 'rj");
1244 Format(instr, "amadd.d 'rd, 'rk, 'rj");
1247 Format(instr, "amand.w 'rd, 'rk, 'rj");
1250 Format(instr, "amand.d 'rd, 'rk, 'rj");
1253 Format(instr, "amor.w 'rd, 'rk, 'rj");
1256 Format(instr, "amor.d 'rd, 'rk, 'rj");
1259 Format(instr, "amxor.w 'rd, 'rk, 'rj");
1262 Format(instr, "amxor.d 'rd, 'rk, 'rj");
1265 Format(instr, "ammax.w 'rd, 'rk, 'rj");
1268 Format(instr, "ammax.d 'rd, 'rk, 'rj");
1271 Format(instr, "ammin.w 'rd, 'rk, 'rj");
1274 Format(instr, "ammin.d 'rd, 'rk, 'rj");
1277 Format(instr, "ammax.wu 'rd, 'rk, 'rj");
1280 Format(instr, "ammax.du 'rd, 'rk, 'rj");
1283 Format(instr, "ammin.wu 'rd, 'rk, 'rj");
1286 Format(instr, "ammin.du 'rd, 'rk, 'rj");
1289 Format(instr, "amswap_db.w 'rd, 'rk, 'rj");
1292 Format(instr, "amswap_db.d 'rd, 'rk, 'rj");
1295 Format(instr, "amadd_db.w 'rd, 'rk, 'rj");
1298 Format(instr, "amadd_db.d 'rd, 'rk, 'rj");
1301 Format(instr, "amand_db.w 'rd, 'rk, 'rj");
1304 Format(instr, "amand_db.d 'rd, 'rk, 'rj");
1307 Format(instr, "amor_db.w 'rd, 'rk, 'rj");
1310 Format(instr, "amor_db.d 'rd, 'rk, 'rj");
1313 Format(instr, "amxor_db.w 'rd, 'rk, 'rj");
1316 Format(instr, "amxor_db.d 'rd, 'rk, 'rj");
1319 Format(instr, "ammax_db.w 'rd, 'rk, 'rj");
1322 Format(instr, "ammax_db.d 'rd, 'rk, 'rj");
1325 Format(instr, "ammin_db.w 'rd, 'rk, 'rj");
1328 Format(instr, "ammin_db.d 'rd, 'rk, 'rj");
1331 Format(instr, "ammax_db.wu 'rd, 'rk, 'rj");
1334 Format(instr, "ammax_db.du 'rd, 'rk, 'rj");
1337 Format(instr, "ammin_db.wu 'rd, 'rk, 'rj");
1340 Format(instr, "ammin_db.du 'rd, 'rk, 'rj");
1343 Format(instr, "dbar 'hint15");
1346 Format(instr, "ibar 'hint15");
1349 Format(instr, "fscaleb.s 'fd, 'fj, 'fk");
1352 Format(instr, "fscaleb.d 'fd, 'fj, 'fk");
1355 Format(instr, "fcopysign.s 'fd, 'fj, 'fk");
1358 Format(instr, "fcopysign.d 'fd, 'fj, 'fk");
1366 void Decoder::DecodeTypekOp22(Instruction* instr) {
1367 switch (instr->Bits(31, 10) << 10) {
1369 Format(instr, "clz.w 'rd, 'rj");
1372 Format(instr, "ctz.w 'rd, 'rj");
1375 Format(instr, "clz.d 'rd, 'rj");
1378 Format(instr, "ctz.d 'rd, 'rj");
1381 Format(instr, "revb.2h 'rd, 'rj");
1384 Format(instr, "revb.4h 'rd, 'rj");
1387 Format(instr, "revb.2w 'rd, 'rj");
1390 Format(instr, "revb.d 'rd, 'rj");
1393 Format(instr, "revh.2w 'rd, 'rj");
1396 Format(instr, "revh.d 'rd, 'rj");
1399 Format(instr, "bitrev.4b 'rd, 'rj");
1402 Format(instr, "bitrev.8b 'rd, 'rj");
1405 Format(instr, "bitrev.w 'rd, 'rj");
1408 Format(instr, "bitrev.d 'rd, 'rj");
1411 Format(instr, "ext.w.b 'rd, 'rj");
1414 Format(instr, "ext.w.h 'rd, 'rj");
1417 Format(instr, "fabs.s 'fd, 'fj");
1420 Format(instr, "fabs.d 'fd, 'fj");
1423 Format(instr, "fneg.s 'fd, 'fj");
1426 Format(instr, "fneg.d 'fd, 'fj");
1429 Format(instr, "fsqrt.s 'fd, 'fj");
1432 Format(instr, "fsqrt.d 'fd, 'fj");
1435 Format(instr, "fmov.s 'fd, 'fj");
1438 Format(instr, "fmov.d 'fd, 'fj");
1441 Format(instr, "movgr2fr.w 'fd, 'rj");
1444 Format(instr, "movgr2fr.d 'fd, 'rj");
1447 Format(instr, "movgr2frh.w 'fd, 'rj");
1450 Format(instr, "movfr2gr.s 'rd, 'fj");
1453 Format(instr, "movfr2gr.d 'rd, 'fj");
1456 Format(instr, "movfrh2gr.s 'rd, 'fj");
1459 Format(instr, "movgr2fcsr fcsr, 'rj");
1462 Format(instr, "movfcsr2gr 'rd, fcsr");
1465 Format(instr, "fcvt.s.d 'fd, 'fj");
1468 Format(instr, "fcvt.d.s 'fd, 'fj");
1471 Format(instr, "ftintrm.w.s 'fd, 'fj");
1474 Format(instr, "ftintrm.w.d 'fd, 'fj");
1477 Format(instr, "ftintrm.l.s 'fd, 'fj");
1480 Format(instr, "ftintrm.l.d 'fd, 'fj");
1483 Format(instr, "ftintrp.w.s 'fd, 'fj");
1486 Format(instr, "ftintrp.w.d 'fd, 'fj");
1489 Format(instr, "ftintrp.l.s 'fd, 'fj");
1492 Format(instr, "ftintrp.l.d 'fd, 'fj");
1495 Format(instr, "ftintrz.w.s 'fd, 'fj");
1498 Format(instr, "ftintrz.w.d 'fd, 'fj");
1501 Format(instr, "ftintrz.l.s 'fd, 'fj");
1504 Format(instr, "ftintrz.l.d 'fd, 'fj");
1507 Format(instr, "ftintrne.w.s 'fd, 'fj");
1510 Format(instr, "ftintrne.w.d 'fd, 'fj");
1513 Format(instr, "ftintrne.l.s 'fd, 'fj");
1516 Format(instr, "ftintrne.l.d 'fd, 'fj");
1519 Format(instr, "ftint.w.s 'fd, 'fj");
1522 Format(instr, "ftint.w.d 'fd, 'fj");
1525 Format(instr, "ftint.l.s 'fd, 'fj");
1528 Format(instr, "ftint.l.d 'fd, 'fj");
1531 Format(instr, "ffint.s.w 'fd, 'fj");
1534 Format(instr, "ffint.s.l 'fd, 'fj");
1537 Format(instr, "ffint.d.w 'fd, 'fj");
1540 Format(instr, "ffint.d.l 'fd, 'fj");
1543 Format(instr, "frint.s 'fd, 'fj");
1546 Format(instr, "frint.d 'fd, 'fj");
1549 Format(instr, "movfr2cf fcc'cd, 'fj");
1552 Format(instr, "movcf2fr 'fd, fcc'cj");
1555 Format(instr, "movgr2cf fcc'cd, 'rj");
1558 Format(instr, "movcf2gr 'rd, fcc'cj");
1561 Format(instr, "frecip.s 'fd, 'fj");
1564 Format(instr, "frecip.d 'fd, 'fj");
1567 Format(instr, "frsqrt.s 'fd, 'fj");
1570 Format(instr, "frsqrt.d 'fd, 'fj");
1573 Format(instr, "fclass.s 'fd, 'fj");
1576 Format(instr, "fclass.d 'fd, 'fj");
1579 Format(instr, "flogb.s 'fd, 'fj");
1582 Format(instr, "flogb.d 'fd, 'fj");
1585 Format(instr, "clo.w 'rd, 'rj");
1588 Format(instr, "cto.w 'rd, 'rj");
1591 Format(instr, "clo.d 'rd, 'rj");
1594 Format(instr, "cto.d 'rd, 'rj");
1602 Instruction* instr = Instruction::At(instr_ptr);
1604 "%08x ", instr->InstructionBits());
1605 switch (instr->InstructionType()) {
1607 DecodeTypekOp6(instr);
1611 DecodeTypekOp7(instr);
1615 DecodeTypekOp8(instr);
1619 DecodeTypekOp10(instr);
1623 DecodeTypekOp12(instr);
1627 DecodeTypekOp14(instr);
1631 return DecodeTypekOp17(instr);
1634 DecodeTypekOp22(instr);
1638 Format(instr, "UNSUPPORTED");
1642 Format(instr, "UNSUPPORTED");