Add qemu 2.4.0
[kvmfornfv.git] / qemu / tests / tcg / mips / mips64-dsp / shll_qh.c
1 #include "io.h"
2
3 int main(void)
4 {
5     long long rd, rt, dsp;
6     long long res, resdsp;
7
8     rt = 0x9ba8765433456789;
9     res = 0x9ba8765433456789;
10     resdsp = 0x0;
11     __asm
12         ("shll.qh %0, %2, 0x0\n\t"
13          "rddsp %1\n\t"
14          : "=r"(rd), "=r"(dsp)
15          : "r"(rt)
16         );
17     dsp = (dsp >> 22) & 0x1;
18
19     if ((dsp != resdsp) || (rd != res)) {
20         printf("shll.qh error\n");
21         return -1;
22     }
23
24     rt = 0x9ba8765433456789;
25     res = 0xdd40b2a09a283c48;
26     resdsp = 0x1;
27     __asm
28         ("shll.qh %0, %2, 0x3\n\t"
29          "rddsp %1\n\t"
30          : "=r"(rd), "=r"(dsp)
31          : "r"(rt)
32         );
33
34     dsp = (dsp >> 22) & 0x1;
35
36     if ((dsp != resdsp) || (rd != res)) {
37         printf("shll.qh error1\n");
38         return -1;
39     }
40
41     return 0;
42 }