mips32_dsp.c revision 751c1e6e1657cbafe30baaf36ad9bd011c3a179b
1#include <stdio.h>
2/* Independent tests for each DSP instruction from MIPS32 DSP ASE instruction
3   set */
4
5unsigned int mem[] = {
6   0x121f1e1f, 0, 3, -1,
7   0x232f2e2f, 0x242c2b2b, 0x252a2e2b, 0x262d2d2a,
8   0x3f343f3e, 0x3e353d3c, 0x363a3c3b, 0x3b373b3a,
9   0x454f4e45, 0x4e464d46, 0x474d474c, 0x4a484a4c
10};
11
12void ppMem(unsigned int* _mem, int _len)
13{
14   int i;
15   printf("MEM:\n");
16   for (i = 0; i < _len; i=i+4)
17   {
18      printf("0x%08x, 0x%08x, 0x%08x, 0x%08x\n",
19            _mem[i], _mem[i+1], _mem[i+2], _mem[i+3]);
20   }
21   _mem[0] = 0x121f1e1f;
22   _mem[1] = 0;
23   _mem[2] = 3;
24   _mem[3] = -1;
25   _mem[4] = 0x232f2e2f;
26   _mem[5] = 0x242c2b2b;
27   _mem[6] = 0x252a2e2b;
28   _mem[7] = 0x262d2d2a;
29   _mem[8] = 0x3f343f3e;
30   _mem[9] = 0x3e353d3c;
31   _mem[10] = 0x363a3c3b;
32   _mem[11] = 0x3b373b3a;
33   _mem[12] = 0x454f4e45;
34   _mem[13] = 0x4e464d46;
35   _mem[14] = 0x474d474c;
36   _mem[15] = 0x4a484a4c;
37}
38
39#define TESTDSPINST_RD_RT_DSPC(instruction, RTval, RD, RT) \
40{                                                          \
41   int out = 0xdeadbeef;                                   \
42   int dspCtrl = 0x0;                                      \
43   __asm__ volatile(                                       \
44      ".set dsp; \n\t"                                     \
45      "li $" #RD ", 0 \n\t"                                \
46      "move $" #RT ", %2 \n\t"                             \
47      "wrdsp $zero, 0x3f \n\t"                             \
48      instruction " \n\t"                                  \
49      "move %0, $" #RD " \n\t"                             \
50      "rddsp %1, 0x3f \n\t"                                \
51      : "=&r" (out), "=&r" (dspCtrl)                       \
52      : "r" (RTval)                                        \
53      : #RT, #RD                                           \
54   );                                                      \
55   printf("%s :: rd 0x%08x rt 0x%08x DSPControl 0x%x\n",   \
56         instruction, out, RTval, dspCtrl);                \
57}
58
59#define TESTDSPINST_RD_RT_NODSPC(instruction, RTval, RD, RT) \
60{                                                            \
61   int out = 0xdeadbeef;                                     \
62   __asm__ volatile(                                         \
63      ".set dsp; \n\t"                                       \
64      "li $" #RD ", 0 \n\t"                                  \
65      "move $" #RT ", %1 \n\t"                               \
66      instruction " \n\t"                                    \
67      "move %0, $" #RD " \n\t"                               \
68      : "=&r" (out)                                          \
69      : "r" (RTval)                                          \
70      : #RT, #RD                                             \
71   );                                                        \
72   printf("%s :: rd 0x%08x rt 0x%08x \n",                    \
73         instruction, out, RTval);                           \
74}
75
76#define TESTDSPINST_RD_RS_RT_DSPC(instruction, RSval, RTval, RD, RS, RT) \
77{                                                                        \
78   int out = 0xdeadbeef;                                                 \
79   int dspCtrl = 0x0;                                                    \
80   __asm__ volatile(                                                     \
81      ".set dsp; \n\t"                                                   \
82      "li $" #RD ", 0 \n\t"                                              \
83      "wrdsp $zero, 0x3f \n\t"                                           \
84      "move $" #RS ", %2 \n\t"                                           \
85      "move $" #RT ", %3 \n\t"                                           \
86      instruction " \n\t"                                                \
87      "move %0, $" #RD " \n\t"                                           \
88      "rddsp %1, 0x3f \n\t"                                              \
89      : "=&r" (out), "=&r" (dspCtrl)                                     \
90      : "r" (RSval), "r"(RTval)                                          \
91      : #RD, #RS, #RT                                                    \
92   );                                                                    \
93   printf("%s :: rs 0x%08x rt 0x%08x out 0x%08x DSPCtrl 0x%08x\n",       \
94        instruction, RSval, RTval, out, dspCtrl);                        \
95}
96
97#define TESTDSPINST_BPOSGE32(instruction, RDval, POSval, RD, POSreg) \
98{                                                                    \
99   unsigned int out = 0;                                             \
100   __asm__ volatile(                                                 \
101      ".set dsp; \n\t"                                               \
102      "move $" #POSreg ", %1 \n\t"                                   \
103      "wrdsp $" #POSreg ", 0x3f \n\t"                                \
104      "move $" #RD ", %2 \n\t"                                       \
105      instruction" end"instruction#RDval" \n\t"                      \
106      "nop \n\t"                                                     \
107      "addi $" #RD ", $" #RD", 5 \n\t"                               \
108      "end"instruction#RDval": \n\t"                                 \
109      "addi $" #RD ", $" #RD", 1 \n\t"                               \
110      "move %0, $" #RD " \n\t"                                       \
111      : "=&r" (out)                                                  \
112      : "r" (POSval), "r" (RDval)                                    \
113      : #RD, #POSreg                                                 \
114      );                                                             \
115      printf(instruction" :: %d, POSval: %d\n",                      \
116        out, POSval);                                                \
117}
118
119#define TESTDSPINST_RS_RT_DSPC(instruction, RSval, RTval, RS, RT) \
120{                                                                 \
121   int dspCtrl = 0x0;                                             \
122   __asm__ volatile(                                              \
123      ".set dsp; \n\t"                                            \
124      "wrdsp $zero, 0x3f \n\t"                                    \
125      "move $" #RS ", %1 \n\t"                                    \
126      "move $" #RT ", %2 \n\t"                                    \
127      instruction " \n\t"                                         \
128      "rddsp %0, 0x3f \n\t"                                       \
129      : "=&r" (dspCtrl)                                           \
130      : "r" (RSval), "r"(RTval)                                   \
131      : #RS, #RT                                                  \
132   );                                                             \
133   printf("%s :: rs 0x%08x rt 0x%08x DSPCtrl 0x%08x \n",          \
134        instruction, RSval, RTval, dspCtrl);                      \
135}
136
137#define TESTDSPINST_RD_RS_RT_NODSPC(instruction, RSval, RTval, RD, RS, RT) \
138{                                                                          \
139   int out = 0xdeadbeef;                                                   \
140   __asm__ volatile(                                                       \
141      ".set dsp; \n\t"                                                     \
142      "li $" #RD ", 0 \n\t"                                                \
143      "move $" #RS ", %1 \n\t"                                             \
144      "move $" #RT ", %2 \n\t"                                             \
145      instruction " \n\t"                                                  \
146      "move %0, $" #RD " \n\t"                                             \
147      : "=&r" (out)                                                        \
148      : "r" (RSval), "r"(RTval)                                            \
149      : #RD, #RS, #RT                                                      \
150   );                                                                      \
151   printf("%s :: rs 0x%08x rt 0x%08x out 0x%08x\n",                        \
152        instruction, RSval, RTval, out);                                   \
153}
154
155#define TESTDSPINST_AC_RS_RT_DSPC(instruction, ac, RSval, RTval, HIval, LOval, \
156                                  RS, RT)                                      \
157{                                                                              \
158   int out_hi = 0xdeadbeef;                                                    \
159   int out_lo = 0xdeadbeef;                                                    \
160   int dspCtrl = 0x0;                                                          \
161   __asm__ volatile(                                                           \
162      ".set dsp; \n\t"                                                         \
163      "move $" #RS ", %5 \n\t"                                                 \
164      "move $" #RT ", %6 \n\t"                                                 \
165      "mthi $" #RS", $" ac " \n\t"                                             \
166      "mtlo $" #RT", $" ac " \n\t"                                             \
167      "move $" #RS ", %3 \n\t"                                                 \
168      "move $" #RT ", %4 \n\t"                                                 \
169      "wrdsp $zero, 0x3f \n\t"                                                 \
170      instruction "  \n\t"                                                     \
171      "rddsp %2, 0x3f \n\t"                                                    \
172      "mfhi %0, $" ac " \n\t"                                                  \
173      "mflo %1, $" ac " \n\t"                                                  \
174      : "=&r" (out_hi), "=&r" (out_lo), "=&r" (dspCtrl)                        \
175      : "r" (RSval), "r"(RTval), "r" (HIval), "r"(LOval)                       \
176      : #RS, #RT                                                               \
177   );                                                                          \
178   printf("%s :: rs 0x%08x rt 0x%08x inHI 0x%08x inLO 0x%08x outHI 0x%08x outLO\
179          0x%08x dspCtrl 0x%08x\n",instruction, RSval, RTval, HIval, LOval,    \
180          out_hi, out_lo, dspCtrl);                                            \
181}
182
183#define TESTDSPINST_AC_RS_RT_NODSPC(instruction, ac, RSval, RTval, HIval,      \
184                                    LOval, RS, RT)                             \
185{                                                                              \
186   int out_hi = 0xdeadbeef;                                                    \
187   int out_lo = 0xdeadbeef;                                                    \
188   __asm__ volatile(                                                           \
189      ".set dsp; \n\t"                                                         \
190      "move $" #RS ", %4 \n\t"                                                 \
191      "move $" #RT ", %5 \n\t"                                                 \
192      "mthi $" #RS", $" ac " \n\t"                                             \
193      "mtlo $" #RT", $" ac " \n\t"                                             \
194      "move $" #RS ", %2 \n\t"                                                 \
195      "move $" #RT ", %3 \n\t"                                                 \
196      instruction " \n\t"                                                      \
197      "mfhi %0, $" ac " \n\t"                                                  \
198      "mflo %1, $" ac " \n\t"                                                  \
199      : "=&r" (out_hi), "=&r" (out_lo)                                         \
200      : "r" (RSval), "r"(RTval), "r" (HIval), "r"(LOval)                       \
201      : #RS, #RT                                                               \
202   );                                                                          \
203   printf("%s :: rs 0x%08x rt 0x%08x inHI 0x%08x inLO 0x%08x outHI 0x%08x outLO\
204          0x%08x \n",instruction, RSval, RTval, HIval, LOval, out_hi, out_lo); \
205}
206
207#define TESTDSPINST_EXT(instruction, ac, RT, HIval, LOval, size, pos) \
208{                                                                     \
209   int out = 0xdeadbeef;                                              \
210   int dspCtrl = 0x0;                                                 \
211   __asm__ volatile(                                                  \
212      ".set dsp; \n\t"                                                \
213      "move $" #RT ", %2 \n\t"                                        \
214      "wrdsp $" #RT ", 0x3f \n\t"                                     \
215      "move $" #RT ", %3 \n\t"                                        \
216      "mthi $" #RT", $" ac " \n\t"                                    \
217      "move $" #RT ", %4 \n\t"                                        \
218      "mtlo $" #RT", $" ac " \n\t"                                    \
219      instruction " \n\t"                                             \
220      "rddsp %1, 0x3f \n\t"                                           \
221      "move %0, $" #RT " \n\t"                                        \
222      : "=&r" (out), "=&r" (dspCtrl)                                  \
223      : "r" (pos), "r" (HIval), "r" (LOval)                           \
224      : #RT                                                           \
225   );                                                                 \
226   printf("%s :: rt 0x%08x %s 0x%08x%08x size %2d DSPCtrl 0x%08x\n",  \
227       instruction, out, ac, HIval, LOval, size, dspCtrl);            \
228}
229
230#define TESTDSPINST_EXTV(instruction, ac, RT, HIval, LOval, RS, RSval, pos) \
231{                                                                           \
232   int out = 0xdeadbeef;                                                    \
233   int dspCtrl = 0x0;                                                       \
234   __asm__ volatile(                                                        \
235      ".set dsp; \n\t"                                                      \
236      "move $" #RS ", %5 \n\t"                                              \
237      "move $" #RT ", %2 \n\t"                                              \
238      "wrdsp $" #RT ", 0x3f \n\t"                                           \
239      "move $" #RT ", %3 \n\t"                                              \
240      "mthi $" #RT", $" ac " \n\t"                                          \
241      "move $" #RT ", %4 \n\t"                                              \
242      "mtlo $" #RT", $" ac " \n\t"                                          \
243      instruction " \n\t"                                                   \
244      "rddsp %1, 0x3f \n\t"                                                 \
245      "move %0, $" #RT " \n\t"                                              \
246      : "=&r" (out), "=&r" (dspCtrl)                                        \
247      : "r" (pos), "r" (HIval), "r" (LOval), "r" (RSval)                    \
248      : #RT, #RS                                                            \
249   );                                                                       \
250   printf("%s :: rt 0x%08x %s 0x%08x%08x rs 0x%08x DSPCtrl 0x%08x\n",       \
251          instruction, out, ac, HIval, LOval, RSval, dspCtrl);              \
252}
253
254#define TESTDSPINST_INSV(instruction, RTval, RSval, RT, RS, _pos, _size)       \
255{                                                                              \
256   unsigned int out;                                                           \
257   __asm__ volatile(                                                           \
258      ".set dsp; \n\t"                                                         \
259      "move $" #RS ", %3 \n\t"                                                 \
260      "wrdsp $" #RS ", 0x1 \n\t"                                               \
261      "move $" #RS ", %4 \n\t"                                                 \
262      "wrdsp $" #RS ", 0x2 \n\t"                                               \
263      "move $" #RS", %1 \n\t"                                                  \
264      "move $" #RT", %2 \n\t"                                                  \
265      "insv $" #RT ", $" #RS " \n\t"                                           \
266      "move %0, $" #RT " \n\t"                                                 \
267     : "=&r" (out)                                                             \
268     : "r" (RSval), "r" (RTval), "r" (_pos), "r" (_size)                       \
269     : #RS, #RT                                                                \
270   );                                                                          \
271   printf("insv :: out: 0x%08x rtIN 0x%08x rsIN 0x%08x posI %2d sizeI %2d \n", \
272         out, RTval, RSval, _pos, _size>>7); \
273}
274
275#define TESTDSPINST_LWX(index, RT, RS)                 \
276{                                                      \
277    unsigned int out;                                  \
278   __asm__ volatile(                                   \
279      ".set dsp; \n\t"                                 \
280     "move $" #RS", %1 \n\t"                           \
281     "move $" #RT", %2 \n\t"                           \
282     "lwx %0, $" #RT "($"#RS") \n\t"                   \
283    : "=&r" (out)                                      \
284    : "r" (mem), "r" (index)                           \
285    : #RT, #RS, "memory"                               \
286    );                                                 \
287   printf("lwx :: out: 0x%08x mem[%d]\n", out, index); \
288}
289
290#define TESTDSPINST_LHX(index, RT, RS)                 \
291{                                                      \
292    unsigned int out;                                  \
293   __asm__ volatile(                                   \
294      ".set dsp; \n\t"                                 \
295     "move $" #RS", %1 \n\t"                           \
296     "move $" #RT", %2 \n\t"                           \
297     "lhx %0, $" #RT "($"#RS") \n\t"                   \
298    : "=&r" (out)                                      \
299    : "r" (mem), "r" (index)                           \
300    : #RT, #RS, "memory"                               \
301    );                                                 \
302   printf("lhx :: out: 0x%08x mem[%d]\n", out, index); \
303}
304
305#define TESTDSPINST_LBUX(index, RT, RS)                 \
306{                                                       \
307    unsigned int out;                                   \
308   __asm__ volatile(                                    \
309      ".set dsp; \n\t"                                  \
310     "move $" #RS", %1 \n\t"                            \
311     "move $" #RT", %2 \n\t"                            \
312     "lbux %0, $" #RT "($"#RS") \n\t"                   \
313    : "=&r" (out)                                       \
314    : "r" (mem), "r" (index)                            \
315    : #RT, #RS, "memory"                                \
316    );                                                  \
317   printf("lbux :: out: 0x%08x mem[%d]\n", out, index); \
318}
319
320#define TESTDSPINST_HILO(ac, RSval_hi, RSval_lo)                             \
321{                                                                            \
322   unsigned int HI = 0xdeadbeef;                                             \
323   unsigned int LO = 0xdeadbeef;                                             \
324   __asm__ volatile(                                                         \
325      ".set dsp; \n\t"                                                       \
326      "move $t0, %2 \n\t"                                                    \
327      "move $t1, %3 \n\t"                                                    \
328      "mthi $t0, $" ac " \n\t"                                               \
329      "mtlo $t1, $" ac " \n\t"                                               \
330      "mfhi %0, $" ac " \n\t"                                                \
331      "mflo %1, $" ac " \n\t"                                                \
332     : "=&r" (HI), "=&r" (LO)                                                \
333     : "r" (RSval_hi), "r" (RSval_lo)                                        \
334     : "t0", "t1"                                                            \
335   );                                                                        \
336   printf("rs_hi: 0x%08x rs_lo: 0x%08x %s out HI: 0x%08x, out LO: 0x%08x\n", \
337          RSval_hi, RSval_lo, ac, HI, LO);                                   \
338}
339
340#define TESTDSPINST_MTHLIP(instruction, ac, HIval, LOval, RSval, RS, pos)      \
341{                                                                              \
342   unsigned int outHI;                                                         \
343   unsigned int outLO;                                                         \
344   unsigned int dspCtrl;                                                       \
345   __asm__ volatile(                                                           \
346      ".set dsp; \n\t"                                                         \
347      "move $" #RS ", %3\n\t"                                                  \
348      "mthi $" #RS", $" ac "\n\t"                                              \
349      "move $" #RS ", %4\n\t"                                                  \
350      "mtlo $" #RS", $" ac "\n\t"                                              \
351      "move $" #RS ", %5\n\t"                                                  \
352      "wrdsp $" #RS ", 0x1 \n\t"                                               \
353      "move $" #RS ", %6\n\t"                                                  \
354      instruction "\n\t"                                                       \
355      "mfhi %0, $" ac "\n\t"                                                   \
356      "mflo %1, $" ac "\n\t"                                                   \
357      "rddsp %2, 0x1 \n\t"                                                     \
358     : "=&r" (outHI), "=&r" (outLO), "=&r" (dspCtrl)                           \
359     : "r" (HIval), "r" (LOval), "r" (pos), "r" (RSval)                        \
360     : #RS                                                                     \
361   );                                                                          \
362   printf("mthlip :: acIn: 0x%08x%08x rsIn 0x%08x posIn 0x%08x acOut 0x%08x%08x\
363          posOut 0x%08x\n", HIval, LOval, RSval, pos, outHI, outLO, dspCtrl);  \
364}
365
366#define TESTDSPINST_PICK(instruction, instruction1, RSval, RTval, RD, RS, RT) \
367{                                                                             \
368   int out = 0xdeadbeef;                                                      \
369   int dspCtrl1 = 0x0;                                                        \
370   __asm__ volatile(                                                          \
371      ".set dsp; \n\t"                                                        \
372      "li $" #RD ", 0 \n\t"                                                   \
373      "wrdsp $zero, 0x1f \n\t"                                                \
374      "move $" #RS ", %2 \n\t"                                                \
375      "move $" #RT ", %3 \n\t"                                                \
376      instruction1 " \n\t"                                                    \
377      "rddsp %1, 0x1f \n\t"                                                   \
378      instruction " \n\t"                                                     \
379      "move %0, $" #RD " \n\t"                                                \
380      : "=&r" (out), "=&r" (dspCtrl1)                                         \
381      : "r" (RSval), "r"(RTval)                                               \
382      : #RD, #RS, #RT                                                         \
383   );                                                                         \
384   printf("%s :: %s rs 0x%08x rt 0x%08x out 0x%08x DSPCtrl1 0x%x\n",          \
385          instruction, instruction1, RSval, RTval, out, dspCtrl1);            \
386}
387
388#define TESTDSPINST_RADDU_W_QB(instruction, RSval, RD, RS)                    \
389{                                                                             \
390   int out = 0xdeadbeef;                                                      \
391   __asm__ volatile(                                                          \
392      ".set dsp; \n\t"                                                        \
393      "move $" #RS ", %1 \n\t"                                                \
394      instruction " \n\t"                                                     \
395      "move %0, $" #RD " \n\t"                                                \
396      : "=&r" (out)                                                           \
397      : "r" (RSval)                                                           \
398      : #RD, #RS                                                              \
399   );                                                                         \
400   printf("%s :: out 0x%08x rs 0x%08x\n",                                     \
401        instruction, out, RSval);                                             \
402}
403
404#define TESTDSPINST_RDDSPWRDSP(REGval, mask)                               \
405{                                                                          \
406   int out = 0xdeadbeef;                                                   \
407   __asm__ volatile(                                                       \
408      ".set dsp; \n\t"                                                     \
409      "move $t0, %1 \n\t"                                                  \
410      "wrdsp $t0, " #mask " \n\t"                                          \
411      "rddsp %0, " #mask " \n\t"                                           \
412      : "=&r" (out)                                                        \
413      : "r" (REGval)                                                       \
414      : "t0"                                                               \
415   );                                                                      \
416   printf("outVal 0x%08x inVal 0x%08x mask 0x%08x \n", out, REGval, mask); \
417}
418
419#define TESTDSPINST_RD_IMM_NODSPC(instruction, Imm, RD)           \
420{                                                                 \
421   int out = 0xdeadbeef;                                          \
422   __asm__ volatile(                                              \
423      ".set dsp; \n\t"                                            \
424      "li $" #RD ", 0 \n\t"                                       \
425      instruction " \n\t"                                         \
426      "move %0, $" #RD " \n\t"                                    \
427      : "=&r" (out)                                               \
428      :                                                           \
429      : #RD                                                       \
430   );                                                             \
431   printf("%s :: rd 0x%08x imm 0x%08x\n", instruction, out, Imm); \
432}
433
434#define TESTDSPINST_SHILO(ac, HIval, LOval, shift)                             \
435{                                                                              \
436   int outHI = 0xdeadbeef;                                                     \
437   int outLO = 0xdeadbeef;                                                     \
438   __asm__ volatile(                                                           \
439      ".set dsp; \n\t"                                                         \
440      "move $t0, %2 \n\t"                                                      \
441      "move $t1, %3 \n\t"                                                      \
442      "mthi $t0, $" ac " \n\t"                                                 \
443      "mtlo $t1, $" ac " \n\t"                                                 \
444      "shilo $" ac ", " #shift " \n\t"                                         \
445      "mfhi %0, $" ac " \n\t"                                                  \
446      "mflo %1, $" ac " \n\t"                                                  \
447      : "=&r" (outHI), "=&r" (outLO)                                           \
448      : "r" (HIval), "r" (LOval)                                               \
449      : "t0", "t1"                                                             \
450   );                                                                          \
451   printf("shilo %s, %3d inAcc = 0x%08x%08x outAcc = 0x%08x%08x\n", ac, shift, \
452          HIval, LOval, outHI, outLO);                                         \
453}
454
455#define TESTDSP_SHILOV(ac, HIval, LOval, RSval, RS)                            \
456{                                                                              \
457   int outHI = 0xdeadbeef;                                                     \
458   int outLO = 0xdeadbeef;                                                     \
459   __asm__ volatile(                                                           \
460      ".set dsp; \n\t"                                                         \
461      "move $" #RS ", %2 \n\t"                                                 \
462      "mthi $" #RS ", $" ac " \n\t"                                            \
463      "move $" #RS ", %3 \n\t"                                                 \
464      "mtlo $" #RS ", $" ac " \n\t"                                            \
465      "move $" #RS ", %4 \n\t"                                                 \
466      "shilov $" ac ", $" #RS " \n\t"                                          \
467      "mfhi %0, $" ac " \n\t"                                                  \
468      "mflo %1, $" ac " \n\t"                                                  \
469      : "=&r" (outHI), "=&r" (outLO)                                           \
470      : "r" (HIval), "r" (LOval), "r" (RSval)                                  \
471      : #RS                                                                    \
472   );                                                                          \
473   printf("shilov %s, rs 0x%08x inAcc = 0x%08x%08x outAcc = 0x%08x%08x\n", ac, \
474          RSval, HIval, LOval, outHI, outLO);                                  \
475}
476
477#define TESTDSPINST_RD_RT_SA_DSPC(instruction, RTval, SAval, RD, RT)        \
478{                                                                           \
479   int out = 0xdeadbeef;                                                    \
480   int dspCtrl = 0x0;                                                       \
481   __asm__ volatile(                                                        \
482      ".set dsp; \n\t"                                                      \
483      "li $" #RD ", 0 \n\t"                                                 \
484      "wrdsp $zero, 0x3f \n\t"                                              \
485      "move $" #RT ", %2 \n\t"                                              \
486      instruction " \n\t"                                                   \
487      "rddsp %1, 0x3f \n\t"                                                 \
488      "move %0, $" #RD " \n\t"                                              \
489      : "=&r" (out), "=&r" (dspCtrl)                                        \
490      : "r"(RTval)                                                          \
491      : #RD, #RT                                                            \
492   );                                                                       \
493   printf("%s :: rd 0x%08x rt 0x%08x sa %2d DSPCtrl 0x%08x\n", instruction, \
494          out, RTval, SAval, dspCtrl);                                      \
495}
496
497#define TESTDSPINST_RD_RT_SA_NODSPC(instruction, RTval, SAval, RD, RT)   \
498{                                                                        \
499   int out = 0xdeadbeef;                                                 \
500   __asm__ volatile(                                                     \
501      ".set dsp; \n\t"                                                   \
502      "li $" #RD ", 0 \n\t"                                              \
503      "move $" #RT ", %1 \n\t"                                           \
504      instruction " \n\t"                                                \
505      "move %0, $" #RD " \n\t"                                           \
506      : "=&r" (out)                                                      \
507      : "r"(RTval)                                                       \
508      : #RD, #RT                                                         \
509   );                                                                    \
510   printf("%s :: rd 0x%08x rt 0x%08x sa %2d\n", instruction, out, RTval, \
511          SAval);                                                        \
512}
513
514#define TESTDSPINST_RD_RT_RS_DSPC(instruction, RTval, RSval, RD, RT, RS)       \
515{                                                                              \
516   int out = 0xdeadbeef;                                                       \
517   int dspCtrl = 0x0;                                                          \
518   __asm__ volatile(                                                           \
519      ".set dsp; \n\t"                                                         \
520      "li $" #RD ", 0 \n\t"                                                    \
521      "wrdsp $zero, 0x3f \n\t"                                                 \
522      "move $" #RT ", %2 \n\t"                                                 \
523      "move $" #RS ", %3 \n\t"                                                 \
524      instruction " \n\t"                                                      \
525      "rddsp %1, 0x3f \n\t"                                                    \
526      "move %0, $" #RD " \n\t"                                                 \
527      : "=&r" (out), "=&r" (dspCtrl)                                           \
528      : "r"(RTval), "r"(RSval)                                                 \
529      : #RD, #RT, #RS                                                          \
530   );                                                                          \
531   printf("%s :: rd 0x%08x rt 0x%08x rs 0x%08x DSPCtrl 0x%08x\n", instruction, \
532          out, RTval, RSval, dspCtrl);                                         \
533}
534
535#define TESTDSPINST_RD_RT_RS_NODSPC(instruction, RTval, RSval, RD, RT, RS)  \
536{                                                                           \
537   int out = 0xdeadbeef;                                                    \
538   __asm__ volatile(                                                        \
539      ".set dsp; \n\t"                                                      \
540      "li $" #RD ", 0 \n\t"                                                 \
541      "move $" #RT ", %1 \n\t"                                              \
542      "move $" #RS ", %2 \n\t"                                              \
543      instruction " \n\t"                                                   \
544      "move %0, $" #RD " \n\t"                                              \
545      : "=&r" (out)                                                         \
546      : "r"(RTval), "r"(RSval)                                              \
547      : #RD, #RT, #RS                                                       \
548   );                                                                       \
549   printf("%s :: rd 0x%08x rt 0x%08x rs 0x%08x\n", instruction, out, RTval, \
550          RSval);                                                           \
551}
552
553int main(int argc, char **argv)
554{
555#if (__mips==32) && (__mips_isa_rev>=2)
556   printf("-------- ABSQ_S.PH --------\n");
557   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t1", 0x00000000, t0, t1);
558   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t3", 0x00000286, t2, t3);
559   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t1", 0xfabc2435, t4, t1);
560   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t6, $t7", 0x73468000, t6, t7);
561   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t5, $t3", 0x80000000, t5, t3);
562   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t4", 0xffffffff, t2, t4);
563   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t8", 0xfff45fff, t0, t8);
564   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t4", 0x00000555, t4, t4);
565   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t1", 0x23534870, t0, t1);
566   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t3", 0x0555adec, t2, t3);
567   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t1", 0x980b7cde, t4, t1);
568   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t6, $t7", 0xf973437b, t6, t7);
569   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t5, $t3", 0x93474bde, t5, t3);
570   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t4", 0x55555555, t2, t4);
571   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t8", 0xc4dbfe20, t0, t8);
572   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t4", 0x734680bc, t4, t4);
573   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t1", 0x00354565, t0, t1);
574   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t3", 0xbacabaca, t2, t3);
575   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t1", 0xdecadeca, t4, t1);
576   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t6, $t7", 0x00000286, t6, t7);
577   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t5, $t3", 0xabababab, t5, t3);
578   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t4", 0x00086755, t2, t4);
579   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t8", 0x8f8f8f80, t0, t8);
580   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t4", 0xeeeeeeee, t4, t4);
581   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t1", 0x1bdbdbdb, t0, t1);
582   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t3", 0xdecadeca, t2, t3);
583   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t1", 0x93474bde, t4, t1);
584   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t6, $t7", 0xfabfabfa, t6, t7);
585   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t5, $t3", 0x083b3571, t5, t3);
586   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t4", 0xb9743941, t2, t4);
587   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t8", 0xbc80f924, t0, t8);
588   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t4", 0xcc3c201c, t4, t4);
589   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t1", 0x1ebaf88e, t0, t1);
590   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t3", 0x722d5e20, t2, t3);
591   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t1", 0xa1d6f791, t4, t1);
592   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t6, $t7", 0x7b11bee7, t6, t7);
593   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t5, $t3", 0xa5631488, t5, t3);
594   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t4", 0xb10bcc65, t2, t4);
595   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t8", 0x73f39fca, t0, t8);
596   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t4", 0x80008000, t4, t4);
597   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t0, $t1",     -23456, t0, t1);
598   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t2, $t3",  123498746, t2, t3);
599   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t4, $t1",        -13, t4, t1);
600   TESTDSPINST_RD_RT_DSPC("absq_s.ph $t6, $t7",       -237, t6, t7);
601
602   printf("-------- ABSQ_S.W --------\n");
603   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t1", 0x00000000, t0, t1);
604   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t3", 0x00000286, t2, t3);
605   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t1", 0xfabc2435, t4, t1);
606   TESTDSPINST_RD_RT_DSPC("absq_s.w $t6, $t7", 0x73468000, t6, t7);
607   TESTDSPINST_RD_RT_DSPC("absq_s.w $t5, $t3", 0x80000000, t5, t3);
608   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t4", 0xffffffff, t2, t4);
609   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t8", 0xfff45fff, t0, t8);
610   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t4", 0x00000555, t4, t4);
611   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t1", 0x23534870, t0, t1);
612   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t3", 0x0555adec, t2, t3);
613   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t1", 0x980b7cde, t4, t1);
614   TESTDSPINST_RD_RT_DSPC("absq_s.w $t6, $t7", 0xf973437b, t6, t7);
615   TESTDSPINST_RD_RT_DSPC("absq_s.w $t5, $t3", 0x93474bde, t5, t3);
616   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t4", 0x55555555, t2, t4);
617   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t8", 0xc4dbfe20, t0, t8);
618   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t4", 0x734680bc, t4, t4);
619   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t1", 0x00354565, t0, t1);
620   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t3", 0xbacabaca, t2, t3);
621   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t1", 0xdecadeca, t4, t1);
622   TESTDSPINST_RD_RT_DSPC("absq_s.w $t6, $t7", 0x00000286, t6, t7);
623   TESTDSPINST_RD_RT_DSPC("absq_s.w $t5, $t3", 0xabababab, t5, t3);
624   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t4", 0x00086755, t2, t4);
625   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t8", 0x8f8f8f80, t0, t8);
626   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t4", 0xeeeeeeee, t4, t4);
627   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t1", 0x1bdbdbdb, t0, t1);
628   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t3", 0xdecadeca, t2, t3);
629   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t1", 0x93474bde, t4, t1);
630   TESTDSPINST_RD_RT_DSPC("absq_s.w $t6, $t7", 0xfabfabfa, t6, t7);
631   TESTDSPINST_RD_RT_DSPC("absq_s.w $t5, $t3", 0x083b3571, t5, t3);
632   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t4", 0xb9743941, t2, t4);
633   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t8", 0xbc80f924, t0, t8);
634   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t4", 0xcc3c201c, t4, t4);
635   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t1", 0x1ebaf88e, t0, t1);
636   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t3", 0x722d5e20, t2, t3);
637   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t1", 0xa1d6f791, t4, t1);
638   TESTDSPINST_RD_RT_DSPC("absq_s.w $t6, $t7", 0x7b11bee7, t6, t7);
639   TESTDSPINST_RD_RT_DSPC("absq_s.w $t5, $t3", 0xa5631488, t5, t3);
640   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t4", 0xb10bcc65, t2, t4);
641   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t8", 0x73f39fca, t0, t8);
642   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t4", 0x80000000, t4, t4);
643   TESTDSPINST_RD_RT_DSPC("absq_s.w $t0, $t1",     -23456, t0, t1);
644   TESTDSPINST_RD_RT_DSPC("absq_s.w $t2, $t3",  123498746, t2, t3);
645   TESTDSPINST_RD_RT_DSPC("absq_s.w $t4, $t1",        -13, t4, t1);
646   TESTDSPINST_RD_RT_DSPC("absq_s.w $t6, $t7",       -237, t6, t7);
647
648   printf("-------- ADDQ.PH --------\n");
649   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
650                             t0, t1, t2);
651   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
652                             t2, t3, t4);
653   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t1, $t5", 0x00002435, 0xffff3421,
654                             t4, t1, t5);
655   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
656                             t6, t7, t3);
657   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
658                             t5, t3, t2);
659   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
660                             t2, t4, t8);
661   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
662                             t0, t8, t0);
663   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
664                             t4, t6, t1);
665   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t3, $t4", 0x00000004, 1073741824,
666                             t2, t3, t4);
667   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
668                             t4, t1, t5);
669   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t6, $t7, $t3", 0x76548000, 0x73468000,
670                             t6, t7, t3);
671   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t5, $t3, $t2", 0x80000000, 0x80000000,
672                             t5, t3, t2);
673   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
674                             t2, t4, t8);
675   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
676                             t0, t8, t0);
677   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
678                             t4, t6, t1);
679   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
680                             t0, t1, t2);
681   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
682                             t2, t3, t4);
683   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
684                             t4, t1, t5);
685   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
686                             t6, t7, t3);
687   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
688                             t5, t3, t2);
689   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
690                             t2, t4, t8);
691   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
692                             t0, t8, t0);
693   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
694                             t4, t6, t1);
695   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
696                             t0, t1, t2);
697   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
698                             t2, t3, t4);
699   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
700                             t4, t1, t5);
701   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
702                             t6, t7, t3);
703   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
704                             t5, t3, t2);
705   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
706                             t2, t4, t8);
707   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
708                             t0, t8, t0);
709   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
710                             t4, t6, t1);
711   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
712                             t0, t1, t2);
713   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
714                             t2, t3, t4);
715   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
716                             t4, t1, t5);
717   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
718                             t6, t7, t3);
719   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
720                             t5, t3, t2);
721   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
722                             t2, t4, t8);
723   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
724                             t0, t8, t0);
725   TESTDSPINST_RD_RS_RT_DSPC("addq.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
726                             t4, t6, t1);
727
728   printf("-------- ADDQ_S.PH --------\n");
729   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
730                             t0, t1, t2);
731   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
732                             t2, t3, t4);
733   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t1, $t5", 0x00002435, 0xffff3421,
734                             t4, t1, t5);
735   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
736                             t6, t7, t3);
737   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
738                             t5, t3, t2);
739   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
740                             t2, t4, t8);
741   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
742                             t0, t8, t0);
743   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
744                             t4, t6, t1);
745   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t3, $t4", 0x00000004, 1073741824,
746                             t2, t3, t4);
747   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
748                             t4, t1, t5);
749   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t6, $t7, $t3", 0x76548000, 0x73468000,
750                             t6, t7, t3);
751   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t5, $t3, $t2", 0x80000000, 0x80000000,
752                             t5, t3, t2);
753   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
754                             t2, t4, t8);
755   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
756                             t0, t8, t0);
757   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
758                             t4, t6, t1);
759   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
760                             t0, t1, t2);
761   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
762                             t2, t3, t4);
763   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
764                             t4, t1, t5);
765   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
766                             t6, t7, t3);
767   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
768                             t5, t3, t2);
769   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
770                             t2, t4, t8);
771   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
772                             t0, t8, t0);
773   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
774                             t4, t6, t1);
775   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
776                             t0, t1, t2);
777   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
778                             t2, t3, t4);
779   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
780                             t4, t1, t5);
781   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
782                             t6, t7, t3);
783   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
784                             t5, t3, t2);
785   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
786                             t2, t4, t8);
787   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
788                             t0, t8, t0);
789   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
790                             t4, t6, t1);
791   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
792                             t0, t1, t2);
793   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
794                             t2, t3, t4);
795   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
796                             t4, t1, t5);
797   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
798                             t6, t7, t3);
799   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
800                             t5, t3, t2);
801   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
802                             t2, t4, t8);
803   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
804                             t0, t8, t0);
805   TESTDSPINST_RD_RS_RT_DSPC("addq_s.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
806                             t4, t6, t1);
807
808   printf("-------- ADDQ_S.W --------\n");
809   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t1, $t2", 0x00000000, 0x00000000,
810                             t0, t1, t2);
811   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t3, $t4", 0x00045fb2, 0x00000286,
812                             t2, t3, t4);
813   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t1, $t5", 0x00002435, 0xffff3421,
814                             t4, t1, t5);
815   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
816                             t6, t7, t3);
817   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t5, $t3, $t2", 0xf973437b, 0x80000000,
818                             t5, t3, t2);
819   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
820                             t2, t4, t8);
821   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
822                             t0, t8, t0);
823   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
824                             t4, t6, t1);
825   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t3, $t4", 0x00000004, 1073741824,
826                             t2, t3, t4);
827   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t1, $t5", 0x80002435, 0x80003421,
828                             t4, t1, t5);
829   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t6, $t7, $t3", 0x76548000, 0x73468000,
830                             t6, t7, t3);
831   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t5, $t3, $t2", 0x80000000, 0x80000000,
832                             t5, t3, t2);
833   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
834                             t2, t4, t8);
835   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
836                             t0, t8, t0);
837   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
838                             t4, t6, t1);
839   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t1, $t2", 0x00000000, 0x00000000,
840                             t0, t1, t2);
841   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t3, $t4", 0x80000000, 0x80000000,
842                             t2, t3, t4);
843   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
844                             t4, t1, t5);
845   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t6, $t7, $t3", 0x00000018, 0xffff2435,
846                             t6, t7, t3);
847   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t5, $t3, $t2", 0xbabababa, 0xabababab,
848                             t5, t3, t2);
849   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
850                             t2, t4, t8);
851   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t8, $t0", 0xfbde3976, 0x00000000,
852                             t0, t8, t0);
853   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t6, $t1", 0x23534870, 0x00354565,
854                             t4, t6, t1);
855   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t1, $t2", 0x980b7cde, 0x00086755,
856                             t0, t1, t2);
857   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
858                             t2, t3, t4);
859   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
860                             t4, t1, t5);
861   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
862                             t6, t7, t3);
863   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
864                             t5, t3, t2);
865   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
866                             t2, t4, t8);
867   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
868                             t0, t8, t0);
869   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t6, $t1", 0xffffffff, 0xffffffff,
870                             t4, t6, t1);
871   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
872                             t0, t1, t2);
873   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
874                             t2, t3, t4);
875   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
876                             t4, t1, t5);
877   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
878                             t6, t7, t3);
879   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
880                             t5, t3, t2);
881   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
882                             t2, t4, t8);
883   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
884                             t0, t8, t0);
885   TESTDSPINST_RD_RS_RT_DSPC("addq_s.w $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
886                             t4, t6, t1);
887
888   printf("-------- ADDSC --------\n");
889   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t1, $t2", 0x00000000, 0x00000000,
890                             t0, t1, t2);
891   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t3, $t4", 0x00045fb2, 0x00000286,
892                             t2, t3, t4);
893   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t1, $t5", 0x00002435, 0xffff3421,
894                             t4, t1, t5);
895   TESTDSPINST_RD_RS_RT_DSPC("addsc $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
896                             t6, t7, t3);
897   TESTDSPINST_RD_RS_RT_DSPC("addsc $t5, $t3, $t2", 0xf973437b, 0x80000000,
898                             t5, t3, t2);
899   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t4, $t8", 0x00010001, 0xffffffff,
900                             t2, t4, t8);
901   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
902                             t0, t8, t0);
903   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t6, $t1", 0x0000c420, 0x00000555,
904                             t4, t6, t1);
905   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t3, $t4", 0x00000004, 1073741824,
906                             t2, t3, t4);
907   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t1, $t5", 0x80002435, 0x80003421,
908                             t4, t1, t5);
909   TESTDSPINST_RD_RS_RT_DSPC("addsc $t6, $t7, $t3", 0x76548000, 0x73468000,
910                             t6, t7, t3);
911   TESTDSPINST_RD_RS_RT_DSPC("addsc $t5, $t3, $t2", 0x80000000, 0x80000000,
912                             t5, t3, t2);
913   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t4, $t8", 0x00010001, 0xffffffff,
914                             t2, t4, t8);
915   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
916                             t0, t8, t0);
917   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t6, $t1", 0x0000c420, 0x00000555,
918                             t4, t6, t1);
919   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t1, $t2", 0x00000000, 0x00000000,
920                             t0, t1, t2);
921   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t3, $t4", 0x80000000, 0x80000000,
922                             t2, t3, t4);
923   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
924                             t4, t1, t5);
925   TESTDSPINST_RD_RS_RT_DSPC("addsc $t6, $t7, $t3", 0x00000018, 0xffff2435,
926                             t6, t7, t3);
927   TESTDSPINST_RD_RS_RT_DSPC("addsc $t5, $t3, $t2", 0xbabababa, 0xabababab,
928                             t5, t3, t2);
929   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
930                             t2, t4, t8);
931   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t8, $t0", 0xfbde3976, 0x00000000,
932                             t0, t8, t0);
933   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t6, $t1", 0x23534870, 0x00354565,
934                             t4, t6, t1);
935   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t1, $t2", 0x980b7cde, 0x00086755,
936                             t0, t1, t2);
937   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
938                             t2, t3, t4);
939   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
940                             t4, t1, t5);
941   TESTDSPINST_RD_RS_RT_DSPC("addsc $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
942                             t6, t7, t3);
943   TESTDSPINST_RD_RS_RT_DSPC("addsc $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
944                             t5, t3, t2);
945   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
946                             t2, t4, t8);
947   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
948                             t0, t8, t0);
949   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t6, $t1", 0xffffffff, 0xffffffff,
950                             t4, t6, t1);
951   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
952                             t0, t1, t2);
953   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
954                             t2, t3, t4);
955   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
956                             t4, t1, t5);
957   TESTDSPINST_RD_RS_RT_DSPC("addsc $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
958                             t6, t7, t3);
959   TESTDSPINST_RD_RS_RT_DSPC("addsc $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
960                             t5, t3, t2);
961   TESTDSPINST_RD_RS_RT_DSPC("addsc $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
962                             t2, t4, t8);
963   TESTDSPINST_RD_RS_RT_DSPC("addsc $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
964                             t0, t8, t0);
965   TESTDSPINST_RD_RS_RT_DSPC("addsc $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
966                             t4, t6, t1);
967
968   printf("-------- ADDU.QB --------\n");
969   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
970                             t0, t1, t2);
971   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t3, $t4", 0x00045fb2, 0x00000286,
972                             t2, t3, t4);
973   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t1, $t5", 0x00002435, 0xffff3421,
974                             t4, t1, t5);
975   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
976                             t6, t7, t3);
977   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t5, $t3, $t2", 0xf973437b, 0x80000000,
978                             t5, t3, t2);
979   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t4, $t8", 0x00010001, 0xffffffff,
980                             t2, t4, t8);
981   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
982                             t0, t8, t0);
983   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
984                             t4, t6, t1);
985   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t3, $t4", 0x00000004, 1073741824,
986                             t2, t3, t4);
987   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t1, $t5", 0x80002435, 0x80003421,
988                             t4, t1, t5);
989   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t6, $t7, $t3", 0x76548000, 0x73468000,
990                             t6, t7, t3);
991   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t5, $t3, $t2", 0x80000000, 0x80000000,
992                             t5, t3, t2);
993   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t4, $t8", 0x00010001, 0xffffffff,
994                             t2, t4, t8);
995   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
996                             t0, t8, t0);
997   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
998                             t4, t6, t1);
999   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
1000                             t0, t1, t2);
1001   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t3, $t4", 0x80000000, 0x80000000,
1002                             t2, t3, t4);
1003   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
1004                             t4, t1, t5);
1005   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t6, $t7, $t3", 0x00000018, 0xffff2435,
1006                             t6, t7, t3);
1007   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t5, $t3, $t2", 0xbabababa, 0xabababab,
1008                             t5, t3, t2);
1009   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
1010                             t2, t4, t8);
1011   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t8, $t0", 0xfbde3976, 0x00000000,
1012                             t0, t8, t0);
1013   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t6, $t1", 0x23534870, 0x00354565,
1014                             t4, t6, t1);
1015   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t1, $t2", 0x980b7cde, 0x00086755,
1016                             t0, t1, t2);
1017   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
1018                             t2, t3, t4);
1019   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
1020                             t4, t1, t5);
1021   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
1022                             t6, t7, t3);
1023   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
1024                             t5, t3, t2);
1025   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
1026                             t2, t4, t8);
1027   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
1028                             t0, t8, t0);
1029   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t6, $t1", 0xffffffff, 0xffffffff,
1030                             t4, t6, t1);
1031   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
1032                             t0, t1, t2);
1033   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
1034                             t2, t3, t4);
1035   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
1036                             t4, t1, t5);
1037   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
1038                             t6, t7, t3);
1039   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
1040                             t5, t3, t2);
1041   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
1042                             t2, t4, t8);
1043   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
1044                             t0, t8, t0);
1045   TESTDSPINST_RD_RS_RT_DSPC("addu.qb $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
1046                             t4, t6, t1);
1047
1048   printf("-------- ADDU_S.QB --------\n");
1049   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
1050                             t0, t1, t2);
1051   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t3, $t4", 0x00045fb2, 0x00000286,
1052                             t2, t3, t4);
1053   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t1, $t5", 0x00002435, 0xffff3421,
1054                             t4, t1, t5);
1055   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
1056                             t6, t7, t3);
1057   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t5, $t3, $t2", 0xf973437b, 0x80000000,
1058                             t5, t3, t2);
1059   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t4, $t8", 0x00010001, 0xffffffff,
1060                             t2, t4, t8);
1061   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1062                             t0, t8, t0);
1063   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
1064                             t4, t6, t1);
1065   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t3, $t4", 0x00000004, 1073741824,
1066                             t2, t3, t4);
1067   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t1, $t5", 0x80002435, 0x80003421,
1068                             t4, t1, t5);
1069   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t6, $t7, $t3", 0x76548000, 0x73468000,
1070                             t6, t7, t3);
1071   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t5, $t3, $t2", 0x80000000, 0x80000000,
1072                             t5, t3, t2);
1073   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t4, $t8", 0x00010001, 0xffffffff,
1074                             t2, t4, t8);
1075   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1076                             t0, t8, t0);
1077   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
1078                             t4, t6, t1);
1079   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
1080                             t0, t1, t2);
1081   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t3, $t4", 0x80000000, 0x80000000,
1082                             t2, t3, t4);
1083   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
1084                             t4, t1, t5);
1085   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t6, $t7, $t3", 0x00000018, 0xffff2435,
1086                             t6, t7, t3);
1087   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t5, $t3, $t2", 0xbabababa, 0xabababab,
1088                             t5, t3, t2);
1089   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
1090                             t2, t4, t8);
1091   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t8, $t0", 0xfbde3976, 0x00000000,
1092                             t0, t8, t0);
1093   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t6, $t1", 0x23534870, 0x00354565,
1094                             t4, t6, t1);
1095   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t1, $t2", 0x980b7cde, 0x00086755,
1096                             t0, t1, t2);
1097   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
1098                             t2, t3, t4);
1099   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
1100                             t4, t1, t5);
1101   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
1102                             t6, t7, t3);
1103   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
1104                             t5, t3, t2);
1105   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
1106                             t2, t4, t8);
1107   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
1108                             t0, t8, t0);
1109   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t6, $t1", 0xffffffff, 0xffffffff,
1110                             t4, t6, t1);
1111   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
1112                             t0, t1, t2);
1113   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
1114                             t2, t3, t4);
1115   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
1116                             t4, t1, t5);
1117   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
1118                             t6, t7, t3);
1119   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
1120                             t5, t3, t2);
1121   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
1122                             t2, t4, t8);
1123   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
1124                             t0, t8, t0);
1125   TESTDSPINST_RD_RS_RT_DSPC("addu_s.qb $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
1126                             t4, t6, t1);
1127
1128   printf("-------- ADDWC --------\n");
1129   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t1, $t2", 0x00000000, 0x00000000,
1130                             t0, t1, t2);
1131   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t3, $t4", 0x00045fb2, 0x00000286,
1132                             t2, t3, t4);
1133   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t1, $t5", 0x00002435, 0xffff3421,
1134                             t4, t1, t5);
1135   TESTDSPINST_RD_RS_RT_DSPC("addwc $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
1136                             t6, t7, t3);
1137   TESTDSPINST_RD_RS_RT_DSPC("addwc $t5, $t3, $t2", 0xf973437b, 0x80000000,
1138                             t5, t3, t2);
1139   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t4, $t8", 0x00010001, 0xffffffff,
1140                             t2, t4, t8);
1141   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1142                             t0, t8, t0);
1143   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t6, $t1", 0x0000c420, 0x00000555,
1144                             t4, t6, t1);
1145   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t3, $t4", 0x00000004, 1073741824,
1146                             t2, t3, t4);
1147   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t1, $t5", 0x80002435, 0x80003421,
1148                             t4, t1, t5);
1149   TESTDSPINST_RD_RS_RT_DSPC("addwc $t6, $t7, $t3", 0x76548000, 0x73468000,
1150                             t6, t7, t3);
1151   TESTDSPINST_RD_RS_RT_DSPC("addwc $t5, $t3, $t2", 0x80000000, 0x80000000,
1152                             t5, t3, t2);
1153   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t4, $t8", 0x00010001, 0xffffffff,
1154                             t2, t4, t8);
1155   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1156                             t0, t8, t0);
1157   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t6, $t1", 0x0000c420, 0x00000555,
1158                             t4, t6, t1);
1159   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t1, $t2", 0x00000000, 0x00000000,
1160                             t0, t1, t2);
1161   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t3, $t4", 0x80000000, 0x80000000,
1162                             t2, t3, t4);
1163   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
1164                             t4, t1, t5);
1165   TESTDSPINST_RD_RS_RT_DSPC("addwc $t6, $t7, $t3", 0x00000018, 0xffff2435,
1166                             t6, t7, t3);
1167   TESTDSPINST_RD_RS_RT_DSPC("addwc $t5, $t3, $t2", 0xbabababa, 0xabababab,
1168                             t5, t3, t2);
1169   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
1170                             t2, t4, t8);
1171   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t8, $t0", 0xfbde3976, 0x00000000,
1172                             t0, t8, t0);
1173   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t6, $t1", 0x23534870, 0x00354565,
1174                             t4, t6, t1);
1175   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t1, $t2", 0x980b7cde, 0x00086755,
1176                             t0, t1, t2);
1177   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
1178                             t2, t3, t4);
1179   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
1180                             t4, t1, t5);
1181   TESTDSPINST_RD_RS_RT_DSPC("addwc $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
1182                             t6, t7, t3);
1183   TESTDSPINST_RD_RS_RT_DSPC("addwc $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
1184                             t5, t3, t2);
1185   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
1186                             t2, t4, t8);
1187   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
1188                             t0, t8, t0);
1189   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t6, $t1", 0xffffffff, 0xffffffff,
1190                             t4, t6, t1);
1191   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
1192                             t0, t1, t2);
1193   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
1194                             t2, t3, t4);
1195   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
1196                             t4, t1, t5);
1197   TESTDSPINST_RD_RS_RT_DSPC("addwc $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
1198                             t6, t7, t3);
1199   TESTDSPINST_RD_RS_RT_DSPC("addwc $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
1200                             t5, t3, t2);
1201   TESTDSPINST_RD_RS_RT_DSPC("addwc $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
1202                             t2, t4, t8);
1203   TESTDSPINST_RD_RS_RT_DSPC("addwc $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
1204                             t0, t8, t0);
1205   TESTDSPINST_RD_RS_RT_DSPC("addwc $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
1206                             t4, t6, t1);
1207
1208   printf("-------- BITREV --------\n");
1209   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t1", 0x00000000, t0, t1);
1210   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t3", 0x80003286, t2, t3);
1211   TESTDSPINST_RD_RT_NODSPC("bitrev $t4, $t1", 0xfabc2435, t4, t1);
1212   TESTDSPINST_RD_RT_NODSPC("bitrev $t6, $t7", 0x73468000, t6, t7);
1213   TESTDSPINST_RD_RT_NODSPC("bitrev $t5, $t3", 0x80000000, t5, t3);
1214   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0xffffffff, t2, t4);
1215   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t8", 0xfff45fff, t0, t8);
1216   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0x00000555, t2, t4);
1217   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t1", 0x00000000, t0, t1);
1218   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t3", 0x80000000, t2, t3);
1219   TESTDSPINST_RD_RT_NODSPC("bitrev $t4, $t1", 0x55555555, t4, t1);
1220   TESTDSPINST_RD_RT_NODSPC("bitrev $t6, $t7", 0xffff2435, t6, t7);
1221   TESTDSPINST_RD_RT_NODSPC("bitrev $t5, $t3", 0xabababab, t5, t3);
1222   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0xfc79b4d2, t2, t4);
1223   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t8", 0x00000000, t0, t8);
1224   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0x00354565, t2, t4);
1225   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t1", 0x00086755, t0, t1);
1226   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t3", 0x8f8f8f8f, t2, t3);
1227   TESTDSPINST_RD_RT_NODSPC("bitrev $t4, $t1", 0xeeeeeeee, t4, t1);
1228   TESTDSPINST_RD_RT_NODSPC("bitrev $t6, $t7", 0x1bdbdbdb, t6, t7);
1229   TESTDSPINST_RD_RT_NODSPC("bitrev $t5, $t3", 0xdecadeca, t5, t3);
1230   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0x93474bde, t2, t4);
1231   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t8", 0xfc0007ff, t0, t8);
1232   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0xffffffff, t2, t4);
1233   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t1", 0xcb4ab48f, t0, t1);
1234   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t3", 0xaf8f7e18, t2, t3);
1235   TESTDSPINST_RD_RT_NODSPC("bitrev $t4, $t1", 0x87df4510, t4, t1);
1236   TESTDSPINST_RD_RT_NODSPC("bitrev $t6, $t7", 0xabf4e8e1, t6, t7);
1237   TESTDSPINST_RD_RT_NODSPC("bitrev $t5, $t3", 0xf4c0eeac, t5, t3);
1238   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0x006a54f2, t2, t4);
1239   TESTDSPINST_RD_RT_NODSPC("bitrev $t0, $t8", 0x79f74493, t0, t8);
1240   TESTDSPINST_RD_RT_NODSPC("bitrev $t2, $t4", 0x9c09e313, t2, t4);
1241
1242   printf("-------- BPOSGE32 --------\n");
1243   TESTDSPINST_BPOSGE32("bposge32", 0, 0, v0, t1);
1244   TESTDSPINST_BPOSGE32("bposge32", 1, 1, v1, t0);
1245   TESTDSPINST_BPOSGE32("bposge32", 2, 32, a0, t1);
1246   TESTDSPINST_BPOSGE32("bposge32", 3, 17, a1, t2);
1247   TESTDSPINST_BPOSGE32("bposge32", 4, 8, a2, t0);
1248   TESTDSPINST_BPOSGE32("bposge32", 5, 60, a3, t0);
1249   TESTDSPINST_BPOSGE32("bposge32", 6, 0x5, t0, t1);
1250   TESTDSPINST_BPOSGE32("bposge32", 7, -3, t1, t2);
1251   TESTDSPINST_BPOSGE32("bposge32", 8, 125, t2, t3);
1252   TESTDSPINST_BPOSGE32("bposge32", 9, 7, t3, t4);
1253   TESTDSPINST_BPOSGE32("bposge32", 10, 42, t4, t5);
1254   TESTDSPINST_BPOSGE32("bposge32", 11, 53, t5, t6);
1255   TESTDSPINST_BPOSGE32("bposge32", 12, 99, t6, t7);
1256   TESTDSPINST_BPOSGE32("bposge32", 13, 12, s0, t1);
1257   TESTDSPINST_BPOSGE32("bposge32", 14, 4, v0, t9);
1258   TESTDSPINST_BPOSGE32("bposge32", 15, 6, t9, t8);
1259
1260   printf("-------- CMP.EQ.PH --------\n");
1261   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t1", 0x00000000, 0x0fffffff, t0, t1);
1262   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t3", 0x00045fb2, 0x00000286, t2, t3);
1263   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t1", 0xfabc2435, 0xfabc3421, t4, t1);
1264   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t6, $t7", 0x07654cb8, 0x73464cb8, t6, t7);
1265   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t5, $t3", 0xf973437b, 0x80000000, t5, t3);
1266   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t4", 0x00010001, 0xffffffff, t2, t4);
1267   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t8", 0x7fff7fff, 0x7fff7fff, t0, t8);
1268   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t6", 0x0000c420, 0x00000555, t4, t6);
1269   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t1", 0x00000000, 0x00000000, t0, t1);
1270   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t3", 0x80000000, 0x80000000, t2, t3);
1271   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t1", 0xaaaaaaaa, 0x55555555, t4, t1);
1272   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t6, $t7", 0x00000018, 0xffff2435, t6, t7);
1273   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t5, $t3", 0xbabababa, 0xabababab, t5, t3);
1274   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t4", 0xf0f0f0f0, 0xfc79b4d2, t2, t4);
1275   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t8", 0xfbde3976, 0x00000000, t0, t8);
1276   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t6", 0x23534870, 0x00354565, t4, t6);
1277   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t1", 0x980b7cde, 0x00086755, t0, t1);
1278   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t3", 0x00000018, 0x8f8f8f8f, t2, t3);
1279   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t1", 0x92784656, 0xeeeeeeee, t4, t1);
1280   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t6, $t7", 0xcacacaca, 0x1bdbdbdb, t6, t7);
1281   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t5, $t3", 0xbacabaca, 0xdecadeca, t5, t3);
1282   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t4", 0x12fadeb4, 0x93474bde, t2, t4);
1283   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t8", 0x7c000790, 0xfc0007ff, t0, t8);
1284   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t6", 0xffffffff, 0xffffffff, t4, t6);
1285   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t1", 0xf2f4df1f, 0xcb4ab48f, t0, t1);
1286   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t3", 0x435f909a, 0xaf8f7e18, t2, t3);
1287   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t1", 0x2106ba5f, 0x87df4510, t4, t1);
1288   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t6, $t7", 0x246a6376, 0xabf4e8e1, t6, t7);
1289   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t5, $t3", 0x1046a1a3, 0xf4c0eeac, t5, t3);
1290   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t2, $t4", 0x638ca515, 0x006a54f2, t2, t4);
1291   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t0, $t8", 0xf63e7a9d, 0x79f74493, t0, t8);
1292   TESTDSPINST_RS_RT_DSPC("cmp.eq.ph $t4, $t6", 0xbd6845cd, 0x9c09e313, t4, t6);
1293
1294   printf("-------- CMP.LT.PH --------\n");
1295   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t1", 0x00000000, 0x0fffffff, t0, t1);
1296   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t3", 0x00045fb2, 0x00000286, t2, t3);
1297   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t1", 0xfabc2435, 0xfabc3421, t4, t1);
1298   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t6, $t7", 0x07654cb8, 0x73464cb8, t6, t7);
1299   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t5, $t3", 0xf973437b, 0x80000000, t5, t3);
1300   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t4", 0x00010001, 0xffffffff, t2, t4);
1301   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t8", 0x7fff7fff, 0x7fff7fff, t0, t8);
1302   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t6", 0x0000c420, 0x00000555, t4, t6);
1303   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t1", 0x00000000, 0x00000000, t0, t1);
1304   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t3", 0x80000000, 0x80000000, t2, t3);
1305   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t1", 0xaaaaaaaa, 0x55555555, t4, t1);
1306   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t6, $t7", 0x00000018, 0xffff2435, t6, t7);
1307   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t5, $t3", 0xbabababa, 0xabababab, t5, t3);
1308   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t4", 0xf0f0f0f0, 0xfc79b4d2, t2, t4);
1309   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t8", 0xfbde3976, 0x00000000, t0, t8);
1310   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t6", 0x23534870, 0x00354565, t4, t6);
1311   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t1", 0x980b7cde, 0x00086755, t0, t1);
1312   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t3", 0x00000018, 0x8f8f8f8f, t2, t3);
1313   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t1", 0x92784656, 0xeeeeeeee, t4, t1);
1314   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t6, $t7", 0xcacacaca, 0x1bdbdbdb, t6, t7);
1315   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t5, $t3", 0xbacabaca, 0xdecadeca, t5, t3);
1316   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t4", 0x12fadeb4, 0x93474bde, t2, t4);
1317   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t8", 0x7c000790, 0xfc0007ff, t0, t8);
1318   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t6", 0xffffffff, 0xffffffff, t4, t6);
1319   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t1", 0xf2f4df1f, 0xcb4ab48f, t0, t1);
1320   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t3", 0x435f909a, 0xaf8f7e18, t2, t3);
1321   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t1", 0x2106ba5f, 0x87df4510, t4, t1);
1322   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t6, $t7", 0x246a6376, 0xabf4e8e1, t6, t7);
1323   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t5, $t3", 0x1046a1a3, 0xf4c0eeac, t5, t3);
1324   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t2, $t4", 0x638ca515, 0x006a54f2, t2, t4);
1325   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t0, $t8", 0xf63e7a9d, 0x79f74493, t0, t8);
1326   TESTDSPINST_RS_RT_DSPC("cmp.lt.ph $t4, $t6", 0xbd6845cd, 0x9c09e313, t4, t6);
1327
1328   printf("-------- CMP.LE.PH --------\n");
1329   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t1", 0x00000000, 0x0fffffff, t0, t1);
1330   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t3", 0x00045fb2, 0x00000286, t2, t3);
1331   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t1", 0xfabc2435, 0xfabc3421, t4, t1);
1332   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t6, $t7", 0x07654cb8, 0x73464cb8, t6, t7);
1333   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t5, $t3", 0xf973437b, 0x80000000, t5, t3);
1334   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t4", 0x00010001, 0xffffffff, t2, t4);
1335   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t8", 0x7fff7fff, 0x7fff7fff, t0, t8);
1336   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t6", 0x0000c420, 0x00000555, t4, t6);
1337   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t1", 0x00000000, 0x00000000, t0, t1);
1338   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t3", 0x80000000, 0x80000000, t2, t3);
1339   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t1", 0xaaaaaaaa, 0x55555555, t4, t1);
1340   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t6, $t7", 0x00000018, 0xffff2435, t6, t7);
1341   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t5, $t3", 0xbabababa, 0xabababab, t5, t3);
1342   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t4", 0xf0f0f0f0, 0xfc79b4d2, t2, t4);
1343   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t8", 0xfbde3976, 0x00000000, t0, t8);
1344   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t6", 0x23534870, 0x00354565, t4, t6);
1345   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t1", 0x980b7cde, 0x00086755, t0, t1);
1346   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t3", 0x00000018, 0x8f8f8f8f, t2, t3);
1347   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t1", 0x92784656, 0xeeeeeeee, t4, t1);
1348   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t6, $t7", 0xcacacaca, 0x1bdbdbdb, t6, t7);
1349   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t5, $t3", 0xbacabaca, 0xdecadeca, t5, t3);
1350   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t4", 0x12fadeb4, 0x93474bde, t2, t4);
1351   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t8", 0x7c000790, 0xfc0007ff, t0, t8);
1352   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t6", 0xffffffff, 0xffffffff, t4, t6);
1353   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t1", 0xf2f4df1f, 0xcb4ab48f, t0, t1);
1354   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t3", 0x435f909a, 0xaf8f7e18, t2, t3);
1355   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t1", 0x2106ba5f, 0x87df4510, t4, t1);
1356   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t6, $t7", 0x246a6376, 0xabf4e8e1, t6, t7);
1357   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t5, $t3", 0x1046a1a3, 0xf4c0eeac, t5, t3);
1358   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t2, $t4", 0x638ca515, 0x006a54f2, t2, t4);
1359   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t0, $t8", 0xf63e7a9d, 0x79f74493, t0, t8);
1360   TESTDSPINST_RS_RT_DSPC("cmp.le.ph $t4, $t6", 0xbd6845cd, 0x9c09e313, t4, t6);
1361
1362   printf("-------- CMPGU.EQ.QB --------\n");
1363   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t1, $t2", 0x00000000,
1364                               0x00000000, t0, t1, t2);
1365   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t3, $t4", 0x00045fb2,
1366                               0x00000286, t2, t3, t4);
1367   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t1, $t5", 0x00002435,
1368                               0xffff3421, t4, t1, t5);
1369   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t6, $t7, $t3", 0x07654cb8,
1370                               0x734680bc, t6, t7, t3);
1371   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t5, $t3, $t2", 0xf973437b,
1372                               0x80000000, t5, t3, t2);
1373   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t4, $t8", 0x00010001,
1374                               0xffffffff, t2, t4, t8);
1375   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t8, $t0", 0x7fff7fff,
1376                               0x7fff7fff, t0, t8, t0);
1377   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t6, $t1", 0x0000c420,
1378                               0x00000555, t4, t6, t1);
1379   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t3, $t4", 0x00000004,
1380                               1073741824, t2, t3, t4);
1381   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t1, $t5", 0x80002435,
1382                               0x80003421, t4, t1, t5);
1383   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t6, $t7, $t3", 0x76548000,
1384                               0x73468000, t6, t7, t3);
1385   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t5, $t3, $t2", 0x80000000,
1386                               0x80000000, t5, t3, t2);
1387   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t4, $t8", 0x00010001,
1388                               0xffffffff, t2, t4, t8);
1389   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t8, $t0", 0x7fff7fff,
1390                               0x7fff7fff, t0, t8, t0);
1391   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t6, $t1", 0x0000c420,
1392                               0x00000555, t4, t6, t1);
1393   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t1, $t2", 0x00000000,
1394                               0x00000000, t0, t1, t2);
1395   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t3, $t4", 0x80000000,
1396                               0x80000000, t2, t3, t4);
1397   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t1, $t5", 0xaaaaaaaa,
1398                               0x55555555, t4, t1, t5);
1399   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t6, $t7, $t3", 0x00000018,
1400                               0xffff2435, t6, t7, t3);
1401   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t5, $t3, $t2", 0xbabababa,
1402                               0xabababab, t5, t3, t2);
1403   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t4, $t8", 0xf0f0f0f0,
1404                               0xfc79b4d2, t2, t4, t8);
1405   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t8, $t0", 0xfbde3976,
1406                               0x00000000, t0, t8, t0);
1407   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t6, $t1", 0x23534870,
1408                               0x00354565, t4, t6, t1);
1409   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t1, $t2", 0x980b7cde,
1410                               0x00086755, t0, t1, t2);
1411   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t3, $t4", 0x00000018,
1412                               0x8f8f8f8f, t2, t3, t4);
1413   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t1, $t5", 0x92784656,
1414                               0xeeeeeeee, t4, t1, t5);
1415   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t6, $t7, $t3", 0xcacacaca,
1416                               0x1bdbdbdb, t6, t7, t3);
1417   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t5, $t3, $t2", 0xbacabaca,
1418                               0xdecadeca, t5, t3, t2);
1419   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t4, $t8", 0x12fadeb4,
1420                               0x93474bde, t2, t4, t8);
1421   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t8, $t0", 0x7c000790,
1422                               0xfc0007ff, t0, t8, t0);
1423   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t6, $t1", 0xffffffff,
1424                               0xffffffff, t4, t6, t1);
1425   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t1, $t2", 0xf2f4df1f,
1426                               0xcb4ab48f, t0, t1, t2);
1427   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t3, $t4", 0x435f909a,
1428                               0xaf8f7e18, t2, t3, t4);
1429   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t1, $t5", 0x2106ba5f,
1430                               0x87df4510, t4, t1, t5);
1431   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t6, $t7, $t3", 0x246a6376,
1432                               0xabf4e8e1, t6, t7, t3);
1433   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t5, $t3, $t2", 0x1046a1a3,
1434                               0xf4c0eeac, t5, t3, t2);
1435   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t2, $t4, $t8", 0x638ca515,
1436                               0x006a54f2, t2, t4, t8);
1437   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t0, $t8, $t0", 0xf63e7a9d,
1438                               0x79f74493, t0, t8, t0);
1439   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.eq.qb $t4, $t6, $t1", 0xbd6845cd,
1440                               0x9c09e313, t4, t6, t1);
1441
1442   printf("-------- CMPGU.LT.QB --------\n");
1443   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t1, $t2", 0x00000000,
1444                               0x00000000, t0, t1, t2);
1445   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t3, $t4", 0x00045fb2,
1446                               0x00000286, t2, t3, t4);
1447   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t1, $t5", 0x00002435,
1448                               0xffff3421, t4, t1, t5);
1449   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t6, $t7, $t3", 0x07654cb8,
1450                               0x734680bc, t6, t7, t3);
1451   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t5, $t3, $t2", 0xf973437b,
1452                               0x80000000, t5, t3, t2);
1453   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t4, $t8", 0x00010001,
1454                               0xffffffff, t2, t4, t8);
1455   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t8, $t0", 0x7fff7fff,
1456                               0x7fff7fff, t0, t8, t0);
1457   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t6, $t1", 0x0000c420,
1458                               0x00000555, t4, t6, t1);
1459   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t3, $t4", 0x00000004,
1460                               1073741824, t2, t3, t4);
1461   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t1, $t5", 0x80002435,
1462                               0x80003421, t4, t1, t5);
1463   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t6, $t7, $t3", 0x76548000,
1464                               0x73468000, t6, t7, t3);
1465   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t5, $t3, $t2", 0x80000000,
1466                               0x80000000, t5, t3, t2);
1467   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t4, $t8", 0x00010001,
1468                               0xffffffff, t2, t4, t8);
1469   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t8, $t0", 0x7fff7fff,
1470                               0x7fff7fff, t0, t8, t0);
1471   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t6, $t1", 0x0000c420,
1472                               0x00000555, t4, t6, t1);
1473   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t1, $t2", 0x00000000,
1474                               0x00000000, t0, t1, t2);
1475   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t3, $t4", 0x80000000,
1476                               0x80000000, t2, t3, t4);
1477   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t1, $t5", 0xaaaaaaaa,
1478                               0x55555555, t4, t1, t5);
1479   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t6, $t7, $t3", 0x00000018,
1480                               0xffff2435, t6, t7, t3);
1481   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t5, $t3, $t2", 0xbabababa,
1482                               0xabababab, t5, t3, t2);
1483   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t4, $t8", 0xf0f0f0f0,
1484                               0xfc79b4d2, t2, t4, t8);
1485   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t8, $t0", 0xfbde3976,
1486                               0x00000000, t0, t8, t0);
1487   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t6, $t1", 0x23534870,
1488                               0x00354565, t4, t6, t1);
1489   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t1, $t2", 0x980b7cde,
1490                               0x00086755, t0, t1, t2);
1491   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t3, $t4", 0x00000018,
1492                               0x8f8f8f8f, t2, t3, t4);
1493   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t1, $t5", 0x92784656,
1494                               0xeeeeeeee, t4, t1, t5);
1495   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t6, $t7, $t3", 0xcacacaca,
1496                               0x1bdbdbdb, t6, t7, t3);
1497   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t5, $t3, $t2", 0xbacabaca,
1498                               0xdecadeca, t5, t3, t2);
1499   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t4, $t8", 0x12fadeb4,
1500                               0x93474bde, t2, t4, t8);
1501   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t8, $t0", 0x7c000790,
1502                               0xfc0007ff, t0, t8, t0);
1503   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t6, $t1", 0xffffffff,
1504                               0xffffffff, t4, t6, t1);
1505   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t1, $t2", 0xf2f4df1f,
1506                               0xcb4ab48f, t0, t1, t2);
1507   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t3, $t4", 0x435f909a,
1508                               0xaf8f7e18, t2, t3, t4);
1509   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t1, $t5", 0x2106ba5f,
1510                               0x87df4510, t4, t1, t5);
1511   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t6, $t7, $t3", 0x246a6376,
1512                               0xabf4e8e1, t6, t7, t3);
1513   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t5, $t3, $t2", 0x1046a1a3,
1514                               0xf4c0eeac, t5, t3, t2);
1515   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t2, $t4, $t8", 0x638ca515,
1516                               0x006a54f2, t2, t4, t8);
1517   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t0, $t8, $t0", 0xf63e7a9d,
1518                               0x79f74493, t0, t8, t0);
1519   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.lt.qb $t4, $t6, $t1", 0xbd6845cd,
1520                               0x9c09e313, t4, t6, t1);
1521
1522   printf("-------- CMPGU.LE.QB --------\n");
1523   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t1, $t2", 0x00000000,
1524                               0x00000000, t0, t1, t2);
1525   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t3, $t4", 0x00045fb2,
1526                               0x00000286, t2, t3, t4);
1527   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t1, $t5", 0x00002435,
1528                               0xffff3421, t4, t1, t5);
1529   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t6, $t7, $t3", 0x07654cb8,
1530                               0x734680bc, t6, t7, t3);
1531   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t5, $t3, $t2", 0xf973437b,
1532                               0x80000000, t5, t3, t2);
1533   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t4, $t8", 0x00010001,
1534                               0xffffffff, t2, t4, t8);
1535   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t8, $t0", 0x7fff7fff,
1536                               0x7fff7fff, t0, t8, t0);
1537   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t6, $t1", 0x0000c420,
1538                               0x00000555, t4, t6, t1);
1539   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t3, $t4", 0x00000004,
1540                               1073741824, t2, t3, t4);
1541   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t1, $t5", 0x80002435,
1542                               0x80003421, t4, t1, t5);
1543   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t6, $t7, $t3", 0x76548000,
1544                               0x73468000, t6, t7, t3);
1545   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t5, $t3, $t2", 0x80000000,
1546                               0x80000000, t5, t3, t2);
1547   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t4, $t8", 0x00010001,
1548                               0xffffffff, t2, t4, t8);
1549   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t8, $t0", 0x7fff7fff,
1550                               0x7fff7fff, t0, t8, t0);
1551   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t6, $t1", 0x0000c420,
1552                               0x00000555, t4, t6, t1);
1553   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t1, $t2", 0x00000000,
1554                               0x00000000, t0, t1, t2);
1555   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t3, $t4", 0x80000000,
1556                               0x80000000, t2, t3, t4);
1557   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t1, $t5", 0xaaaaaaaa,
1558                               0x55555555, t4, t1, t5);
1559   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t6, $t7, $t3", 0x00000018,
1560                               0xffff2435, t6, t7, t3);
1561   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t5, $t3, $t2", 0xbabababa,
1562                               0xabababab, t5, t3, t2);
1563   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t4, $t8", 0xf0f0f0f0,
1564                               0xfc79b4d2, t2, t4, t8);
1565   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t8, $t0", 0xfbde3976,
1566                               0x00000000, t0, t8, t0);
1567   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t6, $t1", 0x23534870,
1568                               0x00354565, t4, t6, t1);
1569   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t1, $t2", 0x980b7cde,
1570                               0x00086755, t0, t1, t2);
1571   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t3, $t4", 0x00000018,
1572                               0x8f8f8f8f, t2, t3, t4);
1573   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t1, $t5", 0x92784656,
1574                               0xeeeeeeee, t4, t1, t5);
1575   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t6, $t7, $t3", 0xcacacaca,
1576                               0x1bdbdbdb, t6, t7, t3);
1577   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t5, $t3, $t2", 0xbacabaca,
1578                               0xdecadeca, t5, t3, t2);
1579   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t4, $t8", 0x12fadeb4,
1580                               0x93474bde, t2, t4, t8);
1581   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t8, $t0", 0x7c000790,
1582                               0xfc0007ff, t0, t8, t0);
1583   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t6, $t1", 0xffffffff,
1584                               0xffffffff, t4, t6, t1);
1585   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t1, $t2", 0xf2f4df1f,
1586                               0xcb4ab48f, t0, t1, t2);
1587   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t3, $t4", 0x435f909a,
1588                               0xaf8f7e18, t2, t3, t4);
1589   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t1, $t5", 0x2106ba5f,
1590                               0x87df4510, t4, t1, t5);
1591   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t6, $t7, $t3", 0x246a6376,
1592                               0xabf4e8e1, t6, t7, t3);
1593   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t5, $t3, $t2", 0x1046a1a3,
1594                               0xf4c0eeac, t5, t3, t2);
1595   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t2, $t4, $t8", 0x638ca515,
1596                               0x006a54f2, t2, t4, t8);
1597   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t0, $t8, $t0", 0xf63e7a9d,
1598                               0x79f74493, t0, t8, t0);
1599   TESTDSPINST_RD_RS_RT_NODSPC("cmpgu.le.qb $t4, $t6, $t1", 0xbd6845cd,
1600                               0x9c09e313, t4, t6, t1);
1601
1602   printf("-------- CMPU.EQ.QB --------\n");
1603   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t1", 0x00000000, 0x0fffffff, t0,
1604                          t1);
1605   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t3", 0x00005fb2, 0x00000286, t2,
1606                          t3);
1607   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t1", 0xfabc2435, 0xfabc3421, t4,
1608                          t1);
1609   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t6, $t7", 0x07654cb8, 0x73464cb8, t6,
1610                          t7);
1611   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t5, $t3", 0xf973437b, 0x80734300, t5,
1612                          t3);
1613   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t4", 0x00010001, 0xffffffff, t2,
1614                          t4);
1615   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t8", 0x7fff7fff, 0x7fff7fff, t0,
1616                          t8);
1617   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t6", 0x0000c420, 0x0000c420, t4,
1618                          t6);
1619   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t1", 0x00000000, 0x00000000, t0,
1620                          t1);
1621   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t3", 0x80000000, 0x80000000, t2,
1622                          t3);
1623   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t1", 0xaaaaaaaa, 0x55555555, t4,
1624                          t1);
1625   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t6, $t7", 0x00000018, 0xffff2435, t6,
1626                          t7);
1627   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t5, $t3", 0xbabababa, 0xabababab, t5,
1628                          t3);
1629   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t4", 0xf0f0f0f0, 0xfc79b4d2, t2,
1630                          t4);
1631   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t8", 0xfbde3976, 0x00000000, t0,
1632                          t8);
1633   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t6", 0x23534870, 0x00354565, t4,
1634                          t6);
1635   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t1", 0x980b7cde, 0x00086755, t0,
1636                          t1);
1637   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t3", 0x00000018, 0x8f8f8f8f, t2,
1638                          t3);
1639   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t1", 0x92784656, 0xeeeeeeee, t4,
1640                          t1);
1641   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t6, $t7", 0xcacacaca, 0x1bdbdbdb, t6,
1642                          t7);
1643   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t5, $t3", 0xbacabaca, 0xdecadeca, t5,
1644                          t3);
1645   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t4", 0x12fadeb4, 0x93474bde, t2,
1646                          t4);
1647   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t8", 0x7c000790, 0xfc0007ff, t0,
1648                          t8);
1649   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t6", 0xffffffff, 0xffffffff, t4,
1650                          t6);
1651   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t1", 0xf2f4df1f, 0xcb4ab48f, t0,
1652                          t1);
1653   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t3", 0x435f909a, 0xaf8f7e18, t2,
1654                          t3);
1655   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t1", 0x2106ba5f, 0x87df4510, t4,
1656                          t1);
1657   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t6, $t7", 0x246a6376, 0xabf4e8e1, t6,
1658                          t7);
1659   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t5, $t3", 0x1046a1a3, 0xf4c0eeac, t5,
1660                          t3);
1661   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t2, $t4", 0x638ca515, 0x006a54f2, t2,
1662                          t4);
1663   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t0, $t8", 0xf63e7a9d, 0x79f74493, t0,
1664                          t8);
1665   TESTDSPINST_RS_RT_DSPC("cmpu.eq.qb $t4, $t6", 0xbd6845cd, 0x9c09e313, t4,
1666                          t6);
1667
1668   printf("-------- CMPU.LT.QB --------\n");
1669   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t1", 0x00000000, 0x0fffffff, t0,
1670                          t1);
1671   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t3", 0x00045fb2, 0x01080286, t2,
1672                          t3);
1673   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t1", 0xfabc2435, 0xfabc3421, t4,
1674                          t1);
1675   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t6, $t7", 0x07654cb8, 0x73464cb8, t6,
1676                          t7);
1677   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t5, $t3", 0xf973437b, 0x80000000, t5,
1678                          t3);
1679   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t4", 0xffffffff, 0x00010001, t2,
1680                          t4);
1681   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t8", 0x7fff7fff, 0x7fff7fff, t0,
1682                          t8);
1683   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t6", 0x0000c420, 0x00000555, t4,
1684                          t6);
1685   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t1", 0x00000000, 0x00000000, t0,
1686                          t1);
1687   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t3", 0x80000000, 0x80000000, t2,
1688                          t3);
1689   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t1", 0xaaaaaaaa, 0x55555555, t4,
1690                          t1);
1691   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t6, $t7", 0x00000018, 0xffff2435, t6,
1692                          t7);
1693   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t5, $t3", 0xbabababa, 0xabababab, t5,
1694                          t3);
1695   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t4", 0xf0f0f0f0, 0xfc79b4d2, t2,
1696                          t4);
1697   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t8", 0xfbde3976, 0x00000000, t0,
1698                          t8);
1699   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t6", 0x23534870, 0x00354565, t4,
1700                          t6);
1701   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t1", 0x980b7cde, 0x00086755, t0,
1702                          t1);
1703   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t3", 0x00000018, 0x8f8f8f8f, t2,
1704                          t3);
1705   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t1", 0x92784656, 0xeeeeeeee, t4,
1706                          t1);
1707   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t6, $t7", 0xcacacaca, 0x1bdbdbdb, t6,
1708                          t7);
1709   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t5, $t3", 0xbacabaca, 0xdecadeca, t5,
1710                          t3);
1711   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t4", 0x12fadeb4, 0x93474bde, t2,
1712                          t4);
1713   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t8", 0x7c000790, 0xfc0007ff, t0,
1714                          t8);
1715   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t6", 0xffffffff, 0xffffffff, t4,
1716                          t6);
1717   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t1", 0xf2f4df1f, 0xcb4ab48f, t0,
1718                          t1);
1719   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t3", 0x435f909a, 0xaf8f7e18, t2,
1720                          t3);
1721   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t1", 0x2106ba5f, 0x87df4510, t4,
1722                          t1);
1723   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t6, $t7", 0x246a6376, 0xabf4e8e1, t6,
1724                          t7);
1725   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t5, $t3", 0x1046a1a3, 0xf4c0eeac, t5,
1726                          t3);
1727   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t2, $t4", 0x638ca515, 0x006a54f2, t2,
1728                          t4);
1729   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t0, $t8", 0xf63e7a9d, 0x79f74493, t0,
1730                          t8);
1731   TESTDSPINST_RS_RT_DSPC("cmpu.lt.qb $t4, $t6", 0xbd6845cd, 0x9c09e313, t4,
1732                          t6);
1733
1734   printf("-------- CMPU.LE.QB --------\n");
1735   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t1", 0x00000000, 0x0fffffff, t0,
1736                          t1);
1737   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t3", 0x00045fb2, 0x01040286, t2,
1738                          t3);
1739   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t1", 0xfabc2435, 0xfabc3421, t4,
1740                          t1);
1741   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t6, $t7", 0x07654cb8, 0x73464cb8, t6,
1742                          t7);
1743   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t5, $t3", 0xf973437b, 0x80000000, t5,
1744                          t3);
1745   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t4", 0x00010001, 0xffffffff, t2,
1746                          t4);
1747   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t8", 0x7fff7fff, 0x7fff7fff, t0,
1748                          t8);
1749   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t6", 0x0000c420, 0x00000555, t4,
1750                          t6);
1751   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t1", 0x00000000, 0x00000000, t0,
1752                          t1);
1753   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t3", 0x80000000, 0x80000000, t2,
1754                          t3);
1755   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t1", 0xaaaaaaaa, 0x55555555, t4,
1756                          t1);
1757   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t6, $t7", 0x00000018, 0xffff2435, t6,
1758                          t7);
1759   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t5, $t3", 0xbabababa, 0xabababab, t5,
1760                          t3);
1761   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t4", 0xf0f0f0f0, 0xfc79b4d2, t2,
1762                          t4);
1763   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t8", 0xfbde3976, 0x00000000, t0,
1764                          t8);
1765   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t6", 0x23534870, 0x00354565, t4,
1766                          t6);
1767   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t1", 0x980b7cde, 0x00086755, t0,
1768                          t1);
1769   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t3", 0x00000018, 0x8f8f8f8f, t2,
1770                          t3);
1771   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t1", 0x92784656, 0xeeeeeeee, t4,
1772                          t1);
1773   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t6, $t7", 0xcacacaca, 0x1bdbdbdb, t6,
1774                          t7);
1775   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t5, $t3", 0xbacabaca, 0xdecadeca, t5,
1776                          t3);
1777   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t4", 0x12fadeb4, 0x93474bde, t2,
1778                          t4);
1779   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t8", 0x7c000790, 0xfc0007ff, t0,
1780                          t8);
1781   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t6", 0xffffffff, 0xffffffff, t4,
1782                          t6);
1783   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t1", 0xf2f4df1f, 0xcb4ab48f, t0,
1784                          t1);
1785   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t3", 0x435f909a, 0xaf8f7e18, t2,
1786                          t3);
1787   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t1", 0x2106ba5f, 0x87df4510, t4,
1788                          t1);
1789   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t6, $t7", 0x246a6376, 0xabf4e8e1, t6,
1790                          t7);
1791   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t5, $t3", 0x1046a1a3, 0xf4c0eeac, t5,
1792                          t3);
1793   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t2, $t4", 0x638ca515, 0x006a54f2, t2,
1794                          t4);
1795   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t0, $t8", 0xf63e7a9d, 0x79f74493, t0,
1796                          t8);
1797   TESTDSPINST_RS_RT_DSPC("cmpu.le.qb $t4, $t6", 0xbd6845cd, 0x9c09e313, t4,
1798                          t6);
1799
1800   printf("-------- DPAQ_S.W.PH --------\n");
1801   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x00000000,
1802                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
1803   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x00000004,
1804                             1073741824, 0x00000000, 0x00000006, t0, t1);
1805   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x80002435,
1806                             0x80003421, 0x00000000, 1073741824, t2, t3);
1807   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x76548000,
1808                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
1809   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x80000000,
1810                             0x80000000, 0x00000000, 0x00000001, t5, t3);
1811   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t4", "ac1", 0x00010001,
1812                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
1813   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x7fff7fff,
1814                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
1815   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x0000c420,
1816                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
1817   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x00000000,
1818                             0x00000000, 0x00000000, 0x55555555, t2, t3);
1819   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t4, $t1", "ac2", 0x80000000,
1820                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
1821   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
1822                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
1823   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x00000018,
1824                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
1825   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xbabababa,
1826                             0xabababab, 0x00000000, 0x00000000, t2, t4);
1827   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
1828                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
1829   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t4, $t5", "ac3", 0xfbde3976,
1830                             0x00000000, 0x00000000, 0x12349876, t4, t5);
1831   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x23534870,
1832                             0x00354565, 0x00000000, 0x00354565, t0, t1);
1833   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x980b7cde,
1834                             0x00086755, 0x00000000, 0x00086755, t2, t3);
1835   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000018,
1836                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
1837   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x92784656,
1838                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
1839   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t5, $t3", "ac0", 0xcacacaca,
1840                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
1841   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xbacabaca,
1842                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
1843   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x12fadeb4,
1844                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
1845   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x7c000790,
1846                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
1847   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t0, $t8", "ac2", 0xffffffff,
1848                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
1849   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x24a3291e,
1850                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
1851   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t3", "ac1", 0xdd91eebf,
1852                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
1853   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
1854                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
1855   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t6, $t7", "ac3", 0xbc1083e8,
1856                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
1857   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t5, $t3", "ac0", 0xa617cc31,
1858                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
1859   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
1860                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
1861   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x31458a23,
1862                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
1863   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x848af791,
1864                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
1865   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t0, $t1", "ac0", 0xda3bacdc,
1866                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
1867   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x649d5cbd,
1868                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
1869   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t4, $t1", "ac2", 0xc0c8c881,
1870                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
1871   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x7dd81a20,
1872                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
1873   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x7fff7fff,
1874                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
1875   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t4", "ac1", 0x00000555,
1876                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
1877   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x00000000,
1878                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
1879   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x80000000,
1880                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
1881   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t4", "ac1", 0x55555555,
1882                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
1883   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t0, $t8", "ac2", 0xffff8000,
1884                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
1885   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t0, $t1", "ac0", 0xabababab,
1886                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
1887   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
1888                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
1889   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000000,
1890                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
1891   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x00354565,
1892                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
1893   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x00086755,
1894                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
1895   TESTDSPINST_AC_RS_RT_DSPC("dpaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xffff8000,
1896                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
1897
1898
1899   printf("-------- DPAQ_SA.L.W -------- \n");
1900   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t4, $t5", "ac3", 0x00000000,
1901                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
1902   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t0, $t1", "ac0", 0x00000004,
1903                             1073741824, 0x00000000, 0x00000006, t0, t1);
1904   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t3", "ac1", 0x80002435,
1905                             0x80003421, 0x00000000, 1073741824, t2, t3);
1906   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t6, $t7", "ac3", 0x76548000,
1907                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
1908   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t5, $t3", "ac0", 0x80000000,
1909                             0x80000000, 0x00000000, 0x00000001, t5, t3);
1910   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t4", "ac1", 0x00010001,
1911                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
1912   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t0, $t8", "ac2", 0x7fff7fff,
1913                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
1914   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t0, $t1", "ac0", 0x0000c420,
1915                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
1916   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t3", "ac1", 0x00000000,
1917                             0x00000000, 0x00000000, 0x55555555, t2, t3);
1918   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t4, $t1", "ac2", 0x80000000,
1919                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
1920   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
1921                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
1922   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t5, $t3", "ac0", 0x00000018,
1923                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
1924   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t4", "ac1", 0xbabababa,
1925                             0xabababab, 0x00000000, 0x00000000, t2, t4);
1926   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
1927                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
1928   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t4, $t5", "ac3", 0xfbde3976,
1929                             0x00000000, 0x00000000, 0x12349876, t4, t5);
1930   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t0, $t1", "ac0", 0x23534870,
1931                             0x00354565, 0x00000000, 0x00354565, t0, t1);
1932   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t3", "ac1", 0x980b7cde,
1933                             0x00086755, 0x00000000, 0x00086755, t2, t3);
1934   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t4, $t1", "ac2", 0x00000018,
1935                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
1936   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t6, $t7", "ac3", 0x92784656,
1937                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
1938   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t5, $t3", "ac0", 0xcacacaca,
1939                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
1940   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t4", "ac1", 0xbacabaca,
1941                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
1942   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t0, $t8", "ac2", 0x12fadeb4,
1943                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
1944   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t4, $t5", "ac3", 0x7c000790,
1945                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
1946   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t0, $t8", "ac2", 0xffffffff,
1947                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
1948   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t0, $t1", "ac0", 0x24a3291e,
1949                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
1950   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t3", "ac1", 0xdd91eebf,
1951                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
1952   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
1953                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
1954   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t6, $t7", "ac3", 0xbc1083e8,
1955                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
1956   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t5, $t3", "ac0", 0xa617cc31,
1957                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
1958   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
1959                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
1960   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t0, $t8", "ac2", 0x31458a23,
1961                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
1962   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t4, $t5", "ac3", 0x848af791,
1963                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
1964   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t0, $t1", "ac0", 0xda3bacdc,
1965                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
1966   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t3", "ac1", 0x649d5cbd,
1967                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
1968   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t4, $t1", "ac2", 0xc0c8c881,
1969                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
1970   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t6, $t7", "ac3", 0x7dd81a20,
1971                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
1972   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t5, $t3", "ac0", 0x7fff7fff,
1973                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
1974   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t4", "ac1", 0x00000555,
1975                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
1976   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t0, $t8", "ac2", 0x00000000,
1977                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
1978   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t4, $t5", "ac3", 0x80000000,
1979                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
1980   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t4", "ac1", 0x55555555,
1981                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
1982   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t0, $t8", "ac2", 0xffff8000,
1983                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
1984   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t0, $t1", "ac0", 0xabababab,
1985                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
1986   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
1987                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
1988   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac2, $t4, $t1", "ac2", 0x00000000,
1989                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
1990   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac3, $t6, $t7", "ac3", 0x00354565,
1991                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
1992   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac0, $t5, $t3", "ac0", 0x00086755,
1993                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
1994   TESTDSPINST_AC_RS_RT_DSPC("dpaq_sa.l.w $ac1, $t2, $t4", "ac1", 0xffff8000,
1995                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
1996
1997
1998   printf("-------- DPAU.H.QBL --------\n");
1999   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t4, $t5", "ac3", 0x00000000,
2000                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
2001   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t0, $t1", "ac0", 0x00000004,
2002                               1073741824, 0x00000000, 0x00000006, t0, t1);
2003   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t3", "ac1", 0x80002435,
2004                               0x80003421, 0x00000000, 1073741824, t2, t3);
2005   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t6, $t7", "ac3", 0x76548000,
2006                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2007   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t5, $t3", "ac0", 0x80000000,
2008                               0x80000000, 0x00000000, 0x00000001, t5, t3);
2009   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t4", "ac1", 0x00010001,
2010                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2011   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2012                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2013   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t0, $t1", "ac0", 0x0000c420,
2014                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2015   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t3", "ac1", 0x00000000,
2016                               0x00000000, 0x00000000, 0x55555555, t2, t3);
2017   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t4, $t1", "ac2", 0x80000000,
2018                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2019   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2020                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
2021   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t5, $t3", "ac0", 0x00000018,
2022                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2023   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t4", "ac1", 0xbabababa,
2024                               0xabababab, 0x00000000, 0x00000000, t2, t4);
2025   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2026                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2027   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t4, $t5", "ac3", 0xfbde3976,
2028                               0x00000000, 0x00000000, 0x12349876, t4, t5);
2029   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t0, $t1", "ac0", 0x23534870,
2030                               0x00354565, 0x00000000, 0x00354565, t0, t1);
2031   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t3", "ac1", 0x980b7cde,
2032                               0x00086755, 0x00000000, 0x00086755, t2, t3);
2033   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t4, $t1", "ac2", 0x00000018,
2034                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2035   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t6, $t7", "ac3", 0x92784656,
2036                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2037   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t5, $t3", "ac0", 0xcacacaca,
2038                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2039   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t4", "ac1", 0xbacabaca,
2040                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2041   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2042                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2043   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t4, $t5", "ac3", 0x7c000790,
2044                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2045   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t0, $t8", "ac2", 0xffffffff,
2046                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2047   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t0, $t1", "ac0", 0x24a3291e,
2048                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2049   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2050                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2051   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2052                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2053   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2054                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2055   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t5, $t3", "ac0", 0xa617cc31,
2056                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2057   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2058                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2059   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t0, $t8", "ac2", 0x31458a23,
2060                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2061   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t4, $t5", "ac3", 0x848af791,
2062                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2063   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2064                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2065   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2066                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2067   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2068                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2069   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2070                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2071   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2072                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2073   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t4", "ac1", 0x00000555,
2074                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2075   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t0, $t8", "ac2", 0x00000000,
2076                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2077   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t4, $t5", "ac3", 0x80000000,
2078                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2079   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t4", "ac1", 0x55555555,
2080                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2081   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t0, $t8", "ac2", 0xffff8000,
2082                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2083   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t0, $t1", "ac0", 0xabababab,
2084                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
2085   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2086                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2087   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac2, $t4, $t1", "ac2", 0x00000000,
2088                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2089   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac3, $t6, $t7", "ac3", 0x00354565,
2090                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2091   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac0, $t5, $t3", "ac0", 0x00086755,
2092                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2093   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbl $ac1, $t2, $t4", "ac1", 0xffff8000,
2094                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2095
2096   printf("-------- DPAU.H.QBR --------\n");
2097   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t4, $t5", "ac3", 0x00000000,
2098                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
2099   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t0, $t1", "ac0", 0x00000004,
2100                               1073741824, 0x00000000, 0x00000006, t0, t1);
2101   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t3", "ac1", 0x80002435,
2102                               0x80003421, 0x00000000, 1073741824, t2, t3);
2103   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t6, $t7", "ac3", 0x76548000,
2104                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2105   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t5, $t3", "ac0", 0x80000000,
2106                               0x80000000, 0x00000000, 0x00000001, t5, t3);
2107   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t4", "ac1", 0x00010001,
2108                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2109   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2110                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2111   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t0, $t1", "ac0", 0x0000c420,
2112                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2113   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t3", "ac1", 0x00000000,
2114                               0x00000000, 0x00000000, 0x55555555, t2, t3);
2115   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t4, $t1", "ac2", 0x80000000,
2116                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2117   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2118                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
2119   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t5, $t3", "ac0", 0x00000018,
2120                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2121   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t4", "ac1", 0xbabababa,
2122                               0xabababab, 0x00000000, 0x00000000, t2, t4);
2123   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2124                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2125   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t4, $t5", "ac3", 0xfbde3976,
2126                               0x00000000, 0x00000000, 0x12349876, t4, t5);
2127   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t0, $t1", "ac0", 0x23534870,
2128                               0x00354565, 0x00000000, 0x00354565, t0, t1);
2129   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t3", "ac1", 0x980b7cde,
2130                               0x00086755, 0x00000000, 0x00086755, t2, t3);
2131   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t4, $t1", "ac2", 0x00000018,
2132                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2133   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t6, $t7", "ac3", 0x92784656,
2134                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2135   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t5, $t3", "ac0", 0xcacacaca,
2136                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2137   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t4", "ac1", 0xbacabaca,
2138                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2139   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2140                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2141   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t4, $t5", "ac3", 0x7c000790,
2142                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2143   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t0, $t8", "ac2", 0xffffffff,
2144                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2145   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t0, $t1", "ac0", 0x24a3291e,
2146                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2147   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2148                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2149   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2150                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2151   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2152                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2153   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t5, $t3", "ac0", 0xa617cc31,
2154                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2155   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2156                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2157   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t0, $t8", "ac2", 0x31458a23,
2158                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2159   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t4, $t5", "ac3", 0x848af791,
2160                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2161   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2162                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2163   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2164                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2165   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2166                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2167   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2168                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2169   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2170                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2171   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t4", "ac1", 0x00000555,
2172                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2173   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t0, $t8", "ac2", 0x00000000,
2174                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2175   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t4, $t5", "ac3", 0x80000000,
2176                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2177   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t4", "ac1", 0x55555555,
2178                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2179   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t0, $t8", "ac2", 0xffff8000,
2180                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2181   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t0, $t1", "ac0", 0xabababab,
2182                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
2183   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2184                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2185   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac2, $t4, $t1", "ac2", 0x00000000,
2186                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2187   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac3, $t6, $t7", "ac3", 0x00354565,
2188                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2189   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac0, $t5, $t3", "ac0", 0x00086755,
2190                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2191   TESTDSPINST_AC_RS_RT_NODSPC("dpau.h.qbr $ac1, $t2, $t4", "ac1", 0xffff8000,
2192                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2193
2194   printf("-------- DPSQ_S.W.PH --------\n");
2195   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t4, $t5", "ac3", 0x00000000,
2196                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
2197   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t0, $t1", "ac0", 0x00000004,
2198                             1073741824, 0x00000000, 0x00000006, t0, t1);
2199   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t3", "ac1", 0x80002435,
2200                             0x80003421, 0x00000000, 1073741824, t2, t3);
2201   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t6, $t7", "ac3", 0x76548000,
2202                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2203   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t5, $t3", "ac0", 0x80000000,
2204                             0x80000000, 0x00000000, 0x00000001, t5, t3);
2205   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t4", "ac1", 0x00010001,
2206                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2207   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2208                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2209   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t0, $t1", "ac0", 0x0000c420,
2210                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2211   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t3", "ac1", 0x00000000,
2212                             0x00000000, 0x00000000, 0x55555555, t2, t3);
2213   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t4, $t1", "ac2", 0x80000000,
2214                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2215   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2216                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
2217   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t5, $t3", "ac0", 0x00000018,
2218                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2219   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t4", "ac1", 0xbabababa,
2220                             0xabababab, 0x00000000, 0x00000000, t2, t4);
2221   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2222                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2223   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t4, $t5", "ac3", 0xfbde3976,
2224                             0x00000000, 0x00000000, 0x12349876, t4, t5);
2225   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t0, $t1", "ac0", 0x23534870,
2226                             0x00354565, 0x00000000, 0x00354565, t0, t1);
2227   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t3", "ac1", 0x980b7cde,
2228                             0x00086755, 0x00000000, 0x00086755, t2, t3);
2229   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000018,
2230                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2231   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t6, $t7", "ac3", 0x92784656,
2232                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2233   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t5, $t3", "ac0", 0xcacacaca,
2234                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2235   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t4", "ac1", 0xbacabaca,
2236                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2237   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2238                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2239   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t4, $t5", "ac3", 0x7c000790,
2240                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2241   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t0, $t8", "ac2", 0xffffffff,
2242                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2243   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t0, $t1", "ac0", 0x24a3291e,
2244                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2245   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2246                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2247   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2248                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2249   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2250                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2251   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t5, $t3", "ac0", 0xa617cc31,
2252                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2253   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2254                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2255   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t0, $t8", "ac2", 0x31458a23,
2256                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2257   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t4, $t5", "ac3", 0x848af791,
2258                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2259   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2260                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2261   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2262                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2263   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2264                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2265   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2266                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2267   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2268                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2269   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t4", "ac1", 0x00000555,
2270                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2271   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t0, $t8", "ac2", 0x00000000,
2272                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2273   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t4, $t5", "ac3", 0x80000000,
2274                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2275   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t4", "ac1", 0x55555555,
2276                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2277   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t0, $t8", "ac2", 0xffff8000,
2278                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2279   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t0, $t1", "ac0", 0xabababab,
2280                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
2281   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2282                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2283   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000000,
2284                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2285   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac3, $t6, $t7", "ac3", 0x00354565,
2286                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2287   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac0, $t5, $t3", "ac0", 0x00086755,
2288                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2289   TESTDSPINST_AC_RS_RT_DSPC("dpsq_s.w.ph $ac1, $t2, $t4", "ac1", 0xffff8000,
2290                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2291
2292
2293   printf("-------- DPSQ_SA.L.W --------\n");
2294   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t4, $t5", "ac3", 0x00000000,
2295                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
2296   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t0, $t1", "ac0", 0x00000004,
2297                             1073741824, 0x00000000, 0x00000006, t0, t1);
2298   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t3", "ac1", 0x80002435,
2299                             0x80003421, 0x00000000, 1073741824, t2, t3);
2300   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t6, $t7", "ac3", 0x76548000,
2301                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2302   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t5, $t3", "ac0", 0x80000000,
2303                             0x80000000, 0x00000000, 0x00000001, t5, t3);
2304   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t4", "ac1", 0x00010001,
2305                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2306   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2307                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2308   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t0, $t1", "ac0", 0x0000c420,
2309                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2310   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t3", "ac1", 0x00000000,
2311                             0x00000000, 0x00000000, 0x55555555, t2, t3);
2312   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t4, $t1", "ac2", 0x80000000,
2313                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2314   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2315                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
2316   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t5, $t3", "ac0", 0x00000018,
2317                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2318   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t4", "ac1", 0xbabababa,
2319                             0xabababab, 0x00000000, 0x00000000, t2, t4);
2320   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2321                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2322   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t4, $t5", "ac3", 0xfbde3976,
2323                             0x00000000, 0x00000000, 0x12349876, t4, t5);
2324   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t0, $t1", "ac0", 0x23534870,
2325                             0x00354565, 0x00000000, 0x00354565, t0, t1);
2326   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t3", "ac1", 0x980b7cde,
2327                             0x00086755, 0x00000000, 0x00086755, t2, t3);
2328   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t4, $t1", "ac2", 0x00000018,
2329                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2330   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t6, $t7", "ac3", 0x92784656,
2331                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2332   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t5, $t3", "ac0", 0xcacacaca,
2333                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2334   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t4", "ac1", 0xbacabaca,
2335                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2336   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2337                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2338   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t4, $t5", "ac3", 0x7c000790,
2339                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2340   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t0, $t8", "ac2", 0xffffffff,
2341                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2342   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t0, $t1", "ac0", 0x24a3291e,
2343                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2344   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2345                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2346   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2347                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2348   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2349                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2350   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t5, $t3", "ac0", 0xa617cc31,
2351                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2352   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2353                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2354   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t0, $t8", "ac2", 0x31458a23,
2355                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2356   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t4, $t5", "ac3", 0x848af791,
2357                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2358   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2359                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2360   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2361                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2362   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2363                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2364   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2365                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2366   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2367                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2368   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t4", "ac1", 0x00000555,
2369                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2370   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t0, $t8", "ac2", 0x00000000,
2371                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2372   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t4, $t5", "ac3", 0x80000000,
2373                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2374   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t4", "ac1", 0x55555555,
2375                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2376   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t0, $t8", "ac2", 0xffff8000,
2377                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2378   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t0, $t1", "ac0", 0xabababab,
2379                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
2380   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2381                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2382   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac2, $t4, $t1", "ac2", 0x00000000,
2383                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2384   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac3, $t6, $t7", "ac3", 0x00354565,
2385                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2386   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac0, $t5, $t3", "ac0", 0x00086755,
2387                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2388   TESTDSPINST_AC_RS_RT_DSPC("dpsq_sa.l.w $ac1, $t2, $t4", "ac1", 0xffff8000,
2389                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2390
2391
2392   printf("-------- DPSU.H.QBL --------\n");
2393   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t4, $t5", "ac3", 0x00000000,
2394                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
2395   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t0, $t1", "ac0", 0x00000004,
2396                               1073741824, 0x00000000, 0x00000006, t0, t1);
2397   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t3", "ac1", 0x80002435,
2398                               0x80003421, 0x00000000, 1073741824, t2, t3);
2399   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t6, $t7", "ac3", 0x76548000,
2400                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2401   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t5, $t3", "ac0", 0x80000000,
2402                               0x80000000, 0x00000000, 0x00000001, t5, t3);
2403   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t4", "ac1", 0x00010001,
2404                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2405   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2406                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2407   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t0, $t1", "ac0", 0x0000c420,
2408                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2409   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t3", "ac1", 0x00000000,
2410                               0x00000000, 0x00000000, 0x55555555, t2, t3);
2411   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t4, $t1", "ac2", 0x80000000,
2412                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2413   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2414                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
2415   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t5, $t3", "ac0", 0x00000018,
2416                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2417   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t4", "ac1", 0xbabababa,
2418                               0xabababab, 0x00000000, 0x00000000, t2, t4);
2419   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2420                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2421   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t4, $t5", "ac3", 0xfbde3976,
2422                               0x00000000, 0x00000000, 0x12349876, t4, t5);
2423   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t0, $t1", "ac0", 0x23534870,
2424                               0x00354565, 0x00000000, 0x00354565, t0, t1);
2425   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t3", "ac1", 0x980b7cde,
2426                               0x00086755, 0x00000000, 0x00086755, t2, t3);
2427   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t4, $t1", "ac2", 0x00000018,
2428                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2429   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t6, $t7", "ac3", 0x92784656,
2430                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2431   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t5, $t3", "ac0", 0xcacacaca,
2432                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2433   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t4", "ac1", 0xbacabaca,
2434                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2435   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2436                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2437   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t4, $t5", "ac3", 0x7c000790,
2438                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2439   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t0, $t8", "ac2", 0xffffffff,
2440                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2441   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t0, $t1", "ac0", 0x24a3291e,
2442                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2443   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2444                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2445   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2446                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2447   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2448                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2449   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t5, $t3", "ac0", 0xa617cc31,
2450                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2451   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2452                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2453   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t0, $t8", "ac2", 0x31458a23,
2454                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2455   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t4, $t5", "ac3", 0x848af791,
2456                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2457   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2458                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2459   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2460                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2461   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2462                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2463   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2464                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2465   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2466                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2467   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t4", "ac1", 0x00000555,
2468                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2469   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t0, $t8", "ac2", 0x00000000,
2470                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2471   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t4, $t5", "ac3", 0x80000000,
2472                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2473   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t4", "ac1", 0x55555555,
2474                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2475   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t0, $t8", "ac2", 0xffff8000,
2476                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2477   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t0, $t1", "ac0", 0xabababab,
2478                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
2479   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2480                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2481   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac2, $t4, $t1", "ac2", 0x00000000,
2482                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2483   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac3, $t6, $t7", "ac3", 0x00354565,
2484                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2485   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac0, $t5, $t3", "ac0", 0x00086755,
2486                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2487   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbl $ac1, $t2, $t4", "ac1", 0xffff8000,
2488                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2489
2490   printf("-------- DPSU.H.QBR --------\n");
2491   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t4, $t5", "ac3", 0x00000000,
2492                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
2493   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t0, $t1", "ac0", 0x00000004,
2494                               1073741824, 0x00000000, 0x00000006, t0, t1);
2495   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t3", "ac1", 0x80002435,
2496                               0x80003421, 0x00000000, 1073741824, t2, t3);
2497   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t6, $t7", "ac3", 0x76548000,
2498                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2499   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t5, $t3", "ac0", 0x80000000,
2500                               0x80000000, 0x00000000, 0x00000001, t5, t3);
2501   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t4", "ac1", 0x00010001,
2502                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2503   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2504                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2505   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t0, $t1", "ac0", 0x0000c420,
2506                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2507   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t3", "ac1", 0x00000000,
2508                               0x00000000, 0x00000000, 0x55555555, t2, t3);
2509   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t4, $t1", "ac2", 0x80000000,
2510                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2511   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2512                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
2513   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t5, $t3", "ac0", 0x00000018,
2514                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2515   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t4", "ac1", 0xbabababa,
2516                               0xabababab, 0x00000000, 0x00000000, t2, t4);
2517   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2518                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2519   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t4, $t5", "ac3", 0xfbde3976,
2520                               0x00000000, 0x00000000, 0x12349876, t4, t5);
2521   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t0, $t1", "ac0", 0x23534870,
2522                               0x00354565, 0x00000000, 0x00354565, t0, t1);
2523   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t3", "ac1", 0x980b7cde,
2524                               0x00086755, 0x00000000, 0x00086755, t2, t3);
2525   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t4, $t1", "ac2", 0x00000018,
2526                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2527   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t6, $t7", "ac3", 0x92784656,
2528                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2529   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t5, $t3", "ac0", 0xcacacaca,
2530                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2531   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t4", "ac1", 0xbacabaca,
2532                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2533   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2534                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2535   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t4, $t5", "ac3", 0x7c000790,
2536                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2537   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t0, $t8", "ac2", 0xffffffff,
2538                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2539   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t0, $t1", "ac0", 0x24a3291e,
2540                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2541   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2542                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2543   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2544                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2545   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2546                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2547   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t5, $t3", "ac0", 0xa617cc31,
2548                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2549   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2550                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2551   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t0, $t8", "ac2", 0x31458a23,
2552                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2553   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t4, $t5", "ac3", 0x848af791,
2554                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2555   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2556                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2557   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2558                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2559   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2560                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2561   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2562                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2563   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2564                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2565   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t4", "ac1", 0x00000555,
2566                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2567   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t0, $t8", "ac2", 0x00000000,
2568                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2569   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t4, $t5", "ac3", 0x80000000,
2570                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2571   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t4", "ac1", 0x55555555,
2572                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2573   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t0, $t8", "ac2", 0xffff8000,
2574                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2575   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t0, $t1", "ac0", 0xabababab,
2576                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
2577   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2578                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2579   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac2, $t4, $t1", "ac2", 0x00000000,
2580                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2581   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac3, $t6, $t7", "ac3", 0x00354565,
2582                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2583   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac0, $t5, $t3", "ac0", 0x00086755,
2584                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2585   TESTDSPINST_AC_RS_RT_NODSPC("dpsu.h.qbr $ac1, $t2, $t4", "ac1", 0xffff8000,
2586                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2587
2588   printf("-------- EXTP --------\n");
2589   TESTDSPINST_EXT("extp $t1, $ac0, 31", "ac0", t1, 0x80000000, 0x80000000, 31,
2590                   42);
2591   TESTDSPINST_EXT("extp $t2, $ac1, 17", "ac1", t2, (1<<31)+1, (1 <<31)+2, 17,
2592                   31);
2593   TESTDSPINST_EXT("extp $t3, $ac2,  4", "ac2", t3, 0x00000000, 0x00000006,  4,
2594                   55);
2595   TESTDSPINST_EXT("extp $t4, $ac3, 12", "ac3", t4, 0x00000004, 1073741824, 12,
2596                   22);
2597   TESTDSPINST_EXT("extp $t5, $ac0,  3", "ac0", t5, 0x7fffffff, 0x7fffffff,  3,
2598                   63);
2599   TESTDSPINST_EXT("extp $t6, $ac1,  8", "ac1", t6, 0xffffffff, 0x00000001,  8,
2600                   13);
2601   TESTDSPINST_EXT("extp $t7, $ac2, 16", "ac2", t7, 0x00000001, 0xffffffff, 16,
2602                   60);
2603   TESTDSPINST_EXT("extp $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0xffffffff, 22,
2604                   22);
2605   TESTDSPINST_EXT("extp $t0, $ac0,  9", "ac0", t0, 0x0000cdfe, 0x0fde3126,  9,
2606                   18);
2607   TESTDSPINST_EXT("extp $t2, $ac2, 16", "ac2", t2, 0x00000018, 0xffff2435, 16,
2608                   30);
2609   TESTDSPINST_EXT("extp $t3, $ac3,  6", "ac3", t3, 0xbabababa, 0xabababab,  6,
2610                   17);
2611   TESTDSPINST_EXT("extp $t4, $ac0, 13", "ac0", t4, 0xf0f0f0f0, 0xfc79b4d2, 13,
2612                   32);
2613   TESTDSPINST_EXT("extp $t5, $ac1, 19", "ac1", t5, 0x00000000, 0x00000000, 19,
2614                   20);
2615   TESTDSPINST_EXT("extp $t6, $ac2, 27", "ac2", t6, 0xfbde3976, 0x00000000, 27,
2616                   30);
2617   TESTDSPINST_EXT("extp $t7, $ac3,  7", "ac3", t7, 0xb0ed7654, 0x12349876,  7,
2618                   32);
2619   TESTDSPINST_EXT("extp $t8, $ac0, 11", "ac0", t8, 0x23534870, 0x35004565, 11,
2620                   37);
2621   TESTDSPINST_EXT("extp $t0, $ac1, 26", "ac1", t0, 0x980b7cde, 0x86700055, 26,
2622                   61);
2623   TESTDSPINST_EXT("extp $t1, $ac2, 15", "ac2", t1, 0x00000018, 0x8f8f8f8f, 15,
2624                   28);
2625   TESTDSPINST_EXT("extp $t2, $ac3,  2", "ac3", t2, 0x92784656, 0xeeeeeeee,  2,
2626                   14);
2627   TESTDSPINST_EXT("extp $t3, $ac0,  1", "ac0", t3, 0xcacacaca, 0x1bdbdbdb,  1,
2628                   58);
2629   TESTDSPINST_EXT("extp $t4, $ac1,  0", "ac1", t4, 0xbacabaca, 0xdecadeca,  0,
2630                   19);
2631
2632   printf("-------- EXTPDP --------\n");
2633   TESTDSPINST_EXT("extpdp $t1, $ac0, 31", "ac0", t1, 0x80000000, 0x80000000,
2634                   31, 42);
2635   TESTDSPINST_EXT("extpdp $t2, $ac1, 17", "ac1", t2, (1<<31)+1, (1<<31)+2, 17,
2636                   31);
2637   TESTDSPINST_EXT("extpdp $t3, $ac2,  4", "ac2", t3, 0x00000000, 0x00000006,
2638                    4, 55);
2639   TESTDSPINST_EXT("extpdp $t4, $ac3, 12", "ac3", t4, 0x00000004, 1073741824,
2640                   12, 22);
2641   TESTDSPINST_EXT("extpdp $t5, $ac0,  3", "ac0", t5, 0x7fffffff, 0x7fffffff,
2642                    3, 63);
2643   TESTDSPINST_EXT("extpdp $t6, $ac1,  8", "ac1", t6, 0xffffffff, 0x00000001,
2644                    8, 13);
2645   TESTDSPINST_EXT("extpdp $t7, $ac2, 16", "ac2", t7, 0x00000001, 0xffffffff,
2646                   16, 60);
2647   TESTDSPINST_EXT("extpdp $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0xffffffff,
2648                   22, 22);
2649   TESTDSPINST_EXT("extpdp $t0, $ac0,  9", "ac0", t0, 0x0000cdfe, 0x0fde3126,
2650                    9, 18);
2651   TESTDSPINST_EXT("extpdp $t3, $ac3,  6", "ac3", t3, 0xbabababa, 0xabababab,
2652                    6, 17);
2653   TESTDSPINST_EXT("extpdp $t4, $ac0, 13", "ac0", t4, 0xf0f0f0f0, 0xfc79b4d2,
2654                   13, 32);
2655   TESTDSPINST_EXT("extpdp $t5, $ac1, 19", "ac1", t5, 0x00000000, 0x00000000,
2656                   19, 20);
2657   TESTDSPINST_EXT("extpdp $t6, $ac2, 27", "ac2", t6, 0xfbde3976, 0x00000000,
2658                   27, 30);
2659   TESTDSPINST_EXT("extpdp $t7, $ac3,  7", "ac3", t7, 0x0bed7654, 0x12349876,
2660                    7, 32);
2661   TESTDSPINST_EXT("extpdp $t8, $ac0, 11", "ac0", t8, 0x23534870, 0x00354565,
2662                   11, 37);
2663   TESTDSPINST_EXT("extpdp $t0, $ac1, 26", "ac1", t0, 0x980b7cde, 0x00086755,
2664                   26, 61);
2665   TESTDSPINST_EXT("extpdp $t1, $ac2, 15", "ac2", t1, 0x00000018, 0x8f8f8f8f,
2666                   15, 28);
2667   TESTDSPINST_EXT("extpdp $t2, $ac3,  2", "ac3", t2, 0x92784656, 0xeeeeeeee,
2668                    2, 14);
2669   TESTDSPINST_EXT("extpdp $t3, $ac0,  1", "ac0", t3, 0xcacacaca, 0x1bdbdbdb,
2670                    1, 58);
2671   TESTDSPINST_EXT("extpdp $t4, $ac1,  0", "ac1", t4, 0xbacabaca, 0xdecadeca,
2672                    0, 19);
2673
2674   printf("-------- EXTPDPV --------\n");
2675   TESTDSPINST_EXTV("extpdpv $t1, $ac0, $t2", "ac0", t1, 0x80000000, 0x80000000,
2676                    t2, 0x80000000, 42);
2677   TESTDSPINST_EXTV("extpdpv $t2, $ac1, $t3", "ac1", t2, (1<<31)+1, (1<<31)+2,
2678                    t3, 0x06, 31);
2679   TESTDSPINST_EXTV("extpdpv $t3, $ac2, $t4", "ac2", t3, 0x00000000, 0x00000006,
2680                    t4, 0x7fffffff, 55);
2681   TESTDSPINST_EXTV("extpdpv $t5, $ac0, $t6", "ac0", t5, 0x7fffffff, 0x7fffffff,
2682                    t6, 0x0fde3126, 63);
2683   TESTDSPINST_EXTV("extpdpv $t7, $ac2, $t8", "ac2", t7, 0x00000001, 0xffffffff,
2684                    t8, 0xaaaaaaaa, 60);
2685   TESTDSPINST_EXTV("extpdpv $t8, $ac3, $t9", "ac3", t8, 0xffffffff, 0xffffffff,
2686                    t9, 0xffff2435, 22);
2687   TESTDSPINST_EXTV("extpdpv $t4, $ac0, $t3", "ac0", t4, 0xf0f0f0f0, 0xfc79b4d2,
2688                    t3, 0x12349876, 32);
2689   TESTDSPINST_EXTV("extpdpv $t5, $ac1, $t4", "ac1", t5, 0x00000000, 0x00000000,
2690                    t4, 0x00354565, 20);
2691   TESTDSPINST_EXTV("extpdpv $t6, $ac2, $t5", "ac2", t6, 0xfbde3976, 0x00000000,
2692                    t5, 0x00086755, 30);
2693   TESTDSPINST_EXTV("extpdpv $t7, $ac3, $t6", "ac3", t7, 0x0bed7654, 0x12349876,
2694                    t6, 0x00000018, 32);
2695   TESTDSPINST_EXTV("extpdpv $t8, $ac0, $t7", "ac0", t8, 0x23534870, 0x00354565,
2696                    t7, 0x23534870, 37);
2697   TESTDSPINST_EXTV("extpdpv $t0, $ac1, $t8", "ac1", t0, 0x980b7cde, 0x00086755,
2698                    t8, 0x92784656, 61);
2699   TESTDSPINST_EXTV("extpdpv $t1, $ac2, $t9", "ac2", t1, 0x00000018, 0x8f8f8f8f,
2700                    t9, 0xeeeeeeee, 28);
2701   TESTDSPINST_EXTV("extpdpv $t2, $ac3, $t1", "ac3", t2, 0x92784656, 0xeeeeeeee,
2702                    t1, 0xcacacaca, 14);
2703   TESTDSPINST_EXTV("extpdpv $t3, $ac0, $t1", "ac0", t3, 0xcacacaca, 0x1bdbdbdb,
2704                    t1, 0xbacabaca, 58);
2705   TESTDSPINST_EXTV("extpdpv $t4, $ac1, $t4", "ac1", t4, 0xbacabaca, 0xdecadeca,
2706                    t4, 0x1bdbdbdb, 19);
2707
2708   printf("-------- EXTPV --------\n");
2709   TESTDSPINST_EXTV("extpv $t1, $ac0, $t2", "ac0", t1, 0x80000000, 0x80000000,
2710                    t2, 0x80000000, 42);
2711   TESTDSPINST_EXTV("extpv $t2, $ac1, $t3", "ac1", t2, (1<<31)+1, (1<<31)+2, t3,
2712                    0x06, 31);
2713   TESTDSPINST_EXTV("extpv $t3, $ac2, $t4", "ac2", t3, 0x00000000, 0x00000006,
2714                    t4, 0x7fffffff, 55);
2715   TESTDSPINST_EXTV("extpv $t5, $ac0, $t6", "ac0", t5, 0x7fffffff, 0x7fffffff,
2716                    t6, 0x0fde3126, 63);
2717   TESTDSPINST_EXTV("extpv $t7, $ac2, $t8", "ac2", t7, 0x00000001, 0xffffffff,
2718                    t8, 0xaaaaaaaa, 60);
2719   TESTDSPINST_EXTV("extpv $t8, $ac3, $t9", "ac3", t8, 0xffffffff, 0xffffffff,
2720                    t9, 0xffff2435, 22);
2721   TESTDSPINST_EXTV("extpv $t4, $ac0, $t3", "ac0", t4, 0xf0f0f0f0, 0xfc79b4d2,
2722                    t3, 0x12349876, 32);
2723   TESTDSPINST_EXTV("extpv $t5, $ac1, $t4", "ac1", t5, 0x00000000, 0x00000000,
2724                    t4, 0x00354565, 20);
2725   TESTDSPINST_EXTV("extpv $t6, $ac2, $t5", "ac2", t6, 0xfbde3976, 0x00000000,
2726                    t5, 0x00086755, 30);
2727   TESTDSPINST_EXTV("extpv $t7, $ac3, $t6", "ac3", t7, 0x0bed7654, 0x12349876,
2728                    t6, 0x00000018, 32);
2729   TESTDSPINST_EXTV("extpv $t8, $ac0, $t7", "ac0", t8, 0x23534870, 0x00354565,
2730                    t7, 0x23534870, 37);
2731   TESTDSPINST_EXTV("extpv $t0, $ac1, $t8", "ac1", t0, 0x980b7cde, 0x00086755,
2732                    t8, 0x92784656, 61);
2733   TESTDSPINST_EXTV("extpv $t1, $ac2, $t9", "ac2", t1, 0x00000018, 0x8f8f8f8f,
2734                    t9, 0xeeeeeeee, 28);
2735   TESTDSPINST_EXTV("extpv $t2, $ac3, $t1", "ac3", t2, 0x92784656, 0xeeeeeeee,
2736                    t1, 0xcacacaca, 14);
2737   TESTDSPINST_EXTV("extpv $t3, $ac0, $t1", "ac0", t3, 0xcacacaca, 0x1bdbdbdb,
2738                    t1, 0xbacabaca, 58);
2739   TESTDSPINST_EXTV("extpv $t4, $ac1, $t4", "ac1", t4, 0xbacabaca, 0xdecadeca,
2740                    t4, 0x1bdbdbdb, 19);
2741
2742   printf("-------- EXTR_S.H --------\n");
2743   TESTDSPINST_EXT("extr_s.h $t1, $ac0, 31", "ac0", t1, 0x80000000, 0x80000000,
2744                   31, 0);
2745   TESTDSPINST_EXT("extr_s.h $t2, $ac1, 17", "ac1", t2, (1<<31)+1, (1<<31)+2,
2746                   17, 0);
2747   TESTDSPINST_EXT("extr_s.h $t3, $ac2,  4", "ac2", t3, 0x00000000, 0x00000006,
2748                   4, 0);
2749   TESTDSPINST_EXT("extr_s.h $t4, $ac3, 12", "ac3", t4, 0x00000004, 1073741824,
2750                   12, 0);
2751   TESTDSPINST_EXT("extr_s.h $t5, $ac0,  3", "ac0", t5, 0x7fffffff, 0x7fffffff,
2752                   3, 0);
2753   TESTDSPINST_EXT("extr_s.h $t6, $ac1,  8", "ac1", t6, 0xffffffff, 0x00000001,
2754                   8, 0);
2755   TESTDSPINST_EXT("extr_s.h $t7, $ac2, 16", "ac2", t7, 0x00000001, 0xffffffff,
2756                   16, 0);
2757   TESTDSPINST_EXT("extr_s.h $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0xffffffff,
2758                   22, 0);
2759   TESTDSPINST_EXT("extr_s.h $t0, $ac0,  9", "ac0", t0, 0x0000cdfe, 0x0fde3126,
2760                   9, 0);
2761   TESTDSPINST_EXT("extr_s.h $t1, $ac1,  5", "ac1", t1, 0xaaaaaaaa, 0x55555555,
2762                   5, 0);
2763   TESTDSPINST_EXT("extr_s.h $t2, $ac2, 14", "ac2", t2, 0x00000018, 0xffff2435,
2764                   14, 0);
2765   TESTDSPINST_EXT("extr_s.h $t1, $ac1, 20", "ac1", t1, 0xaaaaaaaa, 0x55555555,
2766                   20, 0);
2767   TESTDSPINST_EXT("extr_s.h $t2, $ac2, 16", "ac2", t2, 0x00000018, 0xffff2435,
2768                   16, 0);
2769   TESTDSPINST_EXT("extr_s.h $t1, $ac1,  5", "ac1", t1, 0xaaaaaaaa, 0x55555555,
2770                   5, 0);
2771   TESTDSPINST_EXT("extr_s.h $t2, $ac2, 22", "ac2", t2, 0x00000018, 0xffff2435,
2772                   22, 0);
2773   TESTDSPINST_EXT("extr_s.h $t3, $ac3,  6", "ac3", t3, 0xbabababa, 0xabababab,
2774                   6, 0);
2775   TESTDSPINST_EXT("extr_s.h $t4, $ac0, 13", "ac0", t4, 0xf0f0f0f0, 0xfc79b4d2,
2776                   13, 0);
2777   TESTDSPINST_EXT("extr_s.h $t5, $ac1, 19", "ac1", t5, 0x00000000, 0x00000000,
2778                   19, 0);
2779   TESTDSPINST_EXT("extr_s.h $t6, $ac2, 27", "ac2", t6, 0xfbde3976, 0x00000000,
2780                   27, 0);
2781   TESTDSPINST_EXT("extr_s.h $t7, $ac3,  7", "ac3", t7, 0x0bed7654, 0x12349876,
2782                   7, 0);
2783   TESTDSPINST_EXT("extr_s.h $t8, $ac0, 11", "ac0", t8, 0x23534870, 0x00354565,
2784                   11, 0);
2785   TESTDSPINST_EXT("extr_s.h $t0, $ac1, 26", "ac1", t0, 0x980b7cde, 0x00086755,
2786                   26, 0);
2787   TESTDSPINST_EXT("extr_s.h $t1, $ac2, 15", "ac2", t1, 0x00000018, 0x8f8f8f8f,
2788                   15, 0);
2789   TESTDSPINST_EXT("extr_s.h $t2, $ac3,  2", "ac3", t2, 0x92784656, 0xeeeeeeee,
2790                   2, 0);
2791   TESTDSPINST_EXT("extr_s.h $t3, $ac0,  1", "ac0", t3, 0xcacacaca, 0x1bdbdbdb,
2792                   1, 0);
2793   TESTDSPINST_EXT("extr_s.h $t4, $ac1,  0", "ac1", t4, 0xbacabaca, 0xdecadeca,
2794                   0, 0);
2795   TESTDSPINST_EXT("extr_s.h $t5, $ac0,  3", "ac0", t5, 0x00000000, 0x5fc92974,
2796                   3, 0);
2797   TESTDSPINST_EXT("extr_s.h $t6, $ac1,  8", "ac1", t6, 0x00000000, 0x7e08184e,
2798                   8, 0);
2799   TESTDSPINST_EXT("extr_s.h $t7, $ac2, 16", "ac2", t7, 0x00000000, 0x71c8315f,
2800                   16, 0);
2801   TESTDSPINST_EXT("extr_s.h $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0x9493110e,
2802                   22, 0);
2803   TESTDSPINST_EXT("extr_s.h $t0, $ac0,  9", "ac0", t0, 0xffffffff, 0xbb246228,
2804                   9, 0);
2805   TESTDSPINST_EXT("extr_s.h $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x339d8d88,
2806                   5, 0);
2807   TESTDSPINST_EXT("extr_s.h $t2, $ac2, 14", "ac2", t2, 0x00000000, 0x70974249,
2808                   14, 0);
2809   TESTDSPINST_EXT("extr_s.h $t1, $ac1, 20", "ac1", t1, 0xffffffff, 0x8a8d4e7d,
2810                   20, 0);
2811   TESTDSPINST_EXT("extr_s.h $t2, $ac2, 16", "ac2", t2, 0xffffffff, 0xeb1b4335,
2812                   16, 0);
2813   TESTDSPINST_EXT("extr_s.h $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x0cd6b508,
2814                   5, 0);
2815   TESTDSPINST_EXT("extr_s.h $t2, $ac2, 22", "ac2", t2, 0x00000000, 0x6731e282,
2816                   22, 0);
2817   TESTDSPINST_EXT("extr_s.h $t3, $ac3,  6", "ac3", t3, 0xffffffff, 0xb6edf28f,
2818                   6, 0);
2819   TESTDSPINST_EXT("extr_s.h $t4, $ac0, 13", "ac0", t4, 0x00000000, 0x4b4ec9ca,
2820                   13, 0);
2821   TESTDSPINST_EXT("extr_s.h $t5, $ac1, 19", "ac1", t5, 0xffffffff, 0xc1037fa4,
2822                   19, 0);
2823   TESTDSPINST_EXT("extr_s.h $t6, $ac2, 27", "ac2", t6, 0xffffffff, 0xcb4ab48f,
2824                   27, 0);
2825   TESTDSPINST_EXT("extr_s.h $t7, $ac3,  7", "ac3", t7, 0xffffffff, 0xaf8f7e18,
2826                   7, 0);
2827   TESTDSPINST_EXT("extr_s.h $t8, $ac0, 11", "ac0", t8, 0xffffffff, 0x87df4510,
2828                   11, 0);
2829   TESTDSPINST_EXT("extr_s.h $t0, $ac1, 26", "ac1", t0, 0xffffffff, 0xabf4e8e1,
2830                   26, 0);
2831   TESTDSPINST_EXT("extr_s.h $t1, $ac2, 15", "ac2", t1, 0xffffffff, 0xf4c0eeac,
2832                   15, 0);
2833   TESTDSPINST_EXT("extr_s.h $t2, $ac3,  2", "ac3", t2, 0x00000000, 0x006a54f2,
2834                   2, 0);
2835   TESTDSPINST_EXT("extr_s.h $t3, $ac0,  1", "ac0", t3, 0x00000000, 0x79f74493,
2836                   1, 0);
2837   TESTDSPINST_EXT("extr_s.h $t4, $ac1,  0", "ac1", t4, 0xffffffff, 0x9c09e313,
2838                   0, 0);
2839
2840   printf("-------- EXTR.W --------\n");
2841   TESTDSPINST_EXT("extr.w $t1, $ac0, 31", "ac0", t1, 0x80000000, 0x80000000,
2842                   31, 0);
2843   TESTDSPINST_EXT("extr.w $t2, $ac1, 17", "ac1", t2, (1<<31)+1, (1<<31)+2, 17,
2844                   0);
2845   TESTDSPINST_EXT("extr.w $t3, $ac2,  4", "ac2", t3, 0x00000000, 0x00000006,
2846                   4, 0);
2847   TESTDSPINST_EXT("extr.w $t4, $ac3, 12", "ac3", t4, 0x00000004, 1073741824,
2848                   12, 0);
2849   TESTDSPINST_EXT("extr.w $t5, $ac0,  3", "ac0", t5, 0x7fffffff, 0x7fffffff,
2850                   3, 0);
2851   TESTDSPINST_EXT("extr.w $t6, $ac1,  8", "ac1", t6, 0xffffffff, 0x00000001,
2852                   8, 0);
2853   TESTDSPINST_EXT("extr.w $t7, $ac2, 16", "ac2", t7, 0x00000001, 0xffffffff,
2854                   16, 0);
2855   TESTDSPINST_EXT("extr.w $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0xffffffff,
2856                   22, 0);
2857   TESTDSPINST_EXT("extr.w $t0, $ac0,  9", "ac0", t0, 0x0000cdfe, 0xfd0e3126,
2858                   9, 0);
2859   TESTDSPINST_EXT("extr.w $t1, $ac1,  5", "ac1", t1, 0xaaaaaaaa, 0x55555555,
2860                   5, 0);
2861   TESTDSPINST_EXT("extr.w $t2, $ac2, 14", "ac2", t2, 0x00000018, 0xffff2435,
2862                   14, 0);
2863   TESTDSPINST_EXT("extr.w $t1, $ac1, 20", "ac1", t1, 0xaaaaaaaa, 0x55555555,
2864                   20, 0);
2865   TESTDSPINST_EXT("extr.w $t2, $ac2, 16", "ac2", t2, 0x00000018, 0xffff2435,
2866                   16, 0);
2867   TESTDSPINST_EXT("extr.w $t1, $ac1,  5", "ac1", t1, 0xaaaaaaaa, 0x55555555,
2868                   5, 0);
2869   TESTDSPINST_EXT("extr.w $t2, $ac2, 22", "ac2", t2, 0x00000018, 0xffff2435,
2870                   22, 0);
2871   TESTDSPINST_EXT("extr.w $t3, $ac3,  6", "ac3", t3, 0xbabababa, 0xabababab,
2872                   6, 0);
2873   TESTDSPINST_EXT("extr.w $t4, $ac0, 13", "ac0", t4, 0xf0f0f0f0, 0xfc79b4d2,
2874                   13, 0);
2875   TESTDSPINST_EXT("extr.w $t5, $ac1, 19", "ac1", t5, 0x00000000, 0x00000000,
2876                   19, 0);
2877   TESTDSPINST_EXT("extr.w $t6, $ac2, 27", "ac2", t6, 0xfbde3976, 0x00000000,
2878                   27, 0);
2879   TESTDSPINST_EXT("extr.w $t7, $ac3,  7", "ac3", t7, 0x0bed7654, 0x12349876,
2880                   7, 0);
2881   TESTDSPINST_EXT("extr.w $t8, $ac0, 11", "ac0", t8, 0x23534870, 0x00354565,
2882                   11, 0);
2883   TESTDSPINST_EXT("extr.w $t0, $ac1, 26", "ac1", t0, 0x980b7cde, 0x80006755,
2884                   26, 0);
2885   TESTDSPINST_EXT("extr.w $t1, $ac2, 15", "ac2", t1, 0x00000018, 0x8f8f8f8f,
2886                   15, 0);
2887   TESTDSPINST_EXT("extr.w $t2, $ac3,  2", "ac3", t2, 0x92784656, 0xeeeeeeee,
2888                   2, 0);
2889   TESTDSPINST_EXT("extr.w $t3, $ac0,  1", "ac0", t3, 0xcacacaca, 0x1bdbdbdb,
2890                   1, 0);
2891   TESTDSPINST_EXT("extr.w $t4, $ac1,  0", "ac1", t4, 0xbacabaca, 0xdecadeca,
2892                   0, 0);
2893   TESTDSPINST_EXT("extr.w $t5, $ac0,  3", "ac0", t5, 0x00000000, 0x5fc92974,
2894                   3, 0);
2895   TESTDSPINST_EXT("extr.w $t6, $ac1,  8", "ac1", t6, 0x00000000, 0x7e08184e,
2896                   8, 0);
2897   TESTDSPINST_EXT("extr.w $t7, $ac2, 16", "ac2", t7, 0x00000000, 0x71c8315f,
2898                   16, 0);
2899   TESTDSPINST_EXT("extr.w $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0x9493110e,
2900                   22, 0);
2901   TESTDSPINST_EXT("extr.w $t0, $ac0,  9", "ac0", t0, 0xffffffff, 0xbb246228,
2902                   9, 0);
2903   TESTDSPINST_EXT("extr.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x339d8d88,
2904                   5, 0);
2905   TESTDSPINST_EXT("extr.w $t2, $ac2, 14", "ac2", t2, 0x00000000, 0x70974249,
2906                   14, 0);
2907   TESTDSPINST_EXT("extr.w $t1, $ac1, 20", "ac1", t1, 0xffffffff, 0x8a8d4e7d,
2908                   20, 0);
2909   TESTDSPINST_EXT("extr.w $t2, $ac2, 16", "ac2", t2, 0xffffffff, 0xeb1b4335,
2910                   16, 0);
2911   TESTDSPINST_EXT("extr.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x0cd6b508,
2912                   5, 0);
2913   TESTDSPINST_EXT("extr.w $t2, $ac2, 22", "ac2", t2, 0x00000000, 0x6731e282,
2914                   22, 0);
2915   TESTDSPINST_EXT("extr.w $t3, $ac3,  6", "ac3", t3, 0xffffffff, 0xb6edf28f,
2916                   6, 0);
2917   TESTDSPINST_EXT("extr.w $t4, $ac0, 13", "ac0", t4, 0x00000000, 0x4b4ec9ca,
2918                   13, 0);
2919   TESTDSPINST_EXT("extr.w $t5, $ac1, 19", "ac1", t5, 0xffffffff, 0xc1037fa4,
2920                   19, 0);
2921   TESTDSPINST_EXT("extr.w $t6, $ac2, 27", "ac2", t6, 0xffffffff, 0xcb4ab48f,
2922                   27, 0);
2923   TESTDSPINST_EXT("extr.w $t7, $ac3,  7", "ac3", t7, 0xffffffff, 0xaf8f7e18,
2924                   7, 0);
2925   TESTDSPINST_EXT("extr.w $t8, $ac0, 11", "ac0", t8, 0xffffffff, 0x87df4510,
2926                   11, 0);
2927   TESTDSPINST_EXT("extr.w $t0, $ac1, 26", "ac1", t0, 0xffffffff, 0xabf4e8e1,
2928                   26, 0);
2929   TESTDSPINST_EXT("extr.w $t1, $ac2, 15", "ac2", t1, 0xffffffff, 0xf4c0eeac,
2930                   15, 0);
2931   TESTDSPINST_EXT("extr.w $t2, $ac3,  2", "ac3", t2, 0x00000000, 0x006a54f2,
2932                   2, 0);
2933   TESTDSPINST_EXT("extr.w $t3, $ac0,  1", "ac0", t3, 0x00000000, 0x79f74493,
2934                   1, 0);
2935   TESTDSPINST_EXT("extr.w $t4, $ac1,  0", "ac1", t4, 0xffffffff, 0x9c09e313,
2936                   0, 0);
2937
2938   printf("-------- EXTR_R.W --------\n");
2939   TESTDSPINST_EXT("extr_r.w $t1, $ac0, 31", "ac0", t1, 0xffffffff, 0x80000000,
2940                   31, 0);
2941   TESTDSPINST_EXT("extr_r.w $t3, $ac2,  4", "ac2", t3, 0x00000000, 0x00000006,
2942                   4, 0);
2943   TESTDSPINST_EXT("extr_r.w $t5, $ac0,  3", "ac0", t5, 0x00000000, 0x7fffffff,
2944                   3, 0);
2945   TESTDSPINST_EXT("extr_r.w $t6, $ac1,  8", "ac1", t6, 0x00000000, 0x00000001,
2946                   8, 0);
2947   TESTDSPINST_EXT("extr_r.w $t7, $ac2, 16", "ac2", t7, 0xffffffff, 0xffffffff,
2948                   16, 0);
2949   TESTDSPINST_EXT("extr_r.w $t0, $ac0,  9", "ac0", t0, 0xffffffff, 0xfd0e3126,
2950                   9, 0);
2951   TESTDSPINST_EXT("extr_r.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x55555555,
2952                   5, 0);
2953   TESTDSPINST_EXT("extr_r.w $t2, $ac2, 14", "ac2", t2, 0xffffffff, 0xffff2435,
2954                   14, 0);
2955   TESTDSPINST_EXT("extr_r.w $t1, $ac1, 20", "ac1", t1, 0x00000000, 0x55555555,
2956                   20, 0);
2957   TESTDSPINST_EXT("extr_r.w $t2, $ac2, 16", "ac2", t2, 0xffffffff, 0xffff2435,
2958                   16, 0);
2959   TESTDSPINST_EXT("extr_r.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x55555555,
2960                   5, 0);
2961   TESTDSPINST_EXT("extr_r.w $t2, $ac2, 22", "ac2", t2, 0xffffffff, 0xffff2435,
2962                   22, 0);
2963   TESTDSPINST_EXT("extr_r.w $t3, $ac3,  6", "ac3", t3, 0xffffffff, 0xabababab,
2964                   6, 0);
2965   TESTDSPINST_EXT("extr_r.w $t4, $ac0, 13", "ac0", t4, 0xffffffff, 0xfc79b4d2,
2966                   13, 0);
2967   TESTDSPINST_EXT("extr_r.w $t5, $ac1, 19", "ac1", t5, 0x00000000, 0x00000000,
2968                   19, 0);
2969   TESTDSPINST_EXT("extr_r.w $t6, $ac2, 27", "ac2", t6, 0x00000000, 0x00000000,
2970                   27, 0);
2971   TESTDSPINST_EXT("extr_r.w $t7, $ac3,  7", "ac3", t7, 0x00000000, 0x12349876,
2972                   7, 0);
2973   TESTDSPINST_EXT("extr_r.w $t8, $ac0, 11", "ac0", t8, 0x00000000, 0x00354565,
2974                   11, 0);
2975   TESTDSPINST_EXT("extr_r.w $t0, $ac1, 26", "ac1", t0, 0xffffffff, 0x80006755,
2976                   26, 0);
2977   TESTDSPINST_EXT("extr_r.w $t1, $ac2, 15", "ac2", t1, 0xffffffff, 0x8f8f8f8f,
2978                   15, 0);
2979   TESTDSPINST_EXT("extr_r.w $t2, $ac3,  2", "ac3", t2, 0xffffffff, 0xeeeeeeee,
2980                   2, 0);
2981   TESTDSPINST_EXT("extr_r.w $t3, $ac0,  1", "ac0", t3, 0x00000000, 0x1bdbdbdb,
2982                   1, 0);
2983   TESTDSPINST_EXT("extr_r.w $t4, $ac1,  0", "ac1", t4, 0xffffffff, 0xdecadeca,
2984                   0, 0);
2985   TESTDSPINST_EXT("extr_r.w $t5, $ac0,  3", "ac0", t5, 0x00000000, 0x5fc92974,
2986                   3, 0);
2987   TESTDSPINST_EXT("extr_r.w $t6, $ac1,  8", "ac1", t6, 0x00000000, 0x7e08184e,
2988                   8, 0);
2989   TESTDSPINST_EXT("extr_r.w $t7, $ac2, 16", "ac2", t7, 0x00000000, 0x71c8315f,
2990                   16, 0);
2991   TESTDSPINST_EXT("extr_r.w $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0x9493110e,
2992                   22, 0);
2993   TESTDSPINST_EXT("extr_r.w $t0, $ac0,  9", "ac0", t0, 0xffffffff, 0xbb246228,
2994                   9, 0);
2995   TESTDSPINST_EXT("extr_r.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x339d8d88,
2996                   5, 0);
2997   TESTDSPINST_EXT("extr_r.w $t2, $ac2, 14", "ac2", t2, 0x00000000, 0x70974249,
2998                   14, 0);
2999   TESTDSPINST_EXT("extr_r.w $t1, $ac1, 20", "ac1", t1, 0xffffffff, 0x8a8d4e7d,
3000                   20, 0);
3001   TESTDSPINST_EXT("extr_r.w $t2, $ac2, 16", "ac2", t2, 0xffffffff, 0xeb1b4335,
3002                   16, 0);
3003   TESTDSPINST_EXT("extr_r.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x0cd6b508,
3004                   5, 0);
3005   TESTDSPINST_EXT("extr_r.w $t2, $ac2, 22", "ac2", t2, 0x00000000, 0x6731e282,
3006                   22, 0);
3007   TESTDSPINST_EXT("extr_r.w $t3, $ac3,  6", "ac3", t3, 0xffffffff, 0xb6edf28f,
3008                   6, 0);
3009   TESTDSPINST_EXT("extr_r.w $t4, $ac0, 13", "ac0", t4, 0x00000000, 0x4b4ec9ca,
3010                   13, 0);
3011   TESTDSPINST_EXT("extr_r.w $t5, $ac1, 19", "ac1", t5, 0xffffffff, 0xc1037fa4,
3012                   19, 0);
3013   TESTDSPINST_EXT("extr_r.w $t6, $ac2, 27", "ac2", t6, 0xffffffff, 0xcb4ab48f,
3014                   27, 0);
3015   TESTDSPINST_EXT("extr_r.w $t7, $ac3,  7", "ac3", t7, 0xffffffff, 0xaf8f7e18,
3016                   7, 0);
3017   TESTDSPINST_EXT("extr_r.w $t8, $ac0, 11", "ac0", t8, 0xffffffff, 0x87df4510,
3018                   11, 0);
3019   TESTDSPINST_EXT("extr_r.w $t0, $ac1, 26", "ac1", t0, 0xffffffff, 0xabf4e8e1,
3020                   26, 0);
3021   TESTDSPINST_EXT("extr_r.w $t1, $ac2, 15", "ac2", t1, 0xffffffff, 0xf4c0eeac,
3022                   15, 0);
3023   TESTDSPINST_EXT("extr_r.w $t2, $ac3,  2", "ac3", t2, 0x00000000, 0x006a54f2,
3024                   2, 0);
3025   TESTDSPINST_EXT("extr_r.w $t3, $ac0,  1", "ac0", t3, 0x00000000, 0x79f74493,
3026                   1, 0);
3027   TESTDSPINST_EXT("extr_r.w $t4, $ac1,  0", "ac1", t4, 0xffffffff, 0x9c09e313,
3028                   0, 0);
3029
3030   printf("-------- EXTR_RS.W --------\n");
3031   TESTDSPINST_EXT("extr_rs.w $t3, $ac2,  4", "ac2", t3, 0x00000000, 0x00000006,
3032                   4, 0);
3033   TESTDSPINST_EXT("extr_rs.w $t5, $ac0,  3", "ac0", t5, 0x00000000, 0x7fffffff,
3034                   3, 0);
3035   TESTDSPINST_EXT("extr_rs.w $t6, $ac1,  8", "ac1", t6, 0x00000000, 0x00000001,
3036                   8, 0);
3037   TESTDSPINST_EXT("extr_rs.w $t7, $ac2, 16", "ac2", t7, 0xffffffff, 0xffffffff,
3038                   16, 0);
3039   TESTDSPINST_EXT("extr_rs.w $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0xffffffff,
3040                   2, 0);
3041   TESTDSPINST_EXT("extr_rs.w $t0, $ac0,  9", "ac0", t0, 0xffffffff, 0xfd0e3126,
3042                   9, 0);
3043   TESTDSPINST_EXT("extr_rs.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x55555555,
3044                   5, 0);
3045   TESTDSPINST_EXT("extr_rs.w $t2, $ac2, 14", "ac2", t2, 0xffffffff, 0xffff2435,
3046                   14, 0);
3047   TESTDSPINST_EXT("extr_rs.w $t1, $ac1, 20", "ac1", t1, 0x00000000, 0x55555555,
3048                   0, 0);
3049   TESTDSPINST_EXT("extr_rs.w $t2, $ac2, 16", "ac2", t2, 0xffffffff, 0xffff2435,
3050                   16, 0);
3051   TESTDSPINST_EXT("extr_rs.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x55555555,
3052                   5, 0);
3053   TESTDSPINST_EXT("extr_rs.w $t2, $ac2, 22", "ac2", t2, 0xffffffff, 0xffff2435,
3054                   22, 0);
3055   TESTDSPINST_EXT("extr_rs.w $t3, $ac3,  6", "ac3", t3, 0xffffffff, 0xabababab,
3056                   6, 0);
3057   TESTDSPINST_EXT("extr_rs.w $t4, $ac0, 13", "ac0", t4, 0xffffffff, 0xfc79b4d2,
3058                   13, 0);
3059   TESTDSPINST_EXT("extr_rs.w $t5, $ac1, 19", "ac1", t5, 0x00000000, 0x00000000,
3060                   19, 0);
3061   TESTDSPINST_EXT("extr_rs.w $t6, $ac2, 27", "ac2", t6, 0x00000000, 0x00000000,
3062                   27, 0);
3063   TESTDSPINST_EXT("extr_rs.w $t7, $ac3,  7", "ac3", t7, 0x00000000, 0x12349876,
3064                   7, 0);
3065   TESTDSPINST_EXT("extr_rs.w $t8, $ac0, 11", "ac0", t8, 0x00000000, 0x00354565,
3066                   11, 0);
3067   TESTDSPINST_EXT("extr_rs.w $t0, $ac1, 26", "ac1", t0, 0xffffffff, 0x80006755,
3068                   26, 0);
3069   TESTDSPINST_EXT("extr_rs.w $t1, $ac2, 15", "ac2", t1, 0xffffffff, 0x8f8f8f8f,
3070                   15, 0);
3071   TESTDSPINST_EXT("extr_rs.w $t2, $ac3,  2", "ac3", t2, 0xffffffff, 0xeeeeeeee,
3072                   2, 0);
3073   TESTDSPINST_EXT("extr_rs.w $t3, $ac0,  1", "ac0", t3, 0x00000000, 0x1bdbdbdb,
3074                   1, 0);
3075   TESTDSPINST_EXT("extr_rs.w $t4, $ac1,  0", "ac1", t4, 0xffffffff, 0xdecadeca,
3076                   0, 0);
3077   TESTDSPINST_EXT("extr_rs.w $t5, $ac0,  3", "ac0", t5, 0x00000000, 0x5fc92974,
3078                   3, 0);
3079   TESTDSPINST_EXT("extr_rs.w $t6, $ac1,  8", "ac1", t6, 0x00000000, 0x7e08184e,
3080                   8, 0);
3081   TESTDSPINST_EXT("extr_rs.w $t7, $ac2, 16", "ac2", t7, 0x00000000, 0x71c8315f,
3082                   16, 0);
3083   TESTDSPINST_EXT("extr_rs.w $t8, $ac3, 22", "ac3", t8, 0xffffffff, 0x9493110e,
3084                   22, 0);
3085   TESTDSPINST_EXT("extr_rs.w $t0, $ac0,  9", "ac0", t0, 0xffffffff, 0xbb246228,
3086                   9, 0);
3087   TESTDSPINST_EXT("extr_rs.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x339d8d88,
3088                   5, 0);
3089   TESTDSPINST_EXT("extr_rs.w $t2, $ac2, 14", "ac2", t2, 0x00000000, 0x70974249,
3090                   14, 0);
3091   TESTDSPINST_EXT("extr_rs.w $t1, $ac1, 20", "ac1", t1, 0xffffffff, 0x8a8d4e7d,
3092                   20, 0);
3093   TESTDSPINST_EXT("extr_rs.w $t2, $ac2, 16", "ac2", t2, 0xffffffff, 0xeb1b4335,
3094                   16, 0);
3095   TESTDSPINST_EXT("extr_rs.w $t1, $ac1,  5", "ac1", t1, 0x00000000, 0x0cd6b508,
3096                   5, 0);
3097   TESTDSPINST_EXT("extr_rs.w $t2, $ac2, 22", "ac2", t2, 0x00000000, 0x6731e282,
3098                   22, 0);
3099   TESTDSPINST_EXT("extr_rs.w $t3, $ac3,  6", "ac3", t3, 0xffffffff, 0xb6edf28f,
3100                   6, 0);
3101   TESTDSPINST_EXT("extr_rs.w $t4, $ac0, 13", "ac0", t4, 0x00000000, 0x4b4ec9ca,
3102                   13, 0);
3103   TESTDSPINST_EXT("extr_rs.w $t5, $ac1, 19", "ac1", t5, 0xffffffff, 0xc1037fa4,
3104                   19, 0);
3105   TESTDSPINST_EXT("extr_rs.w $t6, $ac2, 27", "ac2", t6, 0xffffffff, 0xcb4ab48f,
3106                   27, 0);
3107   TESTDSPINST_EXT("extr_rs.w $t7, $ac3,  7", "ac3", t7, 0xffffffff, 0xaf8f7e18,
3108                   7, 0);
3109   TESTDSPINST_EXT("extr_rs.w $t8, $ac0, 11", "ac0", t8, 0xffffffff, 0x87df4510,
3110                   11, 0);
3111   TESTDSPINST_EXT("extr_rs.w $t0, $ac1, 26", "ac1", t0, 0xffffffff, 0xabf4e8e1,
3112                   26, 0);
3113   TESTDSPINST_EXT("extr_rs.w $t1, $ac2, 15", "ac2", t1, 0xffffffff, 0xf4c0eeac,
3114                   15, 0);
3115   TESTDSPINST_EXT("extr_rs.w $t2, $ac3,  2", "ac3", t2, 0x00000000, 0x006a54f2,
3116                   2, 0);
3117   TESTDSPINST_EXT("extr_rs.w $t3, $ac0,  1", "ac0", t3, 0x00000000, 0x79f74493,
3118                   1, 0);
3119   TESTDSPINST_EXT("extr_rs.w $t4, $ac1,  0", "ac1", t4, 0xffffffff, 0x9c09e313,
3120                   0, 0);
3121
3122   printf("-------- EXTRV_S.H --------\n");
3123   TESTDSPINST_EXTV("extrv_s.h $t2, $ac1, $t1", "ac1", t2, (1<<31)+1, (1<<31)+2,
3124                    t1, 0x12349876, 0);
3125   TESTDSPINST_EXTV("extrv_s.h $t1, $ac0, $t0", "ac0", t1, 0x80000000,
3126                    0x80000000, t0, 0x12349876, 0);
3127   TESTDSPINST_EXTV("extrv_s.h $t3, $ac2, $t2", "ac2", t3, 0x00000000,
3128                    0x00000006, t2, 0x00354565, 0);
3129   TESTDSPINST_EXTV("extrv_s.h $t4, $ac3, $t3", "ac3", t4, 0x00000004,
3130                    1073741824, t3, 0x00086755, 0);
3131   TESTDSPINST_EXTV("extrv_s.h $t5, $ac0, $t4", "ac0", t5, 0x7fffffff,
3132                    0x7fffffff, t4, 0x00000018, 0);
3133   TESTDSPINST_EXTV("extrv_s.h $t6, $ac1, $t5", "ac1", t6, 0xffffffff,
3134                    0x00000001, t5, 0x23534870, 0);
3135   TESTDSPINST_EXTV("extrv_s.h $t7, $ac2, $t6", "ac2", t7, 0x00000001,
3136                    0xffffffff, t6, 0x92784656, 0);
3137   TESTDSPINST_EXTV("extrv_s.h $t8, $ac3, $t7", "ac3", t8, 0xffffffff,
3138                    0xffffffff, t7, 0xeeeeeeee, 0);
3139   TESTDSPINST_EXTV("extrv_s.h $t0, $ac0, $t8", "ac0", t0, 0x0000cdfe,
3140                    0x0fde3126, t8, 0xcacacaca, 0);
3141   TESTDSPINST_EXTV("extrv_s.h $t1, $ac1, $t0", "ac1", t1, 0xaaaaaaaa,
3142                    0x55555555, t0, 0xbacabaca, 0);
3143   TESTDSPINST_EXTV("extrv_s.h $t2, $ac2, $t1", "ac2", t2, 0x00000018,
3144                    0xffff2435, t1, 0x1bdbdbdb, 0);
3145   TESTDSPINST_EXTV("extrv_s.h $t1, $ac1, $t2", "ac1", t1, 0xaaaaaaaa,
3146                    0x55555555, t2, 0x0cd6b508, 0);
3147   TESTDSPINST_EXTV("extrv_s.h $t2, $ac2, $t3", "ac2", t2, 0x00000018,
3148                    0xffff2435, t3, 0x6731e282, 0);
3149   TESTDSPINST_EXTV("extrv_s.h $t1, $ac1, $t4", "ac1", t1, 0xaaaaaaaa,
3150                    0x55555555, t4, 0xb6edf28f, 0);
3151   TESTDSPINST_EXTV("extrv_s.h $t2, $ac2, $t5", "ac2", t2, 0x00000018,
3152                    0xffff2435, t5, 0x4b4ec9ca, 0);
3153   TESTDSPINST_EXTV("extrv_s.h $t3, $ac3, $t6", "ac3", t3, 0xbabababa,
3154                    0xabababab, t6, 0xc1037fa4, 0);
3155   TESTDSPINST_EXTV("extrv_s.h $t4, $ac0, $t7", "ac0", t4, 0xf0f0f0f0,
3156                    0xfc79b4d2, t7, 0xcb4ab48f, 0);
3157   TESTDSPINST_EXTV("extrv_s.h $t5, $ac1, $t8", "ac1", t5, 0x00000000,
3158                    0x00000000, t8, 0xaf8f7e18, 0);
3159   TESTDSPINST_EXTV("extrv_s.h $t6, $ac2, $t0", "ac2", t6, 0xfbde3976,
3160                    0x00000000, t0, 0x87df4510, 0);
3161   TESTDSPINST_EXTV("extrv_s.h $t7, $ac3, $t1", "ac3", t7, 0x0bed7654,
3162                    0x12349876, t1, 0xabf4e8e1, 0);
3163   TESTDSPINST_EXTV("extrv_s.h $t8, $ac0, $t2", "ac0", t8, 0x23534870,
3164                    0x00354565, t2, 0xf4c0eeac, 0);
3165   TESTDSPINST_EXTV("extrv_s.h $t0, $ac1, $t3", "ac1", t0, 0x980b7cde,
3166                    0x00086755, t3, 0x006a54f2, 0);
3167   TESTDSPINST_EXTV("extrv_s.h $t1, $ac2, $t4", "ac2", t1, 0x00000018,
3168                    0x8f8f8f8f, t4, 0x79f74493, 0);
3169   TESTDSPINST_EXTV("extrv_s.h $t2, $ac3, $t5", "ac3", t2, 0x92784656,
3170                    0xeeeeeeee, t5, 0x9c09e313, 0);
3171   TESTDSPINST_EXTV("extrv_s.h $t3, $ac0, $t6", "ac0", t3, 0xcacacaca,
3172                    0x1bdbdbdb, t6, 0x0fde3126, 0);
3173   TESTDSPINST_EXTV("extrv_s.h $t4, $ac1, $t7", "ac1", t4, 0xbacabaca,
3174                    0xdecadeca, t7, 0x55555555, 0);
3175   TESTDSPINST_EXTV("extrv_s.h $t5, $ac0, $t8", "ac0", t5, 0x00000000,
3176                    0x5fc92974, t8, 0xffff2435, 0);
3177   TESTDSPINST_EXTV("extrv_s.h $t6, $ac1, $t0", "ac1", t6, 0x00000000,
3178                    0x7e08184e, t0, 0x55555555, 0);
3179   TESTDSPINST_EXTV("extrv_s.h $t7, $ac2, $t1", "ac2", t7, 0x00000000,
3180                    0x71c8315f, t1, 0xffff2435, 0);
3181   TESTDSPINST_EXTV("extrv_s.h $t8, $ac3, $t2", "ac3", t8, 0xffffffff,
3182                    0x9493110e, t2, 0x55555555, 0);
3183   TESTDSPINST_EXTV("extrv_s.h $t0, $ac0, $t3", "ac0", t0, 0xffffffff,
3184                    0xbb246228, t3, 0xffff2435, 0);
3185   TESTDSPINST_EXTV("extrv_s.h $t1, $ac1, $t4", "ac1", t1, 0x00000000,
3186                    0x339d8d88, t4, 0xabababab, 0);
3187   TESTDSPINST_EXTV("extrv_s.h $t2, $ac2, $t5", "ac2", t2, 0x00000000,
3188                    0x70974249, t5, 0xfc79b4d2, 0);
3189   TESTDSPINST_EXTV("extrv_s.h $t1, $ac1, $t6", "ac1", t1, 0xffffffff,
3190                    0x8a8d4e7d, t6, 0x00000000, 0);
3191   TESTDSPINST_EXTV("extrv_s.h $t2, $ac2, $t7", "ac2", t2, 0xffffffff,
3192                    0xeb1b4335, t7, 0x00000000, 0);
3193   TESTDSPINST_EXTV("extrv_s.h $t1, $ac1, $t8", "ac1", t1, 0x00000000,
3194                    0x0cd6b508, t8, 0x12349876, 0);
3195   TESTDSPINST_EXTV("extrv_s.h $t2, $ac2, $t0", "ac2", t2, 0x00000000,
3196                    0x6731e282, t0, 0x00354565, 0);
3197   TESTDSPINST_EXTV("extrv_s.h $t3, $ac3, $t1", "ac3", t3, 0xffffffff,
3198                    0xb6edf28f, t1, 0x00086755, 0);
3199   TESTDSPINST_EXTV("extrv_s.h $t4, $ac0, $t2", "ac0", t4, 0x00000000,
3200                    0x4b4ec9ca, t2, 0x8f8f8f8f, 0);
3201   TESTDSPINST_EXTV("extrv_s.h $t5, $ac1, $t3", "ac1", t5, 0xffffffff,
3202                    0xc1037fa4, t3, 0xeeeeeeee, 0);
3203   TESTDSPINST_EXTV("extrv_s.h $t6, $ac2, $t3", "ac2", t6, 0xffffffff,
3204                    0xcb4ab48f, t3, 0x1bdbdbdb, 0);
3205   TESTDSPINST_EXTV("extrv_s.h $t7, $ac3, $t4", "ac3", t7, 0xffffffff,
3206                    0xaf8f7e18, t4, 0xbb246228, 0);
3207   TESTDSPINST_EXTV("extrv_s.h $t8, $ac0, $t5", "ac0", t8, 0xffffffff,
3208                    0x87df4510, t5, 0x339d8d88, 0);
3209   TESTDSPINST_EXTV("extrv_s.h $t0, $ac1, $t6", "ac1", t0, 0xffffffff,
3210                    0xabf4e8e1, t6, 0x70974249, 0);
3211   TESTDSPINST_EXTV("extrv_s.h $t1, $ac2, $t7", "ac2", t1, 0xffffffff,
3212                    0xf4c0eeac, t7, 0x8a8d4e7d, 0);
3213   TESTDSPINST_EXTV("extrv_s.h $t2, $ac3, $t8", "ac3", t2, 0x00000000,
3214                    0x006a54f2, t8, 0xeb1b4335, 0);
3215   TESTDSPINST_EXTV("extrv_s.h $t3, $ac0, $t0", "ac0", t3, 0x00000000,
3216                    0x79f74493, t0, 0x0cd6b508, 0);
3217   TESTDSPINST_EXTV("extrv_s.h $t4, $ac1, $t1", "ac1", t4, 0xffffffff,
3218                    0x9c09e313, t1, 0x6731e282, 0);
3219
3220   printf("-------- EXTRV.W --------\n");
3221   TESTDSPINST_EXTV("extrv.w $t1, $ac1, $t3", "ac1", t1, 0xaaaaaaaa, 0x55555555,
3222                    t3, 0xbababa05, 0);
3223   TESTDSPINST_EXTV("extrv.w $t2, $ac2, $t4", "ac2", t2, 0x00000018, 0xffff2435,
3224                    t4, 0xfbde390e, 0);
3225   TESTDSPINST_EXTV("extrv.w $t1, $ac1, $t7", "ac1", t1, 0xaaaaaaaa, 0x55555555,
3226                    t7, 0x55555514, 0);
3227   TESTDSPINST_EXTV("extrv.w $t2, $ac2, $t5", "ac2", t2, 0x00000018, 0xffff2435,
3228                    t5, 0x0000cd10, 0);
3229   TESTDSPINST_EXTV("extrv.w $t1, $ac1, $t2", "ac1", t1, 0xaaaaaaaa, 0x55555555,
3230                    t2, 0x80000005, 0);
3231   TESTDSPINST_EXTV("extrv.w $t2, $ac2, $t3", "ac2", t2, 0x00000018, 0xffff2435,
3232                    t3, 0x7fffff16, 0);
3233   TESTDSPINST_EXTV("extrv.w $t0, $ac0, $t1", "ac0", t0, 0x0000cdfe, 0x0fde3126,
3234                    t1, 0xbabababa, 0);
3235   TESTDSPINST_EXTV("extrv.w $t3, $ac3, $t2", "ac3", t3, 0xbabababa, 0xabababab,
3236                    t2, 0xfbde3976, 0);
3237   TESTDSPINST_EXTV("extrv.w $t6, $ac1, $t7", "ac1", t6, 0xffffffff, 0x00000001,
3238                    t7, 0x55555555, 0);
3239   TESTDSPINST_EXTV("extrv.w $t4, $ac3, $t5", "ac3", t4, 0x00000004, 1073741824,
3240                    t5, 0x0000cdfe, 0);
3241   TESTDSPINST_EXTV("extrv.w $t1, $ac0, $t2", "ac0", t1, 0x80000000, 0x80000000,
3242                    t2, 0x80000000, 0);
3243   TESTDSPINST_EXTV("extrv.w $t2, $ac1, $t3", "ac1", t2, (1<<31)+1, (1<<31)+2,
3244                    t3, 0x06, 0);
3245   TESTDSPINST_EXTV("extrv.w $t3, $ac2, $t4", "ac2", t3, 0x00000000, 0x00000006,
3246                    t4, 0x7fffffff, 0);
3247   TESTDSPINST_EXTV("extrv.w $t5, $ac0, $t6", "ac0", t5, 0x7fffffff, 0x7fffffff,
3248                    t6, 0x0fde3126, 0);
3249   TESTDSPINST_EXTV("extrv.w $t7, $ac2, $t8", "ac2", t7, 0x00000001, 0xffffffff,
3250                    t8, 0xaaaaaaaa, 0);
3251   TESTDSPINST_EXTV("extrv.w $t8, $ac3, $t9", "ac3", t8, 0xffffffff, 0xffffffff,
3252                    t9, 0xffff2435, 0);
3253   TESTDSPINST_EXTV("extrv.w $t4, $ac0, $t3", "ac0", t4, 0xf0f0f0f0, 0xfc79b4d2,
3254                    t3, 0x12349876, 0);
3255   TESTDSPINST_EXTV("extrv.w $t5, $ac1, $t4", "ac1", t5, 0x00000000, 0x00000000,
3256                    t4, 0x00354565, 0);
3257   TESTDSPINST_EXTV("extrv.w $t6, $ac2, $t5", "ac2", t6, 0xfbde3976, 0x00000000,
3258                    t5, 0x00086755, 0);
3259   TESTDSPINST_EXTV("extrv.w $t7, $ac3, $t6", "ac3", t7, 0x0bed7654, 0x12349876,
3260                    t6, 0x00000018, 0);
3261   TESTDSPINST_EXTV("extrv.w $t8, $ac0, $t7", "ac0", t8, 0x23534870, 0x00354565,
3262                    t7, 0x23534870, 0);
3263   TESTDSPINST_EXTV("extrv.w $t0, $ac1, $t8", "ac1", t0, 0x980b7cde, 0x00086755,
3264                    t8, 0x92784656, 0);
3265   TESTDSPINST_EXTV("extrv.w $t1, $ac2, $t9", "ac2", t1, 0x00000018, 0x8f8f8f8f,
3266                    t9, 0xeeeeeeee, 0);
3267   TESTDSPINST_EXTV("extrv.w $t2, $ac3, $t1", "ac3", t2, 0x92784656, 0xeeeeeeee,
3268                    t1, 0xcacacaca, 0);
3269   TESTDSPINST_EXTV("extrv.w $t3, $ac0, $t1", "ac0", t3, 0xcacacaca, 0x1bdbdbdb,
3270                    t1, 0xbacabaca, 0);
3271   TESTDSPINST_EXTV("extrv.w $t4, $ac1, $t4", "ac1", t4, 0xbacabaca, 0xdecadeca,
3272                    t4, 0x1bdbdbdb, 0);
3273   TESTDSPINST_EXTV("extrv.w $t5, $ac0, $t8", "ac0", t5, 0x00000000, 0x5fc92974,
3274                    t8, 0xffff2435, 0);
3275   TESTDSPINST_EXTV("extrv.w $t6, $ac1, $t0", "ac1", t6, 0x00000000, 0x7e08184e,
3276                    t0, 0x55555555, 0);
3277   TESTDSPINST_EXTV("extrv.w $t7, $ac2, $t1", "ac2", t7, 0x00000000, 0x71c8315f,
3278                    t1, 0xffff2435, 0);
3279   TESTDSPINST_EXTV("extrv.w $t8, $ac3, $t2", "ac3", t8, 0xffffffff, 0x9493110e,
3280                    t2, 0x55555555, 0);
3281   TESTDSPINST_EXTV("extrv.w $t0, $ac0, $t3", "ac0", t0, 0xffffffff, 0xbb246228,
3282                    t3, 0xffff2435, 0);
3283   TESTDSPINST_EXTV("extrv.w $t1, $ac1, $t4", "ac1", t1, 0x00000000, 0x339d8d88,
3284                    t4, 0xabababab, 0);
3285   TESTDSPINST_EXTV("extrv.w $t2, $ac2, $t5", "ac2", t2, 0x00000000, 0x70974249,
3286                    t5, 0xfc79b4d2, 0);
3287   TESTDSPINST_EXTV("extrv.w $t1, $ac1, $t6", "ac1", t1, 0xffffffff, 0x8a8d4e7d,
3288                    t6, 0x00000000, 0);
3289   TESTDSPINST_EXTV("extrv.w $t2, $ac2, $t7", "ac2", t2, 0xffffffff, 0xeb1b4335,
3290                    t7, 0x00000000, 0);
3291   TESTDSPINST_EXTV("extrv.w $t1, $ac1, $t8", "ac1", t1, 0x00000000, 0x0cd6b508,
3292                    t8, 0x12349876, 0);
3293   TESTDSPINST_EXTV("extrv.w $t2, $ac2, $t0", "ac2", t2, 0x00000000, 0x6731e282,
3294                    t0, 0x00354565, 0);
3295   TESTDSPINST_EXTV("extrv.w $t3, $ac3, $t1", "ac3", t3, 0xffffffff, 0xb6edf28f,
3296                    t1, 0x00086755, 0);
3297   TESTDSPINST_EXTV("extrv.w $t4, $ac0, $t2", "ac0", t4, 0x00000000, 0x4b4ec9ca,
3298                    t2, 0x8f8f8f8f, 0);
3299   TESTDSPINST_EXTV("extrv.w $t5, $ac1, $t3", "ac1", t5, 0xffffffff, 0xc1037fa4,
3300                    t3, 0xeeeeeeee, 0);
3301   TESTDSPINST_EXTV("extrv.w $t6, $ac2, $t3", "ac2", t6, 0xffffffff, 0xcb4ab48f,
3302                    t3, 0x1bdbdbdb, 0);
3303   TESTDSPINST_EXTV("extrv.w $t7, $ac3, $t4", "ac3", t7, 0xffffffff, 0xaf8f7e18,
3304                    t4, 0xbb246228, 0);
3305   TESTDSPINST_EXTV("extrv.w $t8, $ac0, $t5", "ac0", t8, 0xffffffff, 0x87df4510,
3306                    t5, 0x339d8d88, 0);
3307   TESTDSPINST_EXTV("extrv.w $t0, $ac1, $t6", "ac1", t0, 0xffffffff, 0xabf4e8e1,
3308                    t6, 0x70974249, 0);
3309   TESTDSPINST_EXTV("extrv.w $t1, $ac2, $t7", "ac2", t1, 0xffffffff, 0xf4c0eeac,
3310                    t7, 0x8a8d4e7d, 0);
3311   TESTDSPINST_EXTV("extrv.w $t2, $ac3, $t8", "ac3", t2, 0x00000000, 0x006a54f2,
3312                    t8, 0xeb1b4335, 0);
3313   TESTDSPINST_EXTV("extrv.w $t3, $ac0, $t0", "ac0", t3, 0x00000000, 0x79f74493,
3314                    t0, 0x0cd6b508, 0);
3315   TESTDSPINST_EXTV("extrv.w $t4, $ac1, $t1", "ac1", t4, 0xffffffff, 0x9c09e313,
3316                    t1, 0x6731e282, 0);
3317
3318   printf("-------- EXTRV_R.W --------\n");
3319   TESTDSPINST_EXTV("extrv_r.w $t1, $ac1, $t3", "ac1", t1, 0x00000000,
3320                    0x55555555, t3, 0xbababa05, 0);
3321   TESTDSPINST_EXTV("extrv_r.w $t2, $ac2, $t4", "ac2", t2, 0xffffffff,
3322                    0xffff2435, t4, 0xfbde390e, 0);
3323   TESTDSPINST_EXTV("extrv_r.w $t1, $ac1, $t7", "ac1", t1, 0x00000000,
3324                    0x55555555, t7, 0x55555514, 0);
3325   TESTDSPINST_EXTV("extrv_r.w $t2, $ac2, $t5", "ac2", t2, 0xffffffff,
3326                    0xffff2435, t5, 0x0000cd10, 0);
3327   TESTDSPINST_EXTV("extrv_r.w $t1, $ac1, $t2", "ac1", t1, 0x00000000,
3328                    0x55555555, t2, 0x80000005, 0);
3329   TESTDSPINST_EXTV("extrv_r.w $t2, $ac2, $t3", "ac2", t2, 0xffffffff,
3330                    0xffff2435, t3, 0x7fffff16, 0);
3331   TESTDSPINST_EXTV("extrv_r.w $t0, $ac0, $t1", "ac0", t0, 0x00000000,
3332                    0x0fde3126, t1, 0xbabababa, 0);
3333   TESTDSPINST_EXTV("extrv_r.w $t3, $ac3, $t2", "ac3", t3, 0xffffffff,
3334                    0xabababab, t2, 0xfbde3976, 0);
3335   TESTDSPINST_EXTV("extrv_r.w $t6, $ac1, $t7", "ac1", t6, 0x00000000,
3336                    0x00000001, t7, 0x55555555, 0);
3337   TESTDSPINST_EXTV("extrv_r.w $t1, $ac0, $t2", "ac0", t1, 0xffffffff,
3338                    0x80000000, t2, 0x80000000, 0);
3339   TESTDSPINST_EXTV("extrv_r.w $t3, $ac2, $t4", "ac2", t3, 0x00000000,
3340                    0x00000006, t4, 0x7fffffff, 0);
3341   TESTDSPINST_EXTV("extrv_r.w $t5, $ac0, $t6", "ac0", t5, 0x00000000,
3342                    0x7fffffff, t6, 0x0fde3126, 0);
3343   TESTDSPINST_EXTV("extrv_r.w $t7, $ac2, $t8", "ac2", t7, 0xffffffff,
3344                    0xffffffff, t8, 0xaaaaaaaa, 0);
3345   TESTDSPINST_EXTV("extrv_r.w $t8, $ac3, $t9", "ac3", t8, 0xffffffff,
3346                    0xffffffff, t9, 0xffff2435, 0);
3347   TESTDSPINST_EXTV("extrv_r.w $t4, $ac0, $t3", "ac0", t4, 0xffffffff,
3348                    0xfc79b4d2, t3, 0x12349876, 0);
3349   TESTDSPINST_EXTV("extrv_r.w $t5, $ac1, $t4", "ac1", t5, 0x00000000,
3350                    0x00000000, t4, 0x00354565, 0);
3351   TESTDSPINST_EXTV("extrv_r.w $t6, $ac2, $t5", "ac2", t6, 0x00000000,
3352                    0x00000000, t5, 0x00086755, 0);
3353   TESTDSPINST_EXTV("extrv_r.w $t7, $ac3, $t6", "ac3", t7, 0x00000000,
3354                    0x12349876, t6, 0x00000018, 0);
3355   TESTDSPINST_EXTV("extrv_r.w $t8, $ac0, $t7", "ac0", t8, 0x00000000,
3356                    0x00354565, t7, 0x23534870, 0);
3357   TESTDSPINST_EXTV("extrv_r.w $t0, $ac1, $t8", "ac1", t0, 0x00000000,
3358                    0x00086755, t8, 0x92784656, 0);
3359   TESTDSPINST_EXTV("extrv_r.w $t1, $ac2, $t9", "ac2", t1, 0xffffffff,
3360                    0x8f8f8f8f, t9, 0xeeeeeeee, 0);
3361   TESTDSPINST_EXTV("extrv_r.w $t2, $ac3, $t1", "ac3", t2, 0xffffffff,
3362                    0xeeeeeeee, t1, 0xcacacaca, 0);
3363   TESTDSPINST_EXTV("extrv_r.w $t3, $ac0, $t1", "ac0", t3, 0x00000000,
3364                    0x1bdbdbdb, t1, 0xbacabaca, 0);
3365   TESTDSPINST_EXTV("extrv_r.w $t4, $ac1, $t4", "ac1", t4, 0xffffffff,
3366                    0xdecadeca, t4, 0x1bdbdbdb, 0);
3367   TESTDSPINST_EXTV("extrv_r.w $t5, $ac0, $t8", "ac0", t5, 0x00000000,
3368                    0x5fc92974, t8, 0xffff2435, 0);
3369   TESTDSPINST_EXTV("extrv_r.w $t6, $ac1, $t0", "ac1", t6, 0x00000000,
3370                    0x7e08184e, t0, 0x55555555, 0);
3371   TESTDSPINST_EXTV("extrv_r.w $t7, $ac2, $t1", "ac2", t7, 0x00000000,
3372                    0x71c8315f, t1, 0xffff2435, 0);
3373   TESTDSPINST_EXTV("extrv_r.w $t8, $ac3, $t2", "ac3", t8, 0xffffffff,
3374                    0x9493110e, t2, 0x55555555, 0);
3375   TESTDSPINST_EXTV("extrv_r.w $t0, $ac0, $t3", "ac0", t0, 0xffffffff,
3376                    0xbb246228, t3, 0xffff2435, 0);
3377   TESTDSPINST_EXTV("extrv_r.w $t1, $ac1, $t4", "ac1", t1, 0x00000000,
3378                    0x339d8d88, t4, 0xabababab, 0);
3379   TESTDSPINST_EXTV("extrv_r.w $t2, $ac2, $t5", "ac2", t2, 0x00000000,
3380                    0x70974249, t5, 0xfc79b4d2, 0);
3381   TESTDSPINST_EXTV("extrv_r.w $t1, $ac1, $t6", "ac1", t1, 0xffffffff,
3382                    0x8a8d4e7d, t6, 0x00000000, 0);
3383   TESTDSPINST_EXTV("extrv_r.w $t2, $ac2, $t7", "ac2", t2, 0xffffffff,
3384                    0xeb1b4335, t7, 0x00000000, 0);
3385   TESTDSPINST_EXTV("extrv_r.w $t1, $ac1, $t8", "ac1", t1, 0x00000000,
3386                    0x0cd6b508, t8, 0x12349876, 0);
3387   TESTDSPINST_EXTV("extrv_r.w $t2, $ac2, $t0", "ac2", t2, 0x00000000,
3388                    0x6731e282, t0, 0x00354565, 0);
3389   TESTDSPINST_EXTV("extrv_r.w $t3, $ac3, $t1", "ac3", t3, 0xffffffff,
3390                    0xb6edf28f, t1, 0x00086755, 0);
3391   TESTDSPINST_EXTV("extrv_r.w $t4, $ac0, $t2", "ac0", t4, 0x00000000,
3392                    0x4b4ec9ca, t2, 0x8f8f8f8f, 0);
3393   TESTDSPINST_EXTV("extrv_r.w $t5, $ac1, $t3", "ac1", t5, 0xffffffff,
3394                    0xc1037fa4, t3, 0xeeeeeeee, 0);
3395   TESTDSPINST_EXTV("extrv_r.w $t6, $ac2, $t3", "ac2", t6, 0xffffffff,
3396                    0xcb4ab48f, t3, 0x1bdbdbdb, 0);
3397   TESTDSPINST_EXTV("extrv_r.w $t7, $ac3, $t4", "ac3", t7, 0xffffffff,
3398                    0xaf8f7e18, t4, 0xbb246228, 0);
3399   TESTDSPINST_EXTV("extrv_r.w $t8, $ac0, $t5", "ac0", t8, 0xffffffff,
3400                    0x87df4510, t5, 0x339d8d88, 0);
3401   TESTDSPINST_EXTV("extrv_r.w $t0, $ac1, $t6", "ac1", t0, 0xffffffff,
3402                    0xabf4e8e1, t6, 0x70974249, 0);
3403   TESTDSPINST_EXTV("extrv_r.w $t1, $ac2, $t7", "ac2", t1, 0xffffffff,
3404                    0xf4c0eeac, t7, 0x8a8d4e7d, 0);
3405   TESTDSPINST_EXTV("extrv_r.w $t2, $ac3, $t8", "ac3", t2, 0x00000000,
3406                    0x006a54f2, t8, 0xeb1b4335, 0);
3407   TESTDSPINST_EXTV("extrv_r.w $t3, $ac0, $t0", "ac0", t3, 0x00000000,
3408                    0x79f74493, t0, 0x0cd6b508, 0);
3409   TESTDSPINST_EXTV("extrv_r.w $t4, $ac1, $t1", "ac1", t4, 0xffffffff,
3410                    0x9c09e313, t1, 0x6731e282, 0);
3411
3412   printf("-------- EXTRV_RS.W --------\n");
3413   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac1, $t3", "ac1", t1, 0x00000000,
3414                    0x55555555, t3, 0xbababa05, 0);
3415   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac2, $t4", "ac2", t2, 0xffffffff,
3416                    0xffff2435, t4, 0xfbde390e, 0);
3417   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac1, $t7", "ac1", t1, 0x00000000,
3418                    0x55555555, t7, 0x55555514, 0);
3419   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac2, $t5", "ac2", t2, 0xffffffff,
3420                    0xffff2435, t5, 0x0000cd10, 0);
3421   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac1, $t2", "ac1", t1, 0x00000000,
3422                    0x55555555, t2, 0x80000005, 0);
3423   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac2, $t3", "ac2", t2, 0xffffffff,
3424                    0xffff2435, t3, 0x7fffff16, 0);
3425   TESTDSPINST_EXTV("extrv_rs.w $t0, $ac0, $t1", "ac0", t0, 0x00000000,
3426                    0x0fde3126, t1, 0xbabababa, 0);
3427   TESTDSPINST_EXTV("extrv_rs.w $t3, $ac3, $t2", "ac3", t3, 0xffffffff,
3428                    0xabababab, t2, 0xfbde3976, 0);
3429   TESTDSPINST_EXTV("extrv_rs.w $t6, $ac1, $t7", "ac1", t6, 0x00000000,
3430                    0x00000001, t7, 0x55555555, 0);
3431   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac0, $t2", "ac0", t1, 0xffffffff,
3432                    0x80000000, t2, 0x80000000, 0);
3433   TESTDSPINST_EXTV("extrv_rs.w $t5, $ac0, $t6", "ac0", t5, 0x00000000,
3434                    0x7fffffff, t6, 0x0fde3126, 0);
3435   TESTDSPINST_EXTV("extrv_rs.w $t7, $ac2, $t8", "ac2", t7, 0xffffffff,
3436                    0xffffffff, t8, 0xaaaaaaaa, 0);
3437   TESTDSPINST_EXTV("extrv_rs.w $t8, $ac3, $t9", "ac3", t8, 0xffffffff,
3438                    0xffffffff, t9, 0xffff2435, 0);
3439   TESTDSPINST_EXTV("extrv_rs.w $t4, $ac0, $t3", "ac0", t4, 0xffffffff,
3440                    0xfc79b4d2, t3, 0x12349876, 0);
3441   TESTDSPINST_EXTV("extrv_rs.w $t5, $ac1, $t4", "ac1", t5, 0x00000000,
3442                    0x00000000, t4, 0x00354565, 0);
3443   TESTDSPINST_EXTV("extrv_rs.w $t6, $ac2, $t5", "ac2", t6, 0x00000000,
3444                    0x00000000, t5, 0x00086755, 0);
3445   TESTDSPINST_EXTV("extrv_rs.w $t7, $ac3, $t6", "ac3", t7, 0x00000000,
3446                    0x12349876, t6, 0x00000018, 0);
3447   TESTDSPINST_EXTV("extrv_rs.w $t8, $ac0, $t7", "ac0", t8, 0x00000000,
3448                    0x00354565, t7, 0x23534870, 0);
3449   TESTDSPINST_EXTV("extrv_rs.w $t0, $ac1, $t8", "ac1", t0, 0x00000000,
3450                    0x00086755, t8, 0x92784656, 0);
3451   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac2, $t9", "ac2", t1, 0xffffffff,
3452                    0x8f8f8f8f, t9, 0xeeeeeeee, 0);
3453   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac3, $t1", "ac3", t2, 0xffffffff,
3454                    0xeeeeeeee, t1, 0xcacacaca, 0);
3455   TESTDSPINST_EXTV("extrv_rs.w $t3, $ac0, $t1", "ac0", t3, 0x00000000,
3456                    0x1bdbdbdb, t1, 0xbacabaca, 0);
3457   TESTDSPINST_EXTV("extrv_rs.w $t4, $ac1, $t4", "ac1", t4, 0xffffffff,
3458                    0xdecadeca, t4, 0x1bdbdbdb, 0);
3459   TESTDSPINST_EXTV("extrv_rs.w $t5, $ac0, $t8", "ac0", t5, 0x00000000,
3460                    0x5fc92974, t8, 0xffff2435, 0);
3461   TESTDSPINST_EXTV("extrv_rs.w $t6, $ac1, $t0", "ac1", t6, 0x00000000,
3462                    0x7e08184e, t0, 0x55555555, 0);
3463   TESTDSPINST_EXTV("extrv_rs.w $t7, $ac2, $t1", "ac2", t7, 0x00000000,
3464                    0x71c8315f, t1, 0xffff2435, 0);
3465   TESTDSPINST_EXTV("extrv_rs.w $t8, $ac3, $t2", "ac3", t8, 0xffffffff,
3466                    0x9493110e, t2, 0x55555555, 0);
3467   TESTDSPINST_EXTV("extrv_rs.w $t0, $ac0, $t3", "ac0", t0, 0xffffffff,
3468                    0xbb246228, t3, 0xffff2435, 0);
3469   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac1, $t4", "ac1", t1, 0x00000000,
3470                    0x339d8d88, t4, 0xabababab, 0);
3471   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac2, $t5", "ac2", t2, 0x00000000,
3472                    0x70974249, t5, 0xfc79b4d2, 0);
3473   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac1, $t6", "ac1", t1, 0xffffffff,
3474                    0x8a8d4e7d, t6, 0x00000000, 0);
3475   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac2, $t7", "ac2", t2, 0xffffffff,
3476                    0xeb1b4335, t7, 0x00000000, 0);
3477   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac1, $t8", "ac1", t1, 0x00000000,
3478                    0x0cd6b508, t8, 0x12349876, 0);
3479   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac2, $t0", "ac2", t2, 0x00000000,
3480                    0x6731e282, t0, 0x00354565, 0);
3481   TESTDSPINST_EXTV("extrv_rs.w $t3, $ac3, $t1", "ac3", t3, 0xffffffff,
3482                    0xb6edf28f, t1, 0x00086755, 0);
3483   TESTDSPINST_EXTV("extrv_rs.w $t4, $ac0, $t2", "ac0", t4, 0x00000000,
3484                    0x4b4ec9ca, t2, 0x8f8f8f8f, 0);
3485   TESTDSPINST_EXTV("extrv_rs.w $t5, $ac1, $t3", "ac1", t5, 0xffffffff,
3486                    0xc1037fa4, t3, 0xeeeeeeee, 0);
3487   TESTDSPINST_EXTV("extrv_rs.w $t6, $ac2, $t3", "ac2", t6, 0xffffffff,
3488                    0xcb4ab48f, t3, 0x1bdbdbdb, 0);
3489   TESTDSPINST_EXTV("extrv_rs.w $t7, $ac3, $t4", "ac3", t7, 0xffffffff,
3490                    0xaf8f7e18, t4, 0xbb246228, 0);
3491   TESTDSPINST_EXTV("extrv_rs.w $t8, $ac0, $t5", "ac0", t8, 0xffffffff,
3492                    0x87df4510, t5, 0x339d8d88, 0);
3493   TESTDSPINST_EXTV("extrv_rs.w $t0, $ac1, $t6", "ac1", t0, 0xffffffff,
3494                    0xabf4e8e1, t6, 0x70974249, 0);
3495   TESTDSPINST_EXTV("extrv_rs.w $t1, $ac2, $t7", "ac2", t1, 0xffffffff,
3496                    0xf4c0eeac, t7, 0x8a8d4e7d, 0);
3497   TESTDSPINST_EXTV("extrv_rs.w $t2, $ac3, $t8", "ac3", t2, 0x00000000,
3498                    0x006a54f2, t8, 0xeb1b4335, 0);
3499   TESTDSPINST_EXTV("extrv_rs.w $t3, $ac0, $t0", "ac0", t3, 0x00000000,
3500                    0x79f74493, t0, 0x0cd6b508, 0);
3501   TESTDSPINST_EXTV("extrv_rs.w $t4, $ac1, $t1", "ac1", t4, 0xffffffff,
3502                    0x9c09e313, t1, 0x6731e282, 0);
3503
3504   printf("-------- INSV --------\n");
3505   TESTDSPINST_INSV("insv $t5, $t3", 0xffffffff, 0x00000000, t5, t3,  7,
3506                    ( 1<<7));
3507   TESTDSPINST_INSV("insv $t2, $t4", 0x004dfbe5, 0xe87927cc, t2, t4,  2,
3508                    (15<<7));
3509   TESTDSPINST_INSV("insv $t0, $t8", 0xf6a3fa3c, 0x083b3571, t0, t8,  4,
3510                    ( 2<<7));
3511   TESTDSPINST_INSV("insv $t0, $t1", 0xbf17fb9a, 0xb9743941, t0, t1, 13,
3512                    ( 0<<7));
3513   TESTDSPINST_INSV("insv $t2, $t3", 0x2c0bd024, 0xbce5f924, t2, t3,  5,
3514                    ( 5<<7));
3515   TESTDSPINST_INSV("insv $t5, $t3", 0x288593c0, 0x722d5e20, t5, t3, 28,
3516                    ( 4<<7));
3517   TESTDSPINST_INSV("insv $t2, $t4", 0x4d7ff5b4, 0xa1d6f791, t2, t4,  0,
3518                    (32<<7));
3519   TESTDSPINST_INSV("insv $t0, $t8", 0x4557be13, 0x7b11bee7, t0, t8, 16,
3520                    (15<<7));
3521   TESTDSPINST_INSV("insv $t4, $t5", 0xadcf5772, 0xa5631488, t4, t5, 15,
3522                    ( 7<<7));
3523   TESTDSPINST_INSV("insv $t0, $t1", 0x989a7235, 0xb10bcc65, t0, t1, 19,
3524                    ( 8<<7));
3525   TESTDSPINST_INSV("insv $t2, $t3", 0x4d6f393a, 0x73f39fca, t2, t3, 30,
3526                    ( 1<<7));
3527   TESTDSPINST_INSV("insv $t4, $t1", 0x24a3291e, 0x5648e540, t4, t1,  1,
3528                    (28<<7));
3529   TESTDSPINST_INSV("insv $t6, $t7", 0xdd91eebf, 0xc54f79e6, t6, t7, 17,
3530                    ( 5<<7));
3531   TESTDSPINST_INSV("insv $t5, $t3", 0xf7ce2ec6, 0x5fc92974, t5, t3, 26,
3532                    ( 2<<7));
3533   TESTDSPINST_INSV("insv $t2, $t4", 0xbc1083e8, 0x7e08184e, t2, t4, 14,
3534                    (13<<7));
3535   TESTDSPINST_INSV("insv $t0, $t8", 0xa617cc31, 0x71c8315f, t0, t8,  8,
3536                    (17<<7));
3537   TESTDSPINST_INSV("insv $t4, $t5", 0xdfe1e8f0, 0x9493110e, t4, t5,  9,
3538                    (11<<7));
3539   TESTDSPINST_INSV("insv $t2, $t4", 0x31458a23, 0xbb246228, t2, t4, 23,
3540                    ( 9<<7));
3541   TESTDSPINST_INSV("insv $t0, $t8", 0x848af791, 0x339d8d88, t0, t8,  6,
3542                    (19<<7));
3543   TESTDSPINST_INSV("insv $t0, $t1", 0xda3bacdc, 0x70974249, t0, t1, 19,
3544                    ( 8<<7));
3545   TESTDSPINST_INSV("insv $t0, $t1", 0x2fff0000, 0x00000001, t0, t1,  7,
3546                    (13<<7));
3547   TESTDSPINST_INSV("insv $t2, $t3", 0x2fff0000, 0x73741802, t2, t3,  2,
3548                    (23<<7));
3549   TESTDSPINST_INSV("insv $t4, $t1", 0x2fff0000, 0x80003403, t4, t1,  4,
3550                    (28<<7));
3551   TESTDSPINST_INSV("insv $t0, $t1", 0xabababab, 0x00000000, t0, t1,  0,
3552                    (22<<7));
3553   TESTDSPINST_INSV("insv $t2, $t3", 0xdecadeca, 0x80000000, t2, t3, 26,
3554                    ( 0<<7));
3555   TESTDSPINST_INSV("insv $t4, $t1", 0xbacabaca, 0x55555555, t4, t1, 12,
3556                    ( 3<<7));
3557   TESTDSPINST_INSV("insv $t6, $t7", 0x3545ff80, 0xffff2434, t6, t7,  1,
3558                    (23<<7));
3559   TESTDSPINST_INSV("insv $t2, $t4", 0xc4dbfe20, 0xfc79b4d2, t2, t4, 11,
3560                    ( 8<<7));
3561   TESTDSPINST_INSV("insv $t0, $t8", 0x00000000, 0x00000000, t0, t8, 16,
3562                    ( 9<<7));
3563   TESTDSPINST_INSV("insv $t0, $t1", 0xad80bce4, 0x00086755, t0, t1, 13,
3564                    (17<<7));
3565   TESTDSPINST_INSV("insv $t2, $t3", 0x7f003245, 0x8f8f8f8f, t2, t3,  8,
3566                    (18<<7));
3567   TESTDSPINST_INSV("insv $t5, $t3", 0x980b7cde, 0xdecadeca, t5, t3,  4,
3568                    (15<<7));
3569
3570{
3571   printf("DSP LWX\n");
3572   ppMem(mem, 16);
3573   int i;
3574   for(i = 0; i < 64; i+=4){
3575      TESTDSPINST_LWX(i, t0, t1);
3576   }
3577}
3578
3579{
3580   printf("DSP LHX\n");
3581   ppMem(mem, 16);
3582   int i;
3583   for(i = 0; i < 64; i+=2){
3584      TESTDSPINST_LHX(i, t0, t1);
3585   }
3586}
3587
3588{
3589   printf("DSP LBUX\n");
3590   ppMem(mem, 16);
3591   int i;
3592   for(i = 0; i < 64; i++){
3593      TESTDSPINST_LBUX(i, t0, t1);
3594   }
3595}
3596
3597   printf("-------- MADD --------\n");
3598   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t4, $t5", "ac3", 0x00000000,
3599                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
3600   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t0, $t1", "ac0", 0x00000004,
3601                               1073741824, 0x00000000, 0x00000006, t0, t1);
3602   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t3", "ac1", 0x80002435,
3603                               0x80003421, 0x00000000, 1073741824, t2, t3);
3604   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t6, $t7", "ac3", 0x76548000,
3605                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
3606   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t5, $t3", "ac0", 0x80000000,
3607                               0x80000000, 0x00000000, 0x00000001, t5, t3);
3608   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t4", "ac1", 0x00010001,
3609                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
3610   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t0, $t8", "ac2", 0x7fff7fff,
3611                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
3612   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t0, $t1", "ac0", 0x0000c420,
3613                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
3614   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t3", "ac1", 0x00000000,
3615                               0x00000000, 0x00000000, 0x55555555, t2, t3);
3616   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t4, $t1", "ac2", 0x80000000,
3617                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
3618   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
3619                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
3620   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t5, $t3", "ac0", 0x00000018,
3621                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
3622   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t4", "ac1", 0xbabababa,
3623                               0xabababab, 0x00000000, 0x00000000, t2, t4);
3624   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
3625                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
3626   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t4, $t5", "ac3", 0xfbde3976,
3627                               0x00000000, 0x00000000, 0x12349876, t4, t5);
3628   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t0, $t1", "ac0", 0x23534870,
3629                               0x00354565, 0x00000000, 0x00354565, t0, t1);
3630   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t3", "ac1", 0x980b7cde,
3631                               0x00086755, 0x00000000, 0x00086755, t2, t3);
3632   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t4, $t1", "ac2", 0x00000018,
3633                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
3634   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t6, $t7", "ac3", 0x92784656,
3635                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
3636   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t5, $t3", "ac0", 0xcacacaca,
3637                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
3638   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t4", "ac1", 0xbacabaca,
3639                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
3640   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t0, $t8", "ac2", 0x12fadeb4,
3641                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
3642   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t4, $t5", "ac3", 0x7c000790,
3643                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
3644   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t0, $t8", "ac2", 0xffffffff,
3645                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
3646   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t0, $t1", "ac0", 0x24a3291e,
3647                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
3648   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t3", "ac1", 0xdd91eebf,
3649                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
3650   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
3651                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
3652   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t6, $t7", "ac3", 0xbc1083e8,
3653                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
3654   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t5, $t3", "ac0", 0xa617cc31,
3655                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
3656   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
3657                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
3658   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t0, $t8", "ac2", 0x31458a23,
3659                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
3660   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t4, $t5", "ac3", 0x848af791,
3661                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
3662   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t0, $t1", "ac0", 0xda3bacdc,
3663                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
3664   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t3", "ac1", 0x649d5cbd,
3665                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
3666   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t4, $t1", "ac2", 0xc0c8c881,
3667                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
3668   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t6, $t7", "ac3", 0x7dd81a20,
3669                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
3670   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t5, $t3", "ac0", 0x7fff7fff,
3671                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
3672   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t4", "ac1", 0x00000555,
3673                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
3674   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t0, $t8", "ac2", 0x00000000,
3675                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
3676   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t4, $t5", "ac3", 0x80000000,
3677                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
3678   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t4", "ac1", 0x55555555,
3679                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
3680   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t0, $t8", "ac2", 0xffff8000,
3681                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
3682   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t0, $t1", "ac0", 0xabababab,
3683                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
3684   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
3685                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
3686   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac2, $t4, $t1", "ac2", 0x00000000,
3687                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
3688   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac3, $t6, $t7", "ac3", 0x00354565,
3689                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
3690   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac0, $t5, $t3", "ac0", 0x00086755,
3691                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
3692   TESTDSPINST_AC_RS_RT_NODSPC("madd $ac1, $t2, $t4", "ac1", 0xffff8000,
3693                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
3694
3695   printf("-------- MADDU --------\n");
3696   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t4, $t5", "ac3", 0x00000000,
3697                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
3698   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t0, $t1", "ac0", 0x00000004,
3699                               1073741824, 0x00000000, 0x00000006, t0, t1);
3700   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t3", "ac1", 0x80002435,
3701                               0x80003421, 0x00000000, 1073741824, t2, t3);
3702   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t6, $t7", "ac3", 0x76548000,
3703                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
3704   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t5, $t3", "ac0", 0x80000000,
3705                               0x80000000, 0x00000000, 0x00000001, t5, t3);
3706   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t4", "ac1", 0x00010001,
3707                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
3708   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t0, $t8", "ac2", 0x7fff7fff,
3709                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
3710   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t0, $t1", "ac0", 0x0000c420,
3711                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
3712   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t3", "ac1", 0x00000000,
3713                               0x00000000, 0x00000000, 0x55555555, t2, t3);
3714   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t4, $t1", "ac2", 0x80000000,
3715                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
3716   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
3717                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
3718   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t5, $t3", "ac0", 0x00000018,
3719                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
3720   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t4", "ac1", 0xbabababa,
3721                               0xabababab, 0x00000000, 0x00000000, t2, t4);
3722   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
3723                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
3724   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t4, $t5", "ac3", 0xfbde3976,
3725                               0x00000000, 0x00000000, 0x12349876, t4, t5);
3726   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t0, $t1", "ac0", 0x23534870,
3727                               0x00354565, 0x00000000, 0x00354565, t0, t1);
3728   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t3", "ac1", 0x980b7cde,
3729                               0x00086755, 0x00000000, 0x00086755, t2, t3);
3730   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t4, $t1", "ac2", 0x00000018,
3731                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
3732   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t6, $t7", "ac3", 0x92784656,
3733                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
3734   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t5, $t3", "ac0", 0xcacacaca,
3735                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
3736   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t4", "ac1", 0xbacabaca,
3737                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
3738   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t0, $t8", "ac2", 0x12fadeb4,
3739                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
3740   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t4, $t5", "ac3", 0x7c000790,
3741                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
3742   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t0, $t8", "ac2", 0xffffffff,
3743                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
3744   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t0, $t1", "ac0", 0x24a3291e,
3745                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
3746   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t3", "ac1", 0xdd91eebf,
3747                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
3748   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
3749                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
3750   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t6, $t7", "ac3", 0xbc1083e8,
3751                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
3752   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t5, $t3", "ac0", 0xa617cc31,
3753                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
3754   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
3755                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
3756   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t0, $t8", "ac2", 0x31458a23,
3757                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
3758   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t4, $t5", "ac3", 0x848af791,
3759                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
3760   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t0, $t1", "ac0", 0xda3bacdc,
3761                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
3762   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t3", "ac1", 0x649d5cbd,
3763                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
3764   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t4, $t1", "ac2", 0xc0c8c881,
3765                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
3766   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t6, $t7", "ac3", 0x7dd81a20,
3767                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
3768   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t5, $t3", "ac0", 0x7fff7fff,
3769                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
3770   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t4", "ac1", 0x00000555,
3771                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
3772   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t0, $t8", "ac2", 0x00000000,
3773                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
3774   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t4, $t5", "ac3", 0x80000000,
3775                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
3776   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t4", "ac1", 0x55555555,
3777                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
3778   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t0, $t8", "ac2", 0xffff8000,
3779                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
3780   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t0, $t1", "ac0", 0xabababab,
3781                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
3782   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
3783                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
3784   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac2, $t4, $t1", "ac2", 0x00000000,
3785                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
3786   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac3, $t6, $t7", "ac3", 0x00354565,
3787                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
3788   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac0, $t5, $t3", "ac0", 0x00086755,
3789                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
3790   TESTDSPINST_AC_RS_RT_NODSPC("maddu $ac1, $t2, $t4", "ac1", 0xffff8000,
3791                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
3792
3793   printf("-------- MSUB --------\n");
3794   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t4, $t5", "ac3", 0x00000000,
3795                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
3796   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t0, $t1", "ac0", 0x00000004,
3797                               1073741824, 0x00000000, 0x00000006, t0, t1);
3798   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t3", "ac1", 0x80002435,
3799                               0x80003421, 0x00000000, 1073741824, t2, t3);
3800   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t6, $t7", "ac3", 0x76548000,
3801                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
3802   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t5, $t3", "ac0", 0x80000000,
3803                               0x80000000, 0x00000000, 0x00000001, t5, t3);
3804   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t4", "ac1", 0x00010001,
3805                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
3806   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t0, $t8", "ac2", 0x7fff7fff,
3807                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
3808   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t0, $t1", "ac0", 0x0000c420,
3809                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
3810   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t3", "ac1", 0x00000000,
3811                               0x00000000, 0x00000000, 0x55555555, t2, t3);
3812   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t4, $t1", "ac2", 0x80000000,
3813                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
3814   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
3815                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
3816   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t5, $t3", "ac0", 0x00000018,
3817                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
3818   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t4", "ac1", 0xbabababa,
3819                               0xabababab, 0x00000000, 0x00000000, t2, t4);
3820   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
3821                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
3822   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t4, $t5", "ac3", 0xfbde3976,
3823                               0x00000000, 0x00000000, 0x12349876, t4, t5);
3824   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t0, $t1", "ac0", 0x23534870,
3825                               0x00354565, 0x00000000, 0x00354565, t0, t1);
3826   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t3", "ac1", 0x980b7cde,
3827                               0x00086755, 0x00000000, 0x00086755, t2, t3);
3828   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t4, $t1", "ac2", 0x00000018,
3829                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
3830   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t6, $t7", "ac3", 0x92784656,
3831                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
3832   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t5, $t3", "ac0", 0xcacacaca,
3833                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
3834   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t4", "ac1", 0xbacabaca,
3835                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
3836   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t0, $t8", "ac2", 0x12fadeb4,
3837                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
3838   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t4, $t5", "ac3", 0x7c000790,
3839                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
3840   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t0, $t8", "ac2", 0xffffffff,
3841                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
3842   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t0, $t1", "ac0", 0x24a3291e,
3843                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
3844   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t3", "ac1", 0xdd91eebf,
3845                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
3846   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
3847                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
3848   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t6, $t7", "ac3", 0xbc1083e8,
3849                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
3850   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t5, $t3", "ac0", 0xa617cc31,
3851                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
3852   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
3853                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
3854   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t0, $t8", "ac2", 0x31458a23,
3855                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
3856   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t4, $t5", "ac3", 0x848af791,
3857                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
3858   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t0, $t1", "ac0", 0xda3bacdc,
3859                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
3860   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t3", "ac1", 0x649d5cbd,
3861                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
3862   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t4, $t1", "ac2", 0xc0c8c881,
3863                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
3864   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t6, $t7", "ac3", 0x7dd81a20,
3865                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
3866   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t5, $t3", "ac0", 0x7fff7fff,
3867                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
3868   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t4", "ac1", 0x00000555,
3869                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
3870   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t0, $t8", "ac2", 0x00000000,
3871                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
3872   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t4, $t5", "ac3", 0x80000000,
3873                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
3874   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t4", "ac1", 0x55555555,
3875                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
3876   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t0, $t8", "ac2", 0xffff8000,
3877                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
3878   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t0, $t1", "ac0", 0xabababab,
3879                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
3880   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
3881                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
3882   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac2, $t4, $t1", "ac2", 0x00000000,
3883                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
3884   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac3, $t6, $t7", "ac3", 0x00354565,
3885                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
3886   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac0, $t5, $t3", "ac0", 0x00086755,
3887                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
3888   TESTDSPINST_AC_RS_RT_NODSPC("msub $ac1, $t2, $t4", "ac1", 0xffff8000,
3889                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
3890
3891   printf("-------- MSUBU --------\n");
3892   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t4, $t5", "ac3", 0x00000000,
3893                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
3894   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t0, $t1", "ac0", 0x00000004,
3895                               1073741824, 0x00000000, 0x00000006, t0, t1);
3896   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t3", "ac1", 0x80002435,
3897                               0x80003421, 0x00000000, 1073741824, t2, t3);
3898   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t6, $t7", "ac3", 0x76548000,
3899                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
3900   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t5, $t3", "ac0", 0x80000000,
3901                               0x80000000, 0x00000000, 0x00000001, t5, t3);
3902   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t4", "ac1", 0x00010001,
3903                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
3904   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t0, $t8", "ac2", 0x7fff7fff,
3905                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
3906   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t0, $t1", "ac0", 0x0000c420,
3907                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
3908   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t3", "ac1", 0x00000000,
3909                               0x00000000, 0x00000000, 0x55555555, t2, t3);
3910   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t4, $t1", "ac2", 0x80000000,
3911                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
3912   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
3913                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
3914   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t5, $t3", "ac0", 0x00000018,
3915                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
3916   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t4", "ac1", 0xbabababa,
3917                               0xabababab, 0x00000000, 0x00000000, t2, t4);
3918   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
3919                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
3920   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t4, $t5", "ac3", 0xfbde3976,
3921                               0x00000000, 0x00000000, 0x12349876, t4, t5);
3922   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t0, $t1", "ac0", 0x23534870,
3923                               0x00354565, 0x00000000, 0x00354565, t0, t1);
3924   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t3", "ac1", 0x980b7cde,
3925                               0x00086755, 0x00000000, 0x00086755, t2, t3);
3926   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t4, $t1", "ac2", 0x00000018,
3927                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
3928   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t6, $t7", "ac3", 0x92784656,
3929                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
3930   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t5, $t3", "ac0", 0xcacacaca,
3931                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
3932   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t4", "ac1", 0xbacabaca,
3933                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
3934   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t0, $t8", "ac2", 0x12fadeb4,
3935                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
3936   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t4, $t5", "ac3", 0x7c000790,
3937                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
3938   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t0, $t8", "ac2", 0xffffffff,
3939                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
3940   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t0, $t1", "ac0", 0x24a3291e,
3941                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
3942   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t3", "ac1", 0xdd91eebf,
3943                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
3944   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
3945                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
3946   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t6, $t7", "ac3", 0xbc1083e8,
3947                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
3948   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t5, $t3", "ac0", 0xa617cc31,
3949                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
3950   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
3951                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
3952   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t0, $t8", "ac2", 0x31458a23,
3953                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
3954   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t4, $t5", "ac3", 0x848af791,
3955                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
3956   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t0, $t1", "ac0", 0xda3bacdc,
3957                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
3958   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t3", "ac1", 0x649d5cbd,
3959                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
3960   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t4, $t1", "ac2", 0xc0c8c881,
3961                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
3962   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t6, $t7", "ac3", 0x7dd81a20,
3963                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
3964   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t5, $t3", "ac0", 0x7fff7fff,
3965                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
3966   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t4", "ac1", 0x00000555,
3967                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
3968   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t0, $t8", "ac2", 0x00000000,
3969                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
3970   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t4, $t5", "ac3", 0x80000000,
3971                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
3972   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t4", "ac1", 0x55555555,
3973                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
3974   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t0, $t8", "ac2", 0xffff8000,
3975                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
3976   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t0, $t1", "ac0", 0xabababab,
3977                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
3978   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
3979                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
3980   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac2, $t4, $t1", "ac2", 0x00000000,
3981                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
3982   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac3, $t6, $t7", "ac3", 0x00354565,
3983                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
3984   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac0, $t5, $t3", "ac0", 0x00086755,
3985                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
3986   TESTDSPINST_AC_RS_RT_NODSPC("msubu $ac1, $t2, $t4", "ac1", 0xffff8000,
3987                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
3988
3989   printf("-------- MAQ_S.W.PHR --------\n");
3990   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t4, $t5", "ac3", 0x00000000,
3991                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
3992   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t0, $t1", "ac0", 0x00000004,
3993                             1073741824, 0x00000000, 0x00000006, t0, t1);
3994   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t3", "ac1", 0x80002435,
3995                             0x80003421, 0x00000000, 1073741824, t2, t3);
3996   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t6, $t7", "ac3", 0x76548000,
3997                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
3998   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t5, $t3", "ac0", 0x80000000,
3999                             0x80000000, 0x00000000, 0x00000001, t5, t3);
4000   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t4", "ac1", 0x00010001,
4001                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
4002   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t0, $t8", "ac2", 0x7fff7fff,
4003                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
4004   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t0, $t1", "ac0", 0x0000c420,
4005                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
4006   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t3", "ac1", 0x00000000,
4007                             0x00000000, 0x00000000, 0x55555555, t2, t3);
4008   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t4, $t1", "ac2", 0x80000000,
4009                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
4010   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
4011                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
4012   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t5, $t3", "ac0", 0x00000018,
4013                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
4014   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t4", "ac1", 0xbabababa,
4015                             0xabababab, 0x00000000, 0x00000000, t2, t4);
4016   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
4017                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
4018   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t4, $t5", "ac3", 0xfbde3976,
4019                             0x00000000, 0x00000000, 0x12349876, t4, t5);
4020   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t0, $t1", "ac0", 0x23534870,
4021                             0x00354565, 0x00000000, 0x00354565, t0, t1);
4022   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t3", "ac1", 0x980b7cde,
4023                             0x00086755, 0x00000000, 0x00086755, t2, t3);
4024   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t4, $t1", "ac2", 0x00000018,
4025                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
4026   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t6, $t7", "ac3", 0x92784656,
4027                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
4028   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t5, $t3", "ac0", 0xcacacaca,
4029                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
4030   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t4", "ac1", 0xbacabaca,
4031                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
4032   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t0, $t8", "ac2", 0x12fadeb4,
4033                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
4034   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t4, $t5", "ac3", 0x7c000790,
4035                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
4036   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t0, $t8", "ac2", 0xffffffff,
4037                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
4038   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t0, $t1", "ac0", 0x24a3291e,
4039                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
4040   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t3", "ac1", 0xdd91eebf,
4041                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
4042   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
4043                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
4044   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t6, $t7", "ac3", 0xbc1083e8,
4045                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
4046   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t5, $t3", "ac0", 0xa617cc31,
4047                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
4048   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
4049                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
4050   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t0, $t8", "ac2", 0x31458a23,
4051                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
4052   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t4, $t5", "ac3", 0x848af791,
4053                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
4054   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t0, $t1", "ac0", 0xda3bacdc,
4055                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
4056   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t3", "ac1", 0x649d5cbd,
4057                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
4058   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t4, $t1", "ac2", 0xc0c8c881,
4059                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
4060   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t6, $t7", "ac3", 0x7dd81a20,
4061                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
4062   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t5, $t3", "ac0", 0x7fff7fff,
4063                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
4064   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t4", "ac1", 0x00000555,
4065                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
4066   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t0, $t8", "ac2", 0x00000000,
4067                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
4068   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t4, $t5", "ac3", 0x80000000,
4069                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
4070   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t4", "ac1", 0x55555555,
4071                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
4072   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t0, $t8", "ac2", 0xffff8000,
4073                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
4074   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t0, $t1", "ac0", 0xabababab,
4075                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
4076   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
4077                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
4078   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac2, $t4, $t1", "ac2", 0x00000000,
4079                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
4080   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac3, $t6, $t7", "ac3", 0x00354565,
4081                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
4082   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac0, $t5, $t3", "ac0", 0x00086755,
4083                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
4084   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phr $ac1, $t2, $t4", "ac1", 0xffff8000,
4085                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
4086
4087   printf("-------- MAQ_SA.W.PHR --------\n");
4088   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t4, $t5", "ac3", 0x00000000,
4089                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
4090   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t0, $t1", "ac0", 0x00000004,
4091                             1073741824, 0x00000000, 0x00000006, t0, t1);
4092   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t3", "ac1", 0x80002435,
4093                             0x80003421, 0x00000000, 1073741824, t2, t3);
4094   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t6, $t7", "ac3", 0x76548000,
4095                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
4096   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t5, $t3", "ac0", 0x80000000,
4097                             0x80000000, 0x00000000, 0x00000001, t5, t3);
4098   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t4", "ac1", 0x00010001,
4099                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
4100   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t0, $t8", "ac2", 0x7fff7fff,
4101                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
4102   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t0, $t1", "ac0", 0x0000c420,
4103                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
4104   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t3", "ac1", 0x00000000,
4105                             0x00000000, 0x00000000, 0x55555555, t2, t3);
4106   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t4, $t1", "ac2", 0x80000000,
4107                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
4108   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
4109                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
4110   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t5, $t3", "ac0", 0x00000018,
4111                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
4112   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t4", "ac1", 0xbabababa,
4113                             0xabababab, 0x00000000, 0x00000000, t2, t4);
4114   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
4115                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
4116   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t4, $t5", "ac3", 0xfbde3976,
4117                             0x00000000, 0x00000000, 0x12349876, t4, t5);
4118   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t0, $t1", "ac0", 0x23534870,
4119                             0x00354565, 0x00000000, 0x00354565, t0, t1);
4120   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t3", "ac1", 0x980b7cde,
4121                             0x00086755, 0x00000000, 0x00086755, t2, t3);
4122   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t4, $t1", "ac2", 0x00000018,
4123                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
4124   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t6, $t7", "ac3", 0x92784656,
4125                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
4126   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t5, $t3", "ac0", 0xcacacaca,
4127                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
4128   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t4", "ac1", 0xbacabaca,
4129                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
4130   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t0, $t8", "ac2", 0x12fadeb4,
4131                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
4132   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t4, $t5", "ac3", 0x7c000790,
4133                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
4134   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t0, $t8", "ac2", 0xffffffff,
4135                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
4136   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t0, $t1", "ac0", 0x24a3291e,
4137                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
4138   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t3", "ac1", 0xdd91eebf,
4139                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
4140   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
4141                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
4142   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t6, $t7", "ac3", 0xbc1083e8,
4143                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
4144   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t5, $t3", "ac0", 0xa617cc31,
4145                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
4146   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
4147                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
4148   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t0, $t8", "ac2", 0x31458a23,
4149                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
4150   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t4, $t5", "ac3", 0x848af791,
4151                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
4152   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t0, $t1", "ac0", 0xda3bacdc,
4153                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
4154   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t3", "ac1", 0x649d5cbd,
4155                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
4156   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t4, $t1", "ac2", 0xc0c8c881,
4157                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
4158   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t6, $t7", "ac3", 0x7dd81a20,
4159                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
4160   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t5, $t3", "ac0", 0x7fff7fff,
4161                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
4162   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t4", "ac1", 0x00000555,
4163                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
4164   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t0, $t8", "ac2", 0x00000000,
4165                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
4166   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t4, $t5", "ac3", 0x80000000,
4167                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
4168   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t4", "ac1", 0x55555555,
4169                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
4170   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t0, $t8", "ac2", 0xffff8000,
4171                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
4172   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t0, $t1", "ac0", 0xabababab,
4173                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
4174   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
4175                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
4176   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac2, $t4, $t1", "ac2", 0x00000000,
4177                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
4178   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac3, $t6, $t7", "ac3", 0x00354565,
4179                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
4180   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac0, $t5, $t3", "ac0", 0x00086755,
4181                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
4182   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phr $ac1, $t2, $t4", "ac1", 0xffff8000,
4183                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
4184
4185   printf("-------- MAQ_S.W.PHL --------\n");
4186   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t4, $t5", "ac3", 0x00000000,
4187                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
4188   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t0, $t1", "ac0", 0x00000004,
4189                             1073741824, 0x00000000, 0x00000006, t0, t1);
4190   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t3", "ac1", 0x80002435,
4191                             0x80003421, 0x00000000, 1073741824, t2, t3);
4192   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t6, $t7", "ac3", 0x76548000,
4193                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
4194   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t5, $t3", "ac0", 0x80000000,
4195                             0x80000000, 0x00000000, 0x00000001, t5, t3);
4196   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t4", "ac1", 0x00010001,
4197                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
4198   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t0, $t8", "ac2", 0x7fff7fff,
4199                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
4200   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t0, $t1", "ac0", 0x0000c420,
4201                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
4202   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t3", "ac1", 0x00000000,
4203                             0x00000000, 0x00000000, 0x55555555, t2, t3);
4204   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t4, $t1", "ac2", 0x80000000,
4205                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
4206   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
4207                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
4208   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t5, $t3", "ac0", 0x00000018,
4209                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
4210   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t4", "ac1", 0xbabababa,
4211                             0xabababab, 0x00000000, 0x00000000, t2, t4);
4212   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
4213                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
4214   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t4, $t5", "ac3", 0xfbde3976,
4215                             0x00000000, 0x00000000, 0x12349876, t4, t5);
4216   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t0, $t1", "ac0", 0x23534870,
4217                             0x00354565, 0x00000000, 0x00354565, t0, t1);
4218   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t3", "ac1", 0x980b7cde,
4219                             0x00086755, 0x00000000, 0x00086755, t2, t3);
4220   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t4, $t1", "ac2", 0x00000018,
4221                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
4222   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t6, $t7", "ac3", 0x92784656,
4223                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
4224   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t5, $t3", "ac0", 0xcacacaca,
4225                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
4226   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t4", "ac1", 0xbacabaca,
4227                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
4228   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t0, $t8", "ac2", 0x12fadeb4,
4229                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
4230   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t4, $t5", "ac3", 0x7c000790,
4231                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
4232   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t0, $t8", "ac2", 0xffffffff,
4233                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
4234   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t0, $t1", "ac0", 0x24a3291e,
4235                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
4236   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t3", "ac1", 0xdd91eebf,
4237                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
4238   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
4239                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
4240   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t6, $t7", "ac3", 0xbc1083e8,
4241                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
4242   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t5, $t3", "ac0", 0xa617cc31,
4243                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
4244   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
4245                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
4246   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t0, $t8", "ac2", 0x31458a23,
4247                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
4248   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t4, $t5", "ac3", 0x848af791,
4249                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
4250   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t0, $t1", "ac0", 0xda3bacdc,
4251                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
4252   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t3", "ac1", 0x649d5cbd,
4253                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
4254   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t4, $t1", "ac2", 0xc0c8c881,
4255                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
4256   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t6, $t7", "ac3", 0x7dd81a20,
4257                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
4258   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t5, $t3", "ac0", 0x7fff7fff,
4259                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
4260   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t4", "ac1", 0x00000555,
4261                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
4262   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t0, $t8", "ac2", 0x00000000,
4263                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
4264   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t4, $t5", "ac3", 0x80000000,
4265                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
4266   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t4", "ac1", 0x55555555,
4267                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
4268   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t0, $t8", "ac2", 0xffff8000,
4269                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
4270   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t0, $t1", "ac0", 0xabababab,
4271                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
4272   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
4273                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
4274   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac2, $t4, $t1", "ac2", 0x00000000,
4275                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
4276   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac3, $t6, $t7", "ac3", 0x00354565,
4277                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
4278   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac0, $t5, $t3", "ac0", 0x00086755,
4279                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
4280   TESTDSPINST_AC_RS_RT_DSPC("maq_s.w.phl $ac1, $t2, $t4", "ac1", 0xffff8000,
4281                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
4282
4283
4284   printf("-------- MAQ_SA.W.PHL --------\n");
4285   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t4, $t5", "ac3", 0x00000000,
4286                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
4287   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t0, $t1", "ac0", 0x00000004,
4288                             1073741824, 0x00000000, 0x00000006, t0, t1);
4289   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t3", "ac1", 0x80002435,
4290                             0x80003421, 0x00000000, 1073741824, t2, t3);
4291   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t6, $t7", "ac3", 0x76548000,
4292                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
4293   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t5, $t3", "ac0", 0x80000000,
4294                             0x80000000, 0x00000000, 0x00000001, t5, t3);
4295   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t4", "ac1", 0x00010001,
4296                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
4297   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t0, $t8", "ac2", 0x7fff7fff,
4298                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
4299   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t0, $t1", "ac0", 0x0000c420,
4300                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
4301   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t3", "ac1", 0x00000000,
4302                             0x00000000, 0x00000000, 0x55555555, t2, t3);
4303   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t4, $t1", "ac2", 0x80000000,
4304                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
4305   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
4306                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
4307   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t5, $t3", "ac0", 0x00000018,
4308                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
4309   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t4", "ac1", 0xbabababa,
4310                             0xabababab, 0x00000000, 0x00000000, t2, t4);
4311   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
4312                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
4313   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t4, $t5", "ac3", 0xfbde3976,
4314                             0x00000000, 0x00000000, 0x12349876, t4, t5);
4315   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t0, $t1", "ac0", 0x23534870,
4316                             0x00354565, 0x00000000, 0x00354565, t0, t1);
4317   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t3", "ac1", 0x980b7cde,
4318                             0x00086755, 0x00000000, 0x00086755, t2, t3);
4319   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t4, $t1", "ac2", 0x00000018,
4320                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
4321   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t6, $t7", "ac3", 0x92784656,
4322                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
4323   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t5, $t3", "ac0", 0xcacacaca,
4324                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
4325   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t4", "ac1", 0xbacabaca,
4326                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
4327   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t0, $t8", "ac2", 0x12fadeb4,
4328                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
4329   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t4, $t5", "ac3", 0x7c000790,
4330                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
4331   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t0, $t8", "ac2", 0xffffffff,
4332                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
4333   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t0, $t1", "ac0", 0x24a3291e,
4334                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
4335   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t3", "ac1", 0xdd91eebf,
4336                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
4337   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
4338                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
4339   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t6, $t7", "ac3", 0xbc1083e8,
4340                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
4341   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t5, $t3", "ac0", 0xa617cc31,
4342                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
4343   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
4344                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
4345   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t0, $t8", "ac2", 0x31458a23,
4346                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
4347   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t4, $t5", "ac3", 0x848af791,
4348                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
4349   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t0, $t1", "ac0", 0xda3bacdc,
4350                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
4351   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t3", "ac1", 0x649d5cbd,
4352                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
4353   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t4, $t1", "ac2", 0xc0c8c881,
4354                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
4355   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t6, $t7", "ac3", 0x7dd81a20,
4356                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
4357   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t5, $t3", "ac0", 0x7fff7fff,
4358                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
4359   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t4", "ac1", 0x00000555,
4360                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
4361   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t0, $t8", "ac2", 0x00000000,
4362                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
4363   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t4, $t5", "ac3", 0x80000000,
4364                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
4365   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t4", "ac1", 0x55555555,
4366                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
4367   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t0, $t8", "ac2", 0xffff8000,
4368                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
4369   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t0, $t1", "ac0", 0xabababab,
4370                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
4371   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
4372                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
4373   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac2, $t4, $t1", "ac2", 0x00000000,
4374                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
4375   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac3, $t6, $t7", "ac3", 0x00354565,
4376                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
4377   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac0, $t5, $t3", "ac0", 0x00086755,
4378                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
4379   TESTDSPINST_AC_RS_RT_DSPC("maq_sa.w.phl $ac1, $t2, $t4", "ac1", 0xffff8000,
4380                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
4381
4382   printf("-------- MTHI, MTLO, MFHI, MFLO --------\n");
4383   TESTDSPINST_HILO("ac0", 0x00000000, 0x00000006);
4384   TESTDSPINST_HILO("ac1", 0x00000055, 0x00000286);
4385   TESTDSPINST_HILO("ac2", 0x00000018, 0x00000fff);
4386   TESTDSPINST_HILO("ac3", 0x7fffffff, 0x7fffffff);
4387   TESTDSPINST_HILO("ac0", 0xffffffff, 0x00000001);
4388   TESTDSPINST_HILO("ac1", 0x00000001, 0xffffffff);
4389   TESTDSPINST_HILO("ac2", 0x00000002, 0x00000006);
4390   TESTDSPINST_HILO("ac3", 0x00000356, 0x00000555);
4391
4392   printf("-------- MODSUB --------\n");
4393   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t1, $t2", 0x00000000, 0x00000000,
4394                               t0, t1, t2);
4395   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t3, $t4", 0x00045fb2, 0x00000286,
4396                               t2, t3, t4);
4397   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t1, $t5", 0x00002435, 0xffff3421,
4398                               t4, t1, t5);
4399   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4400                               t6, t7, t3);
4401   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t5, $t3, $t2", 0xf973437b, 0x80000000,
4402                               t5, t3, t2);
4403   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t4, $t8", 0x00010001, 0xffffffff,
4404                               t2, t4, t8);
4405   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
4406                               t0, t8, t0);
4407   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t6, $t1", 0x0000c420, 0x00000555,
4408                               t4, t6, t1);
4409   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t3, $t4", 0x00000004, 1073741824,
4410                               t2, t3, t4);
4411   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t1, $t5", 0x80002435, 0x80003421,
4412                               t4, t1, t5);
4413   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t6, $t7, $t3", 0x76548000, 0x73468000,
4414                               t6, t7, t3);
4415   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t5, $t3, $t2", 0x80000000, 0x80000000,
4416                               t5, t3, t2);
4417   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t4, $t8", 0x00010001, 0xffffffff,
4418                               t2, t4, t8);
4419   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
4420                               t0, t8, t0);
4421   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t6, $t1", 0x0000c420, 0x00000555,
4422                               t4, t6, t1);
4423   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t1, $t2", 0x00000000, 0x00000000,
4424                               t0, t1, t2);
4425   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t3, $t4", 0x80000000, 0x80000000,
4426                               t2, t3, t4);
4427   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
4428                               t4, t1, t5);
4429   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t6, $t7, $t3", 0x00000018, 0xffff2435,
4430                               t6, t7, t3);
4431   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t5, $t3, $t2", 0xbabababa, 0xabababab,
4432                               t5, t3, t2);
4433   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4434                               t2, t4, t8);
4435   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4436                               t0, t8, t0);
4437   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t6, $t1", 0x23534870, 0x00354565,
4438                               t4, t6, t1);
4439   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4440                               t0, t1, t2);
4441   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4442                               t2, t3, t4);
4443   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4444                               t4, t1, t5);
4445   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4446                               t6, t7, t3);
4447   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4448                               t5, t3, t2);
4449   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4450                               t2, t4, t8);
4451   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4452                               t0, t8, t0);
4453   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4454                               t4, t6, t1);
4455   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4456                               t0, t1, t2);
4457   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4458                               t2, t3, t4);
4459   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4460                               t4, t1, t5);
4461   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4462                               t6, t7, t3);
4463   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4464                               t5, t3, t2);
4465   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4466                               t2, t4, t8);
4467   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4468                               t0, t8, t0);
4469   TESTDSPINST_RD_RS_RT_NODSPC("modsub $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4470                               t4, t6, t1);
4471
4472   printf("-------- MTHLIP --------\n");
4473   TESTDSPINST_MTHLIP("mthlip $t1, $ac1", "ac1", 0xda3bacdc, 0x70974249,
4474                      0x00000000, t1,  7);
4475   TESTDSPINST_MTHLIP("mthlip $t2, $ac2", "ac2", 0x2fff0000, 0x00000001,
4476                      0xe87927cc, t2,  2);
4477   TESTDSPINST_MTHLIP("mthlip $t1, $ac1", "ac1", 0x2fff0000, 0x73741802,
4478                      0x083b3571, t1,  4);
4479   TESTDSPINST_MTHLIP("mthlip $t2, $ac2", "ac2", 0x2fff0000, 0x80003403,
4480                      0xb9743941, t2, 13);
4481   TESTDSPINST_MTHLIP("mthlip $t1, $ac1", "ac1", 0xff460000, 0x73468004,
4482                      0xbce5f924, t1,  5);
4483   TESTDSPINST_MTHLIP("mthlip $t2, $ac2", "ac2", 0x00008000, 0x80000000,
4484                      0xcc3c201c, t2, 22);
4485   TESTDSPINST_MTHLIP("mthlip $t0, $ac0", "ac0", 0x00010001, 0xffffff07,
4486                      0x1ebaf88e, t0, 31);
4487   TESTDSPINST_MTHLIP("mthlip $t3, $ac3", "ac3", 0x7fff7fff, 0x7fff7f07,
4488                      0x722d5e20, t3, 28);
4489   TESTDSPINST_MTHLIP("mthlip $t6, $ac1", "ac1", 0xffffffff, 0x00000505,
4490                      0xa1d6f791, t6,  0);
4491   TESTDSPINST_MTHLIP("mthlip $t4, $ac3", "ac3", 0xabababab, 0x00000000,
4492                      0x7b11bee7, t4, 26);
4493   TESTDSPINST_MTHLIP("mthlip $t1, $ac0", "ac0", 0xdecadeca, 0x80000000,
4494                      0xa5631488, t1, 12);
4495   TESTDSPINST_MTHLIP("mthlip $t2, $ac1", "ac1", 0xbacabaca, 0x55555555,
4496                      0xb10bcc65, t2,  1);
4497   TESTDSPINST_MTHLIP("mthlip $t3, $ac2", "ac2", 0x3545ff80, 0xffff2434,
4498                      0x73f39fca, t3, 31);
4499   TESTDSPINST_MTHLIP("mthlip $t5, $ac0", "ac0", 0x734680bc, 0xabababa3,
4500                      0x5648e540, t5, 11);
4501   TESTDSPINST_MTHLIP("mthlip $t7, $ac2", "ac2", 0xc4dbfe20, 0xfc79b4d2,
4502                      0xc54f79e6, t7, 16);
4503   TESTDSPINST_MTHLIP("mthlip $t8, $ac3", "ac3", 0x00000000, 0x00000000,
4504                      0x5fc92974, t8, 29);
4505   TESTDSPINST_MTHLIP("mthlip $t4, $ac0", "ac0", 0x55555555, 0x00354561,
4506                      0x7e08184e, t4, 13);
4507   TESTDSPINST_MTHLIP("mthlip $t5, $ac1", "ac1", 0xad80bce4, 0x00086755,
4508                      0x71c8315f, t5,  8);
4509   TESTDSPINST_MTHLIP("mthlip $t6, $ac2", "ac2", 0x7f003245, 0x8f8f8f8f,
4510                      0x9493110e, t6,  7);
4511   TESTDSPINST_MTHLIP("mthlip $t7, $ac3", "ac3", 0x93474bde, 0xeeeeeeee,
4512                      0xbb246228, t7, 21);
4513   TESTDSPINST_MTHLIP("mthlip $t8, $ac0", "ac0", 0xf97343ff, 0x1bdbdbdb,
4514                      0x339d8d88, t8,  4);
4515   TESTDSPINST_MTHLIP("mthlip $t0, $ac1", "ac1", 0x980b7cde, 0xdecadeca,
4516                      0x70974249, t0, 32);
4517   TESTDSPINST_MTHLIP("mthlip $t1, $ac2", "ac2", 0x0555adec, 0x93474bde,
4518                      0x339d8d88, t1, 33);
4519   TESTDSPINST_MTHLIP("mthlip $t1, $ac0", "ac0", 0x00000000, 0x0cd6b508,
4520                      0x12349876, t1, 12);
4521   TESTDSPINST_MTHLIP("mthlip $t2, $ac1", "ac1", 0x00000000, 0x6731e282,
4522                      0x00354565, t2,  1);
4523   TESTDSPINST_MTHLIP("mthlip $t3, $ac2", "ac2", 0xffffffff, 0xb6edf28f,
4524                      0x00086755, t3, 31);
4525   TESTDSPINST_MTHLIP("mthlip $t5, $ac0", "ac0", 0x00000000, 0x4b4ec9ca,
4526                      0x8f8f8f8f, t5, 11);
4527   TESTDSPINST_MTHLIP("mthlip $t7, $ac2", "ac2", 0xffffffff, 0xc1037fa4,
4528                      0xeeeeeeee, t7, 16);
4529   TESTDSPINST_MTHLIP("mthlip $t8, $ac3", "ac3", 0xffffffff, 0xcb4ab48f,
4530                      0x1bdbdbdb, t8, 29);
4531   TESTDSPINST_MTHLIP("mthlip $t4, $ac0", "ac0", 0xffffffff, 0xaf8f7e18,
4532                      0xbb246228, t4, 13);
4533   TESTDSPINST_MTHLIP("mthlip $t5, $ac1", "ac1", 0xffffffff, 0x87df4510,
4534                      0x339d8d88, t5,  8);
4535   TESTDSPINST_MTHLIP("mthlip $t6, $ac2", "ac2", 0xffffffff, 0xabf4e8e1,
4536                      0x70974249, t6,  7);
4537   TESTDSPINST_MTHLIP("mthlip $t7, $ac3", "ac3", 0xffffffff, 0xf4c0eeac,
4538                      0x8a8d4e7d, t7, 21);
4539   TESTDSPINST_MTHLIP("mthlip $t8, $ac0", "ac0", 0x00000000, 0x006a54f2,
4540                      0xeb1b4335, t8,  4);
4541   TESTDSPINST_MTHLIP("mthlip $t0, $ac1", "ac1", 0x00000000, 0x79f74493,
4542                      0x0cd6b508, t0, 32);
4543   TESTDSPINST_MTHLIP("mthlip $t1, $ac2", "ac2", 0xffffffff, 0x9c09e313,
4544                      0x6731e282, t1, 33);
4545
4546   printf("-------- MULEQ_S.W.PHL --------\n");
4547   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t0, $t1, $t2", 0x00000000,
4548                             0x00000000, t0, t1, t2);
4549   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t3, $t4", 0x00045fb2,
4550                             0x00000286, t2, t3, t4);
4551   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t1, $t5", 0x80002435,
4552                             0x80003421, t4, t1, t5);
4553   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t6, $t7, $t3", 0x07654cb8,
4554                             0x734680bc, t6, t7, t3);
4555   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t5, $t3, $t2", 0xf973437b,
4556                             0x80000000, t5, t3, t2);
4557   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t4, $t8", 0x00010001,
4558                             0xffffffff, t2, t4, t8);
4559   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t0, $t8, $t0", 0x7fff7fff,
4560                             0x7fff7fff, t0, t8, t0);
4561   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t6, $t1", 0x0000c420,
4562                             0x00000555, t4, t6, t1);
4563   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t3, $t4", 0x80000000,
4564                             0x80000000, t2, t3, t4);
4565   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t1, $t5", 0xaaaaaaaa,
4566                             0x55555555, t4, t1, t5);
4567   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t6, $t7, $t3", 0x00000018,
4568                             0xffff2435, t6, t7, t3);
4569   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t5, $t3, $t2", 0xbabababa,
4570                             0xabababab, t5, t3, t2);
4571   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t4, $t8", 0xf0f0f0f0,
4572                             0xfc79b4d2, t2, t4, t8);
4573   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t0, $t8, $t0", 0xfbde3976,
4574                             0x00000000, t0, t8, t0);
4575   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t6, $t1", 0x23534870,
4576                             0x00354565, t4, t6, t1);
4577   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t0, $t1, $t2", 0x980b7cde,
4578                             0x00086755, t0, t1, t2);
4579   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t3, $t4", 0x00000018,
4580                             0x8f8f8f8f, t2, t3, t4);
4581   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t1, $t5", 0x92784656,
4582                             0xeeeeeeee, t4, t1, t5);
4583   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t6, $t7, $t3", 0xcacacaca,
4584                             0x1bdbdbdb, t6, t7, t3);
4585   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t5, $t3, $t2", 0xbacabaca,
4586                             0xdecadeca, t5, t3, t2);
4587   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t4, $t8", 0x12fadeb4,
4588                             0x93474bde, t2, t4, t8);
4589   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t0, $t8, $t0", 0x7c000790,
4590                             0xfc0007ff, t0, t8, t0);
4591   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t6, $t1", 0xffffffff,
4592                             0xffffffff, t4, t6, t1);
4593   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t0, $t1, $t2", 0xf2f4df1f,
4594                             0xcb4ab48f, t0, t1, t2);
4595   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t3, $t4", 0x435f909a,
4596                             0xaf8f7e18, t2, t3, t4);
4597   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t1, $t5", 0x2106ba5f,
4598                             0x87df4510, t4, t1, t5);
4599   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t6, $t7, $t3", 0x246a6376,
4600                             0xabf4e8e1, t6, t7, t3);
4601   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t5, $t3, $t2", 0x1046a1a3,
4602                             0xf4c0eeac, t5, t3, t2);
4603   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t2, $t4, $t8", 0x638ca515,
4604                             0x006a54f2, t2, t4, t8);
4605   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t0, $t8, $t0", 0xf63e7a9d,
4606                             0x79f74493, t0, t8, t0);
4607   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phl $t4, $t6, $t1", 0xbd6845cd,
4608                             0x9c09e313, t4, t6, t1);
4609
4610   printf("-------- MULEQ_S.W.PHR --------\n");
4611   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t0, $t1, $t2", 0x00000000,
4612                             0x00000000, t0, t1, t2);
4613   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t3, $t4", 0x00045fb2,
4614                             0x00000286, t2, t3, t4);
4615   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t1, $t5", 0x80002435,
4616                             0x80003421, t4, t1, t5);
4617   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t6, $t7, $t3", 0x07654cb8,
4618                             0x734680bc, t6, t7, t3);
4619   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t5, $t3, $t2", 0xf973437b,
4620                             0x80000000, t5, t3, t2);
4621   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t4, $t8", 0x00010001,
4622                             0xffffffff, t2, t4, t8);
4623   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t0, $t8, $t0", 0x7fff7fff,
4624                             0x7fff7fff, t0, t8, t0);
4625   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t6, $t1", 0x0000c420,
4626                             0x00000555, t4, t6, t1);
4627   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t3, $t4", 0x80000000,
4628                             0x80000000, t2, t3, t4);
4629   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t1, $t5", 0xaaaaaaaa,
4630                             0x55555555, t4, t1, t5);
4631   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t6, $t7, $t3", 0x00000018,
4632                             0xffff2435, t6, t7, t3);
4633   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t5, $t3, $t2", 0xbabababa,
4634                             0xabababab, t5, t3, t2);
4635   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t4, $t8", 0xf0f0f0f0,
4636                             0xfc79b4d2, t2, t4, t8);
4637   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t0, $t8, $t0", 0xfbde3976,
4638                             0x00000000, t0, t8, t0);
4639   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t6, $t1", 0x23534870,
4640                             0x00354565, t4, t6, t1);
4641   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t0, $t1, $t2", 0x980b7cde,
4642                             0x00086755, t0, t1, t2);
4643   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t3, $t4", 0x00000018,
4644                             0x8f8f8f8f, t2, t3, t4);
4645   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t1, $t5", 0x92784656,
4646                             0xeeeeeeee, t4, t1, t5);
4647   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t6, $t7, $t3", 0xcacacaca,
4648                             0x1bdbdbdb, t6, t7, t3);
4649   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t5, $t3, $t2", 0xbacabaca,
4650                             0xdecadeca, t5, t3, t2);
4651   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t4, $t8", 0x12fadeb4,
4652                             0x93474bde, t2, t4, t8);
4653   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t0, $t8, $t0", 0x7c000790,
4654                             0xfc0007ff, t0, t8, t0);
4655   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t6, $t1", 0xffffffff,
4656                             0xffffffff, t4, t6, t1);
4657   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t0, $t1, $t2", 0xf2f4df1f,
4658                             0xcb4ab48f, t0, t1, t2);
4659   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t3, $t4", 0x435f909a,
4660                             0xaf8f7e18, t2, t3, t4);
4661   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t1, $t5", 0x2106ba5f,
4662                             0x87df4510, t4, t1, t5);
4663   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t6, $t7, $t3", 0x246a6376,
4664                             0xabf4e8e1, t6, t7, t3);
4665   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t5, $t3, $t2", 0x1046a1a3,
4666                             0xf4c0eeac, t5, t3, t2);
4667   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t2, $t4, $t8", 0x638ca515,
4668                             0x006a54f2, t2, t4, t8);
4669   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t0, $t8, $t0", 0xf63e7a9d,
4670                             0x79f74493, t0, t8, t0);
4671   TESTDSPINST_RD_RS_RT_DSPC("muleq_s.w.phr $t4, $t6, $t1", 0xbd6845cd,
4672                             0x9c09e313, t4, t6, t1);
4673
4674   printf("-------- MULEU_S.PH.QBL --------\n");
4675   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t0, $t1, $t2", 0x00000000,
4676                             0x00000000, t0, t1, t2);
4677   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t3, $t4", 0x00045fb2,
4678                             0x00000286, t2, t3, t4);
4679   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t1, $t5", 0x80002435,
4680                             0x80003421, t4, t1, t5);
4681   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t6, $t7, $t3", 0x07654cb8,
4682                             0x734680bc, t6, t7, t3);
4683   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t5, $t3, $t2", 0xf973437b,
4684                             0x80000000, t5, t3, t2);
4685   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t4, $t8", 0x00010001,
4686                             0xffffffff, t2, t4, t8);
4687   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t0, $t8, $t0", 0x7fff7fff,
4688                             0x7fff7fff, t0, t8, t0);
4689   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t6, $t1", 0x0000c420,
4690                             0x00000555, t4, t6, t1);
4691   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t3, $t4", 0x80000000,
4692                             0x80000000, t2, t3, t4);
4693   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t1, $t5", 0xaaaa8000,
4694                             0x55558000, t4, t1, t5);
4695   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t6, $t7, $t3", 0x00000018,
4696                             0xffff2435, t6, t7, t3);
4697   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t5, $t3, $t2", 0xbabababa,
4698                             0xabababab, t5, t3, t2);
4699   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t4, $t8", 0xf0f0f0f0,
4700                             0xfc79b4d2, t2, t4, t8);
4701   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t0, $t8, $t0", 0xfbde3976,
4702                             0x00000000, t0, t8, t0);
4703   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t6, $t1", 0x23534870,
4704                             0x00354565, t4, t6, t1);
4705   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t0, $t1, $t2", 0x980b7cde,
4706                             0x00086755, t0, t1, t2);
4707   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t3, $t4", 0x00000018,
4708                             0x8f8f8f8f, t2, t3, t4);
4709   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t1, $t5", 0x92784656,
4710                             0xeeeeeeee, t4, t1, t5);
4711   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t6, $t7, $t3", 0xcacacaca,
4712                             0x1bdbdbdb, t6, t7, t3);
4713   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t5, $t3, $t2", 0xbacabaca,
4714                             0xdecadeca, t5, t3, t2);
4715   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t4, $t8", 0x12fadeb4,
4716                             0x93474bde, t2, t4, t8);
4717   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t0, $t8, $t0", 0x7c000790,
4718                             0xfc0007ff, t0, t8, t0);
4719   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t6, $t1", 0xffffffff,
4720                             0xffffffff, t4, t6, t1);
4721   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t0, $t1, $t2", 0xffffffff,
4722                             0xcb4ab48f, t0, t1, t2);
4723   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t3, $t4", 0xffffffff,
4724                             0xaf8f7e18, t2, t3, t4);
4725   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t1, $t5", 0xffffffff,
4726                             0x87df4510, t4, t1, t5);
4727   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t6, $t7, $t3", 0xffffffff,
4728                             0xabf4e8e1, t6, t7, t3);
4729   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t5, $t3, $t2", 0xffffffff,
4730                             0xf4c0eeac, t5, t3, t2);
4731   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t2, $t4, $t8", 0x00000000,
4732                             0x006a54f2, t2, t4, t8);
4733   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t0, $t8, $t0", 0x00000000,
4734                             0x79f74493, t0, t8, t0);
4735   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbl $t4, $t6, $t1", 0xffffffff,
4736                             0x9c09e313, t4, t6, t1);
4737
4738   printf("-------- MULEU_S.PH.QBR --------\n");
4739   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t0, $t1, $t2", 0x00000000,
4740                             0x00000000, t0, t1, t2);
4741   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t3, $t4", 0x00045fb2,
4742                             0x00000286, t2, t3, t4);
4743   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t1, $t5", 0x80002435,
4744                             0x80003421, t4, t1, t5);
4745   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t6, $t7, $t3", 0x07654cb8,
4746                             0x734680bc, t6, t7, t3);
4747   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t5, $t3, $t2", 0xf973437b,
4748                             0x80000000, t5, t3, t2);
4749   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t4, $t8", 0x00010001,
4750                             0xffffffff, t2, t4, t8);
4751   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t0, $t8, $t0", 0x7fff7fff,
4752                             0x7fff7fff, t0, t8, t0);
4753   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t6, $t1", 0x0000c420,
4754                             0x00000555, t4, t6, t1);
4755   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t3, $t4", 0x80000000,
4756                             0x80000000, t2, t3, t4);
4757   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t1, $t5", 0xaaaa8000,
4758                             0x55558000, t4, t1, t5);
4759   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t6, $t7, $t3", 0x00000018,
4760                             0xffff2435, t6, t7, t3);
4761   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t5, $t3, $t2", 0xbabababa,
4762                             0xabababab, t5, t3, t2);
4763   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t4, $t8", 0xf0f0f0f0,
4764                             0xfc79b4d2, t2, t4, t8);
4765   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t0, $t8, $t0", 0xfbde3976,
4766                             0x00000000, t0, t8, t0);
4767   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t6, $t1", 0x23534870,
4768                             0x00354565, t4, t6, t1);
4769   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t0, $t1, $t2", 0x980b7cde,
4770                             0x00086755, t0, t1, t2);
4771   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t3, $t4", 0x00000018,
4772                             0x8f8f8f8f, t2, t3, t4);
4773   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t1, $t5", 0x92784656,
4774                             0xeeeeeeee, t4, t1, t5);
4775   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t6, $t7, $t3", 0xcacacaca,
4776                             0x1bdbdbdb, t6, t7, t3);
4777   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t5, $t3, $t2", 0xbacabaca,
4778                             0xdecadeca, t5, t3, t2);
4779   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t4, $t8", 0x12fadeb4,
4780                             0x93474bde, t2, t4, t8);
4781   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t0, $t8, $t0", 0x7c000790,
4782                             0xfc0007ff, t0, t8, t0);
4783   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t6, $t1", 0xffffffff,
4784                             0xffffffff, t4, t6, t1);
4785   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t0, $t1, $t2", 0xffffffff,
4786                             0xcb4ab48f, t0, t1, t2);
4787   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t3, $t4", 0xffffffff,
4788                             0xaf8f7e18, t2, t3, t4);
4789   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t1, $t5", 0xffffffff,
4790                             0x87df4510, t4, t1, t5);
4791   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t6, $t7, $t3", 0xffffffff,
4792                             0xabf4e8e1, t6, t7, t3);
4793   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t5, $t3, $t2", 0xffffffff,
4794                             0xf4c0eeac, t5, t3, t2);
4795   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t2, $t4, $t8", 0x00000000,
4796                             0x006a54f2, t2, t4, t8);
4797   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t0, $t8, $t0", 0x00000000,
4798                             0x79f74493, t0, t8, t0);
4799   TESTDSPINST_RD_RS_RT_DSPC("muleu_s.ph.qbr $t4, $t6, $t1", 0xffffffff,
4800                             0x9c09e313, t4, t6, t1);
4801
4802   printf("-------- MULQ_RS.PH --------\n");
4803   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
4804                             t0, t1, t2);
4805   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
4806                             t2, t3, t4);
4807   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
4808                             t4, t1, t5);
4809   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4810                             t6, t7, t3);
4811   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
4812                             t5, t3, t2);
4813   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
4814                             t2, t4, t8);
4815   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
4816                             t0, t8, t0);
4817   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
4818                             t4, t6, t1);
4819   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
4820                             t2, t3, t4);
4821   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t1, $t5", 0xaaaa8000, 0x55558000,
4822                             t4, t1, t5);
4823   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
4824                             t6, t7, t3);
4825   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
4826                             t5, t3, t2);
4827   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4828                             t2, t4, t8);
4829   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4830                             t0, t8, t0);
4831   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
4832                             t4, t6, t1);
4833   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4834                             t0, t1, t2);
4835   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4836                             t2, t3, t4);
4837   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4838                             t4, t1, t5);
4839   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4840                             t6, t7, t3);
4841   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4842                             t5, t3, t2);
4843   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4844                             t2, t4, t8);
4845   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4846                             t0, t8, t0);
4847   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4848                             t4, t6, t1);
4849   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4850                             t0, t1, t2);
4851   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4852                             t2, t3, t4);
4853   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4854                             t4, t1, t5);
4855   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4856                             t6, t7, t3);
4857   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4858                             t5, t3, t2);
4859   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4860                             t2, t4, t8);
4861   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4862                             t0, t8, t0);
4863   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4864                             t4, t6, t1);
4865
4866   printf("-------- MULSAQ_S.W.PH --------\n");
4867   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x00000000,
4868                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
4869   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x00000004,
4870                             1073741824, 0x00000000, 0x00000006, t0, t1);
4871   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x80002435,
4872                             0x80003421, 0x00000000, 1073741824, t2, t3);
4873   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x76548000,
4874                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
4875   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x80000000,
4876                             0x80000000, 0x00000000, 0x00000001, t5, t3);
4877   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t4", "ac1", 0x00010001,
4878                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
4879   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x7fff7fff,
4880                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
4881   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x0000c420,
4882                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
4883   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x00000000,
4884                             0x00000000, 0x00000000, 0x55555555, t2, t3);
4885   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t4, $t1", "ac2", 0x80000000,
4886                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
4887   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
4888                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
4889   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x00000018,
4890                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
4891   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xbabababa,
4892                             0xabababab, 0x00000000, 0x00000000, t2, t4);
4893   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
4894                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
4895   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t4, $t5", "ac3", 0xfbde3976,
4896                             0x00000000, 0x00000000, 0x12349876, t4, t5);
4897   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x23534870,
4898                             0x00354565, 0x00000000, 0x00354565, t0, t1);
4899   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x980b7cde,
4900                             0x00086755, 0x00000000, 0x00086755, t2, t3);
4901   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000018,
4902                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
4903   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x92784656,
4904                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
4905   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t5, $t3", "ac0", 0xcacacaca,
4906                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
4907   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xbacabaca,
4908                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
4909   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x12fadeb4,
4910                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
4911   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x7c000790,
4912                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
4913   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t0, $t8", "ac2", 0xffffffff,
4914                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
4915   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t0, $t1", "ac0", 0x24a3291e,
4916                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
4917   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t3", "ac1", 0xdd91eebf,
4918                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
4919   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
4920                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
4921   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t6, $t7", "ac3", 0xbc1083e8,
4922                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
4923   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t5, $t3", "ac0", 0xa617cc31,
4924                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
4925   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
4926                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
4927   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x31458a23,
4928                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
4929   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x848af791,
4930                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
4931   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t0, $t1", "ac0", 0xda3bacdc,
4932                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
4933   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t3", "ac1", 0x649d5cbd,
4934                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
4935   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t4, $t1", "ac2", 0xc0c8c881,
4936                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
4937   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x7dd81a20,
4938                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
4939   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x7fff7fff,
4940                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
4941   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t4", "ac1", 0x00000555,
4942                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
4943   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t0, $t8", "ac2", 0x00000000,
4944                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
4945   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t4, $t5", "ac3", 0x80000000,
4946                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
4947   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t4", "ac1", 0x55555555,
4948                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
4949   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t0, $t8", "ac2", 0xffff8000,
4950                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
4951   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t0, $t1", "ac0", 0xabababab,
4952                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
4953   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
4954                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
4955   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000000,
4956                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
4957   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac3, $t6, $t7", "ac3", 0x00354565,
4958                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
4959   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac0, $t5, $t3", "ac0", 0x00086755,
4960                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
4961   TESTDSPINST_AC_RS_RT_DSPC("mulsaq_s.w.ph $ac1, $t2, $t4", "ac1", 0xffff8000,
4962                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
4963
4964   printf("-------- MULT --------\n");
4965   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t4, $t5", "ac3", 0x00000000,
4966                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
4967   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t0, $t1", "ac0", 0x00000004,
4968                               1073741824, 0x00000000, 0x00000006, t0, t1);
4969   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t3", "ac1", 0x80002435,
4970                               0x80003421, 0x00000000, 1073741824, t2, t3);
4971   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t6, $t7", "ac3", 0x76548000,
4972                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
4973   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t5, $t3", "ac0", 0x80000000,
4974                               0x80000000, 0x00000000, 0x00000001, t5, t3);
4975   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t4", "ac1", 0x00010001,
4976                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
4977   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t0, $t8", "ac2", 0x7fff7fff,
4978                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
4979   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t0, $t1", "ac0", 0x0000c420,
4980                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
4981   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t3", "ac1", 0x00000000,
4982                               0x00000000, 0x00000000, 0x55555555, t2, t3);
4983   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t4, $t1", "ac2", 0x80000000,
4984                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
4985   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
4986                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
4987   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t5, $t3", "ac0", 0x00000018,
4988                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
4989   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t4", "ac1", 0xbabababa,
4990                               0xabababab, 0x00000000, 0x00000000, t2, t4);
4991   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
4992                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
4993   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t4, $t5", "ac3", 0xfbde3976,
4994                               0x00000000, 0x00000000, 0x12349876, t4, t5);
4995   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t0, $t1", "ac0", 0x23534870,
4996                               0x00354565, 0x00000000, 0x00354565, t0, t1);
4997   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t3", "ac1", 0x980b7cde,
4998                               0x00086755, 0x00000000, 0x00086755, t2, t3);
4999   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t4, $t1", "ac2", 0x00000018,
5000                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
5001   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t6, $t7", "ac3", 0x92784656,
5002                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
5003   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t5, $t3", "ac0", 0xcacacaca,
5004                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
5005   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t4", "ac1", 0xbacabaca,
5006                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
5007   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t0, $t8", "ac2", 0x12fadeb4,
5008                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
5009   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t4, $t5", "ac3", 0x7c000790,
5010                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
5011   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t0, $t8", "ac2", 0xffffffff,
5012                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
5013   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t0, $t1", "ac0", 0x24a3291e,
5014                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
5015   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t3", "ac1", 0xdd91eebf,
5016                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
5017   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
5018                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
5019   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t6, $t7", "ac3", 0xbc1083e8,
5020                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
5021   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t5, $t3", "ac0", 0xa617cc31,
5022                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
5023   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
5024                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
5025   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t0, $t8", "ac2", 0x31458a23,
5026                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
5027   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t4, $t5", "ac3", 0x848af791,
5028                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
5029   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t0, $t1", "ac0", 0xda3bacdc,
5030                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
5031   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t3", "ac1", 0x649d5cbd,
5032                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
5033   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t4, $t1", "ac2", 0xc0c8c881,
5034                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
5035   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t6, $t7", "ac3", 0x7dd81a20,
5036                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
5037   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t5, $t3", "ac0", 0x7fff7fff,
5038                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
5039   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t4", "ac1", 0x00000555,
5040                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
5041   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t0, $t8", "ac2", 0x00000000,
5042                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
5043   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t4, $t5", "ac3", 0x80000000,
5044                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
5045   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t4", "ac1", 0x55555555,
5046                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
5047   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t0, $t8", "ac2", 0xffff8000,
5048                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
5049   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t0, $t1", "ac0", 0xabababab,
5050                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
5051   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
5052                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
5053   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac2, $t4, $t1", "ac2", 0x00000000,
5054                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
5055   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac3, $t6, $t7", "ac3", 0x00354565,
5056                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
5057   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac0, $t5, $t3", "ac0", 0x00086755,
5058                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
5059   TESTDSPINST_AC_RS_RT_NODSPC("mult $ac1, $t2, $t4", "ac1", 0xffff8000,
5060                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
5061
5062   printf("-------- MULTU --------\n");
5063   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t4, $t5", "ac3", 0x00000000,
5064                               0x00000000, 0xffffffff, 0x80000000, t4, t5);
5065   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t0, $t1", "ac0", 0x00000004,
5066                               1073741824, 0x00000000, 0x00000006, t0, t1);
5067   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t3", "ac1", 0x80002435,
5068                               0x80003421, 0x00000000, 1073741824, t2, t3);
5069   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t6, $t7", "ac3", 0x76548000,
5070                               0x73468000, 0x00000000, 0x7fffffff, t6, t7);
5071   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t5, $t3", "ac0", 0x80000000,
5072                               0x80000000, 0x00000000, 0x00000001, t5, t3);
5073   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t4", "ac1", 0x00010001,
5074                               0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
5075   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t0, $t8", "ac2", 0x7fff7fff,
5076                               0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
5077   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t0, $t1", "ac0", 0x0000c420,
5078                               0x00000555, 0x00000000, 0x0fde3126, t0, t1);
5079   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t3", "ac1", 0x00000000,
5080                               0x00000000, 0x00000000, 0x55555555, t2, t3);
5081   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t4, $t1", "ac2", 0x80000000,
5082                               0x80000000, 0xffffffff, 0xffff2435, t4, t1);
5083   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
5084                               0x55555555, 0xffffffff, 0xabababab, t6, t7);
5085   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t5, $t3", "ac0", 0x00000018,
5086                               0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
5087   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t4", "ac1", 0xbabababa,
5088                               0xabababab, 0x00000000, 0x00000000, t2, t4);
5089   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
5090                               0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
5091   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t4, $t5", "ac3", 0xfbde3976,
5092                               0x00000000, 0x00000000, 0x12349876, t4, t5);
5093   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t0, $t1", "ac0", 0x23534870,
5094                               0x00354565, 0x00000000, 0x00354565, t0, t1);
5095   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t3", "ac1", 0x980b7cde,
5096                               0x00086755, 0x00000000, 0x00086755, t2, t3);
5097   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t4, $t1", "ac2", 0x00000018,
5098                               0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
5099   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t6, $t7", "ac3", 0x92784656,
5100                               0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
5101   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t5, $t3", "ac0", 0xcacacaca,
5102                               0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
5103   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t4", "ac1", 0xbacabaca,
5104                               0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
5105   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t0, $t8", "ac2", 0x12fadeb4,
5106                               0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
5107   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t4, $t5", "ac3", 0x7c000790,
5108                               0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
5109   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t0, $t8", "ac2", 0xffffffff,
5110                               0xffffffff, 0x00000000, 0x083b3571, t0, t8);
5111   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t0, $t1", "ac0", 0x24a3291e,
5112                               0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
5113   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t3", "ac1", 0xdd91eebf,
5114                               0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
5115   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
5116                               0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
5117   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t6, $t7", "ac3", 0xbc1083e8,
5118                               0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
5119   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t5, $t3", "ac0", 0xa617cc31,
5120                               0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
5121   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
5122                               0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
5123   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t0, $t8", "ac2", 0x31458a23,
5124                               0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
5125   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t4, $t5", "ac3", 0x848af791,
5126                               0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
5127   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t0, $t1", "ac0", 0xda3bacdc,
5128                               0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
5129   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t3", "ac1", 0x649d5cbd,
5130                               0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
5131   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t4, $t1", "ac2", 0xc0c8c881,
5132                               0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
5133   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t6, $t7", "ac3", 0x7dd81a20,
5134                               0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
5135   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t5, $t3", "ac0", 0x7fff7fff,
5136                               0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
5137   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t4", "ac1", 0x00000555,
5138                               0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
5139   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t0, $t8", "ac2", 0x00000000,
5140                               0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
5141   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t4, $t5", "ac3", 0x80000000,
5142                               0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
5143   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t4", "ac1", 0x55555555,
5144                               0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
5145   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t0, $t8", "ac2", 0xffff8000,
5146                               0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
5147   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t0, $t1", "ac0", 0xabababab,
5148                               0x87df4510, 0x00000000, 0x70974249, t0, t1);
5149   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
5150                               0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
5151   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac2, $t4, $t1", "ac2", 0x00000000,
5152                               0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
5153   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac3, $t6, $t7", "ac3", 0x00354565,
5154                               0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
5155   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac0, $t5, $t3", "ac0", 0x00086755,
5156                               0x79f74493, 0x00000000, 0x6731e282, t5, t3);
5157   TESTDSPINST_AC_RS_RT_NODSPC("multu $ac1, $t2, $t4", "ac1", 0xffff8000,
5158                               0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
5159
5160   printf("-------- PACKRL.PH --------\n");
5161   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t1, $t2", 0x00000000,
5162                               0x00000000, t0, t1, t2);
5163   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t3, $t4", 0x045fb232,
5164                               0x00028632, t2, t3, t4);
5165   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t1, $t5", 0xfabc3435,
5166                               0xfabc3421, t4, t1, t5);
5167   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t6, $t7, $t3", 0x07654cb8,
5168                               0x734680bc, t6, t7, t3);
5169   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t5, $t3, $t2", 0xf973437b,
5170                               0x80000000, t5, t3, t2);
5171   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t4, $t8", 0x00ff0001,
5172                               0xff01ffff, t2, t4, t8);
5173   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t8, $t0", 0x7fff7fff,
5174                               0x7fff7fff, t0, t8, t0);
5175   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t6, $t1", 0x0000c420,
5176                               0x00000555, t4, t6, t1);
5177   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t1, $t2", 0x00000000,
5178                               0x00000000, t0, t1, t2);
5179   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t3, $t4", 0x80000000,
5180                               0x80000000, t2, t3, t4);
5181   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t1, $t5", 0xaaaaaaaa,
5182                               0x55555555, t4, t1, t5);
5183   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t6, $t7, $t3", 0x00000018,
5184                               0xffff2435, t6, t7, t3);
5185   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t5, $t3, $t2", 0xbabababa,
5186                               0xabababab, t5, t3, t2);
5187   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t4, $t8", 0xf0f0f0f0,
5188                               0xfc79b4d2, t2, t4, t8);
5189   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t8, $t0", 0xfbde3976,
5190                               0x00000000, t0, t8, t0);
5191   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t6, $t1", 0x23534870,
5192                               0x00354565, t4, t6, t1);
5193   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t1, $t2", 0x980b7cde,
5194                               0x00086755, t0, t1, t2);
5195   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t3, $t4", 0x00000018,
5196                               0x8f8f8f8f, t2, t3, t4);
5197   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t1, $t5", 0x92784656,
5198                               0xeeeeeeee, t4, t1, t5);
5199   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t6, $t7, $t3", 0xcacacaca,
5200                               0x1bdbdbdb, t6, t7, t3);
5201   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t5, $t3, $t2", 0xbacabaca,
5202                               0xdecadeca, t5, t3, t2);
5203   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t4, $t8", 0x12fadeb4,
5204                               0x93474bde, t2, t4, t8);
5205   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t8, $t0", 0x7c000790,
5206                               0xfc0007ff, t0, t8, t0);
5207   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t6, $t1", 0xffffffff,
5208                               0xffffffff, t4, t6, t1);
5209   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t1, $t2", 0xf2f4df1f,
5210                               0xcb4ab48f, t0, t1, t2);
5211   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t3, $t4", 0x435f909a,
5212                               0xaf8f7e18, t2, t3, t4);
5213   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t1, $t5", 0x2106ba5f,
5214                               0x87df4510, t4, t1, t5);
5215   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t6, $t7, $t3", 0x246a6376,
5216                               0xabf4e8e1, t6, t7, t3);
5217   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t5, $t3, $t2", 0x1046a1a3,
5218                               0xf4c0eeac, t5, t3, t2);
5219   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t2, $t4, $t8", 0x638ca515,
5220                               0x006a54f2, t2, t4, t8);
5221   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t0, $t8, $t0", 0xf63e7a9d,
5222                               0x79f74493, t0, t8, t0);
5223   TESTDSPINST_RD_RS_RT_NODSPC("packrl.ph $t4, $t6, $t1", 0xbd6845cd,
5224                               0x9c09e313, t4, t6, t1);
5225
5226   printf("-------- PICK.QB --------\n");
5227   TESTDSPINST_PICK("pick.qb $t5, $t3, $t2", "cmp.eq.ph $t3, $t2", 0xf973437b,
5228                    0x807343bc, t5, t3, t2);
5229   TESTDSPINST_PICK("pick.qb $t2, $t4, $t8", "cmp.eq.ph $t4, $t8", 0x00ff0001,
5230                    0x00ff0001, t2, t4, t8);
5231   TESTDSPINST_PICK("pick.qb $t3, $t8, $t0", "cmp.eq.ph $t8, $t0", 0x7fff7fff,
5232                    0x7fff7fff, t3, t8, t0);
5233   TESTDSPINST_PICK("pick.qb $t4, $t6, $t1", "cmp.eq.ph $t6, $t1", 0x0000c420,
5234                    0x00000555, t4, t6, t1);
5235   TESTDSPINST_PICK("pick.qb $t2, $t3, $t4", "cmp.lt.ph $t3, $t4", 0xf973437b,
5236                    0x807342bc, t2, t3, t4);
5237   TESTDSPINST_PICK("pick.qb $t4, $t1, $t5", "cmp.lt.ph $t1, $t5", 0x00ff0001,
5238                    0xff0100ff, t4, t1, t5);
5239   TESTDSPINST_PICK("pick.qb $t6, $t7, $t3", "cmp.lt.ph $t7, $t3", 0x7fff7fff,
5240                    0x7fff7fff, t6, t7, t3);
5241   TESTDSPINST_PICK("pick.qb $t0, $t1, $t2", "cmp.lt.ph $t1, $t2", 0x0000c420,
5242                    0x00000555, t0, t1, t2);
5243   TESTDSPINST_PICK("pick.qb $t2, $t3, $t4", "cmp.le.ph $t3, $t4", 0xf973437b,
5244                    0x807342bc, t2, t3, t4);
5245   TESTDSPINST_PICK("pick.qb $t4, $t1, $t5", "cmp.le.ph $t1, $t5", 0x00ff0001,
5246                    0xff0100ff, t4, t1, t5);
5247   TESTDSPINST_PICK("pick.qb $t6, $t7, $t3", "cmp.le.ph $t7, $t3", 0x7fff7fff,
5248                    0x7fff7fff, t6, t7, t3);
5249   TESTDSPINST_PICK("pick.qb $t0, $t1, $t2", "cmp.le.ph $t1, $t2", 0x0000c420,
5250                    0x00000555, t0, t1, t2);
5251   TESTDSPINST_PICK("pick.qb $t5, $t3, $t2", "cmp.eq.ph $t3, $t2", 0x1046a1a3,
5252                    0xf4c0eeac, t5, t3, t2);
5253   TESTDSPINST_PICK("pick.qb $t2, $t4, $t8", "cmp.eq.ph $t4, $t8", 0x638ca515,
5254                    0x006a54f2, t2, t4, t8);
5255   TESTDSPINST_PICK("pick.qb $t3, $t8, $t0", "cmp.eq.ph $t8, $t0", 0xf63e7a9d,
5256                    0x79f74493, t3, t8, t0);
5257   TESTDSPINST_PICK("pick.qb $t4, $t6, $t1", "cmp.eq.ph $t6, $t1", 0xbd6845cd,
5258                    0x9c09e313, t4, t6, t1);
5259   TESTDSPINST_PICK("pick.qb $t2, $t3, $t4", "cmp.lt.ph $t3, $t4", 0x1046a1a3,
5260                    0xf4c0eeac, t2, t3, t4);
5261   TESTDSPINST_PICK("pick.qb $t4, $t1, $t5", "cmp.lt.ph $t1, $t5", 0x638ca515,
5262                    0x006a54f2, t4, t1, t5);
5263   TESTDSPINST_PICK("pick.qb $t6, $t7, $t3", "cmp.lt.ph $t7, $t3", 0xf63e7a9d,
5264                    0x79f74493, t6, t7, t3);
5265   TESTDSPINST_PICK("pick.qb $t0, $t1, $t2", "cmp.lt.ph $t1, $t2", 0xbd6845cd,
5266                    0x9c09e313, t0, t1, t2);
5267   TESTDSPINST_PICK("pick.qb $t2, $t3, $t4", "cmp.le.ph $t3, $t4", 0x1046a1a3,
5268                    0xf4c0eeac, t2, t3, t4);
5269   TESTDSPINST_PICK("pick.qb $t4, $t1, $t5", "cmp.le.ph $t1, $t5", 0x638ca515,
5270                    0x006a54f2, t4, t1, t5);
5271   TESTDSPINST_PICK("pick.qb $t6, $t7, $t3", "cmp.le.ph $t7, $t3", 0xf63e7a9d,
5272                    0x79f74493, t6, t7, t3);
5273   TESTDSPINST_PICK("pick.qb $t0, $t1, $t2", "cmp.le.ph $t1, $t2", 0xbd6845cd,
5274                    0x9c09e313, t0, t1, t2);
5275   TESTDSPINST_PICK("pick.qb $t5, $t3, $t2", "cmp.eq.ph $t3, $t2", 0x92784656,
5276                    0xeeeeeeee, t5, t3, t2);
5277   TESTDSPINST_PICK("pick.qb $t2, $t4, $t8", "cmp.eq.ph $t4, $t8", 0xcacacaca,
5278                    0x1bdbdbdb, t2, t4, t8);
5279   TESTDSPINST_PICK("pick.qb $t3, $t8, $t0", "cmp.eq.ph $t8, $t0", 0xbacabaca,
5280                    0xdecadeca, t3, t8, t0);
5281   TESTDSPINST_PICK("pick.qb $t4, $t6, $t1", "cmp.eq.ph $t6, $t1", 0x12fadeb4,
5282                    0x93474bde, t4, t6, t1);
5283   TESTDSPINST_PICK("pick.qb $t2, $t3, $t4", "cmp.lt.ph $t3, $t4", 0x92784656,
5284                    0xeeeeeeee, t2, t3, t4);
5285   TESTDSPINST_PICK("pick.qb $t4, $t1, $t5", "cmp.lt.ph $t1, $t5", 0xcacacaca,
5286                    0x1bdbdbdb, t4, t1, t5);
5287   TESTDSPINST_PICK("pick.qb $t6, $t7, $t3", "cmp.lt.ph $t7, $t3", 0xbacabaca,
5288                    0xdecadeca, t6, t7, t3);
5289   TESTDSPINST_PICK("pick.qb $t0, $t1, $t2", "cmp.lt.ph $t1, $t2", 0x12fadeb4,
5290                    0x93474bde, t0, t1, t2);
5291   TESTDSPINST_PICK("pick.qb $t2, $t3, $t4", "cmp.le.ph $t3, $t4", 0x92784656,
5292                    0xeeeeeeee, t2, t3, t4);
5293   TESTDSPINST_PICK("pick.qb $t4, $t1, $t5", "cmp.le.ph $t1, $t5", 0xcacacaca,
5294                    0x1bdbdbdb, t4, t1, t5);
5295   TESTDSPINST_PICK("pick.qb $t6, $t7, $t3", "cmp.le.ph $t7, $t3", 0xbacabaca,
5296                    0xdecadeca, t6, t7, t3);
5297   TESTDSPINST_PICK("pick.qb $t0, $t1, $t2", "cmp.le.ph $t1, $t2", 0x12fadeb4,
5298                    0x93474bde, t0, t1, t2);
5299
5300   printf("-------- PRECEQ.W.PHL --------\n");
5301   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t1", 0x00000000, t0, t1);
5302   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t3", 0x80003286, t2, t3);
5303   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t1", 0xfabc2435, t4, t1);
5304   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t6, $t7", 0x73468000, t6, t7);
5305   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t5, $t3", 0x80000000, t5, t3);
5306   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t4", 0xffffffff, t2, t4);
5307   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t8", 0xfff45fff, t0, t8);
5308   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t4", 0x00000555, t4, t4);
5309   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t1", 0x00005340, t0, t1);
5310   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t3", 0x80000000, t2, t3);
5311   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t1", 0x55555555, t4, t1);
5312   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t6, $t7", 0xffff2435, t6, t7);
5313   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t5, $t3", 0xabababab, t5, t3);
5314   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t4", 0xfc79b4d2, t2, t4);
5315   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t8", 0x00000000, t0, t8);
5316   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t4", 0x00354565, t4, t4);
5317   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t1", 0x00086755, t0, t1);
5318   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t3", 0x8f8f8f8f, t2, t3);
5319   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t1", 0xeeeeeeee, t4, t1);
5320   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t6, $t7", 0x1bdbdbdb, t6, t7);
5321   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t5, $t3", 0xdecadeca, t5, t3);
5322   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t4", 0x93474bde, t2, t4);
5323   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t8", 0xfc0007ff, t0, t8);
5324   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t4", 0xffffffff, t4, t4);
5325   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t1", 0xcb4ab48f, t0, t1);
5326   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t3", 0xaf8f7e18, t2, t3);
5327   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t1", 0x87df4510, t4, t1);
5328   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t6, $t7", 0xabf4e8e1, t6, t7);
5329   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t5, $t3", 0xf4c0eeac, t5, t3);
5330   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t2, $t4", 0x006a54f2, t2, t4);
5331   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t0, $t8", 0x79f74493, t0, t8);
5332   TESTDSPINST_RD_RT_NODSPC("preceq.w.phl $t4, $t4", 0x9c09e313, t4, t4);
5333
5334   printf("-------- PICK.PH --------\n");
5335   TESTDSPINST_PICK("pick.ph $t5, $t3, $t2", "cmp.eq.ph $t3, $t2", 0xf973437b,
5336                    0x807343bc, t5, t3, t2);
5337   TESTDSPINST_PICK("pick.ph $t2, $t4, $t8", "cmp.eq.ph $t4, $t8", 0x00ff0001,
5338                    0x00ff0001, t2, t4, t8);
5339   TESTDSPINST_PICK("pick.ph $t3, $t8, $t0", "cmp.eq.ph $t8, $t0", 0x7fff7fff,
5340                    0x7fff7fff, t3, t8, t0);
5341   TESTDSPINST_PICK("pick.ph $t4, $t6, $t1", "cmp.eq.ph $t6, $t1", 0x0000c420,
5342                    0x00000555, t4, t6, t1);
5343   TESTDSPINST_PICK("pick.ph $t2, $t3, $t4", "cmp.lt.ph $t3, $t4", 0xf973437b,
5344                    0x807342bc, t2, t3, t4);
5345   TESTDSPINST_PICK("pick.ph $t4, $t1, $t5", "cmp.lt.ph $t1, $t5", 0x00ff0001,
5346                    0xff0100ff, t4, t1, t5);
5347   TESTDSPINST_PICK("pick.ph $t6, $t7, $t3", "cmp.lt.ph $t7, $t3", 0x7fff7fff,
5348                    0x7fff7fff, t6, t7, t3);
5349   TESTDSPINST_PICK("pick.ph $t0, $t1, $t2", "cmp.lt.ph $t1, $t2", 0x0000c420,
5350                    0x00000555, t0, t1, t2);
5351   TESTDSPINST_PICK("pick.ph $t2, $t3, $t4", "cmp.le.ph $t3, $t4", 0xf973437b,
5352                    0x807342bc, t2, t3, t4);
5353   TESTDSPINST_PICK("pick.ph $t4, $t1, $t5", "cmp.le.ph $t1, $t5", 0x00ff0001,
5354                    0xff0100ff, t4, t1, t5);
5355   TESTDSPINST_PICK("pick.ph $t6, $t7, $t3", "cmp.le.ph $t7, $t3", 0x7fff7fff,
5356                    0x7fff7fff, t6, t7, t3);
5357   TESTDSPINST_PICK("pick.ph $t0, $t1, $t2", "cmp.le.ph $t1, $t2", 0x0000c420,
5358                    0x00000555, t0, t1, t2);
5359   TESTDSPINST_PICK("pick.ph $t5, $t3, $t2", "cmp.eq.ph $t3, $t2", 0x1046a1a3,
5360                    0xf4c0eeac, t5, t3, t2);
5361   TESTDSPINST_PICK("pick.ph $t2, $t4, $t8", "cmp.eq.ph $t4, $t8", 0x638ca515,
5362                    0x006a54f2, t2, t4, t8);
5363   TESTDSPINST_PICK("pick.ph $t3, $t8, $t0", "cmp.eq.ph $t8, $t0", 0xf63e7a9d,
5364                    0x79f74493, t3, t8, t0);
5365   TESTDSPINST_PICK("pick.ph $t4, $t6, $t1", "cmp.eq.ph $t6, $t1", 0xbd6845cd,
5366                    0x9c09e313, t4, t6, t1);
5367   TESTDSPINST_PICK("pick.ph $t2, $t3, $t4", "cmp.lt.ph $t3, $t4", 0x1046a1a3,
5368                    0xf4c0eeac, t2, t3, t4);
5369   TESTDSPINST_PICK("pick.ph $t4, $t1, $t5", "cmp.lt.ph $t1, $t5", 0x638ca515,
5370                    0x006a54f2, t4, t1, t5);
5371   TESTDSPINST_PICK("pick.ph $t6, $t7, $t3", "cmp.lt.ph $t7, $t3", 0xf63e7a9d,
5372                    0x79f74493, t6, t7, t3);
5373   TESTDSPINST_PICK("pick.ph $t0, $t1, $t2", "cmp.lt.ph $t1, $t2", 0xbd6845cd,
5374                    0x9c09e313, t0, t1, t2);
5375   TESTDSPINST_PICK("pick.ph $t2, $t3, $t4", "cmp.le.ph $t3, $t4", 0x1046a1a3,
5376                    0xf4c0eeac, t2, t3, t4);
5377   TESTDSPINST_PICK("pick.ph $t4, $t1, $t5", "cmp.le.ph $t1, $t5", 0x638ca515,
5378                    0x006a54f2, t4, t1, t5);
5379   TESTDSPINST_PICK("pick.ph $t6, $t7, $t3", "cmp.le.ph $t7, $t3", 0xf63e7a9d,
5380                    0x79f74493, t6, t7, t3);
5381   TESTDSPINST_PICK("pick.ph $t0, $t1, $t2", "cmp.le.ph $t1, $t2", 0xbd6845cd,
5382                    0x9c09e313, t0, t1, t2);
5383   TESTDSPINST_PICK("pick.ph $t5, $t3, $t2", "cmp.eq.ph $t3, $t2", 0x92784656,
5384                    0xeeeeeeee, t5, t3, t2);
5385   TESTDSPINST_PICK("pick.ph $t2, $t4, $t8", "cmp.eq.ph $t4, $t8", 0xcacacaca,
5386                    0x1bdbdbdb, t2, t4, t8);
5387   TESTDSPINST_PICK("pick.ph $t3, $t8, $t0", "cmp.eq.ph $t8, $t0", 0xbacabaca,
5388                    0xdecadeca, t3, t8, t0);
5389   TESTDSPINST_PICK("pick.ph $t4, $t6, $t1", "cmp.eq.ph $t6, $t1", 0x12fadeb4,
5390                    0x93474bde, t4, t6, t1);
5391   TESTDSPINST_PICK("pick.ph $t2, $t3, $t4", "cmp.lt.ph $t3, $t4", 0x92784656,
5392                    0xeeeeeeee, t2, t3, t4);
5393   TESTDSPINST_PICK("pick.ph $t4, $t1, $t5", "cmp.lt.ph $t1, $t5", 0xcacacaca,
5394                    0x1bdbdbdb, t4, t1, t5);
5395   TESTDSPINST_PICK("pick.ph $t6, $t7, $t3", "cmp.lt.ph $t7, $t3", 0xbacabaca,
5396                    0xdecadeca, t6, t7, t3);
5397   TESTDSPINST_PICK("pick.ph $t0, $t1, $t2", "cmp.lt.ph $t1, $t2", 0x12fadeb4,
5398                    0x93474bde, t0, t1, t2);
5399   TESTDSPINST_PICK("pick.ph $t2, $t3, $t4", "cmp.le.ph $t3, $t4", 0x92784656,
5400                    0xeeeeeeee, t2, t3, t4);
5401   TESTDSPINST_PICK("pick.ph $t4, $t1, $t5", "cmp.le.ph $t1, $t5", 0xcacacaca,
5402                    0x1bdbdbdb, t4, t1, t5);
5403   TESTDSPINST_PICK("pick.ph $t6, $t7, $t3", "cmp.le.ph $t7, $t3", 0xbacabaca,
5404                    0xdecadeca, t6, t7, t3);
5405   TESTDSPINST_PICK("pick.ph $t0, $t1, $t2", "cmp.le.ph $t1, $t2", 0x12fadeb4,
5406                    0x93474bde, t0, t1, t2);
5407
5408   printf("-------- PRECEQ.W.PHR --------\n");
5409   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t1", 0x00000000, t0, t1);
5410   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t3", 0x80003286, t2, t3);
5411   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t1", 0xfabc2435, t4, t1);
5412   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t6, $t7", 0x73468000, t6, t7);
5413   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t5, $t3", 0x80000000, t5, t3);
5414   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t4", 0xffffffff, t2, t4);
5415   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t8", 0xfff45fff, t0, t8);
5416   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t4", 0x00000555, t4, t4);
5417   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t1", 0x00005340, t0, t1);
5418   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t3", 0x80000000, t2, t3);
5419   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t1", 0x55555555, t4, t1);
5420   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t6, $t7", 0xffff2435, t6, t7);
5421   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t5, $t3", 0xabababab, t5, t3);
5422   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t4", 0xfc79b4d2, t2, t4);
5423   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t8", 0x00000000, t0, t8);
5424   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t4", 0x00354565, t4, t4);
5425   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t1", 0x00086755, t0, t1);
5426   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t3", 0x8f8f8f8f, t2, t3);
5427   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t1", 0xeeeeeeee, t4, t1);
5428   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t6, $t7", 0x1bdbdbdb, t6, t7);
5429   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t5, $t3", 0xdecadeca, t5, t3);
5430   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t4", 0x93474bde, t2, t4);
5431   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t8", 0xfc0007ff, t0, t8);
5432   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t4", 0xffffffff, t4, t4);
5433   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t1", 0xcb4ab48f, t0, t1);
5434   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t3", 0xaf8f7e18, t2, t3);
5435   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t1", 0x87df4510, t4, t1);
5436   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t6, $t7", 0xabf4e8e1, t6, t7);
5437   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t5, $t3", 0xf4c0eeac, t5, t3);
5438   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t2, $t4", 0x006a54f2, t2, t4);
5439   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t0, $t8", 0x79f74493, t0, t8);
5440   TESTDSPINST_RD_RT_NODSPC("preceq.w.phr $t4, $t4", 0x9c09e313, t4, t4);
5441
5442   printf("-------- PRECEQU.PH.QBL --------\n");
5443   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t1", 0x00000000, t0, t1);
5444   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t3", 0x80003286, t2, t3);
5445   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t1", 0xfabc2435, t4, t1);
5446   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t6, $t7", 0x73468000, t6, t7);
5447   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t5, $t3", 0x80000000, t5, t3);
5448   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t4", 0xffffffff, t2, t4);
5449   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t8", 0xfff45fff, t0, t8);
5450   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t4", 0x00000555, t4, t4);
5451   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t1", 0x00005340, t0, t1);
5452   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t3", 0x80000000, t2, t3);
5453   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t1", 0x55555555, t4, t1);
5454   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t6, $t7", 0xffff2435, t6, t7);
5455   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t5, $t3", 0xabababab, t5, t3);
5456   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t4", 0xfc79b4d2, t2, t4);
5457   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t8", 0x00000000, t0, t8);
5458   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t4", 0x00354565, t4, t4);
5459   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t1", 0x00086755, t0, t1);
5460   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t3", 0x8f8f8f8f, t2, t3);
5461   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t1", 0xeeeeeeee, t4, t1);
5462   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t6, $t7", 0x1bdbdbdb, t6, t7);
5463   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t5, $t3", 0xdecadeca, t5, t3);
5464   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t4", 0x93474bde, t2, t4);
5465   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t8", 0xfc0007ff, t0, t8);
5466   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t4", 0xffffffff, t4, t4);
5467   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t1", 0xcb4ab48f, t0, t1);
5468   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t3", 0xaf8f7e18, t2, t3);
5469   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t1", 0x87df4510, t4, t1);
5470   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t6, $t7", 0xabf4e8e1, t6, t7);
5471   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t5, $t3", 0xf4c0eeac, t5, t3);
5472   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t2, $t4", 0x006a54f2, t2, t4);
5473   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t0, $t8", 0x79f74493, t0, t8);
5474   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbl $t4, $t4", 0x9c09e313, t4, t4);
5475
5476   printf("-------- PRECEQU.PH.QBLA --------\n");
5477   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t1", 0x00000000, t0, t1);
5478   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t3", 0x80003286, t2, t3);
5479   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t1", 0xfabc2435, t4, t1);
5480   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t6, $t7", 0x73468000, t6, t7);
5481   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t5, $t3", 0x80000000, t5, t3);
5482   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t4", 0xffffffff, t2, t4);
5483   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t8", 0xfff45fff, t0, t8);
5484   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t4", 0x00000555, t4, t4);
5485   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t1", 0x00005340, t0, t1);
5486   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t3", 0x80000000, t2, t3);
5487   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t1", 0x55555555, t4, t1);
5488   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t6, $t7", 0xffff2435, t6, t7);
5489   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t5, $t3", 0xabababab, t5, t3);
5490   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t4", 0xfc79b4d2, t2, t4);
5491   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t8", 0x00000000, t0, t8);
5492   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t4", 0x00354565, t4, t4);
5493   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t1", 0x00086755, t0, t1);
5494   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t3", 0x8f8f8f8f, t2, t3);
5495   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t1", 0xeeeeeeee, t4, t1);
5496   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t6, $t7", 0x1bdbdbdb, t6, t7);
5497   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t5, $t3", 0xdecadeca, t5, t3);
5498   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t4", 0x93474bde, t2, t4);
5499   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t8", 0xfc0007ff, t0, t8);
5500   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t4", 0xffffffff, t4, t4);
5501   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t1", 0xcb4ab48f, t0, t1);
5502   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t3", 0xaf8f7e18, t2, t3);
5503   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t1", 0x87df4510, t4, t1);
5504   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t6, $t7", 0xabf4e8e1, t6, t7);
5505   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t5, $t3", 0xf4c0eeac, t5, t3);
5506   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t2, $t4", 0x006a54f2, t2, t4);
5507   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t0, $t8", 0x79f74493, t0, t8);
5508   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbla $t4, $t4", 0x9c09e313, t4, t4);
5509
5510   printf("-------- PRECEQU.PH.QBR --------\n");
5511   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t1", 0x00000000, t0, t1);
5512   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t3", 0x80003286, t2, t3);
5513   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t1", 0xfabc2435, t4, t1);
5514   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t6, $t7", 0x73468000, t6, t7);
5515   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t5, $t3", 0x80000000, t5, t3);
5516   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t4", 0xffffffff, t2, t4);
5517   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t8", 0xfff45fff, t0, t8);
5518   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t4", 0x00000555, t4, t4);
5519   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t1", 0x00005340, t0, t1);
5520   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t3", 0x80000000, t2, t3);
5521   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t1", 0x55555555, t4, t1);
5522   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t6, $t7", 0xffff2435, t6, t7);
5523   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t5, $t3", 0xabababab, t5, t3);
5524   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t4", 0xfc79b4d2, t2, t4);
5525   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t8", 0x00000000, t0, t8);
5526   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t4", 0x00354565, t4, t4);
5527   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t1", 0x00086755, t0, t1);
5528   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t3", 0x8f8f8f8f, t2, t3);
5529   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t1", 0xeeeeeeee, t4, t1);
5530   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t6, $t7", 0x1bdbdbdb, t6, t7);
5531   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t5, $t3", 0xdecadeca, t5, t3);
5532   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t4", 0x93474bde, t2, t4);
5533   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t8", 0xfc0007ff, t0, t8);
5534   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t4", 0xffffffff, t4, t4);
5535   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t1", 0xcb4ab48f, t0, t1);
5536   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t3", 0xaf8f7e18, t2, t3);
5537   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t1", 0x87df4510, t4, t1);
5538   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t6, $t7", 0xabf4e8e1, t6, t7);
5539   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t5, $t3", 0xf4c0eeac, t5, t3);
5540   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t2, $t4", 0x006a54f2, t2, t4);
5541   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t0, $t8", 0x79f74493, t0, t8);
5542   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbr $t4, $t4", 0x9c09e313, t4, t4);
5543
5544   printf("-------- PRECEQU.PH.QBRA --------\n");
5545   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t1", 0x00000000, t0, t1);
5546   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t3", 0x80003286, t2, t3);
5547   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t1", 0xfabc2435, t4, t1);
5548   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t6, $t7", 0x73468000, t6, t7);
5549   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t5, $t3", 0x80000000, t5, t3);
5550   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t4", 0xffffffff, t2, t4);
5551   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t8", 0xfff45fff, t0, t8);
5552   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t4", 0x00000555, t4, t4);
5553   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t1", 0x00005340, t0, t1);
5554   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t3", 0x80000000, t2, t3);
5555   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t1", 0x55555555, t4, t1);
5556   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t6, $t7", 0xffff2435, t6, t7);
5557   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t5, $t3", 0xabababab, t5, t3);
5558   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t4", 0xfc79b4d2, t2, t4);
5559   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t8", 0x00000000, t0, t8);
5560   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t4", 0x00354565, t4, t4);
5561   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t1", 0x00086755, t0, t1);
5562   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t3", 0x8f8f8f8f, t2, t3);
5563   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t1", 0xeeeeeeee, t4, t1);
5564   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t6, $t7", 0x1bdbdbdb, t6, t7);
5565   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t5, $t3", 0xdecadeca, t5, t3);
5566   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t4", 0x93474bde, t2, t4);
5567   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t8", 0xfc0007ff, t0, t8);
5568   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t4", 0xffffffff, t4, t4);
5569   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t1", 0xcb4ab48f, t0, t1);
5570   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t3", 0xaf8f7e18, t2, t3);
5571   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t1", 0x87df4510, t4, t1);
5572   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t6, $t7", 0xabf4e8e1, t6, t7);
5573   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t5, $t3", 0xf4c0eeac, t5, t3);
5574   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t2, $t4", 0x006a54f2, t2, t4);
5575   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t0, $t8", 0x79f74493, t0, t8);
5576   TESTDSPINST_RD_RT_NODSPC("precequ.ph.qbra $t4, $t4", 0x9c09e313, t4, t4);
5577
5578   printf("-------- PRECEU.PH.QBL --------\n");
5579   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t1", 0x00000000, t0, t1);
5580   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t3", 0x80003286, t2, t3);
5581   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t1", 0xfabc2435, t4, t1);
5582   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t6, $t7", 0x73468000, t6, t7);
5583   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t5, $t3", 0x80000000, t5, t3);
5584   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t4", 0xffffffff, t2, t4);
5585   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t8", 0xfff45fff, t0, t8);
5586   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t4", 0x00000555, t4, t4);
5587   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t1", 0x00005340, t0, t1);
5588   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t3", 0x80000000, t2, t3);
5589   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t1", 0x55555555, t4, t1);
5590   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t6, $t7", 0xffff2435, t6, t7);
5591   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t5, $t3", 0xabababab, t5, t3);
5592   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t4", 0xfc79b4d2, t2, t4);
5593   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t8", 0x00000000, t0, t8);
5594   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t4", 0x00354565, t4, t4);
5595   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t1", 0x00086755, t0, t1);
5596   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t3", 0x8f8f8f8f, t2, t3);
5597   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t1", 0xeeeeeeee, t4, t1);
5598   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t6, $t7", 0x1bdbdbdb, t6, t7);
5599   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t5, $t3", 0xdecadeca, t5, t3);
5600   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t4", 0x93474bde, t2, t4);
5601   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t8", 0xfc0007ff, t0, t8);
5602   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t4", 0xffffffff, t4, t4);
5603   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t1", 0xcb4ab48f, t0, t1);
5604   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t3", 0xaf8f7e18, t2, t3);
5605   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t1", 0x87df4510, t4, t1);
5606   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t6, $t7", 0xabf4e8e1, t6, t7);
5607   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t5, $t3", 0xf4c0eeac, t5, t3);
5608   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t2, $t4", 0x006a54f2, t2, t4);
5609   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t0, $t8", 0x79f74493, t0, t8);
5610   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbl $t4, $t4", 0x9c09e313, t4, t4);
5611
5612   printf("-------- PRECEU.PH.QBLA --------\n");
5613   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t1", 0x00000000, t0, t1);
5614   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t3", 0x80003286, t2, t3);
5615   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t1", 0xfabc2435, t4, t1);
5616   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t6, $t7", 0x73468000, t6, t7);
5617   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t5, $t3", 0x80000000, t5, t3);
5618   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t4", 0xffffffff, t2, t4);
5619   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t8", 0xfff45fff, t0, t8);
5620   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t4", 0x00000555, t4, t4);
5621   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t1", 0x00005340, t0, t1);
5622   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t3", 0x80000000, t2, t3);
5623   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t1", 0x55555555, t4, t1);
5624   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t6, $t7", 0xffff2435, t6, t7);
5625   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t5, $t3", 0xabababab, t5, t3);
5626   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t4", 0xfc79b4d2, t2, t4);
5627   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t8", 0x00000000, t0, t8);
5628   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t4", 0x00354565, t4, t4);
5629   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t1", 0x00086755, t0, t1);
5630   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t3", 0x8f8f8f8f, t2, t3);
5631   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t1", 0xeeeeeeee, t4, t1);
5632   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t6, $t7", 0x1bdbdbdb, t6, t7);
5633   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t5, $t3", 0xdecadeca, t5, t3);
5634   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t4", 0x93474bde, t2, t4);
5635   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t8", 0xfc0007ff, t0, t8);
5636   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t4", 0xffffffff, t4, t4);
5637   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t1", 0xcb4ab48f, t0, t1);
5638   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t3", 0xaf8f7e18, t2, t3);
5639   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t1", 0x87df4510, t4, t1);
5640   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t6, $t7", 0xabf4e8e1, t6, t7);
5641   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t5, $t3", 0xf4c0eeac, t5, t3);
5642   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t2, $t4", 0x006a54f2, t2, t4);
5643   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t0, $t8", 0x79f74493, t0, t8);
5644   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbla $t4, $t4", 0x9c09e313, t4, t4);
5645
5646   printf("-------- PRECEU.PH.QBR --------\n");
5647   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t1", 0x00000000, t0, t1);
5648   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t3", 0x80003286, t2, t3);
5649   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t1", 0xfabc2435, t4, t1);
5650   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t6, $t7", 0x73468000, t6, t7);
5651   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t5, $t3", 0x80000000, t5, t3);
5652   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t4", 0xffffffff, t2, t4);
5653   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t8", 0xfff45fff, t0, t8);
5654   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t4", 0x00000555, t4, t4);
5655   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t1", 0x00005340, t0, t1);
5656   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t3", 0x80000000, t2, t3);
5657   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t1", 0x55555555, t4, t1);
5658   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t6, $t7", 0xffff2435, t6, t7);
5659   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t5, $t3", 0xabababab, t5, t3);
5660   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t4", 0xfc79b4d2, t2, t4);
5661   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t8", 0x00000000, t0, t8);
5662   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t4", 0x00354565, t4, t4);
5663   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t1", 0x00086755, t0, t1);
5664   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t3", 0x8f8f8f8f, t2, t3);
5665   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t1", 0xeeeeeeee, t4, t1);
5666   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t6, $t7", 0x1bdbdbdb, t6, t7);
5667   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t5, $t3", 0xdecadeca, t5, t3);
5668   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t4", 0x93474bde, t2, t4);
5669   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t8", 0xfc0007ff, t0, t8);
5670   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t4", 0xffffffff, t4, t4);
5671   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t1", 0xcb4ab48f, t0, t1);
5672   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t3", 0xaf8f7e18, t2, t3);
5673   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t1", 0x87df4510, t4, t1);
5674   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t6, $t7", 0xabf4e8e1, t6, t7);
5675   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t5, $t3", 0xf4c0eeac, t5, t3);
5676   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t2, $t4", 0x006a54f2, t2, t4);
5677   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t0, $t8", 0x79f74493, t0, t8);
5678   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbr $t4, $t4", 0x9c09e313, t4, t4);
5679
5680   printf("-------- PRECEU.PH.QBRA --------\n");
5681   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t1", 0x00000000, t0, t1);
5682   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t3", 0x80003286, t2, t3);
5683   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t1", 0xfabc2435, t4, t1);
5684   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t6, $t7", 0x73468000, t6, t7);
5685   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t5, $t3", 0x80000000, t5, t3);
5686   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t4", 0xffffffff, t2, t4);
5687   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t8", 0xfff45fff, t0, t8);
5688   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t4", 0x00000555, t4, t4);
5689   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t1", 0x00005340, t0, t1);
5690   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t3", 0x80000000, t2, t3);
5691   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t1", 0x55555555, t4, t1);
5692   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t6, $t7", 0xffff2435, t6, t7);
5693   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t5, $t3", 0xabababab, t5, t3);
5694   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t4", 0xfc79b4d2, t2, t4);
5695   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t8", 0x00000000, t0, t8);
5696   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t4", 0x00354565, t4, t4);
5697   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t1", 0x00086755, t0, t1);
5698   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t3", 0x8f8f8f8f, t2, t3);
5699   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t1", 0xeeeeeeee, t4, t1);
5700   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t6, $t7", 0x1bdbdbdb, t6, t7);
5701   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t5, $t3", 0xdecadeca, t5, t3);
5702   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t4", 0x93474bde, t2, t4);
5703   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t8", 0xfc0007ff, t0, t8);
5704   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t4", 0xffffffff, t4, t4);
5705   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t1", 0xcb4ab48f, t0, t1);
5706   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t3", 0xaf8f7e18, t2, t3);
5707   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t1", 0x87df4510, t4, t1);
5708   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t6, $t7", 0xabf4e8e1, t6, t7);
5709   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t5, $t3", 0xf4c0eeac, t5, t3);
5710   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t2, $t4", 0x006a54f2, t2, t4);
5711   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t0, $t8", 0x79f74493, t0, t8);
5712   TESTDSPINST_RD_RT_NODSPC("preceu.ph.qbra $t4, $t4", 0x9c09e313, t4, t4);
5713
5714   printf("-------- PRECRQ.QB.PH --------\n");
5715   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t1, $t2", 0x00000000,
5716                               0x00000000, t0, t1, t2);
5717   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t3, $t4", 0x045fb232,
5718                               0x00028632, t2, t3, t4);
5719   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t1, $t5", 0xfabc3435,
5720                               0xfabc3421, t4, t1, t5);
5721   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t6, $t7, $t3", 0x07654cb8,
5722                               0x734680bc, t6, t7, t3);
5723   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t5, $t3, $t2", 0xf973437b,
5724                               0x80000000, t5, t3, t2);
5725   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t4, $t8", 0x00ff0001,
5726                               0xff01ffff, t2, t4, t8);
5727   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t8, $t0", 0x7fff7fff,
5728                               0x7fff7fff, t0, t8, t0);
5729   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t6, $t1", 0x0000c420,
5730                               0x00000555, t4, t6, t1);
5731   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t1, $t2", 0x00000000,
5732                               0x00000000, t0, t1, t2);
5733   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t3, $t4", 0x80000000,
5734                               0x80000000, t2, t3, t4);
5735   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t1, $t5", 0xaaaaaaaa,
5736                               0x55555555, t4, t1, t5);
5737   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t6, $t7, $t3", 0x00000018,
5738                               0xffff2435, t6, t7, t3);
5739   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t5, $t3, $t2", 0xbabababa,
5740                               0xabababab, t5, t3, t2);
5741   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t4, $t8", 0xf0f0f0f0,
5742                               0xfc79b4d2, t2, t4, t8);
5743   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t8, $t0", 0xfbde3976,
5744                               0x00000000, t0, t8, t0);
5745   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t6, $t1", 0x23534870,
5746                               0x00354565, t4, t6, t1);
5747   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t1, $t2", 0x980b7cde,
5748                               0x00086755, t0, t1, t2);
5749   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t3, $t4", 0x00000018,
5750                               0x8f8f8f8f, t2, t3, t4);
5751   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t1, $t5", 0x92784656,
5752                               0xeeeeeeee, t4, t1, t5);
5753   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t6, $t7, $t3", 0xcacacaca,
5754                               0x1bdbdbdb, t6, t7, t3);
5755   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t5, $t3, $t2", 0xbacabaca,
5756                               0xdecadeca, t5, t3, t2);
5757   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t4, $t8", 0x12fadeb4,
5758                               0x93474bde, t2, t4, t8);
5759   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t8, $t0", 0x7c000790,
5760                               0xfc0007ff, t0, t8, t0);
5761   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t6, $t1", 0xffffffff,
5762                               0xffffffff, t4, t6, t1);
5763   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t1, $t2", 0xf2f4df1f,
5764                               0xcb4ab48f, t0, t1, t2);
5765   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t3, $t4", 0x435f909a,
5766                               0xaf8f7e18, t2, t3, t4);
5767   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t1, $t5", 0x2106ba5f,
5768                               0x87df4510, t4, t1, t5);
5769   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t6, $t7, $t3", 0x246a6376,
5770                               0xabf4e8e1, t6, t7, t3);
5771   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t5, $t3, $t2", 0x1046a1a3,
5772                               0xf4c0eeac, t5, t3, t2);
5773   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t2, $t4, $t8", 0x638ca515,
5774                               0x006a54f2, t2, t4, t8);
5775   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t0, $t8, $t0", 0xf63e7a9d,
5776                               0x79f74493, t0, t8, t0);
5777   TESTDSPINST_RD_RS_RT_NODSPC("precrq.qb.ph $t4, $t6, $t1", 0xbd6845cd,
5778                               0x9c09e313, t4, t6, t1);
5779
5780   printf("-------- PRECRQ.PH.W --------\n");
5781   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t1, $t2", 0x00000000,
5782                               0x00000000, t0, t1, t2);
5783   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t3, $t4", 0x045fb232,
5784                               0x00028632, t2, t3, t4);
5785   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t1, $t5", 0xfabc3435,
5786                               0xfabc3421, t4, t1, t5);
5787   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t6, $t7, $t3", 0x07654cb8,
5788                               0x734680bc, t6, t7, t3);
5789   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t5, $t3, $t2", 0xf973437b,
5790                               0x80000000, t5, t3, t2);
5791   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t4, $t8", 0x00ff0001,
5792                               0xff01ffff, t2, t4, t8);
5793   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t8, $t0", 0x7fff7fff,
5794                               0x7fff7fff, t0, t8, t0);
5795   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t6, $t1", 0x0000c420,
5796                               0x00000555, t4, t6, t1);
5797   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t1, $t2", 0x00000000,
5798                               0x00000000, t0, t1, t2);
5799   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t3, $t4", 0x80000000,
5800                               0x80000000, t2, t3, t4);
5801   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t1, $t5", 0xaaaaaaaa,
5802                               0x55555555, t4, t1, t5);
5803   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t6, $t7, $t3", 0x00000018,
5804                               0xffff2435, t6, t7, t3);
5805   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t5, $t3, $t2", 0xbabababa,
5806                               0xabababab, t5, t3, t2);
5807   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t4, $t8", 0xf0f0f0f0,
5808                               0xfc79b4d2, t2, t4, t8);
5809   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t8, $t0", 0xfbde3976,
5810                               0x00000000, t0, t8, t0);
5811   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t6, $t1", 0x23534870,
5812                               0x00354565, t4, t6, t1);
5813   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t1, $t2", 0x980b7cde,
5814                               0x00086755, t0, t1, t2);
5815   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t3, $t4", 0x00000018,
5816                               0x8f8f8f8f, t2, t3, t4);
5817   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t1, $t5", 0x92784656,
5818                               0xeeeeeeee, t4, t1, t5);
5819   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t6, $t7, $t3", 0xcacacaca,
5820                               0x1bdbdbdb, t6, t7, t3);
5821   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t5, $t3, $t2", 0xbacabaca,
5822                               0xdecadeca, t5, t3, t2);
5823   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t4, $t8", 0x12fadeb4,
5824                               0x93474bde, t2, t4, t8);
5825   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t8, $t0", 0x7c000790,
5826                               0xfc0007ff, t0, t8, t0);
5827   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t6, $t1", 0xffffffff,
5828                               0xffffffff, t4, t6, t1);
5829   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t1, $t2", 0xf2f4df1f,
5830                               0xcb4ab48f, t0, t1, t2);
5831   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t3, $t4", 0x435f909a,
5832                               0xaf8f7e18, t2, t3, t4);
5833   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t1, $t5", 0x2106ba5f,
5834                               0x87df4510, t4, t1, t5);
5835   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t6, $t7, $t3", 0x246a6376,
5836                               0xabf4e8e1, t6, t7, t3);
5837   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t5, $t3, $t2", 0x1046a1a3,
5838                               0xf4c0eeac, t5, t3, t2);
5839   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t2, $t4, $t8", 0x638ca515,
5840                               0x006a54f2, t2, t4, t8);
5841   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t0, $t8, $t0", 0xf63e7a9d,
5842                               0x79f74493, t0, t8, t0);
5843   TESTDSPINST_RD_RS_RT_NODSPC("precrq.ph.w $t4, $t6, $t1", 0xbd6845cd,
5844                               0x9c09e313, t4, t6, t1);
5845
5846   printf("-------- PRECRQ_RS.PH.W --------\n");
5847   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t1, $t2", 0x00000000,
5848                             0x00000000, t0, t1, t2);
5849   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t3, $t4", 0x045fb232,
5850                             0x00028632, t2, t3, t4);
5851   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t1, $t5", 0xfabc3435,
5852                             0xfabc3421, t4, t1, t5);
5853   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t6, $t7, $t3", 0x07654cb8,
5854                             0x734680bc, t6, t7, t3);
5855   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t5, $t3, $t2", 0xf973437b,
5856                             0x80000000, t5, t3, t2);
5857   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t4, $t8", 0x00ff0001,
5858                             0xff01ffff, t2, t4, t8);
5859   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t8, $t0", 0x7fffd004,
5860                             0x7fff7fff, t0, t8, t0);
5861   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t8, $t0", 0x7fffd004,
5862                             0x7fff7fff, t0, t8, t0);
5863   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t6, $t1", 0x0000c420,
5864                             0x00000555, t4, t6, t1);
5865   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t1, $t2", 0x7fff8000,
5866                             0xffff8000, t0, t1, t2);
5867   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t3, $t4", 0x80000000,
5868                             0x80000000, t2, t3, t4);
5869   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t1, $t5", 0x7fffaaaa,
5870                             0x55555555, t4, t1, t5);
5871   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t6, $t7, $t3", 0x00000018,
5872                             0xffff2435, t6, t7, t3);
5873   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t5, $t3, $t2", 0xbabababa,
5874                             0xabababab, t5, t3, t2);
5875   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t4, $t8", 0xf0f0f0f0,
5876                             0xfc79b4d2, t2, t4, t8);
5877   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t8, $t0", 0xfbde3976,
5878                             0x00000000, t0, t8, t0);
5879   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t6, $t1", 0x23534870,
5880                             0x00354565, t4, t6, t1);
5881   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t1, $t2", 0x980b7cde,
5882                             0x00086755, t0, t1, t2);
5883   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t3, $t4", 0x00000018,
5884                             0x8f8f8f8f, t2, t3, t4);
5885   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t1, $t5", 0x92784656,
5886                             0xeeeeeeee, t4, t1, t5);
5887   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t6, $t7, $t3", 0xcacacaca,
5888                             0x1bdbdbdb, t6, t7, t3);
5889   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t5, $t3, $t2", 0xbacabaca,
5890                             0xdecadeca, t5, t3, t2);
5891   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t4, $t8", 0x12fadeb4,
5892                             0x93474bde, t2, t4, t8);
5893   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t8, $t0", 0x7fffffff,
5894                             0xfc0007ff, t0, t8, t0);
5895   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t6, $t1", 0xffffffff,
5896                             0xffffffff, t4, t6, t1);
5897   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t1, $t2", 0xf2f4df1f,
5898                             0xcb4ab48f, t0, t1, t2);
5899   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t3, $t4", 0x435f909a,
5900                             0xaf8f7e18, t2, t3, t4);
5901   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t1, $t5", 0x2106ba5f,
5902                             0x87df4510, t4, t1, t5);
5903   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t6, $t7, $t3", 0x246a6376,
5904                             0xabf4e8e1, t6, t7, t3);
5905   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t5, $t3, $t2", 0x1046a1a3,
5906                             0xf4c0eeac, t5, t3, t2);
5907   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t2, $t4, $t8", 0x638ca515,
5908                             0x006a54f2, t2, t4, t8);
5909   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t0, $t8, $t0", 0xf63e7a9d,
5910                             0x79f74493, t0, t8, t0);
5911   TESTDSPINST_RD_RS_RT_DSPC("precrq_rs.ph.w $t4, $t6, $t1", 0xbd6845cd,
5912                             0x9c09e313, t4, t6, t1);
5913
5914   printf("-------- PRECRQU_S.QB.PH --------\n");
5915   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t1, $t2", 0x00000000,
5916                             0x00000000, t0, t1, t2);
5917   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t3, $t4", 0x045fb232,
5918                             0x00028632, t2, t3, t4);
5919   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t1, $t5", 0xfabc3435,
5920                             0xfabc3421, t4, t1, t5);
5921   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t6, $t7, $t3", 0x07654cb8,
5922                             0x734680bc, t6, t7, t3);
5923   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t5, $t3, $t2", 0xf973437b,
5924                             0x80000000, t5, t3, t2);
5925   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t4, $t8", 0x00ff0001,
5926                             0xff01ffff, t2, t4, t8);
5927   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t8, $t0", 0x7fff7004,
5928                             0x7fff7fff, t0, t8, t0);
5929   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t6, $t1", 0x0000c420,
5930                             0x00000555, t4, t6, t1);
5931   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t1, $t2", 0x00000000,
5932                             0x00000000, t0, t1, t2);
5933   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t3, $t4", 0x80000000,
5934                             0x80000000, t2, t3, t4);
5935   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t1, $t5", 0xaaaaaaaa,
5936                             0x55555555, t4, t1, t5);
5937   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t6, $t7, $t3", 0x00000018,
5938                             0xffff2435, t6, t7, t3);
5939   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t5, $t3, $t2", 0xbabababa,
5940                             0xabababab, t5, t3, t2);
5941   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t4, $t8", 0xf0f0f0f0,
5942                             0xfc79b4d2, t2, t4, t8);
5943   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t8, $t0", 0xfbde3976,
5944                             0x00000000, t0, t8, t0);
5945   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t6, $t1", 0x23534870,
5946                             0x00354565, t4, t6, t1);
5947   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t1, $t2", 0x980b7cde,
5948                             0x00086755, t0, t1, t2);
5949   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t3, $t4", 0x00000018,
5950                             0x8f8f8f8f, t2, t3, t4);
5951   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t1, $t5", 0x92784656,
5952                             0xeeeeeeee, t4, t1, t5);
5953   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t6, $t7, $t3", 0xcacacaca,
5954                             0x1bdbdbdb, t6, t7, t3);
5955   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t5, $t3, $t2", 0xbacabaca,
5956                             0xdecadeca, t5, t3, t2);
5957   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t4, $t8", 0x12fadeb4,
5958                             0x93474bde, t2, t4, t8);
5959   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t8, $t0", 0x7c000790,
5960                             0xfc0007ff, t0, t8, t0);
5961   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t6, $t1", 0xffffffff,
5962                             0xffffffff, t4, t6, t1);
5963   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t1, $t2", 0xf2f4df1f,
5964                             0xcb4ab48f, t0, t1, t2);
5965   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t3, $t4", 0x435f909a,
5966                             0xaf8f7e18, t2, t3, t4);
5967   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t1, $t5", 0x2106ba5f,
5968                             0x87df4510, t4, t1, t5);
5969   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t6, $t7, $t3", 0x246a6376,
5970                             0xabf4e8e1, t6, t7, t3);
5971   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t5, $t3, $t2", 0x1046a1a3,
5972                             0xf4c0eeac, t5, t3, t2);
5973   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t2, $t4, $t8", 0x638ca515,
5974                             0x006a54f2, t2, t4, t8);
5975   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t0, $t8, $t0", 0xf63e7a9d,
5976                             0x79f74493, t0, t8, t0);
5977   TESTDSPINST_RD_RS_RT_DSPC("precrqu_s.qb.ph $t4, $t6, $t1", 0xbd6845cd,
5978                             0x9c09e313, t4, t6, t1);
5979
5980   printf("-------- RADDU.W.QB --------\n");
5981   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t3, $t2", 0x55555555, t3, t2);
5982   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t4, $t1", 0xffff2435, t4, t1);
5983   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t7, $t2", 0x55555555, t7, t2);
5984   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t5, $t1", 0xffff2435, t5, t1);
5985   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t2, $t2", 0x55435755, t2, t2);
5986   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t3, $t1", 0xffff2435, t3, t1);
5987   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t1, $t2", 0x0fde3126, t1, t2);
5988   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t2, $t0", 0xabababab, t2, t0);
5989   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t7, $t3", 0x00000001, t7, t3);
5990   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t5, $t6", 1073741824, t5, t6);
5991   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t2, $t4", 0x80000000, t2, t4);
5992   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t6, $t1", 0x7fffffff, t6, t1);
5993   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t8, $t5", 0x23534870, t8, t5);
5994   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t9, $t7", 0xffffffff, t9, t7);
5995   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t3, $t8", 0xfc79b4d2, t3, t8);
5996   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t4, $t4", 0x00000000, t4, t4);
5997   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t5, $t5", 0x00000000, t5, t5);
5998   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t6, $t6", 0x12349876, t6, t6);
5999   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t7, $t7", 0x00354565, t7, t7);
6000   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t8, $t8", 0x00086755, t8, t8);
6001   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t9, $t0", 0x8f8f8f8f, t9, t0);
6002   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t1, $t1", 0xeeeeeeee, t1, t1);
6003   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t1, $t2", 0x1bdbdbdb, t1, t2);
6004   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t4, $t3", 0xdecadeca, t4, t3);
6005   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t8, $t4", 0x5fc92974, t8, t4);
6006   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t0, $t5", 0x7e08184e, t0, t5);
6007   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t1, $t6", 0x71c8315f, t1, t6);
6008   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t2, $t7", 0x9493110e, t2, t7);
6009   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t3, $t8", 0xbb246228, t3, t8);
6010   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t4, $t0", 0x339d8d88, t4, t0);
6011   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t5, $t1", 0x70974249, t5, t1);
6012   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t6, $t2", 0x8a8d4e7d, t6, t2);
6013   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t7, $t1", 0xeb1b4335, t7, t1);
6014   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t8, $t2", 0x0cd6b508, t8, t2);
6015   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t0, $t1", 0x6731e282, t0, t1);
6016   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t1, $t2", 0xb6edf28f, t1, t2);
6017   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t2, $t3", 0x4b4ec9ca, t2, t3);
6018   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t3, $t4", 0xc1037fa4, t3, t4);
6019   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t3, $t5", 0xcb4ab48f, t3, t5);
6020   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t4, $t6", 0xaf8f7e18, t4, t6);
6021   TESTDSPINST_RADDU_W_QB("raddu.w.qb $t4, $t6", 0xaf8f7e18, t4, t6);
6022
6023   printf("-------- RDDSP/WRDSP --------\n");
6024   TESTDSPINST_RDDSPWRDSP(0x35055512, 0x0000001f);
6025   TESTDSPINST_RDDSPWRDSP(0x00000000, 0x00000002);
6026   TESTDSPINST_RDDSPWRDSP(0x80003286, 0x00000004);
6027   TESTDSPINST_RDDSPWRDSP(0xfabc2435, 0x00000008);
6028   TESTDSPINST_RDDSPWRDSP(0x73468000, 0x00000016);
6029   TESTDSPINST_RDDSPWRDSP(0x80000000, 0x00000020);
6030   TESTDSPINST_RDDSPWRDSP(0xffffffff, 0x00000022);
6031   TESTDSPINST_RDDSPWRDSP(0xfff45fff, 0x0000003f);
6032   TESTDSPINST_RDDSPWRDSP(0x00000555, 0x00000013);
6033   TESTDSPINST_RDDSPWRDSP(0x23534870, 0x00000014);
6034   TESTDSPINST_RDDSPWRDSP(0x0555adec, 0x00000010);
6035   TESTDSPINST_RDDSPWRDSP(0x980b7cde, 0x00000015);
6036   TESTDSPINST_RDDSPWRDSP(0xf973437b, 0x00000011);
6037   TESTDSPINST_RDDSPWRDSP(0x93474bde, 0x00000007);
6038   TESTDSPINST_RDDSPWRDSP(0x55555555, 0x00000009);
6039   TESTDSPINST_RDDSPWRDSP(0xc4dbfe20, 0x00000006);
6040   TESTDSPINST_RDDSPWRDSP(0x734680bc, 0x00000000);
6041   TESTDSPINST_RDDSPWRDSP(0x00354565, 0x00000003);
6042   TESTDSPINST_RDDSPWRDSP(0xbacabaca, 0x00000021);
6043   TESTDSPINST_RDDSPWRDSP(0xdecadeca, 0x00000016);
6044   TESTDSPINST_RDDSPWRDSP(0x00000286, 0x00000001);
6045   TESTDSPINST_RDDSPWRDSP(0xabababab, 0x00000026);
6046
6047   printf("-------- REPL.PH --------\n");
6048   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t0, 0", 0, t0);
6049   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t1, 1", 1, t1);
6050   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t2, -1", -1, t2);
6051   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t3, -129", -129, t3);
6052   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t4, -2", -2, t4);
6053   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t0, 0x123", 0x123, t0);
6054   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t1, 0x07b", 0x07b, t1);
6055   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t2, 0x1c8", 0x1c8, t2);
6056   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t3, 0x080", 0x080, t3);
6057   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t4, 0x07f", 0x07f, t4);
6058   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t5, 0x1ff", 0x1ff, t5);
6059   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t6, 0x000", 0x000, t6);
6060   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t7, 0x177", 0x177, t7);
6061   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t0, 0x1de", 0x1de, t0);
6062   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t1, 0x018", 0x018, t1);
6063   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t2, 0x056", 0x056, t2);
6064   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t3, 0x1ca", 0x1ca, t3);
6065   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t4, 0x1ab", 0x1ab, t4);
6066   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t5, 0x1d2", 0x1d2, t5);
6067   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t6, 0x000", 0x000, t6);
6068   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t7, 0x065", 0x065, t7);
6069   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t0, 0x055", 0x055, t0);
6070   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t1, 0x08f", 0x08f, t1);
6071   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t2, 0x0ee", 0x0ee, t2);
6072   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t3, 0x1db", 0x1db, t3);
6073   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t4, 0x1ca", 0x1ca, t4);
6074   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t5, 0x1de", 0x1de, t5);
6075   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t6, 0x0ff", 0x0ff, t6);
6076   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t7, 0x0ff", 0x0ff, t7);
6077   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t0, 0x08f", 0x08f, t0);
6078   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t1, 0x118", 0x118, t1);
6079   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t2, 0x110", 0x110, t2);
6080   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t3, 0x1e1", 0x1e1, t3);
6081   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t4, 0x1ac", 0x1ac, t4);
6082   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t5, 0x0f2", 0x0f2, t5);
6083   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t6, 0x093", 0x093, t6);
6084   TESTDSPINST_RD_IMM_NODSPC("repl.ph $t7, 0x013", 0x013, t7);
6085
6086   printf("-------- REPL.QB --------\n");
6087   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t0, 0x23", 0x23, t0);
6088   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t1, 0x7b", 0x7b, t1);
6089   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t2, 0xc8", 0xc8, t2);
6090   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t3, 0x80", 0x80, t3);
6091   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t4, 0x7f", 0x7f, t4);
6092   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t5, 0xff", 0xff, t5);
6093   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t6, 0x00", 0x00, t6);
6094   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t7, 0x77", 0x77, t7);
6095   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t0, 0xde", 0xde, t0);
6096   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t1, 0x18", 0x18, t1);
6097   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t2, 0x56", 0x56, t2);
6098   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t3, 0xca", 0xca, t3);
6099   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t4, 0xab", 0xab, t4);
6100   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t5, 0xd2", 0xd2, t5);
6101   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t6, 0x00", 0x00, t6);
6102   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t7, 0x65", 0x65, t7);
6103   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t0, 0x55", 0x55, t0);
6104   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t1, 0x8f", 0x8f, t1);
6105   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t2, 0xee", 0xee, t2);
6106   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t3, 0xdb", 0xdb, t3);
6107   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t4, 0xca", 0xca, t4);
6108   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t5, 0xde", 0xde, t5);
6109   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t6, 0xff", 0xff, t6);
6110   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t7, 0xff", 0xff, t7);
6111   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t0, 0x8f", 0x8f, t0);
6112   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t1, 0x18", 0x18, t1);
6113   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t2, 0x10", 0x10, t2);
6114   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t3, 0xe1", 0xe1, t3);
6115   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t4, 0xac", 0xac, t4);
6116   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t5, 0xf2", 0xf2, t5);
6117   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t6, 0x93", 0x93, t6);
6118   TESTDSPINST_RD_IMM_NODSPC("repl.qb $t7, 0x13", 0x13, t7);
6119
6120   printf("-------- REPLV.PH --------\n");
6121   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t1", 0x00000000, t0, t1);
6122   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t3", 0x80003286, t2, t3);
6123   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t1", 0xfabc2435, t4, t1);
6124   TESTDSPINST_RD_RT_NODSPC("replv.ph $t6, $t7", 0x73468000, t6, t7);
6125   TESTDSPINST_RD_RT_NODSPC("replv.ph $t5, $t3", 0x80000000, t5, t3);
6126   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t4", 0xffffffff, t2, t4);
6127   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t8", 0xfff45fff, t0, t8);
6128   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t4", 0x00000555, t4, t4);
6129   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t1", 0x00005340, t0, t1);
6130   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t3", 0x80000000, t2, t3);
6131   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t1", 0x55555555, t4, t1);
6132   TESTDSPINST_RD_RT_NODSPC("replv.ph $t6, $t7", 0xffff2435, t6, t7);
6133   TESTDSPINST_RD_RT_NODSPC("replv.ph $t5, $t3", 0xabababab, t5, t3);
6134   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t4", 0xfc79b4d2, t2, t4);
6135   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t8", 0x00000000, t0, t8);
6136   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t4", 0x00354565, t4, t4);
6137   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t1", 0x00086755, t0, t1);
6138   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t3", 0x8f8f8f8f, t2, t3);
6139   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t1", 0xeeeeeeee, t4, t1);
6140   TESTDSPINST_RD_RT_NODSPC("replv.ph $t6, $t7", 0x1bdbdbdb, t6, t7);
6141   TESTDSPINST_RD_RT_NODSPC("replv.ph $t5, $t3", 0xdecadeca, t5, t3);
6142   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t4", 0x93474bde, t2, t4);
6143   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t8", 0xfc0007ff, t0, t8);
6144   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t4", 0xffffffff, t4, t4);
6145   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t1", 0xcb4ab48f, t0, t1);
6146   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t3", 0xaf8f7e18, t2, t3);
6147   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t1", 0x87df4510, t4, t1);
6148   TESTDSPINST_RD_RT_NODSPC("replv.ph $t6, $t7", 0xabf4e8e1, t6, t7);
6149   TESTDSPINST_RD_RT_NODSPC("replv.ph $t5, $t3", 0xf4c0eeac, t5, t3);
6150   TESTDSPINST_RD_RT_NODSPC("replv.ph $t2, $t4", 0x006a54f2, t2, t4);
6151   TESTDSPINST_RD_RT_NODSPC("replv.ph $t0, $t8", 0x79f74493, t0, t8);
6152   TESTDSPINST_RD_RT_NODSPC("replv.ph $t4, $t4", 0x9c09e313, t4, t4);
6153
6154   printf("-------- REPLV.QB --------\n");
6155   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t1", 0x00000000, t0, t1);
6156   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t3", 0x80003286, t2, t3);
6157   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t1", 0xfabc2435, t4, t1);
6158   TESTDSPINST_RD_RT_NODSPC("replv.qb $t6, $t7", 0x73468000, t6, t7);
6159   TESTDSPINST_RD_RT_NODSPC("replv.qb $t5, $t3", 0x80000000, t5, t3);
6160   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t4", 0xffffffff, t2, t4);
6161   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t8", 0xfff45fff, t0, t8);
6162   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t4", 0x00000555, t4, t4);
6163   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t1", 0x00005340, t0, t1);
6164   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t3", 0x80000000, t2, t3);
6165   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t1", 0x55555555, t4, t1);
6166   TESTDSPINST_RD_RT_NODSPC("replv.qb $t6, $t7", 0xffff2435, t6, t7);
6167   TESTDSPINST_RD_RT_NODSPC("replv.qb $t5, $t3", 0xabababab, t5, t3);
6168   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t4", 0xfc79b4d2, t2, t4);
6169   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t8", 0x00000000, t0, t8);
6170   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t4", 0x00354565, t4, t4);
6171   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t1", 0x00086755, t0, t1);
6172   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t3", 0x8f8f8f8f, t2, t3);
6173   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t1", 0xeeeeeeee, t4, t1);
6174   TESTDSPINST_RD_RT_NODSPC("replv.qb $t6, $t7", 0x1bdbdbdb, t6, t7);
6175   TESTDSPINST_RD_RT_NODSPC("replv.qb $t5, $t3", 0xdecadeca, t5, t3);
6176   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t4", 0x93474bde, t2, t4);
6177   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t8", 0xfc0007ff, t0, t8);
6178   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t4", 0xffffffff, t4, t4);
6179   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t1", 0xcb4ab48f, t0, t1);
6180   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t3", 0xaf8f7e18, t2, t3);
6181   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t1", 0x87df4510, t4, t1);
6182   TESTDSPINST_RD_RT_NODSPC("replv.qb $t6, $t7", 0xabf4e8e1, t6, t7);
6183   TESTDSPINST_RD_RT_NODSPC("replv.qb $t5, $t3", 0xf4c0eeac, t5, t3);
6184   TESTDSPINST_RD_RT_NODSPC("replv.qb $t2, $t4", 0x006a54f2, t2, t4);
6185   TESTDSPINST_RD_RT_NODSPC("replv.qb $t0, $t8", 0x79f74493, t0, t8);
6186   TESTDSPINST_RD_RT_NODSPC("replv.qb $t4, $t4", 0x9c09e313, t4, t4);
6187
6188   printf("-------- SHILO --------\n");
6189   TESTDSPINST_SHILO("ac3", 0x980b7cde, 0x0243ade5, -5);
6190   TESTDSPINST_SHILO("ac0", 0x80003286, 0x00002340, 12);
6191   TESTDSPINST_SHILO("ac1", 0x23534870, 0x0bca3470,  7);
6192   TESTDSPINST_SHILO("ac2", 0x0555adec, 0x1245bef6,  3);
6193   TESTDSPINST_SHILO("ac3", 0x980b7cde, 0x0243ade5, -5);
6194   TESTDSPINST_SHILO("ac0", 0xf97343ff, 0x0bce2434, -13);
6195   TESTDSPINST_SHILO("ac1", 0x93474bde, 0x0bcde433, 31);
6196   TESTDSPINST_SHILO("ac2", 0x7f003245, 0x000432fe, -32);
6197   TESTDSPINST_SHILO("ac3", 0xad80bce4, 0x0241bce0,  8);
6198   TESTDSPINST_SHILO("ac0", 0x55555555, 0xbcdea87a, 20);
6199   TESTDSPINST_SHILO("ac1", 0x00000000, 0x00000007, 22);
6200   TESTDSPINST_SHILO("ac2", 0xc4dbfe20, 0x000023b6, -19);
6201   TESTDSPINST_SHILO("ac3", 0x734680bc, 0x000deab5, 16);
6202   TESTDSPINST_SHILO("ac0", 0x3545ff80, 0x00000004, -2);
6203   TESTDSPINST_SHILO("ac1", 0xbacabaca, 0x00000003, -4);
6204   TESTDSPINST_SHILO("ac2", 0xdecadeca, 0x00000002, -18);
6205   TESTDSPINST_SHILO("ac3", 0xabababab, 0x00000001,  0);
6206   TESTDSPINST_SHILO("ac0", 0xffffffff, 0x00000000,  1);
6207   TESTDSPINST_SHILO("ac1", 0x7fff7fff, 0x0bce3457, 30);
6208   TESTDSPINST_SHILO("ac2", 0x00010001, 0x00ca6ced, -30);
6209   TESTDSPINST_SHILO("ac3", 0x00000080, 0x5bc34109, -24);
6210   TESTDSPINST_SHILO("ac0", 0xff460000, 0x4bacd342,  5);
6211   TESTDSPINST_SHILO("ac1", 0x2fff0000, 0x03bcde24,  9);
6212   TESTDSPINST_SHILO("ac2", 0x2fff0000, 0x02234379, 16);
6213   TESTDSPINST_SHILO("ac3", 0x2fff0000, 0x01098789, -12);
6214
6215   printf("-------- SHILOV --------\n");
6216   TESTDSP_SHILOV("ac3", 0x980b7cde, 0x0243ade5, 0x01098789, t5);
6217   TESTDSP_SHILOV("ac0", 0x80003286, 0x00002340, 0x0241bce0, t1);
6218   TESTDSP_SHILOV("ac1", 0x23534870, 0x0bca3470, 0xc4dbfe20, t1);
6219   TESTDSP_SHILOV("ac2", 0x0555adec, 0x1245bef6, 0x93474bde, t3);
6220   TESTDSP_SHILOV("ac3", 0x980b7cde, 0x0243ade5, 0x7f003245, t7);
6221   TESTDSP_SHILOV("ac0", 0xf97343ff, 0x0bce2434, 0x0241bce0, t3);
6222   TESTDSP_SHILOV("ac1", 0x93474bde, 0x0bcde433, 0x0bce3457, t4);
6223   TESTDSP_SHILOV("ac2", 0x7f003245, 0x000432fe, 0xbacabaca, t8);
6224   TESTDSP_SHILOV("ac3", 0xad80bce4, 0x0241bce0, 0x734680bc, t1);
6225   TESTDSP_SHILOV("ac0", 0x55555555, 0xbcdea87a, 0x3545ff80, t3);
6226   TESTDSP_SHILOV("ac1", 0x00000000, 0x00000007, 0x7fff7fff, t1);
6227   TESTDSP_SHILOV("ac2", 0xc4dbfe20, 0x000023b6, 0xc4dbfe20, t7);
6228   TESTDSP_SHILOV("ac3", 0x734680bc, 0x000deab5,         16, t3);
6229   TESTDSP_SHILOV("ac0", 0x3545ff80, 0x00000004,         -2, t4);
6230   TESTDSP_SHILOV("ac1", 0xbacabaca, 0x00000003,         -4, t8);
6231   TESTDSP_SHILOV("ac2", 0xdecadeca, 0x00000002,        -18, t5);
6232   TESTDSP_SHILOV("ac3", 0xabababab, 0x00000001,          0, t1);
6233   TESTDSP_SHILOV("ac0", 0xffffffff, 0x00000000,          1, t3);
6234   TESTDSP_SHILOV("ac1", 0x7fff7fff, 0x0bce3457,         30, t1);
6235   TESTDSP_SHILOV("ac2", 0x00010001, 0x00ca6ced,        -30, t7);
6236   TESTDSP_SHILOV("ac3", 0x00000080, 0x5bc34109,        -24, t3);
6237   TESTDSP_SHILOV("ac0", 0xff460000, 0x4bacd342,        -32, t4);
6238   TESTDSP_SHILOV("ac1", 0x2fff0000, 0x03bcde24,         31, t8);
6239   TESTDSP_SHILOV("ac2", 0x2fff0000, 0x02234379,         16, t5);
6240   TESTDSP_SHILOV("ac3", 0x2fff0000, 0x01098789,        -12, t5);
6241
6242   printf("-------- SHLL.PH --------\n");
6243   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t1,  0", 0x00000000,  0, t0, t1);
6244   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t3,  1", 0x2fff0000,  1, t2, t3);
6245   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t1,  2", 0x2fff0000,  2, t4, t1);
6246   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t6, $t7,  3", 0x2fff0000,  3, t6, t7);
6247   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t5, $t3,  4", 0x80000000,  4, t5, t3);
6248   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t4,  5", 0xff01ffff,  5, t2, t4);
6249   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t8,  6", 0x7fff7fff,  6, t0, t8);
6250   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t6,  7", 0x00000555,  7, t4, t6);
6251   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t1,  8", 0x00000000,  8, t0, t1);
6252   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t3,  9", 0x80000000,  9, t2, t3);
6253   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t1, 10", 0x55555555, 10, t4, t1);
6254   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t6, $t7, 11", 0xffff2435, 11, t6, t7);
6255   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t5, $t3, 12", 0xabababab, 12, t5, t3);
6256   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t4, 13", 0xfc79b4d2, 13, t2, t4);
6257   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t8, 14", 0x00000000, 14, t0, t8);
6258   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t6, 15", 0x00354565, 15, t4, t6);
6259   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t1,  0", 0x00086755,  0, t0, t1);
6260   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t3,  1", 0x8f8f8f8f,  1, t2, t3);
6261   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t1,  2", 0xeeeeeeee,  2, t4, t1);
6262   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t6, $t7,  3", 0x1bdbdbdb,  3, t6, t7);
6263   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t5, $t3,  4", 0xdecadeca,  4, t5, t3);
6264   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t4,  5", 0x93474bde,  5, t2, t4);
6265   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t8,  6", 0xfc0007ff,  6, t0, t8);
6266   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t6,  7", 0xffffffff,  7, t4, t6);
6267   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t1,  8", 0xcb4ab48f,  8, t0, t1);
6268   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t3,  9", 0xaf8f7e18,  9, t2, t3);
6269   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t1, 10", 0x87df4510, 10, t4, t1);
6270   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t6, $t7, 11", 0xabf4e8e1, 11, t6, t7);
6271   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t5, $t3, 12", 0xf4c0eeac, 12, t5, t3);
6272   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t2, $t4, 13", 0x006a54f2, 13, t2, t4);
6273   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t0, $t8, 14", 0x79f74493, 14, t0, t8);
6274   TESTDSPINST_RD_RT_SA_DSPC("shll.ph $t4, $t6, 15", 0x9c09e313, 15, t4, t6);
6275
6276   printf("-------- SHLL_S.PH --------\n");
6277   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t1,  0", 0x00000000,  0, t0, t1);
6278   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t3,  1", 0x2fff0000,  1, t2, t3);
6279   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t1,  2", 0x2fff0000,  2, t4, t1);
6280   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t6, $t7,  3", 0x2fff0000,  3, t6, t7);
6281   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t5, $t3,  4", 0x80000000,  4, t5, t3);
6282   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t4,  5", 0xff01ffff,  5, t2, t4);
6283   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t8,  6", 0x7fff7fff,  6, t0, t8);
6284   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t6,  7", 0x00000555,  7, t4, t6);
6285   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t1,  8", 0x00000000,  8, t0, t1);
6286   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t3,  9", 0x80000000,  9, t2, t3);
6287   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t1, 10", 0x55555555, 10, t4, t1);
6288   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t6, $t7, 11", 0xffff2435, 11, t6, t7);
6289   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t5, $t3, 12", 0xabababab, 12, t5, t3);
6290   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t4, 13", 0xfc79b4d2, 13, t2, t4);
6291   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t8, 14", 0x00000000, 14, t0, t8);
6292   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t6, 15", 0x00354565, 15, t4, t6);
6293   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t1,  0", 0x00086755,  0, t0, t1);
6294   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t3,  1", 0x8f8f8f8f,  1, t2, t3);
6295   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t1,  2", 0xeeeeeeee,  2, t4, t1);
6296   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t6, $t7,  3", 0x1bdbdbdb,  3, t6, t7);
6297   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t5, $t3,  4", 0xdecadeca,  4, t5, t3);
6298   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t4,  5", 0x93474bde,  5, t2, t4);
6299   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t8,  6", 0xfc0007ff,  6, t0, t8);
6300   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t6,  7", 0xffffffff,  7, t4, t6);
6301   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t1,  8", 0xcb4ab48f,  8, t0, t1);
6302   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t3,  9", 0xaf8f7e18,  9, t2, t3);
6303   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t1, 10", 0x87df4510, 10, t4, t1);
6304   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t6, $t7, 11", 0xabf4e8e1, 11, t6, t7);
6305   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t5, $t3, 12", 0xf4c0eeac, 12, t5, t3);
6306   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t2, $t4, 13", 0x006a54f2, 13, t2, t4);
6307   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t0, $t8, 14", 0x79f74493, 14, t0, t8);
6308   TESTDSPINST_RD_RT_SA_DSPC("shll_s.ph $t4, $t6, 15", 0x9c09e313, 15, t4, t6);
6309
6310   printf("-------- SHLL.QB --------\n");
6311   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t1, 1", 0x00000000, 1, t0, t1);
6312   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t3, 2", 0x2fff0000, 2, t2, t3);
6313   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t1, 3", 0x2fff0000, 3, t4, t1);
6314   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t6, $t7, 4", 0x2fff0000, 4, t6, t7);
6315   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t5, $t3, 0", 0x80000000, 0, t5, t3);
6316   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t4, 7", 0xff01ffff, 7, t2, t4);
6317   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t8, 7", 0x7fff7fff, 7, t0, t8);
6318   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t6, 0", 0x00000555, 0, t4, t6);
6319   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t1, 1", 0x00000000, 1, t0, t1);
6320   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t3, 2", 0x80000000, 2, t2, t3);
6321   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t1, 3", 0x55555555, 3, t4, t1);
6322   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t6, $t7, 4", 0xffff2435, 4, t6, t7);
6323   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t5, $t3, 5", 0xabababab, 5, t5, t3);
6324   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t4, 6", 0xfc79b4d2, 6, t2, t4);
6325   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t8, 7", 0x00000000, 7, t0, t8);
6326   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t6, 0", 0x00354565, 0, t4, t6);
6327   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t1, 1", 0x00086755, 1, t0, t1);
6328   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t3, 2", 0x8f8f8f8f, 2, t2, t3);
6329   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t1, 3", 0xeeeeeeee, 3, t4, t1);
6330   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t6, $t7, 4", 0x1bdbdbdb, 4, t6, t7);
6331   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t5, $t3, 5", 0xdecadeca, 5, t5, t3);
6332   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t4, 6", 0x93474bde, 6, t2, t4);
6333   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t8, 7", 0xfc0007ff, 7, t0, t8);
6334   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t6, 0", 0xffffffff, 0, t4, t6);
6335   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t1, 3", 0xcb4ab48f, 3, t0, t1);
6336   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t3, 4", 0xaf8f7e18, 4, t2, t3);
6337   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t1, 0", 0x87df4510, 0, t4, t1);
6338   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t6, $t7, 7", 0xabf4e8e1, 7, t6, t7);
6339   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t5, $t3, 7", 0xf4c0eeac, 7, t5, t3);
6340   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t2, $t4, 5", 0x006a54f2, 5, t2, t4);
6341   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t0, $t8, 1", 0x79f74493, 1, t0, t8);
6342   TESTDSPINST_RD_RT_SA_DSPC("shll.qb $t4, $t6, 2", 0x9c09e313, 2, t4, t6);
6343
6344   printf("-------- SHLL_S.W --------\n");
6345   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t1,  0", 0x00000000,  0, t0, t1);
6346   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t3,  1", 0x2fff0000,  1, t2, t3);
6347   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t1,  2", 0x2fff0000,  2, t4, t1);
6348   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t6, $t7,  3", 0x2fff0000,  3, t6, t7);
6349   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t5, $t3,  4", 0x80000000,  4, t5, t3);
6350   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t4,  5", 0xff01ffff,  5, t2, t4);
6351   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t8,  6", 0x7fff7fff,  6, t0, t8);
6352   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t6,  7", 0x00000555,  7, t4, t6);
6353   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t1,  8", 0x00000000,  8, t0, t1);
6354   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t3,  9", 0x80000000,  9, t2, t3);
6355   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t1, 10", 0x55555555, 10, t4, t1);
6356   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t6, $t7, 11", 0xffff2435, 11, t6, t7);
6357   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t5, $t3, 12", 0xabababab, 12, t5, t3);
6358   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t4, 13", 0xfc79b4d2, 13, t2, t4);
6359   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t8, 14", 0x00000000, 14, t0, t8);
6360   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t6, 15", 0x00354565, 15, t4, t6);
6361   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t1, 16", 0x00086755,  0, t0, t1);
6362   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t3, 17", 0x8f8f8f8f,  1, t2, t3);
6363   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t1, 18", 0xeeeeeeee,  2, t4, t1);
6364   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t6, $t7, 19", 0x1bdbdbdb,  3, t6, t7);
6365   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t5, $t3, 20", 0xdecadeca,  4, t5, t3);
6366   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t4, 21", 0x93474bde,  5, t2, t4);
6367   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t8, 22", 0xfc0007ff,  6, t0, t8);
6368   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t6, 23", 0xffffffff,  7, t4, t6);
6369   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t1, 24", 0xcb4ab48f,  8, t0, t1);
6370   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t3, 25", 0xaf8f7e18,  9, t2, t3);
6371   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t1, 26", 0x87df4510, 10, t4, t1);
6372   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t6, $t7, 27", 0xabf4e8e1, 11, t6, t7);
6373   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t5, $t3, 28", 0xf4c0eeac, 12, t5, t3);
6374   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t2, $t4, 29", 0x006a54f2, 13, t2, t4);
6375   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t0, $t8, 30", 0x79f74493, 14, t0, t8);
6376   TESTDSPINST_RD_RT_SA_DSPC("shll_s.w $t4, $t6, 31", 0x9c09e313, 15, t4, t6);
6377
6378   printf("-------- SHLLV.PH --------\n");
6379   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t1, $t2", 0x7fffffff, 0x00000000,
6380                             t0, t1, t2);
6381   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t3, $t4", 0x80000000, 0x00000000,
6382                             t2, t3, t4);
6383   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t1, $t5", 0x2fff0000, 0xfabc3401,
6384                             t4, t1, t5);
6385   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t6, $t7, $t3", 0x2fff0000, 0x73468002,
6386                             t6, t7, t3);
6387   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t5, $t3, $t2", 0x2fff0000, 0x80000003,
6388                             t5, t3, t2);
6389   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
6390                             t2, t4, t8);
6391   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
6392                             t0, t8, t0);
6393   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
6394                             t4, t6, t1);
6395   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
6396                             t0, t1, t2);
6397   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
6398                             t2, t3, t4);
6399   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
6400                             t4, t1, t5);
6401   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
6402                             t6, t7, t3);
6403   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
6404                             t5, t3, t2);
6405   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
6406                             t2, t4, t8);
6407   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
6408                             t0, t8, t0);
6409   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
6410                             t4, t6, t1);
6411   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
6412                             t0, t1, t2);
6413   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
6414                             t2, t3, t4);
6415   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
6416                             t4, t1, t5);
6417   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
6418                             t6, t7, t3);
6419   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
6420                             t5, t3, t2);
6421   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
6422                             t2, t4, t8);
6423   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
6424                             t0, t8, t0);
6425   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
6426                             t4, t6, t1);
6427   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
6428                             t0, t1, t2);
6429   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
6430                             t2, t3, t4);
6431   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
6432                             t4, t1, t5);
6433   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
6434                             t6, t7, t3);
6435   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
6436                             t5, t3, t2);
6437   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
6438                             t2, t4, t8);
6439   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
6440                             t0, t8, t0);
6441   TESTDSPINST_RD_RT_RS_DSPC("shllv.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
6442                             t4, t6, t1);
6443
6444   printf("-------- SHLLV_S.PH --------\n");
6445   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t1, $t2", 0x7fffffff, 0x00000000,
6446                             t0, t1, t2);
6447   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t3, $t4", 0x80000000, 0x00000000,
6448                             t2, t3, t4);
6449   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t1, $t5", 0x2fff0000, 0xfabc3401,
6450                             t4, t1, t5);
6451   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t6, $t7, $t3", 0x2fff0000, 0x73468002,
6452                             t6, t7, t3);
6453   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t5, $t3, $t2", 0x2fff0000, 0x80000003,
6454                             t5, t3, t2);
6455   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
6456                             t2, t4, t8);
6457   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
6458                             t0, t8, t0);
6459   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
6460                             t4, t6, t1);
6461   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
6462                             t0, t1, t2);
6463   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
6464                             t2, t3, t4);
6465   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
6466                             t4, t1, t5);
6467   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
6468                             t6, t7, t3);
6469   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
6470                             t5, t3, t2);
6471   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
6472                             t2, t4, t8);
6473   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
6474                             t0, t8, t0);
6475   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
6476                             t4, t6, t1);
6477   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
6478                             t0, t1, t2);
6479   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
6480                             t2, t3, t4);
6481   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
6482                             t4, t1, t5);
6483   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
6484                             t6, t7, t3);
6485   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
6486                             t5, t3, t2);
6487   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
6488                             t2, t4, t8);
6489   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
6490                             t0, t8, t0);
6491   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
6492                             t4, t6, t1);
6493   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
6494                             t0, t1, t2);
6495   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
6496                             t2, t3, t4);
6497   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
6498                             t4, t1, t5);
6499   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
6500                             t6, t7, t3);
6501   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
6502                             t5, t3, t2);
6503   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
6504                             t2, t4, t8);
6505   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
6506                             t0, t8, t0);
6507   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
6508                             t4, t6, t1);
6509
6510   printf("-------- SHLLV.QB --------\n");
6511   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t1, $t2", 0x7fffffff, 0x00000000,
6512                             t0, t1, t2);
6513   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t3, $t4", 0x80000000, 0x00000000,
6514                             t2, t3, t4);
6515   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t1, $t5", 0x2fff0000, 0xfabc3401,
6516                             t4, t1, t5);
6517   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t6, $t7, $t3", 0x2fff0000, 0x73468002,
6518                             t6, t7, t3);
6519   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t5, $t3, $t2", 0x2fff0000, 0x80000003,
6520                             t5, t3, t2);
6521   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
6522                             t2, t4, t8);
6523   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
6524                             t0, t8, t0);
6525   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
6526                             t4, t6, t1);
6527   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t1, $t2", 0x00000000, 0x9348572b,
6528                             t0, t1, t2);
6529   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t3, $t4", 0x80000000, 0x80023450,
6530                             t2, t3, t4);
6531   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
6532                             t4, t1, t5);
6533   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t6, $t7, $t3", 0x00000018, 0xffff2435,
6534                             t6, t7, t3);
6535   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t5, $t3, $t2", 0xbabababa, 0xabababab,
6536                             t5, t3, t2);
6537   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
6538                             t2, t4, t8);
6539   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t8, $t0", 0xfbde3976, 0x00000000,
6540                             t0, t8, t0);
6541   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t6, $t1", 0x23534870, 0x00354565,
6542                             t4, t6, t1);
6543   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t1, $t2", 0x980b7cde, 0x00086755,
6544                             t0, t1, t2);
6545   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
6546                             t2, t3, t4);
6547   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
6548                             t4, t1, t5);
6549   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
6550                             t6, t7, t3);
6551   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
6552                             t5, t3, t2);
6553   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
6554                             t2, t4, t8);
6555   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
6556                             t0, t8, t0);
6557   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t6, $t1", 0xffffffff, 0xffffffff,
6558                             t4, t6, t1);
6559   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
6560                             t0, t1, t2);
6561   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
6562                             t2, t3, t4);
6563   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
6564                             t4, t1, t5);
6565   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
6566                             t6, t7, t3);
6567   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
6568                             t5, t3, t2);
6569   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
6570                             t2, t4, t8);
6571   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
6572                             t0, t8, t0);
6573   TESTDSPINST_RD_RT_RS_DSPC("shllv.qb $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
6574                             t4, t6, t1);
6575
6576   printf("-------- SHLLV_S.W --------\n");
6577   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t1, $t2", 0x7fffffff, 0x00000000,
6578                             t0, t1, t2);
6579   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t3, $t4", 0x80000000, 0x00000000,
6580                             t2, t3, t4);
6581   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t1, $t5", 0x2fff0000, 0xfabc3401,
6582                             t4, t1, t5);
6583   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t6, $t7, $t3", 0x2fff0000, 0x73468002,
6584                             t6, t7, t3);
6585   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t5, $t3, $t2", 0x2fff0000, 0x80000003,
6586                             t5, t3, t2);
6587   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
6588                             t2, t4, t8);
6589   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
6590                             t0, t8, t0);
6591   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
6592                             t4, t6, t1);
6593   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t1, $t2", 0x00000000, 0x00000000,
6594                             t0, t1, t2);
6595   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t3, $t4", 0x80000000, 0x80000000,
6596                             t2, t3, t4);
6597   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
6598                             t4, t1, t5);
6599   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t6, $t7, $t3", 0x00000018, 0xffff2435,
6600                             t6, t7, t3);
6601   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t5, $t3, $t2", 0xbabababa, 0xabababab,
6602                             t5, t3, t2);
6603   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
6604                             t2, t4, t8);
6605   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t8, $t0", 0xfbde3976, 0x00000000,
6606                             t0, t8, t0);
6607   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t6, $t1", 0x23534870, 0x00354565,
6608                             t4, t6, t1);
6609   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t1, $t2", 0x980b7cde, 0x00086755,
6610                             t0, t1, t2);
6611   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
6612                             t2, t3, t4);
6613   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
6614                             t4, t1, t5);
6615   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
6616                             t6, t7, t3);
6617   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
6618                             t5, t3, t2);
6619   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
6620                             t2, t4, t8);
6621   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
6622                             t0, t8, t0);
6623   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t6, $t1", 0xffffffff, 0xffffffff,
6624                             t4, t6, t1);
6625   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
6626                             t0, t1, t2);
6627   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
6628                             t2, t3, t4);
6629   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
6630                             t4, t1, t5);
6631   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
6632                             t6, t7, t3);
6633   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
6634                             t5, t3, t2);
6635   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
6636                             t2, t4, t8);
6637   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
6638                             t0, t8, t0);
6639   TESTDSPINST_RD_RT_RS_DSPC("shllv_s.w $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
6640                             t4, t6, t1);
6641
6642   printf("-------- SHRA.PH --------\n");
6643   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t1,  0", 0x00000000,  0, t0, t1);
6644   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t3,  1", 0x00028632,  1, t2, t3);
6645   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t1,  2", 0xfabc3421,  2, t4, t1);
6646   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t6, $t7,  3", 0x734680bc,  3, t6, t7);
6647   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t5, $t3,  4", 0x80000000,  4, t5, t3);
6648   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t4,  5", 0xff01ffff,  5, t2, t4);
6649   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t8,  6", 0x7fff7fff,  6, t0, t8);
6650   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t6,  7", 0x00000555,  7, t4, t6);
6651   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t1,  8", 0x00000000,  8, t0, t1);
6652   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t3,  9", 0x80000000,  9, t2, t3);
6653   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t1, 10", 0x55555555, 10, t4, t1);
6654   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t6, $t7, 11", 0xffff2435, 11, t6, t7);
6655   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t5, $t3, 12", 0xabababab, 12, t5, t3);
6656   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t4, 13", 0xfc79b4d2, 13, t2, t4);
6657   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t8, 14", 0x00000000, 14, t0, t8);
6658   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t6, 15", 0x00354565, 15, t4, t6);
6659   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t1,  0", 0x00086755,  0, t0, t1);
6660   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t3,  1", 0x8f8f8f8f,  1, t2, t3);
6661   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t1,  2", 0xeeeeeeee,  2, t4, t1);
6662   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t6, $t7,  3", 0x1bdbdbdb,  3, t6, t7);
6663   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t5, $t3,  4", 0xdecadeca,  4, t5, t3);
6664   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t4,  5", 0x93474bde,  5, t2, t4);
6665   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t8,  6", 0xfc0007ff,  6, t0, t8);
6666   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t6,  7", 0xffffffff,  7, t4, t6);
6667   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t1,  8", 0xcb4ab48f,  8, t0, t1);
6668   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t3,  9", 0xaf8f7e18,  9, t2, t3);
6669   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t1, 10", 0x87df4510, 10, t4, t1);
6670   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t6, $t7, 11", 0xabf4e8e1, 11, t6, t7);
6671   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t5, $t3, 12", 0xf4c0eeac, 12, t5, t3);
6672   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t2, $t4, 13", 0x006a54f2, 13, t2, t4);
6673   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t0, $t8, 14", 0x79f74493, 14, t0, t8);
6674   TESTDSPINST_RD_RT_SA_NODSPC("shra.ph $t4, $t6, 15", 0x9c09e313, 15, t4, t6);
6675
6676   printf("-------- SHRA_R.PH --------\n");
6677   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t1,  0", 0x00000000,  0, t0,
6678                               t1);
6679   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t3,  1", 0x00028632,  1, t2,
6680                               t3);
6681   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t1,  2", 0xfabc3421,  2, t4,
6682                               t1);
6683   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t6, $t7,  3", 0x734680bc,  3, t6,
6684                               t7);
6685   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t5, $t3,  4", 0x80000000,  4, t5,
6686                               t3);
6687   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t4,  5", 0xff01ffff,  5, t2,
6688                               t4);
6689   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t8,  6", 0x7fff7fff,  6, t0,
6690                               t8);
6691   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t6,  7", 0x00000555,  7, t4,
6692                               t6);
6693   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t1,  8", 0x00000000,  8, t0,
6694                               t1);
6695   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t3,  9", 0x80000000,  9, t2,
6696                               t3);
6697   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t1, 10", 0x55555555, 10, t4,
6698                               t1);
6699   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t6, $t7, 11", 0xffff2435, 11, t6,
6700                               t7);
6701   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t5, $t3, 12", 0xabababab, 12, t5,
6702                               t3);
6703   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t4, 13", 0xfc79b4d2, 13, t2,
6704                               t4);
6705   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t8, 14", 0x00000000, 14, t0,
6706                               t8);
6707   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t6, 15", 0x00354565, 15, t4,
6708                               t6);
6709   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t1,  0", 0x00086755,  0, t0,
6710                               t1);
6711   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t3,  1", 0x8f8f8f8f,  1, t2,
6712                               t3);
6713   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t1,  2", 0xeeeeeeee,  2, t4,
6714                               t1);
6715   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t6, $t7,  3", 0x1bdbdbdb,  3, t6,
6716                               t7);
6717   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t5, $t3,  4", 0xdecadeca,  4, t5,
6718                               t3);
6719   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t4,  5", 0x93474bde,  5, t2,
6720                               t4);
6721   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t8,  6", 0xfc0007ff,  6, t0,
6722                               t8);
6723   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t6,  7", 0xffffffff,  7, t4,
6724                               t6);
6725   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t1,  8", 0xcb4ab48f,  8, t0,
6726                               t1);
6727   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t3,  9", 0xaf8f7e18,  9, t2,
6728                               t3);
6729   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t1, 10", 0x87df4510, 10, t4,
6730                               t1);
6731   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t6, $t7, 11", 0xabf4e8e1, 11, t6,
6732                               t7);
6733   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t5, $t3, 12", 0xf4c0eeac, 12, t5,
6734                               t3);
6735   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t2, $t4, 13", 0x006a54f2, 13, t2,
6736                               t4);
6737   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t0, $t8, 14", 0x79f74493, 14, t0,
6738                               t8);
6739   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.ph $t4, $t6, 15", 0x9c09e313, 15, t4,
6740                               t6);
6741
6742   printf("-------- SHRA_R.W --------\n");
6743   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3,  1", 0x2,  1, t2, t3);
6744   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3, 16", 0x80000000, 16, t2, t3);
6745   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3,  1", 0x10001,  1, t2, t3);
6746   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3, 17", 0x10001, 17, t2, t3);
6747   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3, 17", 0x80010001, 17, t2, t3);
6748   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3,  0", 0x7fffffff,  0, t2, t3);
6749   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3,  1", 0x7fffffff,  1, t2, t3);
6750   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3,  2", 0x7ffffffe,  2, t2, t3);
6751   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t1,  0", 0x00000000,  0, t0, t1);
6752   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t1,  4", 0xfabc3435,  4, t4, t1);
6753   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t6, $t7, 17", 0x07654cb8, 17, t6, t7);
6754   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t5, $t3, 31", 0xf973437b, 31, t5, t3);
6755   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t4,  8", 0x00ff0001,  8, t2, t4);
6756   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t8, 11", 0x7fff7fff, 11, t0, t8);
6757   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t6, 13", 0x0000c420, 13, t4, t6);
6758   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t1,  2", 0x00000000,  2, t0, t1);
6759   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3,  6", 0x80000000,  6, t2, t3);
6760   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t1,  7", 0xaaaaaaaa,  7, t4, t1);
6761   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t6, $t7, 19", 0x00000018, 19, t6, t7);
6762   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t5, $t3, 31", 0xbabababa, 31, t5, t3);
6763   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t4,  4", 0xf0f0f0f0,  4, t2, t4);
6764   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t8, 12", 0xfbde3976, 12, t0, t8);
6765   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t6, 10", 0x23534870, 10, t4, t6);
6766   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t1, 20", 0x980b7cde, 20, t0, t1);
6767   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3, 21", 0x00000018, 21, t2, t3);
6768   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t1, 24", 0x92784656, 24, t4, t1);
6769   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t6, $t7, 27", 0xcacacaca, 27, t6, t7);
6770   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t5, $t3,  1", 0xbacabaca,  1, t5, t3);
6771   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t4, 18", 0x12fadeb4, 18, t2, t4);
6772   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t8, 10", 0x7c000790, 10, t0, t8);
6773   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t6, 16", 0xffffffff, 16, t4, t6);
6774   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t1,  0", 0xf2f4df1f,  0, t0, t1);
6775   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t3, 14", 0x435f909a, 14, t2, t3);
6776   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t1,  5", 0x2106ba5f,  5, t4, t1);
6777   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t6, $t7,  7", 0x246a6376,  7, t6, t7);
6778   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t5, $t3,  9", 0x1046a1a3,  9, t5, t3);
6779   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t2, $t4,  3", 0x638ca515,  3, t2, t4);
6780   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t0, $t8, 15", 0xf63e7a9d, 15, t0, t8);
6781   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.w $t4, $t6, 11", 0xbd6845cd, 11, t4, t6);
6782
6783   printf("-------- SHRAV.PH --------\n");
6784   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t1, $t2", 0x7fffffff, 0x00000000,
6785                               t0, t1, t2);
6786   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t3, $t4", 0x80000000, 0x00000000,
6787                               t2, t3, t4);
6788   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
6789                               t4, t1, t5);
6790   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
6791                               t6, t7, t3);
6792   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
6793                               t5, t3, t2);
6794   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
6795                               t2, t4, t8);
6796   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
6797                               t0, t8, t0);
6798   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
6799                               t4, t6, t1);
6800   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
6801                               t0, t1, t2);
6802   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
6803                               t2, t3, t4);
6804   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
6805                               t4, t1, t5);
6806   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
6807                               t6, t7, t3);
6808   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
6809                               t5, t3, t2);
6810   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
6811                               t2, t4, t8);
6812   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
6813                               t0, t8, t0);
6814   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
6815                               t4, t6, t1);
6816   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
6817                               t0, t1, t2);
6818   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
6819                               t2, t3, t4);
6820   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
6821                               t4, t1, t5);
6822   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
6823                               t6, t7, t3);
6824   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
6825                               t5, t3, t2);
6826   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
6827                               t2, t4, t8);
6828   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
6829                               t0, t8, t0);
6830   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
6831                               t4, t6, t1);
6832   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
6833                               t0, t1, t2);
6834   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
6835                               t2, t3, t4);
6836   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
6837                               t4, t1, t5);
6838   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
6839                               t6, t7, t3);
6840   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
6841                               t5, t3, t2);
6842   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
6843                               t2, t4, t8);
6844   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
6845                               t0, t8, t0);
6846   TESTDSPINST_RD_RS_RT_NODSPC("shrav.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
6847                               t4, t6, t1);
6848
6849   printf("-------- SHRAV_R.PH --------\n");
6850   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t1, $t2", 0x7fffffff,
6851                               0x00000000, t0, t1, t2);
6852   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t3, $t4", 0x80000000,
6853                               0x00000000, t2, t3, t4);
6854   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t1, $t5", 0xfabc3435,
6855                               0xfabc3421, t4, t1, t5);
6856   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t6, $t7, $t3", 0x07654cb8,
6857                               0x734680bc, t6, t7, t3);
6858   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t5, $t3, $t2", 0xf973437b,
6859                               0x80000000, t5, t3, t2);
6860   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t4, $t8", 0x00ff0001,
6861                               0xff01ffff, t2, t4, t8);
6862   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t8, $t0", 0x7fff7004,
6863                               0x7fff7fff, t0, t8, t0);
6864   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t6, $t1", 0x0000c420,
6865                               0x00000555, t4, t6, t1);
6866   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t1, $t2", 0x00000000,
6867                               0x00000000, t0, t1, t2);
6868   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t3, $t4", 0x80000000,
6869                               0x80000000, t2, t3, t4);
6870   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t1, $t5", 0xaaaaaaaa,
6871                               0x55555555, t4, t1, t5);
6872   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t6, $t7, $t3", 0x00000018,
6873                               0xffff2435, t6, t7, t3);
6874   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t5, $t3, $t2", 0xbabababa,
6875                               0xabababab, t5, t3, t2);
6876   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t4, $t8", 0xf0f0f0f0,
6877                               0xfc79b4d2, t2, t4, t8);
6878   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t8, $t0", 0xfbde3976,
6879                               0x00000000, t0, t8, t0);
6880   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t6, $t1", 0x23534870,
6881                               0x00354565, t4, t6, t1);
6882   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t1, $t2", 0x980b7cde,
6883                               0x00086755, t0, t1, t2);
6884   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t3, $t4", 0x00000018,
6885                               0x8f8f8f8f, t2, t3, t4);
6886   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t1, $t5", 0x92784656,
6887                               0xeeeeeeee, t4, t1, t5);
6888   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t6, $t7, $t3", 0xcacacaca,
6889                               0x1bdbdbdb, t6, t7, t3);
6890   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t5, $t3, $t2", 0xbacabaca,
6891                               0xdecadeca, t5, t3, t2);
6892   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t4, $t8", 0x12fadeb4,
6893                               0x93474bde, t2, t4, t8);
6894   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t8, $t0", 0x7c000790,
6895                               0xfc0007ff, t0, t8, t0);
6896   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t6, $t1", 0xffffffff,
6897                               0xffffffff, t4, t6, t1);
6898   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t1, $t2", 0xf2f4df1f,
6899                               0xcb4ab48f, t0, t1, t2);
6900   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t3, $t4", 0x435f909a,
6901                               0xaf8f7e18, t2, t3, t4);
6902   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t1, $t5", 0x2106ba5f,
6903                               0x87df4510, t4, t1, t5);
6904   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t6, $t7, $t3", 0x246a6376,
6905                               0xabf4e8e1, t6, t7, t3);
6906   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t5, $t3, $t2", 0x1046a1a3,
6907                               0xf4c0eeac, t5, t3, t2);
6908   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t2, $t4, $t8", 0x638ca515,
6909                               0x006a54f2, t2, t4, t8);
6910   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t0, $t8, $t0", 0xf63e7a9d,
6911                               0x79f74493, t0, t8, t0);
6912   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.ph $t4, $t6, $t1", 0xbd6845cd,
6913                               0x9c09e313, t4, t6, t1);
6914
6915   printf("-------- SHRAV_R.W --------\n");
6916   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t1, $t2", 0x7fffffff,
6917                               0x00000000, t0, t1, t2);
6918   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t3, $t4", 0x80000000,
6919                               0x00000000, t2, t3, t4);
6920   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t1, $t5", 0xfabc3435,
6921                               0xfabc3421, t4, t1, t5);
6922   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t6, $t7, $t3", 0x07654cb8,
6923                               0x734680bc, t6, t7, t3);
6924   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t5, $t3, $t2", 0xf973437b,
6925                               0x80000000, t5, t3, t2);
6926   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t4, $t8", 0x00ff0001,
6927                               0xff01ffff, t2, t4, t8);
6928   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t8, $t0", 0x7fff7004,
6929                               0x7fff7fff, t0, t8, t0);
6930   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t6, $t1", 0x0000c420,
6931                               0x00000555, t4, t6, t1);
6932   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t1, $t2", 0x00000000,
6933                               0x00000000, t0, t1, t2);
6934   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t3, $t4", 0x80000000,
6935                               0x80000000, t2, t3, t4);
6936   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t1, $t5", 0xaaaaaaaa,
6937                               0x55555555, t4, t1, t5);
6938   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t6, $t7, $t3", 0x00000018,
6939                               0xffff2435, t6, t7, t3);
6940   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t5, $t3, $t2", 0xbabababa,
6941                               0xabababab, t5, t3, t2);
6942   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t4, $t8", 0xf0f0f0f0,
6943                               0xfc79b4d2, t2, t4, t8);
6944   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t8, $t0", 0xfbde3976,
6945                               0x00000000, t0, t8, t0);
6946   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t6, $t1", 0x23534870,
6947                               0x00354565, t4, t6, t1);
6948   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t1, $t2", 0x980b7cde,
6949                               0x00086755, t0, t1, t2);
6950   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t3, $t4", 0x00000018,
6951                               0x8f8f8f8f, t2, t3, t4);
6952   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t1, $t5", 0x92784656,
6953                               0xeeeeeeee, t4, t1, t5);
6954   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t6, $t7, $t3", 0xcacacaca,
6955                               0x1bdbdbdb, t6, t7, t3);
6956   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t5, $t3, $t2", 0xbacabaca,
6957                               0xdecadeca, t5, t3, t2);
6958   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t4, $t8", 0x12fadeb4,
6959                               0x93474bde, t2, t4, t8);
6960   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t8, $t0", 0x7c000790,
6961                               0xfc0007ff, t0, t8, t0);
6962   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t6, $t1", 0xffffffff,
6963                               0xffffffff, t4, t6, t1);
6964   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t1, $t2", 0xf2f4df1f,
6965                               0xcb4ab48f, t0, t1, t2);
6966   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t3, $t4", 0x435f909a,
6967                               0xaf8f7e18, t2, t3, t4);
6968   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t1, $t5", 0x2106ba5f,
6969                               0x87df4510, t4, t1, t5);
6970   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t6, $t7, $t3", 0x246a6376,
6971                               0xabf4e8e1, t6, t7, t3);
6972   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t5, $t3, $t2", 0x1046a1a3,
6973                               0xf4c0eeac, t5, t3, t2);
6974   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t2, $t4, $t8", 0x638ca515,
6975                               0x006a54f2, t2, t4, t8);
6976   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t0, $t8, $t0", 0xf63e7a9d,
6977                               0x79f74493, t0, t8, t0);
6978   TESTDSPINST_RD_RS_RT_NODSPC("shrav_r.w $t4, $t6, $t1", 0xbd6845cd,
6979                               0x9c09e313, t4, t6, t1);
6980
6981   printf("-------- SHRL.QB --------\n");
6982   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t1, 1", 0x2fff0000, 1, t0, t1);
6983   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t3, 2", 0x2fff0000, 2, t2, t3);
6984   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t1, 3", 0x2fff0000, 3, t4, t1);
6985   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t6, $t7, 4", 0xff460000, 4, t6, t7);
6986   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t5, $t3, 0", 0x80000000, 0, t5, t3);
6987   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t4, 7", 0xff01ffff, 7, t2, t4);
6988   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t8, 7", 0x7fff7fff, 7, t0, t8);
6989   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t6, 0", 0x00000555, 0, t4, t6);
6990   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t1, 1", 0x00000000, 1, t0, t1);
6991   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t3, 2", 0x80000000, 2, t2, t3);
6992   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t1, 3", 0x55555555, 3, t4, t1);
6993   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t6, $t7, 4", 0xffff2435, 4, t6, t7);
6994   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t5, $t3, 5", 0xabababab, 5, t5, t3);
6995   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t4, 6", 0xfc79b4d2, 6, t2, t4);
6996   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t8, 7", 0x00000000, 7, t0, t8);
6997   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t6, 0", 0x00354565, 0, t4, t6);
6998   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t1, 1", 0x00086755, 1, t0, t1);
6999   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t3, 2", 0x8f8f8f8f, 2, t2, t3);
7000   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t1, 3", 0xeeeeeeee, 3, t4, t1);
7001   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t6, $t7, 4", 0x1bdbdbdb, 4, t6, t7);
7002   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t5, $t3, 5", 0xdecadeca, 5, t5, t3);
7003   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t4, 6", 0x93474bde, 6, t2, t4);
7004   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t8, 7", 0xfc0007ff, 7, t0, t8);
7005   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t6, 0", 0xffffffff, 0, t4, t6);
7006   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t1, 3", 0xcb4ab48f, 3, t0, t1);
7007   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t3, 4", 0xaf8f7e18, 4, t2, t3);
7008   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t1, 0", 0x87df4510, 0, t4, t1);
7009   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t6, $t7, 7", 0xabf4e8e1, 7, t6, t7);
7010   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t5, $t3, 7", 0xf4c0eeac, 7, t5, t3);
7011   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t2, $t4, 5", 0x006a54f2, 5, t2, t4);
7012   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t0, $t8, 1", 0x79f74493, 1, t0, t8);
7013   TESTDSPINST_RD_RT_SA_NODSPC("shrl.qb $t4, $t6, 2", 0x9c09e313, 2, t4, t6);
7014
7015   printf("-------- SHRLV.QB -------- \n");
7016   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t1, $t2", 0x2fff0000, 0x00000001,
7017                               t0, t1, t2);
7018   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t3, $t4", 0x2fff0000, 0x73741802,
7019                               t2, t3, t4);
7020   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t1, $t5", 0x2fff0000, 0x80003403,
7021                               t4, t1, t5);
7022   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t6, $t7, $t3", 0xff460000, 0x73468004,
7023                               t6, t7, t3);
7024   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t5, $t3, $t2", 0x00008000, 0x80000000,
7025                               t5, t3, t2);
7026   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t4, $t8", 0x00010001, 0xffffff07,
7027                               t2, t4, t8);
7028   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t8, $t0", 0x7fff7fff, 0x7fff7f07,
7029                               t0, t8, t0);
7030   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t6, $t1", 0xffffffff, 0x00000505,
7031                               t4, t6, t1);
7032   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t1, $t2", 0xabababab, 0x00000000,
7033                               t0, t1, t2);
7034   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t3, $t4", 0xdecadeca, 0x80000000,
7035                               t2, t3, t4);
7036   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t1, $t5", 0xbacabaca, 0x55555555,
7037                               t4, t1, t5);
7038   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t6, $t7, $t3", 0x3545ff80, 0xffff2434,
7039                               t6, t7, t3);
7040   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t5, $t3, $t2", 0x734680bc, 0xabababa3,
7041                               t5, t3, t2);
7042   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t4, $t8", 0xc4dbfe20, 0xfc79b4d2,
7043                               t2, t4, t8);
7044   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t8, $t0", 0x00000000, 0x00000000,
7045                               t0, t8, t0);
7046   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t3, $t1", 0x55555555, 0x00354561,
7047                               t4, t3, t1);
7048   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t1, $t2", 0xad80bce4, 0x00086755,
7049                               t0, t1, t2);
7050   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t3, $t4", 0x7f003245, 0x8f8f8f8f,
7051                               t2, t3, t4);
7052   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t1, $t5", 0x93474bde, 0xeeeeeeee,
7053                               t4, t1, t5);
7054   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t6, $t7, $t3", 0xf97343ff, 0x1bdbdbdb,
7055                               t6, t7, t3);
7056   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t5, $t3, $t2", 0x980b7cde, 0xdecadeca,
7057                               t5, t3, t2);
7058   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t4, $t8", 0x0555adec, 0x93474bde,
7059                               t2, t4, t8);
7060   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t8, $t0", 0x23534870, 0xfc0007ff,
7061                               t0, t8, t0);
7062   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t3, $t1", 0x80003286, 0xffffffff,
7063                               t4, t3, t1);
7064   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t6, $t1", 0x4387ffff, 0xdecadeca,
7065                               t4, t6, t1);
7066   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t1, $t2", 0x0cd6b508, 0xbacabaca,
7067                               t0, t1, t2);
7068   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t3, $t4", 0x6731e282, 0x3545ff80,
7069                               t2, t3, t4);
7070   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t1, $t5", 0x26edf28f, 0x734680bc,
7071                               t4, t1, t5);
7072   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t6, $t7, $t3", 0x4b4ec9ca, 0xc4dbfe20,
7073                               t6, t7, t3);
7074   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t5, $t3, $t2", 0xc1037fa4, 0x00000000,
7075                               t5, t3, t2);
7076   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t4, $t8", 0xcb4ab48f, 0x55555555,
7077                               t2, t4, t8);
7078   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t8, $t0", 0xaf8f7e18, 0xad80bce4,
7079                               t0, t8, t0);
7080   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t3, $t1", 0x87df4510, 0x7f003245,
7081                               t4, t3, t1);
7082   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t1, $t2", 0xabf4e8e1, 0x93474bde,
7083                               t0, t1, t2);
7084   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t3, $t4", 0xf4c0eeac, 0xf97343ff,
7085                               t2, t3, t4);
7086   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t1, $t5", 0x006a54f2, 0x980b7cde,
7087                               t4, t1, t5);
7088   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t6, $t7, $t3", 0x79f74493, 0x0555adec,
7089                               t6, t7, t3);
7090   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t5, $t3, $t2", 0x9c09e313, 0x23534870,
7091                               t5, t3, t2);
7092   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t2, $t4, $t8", 0x9c09e313, 0x9c09e313,
7093                               t2, t4, t8);
7094   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t0, $t8, $t0", 0x80000000, 0x80000000,
7095                               t0, t8, t0);
7096   TESTDSPINST_RD_RT_RS_NODSPC("shrlv.qb $t4, $t3, $t1", 0x004d8000, 0x004d8000,
7097                               t4, t3, t1);
7098
7099   printf("-------- SUBQ.PH --------\n");
7100   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
7101                             t0, t1, t2);
7102   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t3, $t4", 0x045fb232, 0x00028632,
7103                             t2, t3, t4);
7104   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
7105                             t4, t1, t5);
7106   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
7107                             t6, t7, t3);
7108   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
7109                             t5, t3, t2);
7110   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
7111                             t2, t4, t8);
7112   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
7113                             t0, t8, t0);
7114   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
7115                             t4, t6, t1);
7116   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
7117                             t0, t1, t2);
7118   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
7119                             t2, t3, t4);
7120   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
7121                             t4, t1, t5);
7122   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
7123                             t6, t7, t3);
7124   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
7125                             t5, t3, t2);
7126   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
7127                             t2, t4, t8);
7128   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
7129                             t0, t8, t0);
7130   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
7131                             t4, t6, t1);
7132   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
7133                             t0, t1, t2);
7134   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
7135                             t2, t3, t4);
7136   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
7137                             t4, t1, t5);
7138   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
7139                             t6, t7, t3);
7140   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
7141                             t5, t3, t2);
7142   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
7143                             t2, t4, t8);
7144   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
7145                             t0, t8, t0);
7146   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
7147                             t4, t6, t1);
7148   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
7149                             t0, t1, t2);
7150   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
7151                             t2, t3, t4);
7152   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
7153                             t4, t1, t5);
7154   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
7155                             t6, t7, t3);
7156   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
7157                             t5, t3, t2);
7158   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
7159                             t2, t4, t8);
7160   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
7161                             t0, t8, t0);
7162   TESTDSPINST_RD_RS_RT_DSPC("subq.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
7163                             t4, t6, t1);
7164
7165   printf("-------- SUBQ_S.PH --------\n");
7166   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
7167                             t0, t1, t2);
7168   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t3, $t4", 0x045fb232, 0x00028632,
7169                             t2, t3, t4);
7170   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
7171                             t4, t1, t5);
7172   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
7173                             t6, t7, t3);
7174   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
7175                             t5, t3, t2);
7176   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
7177                             t2, t4, t8);
7178   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
7179                             t0, t8, t0);
7180   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
7181                             t4, t6, t1);
7182   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
7183                             t0, t1, t2);
7184   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
7185                             t2, t3, t4);
7186   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
7187                             t4, t1, t5);
7188   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
7189                             t6, t7, t3);
7190   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
7191                             t5, t3, t2);
7192   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
7193                             t2, t4, t8);
7194   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
7195                             t0, t8, t0);
7196   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
7197                             t4, t6, t1);
7198   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
7199                             t0, t1, t2);
7200   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
7201                             t2, t3, t4);
7202   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
7203                             t4, t1, t5);
7204   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
7205                             t6, t7, t3);
7206   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
7207                             t5, t3, t2);
7208   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
7209                             t2, t4, t8);
7210   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
7211                             t0, t8, t0);
7212   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
7213                             t4, t6, t1);
7214   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
7215                             t0, t1, t2);
7216   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
7217                             t2, t3, t4);
7218   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
7219                             t4, t1, t5);
7220   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
7221                             t6, t7, t3);
7222   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
7223                             t5, t3, t2);
7224   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
7225                             t2, t4, t8);
7226   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
7227                             t0, t8, t0);
7228   TESTDSPINST_RD_RS_RT_DSPC("subq_s.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
7229                             t4, t6, t1);
7230
7231   printf("-------- SUBQ_S.W --------\n");
7232   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t1, $t2", 0x7fffffff, 0x00000000,
7233                             t0, t1, t2);
7234   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t3, $t4", 0x80000000, 0x00000000,
7235                             t2, t3, t4);
7236   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
7237                             t4, t1, t5);
7238   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
7239                             t6, t7, t3);
7240   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t5, $t3, $t2", 0xf973437b, 0x80000000,
7241                             t5, t3, t2);
7242   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
7243                             t2, t4, t8);
7244   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
7245                             t0, t8, t0);
7246   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
7247                             t4, t6, t1);
7248   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t1, $t2", 0x00000000, 0x00000000,
7249                             t0, t1, t2);
7250   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t3, $t4", 0x80000000, 0x80000000,
7251                             t2, t3, t4);
7252   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
7253                             t4, t1, t5);
7254   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t6, $t7, $t3", 0x00000018, 0xffff2435,
7255                             t6, t7, t3);
7256   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t5, $t3, $t2", 0xbabababa, 0xabababab,
7257                             t5, t3, t2);
7258   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
7259                             t2, t4, t8);
7260   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t8, $t0", 0xfbde3976, 0x00000000,
7261                             t0, t8, t0);
7262   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t6, $t1", 0x23534870, 0x00354565,
7263                             t4, t6, t1);
7264   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t1, $t2", 0x980b7cde, 0x00086755,
7265                             t0, t1, t2);
7266   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
7267                             t2, t3, t4);
7268   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
7269                             t4, t1, t5);
7270   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
7271                             t6, t7, t3);
7272   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
7273                             t5, t3, t2);
7274   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
7275                             t2, t4, t8);
7276   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
7277                             t0, t8, t0);
7278   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t6, $t1", 0xffffffff, 0xffffffff,
7279                             t4, t6, t1);
7280   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
7281                             t0, t1, t2);
7282   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
7283                             t2, t3, t4);
7284   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
7285                             t4, t1, t5);
7286   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
7287                             t6, t7, t3);
7288   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
7289                             t5, t3, t2);
7290   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
7291                             t2, t4, t8);
7292   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
7293                             t0, t8, t0);
7294   TESTDSPINST_RD_RS_RT_DSPC("subq_s.w $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
7295                             t4, t6, t1);
7296
7297   printf("-------- SUBU.QB --------\n");
7298   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t1, $t2", 0x7fffffff, 0x00000000,
7299                             t0, t1, t2);
7300   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t3, $t4", 0x80000000, 0x00000000,
7301                             t2, t3, t4);
7302   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
7303                             t4, t1, t5);
7304   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
7305                             t6, t7, t3);
7306   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t5, $t3, $t2", 0xf973437b, 0x80000000,
7307                             t5, t3, t2);
7308   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
7309                             t2, t4, t8);
7310   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
7311                             t0, t8, t0);
7312   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
7313                             t4, t6, t1);
7314   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
7315                             t0, t1, t2);
7316   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t3, $t4", 0x80000000, 0x80000000,
7317                             t2, t3, t4);
7318   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
7319                             t4, t1, t5);
7320   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t6, $t7, $t3", 0x00000018, 0xffff2435,
7321                             t6, t7, t3);
7322   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t5, $t3, $t2", 0xbabababa, 0xabababab,
7323                             t5, t3, t2);
7324   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
7325                             t2, t4, t8);
7326   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t8, $t0", 0xfbde3976, 0x00000000,
7327                             t0, t8, t0);
7328   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t6, $t1", 0x23534870, 0x00354565,
7329                             t4, t6, t1);
7330   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t1, $t2", 0x980b7cde, 0x00086755,
7331                             t0, t1, t2);
7332   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
7333                             t2, t3, t4);
7334   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
7335                             t4, t1, t5);
7336   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
7337                             t6, t7, t3);
7338   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
7339                             t5, t3, t2);
7340   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
7341                             t2, t4, t8);
7342   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
7343                             t0, t8, t0);
7344   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t6, $t1", 0xffffffff, 0xffffffff,
7345                             t4, t6, t1);
7346   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
7347                             t0, t1, t2);
7348   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
7349                             t2, t3, t4);
7350   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
7351                             t4, t1, t5);
7352   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
7353                             t6, t7, t3);
7354   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
7355                             t5, t3, t2);
7356   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
7357                             t2, t4, t8);
7358   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
7359                             t0, t8, t0);
7360   TESTDSPINST_RD_RS_RT_DSPC("subu.qb $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
7361                             t4, t6, t1);
7362
7363   printf("-------- SUBU_S.QB --------\n");
7364   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t1, $t2", 0x7fffffff, 0x00000000,
7365                             t0, t1, t2);
7366   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t3, $t4", 0x80000000, 0x00000000,
7367                             t2, t3, t4);
7368   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
7369                             t4, t1, t5);
7370   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
7371                             t6, t7, t3);
7372   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t5, $t3, $t2", 0xf973437b, 0x80000000,
7373                             t5, t3, t2);
7374   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
7375                             t2, t4, t8);
7376   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
7377                             t0, t8, t0);
7378   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
7379                             t4, t6, t1);
7380   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
7381                             t0, t1, t2);
7382   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t3, $t4", 0x80000000, 0x80000000,
7383                             t2, t3, t4);
7384   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
7385                             t4, t1, t5);
7386   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t6, $t7, $t3", 0x00000018, 0xffff2435,
7387                             t6, t7, t3);
7388   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t5, $t3, $t2", 0xbabababa, 0xabababab,
7389                             t5, t3, t2);
7390   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
7391                             t2, t4, t8);
7392   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t8, $t0", 0xfbde3976, 0x00000000,
7393                             t0, t8, t0);
7394   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t6, $t1", 0x23534870, 0x00354565,
7395                             t4, t6, t1);
7396   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t1, $t2", 0x980b7cde, 0x00086755,
7397                             t0, t1, t2);
7398   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
7399                             t2, t3, t4);
7400   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
7401                             t4, t1, t5);
7402   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
7403                             t6, t7, t3);
7404   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
7405                             t5, t3, t2);
7406   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
7407                             t2, t4, t8);
7408   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
7409                             t0, t8, t0);
7410   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t6, $t1", 0xffffffff, 0xffffffff,
7411                             t4, t6, t1);
7412   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
7413                             t0, t1, t2);
7414   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
7415                             t2, t3, t4);
7416   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
7417                             t4, t1, t5);
7418   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
7419                             t6, t7, t3);
7420   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
7421                             t5, t3, t2);
7422   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
7423                             t2, t4, t8);
7424   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
7425                             t0, t8, t0);
7426   TESTDSPINST_RD_RS_RT_DSPC("subu_s.qb $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
7427                             t4, t6, t1);
7428#endif
7429
7430   return 0;
7431}