mips32_dspr2.c revision bf68e98f4532d5469f7be4ef77933ae50069f201
1#include <stdio.h>
2/* Independent tests for each DSP instruction from MIPS32 DSP ASEr2 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 dspr2; \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", instruction, out, \
56          RTval, dspCtrl);                                                 \
57}
58
59#define TESTDSPINST_RD_RT_NODSPC(instruction, RTval, RD, RT)        \
60{                                                                   \
61   int out = 0xdeadbeef;                                            \
62   __asm__ volatile(                                                \
63      ".set dspr2; \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", instruction, out, RTval); \
73}
74
75#define TESTDSPINST_RD_RT_RS_NODSPC(instruction, RTval, RSval)               \
76{                                                                            \
77   int out = 0;                                                              \
78   __asm__ __volatile__(                                                     \
79      ".set dspr2; \n\t"                                                     \
80      "move $t1, %1 \n\t"                                                    \
81      "move $t2, %2 \n\t"                                                    \
82      instruction" $t0, $t1, $t2 \n\t"                                       \
83      "move %0, $t0 \n\t"                                                    \
84      : "=&r" (out)                                                          \
85      : "r" (RTval), "r" (RSval)                                             \
86      : "t0", "t1", "t2"                                                     \
87   );                                                                        \
88   printf("%s   out=0x%08x, RTval=0x%08x, RSval=0x%08x\n", instruction, out, \
89          RTval, RSval);                                                     \
90}
91
92#define TESTDSPINST_RD_RS_RT_DSPC(instruction, RSval, RTval, RD, RS, RT)       \
93{                                                                              \
94   int out = 0xdeadbeef;                                                       \
95   int dspCtrl = 0x0;                                                          \
96   __asm__ volatile(                                                           \
97      ".set dspr2; \n\t"                                                       \
98      "li $" #RD ", 0 \n\t"                                                    \
99      "wrdsp $zero, 0x3f \n\t"                                                 \
100      "move $" #RS ", %2 \n\t"                                                 \
101      "move $" #RT ", %3 \n\t"                                                 \
102      instruction " \n\t"                                                      \
103      "move %0, $" #RD " \n\t"                                                 \
104      "rddsp %1, 0x3f \n\t"                                                    \
105      : "=&r" (out), "=&r" (dspCtrl)                                           \
106      : "r" (RSval), "r"(RTval)                                                \
107      : #RD, #RS, #RT                                                          \
108   );                                                                          \
109   printf("%s :: rs 0x%08x rt 0x%08x out 0x%08x DSPCtrl 0x%08x\n", instruction,\
110          RSval, RTval, out, dspCtrl);                                         \
111}
112
113#define TESTDSPINST_BPOSGE32(instruction, RDval, POSval, RD, POSreg) \
114{                                                                    \
115   unsigned int out = 0;                                             \
116   __asm__ volatile(                                                 \
117      ".set dspr2; \n\t"                                             \
118      "move $" #POSreg ", %1 \n\t"                                   \
119      "wrdsp $" #POSreg ", 0x3f \n\t"                                \
120      "move $" #RD ", %2 \n\t"                                       \
121      instruction" end"instruction#RDval" \n\t"                      \
122      "nop \n\t"                                                     \
123      "addi $" #RD ", $" #RD", 5 \n\t"                               \
124      "end"instruction#RDval": \n\t"                                 \
125      "addi $" #RD ", $" #RD", 1 \n\t"                               \
126      "move %0, $" #RD " \n\t"                                       \
127      : "=&r" (out)                                                  \
128      : "r" (POSval), "r" (RDval)                                    \
129      : #RD, #POSreg                                                 \
130      );                                                             \
131      printf(instruction" :: %d, POSval: %d\n", out, POSval);        \
132}
133
134#define TESTDSPINST_RS_RT_DSPC(instruction, RSval, RTval, RS, RT)            \
135{                                                                            \
136   int dspCtrl = 0x0;                                                        \
137   __asm__ volatile(                                                         \
138      ".set dspr2; \n\t"                                                     \
139      "wrdsp $zero, 0x3f \n\t"                                               \
140      "move $" #RS ", %1 \n\t"                                               \
141      "move $" #RT ", %2 \n\t"                                               \
142      instruction " \n\t"                                                    \
143      "rddsp %0, 0x3f \n\t"                                                  \
144      : "=&r" (dspCtrl)                                                      \
145      : "r" (RSval), "r"(RTval)                                              \
146      : #RS, #RT                                                             \
147   );                                                                        \
148   printf("%s :: rs 0x%08x rt 0x%08x DSPCtrl 0x%08x \n", instruction, RSval, \
149          RTval, dspCtrl);                                                   \
150}
151
152#define TESTDSPINST_RD_RS_RT_NODSPC(instruction, RSval, RTval, RD, RS, RT)     \
153{                                                                              \
154   int out = 0xdeadbeef;                                                       \
155   __asm__ volatile(                                                           \
156      ".set dspr2; \n\t"                                                       \
157      "li $" #RD ", 0 \n\t"                                                    \
158      "move $" #RS ", %1 \n\t"                                                 \
159      "move $" #RT ", %2 \n\t"                                                 \
160      instruction " \n\t"                                                      \
161      "move %0, $" #RD " \n\t"                                                 \
162      : "=&r" (out)                                                            \
163      : "r" (RSval), "r"(RTval)                                                \
164      : #RD, #RS, #RT                                                          \
165   );                                                                          \
166   printf("%s :: rs 0x%08x rt 0x%08x out 0x%08x\n", instruction, RSval, RTval, \
167          out);                                                                \
168}
169
170#define TESTDSPINST_AC_RS_RT_DSPC(instruction, ac, RSval, RTval, HIval, LOval, \
171                                  RS, RT)                                      \
172{                                                                              \
173   int out_hi = 0xdeadbeef;                                                    \
174   int out_lo = 0xdeadbeef;                                                    \
175   int dspCtrl = 0x0;                                                          \
176   __asm__ volatile(                                                           \
177      ".set dspr2; \n\t"                                                       \
178      "move $" #RS ", %5 \n\t"                                                 \
179      "move $" #RT ", %6 \n\t"                                                 \
180      "mthi $" #RS", $" ac " \n\t"                                             \
181      "mtlo $" #RT", $" ac " \n\t"                                             \
182      "move $" #RS ", %3 \n\t"                                                 \
183      "move $" #RT ", %4 \n\t"                                                 \
184      "wrdsp $zero, 0x3f \n\t"                                                 \
185      instruction " \n\t"                                                      \
186      "rddsp %2, 0x3f \n\t"                                                    \
187      "mfhi %0, $" ac " \n\t"                                                  \
188      "mflo %1, $" ac " \n\t"                                                  \
189      : "=&r" (out_hi), "=&r" (out_lo), "=&r" (dspCtrl)                        \
190      : "r" (RSval), "r"(RTval), "r" (HIval), "r"(LOval)                       \
191      : #RS, #RT                                                               \
192   );                                                                          \
193   printf("%s :: rs 0x%08x rt 0x%08x inHI 0x%08x inLO 0x%08x outHI 0x%08x "    \
194          "outLO 0x%08x dspCtrl 0x%08x\n",instruction, RSval, RTval, HIval,    \
195          LOval, out_hi, out_lo, dspCtrl);\
196}
197
198#define TESTDSPINST_AC_RS_RT_NODSPC(instruction, HIval, LOval, RSval, RTval) \
199{                                                                            \
200   int HIout = 0;                                                            \
201   int LOout = 0;                                                            \
202   __asm__ __volatile__(                                                     \
203      ".set dspr2; \n\t"                                                     \
204      "li $t0, 0 \n\t"                                                       \
205      "li $t1, 0 \n\t"                                                       \
206      "mthi %2, $ac0 \n\t"                                                   \
207      "mtlo %3, $ac0 \n\t"                                                   \
208      "move $t0, %4 \n\t"                                                    \
209      "move $t1, %5 \n\t"                                                    \
210      instruction" $ac0, $t0, $t1 \n\t"                                      \
211      "mfhi %0, $ac0 \n\t"                                                   \
212      "mflo %1, $ac0 \n\t"                                                   \
213      : "=&r" (HIout), "=&r" (LOout)                                         \
214      : "r" (HIval), "r" (LOval), "r" (RSval), "r" (RTval)                   \
215      : "t0", "t1"                                                           \
216   );                                                                        \
217   printf("%s   HIout=0x%08x, LOout=0x%08x, HIin=0x%08x, LOin=0x%08x, "      \
218          "RSval=0x%08x, RTval=0x%08x\n", instruction, HIout, LOout, HIval,  \
219          LOval, RSval, RTval);                                              \
220}
221
222#define TESTDSPINST_EXT(instruction, ac, RT, HIval, LOval, size, pos) \
223{                                                                     \
224   int out = 0xdeadbeef;                                              \
225   int dspCtrl = 0x0;                                                 \
226   __asm__ volatile(                                                  \
227      ".set dspr2; \n\t"                                              \
228      "move $" #RT ", %2 \n\t"                                        \
229      "wrdsp $" #RT ", 0x3f \n\t"                                     \
230      "move $" #RT ", %3 \n\t"                                        \
231      "mthi $" #RT", $" ac " \n\t"                                    \
232      "move $" #RT ", %4 \n\t"                                        \
233      "mtlo $" #RT", $" ac " \n\t"                                    \
234      instruction " \n\t"                                             \
235      "rddsp %1, 0x3f \n\t"                                           \
236      "move %0, $" #RT " \n\t"                                        \
237      : "=&r" (out), "=&r" (dspCtrl)                                  \
238      : "r" (pos), "r" (HIval), "r" (LOval)                           \
239      : #RT                                                           \
240   );                                                                 \
241   printf("%s :: rt 0x%08x %s 0x%08x%08x size %2d DSPCtrl 0x%08x\n",  \
242          instruction, out, ac, HIval, LOval, size, dspCtrl);         \
243}
244
245#define TESTDSPINST_EXTV(instruction, ac, RT, HIval, LOval, RS, RSval, pos) \
246{                                                                           \
247   int out = 0xdeadbeef;                                                    \
248   int dspCtrl = 0x0;                                                       \
249   __asm__ volatile(                                                        \
250      ".set dspr2; \n\t"                                                    \
251      "move $" #RS ", %5 \n\t"                                              \
252      "move $" #RT ", %2 \n\t"                                              \
253      "wrdsp $" #RT ", 0x3f \n\t"                                           \
254      "move $" #RT ", %3 \n\t"                                              \
255      "mthi $" #RT", $" ac " \n\t"                                          \
256      "move $" #RT ", %4 \n\t"                                              \
257      "mtlo $" #RT", $" ac " \n\t"                                          \
258      instruction " \n\t"                                                   \
259      "rddsp %1, 0x3f \n\t"                                                 \
260      "move %0, $" #RT " \n\t"                                              \
261      : "=&r" (out), "=&r" (dspCtrl)                                        \
262      : "r" (pos), "r" (HIval), "r" (LOval), "r" (RSval)                    \
263      : #RT, #RS                                                            \
264   );                                                                       \
265   printf("%s :: rt 0x%08x %s 0x%08x%08x rs 0x%08x DSPCtrl 0x%08x\n",       \
266          instruction, out, ac, HIval, LOval, RSval, dspCtrl);              \
267}
268
269#define TESTDSPINST_INSV(instruction, RTval, RSval, RT, RS, _pos, _size)       \
270{                                                                              \
271   unsigned int out;                                                           \
272   __asm__ volatile(                                                           \
273      ".set dspr2; \n\t"                                                       \
274      "move $" #RS ", %3 \n\t"                                                 \
275      "wrdsp $" #RS ", 0x1 \n\t"                                               \
276      "move $" #RS ", %4 \n\t"                                                 \
277      "wrdsp $" #RS ", 0x2 \n\t"                                               \
278      "move $" #RS", %1 \n\t"                                                  \
279      "move $" #RT", %2 \n\t"                                                  \
280      "insv $" #RT ", $" #RS " \n\t"                                           \
281      "move %0, $" #RT " \n\t"                                                 \
282     : "=&r" (out)                                                             \
283     : "r" (RSval), "r" (RTval), "r" (_pos), "r" (_size)                       \
284     : #RS, #RT                                                                \
285   );                                                                          \
286   printf("insv :: out: 0x%08x rtIN 0x%08x rsIN 0x%08x posI %2d sizeI %2d \n", \
287         out, RTval, RSval, _pos, _size>>7);                                   \
288}
289
290#define TESTDSPINST_LWX(index, RT, RS)                 \
291{                                                      \
292    unsigned int out;                                  \
293   __asm__ volatile(                                   \
294      ".set dspr2; \n\t"                               \
295     "move $" #RS", %1 \n\t"                           \
296     "move $" #RT", %2 \n\t"                           \
297     "lwx %0, $" #RT "($"#RS") \n\t"                   \
298    : "=&r" (out)                                      \
299    : "r" (mem), "r" (index)                           \
300    : #RT, #RS, "memory"                               \
301    );                                                 \
302   printf("lwx :: out: 0x%08x mem[%d]\n", out, index); \
303}
304
305#define TESTDSPINST_LHX(index, RT, RS)                 \
306{                                                      \
307    unsigned int out;                                  \
308   __asm__ volatile(                                   \
309      ".set dspr2; \n\t"                               \
310     "move $" #RS", %1 \n\t"                           \
311     "move $" #RT", %2 \n\t"                           \
312     "lhx %0, $" #RT "($"#RS") \n\t"                   \
313    : "=&r" (out)                                      \
314    : "r" (mem), "r" (index)                           \
315    : #RT, #RS, "memory"                               \
316    );                                                 \
317   printf("lhx :: out: 0x%08x mem[%d]\n", out, index); \
318}
319
320#define TESTDSPINST_LBUX(index, RT, RS)                 \
321{                                                       \
322    unsigned int out;                                   \
323   __asm__ volatile(                                    \
324      ".set dspr2; \n\t"                                \
325     "move $" #RS", %1 \n\t"                            \
326     "move $" #RT", %2 \n\t"                            \
327     "lbux %0, $" #RT "($"#RS") \n\t"                   \
328    : "=&r" (out)                                       \
329    : "r" (mem), "r" (index)                            \
330    : #RT, #RS, "memory"                                \
331    );                                                  \
332   printf("lbux :: out: 0x%08x mem[%d]\n", out, index); \
333}
334
335#define TESTDSPINST_HILO(ac, RSval_hi, RSval_lo)                             \
336{                                                                            \
337   unsigned int HI = 0xdeadbeef;                                             \
338   unsigned int LO = 0xdeadbeef;                                             \
339   __asm__ volatile(                                                         \
340      ".set dspr2; \n\t"                                                     \
341      "move $t0, %2 \n\t"                                                    \
342      "move $t1, %3 \n\t"                                                    \
343      "mthi $t0, $" ac " \n\t"                                               \
344      "mtlo $t1, $" ac " \n\t"                                               \
345      "mfhi %0, $" ac " \n\t"                                                \
346      "mflo %1, $" ac " \n\t"                                                \
347     : "=&r" (HI), "=&r" (LO)                                                \
348     : "r" (RSval_hi), "r" (RSval_lo)                                        \
349     : "t0", "t1"                                                            \
350   );                                                                        \
351   printf("rs_hi: 0x%08x rs_lo: 0x%08x %s out HI: 0x%08x, out LO: 0x%08x\n", \
352          RSval_hi, RSval_lo, ac, HI, LO);                                   \
353}
354
355#define TESTDSPINST_MTHLIP(instruction, ac, HIval, LOval, RSval, RS, pos) \
356{                                                                         \
357   unsigned int outHI;                                                    \
358   unsigned int outLO;                                                    \
359   unsigned int dspCtrl;                                                  \
360   __asm__ volatile(                                                      \
361      ".set dspr2; \n\t"                                                  \
362      "move $" #RS ", %3 \n\t"                                            \
363      "mthi $" #RS", $" ac " \n\t"                                        \
364      "move $" #RS ", %4 \n\t"                                            \
365      "mtlo $" #RS", $" ac " \n\t"                                        \
366      "move $" #RS ", %5 \n\t"                                            \
367      "wrdsp $" #RS ", 0x1 \n\t"                                          \
368      "move $" #RS ", %6 \n\t"                                            \
369      instruction " \n\t"                                                 \
370      "mfhi %0, $" ac " \n\t"                                             \
371      "mflo %1, $" ac " \n\t"                                             \
372      "rddsp %2, 0x1 \n\t"                                                \
373     : "=&r" (outHI), "=&r" (outLO), "=&r" (dspCtrl)                      \
374     : "r" (HIval), "r" (LOval), "r" (pos), "r" (RSval)                   \
375     : #RS                                                                \
376   );                                                                     \
377   printf("mthlip :: acIn: 0x%08x%08x rsIn 0x%08x posIn 0x%08x acOut "    \
378          "0x%08x%08x posOut 0x%08x\n", HIval, LOval, RSval, pos, outHI,  \
379          outLO, dspCtrl);                                                \
380}
381
382#define TESTDSPINST_PICK(instruction, instruction1, RSval, RTval, RD, RS, RT) \
383{                                                                             \
384   int out = 0xdeadbeef;                                                      \
385   int dspCtrl1 = 0x0;                                                        \
386   __asm__ volatile(                                                          \
387      ".set dspr2; \n\t"                                                      \
388      "li $" #RD ", 0 \n\t"                                                   \
389      "wrdsp $zero, 0x1f \n\t"                                                \
390      "move $" #RS ", %2 \n\t"                                                \
391      "move $" #RT ", %3 \n\t"                                                \
392      instruction1 " \n\t"                                                    \
393      "rddsp %1, 0x1f \n\t"                                                   \
394      instruction " \n\t"                                                     \
395      "move %0, $" #RD " \n\t"                                                \
396      : "=&r" (out), "=&r" (dspCtrl1)                                         \
397      : "r" (RSval), "r"(RTval)                                               \
398      : #RD, #RS, #RT                                                         \
399   );                                                                         \
400   printf("%s :: %s rs 0x%08x rt 0x%08x out 0x%08x DSPCtrl1 0x%x\n",          \
401        instruction, instruction1, RSval, RTval, out, dspCtrl1);              \
402}
403
404#define TESTDSPINST_RADDU_W_QB(instruction, RSval, RD, RS)          \
405{                                                                   \
406   int out = 0xdeadbeef;                                            \
407   __asm__ volatile(                                                \
408      ".set dspr2; \n\t"                                            \
409      "move $" #RS ", %1 \n\t"                                      \
410      instruction " \n\t"                                           \
411      "move %0, $" #RD " \n\t"                                      \
412      : "=&r" (out)                                                 \
413      : "r" (RSval)                                                 \
414      : #RD, #RS                                                    \
415   );                                                               \
416   printf("%s :: out 0x%08x rs 0x%08x\n", instruction, out, RSval); \
417}
418
419#define TESTDSPINST_RDDSPWRDSP(REGval, mask)                               \
420{                                                                          \
421   int out = 0xdeadbeef;                                                   \
422   __asm__ volatile(                                                       \
423      ".set dspr2; \n\t"                                                   \
424      "move $t0, %1 \n\t"                                                  \
425      "wrdsp $t0, " #mask " \n\t"                                          \
426      "rddsp %0, " #mask " \n\t"                                           \
427      : "=&r" (out)                                                        \
428      : "r" (REGval)                                                       \
429      : "t0"                                                               \
430   );                                                                      \
431   printf("outVal 0x%08x inVal 0x%08x mask 0x%08x \n", out, REGval, mask); \
432}
433
434#define TESTDSPINST_RD_IMM_NODSPC(instruction, Imm, RD)           \
435{                                                                 \
436   int out = 0xdeadbeef;                                          \
437   __asm__ volatile(                                              \
438      ".set dspr2; \n\t"                                          \
439      "li $" #RD ", 0 \n\t"                                       \
440      instruction " \n\t"                                         \
441      "move %0, $" #RD " \n\t"                                    \
442      : "=&r" (out)                                               \
443      :                                                           \
444      : #RD                                                       \
445   );                                                             \
446   printf("%s :: rd 0x%08x imm 0x%08x\n", instruction, out, Imm); \
447}
448
449#define TESTDSPINST_SHILO(ac, HIval, LOval, shift)                             \
450{                                                                              \
451   int outHI = 0xdeadbeef;                                                     \
452   int outLO = 0xdeadbeef;                                                     \
453   __asm__ volatile(                                                           \
454      ".set dspr2; \n\t"                                                       \
455      "move $t0, %2 \n\t"                                                      \
456      "move $t1, %3 \n\t"                                                      \
457      "mthi $t0, $" ac " \n\t"                                                 \
458      "mtlo $t1, $" ac " \n\t"                                                 \
459      "shilo $" ac ", " #shift " \n\t"                                         \
460      "mfhi %0, $" ac " \n\t"                                                  \
461      "mflo %1, $" ac " \n\t"                                                  \
462      : "=&r" (outHI), "=&r" (outLO)                                           \
463      : "r" (HIval), "r" (LOval)                                               \
464      : "t0", "t1"                                                             \
465   );                                                                          \
466   printf("shilo %s, %3d inAcc = 0x%08x%08x outAcc = 0x%08x%08x\n", ac, shift, \
467          HIval, LOval, outHI, outLO);                                         \
468}
469
470#define TESTDSP_SHILOV(ac, HIval, LOval, RSval, RS)                         \
471{                                                                           \
472   int outHI = 0xdeadbeef;                                                  \
473   int outLO = 0xdeadbeef;                                                  \
474   __asm__ volatile(                                                        \
475      ".set dspr2; \n\t"                                                    \
476      "move $" #RS ", %2 \n\t"                                              \
477      "mthi $" #RS ", $" ac " \n\t"                                         \
478      "move $" #RS ", %3 \n\t"                                              \
479      "mtlo $t1, $" ac " \n\t"                                              \
480      "move $" #RS ", %4 \n\t"                                              \
481      "shilov $" ac ", $" #RS " \n\t"                                       \
482      "mfhi %0, $" ac " \n\t"                                               \
483      "mflo %1, $" ac " \n\t"                                               \
484      : "=&r" (outHI), "=&r" (outLO)                                        \
485      : "r" (HIval), "r" (LOval), "r" (RSval)                               \
486      : #RS                                                                 \
487   );                                                                       \
488   printf("shilov %s, rs 0x%08x inAcc = 0x%08x%08x outAcc = 0x%08x%08x\n",  \
489           ac, RSval, HIval, LOval, outHI, outLO);                          \
490}
491
492#define TESTDSPINST_RD_RT_SA_DSPC(instruction, RTval, SAval, RD, RT)        \
493{                                                                           \
494   int out = 0xdeadbeef;                                                    \
495   int dspCtrl = 0x0;                                                       \
496   __asm__ volatile(                                                        \
497      ".set dspr2; \n\t"                                                    \
498      "li $" #RD ", 0 \n\t"                                                 \
499      "wrdsp $zero, 0x3f \n\t"                                              \
500      "move $" #RT ", %2 \n\t"                                              \
501      instruction " \n\t"                                                   \
502      "rddsp %1, 0x3f \n\t"                                                 \
503      "move %0, $" #RD " \n\t"                                              \
504      : "=&r" (out), "=&r" (dspCtrl)                                        \
505      : "r"(RTval)                                                          \
506      : #RD, #RT                                                            \
507   );                                                                       \
508   printf("%s :: rd 0x%08x rt 0x%08x sa %2d DSPCtrl 0x%08x\n", instruction, \
509          out, RTval, SAval, dspCtrl);                                      \
510}
511
512#define TESTDSPINST_RD_RT_SA_NODSPC(instruction, RTval, SAval, RD, RT)   \
513{                                                                        \
514   int out = 0xdeadbeef;                                                 \
515   __asm__ volatile(                                                     \
516      ".set dspr2; \n\t"                                                 \
517      "li $" #RD ", 0 \n\t"                                              \
518      "move $" #RT ", %1 \n\t"                                           \
519      instruction " \n\t"                                                \
520      "move %0, $" #RD " \n\t"                                           \
521      : "=&r" (out)                                                      \
522      : "r"(RTval)                                                       \
523      : #RD, #RT                                                         \
524   );                                                                    \
525   printf("%s :: rd 0x%08x rt 0x%08x sa %2d\n", instruction, out, RTval, \
526          SAval);                                                        \
527}
528
529#define TESTDSPINST_RT_RS_SA_NODSPC(instruction, RSval, RTval, SAval, RT, RS) \
530{                                                                             \
531   int out = 0xdeadbeef;                                                      \
532   __asm__ volatile(                                                          \
533      ".set dspr2; \n\t"                                                      \
534      "move $" #RS ", %1 \n\t"                                                \
535      "move $" #RT ", %2 \n\t"                                                \
536      instruction " \n\t"                                                     \
537      "move %0, $" #RT " \n\t"                                                \
538      : "=&r" (out)                                                           \
539      : "r" (RSval), "r"(RTval)                                               \
540      : #RS, #RT                                                              \
541   );                                                                         \
542   printf("%s :: rt 0x%08x rs 0x%08x out 0x%08x \n", instruction, RTval,      \
543          RSval, out);                                                        \
544}
545
546int main(int argc, char **argv)
547{
548   printf("-------- ABSQ_S.QB --------\n");
549   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t1", 0x00000000, t0, t1);
550   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t3", 0x00000286, t2, t3);
551   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t1", 0xfabc2435, t4, t1);
552   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t6, $t7", 0x734680bc, t6, t7);
553   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t5, $t3", 0x80000000, t5, t3);
554   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t4", 0xffffffff, t2, t4);
555   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t8", 0xfff45fff, t0, t8);
556   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t4", 0x00000555, t4, t4);
557   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t1", 0x23534870, t0, t1);
558   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t3", 0x0555adec, t2, t3);
559   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t1", 0x980b7cde, t4, t1);
560   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t6, $t7", 0xf973437b, t6, t7);
561   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t5, $t3", 0x93474bde, t5, t3);
562   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t4", 0x55555555, t2, t4);
563   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t8", 0xc4dbfe20, t0, t8);
564   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t4", 0x734680bc, t4, t4);
565   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t1", 0x00354565, t0, t1);
566   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t3", 0xbacabaca, t2, t3);
567   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t1", 0xdecadeca, t4, t1);
568   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t6, $t7", 0x00000286, t6, t7);
569   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t5, $t3", 0xabababab, t5, t3);
570   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t4", 0x00086755, t2, t4);
571   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t8", 0x8f8f8f80, t0, t8);
572   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t4", 0xeeeeeeee, t4, t4);
573   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t1", 0x1bdbdbdb, t0, t1);
574   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t3", 0xdecadeca, t2, t3);
575   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t1", 0x93474bde, t4, t1);
576   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t6, $t7", 0xfabfabfa, t6, t7);
577   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t5, $t3", 0x083b3571, t5, t3);
578   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t4", 0xb9743941, t2, t4);
579   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t8", 0xbc80f924, t0, t8);
580   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t4", 0xcc3c201c, t4, t4);
581   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t1", 0x1ebaf88e, t0, t1);
582   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t3", 0x722d5e20, t2, t3);
583   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t1", 0xa1d6f791, t4, t1);
584   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t6, $t7", 0x7b11bee7, t6, t7);
585   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t5, $t3", 0xa5631488, t5, t3);
586   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t2, $t4", 0xb10bcc65, t2, t4);
587   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t0, $t8", 0x73f39fca, t0, t8);
588   TESTDSPINST_RD_RT_DSPC("absq_s.qb $t4, $t4", 0x80808080, t4, t4);
589
590   printf("-------- ADDQH.PH --------\n");
591   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
592                               t0, t1, t2);
593   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
594                               t2, t3, t4);
595   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t1, $t5", 0x00002435, 0xffff3421,
596                               t4, t1, t5);
597   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
598                               t6, t7, t3);
599   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
600                               t5, t3, t2);
601   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
602                               t2, t4, t8);
603   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
604                               t0, t8, t0);
605   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
606                               t4, t6, t1);
607   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t3, $t4", 0x00000004, 1073741824,
608                               t2, t3, t4);
609   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
610                               t4, t1, t5);
611   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t6, $t7, $t3", 0x76548000, 0x73468000,
612                               t6, t7, t3);
613   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t5, $t3, $t2", 0x80000000, 0x80000000,
614                               t5, t3, t2);
615   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
616                               t2, t4, t8);
617   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
618                               t0, t8, t0);
619   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
620                               t4, t6, t1);
621   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
622                               t0, t1, t2);
623   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
624                               t2, t3, t4);
625   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
626                               t4, t1, t5);
627   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
628                               t6, t7, t3);
629   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
630                               t5, t3, t2);
631   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
632                               t2, t4, t8);
633   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
634                               t0, t8, t0);
635   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
636                               t4, t6, t1);
637   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
638                               t0, t1, t2);
639   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
640                               t2, t3, t4);
641   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
642                               t4, t1, t5);
643   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
644                               t6, t7, t3);
645   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
646                               t5, t3, t2);
647   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
648                               t2, t4, t8);
649   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
650                               t0, t8, t0);
651   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
652                               t4, t6, t1);
653   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
654                               t0, t1, t2);
655   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
656                               t2, t3, t4);
657   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
658                               t4, t1, t5);
659   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
660                               t6, t7, t3);
661   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
662                               t5, t3, t2);
663   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
664                               t2, t4, t8);
665   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
666                               t0, t8, t0);
667   TESTDSPINST_RD_RS_RT_NODSPC("addqh.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
668                               t4, t6, t1);
669
670   printf("-------- ADDQH_R.PH --------\n");
671   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t1, $t2", 0x00000000,
672                               0x00000000, t0, t1, t2);
673   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t3, $t4", 0x00045fb2,
674                               0x00000286, t2, t3, t4);
675   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t1, $t5", 0x00002435,
676                               0xffff3421, t4, t1, t5);
677   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t6, $t7, $t3", 0x07654cb8,
678                               0x734680bc, t6, t7, t3);
679   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t5, $t3, $t2", 0xf973437b,
680                               0x80000000, t5, t3, t2);
681   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t4, $t8", 0x00010001,
682                               0xffffffff, t2, t4, t8);
683   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t8, $t0", 0x7fff7fff,
684                               0x7fff7fff, t0, t8, t0);
685   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t6, $t1", 0x0000c420,
686                               0x00000555, t4, t6, t1);
687   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t3, $t4", 0x00000004,
688                               1073741824, t2, t3, t4);
689   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t1, $t5", 0x80002435,
690                               0x80003421, t4, t1, t5);
691   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t6, $t7, $t3", 0x76548000,
692                               0x73468000, t6, t7, t3);
693   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t5, $t3, $t2", 0x80000000,
694                               0x80000000, t5, t3, t2);
695   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t4, $t8", 0x00010001,
696                               0xffffffff, t2, t4, t8);
697   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t8, $t0", 0x7fff7fff,
698                               0x7fff7fff, t0, t8, t0);
699   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t6, $t1", 0x0000c420,
700                               0x00000555, t4, t6, t1);
701   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t1, $t2", 0x00000000,
702                               0x00000000, t0, t1, t2);
703   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t3, $t4", 0x80000000,
704                               0x80000000, t2, t3, t4);
705   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t1, $t5", 0xaaaaaaaa,
706                               0x55555555, t4, t1, t5);
707   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t6, $t7, $t3", 0x00000018,
708                               0xffff2435, t6, t7, t3);
709   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t5, $t3, $t2", 0xbabababa,
710                               0xabababab, t5, t3, t2);
711   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t4, $t8", 0xf0f0f0f0,
712                               0xfc79b4d2, t2, t4, t8);
713   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t8, $t0", 0xfbde3976,
714                               0x00000000, t0, t8, t0);
715   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t6, $t1", 0x23534870,
716                               0x00354565, t4, t6, t1);
717   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t1, $t2", 0x980b7cde,
718                               0x00086755, t0, t1, t2);
719   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t3, $t4", 0x00000018,
720                               0x8f8f8f8f, t2, t3, t4);
721   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t1, $t5", 0x92784656,
722                               0xeeeeeeee, t4, t1, t5);
723   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t6, $t7, $t3", 0xcacacaca,
724                               0x1bdbdbdb, t6, t7, t3);
725   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t5, $t3, $t2", 0xbacabaca,
726                               0xdecadeca, t5, t3, t2);
727   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t4, $t8", 0x12fadeb4,
728                               0x93474bde, t2, t4, t8);
729   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t8, $t0", 0x7c000790,
730                               0xfc0007ff, t0, t8, t0);
731   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t6, $t1", 0xffffffff,
732                               0xffffffff, t4, t6, t1);
733   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t1, $t2", 0xf2f4df1f,
734                               0xcb4ab48f, t0, t1, t2);
735   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t3, $t4", 0x435f909a,
736                               0xaf8f7e18, t2, t3, t4);
737   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t1, $t5", 0x2106ba5f,
738                               0x87df4510, t4, t1, t5);
739   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t6, $t7, $t3", 0x246a6376,
740                               0xabf4e8e1, t6, t7, t3);
741   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t5, $t3, $t2", 0x1046a1a3,
742                               0xf4c0eeac, t5, t3, t2);
743   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t2, $t4, $t8", 0x638ca515,
744                               0x006a54f2, t2, t4, t8);
745   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t0, $t8, $t0", 0xf63e7a9d,
746                               0x79f74493, t0, t8, t0);
747   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.ph $t4, $t6, $t1", 0xbd6845cd,
748                               0x9c09e313, t4, t6, t1);
749
750   printf("-------- ADDQH.W --------\n");
751   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t1, $t2", 0x00000000, 0x00000000,
752                               t0, t1, t2);
753   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t3, $t4", 0x00045fb2, 0x00000286,
754                               t2, t3, t4);
755   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t1, $t5", 0x00002435, 0xffff3421,
756                               t4, t1, t5);
757   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
758                               t6, t7, t3);
759   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t5, $t3, $t2", 0xf973437b, 0x80000000,
760                               t5, t3, t2);
761   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
762                               t2, t4, t8);
763   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
764                               t0, t8, t0);
765   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
766                               t4, t6, t1);
767   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t3, $t4", 0x00000004, 1073741824,
768                               t2, t3, t4);
769   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t1, $t5", 0x80002435, 0x80003421,
770                               t4, t1, t5);
771   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t6, $t7, $t3", 0x76548000, 0x73468000,
772                               t6, t7, t3);
773   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t5, $t3, $t2", 0x80000000, 0x80000000,
774                               t5, t3, t2);
775   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
776                               t2, t4, t8);
777   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
778                               t0, t8, t0);
779   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
780                               t4, t6, t1);
781   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t1, $t2", 0x00000000, 0x00000000,
782                               t0, t1, t2);
783   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t3, $t4", 0x80000000, 0x80000000,
784                               t2, t3, t4);
785   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
786                               t4, t1, t5);
787   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t6, $t7, $t3", 0x00000018, 0xffff2435,
788                               t6, t7, t3);
789   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t5, $t3, $t2", 0xbabababa, 0xabababab,
790                               t5, t3, t2);
791   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
792                               t2, t4, t8);
793   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t8, $t0", 0xfbde3976, 0x00000000,
794                               t0, t8, t0);
795   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t6, $t1", 0x23534870, 0x00354565,
796                               t4, t6, t1);
797   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t1, $t2", 0x980b7cde, 0x00086755,
798                               t0, t1, t2);
799   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
800                               t2, t3, t4);
801   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
802                               t4, t1, t5);
803   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
804                               t6, t7, t3);
805   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
806                               t5, t3, t2);
807   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
808                               t2, t4, t8);
809   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
810                               t0, t8, t0);
811   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t6, $t1", 0xffffffff, 0xffffffff,
812                               t4, t6, t1);
813   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
814                               t0, t1, t2);
815   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
816                               t2, t3, t4);
817   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
818                               t4, t1, t5);
819   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
820                               t6, t7, t3);
821   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
822                               t5, t3, t2);
823   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
824                               t2, t4, t8);
825   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
826                               t0, t8, t0);
827   TESTDSPINST_RD_RS_RT_NODSPC("addqh.w $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
828                               t4, t6, t1);
829
830   printf("-------- ADDQH_R.W --------\n");
831   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t1, $t2", 0x00000000,
832                               0x00000000, t0, t1, t2);
833   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t3, $t4", 0x00045fb2,
834                               0x00000286, t2, t3, t4);
835   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t1, $t5", 0x00002435,
836                               0xffff3421, t4, t1, t5);
837   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t6, $t7, $t3", 0x07654cb8,
838                               0x734680bc, t6, t7, t3);
839   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t5, $t3, $t2", 0xf973437b,
840                               0x80000000, t5, t3, t2);
841   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t4, $t8", 0x00010001,
842                               0xffffffff, t2, t4, t8);
843   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t8, $t0", 0x7fff7fff,
844                               0x7fff7fff, t0, t8, t0);
845   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t6, $t1", 0x0000c420,
846                               0x00000555, t4, t6, t1);
847   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t3, $t4", 0x00000004,
848                               1073741824, t2, t3, t4);
849   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t1, $t5", 0x80002435,
850                               0x80003421, t4, t1, t5);
851   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t6, $t7, $t3", 0x76548000,
852                               0x73468000, t6, t7, t3);
853   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t5, $t3, $t2", 0x80000000,
854                               0x80000000, t5, t3, t2);
855   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t4, $t8", 0x00010001,
856                               0xffffffff, t2, t4, t8);
857   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t8, $t0", 0x7fff7fff,
858                               0x7fff7fff, t0, t8, t0);
859   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t6, $t1", 0x0000c420,
860                               0x00000555, t4, t6, t1);
861   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t1, $t2", 0x00000000,
862                               0x00000000, t0, t1, t2);
863   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t3, $t4", 0x80000000,
864                               0x80000000, t2, t3, t4);
865   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t1, $t5", 0xaaaaaaaa,
866                               0x55555555, t4, t1, t5);
867   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t6, $t7, $t3", 0x00000018,
868                               0xffff2435, t6, t7, t3);
869   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t5, $t3, $t2", 0xbabababa,
870                               0xabababab, t5, t3, t2);
871   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t4, $t8", 0xf0f0f0f0,
872                               0xfc79b4d2, t2, t4, t8);
873   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t8, $t0", 0xfbde3976,
874                               0x00000000, t0, t8, t0);
875   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t6, $t1", 0x23534870,
876                               0x00354565, t4, t6, t1);
877   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t1, $t2", 0x980b7cde,
878                               0x00086755, t0, t1, t2);
879   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t3, $t4", 0x00000018,
880                               0x8f8f8f8f, t2, t3, t4);
881   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t1, $t5", 0x92784656,
882                               0xeeeeeeee, t4, t1, t5);
883   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t6, $t7, $t3", 0xcacacaca,
884                               0x1bdbdbdb, t6, t7, t3);
885   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t5, $t3, $t2", 0xbacabaca,
886                               0xdecadeca, t5, t3, t2);
887   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t4, $t8", 0x12fadeb4,
888                               0x93474bde, t2, t4, t8);
889   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t8, $t0", 0x7c000790,
890                               0xfc0007ff, t0, t8, t0);
891   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t6, $t1", 0xffffffff,
892                               0xffffffff, t4, t6, t1);
893   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t1, $t2", 0xf2f4df1f,
894                               0xcb4ab48f, t0, t1, t2);
895   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t3, $t4", 0x435f909a,
896                               0xaf8f7e18, t2, t3, t4);
897   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t1, $t5", 0x2106ba5f,
898                               0x87df4510, t4, t1, t5);
899   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t6, $t7, $t3", 0x246a6376,
900                               0xabf4e8e1, t6, t7, t3);
901   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t5, $t3, $t2", 0x1046a1a3,
902                               0xf4c0eeac, t5, t3, t2);
903   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t2, $t4, $t8", 0x638ca515,
904                               0x006a54f2, t2, t4, t8);
905   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t0, $t8, $t0", 0xf63e7a9d,
906                               0x79f74493, t0, t8, t0);
907   TESTDSPINST_RD_RS_RT_NODSPC("addqh_r.w $t4, $t6, $t1", 0xbd6845cd,
908                               0x9c09e313, t4, t6, t1);
909
910   printf("-------- ADDU.PH --------\n");
911   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
912                             t0, t1, t2);
913   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
914                             t2, t3, t4);
915   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t1, $t5", 0x00002435, 0xffff3421,
916                             t4, t1, t5);
917   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
918                             t6, t7, t3);
919   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
920                             t5, t3, t2);
921   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
922                             t2, t4, t8);
923   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
924                             t0, t8, t0);
925   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
926                             t4, t6, t1);
927   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t3, $t4", 0x00000004, 1073741824,
928                             t2, t3, t4);
929   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
930                             t4, t1, t5);
931   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t6, $t7, $t3", 0x76548000, 0x73468000,
932                             t6, t7, t3);
933   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t5, $t3, $t2", 0x80000000, 0x80000000,
934                             t5, t3, t2);
935   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
936                             t2, t4, t8);
937   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
938                             t0, t8, t0);
939   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
940                             t4, t6, t1);
941   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
942                             t0, t1, t2);
943   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
944                             t2, t3, t4);
945   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
946                             t4, t1, t5);
947   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
948                             t6, t7, t3);
949   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
950                             t5, t3, t2);
951   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
952                             t2, t4, t8);
953   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
954                             t0, t8, t0);
955   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
956                             t4, t6, t1);
957   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
958                             t0, t1, t2);
959   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
960                             t2, t3, t4);
961   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
962                             t4, t1, t5);
963   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
964                             t6, t7, t3);
965   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
966                             t5, t3, t2);
967   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
968                             t2, t4, t8);
969   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
970                             t0, t8, t0);
971   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
972                             t4, t6, t1);
973   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
974                             t0, t1, t2);
975   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
976                             t2, t3, t4);
977   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
978                             t4, t1, t5);
979   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
980                             t6, t7, t3);
981   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
982                             t5, t3, t2);
983   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
984                             t2, t4, t8);
985   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
986                             t0, t8, t0);
987   TESTDSPINST_RD_RS_RT_DSPC("addu.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
988                             t4, t6, t1);
989
990   printf("-------- ADDU_S.PH --------\n");
991   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
992                             t0, t1, t2);
993   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
994                             t2, t3, t4);
995   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t1, $t5", 0x00002435, 0xffff3421,
996                             t4, t1, t5);
997   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
998                             t6, t7, t3);
999   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
1000                             t5, t3, t2);
1001   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
1002                             t2, t4, t8);
1003   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1004                             t0, t8, t0);
1005   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
1006                             t4, t6, t1);
1007   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t3, $t4", 0x00000004, 1073741824,
1008                             t2, t3, t4);
1009   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
1010                             t4, t1, t5);
1011   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t6, $t7, $t3", 0x76548000, 0x73468000,
1012                             t6, t7, t3);
1013   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t5, $t3, $t2", 0x80000000, 0x80000000,
1014                             t5, t3, t2);
1015   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
1016                             t2, t4, t8);
1017   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1018                             t0, t8, t0);
1019   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
1020                             t4, t6, t1);
1021   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
1022                             t0, t1, t2);
1023   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
1024                             t2, t3, t4);
1025   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
1026                             t4, t1, t5);
1027   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
1028                             t6, t7, t3);
1029   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
1030                             t5, t3, t2);
1031   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
1032                             t2, t4, t8);
1033   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
1034                             t0, t8, t0);
1035   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
1036                             t4, t6, t1);
1037   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
1038                             t0, t1, t2);
1039   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
1040                             t2, t3, t4);
1041   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
1042                             t4, t1, t5);
1043   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
1044                             t6, t7, t3);
1045   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
1046                             t5, t3, t2);
1047   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
1048                             t2, t4, t8);
1049   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
1050                             t0, t8, t0);
1051   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
1052                             t4, t6, t1);
1053   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
1054                             t0, t1, t2);
1055   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
1056                             t2, t3, t4);
1057   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
1058                             t4, t1, t5);
1059   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
1060                             t6, t7, t3);
1061   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
1062                             t5, t3, t2);
1063   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
1064                             t2, t4, t8);
1065   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
1066                             t0, t8, t0);
1067   TESTDSPINST_RD_RS_RT_DSPC("addu_s.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
1068                             t4, t6, t1);
1069
1070   printf("-------- ADDUH.QB --------\n");
1071   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
1072                               t0, t1, t2);
1073   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t3, $t4", 0x00045fb2, 0x00000286,
1074                               t2, t3, t4);
1075   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t1, $t5", 0x00002435, 0xffff3421,
1076                               t4, t1, t5);
1077   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
1078                               t6, t7, t3);
1079   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t5, $t3, $t2", 0xf973437b, 0x80000000,
1080                               t5, t3, t2);
1081   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t4, $t8", 0x00010001, 0xffffffff,
1082                               t2, t4, t8);
1083   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1084                               t0, t8, t0);
1085   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
1086                               t4, t6, t1);
1087   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t3, $t4", 0x00000004, 1073741824,
1088                               t2, t3, t4);
1089   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t1, $t5", 0x80002435, 0x80003421,
1090                               t4, t1, t5);
1091   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t6, $t7, $t3", 0x76548000, 0x73468000,
1092                               t6, t7, t3);
1093   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t5, $t3, $t2", 0x80000000, 0x80000000,
1094                               t5, t3, t2);
1095   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t4, $t8", 0x00010001, 0xffffffff,
1096                               t2, t4, t8);
1097   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
1098                               t0, t8, t0);
1099   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
1100                               t4, t6, t1);
1101   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
1102                               t0, t1, t2);
1103   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t3, $t4", 0x80000000, 0x80000000,
1104                               t2, t3, t4);
1105   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
1106                               t4, t1, t5);
1107   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t6, $t7, $t3", 0x00000018, 0xffff2435,
1108                               t6, t7, t3);
1109   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t5, $t3, $t2", 0xbabababa, 0xabababab,
1110                               t5, t3, t2);
1111   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
1112                               t2, t4, t8);
1113   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t8, $t0", 0xfbde3976, 0x00000000,
1114                               t0, t8, t0);
1115   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t6, $t1", 0x23534870, 0x00354565,
1116                               t4, t6, t1);
1117   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t1, $t2", 0x980b7cde, 0x00086755,
1118                               t0, t1, t2);
1119   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
1120                               t2, t3, t4);
1121   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
1122                               t4, t1, t5);
1123   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
1124                               t6, t7, t3);
1125   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
1126                               t5, t3, t2);
1127   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
1128                               t2, t4, t8);
1129   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
1130                               t0, t8, t0);
1131   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t6, $t1", 0xffffffff, 0xffffffff,
1132                               t4, t6, t1);
1133   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
1134                               t0, t1, t2);
1135   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
1136                               t2, t3, t4);
1137   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
1138                               t4, t1, t5);
1139   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
1140                               t6, t7, t3);
1141   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
1142                               t5, t3, t2);
1143   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
1144                               t2, t4, t8);
1145   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
1146                               t0, t8, t0);
1147   TESTDSPINST_RD_RS_RT_NODSPC("adduh.qb $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
1148                               t4, t6, t1);
1149
1150   printf("-------- ADDUH_R.QB --------\n");
1151   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t1, $t2", 0x00000000,
1152                               0x00000000, t0, t1, t2);
1153   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t3, $t4", 0x00045fb2,
1154                               0x00000286, t2, t3, t4);
1155   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t1, $t5", 0x00002435,
1156                               0xffff3421, t4, t1, t5);
1157   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t6, $t7, $t3", 0x07654cb8,
1158                               0x734680bc, t6, t7, t3);
1159   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t5, $t3, $t2", 0xf973437b,
1160                               0x80000000, t5, t3, t2);
1161   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t4, $t8", 0x00010001,
1162                               0xffffffff, t2, t4, t8);
1163   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t8, $t0", 0x7fff7fff,
1164                               0x7fff7fff, t0, t8, t0);
1165   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t6, $t1", 0x0000c420,
1166                               0x00000555, t4, t6, t1);
1167   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t3, $t4", 0x00000004,
1168                               1073741824, t2, t3, t4);
1169   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t1, $t5", 0x80002435,
1170                               0x80003421, t4, t1, t5);
1171   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t6, $t7, $t3", 0x76548000,
1172                               0x73468000, t6, t7, t3);
1173   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t5, $t3, $t2", 0x80000000,
1174                               0x80000000, t5, t3, t2);
1175   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t4, $t8", 0x00010001,
1176                               0xffffffff, t2, t4, t8);
1177   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t8, $t0", 0x7fff7fff,
1178                               0x7fff7fff, t0, t8, t0);
1179   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t6, $t1", 0x0000c420,
1180                               0x00000555, t4, t6, t1);
1181   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t1, $t2", 0x00000000,
1182                               0x00000000, t0, t1, t2);
1183   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t3, $t4", 0x80000000,
1184                               0x80000000, t2, t3, t4);
1185   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t1, $t5", 0xaaaaaaaa,
1186                               0x55555555, t4, t1, t5);
1187   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t6, $t7, $t3", 0x00000018,
1188                               0xffff2435, t6, t7, t3);
1189   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t5, $t3, $t2", 0xbabababa,
1190                               0xabababab, t5, t3, t2);
1191   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t4, $t8", 0xf0f0f0f0,
1192                               0xfc79b4d2, t2, t4, t8);
1193   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t8, $t0", 0xfbde3976,
1194                               0x00000000, t0, t8, t0);
1195   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t6, $t1", 0x23534870,
1196                               0x00354565, t4, t6, t1);
1197   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t1, $t2", 0x980b7cde,
1198                               0x00086755, t0, t1, t2);
1199   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t3, $t4", 0x00000018,
1200                               0x8f8f8f8f, t2, t3, t4);
1201   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t1, $t5", 0x92784656,
1202                               0xeeeeeeee, t4, t1, t5);
1203   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t6, $t7, $t3", 0xcacacaca,
1204                               0x1bdbdbdb, t6, t7, t3);
1205   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t5, $t3, $t2", 0xbacabaca,
1206                               0xdecadeca, t5, t3, t2);
1207   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t4, $t8", 0x12fadeb4,
1208                               0x93474bde, t2, t4, t8);
1209   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t8, $t0", 0x7c000790,
1210                               0xfc0007ff, t0, t8, t0);
1211   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t6, $t1", 0xffffffff,
1212                               0xffffffff, t4, t6, t1);
1213   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t1, $t2", 0xf2f4df1f,
1214                               0xcb4ab48f, t0, t1, t2);
1215   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t3, $t4", 0x435f909a,
1216                               0xaf8f7e18, t2, t3, t4);
1217   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t1, $t5", 0x2106ba5f,
1218                               0x87df4510, t4, t1, t5);
1219   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t6, $t7, $t3", 0x246a6376,
1220                               0xabf4e8e1, t6, t7, t3);
1221   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t5, $t3, $t2", 0x1046a1a3,
1222                               0xf4c0eeac, t5, t3, t2);
1223   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t2, $t4, $t8", 0x638ca515,
1224                               0x006a54f2, t2, t4, t8);
1225   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t0, $t8, $t0", 0xf63e7a9d,
1226                               0x79f74493, t0, t8, t0);
1227   TESTDSPINST_RD_RS_RT_NODSPC("adduh_r.qb $t4, $t6, $t1", 0xbd6845cd,
1228                               0x9c09e313, t4, t6, t1);
1229
1230   printf("-------- APPEND --------\n");
1231   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t1,  0", 0x00000000, 0x0fffffff,
1232                               0, t0, t1);
1233   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t3,  1", 0x00045fb2, 0x00000286,
1234                               1, t2, t3);
1235   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t1,  4", 0xfabc2435, 0x0ffb3421,
1236                               4, t4, t1);
1237   TESTDSPINST_RT_RS_SA_NODSPC("append $t6, $t7, 17", 0x07654cb8, 0x734680bc,
1238                               17, t6, t7);
1239   TESTDSPINST_RT_RS_SA_NODSPC("append $t5, $t3, 31", 0xf973437b, 0x80000000,
1240                               31, t5, t3);
1241   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t4,  8", 0x00010001, 0xffffffff,
1242                               8, t2, t4);
1243   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t8, 11", 0x7fff7fff, 0x7fff7fff,
1244                               11, t0, t8);
1245   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t6, 13", 0x0000c420, 0x00000555,
1246                               13, t4, t6);
1247   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t1,  2", 0x00000000, 0x00000000,
1248                               2, t0, t1);
1249   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t3,  6", 0x80000000, 0x80000000,
1250                               6, t2, t3);
1251   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t1,  7", 0xaaaaaaaa, 0x55555555,
1252                               7, t4, t1);
1253   TESTDSPINST_RT_RS_SA_NODSPC("append $t6, $t7, 19", 0x00000018, 0xffff2435,
1254                               19, t6, t7);
1255   TESTDSPINST_RT_RS_SA_NODSPC("append $t5, $t3, 31", 0xbabababa, 0xabababab,
1256                               31, t5, t3);
1257   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t4,  4", 0xf0f0f0f0, 0xfc79b4d2,
1258                               4, t2, t4);
1259   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t8, 12", 0xfbde3976, 0x00000000,
1260                               12, t0, t8);
1261   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t6, 10", 0x23534870, 0x00354565,
1262                               10, t4, t6);
1263   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t1, 20", 0x980b7cde, 0x00086755,
1264                               20, t0, t1);
1265   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t3, 21", 0x00000018, 0x8f8f8f8f,
1266                               21, t2, t3);
1267   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t1, 24", 0x92784656, 0xeeeeeeee,
1268                               24, t4, t1);
1269   TESTDSPINST_RT_RS_SA_NODSPC("append $t6, $t7, 27", 0xcacacaca, 0x1bdbdbdb,
1270                               27, t6, t7);
1271   TESTDSPINST_RT_RS_SA_NODSPC("append $t5, $t3,  1", 0xbacabaca, 0xdecadeca,
1272                               1, t5, t3);
1273   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t4, 18", 0x12fadeb4, 0x93474bde,
1274                               18, t2, t4);
1275   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t8, 10", 0x7c000790, 0xfc0007ff,
1276                               10, t0, t8);
1277   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t6, 16", 0xffffffff, 0xffffffff,
1278                               16, t4, t6);
1279   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t1,  0", 0xf2f4df1f, 0xcb4ab48f,
1280                               0, t0, t1);
1281   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t3, 14", 0x435f909a, 0xaf8f7e18,
1282                               14, t2, t3);
1283   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t1,  5", 0x2106ba5f, 0x87df4510,
1284                               5, t4, t1);
1285   TESTDSPINST_RT_RS_SA_NODSPC("append $t6, $t7,  7", 0x246a6376, 0xabf4e8e1,
1286                               7, t6, t7);
1287   TESTDSPINST_RT_RS_SA_NODSPC("append $t5, $t3,  9", 0x1046a1a3, 0xf4c0eeac,
1288                               9, t5, t3);
1289   TESTDSPINST_RT_RS_SA_NODSPC("append $t2, $t4,  3", 0x638ca515, 0x006a54f2,
1290                               3, t2, t4);
1291   TESTDSPINST_RT_RS_SA_NODSPC("append $t0, $t8, 15", 0xf63e7a9d, 0x79f74493,
1292                               15, t0, t8);
1293   TESTDSPINST_RT_RS_SA_NODSPC("append $t4, $t6, 11", 0xbd6845cd, 0x9c09e313,
1294                               1, t4, t6);
1295
1296   printf("-------- BALIGN --------\n");
1297   TESTDSPINST_RT_RS_SA_NODSPC("balign $t0, $t1,  0", 0x00000000, 0x0fffffff, 0,
1298                               t0, t1);
1299   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t3,  1", 0x00045fb2, 0x00000286, 1,
1300                               t2, t3);
1301   TESTDSPINST_RT_RS_SA_NODSPC("balign $t6, $t7,  3", 0x07654cb8, 0x734680bc, 3,
1302                               t6, t7);
1303   TESTDSPINST_RT_RS_SA_NODSPC("balign $t5, $t3,  0", 0xf973437b, 0x80000000, 0,
1304                               t5, t3);
1305   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t4,  1", 0x00010001, 0xffffffff, 1,
1306                               t2, t4);
1307   TESTDSPINST_RT_RS_SA_NODSPC("balign $t4, $t6,  3", 0x0000c420, 0x00000555, 3,
1308                               t4, t6);
1309   TESTDSPINST_RT_RS_SA_NODSPC("balign $t0, $t1,  0", 0x00000000, 0x00000000, 0,
1310                               t0, t1);
1311   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t3,  1", 0x80000000, 0x80000000, 1,
1312                               t2, t3);
1313   TESTDSPINST_RT_RS_SA_NODSPC("balign $t6, $t7,  3", 0x00000018, 0xffff2435, 3,
1314                               t6, t7);
1315   TESTDSPINST_RT_RS_SA_NODSPC("balign $t5, $t3,  0", 0xbabababa, 0xabababab, 0,
1316                               t5, t3);
1317   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t4,  1", 0xf0f0f0f0, 0xfc79b4d2, 1,
1318                               t2, t4);
1319   TESTDSPINST_RT_RS_SA_NODSPC("balign $t4, $t6,  3", 0x23534870, 0x00354565, 3,
1320                               t4, t6);
1321   TESTDSPINST_RT_RS_SA_NODSPC("balign $t0, $t1,  0", 0x980b7cde, 0x00086755, 0,
1322                               t0, t1);
1323   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t3,  1", 0x00000018, 0x8f8f8f8f, 1,
1324                               t2, t3);
1325   TESTDSPINST_RT_RS_SA_NODSPC("balign $t6, $t7,  3", 0xcacacaca, 0x1bdbdbdb, 3,
1326                               t6, t7);
1327   TESTDSPINST_RT_RS_SA_NODSPC("balign $t5, $t3,  0", 0xbacabaca, 0xdecadeca, 0,
1328                               t5, t3);
1329   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t4,  1", 0x12fadeb4, 0x93474bde, 1,
1330                               t2, t4);
1331   TESTDSPINST_RT_RS_SA_NODSPC("balign $t4, $t6,  3", 0xffffffff, 0xffffffff, 3,
1332                               t4, t6);
1333   TESTDSPINST_RT_RS_SA_NODSPC("balign $t0, $t1,  0", 0xf2f4df1f, 0xcb4ab48f, 0,
1334                               t0, t1);
1335   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t3,  1", 0x435f909a, 0xaf8f7e18, 1,
1336                               t2, t3);
1337   TESTDSPINST_RT_RS_SA_NODSPC("balign $t6, $t7,  3", 0x246a6376, 0xabf4e8e1, 3,
1338                               t6, t7);
1339   TESTDSPINST_RT_RS_SA_NODSPC("balign $t5, $t3,  0", 0x1046a1a3, 0xf4c0eeac, 0,
1340                               t5, t3);
1341   TESTDSPINST_RT_RS_SA_NODSPC("balign $t2, $t4,  1", 0x638ca515, 0x006a54f2, 1,
1342                               t2, t4);
1343   TESTDSPINST_RT_RS_SA_NODSPC("balign $t4, $t6,  3", 0xbd6845cd, 0x9c09e313, 3,
1344                               t4, t6);
1345
1346   printf("-------- CMPGDU.EQ.QB --------\n");
1347   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t1, $t2", 0x00000000,
1348                             0x00000000, t0, t1, t2);
1349   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t3, $t4", 0x00045fb2,
1350                             0x00000286, t2, t3, t4);
1351   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t1, $t5", 0x00002435,
1352                             0xffff3421, t4, t1, t5);
1353   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t6, $t7, $t3", 0x07654cb8,
1354                             0x734680bc, t6, t7, t3);
1355   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t5, $t3, $t2", 0xf973437b,
1356                             0x80000000, t5, t3, t2);
1357   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t4, $t8", 0x00010001,
1358                             0xffffffff, t2, t4, t8);
1359   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t8, $t0", 0x7fff7fff,
1360                             0x7fff7fff, t0, t8, t0);
1361   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t6, $t1", 0x0000c420,
1362                             0x00000555, t4, t6, t1);
1363   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t3, $t4", 0x00000004,
1364                             1073741824, t2, t3, t4);
1365   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t1, $t5", 0x80002435,
1366                             0x80003421, t4, t1, t5);
1367   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t6, $t7, $t3", 0x76548000,
1368                             0x73468000, t6, t7, t3);
1369   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t5, $t3, $t2", 0x80000000,
1370                             0x80000000, t5, t3, t2);
1371   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t4, $t8", 0x00010001,
1372                             0xffffffff, t2, t4, t8);
1373   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t8, $t0", 0x7fff7fff,
1374                             0x7fff7fff, t0, t8, t0);
1375   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t6, $t1", 0x0000c420,
1376                             0x00000555, t4, t6, t1);
1377   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t1, $t2", 0x00000000,
1378                             0x00000000, t0, t1, t2);
1379   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t3, $t4", 0x80000000,
1380                             0x80000000, t2, t3, t4);
1381   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t1, $t5", 0xaaaaaaaa,
1382                             0x55555555, t4, t1, t5);
1383   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t6, $t7, $t3", 0x00000018,
1384                             0xffff2435, t6, t7, t3);
1385   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t5, $t3, $t2", 0xbabababa,
1386                             0xabababab, t5, t3, t2);
1387   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t4, $t8", 0xf0f0f0f0,
1388                             0xfc79b4d2, t2, t4, t8);
1389   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t8, $t0", 0xfbde3976,
1390                             0x00000000, t0, t8, t0);
1391   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t6, $t1", 0x23534870,
1392                             0x00354565, t4, t6, t1);
1393   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t1, $t2", 0x980b7cde,
1394                             0x00086755, t0, t1, t2);
1395   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t3, $t4", 0x00000018,
1396                             0x8f8f8f8f, t2, t3, t4);
1397   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t1, $t5", 0x92784656,
1398                             0xeeeeeeee, t4, t1, t5);
1399   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t6, $t7, $t3", 0xcacacaca,
1400                             0x1bdbdbdb, t6, t7, t3);
1401   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t5, $t3, $t2", 0xbacabaca,
1402                             0xdecadeca, t5, t3, t2);
1403   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t4, $t8", 0x12fadeb4,
1404                             0x93474bde, t2, t4, t8);
1405   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t8, $t0", 0x7c000790,
1406                             0xfc0007ff, t0, t8, t0);
1407   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t6, $t1", 0xffffffff,
1408                             0xffffffff, t4, t6, t1);
1409   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t1, $t2", 0xf2f4df1f,
1410                             0xcb4ab48f, t0, t1, t2);
1411   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t3, $t4", 0x435f909a,
1412                             0xaf8f7e18, t2, t3, t4);
1413   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t1, $t5", 0x2106ba5f,
1414                             0x87df4510, t4, t1, t5);
1415   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t6, $t7, $t3", 0x246a6376,
1416                             0xabf4e8e1, t6, t7, t3);
1417   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t5, $t3, $t2", 0x1046a1a3,
1418                             0xf4c0eeac, t5, t3, t2);
1419   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t2, $t4, $t8", 0x638ca515,
1420                             0x006a54f2, t2, t4, t8);
1421   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t0, $t8, $t0", 0xf63e7a9d,
1422                             0x79f74493, t0, t8, t0);
1423   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.eq.qb $t4, $t6, $t1", 0xbd6845cd,
1424                             0x9c09e313, t4, t6, t1);
1425
1426   printf("-------- CMPGDU.LT.QB --------\n");
1427   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t1, $t2", 0x00000000,
1428                             0x00000000, t0, t1, t2);
1429   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t3, $t4", 0x00045fb2,
1430                             0x00000286, t2, t3, t4);
1431   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t1, $t5", 0x00002435,
1432                             0xffff3421, t4, t1, t5);
1433   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t6, $t7, $t3", 0x07654cb8,
1434                             0x734680bc, t6, t7, t3);
1435   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t5, $t3, $t2", 0xf973437b,
1436                             0x80000000, t5, t3, t2);
1437   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t4, $t8", 0x00010001,
1438                             0xffffffff, t2, t4, t8);
1439   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t8, $t0", 0x7fff7fff,
1440                             0x7fff7fff, t0, t8, t0);
1441   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t6, $t1", 0x0000c420,
1442                             0x00000555, t4, t6, t1);
1443   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t3, $t4", 0x00000004,
1444                             1073741824, t2, t3, t4);
1445   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t1, $t5", 0x80002435,
1446                             0x80003421, t4, t1, t5);
1447   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t6, $t7, $t3", 0x76548000,
1448                             0x73468000, t6, t7, t3);
1449   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t5, $t3, $t2", 0x80000000,
1450                             0x80000000, t5, t3, t2);
1451   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t4, $t8", 0x00010001,
1452                             0xffffffff, t2, t4, t8);
1453   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t8, $t0", 0x7fff7fff,
1454                             0x7fff7fff, t0, t8, t0);
1455   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t6, $t1", 0x0000c420,
1456                             0x00000555, t4, t6, t1);
1457   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t1, $t2", 0x00000000,
1458                             0x00000000, t0, t1, t2);
1459   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t3, $t4", 0x80000000,
1460                             0x80000000, t2, t3, t4);
1461   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t1, $t5", 0xaaaaaaaa,
1462                             0x55555555, t4, t1, t5);
1463   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t6, $t7, $t3", 0x00000018,
1464                             0xffff2435, t6, t7, t3);
1465   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t5, $t3, $t2", 0xbabababa,
1466                             0xabababab, t5, t3, t2);
1467   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t4, $t8", 0xf0f0f0f0,
1468                             0xfc79b4d2, t2, t4, t8);
1469   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t8, $t0", 0xfbde3976,
1470                             0x00000000, t0, t8, t0);
1471   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t6, $t1", 0x23534870,
1472                             0x00354565, t4, t6, t1);
1473   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t1, $t2", 0x980b7cde,
1474                             0x00086755, t0, t1, t2);
1475   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t3, $t4", 0x00000018,
1476                             0x8f8f8f8f, t2, t3, t4);
1477   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t1, $t5", 0x92784656,
1478                             0xeeeeeeee, t4, t1, t5);
1479   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t6, $t7, $t3", 0xcacacaca,
1480                             0x1bdbdbdb, t6, t7, t3);
1481   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t5, $t3, $t2", 0xbacabaca,
1482                             0xdecadeca, t5, t3, t2);
1483   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t4, $t8", 0x12fadeb4,
1484                             0x93474bde, t2, t4, t8);
1485   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t8, $t0", 0x7c000790,
1486                             0xfc0007ff, t0, t8, t0);
1487   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t6, $t1", 0xffffffff,
1488                             0xffffffff, t4, t6, t1);
1489   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t1, $t2", 0xf2f4df1f,
1490                             0xcb4ab48f, t0, t1, t2);
1491   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t3, $t4", 0x435f909a,
1492                             0xaf8f7e18, t2, t3, t4);
1493   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t1, $t5", 0x2106ba5f,
1494                             0x87df4510, t4, t1, t5);
1495   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t6, $t7, $t3", 0x246a6376,
1496                             0xabf4e8e1, t6, t7, t3);
1497   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t5, $t3, $t2", 0x1046a1a3,
1498                             0xf4c0eeac, t5, t3, t2);
1499   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t2, $t4, $t8", 0x638ca515,
1500                             0x006a54f2, t2, t4, t8);
1501   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t0, $t8, $t0", 0xf63e7a9d,
1502                             0x79f74493, t0, t8, t0);
1503   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.lt.qb $t4, $t6, $t1", 0xbd6845cd,
1504                             0x9c09e313, t4, t6, t1);
1505
1506   printf("-------- CMPGDU.LE.QB --------\n");
1507   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t1, $t2", 0x00000000,
1508                             0x00000000, t0, t1, t2);
1509   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t3, $t4", 0x00045fb2,
1510                             0x00000286, t2, t3, t4);
1511   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t1, $t5", 0x00002435,
1512                             0xffff3421, t4, t1, t5);
1513   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t6, $t7, $t3", 0x07654cb8,
1514                             0x734680bc, t6, t7, t3);
1515   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t5, $t3, $t2", 0xf973437b,
1516                             0x80000000, t5, t3, t2);
1517   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t4, $t8", 0x00010001,
1518                             0xffffffff, t2, t4, t8);
1519   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t8, $t0", 0x7fff7fff,
1520                             0x7fff7fff, t0, t8, t0);
1521   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t6, $t1", 0x0000c420,
1522                             0x00000555, t4, t6, t1);
1523   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t3, $t4", 0x00000004,
1524                             1073741824, t2, t3, t4);
1525   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t1, $t5", 0x80002435,
1526                             0x80003421, t4, t1, t5);
1527   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t6, $t7, $t3", 0x76548000,
1528                             0x73468000, t6, t7, t3);
1529   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t5, $t3, $t2", 0x80000000,
1530                             0x80000000, t5, t3, t2);
1531   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t4, $t8", 0x00010001,
1532                             0xffffffff, t2, t4, t8);
1533   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t8, $t0", 0x7fff7fff,
1534                             0x7fff7fff, t0, t8, t0);
1535   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t6, $t1", 0x0000c420,
1536                             0x00000555, t4, t6, t1);
1537   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t1, $t2", 0x00000000,
1538                             0x00000000, t0, t1, t2);
1539   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t3, $t4", 0x80000000,
1540                             0x80000000, t2, t3, t4);
1541   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t1, $t5", 0xaaaaaaaa,
1542                             0x55555555, t4, t1, t5);
1543   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t6, $t7, $t3", 0x00000018,
1544                             0xffff2435, t6, t7, t3);
1545   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t5, $t3, $t2", 0xbabababa,
1546                             0xabababab, t5, t3, t2);
1547   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t4, $t8", 0xf0f0f0f0,
1548                             0xfc79b4d2, t2, t4, t8);
1549   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t8, $t0", 0xfbde3976,
1550                             0x00000000, t0, t8, t0);
1551   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t6, $t1", 0x23534870,
1552                             0x00354565, t4, t6, t1);
1553   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t1, $t2", 0x980b7cde,
1554                             0x00086755, t0, t1, t2);
1555   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t3, $t4", 0x00000018,
1556                             0x8f8f8f8f, t2, t3, t4);
1557   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t1, $t5", 0x92784656,
1558                             0xeeeeeeee, t4, t1, t5);
1559   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t6, $t7, $t3", 0xcacacaca,
1560                             0x1bdbdbdb, t6, t7, t3);
1561   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t5, $t3, $t2", 0xbacabaca,
1562                             0xdecadeca, t5, t3, t2);
1563   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t4, $t8", 0x12fadeb4,
1564                             0x93474bde, t2, t4, t8);
1565   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t8, $t0", 0x7c000790,
1566                             0xfc0007ff, t0, t8, t0);
1567   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t6, $t1", 0xffffffff,
1568                             0xffffffff, t4, t6, t1);
1569   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t1, $t2", 0xf2f4df1f,
1570                             0xcb4ab48f, t0, t1, t2);
1571   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t3, $t4", 0x435f909a,
1572                             0xaf8f7e18, t2, t3, t4);
1573   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t1, $t5", 0x2106ba5f,
1574                             0x87df4510, t4, t1, t5);
1575   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t6, $t7, $t3", 0x246a6376,
1576                             0xabf4e8e1, t6, t7, t3);
1577   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t5, $t3, $t2", 0x1046a1a3,
1578                             0xf4c0eeac, t5, t3, t2);
1579   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t2, $t4, $t8", 0x638ca515,
1580                             0x006a54f2, t2, t4, t8);
1581   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t0, $t8, $t0", 0xf63e7a9d,
1582                             0x79f74493, t0, t8, t0);
1583   TESTDSPINST_RD_RS_RT_DSPC("cmpgdu.le.qb $t4, $t6, $t1", 0xbd6845cd,
1584                             0x9c09e313, t4, t6, t1);
1585
1586   printf("-------- DPA.W.PH --------\n");
1587   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
1588                               0x4387ffff);
1589   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x00000000, 0x00000004,
1590                               0x00000005);
1591   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xffffffff, 0x80000000,
1592                               0x80000000);
1593   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xeeeeffff, 0x00002345, 0x3277ffff,
1594                               0x4387ffff);
1595   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
1596                               0x4387ffff);
1597   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x00000000, 0x80000000,
1598                               0x80000000);
1599   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x80008000, 0x80000000,
1600                               0x80000000);
1601   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x00000000, 0x80000004,
1602                               0x00000005);
1603   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xffffffff, 0x80008000,
1604                               0x4387ffff);
1605   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xeeeeffff, 0x00002345, 0x80008000,
1606                               0x80008000);
1607   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
1608                               0x4387ffff);
1609   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x00000000, 0x80008000,
1610                               0x80008000);
1611   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
1612                               0x4387ffff);
1613   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x80000000, 0xffff0000, 0x3277eeee,
1614                               0x80008000);
1615   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x00000000, 0x80000000,
1616                               0x80000000);
1617   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
1618                               0x4387ffff);
1619   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x0000ffff, 0x80008000,
1620                               0x4387ffff);
1621   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffff1234, 0x00000000, 0xffff3277,
1622                               0x4387ffff);
1623   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x5678ffff, 0x3277ffff, 0x80000000,
1624                               0x80000000);
1625   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x00000000, 0xffff3277,
1626                               0xffff6543);
1627   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xffffffff, 0xffffffff,
1628                               0xffffffff);
1629   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffbbbb, 0xeeee0000, 0x80008000,
1630                               0x4387ffff);
1631   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x34560000, 0x3277ffff,
1632                               0x4387cccc);
1633   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
1634                               0x4387ffff);
1635   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x12345678, 0xffffffff, 0xffffffff,
1636                               0xffffffff);
1637   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffbbbb, 0x12345678, 0x80008000,
1638                               0x4387ffff);
1639   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x34560000, 0x87654321,
1640                               0x80008000);
1641   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
1642                               0x80000000);
1643   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
1644                               0x4387ffff);
1645   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x80000000, 0x00000000, 0x80008000,
1646                               0x80008000);
1647   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x80008000, 0x3277ffff,
1648                               0x4387ffff);
1649   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
1650                               0x4387ffff);
1651   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", -24, 120, -24, 120);
1652   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 140, 120, 140, 120);
1653   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000004, 1073741824, 0x00000004,
1654                               1073741824);
1655   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", (1<<31)+1, (1<<31)+2, (1<<31)+1,
1656                               (1<<31)+2);
1657   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x80002431, 0x4b908000, 0x80002431,
1658                               0x4b908000);
1659   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x004d8000, 0x800027cc, 0x004d8000,
1660                               0x800027cc);
1661   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xf6a3fa3c, 0x083b3571, 0xf6a3fa3c,
1662                               0x083b3571);
1663   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xbf17fb9a, 0xb9743941, 0xbf17fb9a,
1664                               0xb9743941);
1665   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x2c0bd024, 0xbce5f924, 0x2c0bd024,
1666                               0xbce5f924);
1667   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x3e976e2e, 0xcc3c201c, 0x3e976e2e,
1668                               0xcc3c201c);
1669   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xb4bfb365, 0x1ebaf88e, 0xb4bfb365,
1670                               0x1ebaf88e);
1671   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x288593c0, 0x722d5e20, 0x288593c0,
1672                               0x722d5e20);
1673   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x4d7ff5b4, 0xa1d6f791, 0x4d7ff5b4,
1674                               0xa1d6f791);
1675   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x4557be13, 0x7b11bee7, 0x4557be13,
1676                               0x7b11bee7);
1677   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xadcf5772, 0xa5631488, 0xadcf5772,
1678                               0xa5631488);
1679   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x989a7235, 0xb10bcc65, 0x989a7235,
1680                               0xb10bcc65);
1681   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x4d6f393a, 0x73f39fca, 0x4d6f393a,
1682                               0x73f39fca);
1683   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x24a3291e, 0x5648e540, 0x24a3291e,
1684                               0x5648e540);
1685   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xdd91eebf, 0xc54f79e6, 0xdd91eebf,
1686                               0xc54f79e6);
1687   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xf7ce2ec6, 0x5fc92974, 0xf7ce2ec6,
1688                               0x5fc92974);
1689   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xbc1083e8, 0x7e08184e, 0xbc1083e8,
1690                               0x7e08184e);
1691   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xa617cc31, 0x71c8315f, 0xa617cc31,
1692                               0x71c8315f);
1693   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xdfe1e8f0, 0x9493110e, 0xdfe1e8f0,
1694                               0x9493110e);
1695   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x31458a23, 0xbb246228, 0x31458a23,
1696                               0xbb246228);
1697   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x848af791, 0x339d8d88, 0x848af791,
1698                               0x339d8d88);
1699   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xda3bacdc, 0x70974249, 0xda3bacdc,
1700                               0x70974249);
1701   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x649d5cbd, 0x8a8d4e7d, 0x649d5cbd,
1702                               0x8a8d4e7d);
1703   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xc0c8c881, 0xeb1b4335, 0xc0c8c881,
1704                               0xeb1b4335);
1705   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x7dd81a20, 0x0cd6b508, 0x7dd81a20,
1706                               0x0cd6b508);
1707   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x6731e282, 0x00000000,
1708                               0x6731e282);
1709   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xb6edf28f, 0xffffffff,
1710                               0xb6edf28f);
1711   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x4b4ec9ca, 0x00000000,
1712                               0x4b4ec9ca);
1713   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xc1037fa4, 0xffffffff,
1714                               0xc1037fa4);
1715   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xcb4ab48f, 0xffffffff,
1716                               0xcb4ab48f);
1717   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xaf8f7e18, 0xffffffff,
1718                               0xaf8f7e18);
1719   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x87df4510, 0xffffffff,
1720                               0x87df4510);
1721   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xabf4e8e1, 0xffffffff,
1722                               0xabf4e8e1);
1723   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0xf4c0eeac, 0xffffffff,
1724                               0xf4c0eeac);
1725   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x006a54f2, 0x00000000,
1726                               0x006a54f2);
1727   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0x00000000, 0x79f74493, 0x00000000,
1728                               0x79f74493);
1729   TESTDSPINST_AC_RS_RT_NODSPC("dpa.w.ph", 0xffffffff, 0x9c09e313, 0xffffffff,
1730                               0x9c09e313);
1731
1732   printf("-------- DPAQX_S.W.PH -------- \n");
1733   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x00000000,
1734                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
1735   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x00000004,
1736                             1073741824, 0x00000000, 0x00000006, t0, t1);
1737   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x80002435,
1738                             0x80003421, 0x00000000, 1073741824, t2, t3);
1739   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x76548000,
1740                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
1741   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x80000000,
1742                             0x80000000, 0x00000000, 0x00000001, t5, t3);
1743   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t4", "ac1", 0x00010001,
1744                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
1745   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x7fff7fff,
1746                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
1747   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x0000c420,
1748                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
1749   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x00000000,
1750                             0x00000000, 0x00000000, 0x55555555, t2, t3);
1751   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t4, $t1", "ac2", 0x80000000,
1752                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
1753   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
1754                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
1755   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x00000018,
1756                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
1757   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xbabababa,
1758                             0xabababab, 0x00000000, 0x00000000, t2, t4);
1759   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
1760                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
1761   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t4, $t5", "ac3", 0xfbde3976,
1762                             0x00000000, 0x00000000, 0x12349876, t4, t5);
1763   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x23534870,
1764                             0x00354565, 0x00000000, 0x00354565, t0, t1);
1765   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x980b7cde,
1766                             0x00086755, 0x00000000, 0x00086755, t2, t3);
1767   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000018,
1768                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
1769   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x92784656,
1770                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
1771   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t5, $t3", "ac0", 0xcacacaca,
1772                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
1773   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xbacabaca,
1774                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
1775   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x12fadeb4,
1776                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
1777   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x7c000790,
1778                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
1779   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t0, $t8", "ac2", 0xffffffff,
1780                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
1781   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x24a3291e,
1782                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
1783   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t3", "ac1", 0xdd91eebf,
1784                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
1785   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
1786                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
1787   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t6, $t7", "ac3", 0xbc1083e8,
1788                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
1789   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t5, $t3", "ac0", 0xa617cc31,
1790                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
1791   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
1792                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
1793   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x31458a23,
1794                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
1795   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x848af791,
1796                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
1797   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t0, $t1", "ac0", 0xda3bacdc,
1798                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
1799   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x649d5cbd,
1800                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
1801   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t4, $t1", "ac2", 0xc0c8c881,
1802                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
1803   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x7dd81a20,
1804                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
1805   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x7fff7fff,
1806                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
1807   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t4", "ac1", 0x00000555,
1808                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
1809   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x00000000,
1810                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
1811   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x80000000,
1812                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
1813   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t4", "ac1", 0x55555555,
1814                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
1815   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t0, $t8", "ac2", 0xffff8000,
1816                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
1817   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t0, $t1", "ac0", 0xabababab,
1818                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
1819   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
1820                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
1821   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000000,
1822                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
1823   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x00354565,
1824                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
1825   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x00086755,
1826                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
1827   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xffff8000,
1828                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
1829
1830   printf("-------- DPAQX_SA.W.PH -------- \n");
1831   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x00000000,
1832                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
1833   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x00000004,
1834                             1073741824, 0x00000000, 0x00000006, t0, t1);
1835   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x80002435,
1836                             0x80003421, 0x00000000, 1073741824, t2, t3);
1837   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x76548000,
1838                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
1839   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x80000000,
1840                             0x80000000, 0x00000000, 0x00000001, t5, t3);
1841   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0x00010001,
1842                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
1843   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x7fff7fff,
1844                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
1845   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x0000c420,
1846                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
1847   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x00000000,
1848                             0x00000000, 0x00000000, 0x55555555, t2, t3);
1849   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0x80000000,
1850                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
1851   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
1852                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
1853   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x00000018,
1854                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
1855   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xbabababa,
1856                             0xabababab, 0x00000000, 0x00000000, t2, t4);
1857   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
1858                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
1859   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0xfbde3976,
1860                             0x00000000, 0x00000000, 0x12349876, t4, t5);
1861   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x23534870,
1862                             0x00354565, 0x00000000, 0x00354565, t0, t1);
1863   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x980b7cde,
1864                             0x00086755, 0x00000000, 0x00086755, t2, t3);
1865   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0x00000018,
1866                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
1867   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x92784656,
1868                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
1869   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0xcacacaca,
1870                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
1871   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xbacabaca,
1872                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
1873   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x12fadeb4,
1874                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
1875   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x7c000790,
1876                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
1877   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0xffffffff,
1878                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
1879   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x24a3291e,
1880                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
1881   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0xdd91eebf,
1882                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
1883   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
1884                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
1885   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0xbc1083e8,
1886                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
1887   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0xa617cc31,
1888                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
1889   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
1890                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
1891   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x31458a23,
1892                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
1893   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x848af791,
1894                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
1895   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0xda3bacdc,
1896                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
1897   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x649d5cbd,
1898                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
1899   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0xc0c8c881,
1900                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
1901   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x7dd81a20,
1902                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
1903   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x7fff7fff,
1904                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
1905   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0x00000555,
1906                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
1907   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x00000000,
1908                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
1909   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x80000000,
1910                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
1911   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0x55555555,
1912                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
1913   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0xffff8000,
1914                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
1915   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0xabababab,
1916                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
1917   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
1918                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
1919   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0x00000000,
1920                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
1921   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x00354565,
1922                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
1923   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x00086755,
1924                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
1925   TESTDSPINST_AC_RS_RT_DSPC("dpaqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xffff8000,
1926                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
1927
1928   printf("-------- DPAX.W.PH --------\n");
1929   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
1930                               0x4387ffff);
1931   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x00000000, 0x00000004,
1932                               0x00000005);
1933   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xffffffff, 0x80000000,
1934                               0x80000000);
1935   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xeeeeffff, 0x00002345, 0x3277ffff,
1936                               0x4387ffff);
1937   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
1938                               0x4387ffff);
1939   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x00000000, 0x80000000,
1940                               0x80000000);
1941   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x80008000, 0x80000000,
1942                               0x80000000);
1943   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x00000000, 0x80000004,
1944                               0x00000005);
1945   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xffffffff, 0x80008000,
1946                               0x4387ffff);
1947   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xeeeeffff, 0x00002345, 0x80008000,
1948                               0x80008000);
1949   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
1950                               0x4387ffff);
1951   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x00000000, 0x80008000,
1952                               0x80008000);
1953   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
1954                               0x4387ffff);
1955   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x80000000, 0xffff0000, 0x3277eeee,
1956                               0x80008000);
1957   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x00000000, 0x80000000,
1958                               0x80000000);
1959   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
1960                               0x4387ffff);
1961   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x0000ffff, 0x80008000,
1962                               0x4387ffff);
1963   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffff1234, 0x00000000, 0xffff3277,
1964                               0x4387ffff);
1965   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x5678ffff, 0x3277ffff, 0x80000000,
1966                               0x80000000);
1967   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x00000000, 0xffff3277,
1968                               0xffff6543);
1969   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xffffffff, 0xffffffff,
1970                               0xffffffff);
1971   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffbbbb, 0xeeee0000, 0x80008000,
1972                               0x4387ffff);
1973   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x34560000, 0x3277ffff,
1974                               0x4387cccc);
1975   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
1976                               0x4387ffff);
1977   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x12345678, 0xffffffff, 0xffffffff,
1978                               0xffffffff);
1979   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffbbbb, 0x12345678, 0x80008000,
1980                               0x4387ffff);
1981   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x34560000, 0x87654321,
1982                               0x80008000);
1983   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
1984                               0x80000000);
1985   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
1986                               0x4387ffff);
1987   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x80000000, 0x00000000, 0x80008000,
1988                               0x80008000);
1989   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x80008000, 0x3277ffff,
1990                               0x4387ffff);
1991   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
1992                               0x4387ffff);
1993   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", -24, 120, -24, 120);
1994   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 140, 120, 140, 120);
1995   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000004, 1073741824, 0x00000004,
1996                               1073741824);
1997   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", (1<<31)+1, (1<<31)+2, (1<<31)+1,
1998                               (1<<31)+2);
1999   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x80002431, 0x4b908000, 0x80002431,
2000                               0x4b908000);
2001   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x004d8000, 0x800027cc, 0x004d8000,
2002                               0x800027cc);
2003   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xf6a3fa3c, 0x083b3571, 0xf6a3fa3c,
2004                               0x083b3571);
2005   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xbf17fb9a, 0xb9743941, 0xbf17fb9a,
2006                               0xb9743941);
2007   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x2c0bd024, 0xbce5f924, 0x2c0bd024,
2008                               0xbce5f924);
2009   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x3e976e2e, 0xcc3c201c, 0x3e976e2e,
2010                               0xcc3c201c);
2011   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xb4bfb365, 0x1ebaf88e, 0xb4bfb365,
2012                               0x1ebaf88e);
2013   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x288593c0, 0x722d5e20, 0x288593c0,
2014                               0x722d5e20);
2015   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x4d7ff5b4, 0xa1d6f791, 0x4d7ff5b4,
2016                               0xa1d6f791);
2017   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x4557be13, 0x7b11bee7, 0x4557be13,
2018                               0x7b11bee7);
2019   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xadcf5772, 0xa5631488, 0xadcf5772,
2020                               0xa5631488);
2021   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x989a7235, 0xb10bcc65, 0x989a7235,
2022                               0xb10bcc65);
2023   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x4d6f393a, 0x73f39fca, 0x4d6f393a,
2024                               0x73f39fca);
2025   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x24a3291e, 0x5648e540, 0x24a3291e,
2026                               0x5648e540);
2027   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xdd91eebf, 0xc54f79e6, 0xdd91eebf,
2028                               0xc54f79e6);
2029   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xf7ce2ec6, 0x5fc92974, 0xf7ce2ec6,
2030                               0x5fc92974);
2031   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xbc1083e8, 0x7e08184e, 0xbc1083e8,
2032                               0x7e08184e);
2033   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xa617cc31, 0x71c8315f, 0xa617cc31,
2034                               0x71c8315f);
2035   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xdfe1e8f0, 0x9493110e, 0xdfe1e8f0,
2036                               0x9493110e);
2037   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x31458a23, 0xbb246228, 0x31458a23,
2038                               0xbb246228);
2039   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x848af791, 0x339d8d88, 0x848af791,
2040                               0x339d8d88);
2041   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xda3bacdc, 0x70974249, 0xda3bacdc,
2042                               0x70974249);
2043   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x649d5cbd, 0x8a8d4e7d, 0x649d5cbd,
2044                               0x8a8d4e7d);
2045   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xc0c8c881, 0xeb1b4335, 0xc0c8c881,
2046                               0xeb1b4335);
2047   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x7dd81a20, 0x0cd6b508, 0x7dd81a20,
2048                               0x0cd6b508);
2049   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x6731e282, 0x00000000,
2050                               0x6731e282);
2051   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xb6edf28f, 0xffffffff,
2052                               0xb6edf28f);
2053   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x4b4ec9ca, 0x00000000,
2054                               0x4b4ec9ca);
2055   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xc1037fa4, 0xffffffff,
2056                               0xc1037fa4);
2057   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xcb4ab48f, 0xffffffff,
2058                               0xcb4ab48f);
2059   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xaf8f7e18, 0xffffffff,
2060                               0xaf8f7e18);
2061   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x87df4510, 0xffffffff,
2062                               0x87df4510);
2063   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xabf4e8e1, 0xffffffff,
2064                               0xabf4e8e1);
2065   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0xf4c0eeac, 0xffffffff,
2066                               0xf4c0eeac);
2067   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x006a54f2, 0x00000000,
2068                               0x006a54f2);
2069   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0x00000000, 0x79f74493, 0x00000000,
2070                               0x79f74493);
2071   TESTDSPINST_AC_RS_RT_NODSPC("dpax.w.ph", 0xffffffff, 0x9c09e313, 0xffffffff,
2072                               0x9c09e313);
2073
2074   printf("-------- DPS.W.PH --------\n");
2075   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
2076                               0x4387ffff);
2077   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x00000000, 0x00000004,
2078                               0x00000005);
2079   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xffffffff, 0x80000000,
2080                               0x80000000);
2081   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xeeeeffff, 0x00002345, 0x3277ffff,
2082                               0x4387ffff);
2083   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2084                               0x4387ffff);
2085   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x00000000, 0x80000000,
2086                               0x80000000);
2087   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x80008000, 0x80000000,
2088                               0x80000000);
2089   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x00000000, 0x80000004,
2090                               0x00000005);
2091   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xffffffff, 0x80008000,
2092                               0x4387ffff);
2093   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xeeeeffff, 0x00002345, 0x80008000,
2094                               0x80008000);
2095   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2096                               0x4387ffff);
2097   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x00000000, 0x80008000,
2098                               0x80008000);
2099   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
2100                               0x4387ffff);
2101   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x80000000, 0xffff0000, 0x3277eeee,
2102                               0x80008000);
2103   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x00000000, 0x80000000,
2104                               0x80000000);
2105   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
2106                               0x4387ffff);
2107   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x0000ffff, 0x80008000,
2108                               0x4387ffff);
2109   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffff1234, 0x00000000, 0xffff3277,
2110                               0x4387ffff);
2111   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x5678ffff, 0x3277ffff, 0x80000000,
2112                               0x80000000);
2113   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x00000000, 0xffff3277,
2114                               0xffff6543);
2115   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xffffffff, 0xffffffff,
2116                               0xffffffff);
2117   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffbbbb, 0xeeee0000, 0x80008000,
2118                               0x4387ffff);
2119   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x34560000, 0x3277ffff,
2120                               0x4387cccc);
2121   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
2122                               0x4387ffff);
2123   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x12345678, 0xffffffff, 0xffffffff,
2124                               0xffffffff);
2125   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffbbbb, 0x12345678, 0x80008000,
2126                               0x4387ffff);
2127   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x34560000, 0x87654321,
2128                               0x80008000);
2129   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
2130                               0x80000000);
2131   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2132                               0x4387ffff);
2133   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x80000000, 0x00000000, 0x80008000,
2134                               0x80008000);
2135   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x80008000, 0x3277ffff,
2136                               0x4387ffff);
2137   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
2138                               0x4387ffff);
2139   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", -24, 120, -24, 120);
2140   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 140, 120, 140, 120);
2141   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000004, 1073741824, 0x00000004,
2142                               1073741824);
2143   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", (1<<31)+1, (1<<31)+2, (1<<31)+1,
2144                               (1<<31)+2);
2145   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x80002431, 0x4b908000, 0x80002431,
2146                               0x4b908000);
2147   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x004d8000, 0x800027cc, 0x004d8000,
2148                               0x800027cc);
2149   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xf6a3fa3c, 0x083b3571, 0xf6a3fa3c,
2150                               0x083b3571);
2151   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xbf17fb9a, 0xb9743941, 0xbf17fb9a,
2152                               0xb9743941);
2153   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x2c0bd024, 0xbce5f924, 0x2c0bd024,
2154                               0xbce5f924);
2155   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x3e976e2e, 0xcc3c201c, 0x3e976e2e,
2156                               0xcc3c201c);
2157   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xb4bfb365, 0x1ebaf88e, 0xb4bfb365,
2158                               0x1ebaf88e);
2159   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x288593c0, 0x722d5e20, 0x288593c0,
2160                               0x722d5e20);
2161   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x4d7ff5b4, 0xa1d6f791, 0x4d7ff5b4,
2162                               0xa1d6f791);
2163   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x4557be13, 0x7b11bee7, 0x4557be13,
2164                               0x7b11bee7);
2165   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xadcf5772, 0xa5631488, 0xadcf5772,
2166                               0xa5631488);
2167   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x989a7235, 0xb10bcc65, 0x989a7235,
2168                               0xb10bcc65);
2169   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x4d6f393a, 0x73f39fca, 0x4d6f393a,
2170                               0x73f39fca);
2171   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x24a3291e, 0x5648e540, 0x24a3291e,
2172                               0x5648e540);
2173   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xdd91eebf, 0xc54f79e6, 0xdd91eebf,
2174                               0xc54f79e6);
2175   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xf7ce2ec6, 0x5fc92974, 0xf7ce2ec6,
2176                               0x5fc92974);
2177   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xbc1083e8, 0x7e08184e, 0xbc1083e8,
2178                               0x7e08184e);
2179   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xa617cc31, 0x71c8315f, 0xa617cc31,
2180                               0x71c8315f);
2181   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xdfe1e8f0, 0x9493110e, 0xdfe1e8f0,
2182                               0x9493110e);
2183   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x31458a23, 0xbb246228, 0x31458a23,
2184                               0xbb246228);
2185   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x848af791, 0x339d8d88, 0x848af791,
2186                               0x339d8d88);
2187   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xda3bacdc, 0x70974249, 0xda3bacdc,
2188                               0x70974249);
2189   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x649d5cbd, 0x8a8d4e7d, 0x649d5cbd,
2190                               0x8a8d4e7d);
2191   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xc0c8c881, 0xeb1b4335, 0xc0c8c881,
2192                               0xeb1b4335);
2193   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x7dd81a20, 0x0cd6b508, 0x7dd81a20,
2194                               0x0cd6b508);
2195   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x6731e282, 0x00000000,
2196                               0x6731e282);
2197   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xb6edf28f, 0xffffffff,
2198                               0xb6edf28f);
2199   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x4b4ec9ca, 0x00000000,
2200                               0x4b4ec9ca);
2201   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xc1037fa4, 0xffffffff,
2202                               0xc1037fa4);
2203   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xcb4ab48f, 0xffffffff,
2204                               0xcb4ab48f);
2205   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xaf8f7e18, 0xffffffff,
2206                               0xaf8f7e18);
2207   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x87df4510, 0xffffffff,
2208                               0x87df4510);
2209   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xabf4e8e1, 0xffffffff,
2210                               0xabf4e8e1);
2211   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0xf4c0eeac, 0xffffffff,
2212                               0xf4c0eeac);
2213   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x006a54f2, 0x00000000,
2214                               0x006a54f2);
2215   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0x00000000, 0x79f74493, 0x00000000,
2216                               0x79f74493);
2217   TESTDSPINST_AC_RS_RT_NODSPC("dps.w.ph", 0xffffffff, 0x9c09e313, 0xffffffff,
2218                               0x9c09e313);
2219
2220   printf("-------- DPSQX_S.W.PH -------- \n");
2221   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x00000000,
2222                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
2223   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x00000004,
2224                             1073741824, 0x00000000, 0x00000006, t0, t1);
2225   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x80002435,
2226                             0x80003421, 0x00000000, 1073741824, t2, t3);
2227   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x76548000,
2228                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2229   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x80000000,
2230                             0x80000000, 0x00000000, 0x00000001, t5, t3);
2231   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t4", "ac1", 0x00010001,
2232                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2233   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2234                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2235   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x0000c420,
2236                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2237   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x00000000,
2238                             0x00000000, 0x00000000, 0x55555555, t2, t3);
2239   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t4, $t1", "ac2", 0x80000000,
2240                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2241   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2242                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
2243   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x00000018,
2244                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2245   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xbabababa,
2246                             0xabababab, 0x00000000, 0x00000000, t2, t4);
2247   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2248                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2249   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t4, $t5", "ac3", 0xfbde3976,
2250                             0x00000000, 0x00000000, 0x12349876, t4, t5);
2251   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x23534870,
2252                             0x00354565, 0x00000000, 0x00354565, t0, t1);
2253   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x980b7cde,
2254                             0x00086755, 0x00000000, 0x00086755, t2, t3);
2255   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000018,
2256                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2257   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x92784656,
2258                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2259   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t5, $t3", "ac0", 0xcacacaca,
2260                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2261   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xbacabaca,
2262                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2263   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2264                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2265   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x7c000790,
2266                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2267   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t0, $t8", "ac2", 0xffffffff,
2268                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2269   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t0, $t1", "ac0", 0x24a3291e,
2270                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2271   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2272                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2273   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2274                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2275   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2276                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2277   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t5, $t3", "ac0", 0xa617cc31,
2278                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2279   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2280                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2281   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x31458a23,
2282                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2283   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x848af791,
2284                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2285   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2286                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2287   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2288                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2289   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2290                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2291   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2292                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2293   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2294                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2295   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t4", "ac1", 0x00000555,
2296                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2297   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t0, $t8", "ac2", 0x00000000,
2298                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2299   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t4, $t5", "ac3", 0x80000000,
2300                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2301   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t4", "ac1", 0x55555555,
2302                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2303   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t0, $t8", "ac2", 0xffff8000,
2304                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2305   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t0, $t1", "ac0", 0xabababab,
2306                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
2307   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2308                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2309   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac2, $t4, $t1", "ac2", 0x00000000,
2310                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2311   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac3, $t6, $t7", "ac3", 0x00354565,
2312                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2313   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac0, $t5, $t3", "ac0", 0x00086755,
2314                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2315   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_s.w.ph $ac1, $t2, $t4", "ac1", 0xffff8000,
2316                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2317
2318   printf("-------- DPSQX_SA.W.PH -------- \n");
2319   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x00000000,
2320                             0x00000000, 0xffffffff, 0x80000000, t4, t5);
2321   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x00000004,
2322                             1073741824, 0x00000000, 0x00000006, t0, t1);
2323   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x80002435,
2324                             0x80003421, 0x00000000, 1073741824, t2, t3);
2325   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x76548000,
2326                             0x73468000, 0x00000000, 0x7fffffff, t6, t7);
2327   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x80000000,
2328                             0x80000000, 0x00000000, 0x00000001, t5, t3);
2329   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0x00010001,
2330                             0xffffffff, 0xffffffff, 0xffffffff, t2, t4);
2331   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x7fff7fff,
2332                             0x7fff7fff, 0xffffffff, 0xffffffff, t0, t8);
2333   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x0000c420,
2334                             0x00000555, 0x00000000, 0x0fde3126, t0, t1);
2335   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x00000000,
2336                             0x00000000, 0x00000000, 0x55555555, t2, t3);
2337   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0x80000000,
2338                             0x80000000, 0xffffffff, 0xffff2435, t4, t1);
2339   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0xaaaaaaaa,
2340                             0x55555555, 0xffffffff, 0xabababab, t6, t7);
2341   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x00000018,
2342                             0xffff2435, 0xffffffff, 0xfc79b4d2, t5, t3);
2343   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xbabababa,
2344                             0xabababab, 0x00000000, 0x00000000, t2, t4);
2345   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0xf0f0f0f0,
2346                             0xfc79b4d2, 0x00000000, 0x00000000, t0, t8);
2347   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0xfbde3976,
2348                             0x00000000, 0x00000000, 0x12349876, t4, t5);
2349   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x23534870,
2350                             0x00354565, 0x00000000, 0x00354565, t0, t1);
2351   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x980b7cde,
2352                             0x00086755, 0x00000000, 0x00086755, t2, t3);
2353   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0x00000018,
2354                             0x8f8f8f8f, 0xffffffff, 0x8f8f8f8f, t4, t1);
2355   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x92784656,
2356                             0xeeeeeeee, 0xffffffff, 0xeeeeeeee, t6, t7);
2357   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0xcacacaca,
2358                             0x1bdbdbdb, 0x00000000, 0x1bdbdbdb, t5, t3);
2359   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xbacabaca,
2360                             0xdecadeca, 0xffffffff, 0xdecadeca, t2, t4);
2361   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x12fadeb4,
2362                             0x93474bde, 0xffffffff, 0x93474bde, t0, t8);
2363   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x7c000790,
2364                             0xfc0007ff, 0xffffffff, 0xfabfabfa, t4, t5);
2365   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0xffffffff,
2366                             0xffffffff, 0x00000000, 0x083b3571, t0, t8);
2367   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0x24a3291e,
2368                             0x5648e540, 0xffffffff, 0xb9743941, t0, t1);
2369   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0xdd91eebf,
2370                             0xc54f79e6, 0xffffffff, 0xbce5f924, t2, t3);
2371   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0xf7ce2ec6,
2372                             0x5fc92974, 0xffffffff, 0xcc3c201c, t4, t1);
2373   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0xbc1083e8,
2374                             0x7e08184e, 0x00000000, 0x1ebaf88e, t6, t7);
2375   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0xa617cc31,
2376                             0x71c8315f, 0x00000000, 0x722d5e20, t5, t3);
2377   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xdfe1e8f0,
2378                             0x9493110e, 0xffffffff, 0xa1d6f791, t2, t4);
2379   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x31458a23,
2380                             0xbb246228, 0x00000000, 0x7b11bee7, t0, t8);
2381   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x848af791,
2382                             0x339d8d88, 0xffffffff, 0xa5631488, t4, t5);
2383   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0xda3bacdc,
2384                             0x70974249, 0xffffffff, 0xb10bcc65, t0, t1);
2385   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0x649d5cbd,
2386                             0x8a8d4e7d, 0x00000000, 0x73f39fca, t2, t3);
2387   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0xc0c8c881,
2388                             0xeb1b4335, 0x00000000, 0x5648e540, t4, t1);
2389   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x7dd81a20,
2390                             0x0cd6b508, 0xffffffff, 0xc54f79e6, t6, t7);
2391   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x7fff7fff,
2392                             0x6731e282, 0x00000000, 0x5fc92974, t5, t3);
2393   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0x00000555,
2394                             0xb6edf28f, 0x00000000, 0x7e08184e, t2, t4);
2395   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0x00000000,
2396                             0x4b4ec9ca, 0x00000000, 0x71c8315f, t0, t8);
2397   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t4, $t5", "ac3", 0x80000000,
2398                             0xc1037fa4, 0xffffffff, 0x9493110e, t4, t5);
2399   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0x55555555,
2400                             0xcb4ab48f, 0xffffffff, 0xbb246228, t2, t4);
2401   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t0, $t8", "ac2", 0xffff8000,
2402                             0xaf8f8000, 0x00000000, 0x339d8d88, t0, t8);
2403   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t0, $t1", "ac0", 0xabababab,
2404                             0x87df4510, 0x00000000, 0x70974249, t0, t1);
2405   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t3", "ac1", 0xfc79b4d2,
2406                             0xabf4e8e1, 0xffffffff, 0x8a8d4e7d, t2, t3);
2407   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac2, $t4, $t1", "ac2", 0x00000000,
2408                             0xf4c0eeac, 0xffffffff, 0xeb1b4335, t4, t1);
2409   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac3, $t6, $t7", "ac3", 0x00354565,
2410                             0x006a54f2, 0x00000000, 0x0cd6b508, t6, t7);
2411   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac0, $t5, $t3", "ac0", 0x00086755,
2412                             0x79f74493, 0x00000000, 0x6731e282, t5, t3);
2413   TESTDSPINST_AC_RS_RT_DSPC("dpsqx_sa.w.ph $ac1, $t2, $t4", "ac1", 0xffff8000,
2414                             0x9c098000, 0xffffffff, 0xb6edf28f, t2, t4);
2415
2416   printf("-------- DPSX.W.PH --------\n");
2417   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
2418                               0x4387ffff);
2419   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x00000000, 0x00000004,
2420                               0x00000005);
2421   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xffffffff, 0x80000000,
2422                               0x80000000);
2423   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xeeeeffff, 0x00002345, 0x3277ffff,
2424                               0x4387ffff);
2425   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2426                               0x4387ffff);
2427   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x00000000, 0x80000000,
2428                               0x80000000);
2429   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x80008000, 0x80000000,
2430                               0x80000000);
2431   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x00000000, 0x80000004,
2432                               0x00000005);
2433   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xffffffff, 0x80008000,
2434                               0x4387ffff);
2435   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xeeeeffff, 0x00002345, 0x80008000,
2436                               0x80008000);
2437   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2438                               0x4387ffff);
2439   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x00000000, 0x80008000,
2440                               0x80008000);
2441   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
2442                               0x4387ffff);
2443   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x80000000, 0xffff0000, 0x3277eeee,
2444                               0x80008000);
2445   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x00000000, 0x80000000,
2446                               0x80000000);
2447   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
2448                               0x4387ffff);
2449   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x0000ffff, 0x80008000,
2450                               0x4387ffff);
2451   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffff1234, 0x00000000, 0xffff3277,
2452                               0x4387ffff);
2453   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x5678ffff, 0x3277ffff, 0x80000000,
2454                               0x80000000);
2455   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x00000000, 0xffff3277,
2456                               0xffff6543);
2457   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xffffffff, 0xffffffff,
2458                               0xffffffff);
2459   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffbbbb, 0xeeee0000, 0x80008000,
2460                               0x4387ffff);
2461   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x34560000, 0x3277ffff,
2462                               0x4387cccc);
2463   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
2464                               0x4387ffff);
2465   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x12345678, 0xffffffff, 0xffffffff,
2466                               0xffffffff);
2467   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffbbbb, 0x12345678, 0x80008000,
2468                               0x4387ffff);
2469   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x34560000, 0x87654321,
2470                               0x80008000);
2471   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
2472                               0x80000000);
2473   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2474                               0x4387ffff);
2475   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x80000000, 0x00000000, 0x80008000,
2476                               0x80008000);
2477   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x80008000, 0x3277ffff,
2478                               0x4387ffff);
2479   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
2480                               0x4387ffff);
2481   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", -24, 120, -24, 120);
2482   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 140, 120, 140, 120);
2483   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000004, 1073741824, 0x00000004,
2484                               1073741824);
2485   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", (1<<31)+1, (1<<31)+2, (1<<31)+1,
2486                               (1<<31)+2);
2487   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x80002431, 0x4b908000, 0x80002431,
2488                               0x4b908000);
2489   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x004d8000, 0x800027cc, 0x004d8000,
2490                               0x800027cc);
2491   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xf6a3fa3c, 0x083b3571, 0xf6a3fa3c,
2492                               0x083b3571);
2493   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xbf17fb9a, 0xb9743941, 0xbf17fb9a,
2494                               0xb9743941);
2495   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x2c0bd024, 0xbce5f924, 0x2c0bd024,
2496                               0xbce5f924);
2497   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x3e976e2e, 0xcc3c201c, 0x3e976e2e,
2498                               0xcc3c201c);
2499   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xb4bfb365, 0x1ebaf88e, 0xb4bfb365,
2500                               0x1ebaf88e);
2501   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x288593c0, 0x722d5e20, 0x288593c0,
2502                               0x722d5e20);
2503   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x4d7ff5b4, 0xa1d6f791, 0x4d7ff5b4,
2504                               0xa1d6f791);
2505   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x4557be13, 0x7b11bee7, 0x4557be13,
2506                               0x7b11bee7);
2507   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xadcf5772, 0xa5631488, 0xadcf5772,
2508                               0xa5631488);
2509   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x989a7235, 0xb10bcc65, 0x989a7235,
2510                               0xb10bcc65);
2511   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x4d6f393a, 0x73f39fca, 0x4d6f393a,
2512                               0x73f39fca);
2513   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x24a3291e, 0x5648e540, 0x24a3291e,
2514                               0x5648e540);
2515   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xdd91eebf, 0xc54f79e6, 0xdd91eebf,
2516                               0xc54f79e6);
2517   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xf7ce2ec6, 0x5fc92974, 0xf7ce2ec6,
2518                               0x5fc92974);
2519   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xbc1083e8, 0x7e08184e, 0xbc1083e8,
2520                               0x7e08184e);
2521   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xa617cc31, 0x71c8315f, 0xa617cc31,
2522                               0x71c8315f);
2523   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xdfe1e8f0, 0x9493110e, 0xdfe1e8f0,
2524                               0x9493110e);
2525   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x31458a23, 0xbb246228, 0x31458a23,
2526                               0xbb246228);
2527   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x848af791, 0x339d8d88, 0x848af791,
2528                               0x339d8d88);
2529   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xda3bacdc, 0x70974249, 0xda3bacdc,
2530                               0x70974249);
2531   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x649d5cbd, 0x8a8d4e7d, 0x649d5cbd,
2532                               0x8a8d4e7d);
2533   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xc0c8c881, 0xeb1b4335, 0xc0c8c881,
2534                               0xeb1b4335);
2535   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x7dd81a20, 0x0cd6b508, 0x7dd81a20,
2536                               0x0cd6b508);
2537   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x6731e282, 0x00000000,
2538                               0x6731e282);
2539   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xb6edf28f, 0xffffffff,
2540                               0xb6edf28f);
2541   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x4b4ec9ca, 0x00000000,
2542                               0x4b4ec9ca);
2543   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xc1037fa4, 0xffffffff,
2544                               0xc1037fa4);
2545   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xcb4ab48f, 0xffffffff,
2546                               0xcb4ab48f);
2547   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xaf8f7e18, 0xffffffff,
2548                               0xaf8f7e18);
2549   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x87df4510, 0xffffffff,
2550                               0x87df4510);
2551   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xabf4e8e1, 0xffffffff,
2552                               0xabf4e8e1);
2553   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0xf4c0eeac, 0xffffffff,
2554                               0xf4c0eeac);
2555   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x006a54f2, 0x00000000,
2556                               0x006a54f2);
2557   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0x00000000, 0x79f74493, 0x00000000,
2558                               0x79f74493);
2559   TESTDSPINST_AC_RS_RT_NODSPC("dpsx.w.ph", 0xffffffff, 0x9c09e313, 0xffffffff,
2560                               0x9c09e313);
2561
2562   printf("-------- MUL.PH --------\n");
2563   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t1, $t2", 0x00000000, 0x00000000, t0,
2564                             t1, t2);
2565   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286, t2,
2566                             t3, t4);
2567   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t1, $t5", 0x00002435, 0xffff3421, t4,
2568                             t1, t5);
2569   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc, t6,
2570                             t7, t3);
2571   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t5, $t3, $t2", 0xf973437b, 0x80000000, t5,
2572                             t3, t2);
2573   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t4, $t8", 0x00010001, 0xffffffff, t2,
2574                             t4, t8);
2575   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff, t0,
2576                             t8, t0);
2577   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t6, $t1", 0x0000c420, 0x00000555, t4,
2578                             t6, t1);
2579   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t3, $t4", 0x00000004, 1073741824, t2,
2580                             t3, t4);
2581   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t1, $t5", 0x80002435, 0x80003421, t4,
2582                             t1, t5);
2583   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t6, $t7, $t3", 0x76548000, 0x73468000, t6,
2584                             t7, t3);
2585   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t5, $t3, $t2", 0x80000000, 0x80000000, t5,
2586                             t3, t2);
2587   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t4, $t8", 0x00010001, 0xffffffff, t2,
2588                             t4, t8);
2589   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff, t0,
2590                             t8, t0);
2591   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t6, $t1", 0x0000c420, 0x00000555, t4,
2592                             t6, t1);
2593   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t1, $t2", 0x00000000, 0x00000000, t0,
2594                             t1, t2);
2595   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t3, $t4", 0x80000000, 0x80000000, t2,
2596                             t3, t4);
2597   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555, t4,
2598                             t1, t5);
2599   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t6, $t7, $t3", 0x00000018, 0xffff2435, t6,
2600                             t7, t3);
2601   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t5, $t3, $t2", 0xbabababa, 0xabababab, t5,
2602                             t3, t2);
2603   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2, t2,
2604                             t4, t8);
2605   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000, t0,
2606                             t8, t0);
2607   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t6, $t1", 0x23534870, 0x00354565, t4,
2608                             t6, t1);
2609   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755, t0,
2610                             t1, t2);
2611   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f, t2,
2612                             t3, t4);
2613   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee, t4,
2614                             t1, t5);
2615   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb, t6,
2616                             t7, t3);
2617   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca, t5,
2618                             t3, t2);
2619   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde, t2,
2620                             t4, t8);
2621   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff, t0,
2622                             t8, t0);
2623   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff, t4,
2624                             t6, t1);
2625   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f, t0,
2626                             t1, t2);
2627   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18, t2,
2628                             t3, t4);
2629   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510, t4,
2630                             t1, t5);
2631   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1, t6,
2632                             t7, t3);
2633   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac, t5,
2634                             t3, t2);
2635   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2, t2,
2636                             t4, t8);
2637   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493, t0,
2638                             t8, t0);
2639   TESTDSPINST_RD_RS_RT_DSPC("mul.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313, t4,
2640                             t6, t1);
2641
2642   printf("-------- MUL_S.PH --------\n");
2643   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
2644                             t0, t1, t2);
2645   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
2646                             t2, t3, t4);
2647   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t1, $t5", 0x00002435, 0xffff3421,
2648                             t4, t1, t5);
2649   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
2650                             t6, t7, t3);
2651   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
2652                             t5, t3, t2);
2653   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
2654                             t2, t4, t8);
2655   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2656                             t0, t8, t0);
2657   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
2658                             t4, t6, t1);
2659   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t3, $t4", 0x00000004, 1073741824,
2660                             t2, t3, t4);
2661   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
2662                             t4, t1, t5);
2663   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t6, $t7, $t3", 0x76548000, 0x73468000,
2664                             t6, t7, t3);
2665   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t5, $t3, $t2", 0x80000000, 0x80000000,
2666                             t5, t3, t2);
2667   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
2668                             t2, t4, t8);
2669   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2670                             t0, t8, t0);
2671   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
2672                             t4, t6, t1);
2673   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
2674                             t0, t1, t2);
2675   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
2676                             t2, t3, t4);
2677   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
2678                             t4, t1, t5);
2679   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
2680                             t6, t7, t3);
2681   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
2682                             t5, t3, t2);
2683   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
2684                             t2, t4, t8);
2685   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
2686                             t0, t8, t0);
2687   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
2688                             t4, t6, t1);
2689   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
2690                             t0, t1, t2);
2691   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
2692                             t2, t3, t4);
2693   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
2694                             t4, t1, t5);
2695   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
2696                             t6, t7, t3);
2697   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
2698                             t5, t3, t2);
2699   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
2700                             t2, t4, t8);
2701   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
2702                             t0, t8, t0);
2703   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
2704                             t4, t6, t1);
2705   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
2706                             t0, t1, t2);
2707   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
2708                             t2, t3, t4);
2709   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
2710                             t4, t1, t5);
2711   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
2712                             t6, t7, t3);
2713   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
2714                             t5, t3, t2);
2715   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
2716                             t2, t4, t8);
2717   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
2718                             t0, t8, t0);
2719   TESTDSPINST_RD_RS_RT_DSPC("mul_s.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
2720                             t4, t6, t1);
2721
2722   printf("-------- MULQ_S.PH --------\n");
2723   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
2724                             t0, t1, t2);
2725   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t3, $t4", 0x00045fb2, 0x00000286,
2726                             t2, t3, t4);
2727   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t1, $t5", 0x00002435, 0xffff3421,
2728                             t4, t1, t5);
2729   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
2730                             t6, t7, t3);
2731   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
2732                             t5, t3, t2);
2733   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
2734                             t2, t4, t8);
2735   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2736                             t0, t8, t0);
2737   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
2738                             t4, t6, t1);
2739   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t3, $t4", 0x00000004, 1073741824,
2740                             t2, t3, t4);
2741   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t1, $t5", 0x80002435, 0x80003421,
2742                             t4, t1, t5);
2743   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t6, $t7, $t3", 0x76548000, 0x73468000,
2744                             t6, t7, t3);
2745   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t5, $t3, $t2", 0x80000000, 0x80000000,
2746                             t5, t3, t2);
2747   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t4, $t8", 0x00010001, 0xffffffff,
2748                             t2, t4, t8);
2749   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2750                             t0, t8, t0);
2751   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
2752                             t4, t6, t1);
2753   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
2754                             t0, t1, t2);
2755   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
2756                             t2, t3, t4);
2757   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
2758                             t4, t1, t5);
2759   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
2760                             t6, t7, t3);
2761   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
2762                             t5, t3, t2);
2763   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
2764                             t2, t4, t8);
2765   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
2766                             t0, t8, t0);
2767   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
2768                             t4, t6, t1);
2769   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
2770                             t0, t1, t2);
2771   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
2772                             t2, t3, t4);
2773   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
2774                             t4, t1, t5);
2775   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
2776                             t6, t7, t3);
2777   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
2778                             t5, t3, t2);
2779   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
2780                             t2, t4, t8);
2781   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
2782                             t0, t8, t0);
2783   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
2784                             t4, t6, t1);
2785   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
2786                             t0, t1, t2);
2787   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
2788                             t2, t3, t4);
2789   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
2790                             t4, t1, t5);
2791   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
2792                             t6, t7, t3);
2793   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
2794                             t5, t3, t2);
2795   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
2796                             t2, t4, t8);
2797   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
2798                             t0, t8, t0);
2799   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
2800                             t4, t6, t1);
2801
2802   printf("-------- MULQ_RS.W --------\n");
2803   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t1, $t2", 0x00000000, 0x00000000,
2804                             t0, t1, t2);
2805   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t3, $t4", 0x00045fb2, 0x00000286,
2806                             t2, t3, t4);
2807   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t1, $t5", 0x00002435, 0xffff3421,
2808                             t4, t1, t5);
2809   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
2810                             t6, t7, t3);
2811   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t5, $t3, $t2", 0xf973437b, 0x80000000,
2812                             t5, t3, t2);
2813   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
2814                             t2, t4, t8);
2815   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2816                             t0, t8, t0);
2817   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
2818                             t4, t6, t1);
2819   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t3, $t4", 0x00000004, 1073741824,
2820                             t2, t3, t4);
2821   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t1, $t5", 0x80002435, 0x80003421,
2822                             t4, t1, t5);
2823   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t6, $t7, $t3", 0x76548000, 0x73468000,
2824                             t6, t7, t3);
2825   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t5, $t3, $t2", 0x80000000, 0x80000000,
2826                             t5, t3, t2);
2827   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
2828                             t2, t4, t8);
2829   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2830                             t0, t8, t0);
2831   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
2832                             t4, t6, t1);
2833   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t1, $t2", 0x00000000, 0x00000000,
2834                             t0, t1, t2);
2835   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t3, $t4", 0x80000000, 0x80000000,
2836                             t2, t3, t4);
2837   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
2838                             t4, t1, t5);
2839   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t6, $t7, $t3", 0x00000018, 0xffff2435,
2840                             t6, t7, t3);
2841   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t5, $t3, $t2", 0xbabababa, 0xabababab,
2842                             t5, t3, t2);
2843   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
2844                             t2, t4, t8);
2845   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t8, $t0", 0xfbde3976, 0x00000000,
2846                             t0, t8, t0);
2847   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t6, $t1", 0x23534870, 0x00354565,
2848                             t4, t6, t1);
2849   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t1, $t2", 0x980b7cde, 0x00086755,
2850                             t0, t1, t2);
2851   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
2852                             t2, t3, t4);
2853   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
2854                             t4, t1, t5);
2855   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
2856                             t6, t7, t3);
2857   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
2858                             t5, t3, t2);
2859   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
2860                             t2, t4, t8);
2861   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
2862                             t0, t8, t0);
2863   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t6, $t1", 0xffffffff, 0xffffffff,
2864                             t4, t6, t1);
2865   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
2866                             t0, t1, t2);
2867   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
2868                             t2, t3, t4);
2869   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
2870                             t4, t1, t5);
2871   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
2872                             t6, t7, t3);
2873   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
2874                             t5, t3, t2);
2875   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
2876                             t2, t4, t8);
2877   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
2878                             t0, t8, t0);
2879   TESTDSPINST_RD_RS_RT_DSPC("mulq_rs.w $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
2880                             t4, t6, t1);
2881
2882   printf("-------- MULQ_S.W --------\n");
2883   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t1, $t2", 0x00000000, 0x00000000,
2884                             t0, t1, t2);
2885   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t3, $t4", 0x00045fb2, 0x00000286,
2886                             t2, t3, t4);
2887   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t1, $t5", 0x00002435, 0xffff3421,
2888                             t4, t1, t5);
2889   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
2890                             t6, t7, t3);
2891   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t5, $t3, $t2", 0xf973437b, 0x80000000,
2892                             t5, t3, t2);
2893   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
2894                             t2, t4, t8);
2895   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2896                             t0, t8, t0);
2897   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
2898                             t4, t6, t1);
2899   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t3, $t4", 0x00000004, 1073741824,
2900                             t2, t3, t4);
2901   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t1, $t5", 0x80002435, 0x80003421,
2902                             t4, t1, t5);
2903   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t6, $t7, $t3", 0x76548000, 0x73468000,
2904                             t6, t7, t3);
2905   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t5, $t3, $t2", 0x80000000, 0x80000000,
2906                             t5, t3, t2);
2907   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t4, $t8", 0x00010001, 0xffffffff,
2908                             t2, t4, t8);
2909   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t8, $t0", 0x7fff7fff, 0x7fff7fff,
2910                             t0, t8, t0);
2911   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
2912                             t4, t6, t1);
2913   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t1, $t2", 0x00000000, 0x00000000,
2914                             t0, t1, t2);
2915   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t3, $t4", 0x80000000, 0x80000000,
2916                             t2, t3, t4);
2917   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
2918                             t4, t1, t5);
2919   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t6, $t7, $t3", 0x00000018, 0xffff2435,
2920                             t6, t7, t3);
2921   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t5, $t3, $t2", 0xbabababa, 0xabababab,
2922                             t5, t3, t2);
2923   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
2924                             t2, t4, t8);
2925   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t8, $t0", 0xfbde3976, 0x00000000,
2926                             t0, t8, t0);
2927   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t6, $t1", 0x23534870, 0x00354565,
2928                             t4, t6, t1);
2929   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t1, $t2", 0x980b7cde, 0x00086755,
2930                             t0, t1, t2);
2931   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
2932                             t2, t3, t4);
2933   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
2934                             t4, t1, t5);
2935   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
2936                             t6, t7, t3);
2937   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
2938                             t5, t3, t2);
2939   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
2940                             t2, t4, t8);
2941   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
2942                             t0, t8, t0);
2943   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t6, $t1", 0xffffffff, 0xffffffff,
2944                             t4, t6, t1);
2945   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
2946                             t0, t1, t2);
2947   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
2948                             t2, t3, t4);
2949   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
2950                             t4, t1, t5);
2951   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
2952                             t6, t7, t3);
2953   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
2954                             t5, t3, t2);
2955   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
2956                             t2, t4, t8);
2957   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
2958                             t0, t8, t0);
2959   TESTDSPINST_RD_RS_RT_DSPC("mulq_s.w $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
2960                             t4, t6, t1);
2961
2962   printf("-------- MULSA.W.PH --------\n");
2963   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
2964                               0x4387ffff);
2965   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x00000000, 0x00000004,
2966                               0x00000005);
2967   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xffffffff, 0x80000000,
2968                               0x80000000);
2969   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xeeeeffff, 0x00002345, 0x3277ffff,
2970                               0x4387ffff);
2971   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2972                               0x4387ffff);
2973   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x00000000, 0x80000000,
2974                               0x80000000);
2975   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x80008000, 0x80000000,
2976                               0x80000000);
2977   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x00000000, 0x80000004,
2978                               0x00000005);
2979   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xffffffff, 0x80008000,
2980                               0x4387ffff);
2981   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xeeeeffff, 0x00002345, 0x80008000,
2982                               0x80008000);
2983   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
2984                               0x4387ffff);
2985   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x00000000, 0x80008000,
2986                               0x80008000);
2987   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x00000000, 0x3277ffff,
2988                               0x4387ffff);
2989   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x80000000, 0xffff0000, 0x3277eeee,
2990                               0x80008000);
2991   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x00000000, 0x80000000,
2992                               0x80000000);
2993   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
2994                               0x4387ffff);
2995   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x0000ffff, 0x80008000,
2996                               0x4387ffff);
2997   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffff1234, 0x00000000, 0xffff3277,
2998                               0x4387ffff);
2999   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x5678ffff, 0x3277ffff, 0x80000000,
3000                               0x80000000);
3001   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x00000000, 0xffff3277,
3002                               0xffff6543);
3003   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xffffffff, 0xffffffff,
3004                               0xffffffff);
3005   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffbbbb, 0xeeee0000, 0x80008000,
3006                               0x4387ffff);
3007   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x34560000, 0x3277ffff,
3008                               0x4387cccc);
3009   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
3010                               0x4387ffff);
3011   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x12345678, 0xffffffff, 0xffffffff,
3012                               0xffffffff);
3013   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffbbbb, 0x12345678, 0x80008000,
3014                               0x4387ffff);
3015   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x34560000, 0x87654321,
3016                               0x80008000);
3017   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xbbbbffff, 0x0000ffff, 0xeeeeffff,
3018                               0x80000000);
3019   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffaaaa, 0x12340000, 0x3277ffff,
3020                               0x4387ffff);
3021   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x80000000, 0x00000000, 0x80008000,
3022                               0x80008000);
3023   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x80008000, 0x3277ffff,
3024                               0x4387ffff);
3025   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x0000ffff, 0xffff0000, 0x3277eeee,
3026                               0x4387ffff);
3027   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", -24, 120, -24, 120);
3028   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 140, 120, 140, 120);
3029   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000004, 1073741824, 0x00000004,
3030                               1073741824);
3031   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", (1<<31)+1, (1<<31)+2, (1<<31)+1,
3032                               (1<<31)+2);
3033   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x80002431, 0x4b908000, 0x80002431,
3034                               0x4b908000);
3035   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x004d8000, 0x800027cc, 0x004d8000,
3036                               0x800027cc);
3037   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xf6a3fa3c, 0x083b3571, 0xf6a3fa3c,
3038                               0x083b3571);
3039   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xbf17fb9a, 0xb9743941, 0xbf17fb9a,
3040                               0xb9743941);
3041   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x2c0bd024, 0xbce5f924, 0x2c0bd024,
3042                               0xbce5f924);
3043   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x3e976e2e, 0xcc3c201c, 0x3e976e2e,
3044                               0xcc3c201c);
3045   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xb4bfb365, 0x1ebaf88e, 0xb4bfb365,
3046                               0x1ebaf88e);
3047   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x288593c0, 0x722d5e20, 0x288593c0,
3048                               0x722d5e20);
3049   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x4d7ff5b4, 0xa1d6f791, 0x4d7ff5b4,
3050                               0xa1d6f791);
3051   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x4557be13, 0x7b11bee7, 0x4557be13,
3052                               0x7b11bee7);
3053   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xadcf5772, 0xa5631488, 0xadcf5772,
3054                               0xa5631488);
3055   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x989a7235, 0xb10bcc65, 0x989a7235,
3056                               0xb10bcc65);
3057   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x4d6f393a, 0x73f39fca, 0x4d6f393a,
3058                               0x73f39fca);
3059   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x24a3291e, 0x5648e540, 0x24a3291e,
3060                               0x5648e540);
3061   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xdd91eebf, 0xc54f79e6, 0xdd91eebf,
3062                               0xc54f79e6);
3063   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xf7ce2ec6, 0x5fc92974, 0xf7ce2ec6,
3064                               0x5fc92974);
3065   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xbc1083e8, 0x7e08184e, 0xbc1083e8,
3066                               0x7e08184e);
3067   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xa617cc31, 0x71c8315f, 0xa617cc31,
3068                               0x71c8315f);
3069   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xdfe1e8f0, 0x9493110e, 0xdfe1e8f0,
3070                               0x9493110e);
3071   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x31458a23, 0xbb246228, 0x31458a23,
3072                               0xbb246228);
3073   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x848af791, 0x339d8d88, 0x848af791,
3074                               0x339d8d88);
3075   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xda3bacdc, 0x70974249, 0xda3bacdc,
3076                               0x70974249);
3077   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x649d5cbd, 0x8a8d4e7d, 0x649d5cbd,
3078                               0x8a8d4e7d);
3079   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xc0c8c881, 0xeb1b4335, 0xc0c8c881,
3080                               0xeb1b4335);
3081   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x7dd81a20, 0x0cd6b508, 0x7dd81a20,
3082                               0x0cd6b508);
3083   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x6731e282, 0x00000000,
3084                               0x6731e282);
3085   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xb6edf28f, 0xffffffff,
3086                               0xb6edf28f);
3087   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x4b4ec9ca, 0x00000000,
3088                               0x4b4ec9ca);
3089   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xc1037fa4, 0xffffffff,
3090                               0xc1037fa4);
3091   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xcb4ab48f, 0xffffffff,
3092                               0xcb4ab48f);
3093   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xaf8f7e18, 0xffffffff,
3094                               0xaf8f7e18);
3095   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x87df4510, 0xffffffff,
3096                               0x87df4510);
3097   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xabf4e8e1, 0xffffffff,
3098                               0xabf4e8e1);
3099   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0xf4c0eeac, 0xffffffff,
3100                               0xf4c0eeac);
3101   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x006a54f2, 0x00000000,
3102                               0x006a54f2);
3103   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0x00000000, 0x79f74493, 0x00000000,
3104                               0x79f74493);
3105   TESTDSPINST_AC_RS_RT_NODSPC("mulsa.w.ph", 0xffffffff, 0x9c09e313, 0xffffffff,
3106                               0x9c09e313);
3107
3108   printf("-------- PRECR.QB.PH --------\n");
3109   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t1, $t2", 0x00000000,
3110                               0x00000000, t0, t1, t2);
3111   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t3, $t4", 0x045fb232,
3112                               0x00028632, t2, t3, t4);
3113   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t1, $t5", 0xfabc3435,
3114                               0xfabc3421, t4, t1, t5);
3115   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t6, $t7, $t3", 0x07654cb8,
3116                               0x734680bc, t6, t7, t3);
3117   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t5, $t3, $t2", 0xf973437b,
3118                               0x80000000, t5, t3, t2);
3119   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t4, $t8", 0x00ff0001,
3120                               0xff01ffff, t2, t4, t8);
3121   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t8, $t0", 0x7fff7fff,
3122                               0x7fff7fff, t0, t8, t0);
3123   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t6, $t1", 0x0000c420,
3124                               0x00000555, t4, t6, t1);
3125   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t1, $t2", 0x00000000,
3126                               0x00000000, t0, t1, t2);
3127   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t3, $t4", 0x80000000,
3128                               0x80000000, t2, t3, t4);
3129   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t1, $t5", 0xaaaaaaaa,
3130                               0x55555555, t4, t1, t5);
3131   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t6, $t7, $t3", 0x00000018,
3132                               0xffff2435, t6, t7, t3);
3133   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t5, $t3, $t2", 0xbabababa,
3134                               0xabababab, t5, t3, t2);
3135   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t4, $t8", 0xf0f0f0f0,
3136                               0xfc79b4d2, t2, t4, t8);
3137   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t8, $t0", 0xfbde3976,
3138                               0x00000000, t0, t8, t0);
3139   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t6, $t1", 0x23534870,
3140                               0x00354565, t4, t6, t1);
3141   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t1, $t2", 0x980b7cde,
3142                               0x00086755, t0, t1, t2);
3143   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t3, $t4", 0x00000018,
3144                               0x8f8f8f8f, t2, t3, t4);
3145   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t1, $t5", 0x92784656,
3146                               0xeeeeeeee, t4, t1, t5);
3147   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t6, $t7, $t3", 0xcacacaca,
3148                               0x1bdbdbdb, t6, t7, t3);
3149   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t5, $t3, $t2", 0xbacabaca,
3150                               0xdecadeca, t5, t3, t2);
3151   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t4, $t8", 0x12fadeb4,
3152                               0x93474bde, t2, t4, t8);
3153   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t8, $t0", 0x7c000790,
3154                               0xfc0007ff, t0, t8, t0);
3155   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t6, $t1", 0xffffffff,
3156                               0xffffffff, t4, t6, t1);
3157   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t1, $t2", 0xf2f4df1f,
3158                               0xcb4ab48f, t0, t1, t2);
3159   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t3, $t4", 0x435f909a,
3160                               0xaf8f7e18, t2, t3, t4);
3161   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t1, $t5", 0x2106ba5f,
3162                               0x87df4510, t4, t1, t5);
3163   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t6, $t7, $t3", 0x246a6376,
3164                               0xabf4e8e1, t6, t7, t3);
3165   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t5, $t3, $t2", 0x1046a1a3,
3166                               0xf4c0eeac, t5, t3, t2);
3167   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t2, $t4, $t8", 0x638ca515,
3168                               0x006a54f2, t2, t4, t8);
3169   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t0, $t8, $t0", 0xf63e7a9d,
3170                               0x79f74493, t0, t8, t0);
3171   TESTDSPINST_RD_RS_RT_NODSPC("precr.qb.ph $t4, $t6, $t1", 0xbd6845cd,
3172                               0x9c09e313, t4, t6, t1);
3173
3174   printf("-------- PRECR_SRA.PH.W --------\n");
3175   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t1,  0", 0x00000000,
3176                               0x00000000,  0, t0, t1);
3177   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t3,  1", 0x045fb232,
3178                               0x00028632,  1, t2, t3);
3179   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t1,  4", 0xfabc3435,
3180                               0xfabc3421,  4, t4, t1);
3181   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t6, $t7, 17", 0x07654cb8,
3182                               0x734680bc, 17, t6, t7);
3183   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t5, $t3, 31", 0xf973437b,
3184                               0x80000000, 31, t5, t3);
3185   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t4,  8", 0x00ff0001,
3186                               0xff01ffff,  8, t2, t4);
3187   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t8, 11", 0x7fff7fff,
3188                               0x7fff7fff, 11, t0, t8);
3189   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t6, 13", 0x0000c420,
3190                               0x00000555, 13, t4, t6);
3191   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t1,  2", 0x00000000,
3192                               0x00000000,  2, t0, t1);
3193   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t3,  6", 0x80000000,
3194                               0x80000000,  6, t2, t3);
3195   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t1,  7", 0xaaaaaaaa,
3196                               0x55555555,  7, t4, t1);
3197   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t6, $t7, 19", 0x00000018,
3198                               0xffff2435, 19, t6, t7);
3199   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t5, $t3, 31", 0xbabababa,
3200                               0xabababab, 31, t5, t3);
3201   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t4,  4", 0xf0f0f0f0,
3202                               0xfc79b4d2,  4, t2, t4);
3203   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t8, 12", 0xfbde3976,
3204                               0x00000000, 12, t0, t8);
3205   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t6, 10", 0x23534870,
3206                               0x00354565, 10, t4, t6);
3207   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t1, 20", 0x980b7cde,
3208                               0x00086755, 20, t0, t1);
3209   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t3, 21", 0x00000018,
3210                               0x8f8f8f8f, 21, t2, t3);
3211   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t1, 24", 0x92784656,
3212                               0xeeeeeeee, 24, t4, t1);
3213   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t6, $t7, 27", 0xcacacaca,
3214                               0x1bdbdbdb, 27, t6, t7);
3215   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t5, $t3,  1", 0xbacabaca,
3216                               0xdecadeca,  1, t5, t3);
3217   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t4, 18", 0x12fadeb4,
3218                               0x93474bde, 18, t2, t4);
3219   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t8, 10", 0x7c000790,
3220                               0xfc0007ff, 10, t0, t8);
3221   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t6, 16", 0xffffffff,
3222                               0xffffffff, 16, t4, t6);
3223   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t1,  0", 0xf2f4df1f,
3224                               0xcb4ab48f,  0, t0, t1);
3225   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t3, 14", 0x435f909a,
3226                               0xaf8f7e18, 14, t2, t3);
3227   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t1,  5", 0x2106ba5f,
3228                               0x87df4510,  5, t4, t1);
3229   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t6, $t7,  7", 0x246a6376,
3230                               0xabf4e8e1,  7, t6, t7);
3231   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t5, $t3,  9", 0x1046a1a3,
3232                               0xf4c0eeac,  9, t5, t3);
3233   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t2, $t4,  3", 0x638ca515,
3234                               0x006a54f2,  3, t2, t4);
3235   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t0, $t8, 15", 0xf63e7a9d,
3236                               0x79f74493, 15, t0, t8);
3237   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra.ph.w $t4, $t6, 11", 0xbd6845cd,
3238                               0x9c09e313, 11, t4, t6);
3239
3240   printf("-------- PRECR_SRA_R.PH.W --------\n");
3241   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t1,  0", 0x00000000,
3242                               0x00000000,  0, t0, t1);
3243   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t3,  1", 0x045fb232,
3244                               0x00028632,  1, t2, t3);
3245   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t1,  4", 0xfabc3435,
3246                               0xfabc3421,  4, t4, t1);
3247   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t6, $t7, 17", 0x07654cb8,
3248                               0x734680bc, 17, t6, t7);
3249   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t5, $t3, 31", 0xf973437b,
3250                               0x80000000, 31, t5, t3);
3251   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t4,  8", 0x00ff0001,
3252                               0xff01ffff,  8, t2, t4);
3253   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t8, 11", 0x7fff7fff,
3254                               0x7fff7fff, 11, t0, t8);
3255   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t6, 13", 0x0000c420,
3256                               0x00000555, 13, t4, t6);
3257   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t1,  2", 0x00000000,
3258                               0x00000000,  2, t0, t1);
3259   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t3,  6", 0x80000000,
3260                               0x80000000,  6, t2, t3);
3261   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t1,  7", 0xaaaaaaaa,
3262                               0x55555555,  7, t4, t1);
3263   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t6, $t7, 19", 0x00000018,
3264                               0xffff2435, 19, t6, t7);
3265   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t5, $t3, 31", 0xbabababa,
3266                               0xabababab, 31, t5, t3);
3267   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t4,  4", 0xf0f0f0f0,
3268                               0xfc79b4d2,  4, t2, t4);
3269   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t8, 12", 0xfbde3976,
3270                               0x00000000, 12, t0, t8);
3271   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t6, 10", 0x23534870,
3272                               0x00354565, 10, t4, t6);
3273   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t1, 20", 0x980b7cde,
3274                               0x00086755, 20, t0, t1);
3275   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t3, 21", 0x00000018,
3276                               0x8f8f8f8f, 21, t2, t3);
3277   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t1, 24", 0x92784656,
3278                               0xeeeeeeee, 24, t4, t1);
3279   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t6, $t7, 27", 0xcacacaca,
3280                               0x1bdbdbdb, 27, t6, t7);
3281   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t5, $t3,  1", 0xbacabaca,
3282                               0xdecadeca,  1, t5, t3);
3283   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t4, 18", 0x12fadeb4,
3284                               0x93474bde, 18, t2, t4);
3285   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t8, 10", 0x7c000790,
3286                               0xfc0007ff, 10, t0, t8);
3287   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t6, 16", 0xffffffff,
3288                               0xffffffff, 16, t4, t6);
3289   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t1,  0", 0xf2f4df1f,
3290                               0xcb4ab48f,  0, t0, t1);
3291   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t3, 14", 0x435f909a,
3292                               0xaf8f7e18, 14, t2, t3);
3293   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t1,  5", 0x2106ba5f,
3294                               0x87df4510,  5, t4, t1);
3295   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t6, $t7,  7", 0x246a6376,
3296                               0xabf4e8e1,  7, t6, t7);
3297   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t5, $t3,  9", 0x1046a1a3,
3298                               0xf4c0eeac,  9, t5, t3);
3299   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t2, $t4,  3", 0x638ca515,
3300                               0x006a54f2,  3, t2, t4);
3301   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t0, $t8, 15", 0xf63e7a9d,
3302                               0x79f74493, 15, t0, t8);
3303   TESTDSPINST_RT_RS_SA_NODSPC("precr_sra_r.ph.w $t4, $t6, 11", 0xbd6845cd,
3304                               0x9c09e313, 11, t4, t6);
3305
3306   printf("-------- PREPEND --------\n");
3307   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0xffff86fc, 0xfffffe02,
3308                               3, t0, t1);
3309   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0xfffffe06,
3310                               0, t0, t1);
3311   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x7fffffff, 0x80000000,
3312                               3, t0, t1);
3313   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x80000000, 0x00000000,
3314                               0, t0, t1);
3315   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0xffffff23,
3316                               0, t0, t1);
3317   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0xff76947a, 0x00000000,
3318                               7, t0, t1);
3319   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000035, 0xffffffc0,
3320                               0, t0, t1);
3321   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x80000000, 0x01130b02,
3322                               0, t0, t1);
3323   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7ffffffe, 0xc0000001,
3324                               0, t0, t1);
3325   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7fffffff, 0x7fffffff,
3326                               0, t0, t1);
3327   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x1a75980e, 0x1b4c3c1e,
3328                               0, t0, t1);
3329   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xffffffff, 0x7ffffffc,
3330                               1, t0, t1);
3331   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 13", 0xc0000003, 0x00000000,
3332                               13, t0, t1);
3333   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xfffffffe, 0x00000000,
3334                               1, t0, t1);
3335   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x1ffffffe, 0x7fffffff,
3336                               31, t0, t1);
3337   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0x00000000,
3338                               0, t0, t1);
3339   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x7fffffff, 0xfffffda8,
3340                               31, t0, t1);
3341   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 12", 0xc0000007, 0xfffff6b2,
3342                               12, t0, t1);
3343   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x002a923e, 0x1ffffff8,
3344                               1, t0, t1);
3345   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xfffffee4, 0x00000010,
3346                               31, t0, t1);
3347   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xf8034c6b, 0xfb766d64,
3348                               31, t0, t1);
3349   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  4", 0x7ffffffb, 0x0000002b,
3350                               4, t0, t1);
3351   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xfffffffa, 0x7fffffff,
3352                               0, t0, t1);
3353   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  9", 0x55555555, 0x7fffffff,
3354                               9, t0, t1);
3355   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 18", 0x80000000, 0x80000005,
3356                               18, t0, t1);
3357   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7fffffff, 0x000004fc,
3358                               0, t0, t1);
3359   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x0035d189, 0x80000000,
3360                               31, t0, t1);
3361   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x8000007f, 0xff00ff00,
3362                               0, t0, t1);
3363   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 12", 0x00000000, 0x03557af6,
3364                               12, t0, t1);
3365   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x000000e3, 0x0008f4ab,
3366                               0, t0, t1);
3367   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x00000000, 0x00000000,
3368                               2, t0, t1);
3369   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x0f0f0f0f, 0x00000003,
3370                               3, t0, t1);
3371   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x002559bf, 0xdb6db6db,
3372                               0, t0, t1);
3373   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x66666666, 0x7fffff80,
3374                               2, t0, t1);
3375   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 30", 0x80000000, 0xfa17edf5,
3376                               30, t0, t1);
3377   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0xc0000001, 0x00003cb5,
3378                               7, t0, t1);
3379   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xc71c71c7, 0x00000335,
3380                               0, t0, t1);
3381   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x8000001f, 0xfffffef3,
3382                               0, t0, t1);
3383   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 12", 0x00000006, 0x80000002,
3384                               12, t0, t1);
3385   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 15", 0xffffffd5, 0xf8c02863,
3386                               15, t0, t1);
3387   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 25", 0x33299df8, 0x000011fb,
3388                               25, t0, t1);
3389   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 12", 0x00000000, 0xc000000f,
3390                               12, t0, t1);
3391   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x00000001, 0x00000000,
3392                               31, t0, t1);
3393   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  5", 0x7ffffffb, 0x7ffffffd,
3394                               5, t0, t1);
3395   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 25", 0x80000000, 0x7fffffff,
3396                               25, t0, t1);
3397   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  4", 0x0ffffffc, 0x0ffffffc,
3398                               4, t0, t1);
3399   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xfffffe6a, 0xc000001f,
3400                               31, t0, t1);
3401   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0xfeb380e9, 0x7ffffffd,
3402                               2, t0, t1);
3403   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x7ffffffa, 0x00000000,
3404                               1, t0, t1);
3405   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x8000000f, 0xdb6db6db,
3406                               2, t0, t1);
3407   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 24", 0xfffd232e, 0x00001548,
3408                               24, t0, t1);
3409   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xc000001f, 0x00000000,
3410                               1, t0, t1);
3411   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 22", 0x33333333, 0x00000000,
3412                               22, t0, t1);
3413   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 30", 0x0000db1b, 0xc0000001,
3414                               30, t0, t1);
3415   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0xffffffff, 0xe0000007,
3416                               10, t0, t1);
3417   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x00000000, 0xffffff5f,
3418                               1, t0, t1);
3419   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x0d2efcd1, 0x8000003f,
3420                               31, t0, t1);
3421   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0x00000000, 0xffffff6d,
3422                               7, t0, t1);
3423   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x00081a70, 0xe4606c5a,
3424                               1, t0, t1);
3425   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x80000000, 0xe0000003,
3426                               31, t0, t1);
3427   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0xfff9ab12,
3428                               0, t0, t1);
3429   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x80000000, 0x7fffffff,
3430                               31, t0, t1);
3431   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 17", 0xffffd894, 0x00000000,
3432                               17, t0, t1);
3433   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x0ffffffe, 0xfff6ab08,
3434                               31, t0, t1);
3435   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 30", 0x80000000, 0x00000000,
3436                               30, t0, t1);
3437   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 14", 0x7fffffff, 0x00000006,
3438                               14, t0, t1);
3439   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x80000000, 0x7fffffff,
3440                               2, t0, t1);
3441   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0xfffff23b, 0x00000000,
3442                               10, t0, t1);
3443   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x80000000, 0x80000000,
3444                               31, t0, t1);
3445   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000011, 0x7fffffff,
3446                               0, t0, t1);
3447   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xfffffffa, 0x1c71c71c,
3448                               1, t0, t1);
3449   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xcccccccc, 0xf8000001,
3450                               1, t0, t1);
3451   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x80000000, 0x80000000,
3452                               31, t0, t1);
3453   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xfdb739b8, 0x000000e1,
3454                               0, t0, t1);
3455   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 19", 0x7fffffff, 0x80000000,
3456                               19, t0, t1);
3457   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xfffff216, 0x80000000,
3458                               1, t0, t1);
3459   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x3ffffff8, 0x00000000,
3460                               31, t0, t1);
3461   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xfea7a4f9, 0xfffffffe,
3462                               0, t0, t1);
3463   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x7fffffff, 0x7fffffff,
3464                               31, t0, t1);
3465   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 25", 0x7fffffff, 0x00000006,
3466                               25, t0, t1);
3467   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  8", 0x7fffffff, 0x8e38e38e,
3468                               8, t0, t1);
3469   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x00000000, 0xfffffffe,
3470                               31, t0, t1);
3471   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7fffffff, 0x00000000,
3472                               0, t0, t1);
3473   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 30", 0x80000000, 0xffffffd3,
3474                               30, t0, t1);
3475   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xf0000001, 0x00000006,
3476                               0, t0, t1);
3477   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 21", 0xfffffff8, 0x00000002,
3478                               21, t0, t1);
3479   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  8", 0x66666666, 0x49249249,
3480                               8, t0, t1);
3481   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x7fffffff, 0x000000ff,
3482                               31, t0, t1);
3483   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x1ffffff8, 0x80000001,
3484                               0, t0, t1);
3485   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xe0000003, 0xffffffcb,
3486                               31, t0, t1);
3487   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0xfffb2342, 0x0000001f,
3488                               2, t0, t1);
3489   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x80000000, 0xfffffffe,
3490                               1, t0, t1);
3491   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x03fffffe, 0x00000c17,
3492                               0, t0, t1);
3493   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x00000000, 0xc0000003,
3494                               1, t0, t1);
3495   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 13", 0x03fffffe, 0xfffd39d5,
3496                               13, t0, t1);
3497   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  6", 0x0003192a, 0x0000d270,
3498                               6, t0, t1);
3499   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 21", 0x3ffffffe, 0x00000000,
3500                               21, t0, t1);
3501   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x80000000, 0x80000000,
3502                               2, t0, t1);
3503   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x1ffffff0, 0xff62154e,
3504                               31, t0, t1);
3505   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 13", 0x7fffffff, 0xffffff2e,
3506                               13, t0, t1);
3507   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xf8000001, 0x80000000,
3508                               1, t0, t1);
3509   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 27", 0x7fffffff, 0xe0000003,
3510                               27, t0, t1);
3511   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 15", 0xe000000f, 0x0000368b,
3512                               15, t0, t1);
3513   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 25", 0x7fffffff, 0x80000000,
3514                               25, t0, t1);
3515   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0x0000029c, 0x00001460,
3516                               10, t0, t1);
3517   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 19", 0xfdd559c5, 0x000acd42,
3518                               19, t0, t1);
3519   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x3ffffff8, 0x0081575f,
3520                               3, t0, t1);
3521   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xffffed07, 0x00000000,
3522                               0, t0, t1);
3523   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x7fffffff, 0x00000002,
3524                               3, t0, t1);
3525   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  6", 0x3fffffe0, 0x07fffffe,
3526                               6, t0, t1);
3527   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x000a559a, 0x7fffffff,
3528                               0, t0, t1);
3529   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x1e4c379a, 0x00000ae6,
3530                               1, t0, t1);
3531   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x00000001, 0xfffffff0,
3532                               1, t0, t1);
3533   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  4", 0x0000bcb1, 0xfffffffe,
3534                               4, t0, t1);
3535   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x002192fc, 0x7fffffff,
3536                               1, t0, t1);
3537   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x00000000, 0xfffff7e4,
3538                               1, t0, t1);
3539   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7ffffff0, 0x00000000,
3540                               0, t0, t1);
3541   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x7ffffff8, 0x80000007,
3542                               2, t0, t1);
3543   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xfffffffa, 0xfffffffa,
3544                               31, t0, t1);
3545   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7ffffffa, 0x7fffffff,
3546                               0, t0, t1);
3547   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0x7ffffff0,
3548                               0, t0, t1);
3549   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x8000001f, 0x000000ff,
3550                               31, t0, t1);
3551   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 27", 0x00000000, 0x00000000,
3552                               27, t0, t1);
3553   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x00107408, 0x07fffffc,
3554                               1, t0, t1);
3555   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x7fffffff, 0x7fffffff,
3556                               31, t0, t1);
3557   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xaaaaaaaa, 0xffffe12e,
3558                               31, t0, t1);
3559   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 14", 0xf8000001, 0x00000000,
3560                               14, t0, t1);
3561   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x29fc2bb3, 0x80000000,
3562                               0, t0, t1);
3563   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 27", 0x000036c7, 0xfffffd48,
3564                               27, t0, t1);
3565   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xffffffba, 0x0f0f0f0f,
3566                               0, t0, t1);
3567   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 30", 0xffffc303, 0x80000005,
3568                               30, t0, t1);
3569   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0xffff0000, 0x00000003,
3570                               7, t0, t1);
3571   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 29", 0xf0000003, 0xfffffffe,
3572                               29, t0, t1);
3573   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x00000005, 0xfff4bf84,
3574                               31, t0, t1);
3575   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xfffcc6a5, 0x7fffffff,
3576                               0, t0, t1);
3577   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xe0000003, 0x66666666,
3578                               0, t0, t1);
3579   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x00000000, 0x00000827,
3580                               3, t0, t1);
3581   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  4", 0x80000000, 0x7fffffff,
3582                               4, t0, t1);
3583   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xe0000003, 0x80000000,
3584                               0, t0, t1);
3585   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 25", 0x80000000, 0x92492492,
3586                               25, t0, t1);
3587   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x000001f9, 0x1ce10bb3,
3588                               0, t0, t1);
3589   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 17", 0x00000000, 0x3ffffffc,
3590                               17, t0, t1);
3591   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 30", 0xfffffffe, 0x00001ca3,
3592                               30, t0, t1);
3593   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 27", 0x00000de7, 0xfff0eda7,
3594                               27, t0, t1);
3595   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x0ffffffc, 0x00000000,
3596                               1, t0, t1);
3597   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x01e63dae, 0x8000007f,
3598                               1, t0, t1);
3599   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x80000000, 0x000072d7,
3600                               3, t0, t1);
3601   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x000d0717, 0xfffffffa,
3602                               31, t0, t1);
3603   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  9", 0xfffffff8, 0x80000000,
3604                               9, t0, t1);
3605   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0x00000000,
3606                               0, t0, t1);
3607   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x00006000, 0xf0000003,
3608                               31, t0, t1);
3609   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0x7fffffff, 0x07fffffc,
3610                               7, t0, t1);
3611   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0x7fffffff, 0x00000000,
3612                               10, t0, t1);
3613   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xffffffd8, 0x00000003,
3614                               1, t0, t1);
3615   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0x7fffffff, 0x7fffffff,
3616                               10, t0, t1);
3617   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x0000003f, 0x0000003f,
3618                               0, t0, t1);
3619   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  8", 0xfe67cb2a, 0x00000000,
3620                               8, t0, t1);
3621   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 11", 0x0000a3af, 0x7fffffff,
3622                               11, t0, t1);
3623   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x80000000, 0xe0000003,
3624                               0, t0, t1);
3625   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  9", 0x33333333, 0x00000007,
3626                               9, t0, t1);
3627   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 22", 0x00000022, 0xfffffff1,
3628                               22, t0, t1);
3629   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  4", 0xffffe940, 0x00a6984a,
3630                               4, t0, t1);
3631   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  6", 0x80000000, 0x00000000,
3632                               6, t0, t1);
3633   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xffffe59b, 0x80000000,
3634                               0, t0, t1);
3635   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  5", 0x80000000, 0x80000000,
3636                               5, t0, t1);
3637   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 22", 0x00000000, 0x7fffffc0,
3638                               22, t0, t1);
3639   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 14", 0x00000334, 0x8000007f,
3640                               14, t0, t1);
3641   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7ffffff0, 0xfffffffe,
3642                               0, t0, t1);
3643   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  4", 0xff00ff00, 0x00000000,
3644                               4, t0, t1);
3645   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 17", 0x3ffffffe, 0x80000000,
3646                               17, t0, t1);
3647   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x80000000, 0x80000000,
3648                               31, t0, t1);
3649   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  8", 0x2b9440fc, 0x00000001,
3650                               8, t0, t1);
3651   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0x00000002, 0xffffd5c8,
3652                               10, t0, t1);
3653   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xfff138af, 0x80000000,
3654                               0, t0, t1);
3655   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 16", 0x00000000, 0x00000000,
3656                               16, t0, t1);
3657   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  8", 0x00000002, 0xe38e38e3,
3658                               8, t0, t1);
3659   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xf4911d04, 0x8000007f,
3660                               0, t0, t1);
3661   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7ffffff0, 0x00000000,
3662                               0, t0, t1);
3663   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  8", 0xffe21573, 0xffffe109,
3664                               8, t0, t1);
3665   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7fffffff, 0xc890ef17,
3666                               0, t0, t1);
3667   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  6", 0x80000001, 0xfffdb214,
3668                               6, t0, t1);
3669   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 28", 0xfee9b599, 0x00000000,
3670                               28, t0, t1);
3671   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xffffe956, 0x0000016c,
3672                               1, t0, t1);
3673   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  9", 0xffee2d5e, 0x00000000,
3674                               9, t0, t1);
3675   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xfffffffe, 0x00000000,
3676                               0, t0, t1);
3677   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0xfffff66c, 0xfffff66c,
3678                               7, t0, t1);
3679   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 15", 0x00000fb4, 0x80000000,
3680                               15, t0, t1);
3681   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x00000000, 0x7fffffff,
3682                               3, t0, t1);
3683   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000735, 0xffffffff,
3684                               0, t0, t1);
3685   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x80000000, 0x1ffffffc,
3686                               3, t0, t1);
3687   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 24", 0xffffb926, 0x00000000,
3688                               24, t0, t1);
3689   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00002b8d, 0x8000007f,
3690                               0, t0, t1);
3691   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x00000000, 0x00000017,
3692                               2, t0, t1);
3693   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x80000000, 0xff9a0952,
3694                               0, t0, t1);
3695   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x0f76e7cf, 0x0f76e7cf,
3696                               0, t0, t1);
3697   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x7fffffff, 0x1c71c71c,
3698                               31, t0, t1);
3699   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  6", 0x80000001, 0xfffffffa,
3700                               6, t0, t1);
3701   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0xfffff747, 0x0000000f,
3702                               10, t0, t1);
3703   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0xe0000007, 0xe0000007,
3704                               10, t0, t1);
3705   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 27", 0xffff6c3a, 0xffffffed,
3706                               27, t0, t1);
3707   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 29", 0x7fffffff, 0x00008c98,
3708                               29, t0, t1);
3709   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x80000004, 0x00000000,
3710                               0, t0, t1);
3711   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000128, 0x0000003c,
3712                               0, t0, t1);
3713   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x00161769, 0x00de5fe1,
3714                               3, t0, t1);
3715   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 22", 0xffffff80, 0xf0000007,
3716                               22, t0, t1);
3717   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 15", 0x00000e92, 0x7fffffff,
3718                               15, t0, t1);
3719   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x00000000, 0x0000ffff,
3720                               31, t0, t1);
3721   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xe0000001, 0x7fffffff,
3722                               31, t0, t1);
3723   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  6", 0x7fffffff, 0x00000000,
3724                               6, t0, t1);
3725   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xfffffe0c, 0xfffffe0c,
3726                               31, t0, t1);
3727   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x80000000, 0x00084488,
3728                               1, t0, t1);
3729   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x80000000, 0x7fffffff,
3730                               2, t0, t1);
3731   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x80000000, 0x80000000,
3732                               31, t0, t1);
3733   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 14", 0x00000000, 0xfffffffe,
3734                               14, t0, t1);
3735   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xc71c71c7, 0x00000000,
3736                               31, t0, t1);
3737   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 15", 0x80000000, 0x00000000,
3738                               15, t0, t1);
3739   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0x07fffffc, 0x0001594b,
3740                               1, t0, t1);
3741   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  8", 0x80000000, 0x80000000,
3742                               8, t0, t1);
3743   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x1ffffff0, 0x8000007f,
3744                               0, t0, t1);
3745   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0xffca0d15, 0x7ffffff8,
3746                               2, t0, t1);
3747   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xfffffffc, 0x00000000,
3748                               31, t0, t1);
3749   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  4", 0x00000002, 0x80000000,
3750                               4, t0, t1);
3751   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 22", 0x80000000, 0x00293c72,
3752                               22, t0, t1);
3753   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 10", 0xffffff58, 0xffffff80,
3754                               10, t0, t1);
3755   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  3", 0x00ff00ff, 0x80000000,
3756                               3, t0, t1);
3757   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0xffffff80, 0xf0f0f0f0,
3758                               31, t0, t1);
3759   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 19", 0x000037a4, 0x0012b63d,
3760                               19, t0, t1);
3761   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0x3ffffff8, 0xfffffff8,
3762                               7, t0, t1);
3763   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 29", 0x00000000, 0xffff4929,
3764                               29, t0, t1);
3765   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  1", 0xfffffff0, 0xf8000003,
3766                               1, t0, t1);
3767   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 24", 0x00000000, 0x7fffffff,
3768                               24, t0, t1);
3769   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 15", 0x00000007, 0x00000009,
3770                               15, t0, t1);
3771   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 15", 0xffffff9d, 0xffffffe0,
3772                               15, t0, t1);
3773   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 25", 0xfffe3d99, 0x80000000,
3774                               25, t0, t1);
3775   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  7", 0x00000000, 0x00000000,
3776                               7, t0, t1);
3777   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x80000005, 0xfef34c96,
3778                               31, t0, t1);
3779   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 29", 0xffffffe8, 0x7fffffff,
3780                               29, t0, t1);
3781   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 31", 0x00000000, 0x0ffffff8,
3782                               31, t0, t1);
3783   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x7ffffffe, 0xff0fceda,
3784                               0, t0, t1);
3785   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0x0002e398,
3786                               0, t0, t1);
3787   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0x00000000, 0x00000000,
3788                               0, t0, t1);
3789   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t3,  1", 0x045fb232, 0x00028632,
3790                               1, t2, t3);
3791   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t1,  4", 0xfabc3435, 0xfabc3421,
3792                               4, t4, t1);
3793   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t6, $t7, 17", 0x07654cb8, 0x734680bc,
3794                               17, t6, t7);
3795   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t5, $t3, 31", 0xf973437b, 0x80000000,
3796                               31, t5, t3);
3797   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t4,  8", 0x00ff0001, 0xff01ffff,
3798                               8, t2, t4);
3799   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t8, 11", 0x7fff7fff, 0x7fff7fff,
3800                               11, t0, t8);
3801   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t6, 13", 0x0000c420, 0x00000555,
3802                               13, t4, t6);
3803   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  2", 0x00000000, 0x00000000,
3804                               2, t0, t1);
3805   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t3,  6", 0x80000000, 0x80000000,
3806                               6, t2, t3);
3807   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t1,  7", 0xaaaaaaaa, 0x55555555,
3808                               7, t4, t1);
3809   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t6, $t7, 19", 0x00000018, 0xffff2435,
3810                               19, t6, t7);
3811   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t5, $t3, 31", 0xbabababa, 0xabababab,
3812                               31, t5, t3);
3813   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t4,  4", 0xf0f0f0f0, 0xfc79b4d2,
3814                               4, t2, t4);
3815   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t8, 12", 0xfbde3976, 0x00000000,
3816                               12, t0, t8);
3817   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t6, 10", 0x23534870, 0x00354565,
3818                               10, t4, t6);
3819   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1, 20", 0x980b7cde, 0x00086755,
3820                               20, t0, t1);
3821   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t3, 21", 0x00000018, 0x8f8f8f8f,
3822                               21, t2, t3);
3823   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t1, 24", 0x92784656, 0xeeeeeeee,
3824                               24, t4, t1);
3825   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t6, $t7, 27", 0xcacacaca, 0x1bdbdbdb,
3826                               27, t6, t7);
3827   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t5, $t3,  1", 0xbacabaca, 0xdecadeca,
3828                               1, t5, t3);
3829   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t4, 18", 0x12fadeb4, 0x93474bde,
3830                               18, t2, t4);
3831   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t8, 10", 0x7c000790, 0xfc0007ff,
3832                               10, t0, t8);
3833   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t6, 16", 0xffffffff, 0xffffffff,
3834                               16, t4, t6);
3835   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t1,  0", 0xf2f4df1f, 0xcb4ab48f,
3836                               0, t0, t1);
3837   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t3, 14", 0x435f909a, 0xaf8f7e18,
3838                               14, t2, t3);
3839   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t1,  5", 0x2106ba5f, 0x87df4510,
3840                               5, t4, t1);
3841   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t6, $t7,  7", 0x246a6376, 0xabf4e8e1,
3842                               7, t6, t7);
3843   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t5, $t3,  9", 0x1046a1a3, 0xf4c0eeac,
3844                               9, t5, t3);
3845   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t2, $t4,  3", 0x638ca515, 0x006a54f2,
3846                               3, t2, t4);
3847   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t0, $t8, 15", 0xf63e7a9d, 0x79f74493,
3848                               15, t0, t8);
3849   TESTDSPINST_RT_RS_SA_NODSPC("prepend $t4, $t6, 11", 0xbd6845cd, 0x9c09e313,
3850                               11, t4, t6);
3851
3852   printf("-------- SHRA.QB --------\n");
3853   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t1, 1", 0x00000000, 1, t0, t1);
3854   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t3, 2", 0x00028632, 2, t2, t3);
3855   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t1, 3", 0xfabc3421, 3, t4, t1);
3856   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t6, $t7, 4", 0x734680bc, 4, t6, t7);
3857   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t5, $t3, 0", 0x80000000, 0, t5, t3);
3858   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t4, 7", 0xff01ffff, 7, t2, t4);
3859   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t8, 7", 0x7fff7fff, 7, t0, t8);
3860   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t6, 0", 0x00000555, 0, t4, t6);
3861   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t1, 1", 0x00000000, 1, t0, t1);
3862   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t3, 2", 0x80000000, 2, t2, t3);
3863   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t1, 3", 0x55555555, 3, t4, t1);
3864   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t6, $t7, 4", 0xffff2435, 4, t6, t7);
3865   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t5, $t3, 5", 0xabababab, 5, t5, t3);
3866   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t4, 6", 0xfc79b4d2, 6, t2, t4);
3867   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t8, 7", 0x00000000, 7, t0, t8);
3868   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t6, 0", 0x00354565, 0, t4, t6);
3869   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t1, 1", 0x00086755, 1, t0, t1);
3870   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t3, 2", 0x8f8f8f8f, 2, t2, t3);
3871   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t1, 3", 0xeeeeeeee, 3, t4, t1);
3872   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t6, $t7, 4", 0x1bdbdbdb, 4, t6, t7);
3873   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t5, $t3, 5", 0xdecadeca, 5, t5, t3);
3874   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t4, 6", 0x93474bde, 6, t2, t4);
3875   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t8, 7", 0xfc0007ff, 7, t0, t8);
3876   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t6, 0", 0xffffffff, 0, t4, t6);
3877   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t1, 3", 0xcb4ab48f, 3, t0, t1);
3878   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t3, 4", 0xaf8f7e18, 4, t2, t3);
3879   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t1, 0", 0x87df4510, 0, t4, t1);
3880   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t6, $t7, 7", 0xabf4e8e1, 7, t6, t7);
3881   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t5, $t3, 7", 0xf4c0eeac, 7, t5, t3);
3882   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t2, $t4, 5", 0x006a54f2, 5, t2, t4);
3883   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t0, $t8, 1", 0x79f74493, 1, t0, t8);
3884   TESTDSPINST_RD_RT_SA_NODSPC("shra.qb $t4, $t6, 2", 0x9c09e313, 2, t4, t6);
3885
3886   printf("-------- SHRA_R.QB --------\n");
3887   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t1, 1", 0x00000000, 1, t0, t1);
3888   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t3, 2", 0x00028632, 2, t2, t3);
3889   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t1, 3", 0xfabc3421, 3, t4, t1);
3890   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t6, $t7, 4", 0x734680bc, 4, t6, t7);
3891   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t5, $t3, 0", 0x80000000, 0, t5, t3);
3892   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t4, 7", 0xff01ffff, 7, t2, t4);
3893   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t8, 7", 0x7fff7fff, 7, t0, t8);
3894   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t6, 0", 0x00000555, 0, t4, t6);
3895   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t1, 1", 0x00000000, 1, t0, t1);
3896   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t3, 2", 0x80000000, 2, t2, t3);
3897   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t1, 3", 0x55555555, 3, t4, t1);
3898   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t6, $t7, 4", 0xffff2435, 4, t6, t7);
3899   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t5, $t3, 5", 0xabababab, 5, t5, t3);
3900   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t4, 6", 0xfc79b4d2, 6, t2, t4);
3901   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t8, 7", 0x00000000, 7, t0, t8);
3902   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t6, 0", 0x00354565, 0, t4, t6);
3903   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t1, 1", 0x00086755, 1, t0, t1);
3904   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t3, 2", 0x8f8f8f8f, 2, t2, t3);
3905   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t1, 3", 0xeeeeeeee, 3, t4, t1);
3906   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t6, $t7, 4", 0x1bdbdbdb, 4, t6, t7);
3907   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t5, $t3, 5", 0xdecadeca, 5, t5, t3);
3908   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t4, 6", 0x93474bde, 6, t2, t4);
3909   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t8, 7", 0xfc0007ff, 7, t0, t8);
3910   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t6, 0", 0xffffffff, 0, t4, t6);
3911   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t1, 3", 0xcb4ab48f, 3, t0, t1);
3912   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t3, 4", 0xaf8f7e18, 4, t2, t3);
3913   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t1, 0", 0x87df4510, 0, t4, t1);
3914   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t6, $t7, 7", 0xabf4e8e1, 7, t6, t7);
3915   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t5, $t3, 7", 0xf4c0eeac, 7, t5, t3);
3916   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t2, $t4, 5", 0x006a54f2, 5, t2, t4);
3917   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t0, $t8, 1", 0x79f74493, 1, t0, t8);
3918   TESTDSPINST_RD_RT_SA_NODSPC("shra_r.qb $t4, $t6, 2", 0x9c09e313, 2, t4, t6);
3919
3920   printf("-------- SHRAV.QB --------\n");
3921   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x3277ffff, 0x00000001);
3922   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x00000005, 0x73741802);
3923   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x00000000, 0x80003403);
3924   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0x73468004);
3925   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0x80000000);
3926   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80000000, 0xffffff07);
3927   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80000000, 0x7fff7f07);
3928   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x00000005, 0x00000505);
3929   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0x00000000);
3930   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80008000, 0x80000000);
3931   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0x55555555);
3932   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80008000, 0xffff2434);
3933   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xffff4387, 0xabababa3);
3934   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80008000, 0xfc79b4d2);
3935   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80000000, 0x00000000);
3936   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x43871234, 0x00354561);
3937   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x1234ffff, 0x00086755);
3938   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0x8f8f8f8f);
3939   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80000000, 0xeeeeeeee);
3940   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xffff6543, 0x1bdbdbdb);
3941   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xffffffff, 0xdecadeca);
3942   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xffff4387, 0x93474bde);
3943   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387cccc, 0xfc0007ff);
3944   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0xffffffff);
3945   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xffffffff, 0xdecadeca);
3946   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0xbacabaca);
3947   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80008000, 0x3545ff80);
3948   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80000000, 0x734680bc);
3949   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0xc4dbfe20);
3950   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80008000, 0x00000000);
3951   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x4387ffff, 0x55555555);
3952   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xffff4387, 0xad80bce4);
3953   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x7fffffff, 0x00000000);
3954   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80000000, 0x00000000);
3955   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xfabc3435, 0xfabc3421);
3956   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x07654cb8, 0x734680bc);
3957   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xf973437b, 0x80000000);
3958   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x00ff0001, 0xff01ffff);
3959   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x7fff7004, 0x7fff7fff);
3960   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x0000c420, 0x00000555);
3961   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x00000000, 0x00000000);
3962   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x80000000, 0x80000000);
3963   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xaaaaaaaa, 0x55555555);
3964   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x00000018, 0xffff2435);
3965   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xbabababa, 0xabababab);
3966   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xf0f0f0f0, 0xfc79b4d2);
3967   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xfbde3976, 0x00000000);
3968   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x23534870, 0x00354565);
3969   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x980b7cde, 0x00086755);
3970   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x00000018, 0x8f8f8f8f);
3971   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x92784656, 0xeeeeeeee);
3972   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xcacacaca, 0x1bdbdbdb);
3973   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xbacabaca, 0xdecadeca);
3974   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x12fadeb4, 0x93474bde);
3975   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x7c000790, 0xfc0007ff);
3976   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xffffffff, 0xffffffff);
3977   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xf2f4df1f, 0xcb4ab48f);
3978   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x435f909a, 0xaf8f7e18);
3979   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x2106ba5f, 0x87df4510);
3980   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x246a6376, 0xabf4e8e1);
3981   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x1046a1a3, 0xf4c0eeac);
3982   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0x638ca515, 0x006a54f2);
3983   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xf63e7a9d, 0x79f74493);
3984   TESTDSPINST_RD_RT_RS_NODSPC("shrav.qb", 0xbd6845cd, 0x9c09e313);
3985
3986   printf("-------- SHRAV_R.QB --------\n");
3987   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x3277ffff, 0x00000001);
3988   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x00000005, 0x73741802);
3989   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x00000000, 0x80003403);
3990   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0x73468004);
3991   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0x80000000);
3992   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80000000, 0xffffff07);
3993   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80000000, 0x7fff7f07);
3994   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x00000005, 0x00000505);
3995   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0x00000000);
3996   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80008000, 0x80000000);
3997   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0x55555555);
3998   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80008000, 0xffff2434);
3999   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xffff4387, 0xabababa3);
4000   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80008000, 0xfc79b4d2);
4001   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80000000, 0x00000000);
4002   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x43871234, 0x00354561);
4003   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x1234ffff, 0x00086755);
4004   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0x8f8f8f8f);
4005   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80000000, 0xeeeeeeee);
4006   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xffff6543, 0x1bdbdbdb);
4007   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xffffffff, 0xdecadeca);
4008   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xffff4387, 0x93474bde);
4009   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387cccc, 0xfc0007ff);
4010   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0xffffffff);
4011   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xffffffff, 0xdecadeca);
4012   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0xbacabaca);
4013   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80008000, 0x3545ff80);
4014   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80000000, 0x734680bc);
4015   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0xc4dbfe20);
4016   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80008000, 0x00000000);
4017   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x4387ffff, 0x55555555);
4018   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xffff4387, 0xad80bce4);
4019   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x7fffffff, 0x00000000);
4020   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80000000, 0x00000000);
4021   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xfabc3435, 0xfabc3421);
4022   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x07654cb8, 0x734680bc);
4023   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xf973437b, 0x80000000);
4024   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x00ff0001, 0xff01ffff);
4025   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x7fff7004, 0x7fff7fff);
4026   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x0000c420, 0x00000555);
4027   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x00000000, 0x00000000);
4028   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x80000000, 0x80000000);
4029   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xaaaaaaaa, 0x55555555);
4030   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x00000018, 0xffff2435);
4031   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xbabababa, 0xabababab);
4032   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xf0f0f0f0, 0xfc79b4d2);
4033   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xfbde3976, 0x00000000);
4034   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x23534870, 0x00354565);
4035   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x980b7cde, 0x00086755);
4036   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x00000018, 0x8f8f8f8f);
4037   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x92784656, 0xeeeeeeee);
4038   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xcacacaca, 0x1bdbdbdb);
4039   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xbacabaca, 0xdecadeca);
4040   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x12fadeb4, 0x93474bde);
4041   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x7c000790, 0xfc0007ff);
4042   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xffffffff, 0xffffffff);
4043   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xf2f4df1f, 0xcb4ab48f);
4044   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x435f909a, 0xaf8f7e18);
4045   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x2106ba5f, 0x87df4510);
4046   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x246a6376, 0xabf4e8e1);
4047   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x1046a1a3, 0xf4c0eeac);
4048   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0x638ca515, 0x006a54f2);
4049   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xf63e7a9d, 0x79f74493);
4050   TESTDSPINST_RD_RT_RS_NODSPC("shrav_r.qb", 0xbd6845cd, 0x9c09e313);
4051
4052   printf("-------- SHRL.PH --------\n");
4053   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t1,  0", 0x00000000,  0, t0, t1);
4054   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t3,  1", 0x00028632,  1, t2, t3);
4055   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t1,  2", 0xfabc3421,  2, t4, t1);
4056   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t6, $t7,  3", 0x734680bc,  3, t6, t7);
4057   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t5, $t3,  4", 0x80000000,  4, t5, t3);
4058   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t4,  5", 0xff01ffff,  5, t2, t4);
4059   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t8,  6", 0x7fff7fff,  6, t0, t8);
4060   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t6,  7", 0x00000555,  7, t4, t6);
4061   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t1,  8", 0x00000000,  8, t0, t1);
4062   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t3,  9", 0x80000000,  9, t2, t3);
4063   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t1, 10", 0x55555555, 10, t4, t1);
4064   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t6, $t7, 11", 0xffff2435, 11, t6, t7);
4065   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t5, $t3, 12", 0xabababab, 12, t5, t3);
4066   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t4, 13", 0xfc79b4d2, 13, t2, t4);
4067   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t8, 14", 0x00000000, 14, t0, t8);
4068   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t6, 15", 0x00354565, 15, t4, t6);
4069   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t1,  0", 0x00086755,  0, t0, t1);
4070   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t3,  1", 0x8f8f8f8f,  1, t2, t3);
4071   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t1,  2", 0xeeeeeeee,  2, t4, t1);
4072   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t6, $t7,  3", 0x1bdbdbdb,  3, t6, t7);
4073   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t5, $t3,  4", 0xdecadeca,  4, t5, t3);
4074   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t4,  5", 0x93474bde,  5, t2, t4);
4075   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t8,  6", 0xfc0007ff,  6, t0, t8);
4076   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t6,  7", 0xffffffff,  7, t4, t6);
4077   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t1,  8", 0xcb4ab48f,  8, t0, t1);
4078   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t3,  9", 0xaf8f7e18,  9, t2, t3);
4079   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t1, 10", 0x87df4510, 10, t4, t1);
4080   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t6, $t7, 11", 0xabf4e8e1, 11, t6, t7);
4081   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t5, $t3, 12", 0xf4c0eeac, 12, t5, t3);
4082   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t2, $t4, 13", 0x006a54f2, 13, t2, t4);
4083   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t0, $t8, 14", 0x79f74493, 14, t0, t8);
4084   TESTDSPINST_RD_RT_SA_NODSPC("shrl.ph $t4, $t6, 15", 0x9c09e313, 15, t4, t6);
4085
4086   printf("-------- SHRLV.PH --------\n");
4087   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t1, $t2", 0x7fffffff, 0x00000000,
4088                               t0, t1, t2);
4089   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t3, $t4", 0x80000000, 0x00000000,
4090                               t2, t3, t4);
4091   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
4092                               t4, t1, t5);
4093   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4094                               t6, t7, t3);
4095   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
4096                               t5, t3, t2);
4097   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
4098                               t2, t4, t8);
4099   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
4100                               t0, t8, t0);
4101   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
4102                               t4, t6, t1);
4103   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
4104                               t0, t1, t2);
4105   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
4106                               t2, t3, t4);
4107   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
4108                               t4, t1, t5);
4109   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
4110                               t6, t7, t3);
4111   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
4112                               t5, t3, t2);
4113   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4114                               t2, t4, t8);
4115   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4116                               t0, t8, t0);
4117   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
4118                               t4, t6, t1);
4119   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4120                               t0, t1, t2);
4121   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4122                               t2, t3, t4);
4123   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4124                               t4, t1, t5);
4125   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4126                               t6, t7, t3);
4127   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4128                               t5, t3, t2);
4129   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4130                               t2, t4, t8);
4131   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4132                               t0, t8, t0);
4133   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4134                               t4, t6, t1);
4135   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4136                               t0, t1, t2);
4137   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4138                               t2, t3, t4);
4139   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4140                               t4, t1, t5);
4141   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4142                               t6, t7, t3);
4143   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4144                               t5, t3, t2);
4145   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4146                               t2, t4, t8);
4147   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4148                               t0, t8, t0);
4149   TESTDSPINST_RD_RS_RT_NODSPC("shrlv.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4150                               t4, t6, t1);
4151
4152   printf("-------- SUBQH.PH --------\n");
4153   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t1, $t2", 0x7fffffff, 0x00000000,
4154                               t0, t1, t2);
4155   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t3, $t4", 0x80000000, 0x00000000,
4156                               t2, t3, t4);
4157   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
4158                               t4, t1, t5);
4159   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4160                               t6, t7, t3);
4161   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
4162                               t5, t3, t2);
4163   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
4164                               t2, t4, t8);
4165   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
4166                               t0, t8, t0);
4167   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
4168                               t4, t6, t1);
4169   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
4170                               t0, t1, t2);
4171   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
4172                               t2, t3, t4);
4173   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
4174                               t4, t1, t5);
4175   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
4176                               t6, t7, t3);
4177   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
4178                               t5, t3, t2);
4179   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4180                               t2, t4, t8);
4181   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4182                               t0, t8, t0);
4183   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
4184                               t4, t6, t1);
4185   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4186                               t0, t1, t2);
4187   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4188                               t2, t3, t4);
4189   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4190                               t4, t1, t5);
4191   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4192                               t6, t7, t3);
4193   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4194                               t5, t3, t2);
4195   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4196                               t2, t4, t8);
4197   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4198                               t0, t8, t0);
4199   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4200                               t4, t6, t1);
4201   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4202                               t0, t1, t2);
4203   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4204                               t2, t3, t4);
4205   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4206                               t4, t1, t5);
4207   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4208                               t6, t7, t3);
4209   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4210                               t5, t3, t2);
4211   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4212                               t2, t4, t8);
4213   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4214                               t0, t8, t0);
4215   TESTDSPINST_RD_RS_RT_NODSPC("subqh.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4216                               t4, t6, t1);
4217
4218   printf("-------- SUBQH_R.PH --------\n");
4219   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t1, $t2", 0x7fffffff,
4220                               0x00000000, t0, t1, t2);
4221   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t3, $t4", 0x80000000,
4222                               0x00000000, t2, t3, t4);
4223   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t1, $t5", 0xfabc3435,
4224                               0xfabc3421, t4, t1, t5);
4225   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t6, $t7, $t3", 0x07654cb8,
4226                               0x734680bc, t6, t7, t3);
4227   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t5, $t3, $t2", 0xf973437b,
4228                               0x80000000, t5, t3, t2);
4229   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t4, $t8", 0x00ff0001,
4230                               0xff01ffff, t2, t4, t8);
4231   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t8, $t0", 0x7fff7004,
4232                               0x7fff7fff, t0, t8, t0);
4233   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t6, $t1", 0x0000c420,
4234                               0x00000555, t4, t6, t1);
4235   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t1, $t2", 0x00000000,
4236                               0x00000000, t0, t1, t2);
4237   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t3, $t4", 0x80000000,
4238                               0x80000000, t2, t3, t4);
4239   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t1, $t5", 0xaaaaaaaa,
4240                               0x55555555, t4, t1, t5);
4241   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t6, $t7, $t3", 0x00000018,
4242                               0xffff2435, t6, t7, t3);
4243   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t5, $t3, $t2", 0xbabababa,
4244                               0xabababab, t5, t3, t2);
4245   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t4, $t8", 0xf0f0f0f0,
4246                               0xfc79b4d2, t2, t4, t8);
4247   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t8, $t0", 0xfbde3976,
4248                               0x00000000, t0, t8, t0);
4249   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t6, $t1", 0x23534870,
4250                               0x00354565, t4, t6, t1);
4251   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t1, $t2", 0x980b7cde,
4252                               0x00086755, t0, t1, t2);
4253   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t3, $t4", 0x00000018,
4254                               0x8f8f8f8f, t2, t3, t4);
4255   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t1, $t5", 0x92784656,
4256                               0xeeeeeeee, t4, t1, t5);
4257   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t6, $t7, $t3", 0xcacacaca,
4258                               0x1bdbdbdb, t6, t7, t3);
4259   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t5, $t3, $t2", 0xbacabaca,
4260                               0xdecadeca, t5, t3, t2);
4261   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t4, $t8", 0x12fadeb4,
4262                               0x93474bde, t2, t4, t8);
4263   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t8, $t0", 0x7c000790,
4264                               0xfc0007ff, t0, t8, t0);
4265   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t6, $t1", 0xffffffff,
4266                               0xffffffff, t4, t6, t1);
4267   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t1, $t2", 0xf2f4df1f,
4268                               0xcb4ab48f, t0, t1, t2);
4269   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t3, $t4", 0x435f909a,
4270                               0xaf8f7e18, t2, t3, t4);
4271   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t1, $t5", 0x2106ba5f,
4272                               0x87df4510, t4, t1, t5);
4273   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t6, $t7, $t3", 0x246a6376,
4274                               0xabf4e8e1, t6, t7, t3);
4275   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t5, $t3, $t2", 0x1046a1a3,
4276                               0xf4c0eeac, t5, t3, t2);
4277   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t2, $t4, $t8", 0x638ca515,
4278                               0x006a54f2, t2, t4, t8);
4279   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t0, $t8, $t0", 0xf63e7a9d,
4280                               0x79f74493, t0, t8, t0);
4281   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.ph $t4, $t6, $t1", 0xbd6845cd,
4282                               0x9c09e313, t4, t6, t1);
4283
4284   printf("-------- SUBQH.W --------\n");
4285   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t1, $t2", 0x7fffffff, 0x00000000,
4286                               t0, t1, t2);
4287   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t3, $t4", 0x80000000, 0x00000000,
4288                               t2, t3, t4);
4289   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
4290                               t4, t1, t5);
4291   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4292                               t6, t7, t3);
4293   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t5, $t3, $t2", 0xf973437b, 0x80000000,
4294                               t5, t3, t2);
4295   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
4296                               t2, t4, t8);
4297   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
4298                               t0, t8, t0);
4299   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t6, $t1", 0x0000c420, 0x00000555,
4300                               t4, t6, t1);
4301   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t1, $t2", 0x00000000, 0x00000000,
4302                               t0, t1, t2);
4303   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t3, $t4", 0x80000000, 0x80000000,
4304                               t2, t3, t4);
4305   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
4306                               t4, t1, t5);
4307   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t6, $t7, $t3", 0x00000018, 0xffff2435,
4308                               t6, t7, t3);
4309   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t5, $t3, $t2", 0xbabababa, 0xabababab,
4310                               t5, t3, t2);
4311   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4312                               t2, t4, t8);
4313   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4314                               t0, t8, t0);
4315   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t6, $t1", 0x23534870, 0x00354565,
4316                               t4, t6, t1);
4317   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4318                               t0, t1, t2);
4319   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4320                               t2, t3, t4);
4321   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4322                               t4, t1, t5);
4323   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4324                               t6, t7, t3);
4325   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4326                               t5, t3, t2);
4327   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4328                               t2, t4, t8);
4329   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4330                               t0, t8, t0);
4331   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4332                               t4, t6, t1);
4333   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4334                               t0, t1, t2);
4335   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4336                               t2, t3, t4);
4337   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4338                               t4, t1, t5);
4339   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4340                               t6, t7, t3);
4341   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4342                               t5, t3, t2);
4343   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4344                               t2, t4, t8);
4345   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4346                               t0, t8, t0);
4347   TESTDSPINST_RD_RS_RT_NODSPC("subqh.w $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4348                               t4, t6, t1);
4349
4350   printf("-------- SUBQH_R.W --------\n");
4351   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t1, $t2", 0x7fffffff,
4352                               0x00000000, t0, t1, t2);
4353   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t3, $t4", 0x80000000,
4354                               0x00000000, t2, t3, t4);
4355   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t1, $t5", 0xfabc3435,
4356                               0xfabc3421, t4, t1, t5);
4357   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t6, $t7, $t3", 0x07654cb8,
4358                               0x734680bc, t6, t7, t3);
4359   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t5, $t3, $t2", 0xf973437b,
4360                               0x80000000, t5, t3, t2);
4361   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t4, $t8", 0x00ff0001,
4362                               0xff01ffff, t2, t4, t8);
4363   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t8, $t0", 0x7fff7004,
4364                               0x7fff7fff, t0, t8, t0);
4365   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t6, $t1", 0x0000c420,
4366                               0x00000555, t4, t6, t1);
4367   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t1, $t2", 0x00000000,
4368                               0x00000000, t0, t1, t2);
4369   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t3, $t4", 0x80000000,
4370                               0x80000000, t2, t3, t4);
4371   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t1, $t5", 0xaaaaaaaa,
4372                               0x55555555, t4, t1, t5);
4373   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t6, $t7, $t3", 0x00000018,
4374                               0xffff2435, t6, t7, t3);
4375   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t5, $t3, $t2", 0xbabababa,
4376                               0xabababab, t5, t3, t2);
4377   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t4, $t8", 0xf0f0f0f0,
4378                               0xfc79b4d2, t2, t4, t8);
4379   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t8, $t0", 0xfbde3976,
4380                               0x00000000, t0, t8, t0);
4381   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t6, $t1", 0x23534870,
4382                               0x00354565, t4, t6, t1);
4383   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t1, $t2", 0x980b7cde,
4384                               0x00086755, t0, t1, t2);
4385   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t3, $t4", 0x00000018,
4386                               0x8f8f8f8f, t2, t3, t4);
4387   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t1, $t5", 0x92784656,
4388                               0xeeeeeeee, t4, t1, t5);
4389   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t6, $t7, $t3", 0xcacacaca,
4390                               0x1bdbdbdb, t6, t7, t3);
4391   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t5, $t3, $t2", 0xbacabaca,
4392                               0xdecadeca, t5, t3, t2);
4393   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t4, $t8", 0x12fadeb4,
4394                               0x93474bde, t2, t4, t8);
4395   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t8, $t0", 0x7c000790,
4396                               0xfc0007ff, t0, t8, t0);
4397   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t6, $t1", 0xffffffff,
4398                               0xffffffff, t4, t6, t1);
4399   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t1, $t2", 0xf2f4df1f,
4400                               0xcb4ab48f, t0, t1, t2);
4401   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t3, $t4", 0x435f909a,
4402                               0xaf8f7e18, t2, t3, t4);
4403   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t1, $t5", 0x2106ba5f,
4404                               0x87df4510, t4, t1, t5);
4405   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t6, $t7, $t3", 0x246a6376,
4406                               0xabf4e8e1, t6, t7, t3);
4407   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t5, $t3, $t2", 0x1046a1a3,
4408                               0xf4c0eeac, t5, t3, t2);
4409   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t2, $t4, $t8", 0x638ca515,
4410                               0x006a54f2, t2, t4, t8);
4411   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t0, $t8, $t0", 0xf63e7a9d,
4412                               0x79f74493, t0, t8, t0);
4413   TESTDSPINST_RD_RS_RT_NODSPC("subqh_r.w $t4, $t6, $t1", 0xbd6845cd,
4414                               0x9c09e313, t4, t6, t1);
4415
4416   printf("-------- SUBU.PH --------\n");
4417   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t1, $t2", 0x7fffffff, 0x00000000,
4418                             t0, t1, t2);
4419   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t3, $t4", 0x80000000, 0x00000000,
4420                             t2, t3, t4);
4421   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
4422                             t4, t1, t5);
4423   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4424                             t6, t7, t3);
4425   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
4426                             t5, t3, t2);
4427   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
4428                             t2, t4, t8);
4429   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
4430                             t0, t8, t0);
4431   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
4432                             t4, t6, t1);
4433   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
4434                             t0, t1, t2);
4435   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
4436                             t2, t3, t4);
4437   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
4438                             t4, t1, t5);
4439   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
4440                             t6, t7, t3);
4441   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
4442                             t5, t3, t2);
4443   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4444                             t2, t4, t8);
4445   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4446                             t0, t8, t0);
4447   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
4448                             t4, t6, t1);
4449   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4450                             t0, t1, t2);
4451   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4452                             t2, t3, t4);
4453   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4454                             t4, t1, t5);
4455   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4456                             t6, t7, t3);
4457   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4458                             t5, t3, t2);
4459   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4460                             t2, t4, t8);
4461   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4462                             t0, t8, t0);
4463   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4464                             t4, t6, t1);
4465   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4466                             t0, t1, t2);
4467   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4468                             t2, t3, t4);
4469   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4470                             t4, t1, t5);
4471   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4472                             t6, t7, t3);
4473   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4474                             t5, t3, t2);
4475   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4476                             t2, t4, t8);
4477   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4478                             t0, t8, t0);
4479   TESTDSPINST_RD_RS_RT_DSPC("subu.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4480                             t4, t6, t1);
4481
4482   printf("-------- SUBU_S.PH --------\n");
4483   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t1, $t2", 0x7fffffff, 0x00000000,
4484                             t0, t1, t2);
4485   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t3, $t4", 0x80000000, 0x00000000,
4486                             t2, t3, t4);
4487   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
4488                             t4, t1, t5);
4489   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4490                             t6, t7, t3);
4491   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t5, $t3, $t2", 0xf973437b, 0x80000000,
4492                             t5, t3, t2);
4493   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
4494                             t2, t4, t8);
4495   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
4496                             t0, t8, t0);
4497   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t6, $t1", 0x0000c420, 0x00000555,
4498                             t4, t6, t1);
4499   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t1, $t2", 0x00000000, 0x00000000,
4500                             t0, t1, t2);
4501   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t3, $t4", 0x80000000, 0x80000000,
4502                             t2, t3, t4);
4503   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
4504                             t4, t1, t5);
4505   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t6, $t7, $t3", 0x00000018, 0xffff2435,
4506                             t6, t7, t3);
4507   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t5, $t3, $t2", 0xbabababa, 0xabababab,
4508                             t5, t3, t2);
4509   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4510                             t2, t4, t8);
4511   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4512                             t0, t8, t0);
4513   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t6, $t1", 0x23534870, 0x00354565,
4514                             t4, t6, t1);
4515   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4516                             t0, t1, t2);
4517   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4518                             t2, t3, t4);
4519   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4520                             t4, t1, t5);
4521   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4522                             t6, t7, t3);
4523   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4524                             t5, t3, t2);
4525   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4526                             t2, t4, t8);
4527   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4528                             t0, t8, t0);
4529   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4530                             t4, t6, t1);
4531   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4532                             t0, t1, t2);
4533   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4534                             t2, t3, t4);
4535   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4536                             t4, t1, t5);
4537   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4538                             t6, t7, t3);
4539   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4540                             t5, t3, t2);
4541   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4542                             t2, t4, t8);
4543   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4544                             t0, t8, t0);
4545   TESTDSPINST_RD_RS_RT_DSPC("subu_s.ph $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4546                             t4, t6, t1);
4547
4548   printf("-------- SUBUH.QB --------\n");
4549   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t1, $t2", 0x7fffffff, 0x00000000,
4550                               t0, t1, t2);
4551   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t3, $t4", 0x80000000, 0x00000000,
4552                               t2, t3, t4);
4553   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t1, $t5", 0xfabc3435, 0xfabc3421,
4554                               t4, t1, t5);
4555   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t6, $t7, $t3", 0x07654cb8, 0x734680bc,
4556                               t6, t7, t3);
4557   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t5, $t3, $t2", 0xf973437b, 0x80000000,
4558                               t5, t3, t2);
4559   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t4, $t8", 0x00ff0001, 0xff01ffff,
4560                               t2, t4, t8);
4561   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t8, $t0", 0x7fff7004, 0x7fff7fff,
4562                               t0, t8, t0);
4563   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t6, $t1", 0x0000c420, 0x00000555,
4564                               t4, t6, t1);
4565   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t1, $t2", 0x00000000, 0x00000000,
4566                               t0, t1, t2);
4567   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t3, $t4", 0x80000000, 0x80000000,
4568                               t2, t3, t4);
4569   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t1, $t5", 0xaaaaaaaa, 0x55555555,
4570                               t4, t1, t5);
4571   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t6, $t7, $t3", 0x00000018, 0xffff2435,
4572                               t6, t7, t3);
4573   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t5, $t3, $t2", 0xbabababa, 0xabababab,
4574                               t5, t3, t2);
4575   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t4, $t8", 0xf0f0f0f0, 0xfc79b4d2,
4576                               t2, t4, t8);
4577   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t8, $t0", 0xfbde3976, 0x00000000,
4578                               t0, t8, t0);
4579   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t6, $t1", 0x23534870, 0x00354565,
4580                               t4, t6, t1);
4581   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t1, $t2", 0x980b7cde, 0x00086755,
4582                               t0, t1, t2);
4583   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t3, $t4", 0x00000018, 0x8f8f8f8f,
4584                               t2, t3, t4);
4585   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t1, $t5", 0x92784656, 0xeeeeeeee,
4586                               t4, t1, t5);
4587   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t6, $t7, $t3", 0xcacacaca, 0x1bdbdbdb,
4588                               t6, t7, t3);
4589   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t5, $t3, $t2", 0xbacabaca, 0xdecadeca,
4590                               t5, t3, t2);
4591   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t4, $t8", 0x12fadeb4, 0x93474bde,
4592                               t2, t4, t8);
4593   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t8, $t0", 0x7c000790, 0xfc0007ff,
4594                               t0, t8, t0);
4595   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t6, $t1", 0xffffffff, 0xffffffff,
4596                               t4, t6, t1);
4597   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t1, $t2", 0xf2f4df1f, 0xcb4ab48f,
4598                               t0, t1, t2);
4599   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t3, $t4", 0x435f909a, 0xaf8f7e18,
4600                               t2, t3, t4);
4601   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t1, $t5", 0x2106ba5f, 0x87df4510,
4602                               t4, t1, t5);
4603   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t6, $t7, $t3", 0x246a6376, 0xabf4e8e1,
4604                               t6, t7, t3);
4605   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t5, $t3, $t2", 0x1046a1a3, 0xf4c0eeac,
4606                               t5, t3, t2);
4607   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t2, $t4, $t8", 0x638ca515, 0x006a54f2,
4608                               t2, t4, t8);
4609   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t0, $t8, $t0", 0xf63e7a9d, 0x79f74493,
4610                               t0, t8, t0);
4611   TESTDSPINST_RD_RS_RT_NODSPC("subuh.qb $t4, $t6, $t1", 0xbd6845cd, 0x9c09e313,
4612                               t4, t6, t1);
4613
4614   printf("-------- SUBUH_R.QB --------\n");
4615   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t1, $t2", 0x7fffffff,
4616                               0x00000000, t0, t1, t2);
4617   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t3, $t4", 0x80000000,
4618                               0x00000000, t2, t3, t4);
4619   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t1, $t5", 0xfabc3435,
4620                               0xfabc3421, t4, t1, t5);
4621   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t6, $t7, $t3", 0x07654cb8,
4622                               0x734680bc, t6, t7, t3);
4623   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t5, $t3, $t2", 0xf973437b,
4624                               0x80000000, t5, t3, t2);
4625   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t4, $t8", 0x00ff0001,
4626                               0xff01ffff, t2, t4, t8);
4627   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t8, $t0", 0x7fff7004,
4628                               0x7fff7fff, t0, t8, t0);
4629   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t6, $t1", 0x0000c420,
4630                               0x00000555, t4, t6, t1);
4631   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t1, $t2", 0x00000000,
4632                               0x00000000, t0, t1, t2);
4633   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t3, $t4", 0x80000000,
4634                               0x80000000, t2, t3, t4);
4635   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t1, $t5", 0xaaaaaaaa,
4636                               0x55555555, t4, t1, t5);
4637   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t6, $t7, $t3", 0x00000018,
4638                               0xffff2435, t6, t7, t3);
4639   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t5, $t3, $t2", 0xbabababa,
4640                               0xabababab, t5, t3, t2);
4641   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t4, $t8", 0xf0f0f0f0,
4642                               0xfc79b4d2, t2, t4, t8);
4643   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t8, $t0", 0xfbde3976,
4644                               0x00000000, t0, t8, t0);
4645   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t6, $t1", 0x23534870,
4646                               0x00354565, t4, t6, t1);
4647   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t1, $t2", 0x980b7cde,
4648                               0x00086755, t0, t1, t2);
4649   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t3, $t4", 0x00000018,
4650                               0x8f8f8f8f, t2, t3, t4);
4651   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t1, $t5", 0x92784656,
4652                               0xeeeeeeee, t4, t1, t5);
4653   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t6, $t7, $t3", 0xcacacaca,
4654                               0x1bdbdbdb, t6, t7, t3);
4655   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t5, $t3, $t2", 0xbacabaca,
4656                               0xdecadeca, t5, t3, t2);
4657   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t4, $t8", 0x12fadeb4,
4658                               0x93474bde, t2, t4, t8);
4659   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t8, $t0", 0x7c000790,
4660                               0xfc0007ff, t0, t8, t0);
4661   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t6, $t1", 0xffffffff,
4662                               0xffffffff, t4, t6, t1);
4663   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t1, $t2", 0xf2f4df1f,
4664                               0xcb4ab48f, t0, t1, t2);
4665   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t3, $t4", 0x435f909a,
4666                               0xaf8f7e18, t2, t3, t4);
4667   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t1, $t5", 0x2106ba5f,
4668                               0x87df4510, t4, t1, t5);
4669   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t6, $t7, $t3", 0x246a6376,
4670                               0xabf4e8e1, t6, t7, t3);
4671   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t5, $t3, $t2", 0x1046a1a3,
4672                               0xf4c0eeac, t5, t3, t2);
4673   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t2, $t4, $t8", 0x638ca515,
4674                               0x006a54f2, t2, t4, t8);
4675   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t0, $t8, $t0", 0xf63e7a9d,
4676                               0x79f74493, t0, t8, t0);
4677   TESTDSPINST_RD_RS_RT_NODSPC("subuh_r.qb $t4, $t6, $t1", 0xbd6845cd,
4678                               0x9c09e313, t4, t6, t1);
4679
4680   return 0;
4681}