Lines Matching refs:instr

72   void PrintRs(Instruction* instr);
73 void PrintRt(Instruction* instr);
74 void PrintRd(Instruction* instr);
75 void PrintFs(Instruction* instr);
76 void PrintFt(Instruction* instr);
77 void PrintFd(Instruction* instr);
78 void PrintSa(Instruction* instr);
79 void PrintSd(Instruction* instr);
80 void PrintSs1(Instruction* instr);
81 void PrintSs2(Instruction* instr);
82 void PrintBc(Instruction* instr);
83 void PrintCc(Instruction* instr);
84 void PrintFunction(Instruction* instr);
85 void PrintSecondaryField(Instruction* instr);
86 void PrintUImm16(Instruction* instr);
87 void PrintSImm16(Instruction* instr);
88 void PrintXImm16(Instruction* instr);
89 void PrintXImm21(Instruction* instr);
90 void PrintXImm26(Instruction* instr);
91 void PrintCode(Instruction* instr); // For break and trap instructions.
93 void PrintInstructionName(Instruction* instr);
96 int FormatRegister(Instruction* instr, const char* option);
97 int FormatFPURegister(Instruction* instr, const char* option);
98 int FormatOption(Instruction* instr, const char* option);
99 void Format(Instruction* instr, const char* format);
100 void Unknown(Instruction* instr);
101 int DecodeBreakInstr(Instruction* instr);
104 int DecodeTypeRegister(Instruction* instr);
105 void DecodeTypeImmediate(Instruction* instr);
106 void DecodeTypeJump(Instruction* instr);
144 void Decoder::PrintRs(Instruction* instr) {
145 int reg = instr->RsValue();
150 void Decoder::PrintRt(Instruction* instr) {
151 int reg = instr->RtValue();
156 void Decoder::PrintRd(Instruction* instr) {
157 int reg = instr->RdValue();
168 void Decoder::PrintFs(Instruction* instr) {
169 int freg = instr->RsValue();
174 void Decoder::PrintFt(Instruction* instr) {
175 int freg = instr->RtValue();
180 void Decoder::PrintFd(Instruction* instr) {
181 int freg = instr->RdValue();
187 void Decoder::PrintSa(Instruction* instr) {
188 int sa = instr->SaValue();
194 void Decoder::PrintSd(Instruction* instr) {
195 int sd = instr->RdValue();
201 void Decoder::PrintSs1(Instruction* instr) {
202 int ss = instr->RdValue();
208 void Decoder::PrintSs2(Instruction* instr) {
209 int ss = instr->RdValue();
210 int pos = instr->SaValue();
217 void Decoder::PrintBc(Instruction* instr) {
218 int cc = instr->FBccValue();
224 void Decoder::PrintCc(Instruction* instr) {
225 int cc = instr->FCccValue();
231 void Decoder::PrintUImm16(Instruction* instr) {
232 int32_t imm = instr->Imm16Value();
238 void Decoder::PrintSImm16(Instruction* instr) {
239 int32_t imm = ((instr->Imm16Value()) << 16) >> 16;
245 void Decoder::PrintXImm16(Instruction* instr) {
246 int32_t imm = instr->Imm16Value();
252 void Decoder::PrintXImm21(Instruction* instr) {
253 uint32_t imm = instr->Imm21Value();
259 void Decoder::PrintXImm26(Instruction* instr) {
260 uint32_t imm = instr->Imm26Value() << kImmFieldShift;
266 void Decoder::PrintCode(Instruction* instr) {
267 if (instr->OpcodeFieldRaw() != SPECIAL)
269 switch (instr->FunctionFieldRaw()) {
271 int32_t code = instr->Bits(25, 6);
282 int32_t code = instr->Bits(15, 6);
294 void Decoder::PrintInstructionName(Instruction* instr) {
300 int Decoder::FormatRegister(Instruction* instr, const char* format) {
303 int reg = instr->RsValue();
307 int reg = instr->RtValue();
311 int reg = instr->RdValue();
322 int Decoder::FormatFPURegister(Instruction* instr, const char* format) {
325 int reg = instr->FsValue();
329 int reg = instr->FtValue();
333 int reg = instr->FdValue();
337 int reg = instr->FrValue();
351 int Decoder::FormatOption(Instruction* instr, const char* format) {
355 PrintCode(instr);
363 PrintSImm16(instr);
366 PrintSImm16(instr);
369 PrintXImm16(instr);
374 PrintXImm21(instr);
378 PrintXImm26(instr);
383 return FormatRegister(instr, format);
386 return FormatFPURegister(instr, format);
392 PrintSa(instr);
397 PrintSd(instr);
403 PrintSs1(instr);
407 PrintSs2(instr);
415 PrintBc(instr);
420 PrintCc(instr);
432 void Decoder::Format(Instruction* instr, const char* format) {
436 format += FormatOption(instr, format);
446 // For currently unimplemented decodings the disassembler calls Unknown(instr)
448 void Decoder::Unknown(Instruction* instr) {
449 Format(instr, "unknown");
453 int Decoder::DecodeBreakInstr(Instruction* instr) {
454 // This is already known to be BREAK instr, just extract the code.
455 if (instr->Bits(25, 6) == static_cast<int>(kMaxStopCode)) {
457 Format(instr, "break, code: 'code");
461 (reinterpret_cast<int32_t*>(instr
464 (*reinterpret_cast<char**>(instr
466 *reinterpret_cast<char**>(instr
468 // Size 3: the break_ instr, plus embedded 64-bit char pointer.
471 Format(instr, "break, code: 'code");
477 int Decoder::DecodeTypeRegister(Instruction* instr) {
478 switch (instr->OpcodeFieldRaw()) {
480 switch (instr->RsFieldRaw()) {
482 Format(instr, "mfc1 'rt, 'fs");
485 Format(instr, "dmfc1 'rt, 'fs");
488 Format(instr, "mfhc1 'rt, 'fs");
491 Format(instr, "mtc1 'rt, 'fs");
494 Format(instr, "dmtc1 'rt, 'fs");
498 Format(instr, "ctc1 'rt, 'fs");
501 Format(instr, "cfc1 'rt, 'fs");
504 Format(instr, "mthc1 'rt, 'fs");
507 switch (instr->FunctionFieldRaw()) {
509 Format(instr, "add.d 'fd, 'fs, 'ft");
512 Format(instr, "sub.d 'fd, 'fs, 'ft");
515 Format(instr, "mul.d 'fd, 'fs, 'ft");
518 Format(instr, "div.d 'fd, 'fs, 'ft");
521 Format(instr, "abs.d 'fd, 'fs");
524 Format(instr, "mov.d 'fd, 'fs");
527 Format(instr, "neg.d 'fd, 'fs");
530 Format(instr, "sqrt.d 'fd, 'fs");
533 Format(instr, "cvt.w.d 'fd, 'fs");
536 Format(instr, "cvt.l.d 'fd, 'fs");
539 Format(instr, "trunc.w.d 'fd, 'fs");
542 Format(instr, "trunc.l.d 'fd, 'fs");
545 Format(instr, "round.w.d 'fd, 'fs");
548 Format(instr, "round.l.d 'fd, 'fs");
551 Format(instr, "floor.w.d 'fd, 'fs");
554 Format(instr, "floor.l.d 'fd, 'fs");
557 Format(instr, "ceil.w.d 'fd, 'fs");
560 Format(instr, "ceil.l.d 'fd, 'fs");
563 Format(instr, "cvt.s.d 'fd, 'fs");
566 Format(instr, "c.f.d 'fs, 'ft, 'Cc");
569 Format(instr, "c.un.d 'fs, 'ft, 'Cc");
572 Format(instr, "c.eq.d 'fs, 'ft, 'Cc");
575 Format(instr, "c.ueq.d 'fs, 'ft, 'Cc");
578 Format(instr, "c.olt.d 'fs, 'ft, 'Cc");
581 Format(instr, "c.ult.d 'fs, 'ft, 'Cc");
584 Format(instr, "c.ole.d 'fs, 'ft, 'Cc");
587 Format(instr, "c.ule.d 'fs, 'ft, 'Cc");
590 Format(instr, "unknown.cop1.d");
595 switch (instr->FunctionFieldRaw()) {
597 Format(instr, "cvt.d.w 'fd, 'fs");
604 switch (instr->FunctionFieldRaw()) {
606 Format(instr, "cvt.d.l 'fd, 'fs");
609 Format(instr, "cvt.s.l 'fd, 'fs");
612 Format(instr, "cmp.un.d 'fd, 'fs, 'ft");
615 Format(instr, "cmp.eq.d 'fd, 'fs, 'ft");
618 Format(instr, "cmp.ueq.d 'fd, 'fs, 'ft");
621 Format(instr, "cmp.lt.d 'fd, 'fs, 'ft");
624 Format(instr, "cmp.ult.d 'fd, 'fs, 'ft");
627 Format(instr, "cmp.le.d 'fd, 'fs, 'ft");
630 Format(instr, "cmp.ule.d 'fd, 'fs, 'ft");
633 Format(instr, "cmp.or.d 'fd, 'fs, 'ft");
636 Format(instr, "cmp.une.d 'fd, 'fs, 'ft");
639 Format(instr, "cmp.ne.d 'fd, 'fs, 'ft");
650 switch (instr->FunctionFieldRaw()) {
652 Format(instr, "madd.d 'fd, 'fr, 'fs, 'ft");
659 switch (instr->FunctionFieldRaw()) {
661 Format(instr, "jr 'rs");
664 Format(instr, "jalr 'rs");
667 if (0x0 == static_cast<int>(instr->InstructionBits()))
668 Format(instr, "nop");
670 Format(instr, "sll 'rd, 'rt, 'sa");
673 Format(instr, "dsll 'rd, 'rt, 'sa");
677 Format(instr, "dmult 'rs, 'rt");
679 if (instr->SaValue() == MUL_OP) {
680 Format(instr, "dmul 'rd, 'rs, 'rt");
682 Format(instr, "dmuh 'rd, 'rs, 'rt");
687 Format(instr, "dsll32 'rd, 'rt, 'sa");
690 if (instr->RsValue() == 0) {
691 Format(instr, "srl 'rd, 'rt, 'sa");
694 Format(instr, "rotr 'rd, 'rt, 'sa");
696 Unknown(instr);
701 if (instr->RsValue() == 0) {
702 Format(instr, "dsrl 'rd, 'rt, 'sa");
705 Format(instr, "drotr 'rd, 'rt, 'sa");
707 Unknown(instr);
712 Format(instr, "dsrl32 'rd, 'rt, 'sa");
715 Format(instr, "sra 'rd, 'rt, 'sa");
718 Format(instr, "dsra 'rd, 'rt, 'sa");
721 Format(instr, "dsra32 'rd, 'rt, 'sa");
724 Format(instr, "sllv 'rd, 'rt, 'rs");
727 Format(instr, "dsllv 'rd, 'rt, 'rs");
730 if (instr->SaValue() == 0) {
731 Format(instr, "srlv 'rd, 'rt, 'rs");
734 Format(instr, "rotrv 'rd, 'rt, 'rs");
736 Unknown(instr);
741 if (instr->SaValue() == 0) {
742 Format(instr, "dsrlv 'rd, 'rt, 'rs");
745 Format(instr, "drotrv 'rd, 'rt, 'rs");
747 Unknown(instr);
752 Format(instr, "srav 'rd, 'rt, 'rs");
755 Format(instr, "dsrav 'rd, 'rt, 'rs");
758 if (instr->Bits(25, 16) == 0) {
759 Format(instr, "mfhi 'rd");
761 if ((instr->FunctionFieldRaw() == CLZ_R6)
762 && (instr->FdValue() == 1)) {
763 Format(instr, "clz 'rd, 'rs");
764 } else if ((instr->FunctionFieldRaw() == CLO_R6)
765 && (instr->FdValue() == 1)) {
766 Format(instr, "clo 'rd, 'rs");
771 Format(instr, "mflo 'rd");
775 Format(instr, "dmultu 'rs, 'rt");
777 if (instr->SaValue() == MUL_OP) {
778 Format(instr, "dmulu 'rd, 'rs, 'rt");
780 Format(instr, "dmuhu 'rd, 'rs, 'rt");
786 Format(instr, "mult 'rs, 'rt");
788 if (instr->SaValue() == MUL_OP) {
789 Format(instr, "mul 'rd, 'rs, 'rt");
791 Format(instr, "muh 'rd, 'rs, 'rt");
797 Format(instr, "multu 'rs, 'rt");
799 if (instr->SaValue() == MUL_OP) {
800 Format(instr, "mulu 'rd, 'rs, 'rt");
802 Format(instr, "muhu 'rd, 'rs, 'rt");
809 Format(instr, "div 'rs, 'rt");
811 if (instr->SaValue() == DIV_OP) {
812 Format(instr, "div 'rd, 'rs, 'rt");
814 Format(instr, "mod 'rd, 'rs, 'rt");
820 Format(instr, "ddiv 'rs, 'rt");
822 if (instr->SaValue() == DIV_OP) {
823 Format(instr, "ddiv 'rd, 'rs, 'rt");
825 Format(instr, "dmod 'rd, 'rs, 'rt");
831 Format(instr, "divu 'rs, 'rt");
833 if (instr->SaValue() == DIV_OP) {
834 Format(instr, "divu 'rd, 'rs, 'rt");
836 Format(instr, "modu 'rd, 'rs, 'rt");
842 Format(instr, "ddivu 'rs, 'rt");
844 if (instr->SaValue() == DIV_OP) {
845 Format(instr, "ddivu 'rd, 'rs, 'rt");
847 Format(instr, "dmodu 'rd, 'rs, 'rt");
852 Format(instr, "add 'rd, 'rs, 'rt");
855 Format(instr, "dadd 'rd, 'rs, 'rt");
858 Format(instr, "addu 'rd, 'rs, 'rt");
861 Format(instr, "daddu 'rd, 'rs, 'rt");
864 Format(instr, "sub 'rd, 'rs, 'rt");
867 Format(instr, "dsub 'rd, 'rs, 'rt");
870 Format(instr, "subu 'rd, 'rs, 'rt");
873 Format(instr, "dsubu 'rd, 'rs, 'rt");
876 Format(instr, "and 'rd, 'rs, 'rt");
879 if (0 == instr->RsValue()) {
880 Format(instr, "mov 'rd, 'rt");
881 } else if (0 == instr->RtValue()) {
882 Format(instr, "mov 'rd, 'rs");
884 Format(instr, "or 'rd, 'rs, 'rt");
888 Format(instr, "xor 'rd, 'rs, 'rt");
891 Format(instr, "nor 'rd, 'rs, 'rt");
894 Format(instr, "slt 'rd, 'rs, 'rt");
897 Format(instr, "sltu 'rd, 'rs, 'rt");
900 return DecodeBreakInstr(instr);
902 Format(instr, "tge 'rs, 'rt, code: 'code");
905 Format(instr, "tgeu 'rs, 'rt, code: 'code");
908 Format(instr, "tlt 'rs, 'rt, code: 'code");
911 Format(instr, "tltu 'rs, 'rt, code: 'code");
914 Format(instr, "teq 'rs, 'rt, code: 'code");
917 Format(instr, "tne 'rs, 'rt, code: 'code");
920 Format(instr, "movz 'rd, 'rs, 'rt");
923 Format(instr, "movn 'rd, 'rs, 'rt");
926 if (instr->Bit(16)) {
927 Format(instr, "movt 'rd, 'rs, 'bc");
929 Format(instr, "movf 'rd, 'rs, 'bc");
933 Format(instr, "seleqz 'rd, 'rs, 'rt");
936 Format(instr, "selnez 'rd, 'rs, 'rt");
943 switch (instr->FunctionFieldRaw()) {
945 Format(instr, "mul 'rd, 'rs, 'rt");
949 Format(instr, "clz 'rd, 'rs");
957 switch (instr->FunctionFieldRaw()) {
959 Format(instr, "ins 'rt, 'rs, 'sa, 'ss2");
963 Format(instr, "ext 'rt, 'rs, 'sa, 'ss1");
977 void Decoder::DecodeTypeImmediate(Instruction* instr) {
978 switch (instr->OpcodeFieldRaw()) {
980 switch (instr->RsFieldRaw()) {
982 if (instr->FBtrueValue()) {
983 Format(instr, "bc1t 'bc, 'imm16u");
985 Format(instr, "bc1f 'bc, 'imm16u");
989 Format(instr, "bc1eqz 'ft, 'imm16u");
992 Format(instr, "bc1nez 'ft, 'imm16u");
995 switch (instr->FunctionValue()) {
997 Format(instr, "cmp.af.S 'ft, 'fs, 'fd");
1000 Format(instr, "cmp.un.S 'ft, 'fs, 'fd");
1003 Format(instr, "cmp.eq.S 'ft, 'fs, 'fd");
1006 Format(instr, "cmp.ueq.S 'ft, 'fs, 'fd");
1009 Format(instr, "cmp.lt.S 'ft, 'fs, 'fd");
1012 Format(instr, "cmp.ult.S 'ft, 'fs, 'fd");
1015 Format(instr, "cmp.le.S 'ft, 'fs, 'fd");
1018 Format(instr, "cmp.ule.S 'ft, 'fs, 'fd");
1021 Format(instr, "cmp.or.S 'ft, 'fs, 'fd");
1024 Format(instr, "cmp.une.S 'ft, 'fs, 'fd");
1027 Format(instr, "cmp.ne.S 'ft, 'fs, 'fd");
1034 switch (instr->FunctionValue()) {
1036 Format(instr, "cmp.af.D 'ft, 'fs, 'fd");
1039 Format(instr, "cmp.un.D 'ft, 'fs, 'fd");
1042 Format(instr, "cmp.eq.D 'ft, 'fs, 'fd");
1045 Format(instr, "cmp.ueq.D 'ft, 'fs, 'fd");
1048 Format(instr, "cmp.lt.D 'ft, 'fs, 'fd");
1051 Format(instr, "cmp.ult.D 'ft, 'fs, 'fd");
1054 Format(instr, "cmp.le.D 'ft, 'fs, 'fd");
1057 Format(instr, "cmp.ule.D 'ft, 'fs, 'fd");
1060 Format(instr, "cmp.or.D 'ft, 'fs, 'fd");
1063 Format(instr, "cmp.une.D 'ft, 'fs, 'fd");
1066 Format(instr, "cmp.ne.D 'ft, 'fs, 'fd");
1073 switch (instr->FunctionValue()) {
1075 Format(instr, "sel.S 'ft, 'fs, 'fd");
1078 Format(instr, "seleqz.S 'ft, 'fs, 'fd");
1081 Format(instr, "selnez.S 'ft, 'fs, 'fd");
1084 Format(instr, "min.S 'ft, 'fs, 'fd");
1087 Format(instr, "mina.S 'ft, 'fs, 'fd");
1090 Format(instr, "max.S 'ft, 'fs, 'fd");
1093 Format(instr, "maxa.S 'ft, 'fs, 'fd");
1100 switch (instr->FunctionValue()) {
1102 Format(instr, "sel.D 'ft, 'fs, 'fd");
1105 Format(instr, "seleqz.D 'ft, 'fs, 'fd");
1108 Format(instr, "selnez.D 'ft, 'fs, 'fd");
1111 Format(instr, "min.D 'ft, 'fs, 'fd");
1114 Format(instr, "mina.D 'ft, 'fs, 'fd");
1117 Format(instr, "max.D 'ft, 'fs, 'fd");
1120 Format(instr, "maxa.D 'ft, 'fs, 'fd");
1133 switch (instr->RtFieldRaw()) {
1135 Format(instr, "bltz 'rs, 'imm16u");
1138 Format(instr, "bltzal 'rs, 'imm16u");
1141 Format(instr, "bgez 'rs, 'imm16u");
1144 Format(instr, "bgezal 'rs, 'imm16u");
1147 Format(instr, "bgezall 'rs, 'imm16u");
1150 Format(instr, "dahi 'rs, 'imm16u");
1153 Format(instr, "dati 'rs, 'imm16u");
1161 Format(instr, "beq 'rs, 'rt, 'imm16u");
1164 Format(instr, "bne 'rs, 'rt, 'imm16u");
1167 if ((instr->RtFieldRaw() == 0)
1168 && (instr->RsFieldRaw() != 0)) {
1169 Format(instr, "blez 'rs, 'imm16u");
1170 } else if ((instr->RtFieldRaw() != instr->RsFieldRaw())
1171 && (instr->RsFieldRaw() != 0) && (instr->RtFieldRaw() != 0)) {
1172 Format(instr, "bgeuc 'rs, 'rt, 'imm16u");
1173 } else if ((instr->RtFieldRaw() == instr->RsFieldRaw())
1174 && (instr->RtFieldRaw() != 0)) {
1175 Format(instr, "bgezalc 'rs, 'imm16u");
1176 } else if ((instr->RsFieldRaw() == 0)
1177 && (instr->RtFieldRaw() != 0)) {
1178 Format(instr, "blezalc 'rs, 'imm16u");
1184 if ((instr->RtFieldRaw() == 0)
1185 && (instr->RsFieldRaw() != 0)) {
1186 Format(instr, "bgtz 'rs, 'imm16u");
1187 } else if ((instr->RtFieldRaw() != instr->RsFieldRaw())
1188 && (instr->RsFieldRaw() != 0) && (instr->RtFieldRaw() != 0)) {
1189 Format(instr, "bltuc 'rs, 'rt, 'imm16u");
1190 } else if ((instr->RtFieldRaw() == instr->RsFieldRaw())
1191 && (instr->RtFieldRaw() != 0)) {
1192 Format(instr, "bltzalc 'rt, 'imm16u");
1193 } else if ((instr->RsFieldRaw() == 0)
1194 && (instr->RtFieldRaw() != 0)) {
1195 Format(instr, "bgtzalc 'rt, 'imm16u");
1201 if ((instr->RtFieldRaw() == instr->RsFieldRaw())
1202 && (instr->RtFieldRaw() != 0)) {
1203 Format(instr, "bgezc 'rt, 'imm16u");
1204 } else if ((instr->RtFieldRaw() != instr->RsFieldRaw())
1205 && (instr->RsFieldRaw() != 0) && (instr->RtFieldRaw() != 0)) {
1206 Format(instr, "bgec 'rs, 'rt, 'imm16u");
1207 } else if ((instr->RsFieldRaw() == 0)
1208 && (instr->RtFieldRaw() != 0)) {
1209 Format(instr, "blezc 'rt, 'imm16u");
1215 if ((instr->RtFieldRaw() == instr->RsFieldRaw())
1216 && (instr->RtFieldRaw() != 0)) {
1217 Format(instr, "bltzc 'rt, 'imm16u");
1218 } else if ((instr->RtFieldRaw() != instr->RsFieldRaw())
1219 && (instr->RsFieldRaw() != 0) && (instr->RtFieldRaw() != 0)) {
1220 Format(instr, "bltc 'rs, 'rt, 'imm16u");
1221 } else if ((instr->RsFieldRaw() == 0)
1222 && (instr->RtFieldRaw() != 0)) {
1223 Format(instr, "bgtzc 'rt, 'imm16u");
1229 if (instr->RsFieldRaw() != 0) {
1230 Format(instr, "beqzc 'rs, 'imm21x");
1234 if (instr->RsFieldRaw() != 0) {
1235 Format(instr, "bnezc 'rs, 'imm21x");
1241 Format(instr, "addi 'rt, 'rs, 'imm16s");
1244 if (instr->RsFieldRaw() >= instr->RtFieldRaw()) {
1245 Format(instr, "bovc 'rs, 'rt, 'imm16s");
1246 } else if (instr->RsFieldRaw() < instr->RtFieldRaw()) {
1247 Format(instr, "beqc 'rs, 'rt, 'imm16s");
1255 Format(instr, "daddi 'rt, 'rs, 'imm16s");
1258 if (instr->RsFieldRaw() >= instr->RtFieldRaw()) {
1259 Format(instr, "bnvc 'rs, 'rt, 'imm16s");
1260 } else if (instr->RsFieldRaw() < instr->RtFieldRaw()) {
1261 Format(instr, "bnec 'rs, 'rt, 'imm16s");
1268 Format(instr, "addiu 'rt, 'rs, 'imm16s");
1271 Format(instr, "daddiu 'rt, 'rs, 'imm16s");
1274 Format(instr, "slti 'rt, 'rs, 'imm16s");
1277 Format(instr, "sltiu 'rt, 'rs, 'imm16u");
1280 Format(instr, "andi 'rt, 'rs, 'imm16x");
1283 Format(instr, "ori 'rt, 'rs, 'imm16x");
1286 Format(instr, "xori 'rt, 'rs, 'imm16x");
1290 Format(instr, "lui 'rt, 'imm16x");
1292 if (instr->RsValue() != 0) {
1293 Format(instr, "aui 'rt, 'imm16x");
1295 Format(instr, "lui 'rt, 'imm16x");
1300 Format(instr, "daui 'rt, 'imm16x");
1304 Format(instr, "lb 'rt, 'imm16s('rs)");
1307 Format(instr, "lh 'rt, 'imm16s('rs)");
1310 Format(instr, "lwl 'rt, 'imm16s('rs)");
1313 Format(instr, "ldl 'rt, 'imm16s('rs)");
1316 Format(instr, "lw 'rt, 'imm16s('rs)");
1319 Format(instr, "lwu 'rt, 'imm16s('rs)");
1322 Format(instr, "ld 'rt, 'imm16s('rs)");
1325 Format(instr, "lbu 'rt, 'imm16s('rs)");
1328 Format(instr, "lhu 'rt, 'imm16s('rs)");
1331 Format(instr, "lwr 'rt, 'imm16s('rs)");
1334 Format(instr, "ldr 'rt, 'imm16s('rs)");
1337 Format(instr, "pref 'rt, 'imm16s('rs)");
1340 Format(instr, "sb 'rt, 'imm16s('rs)");
1343 Format(instr, "sh 'rt, 'imm16s('rs)");
1346 Format(instr, "swl 'rt, 'imm16s('rs)");
1349 Format(instr, "sw 'rt, 'imm16s('rs)");
1352 Format(instr, "sd 'rt, 'imm16s('rs)");
1355 Format(instr, "swr 'rt, 'imm16s('rs)");
1358 Format(instr, "lwc1 'ft, 'imm16s('rs)");
1361 Format(instr, "ldc1 'ft, 'imm16s('rs)");
1364 Format(instr, "swc1 'ft, 'imm16s('rs)");
1367 Format(instr, "sdc1 'ft, 'imm16s('rs)");
1370 printf("a 0x%x \n", instr->OpcodeFieldRaw());
1377 void Decoder::DecodeTypeJump(Instruction* instr) {
1378 switch (instr->OpcodeFieldRaw()) {
1380 Format(instr, "j 'imm26x");
1383 Format(instr, "jal 'imm26x");
1396 Instruction* instr = Instruction::At(instr_ptr);
1400 instr->InstructionBits());
1401 switch (instr->InstructionType()) {
1403 return DecodeTypeRegister(instr);
1406 DecodeTypeImmediate(instr);
1410 DecodeTypeJump(instr);
1414 Format(instr, "UNSUPPORTED");