s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dpsq_sa_l_pw.c
blob7fc2503fc58e590e00ee0697f60428b7f4b11d99
1 #include "io.h"
3 int main(void)
5 long long rs, rt, dsp;
6 long long achi, acli;
7 long long resh, resl, resdsp;
9 rs = 0x89789BC0123AD;
10 rt = 0x5467591643721;
12 achi = 0x98765437;
13 acli = 0x65489709;
15 resh = 0xffffffffffffffff;
16 resl = 0x00;
18 resdsp = 0x01;
20 __asm
21 ("mthi %0, $ac1\n\t"
22 "mtlo %1, $ac1\n\t"
23 "dpsq_sa.l.pw $ac1, %3, %4\n\t"
24 "mfhi %0, $ac1\n\t"
25 "mflo %1, $ac1\n\t"
26 "rddsp %2\n\t"
27 : "+r"(achi), "+r"(acli), "=r"(dsp)
28 : "r"(rs), "r"(rt)
31 dsp = (dsp >> 17) & 0x01;
32 if ((dsp != resdsp) || (achi != resh) || (acli != resl)) {
33 printf("1 dpsq_sa.l.pw wrong\n");
35 return -1;
38 /* clear dspcontrol reg for next test use. */
39 dsp = 0;
40 __asm
41 ("wrdsp %0"
43 : "r"(dsp)
46 rs = 0x8B78980000000;
47 rt = 0x5867580000000;
49 achi = 0x98765437;
50 acli = 0x65489709;
52 resh = 0xffffffff98765436;
53 resl = 0x11d367d0;
55 resdsp = 0x01;
57 __asm
58 ("mthi %0, $ac1\n\t"
59 "mtlo %1, $ac1\n\t"
60 "dpsq_sa.l.pw $ac1, %3, %4\n\t"
61 "mfhi %0, $ac1\n\t"
62 "mflo %1, $ac1\n\t"
63 "rddsp %2\n\t"
64 : "+r"(achi), "+r"(acli), "=r"(dsp)
65 : "r"(rs), "r"(rt)
68 dsp = (dsp >> 17) & 0x01;
69 if ((dsp != resdsp) || (achi != resh) || (acli != resl)) {
70 printf("2 dpsq_sa.l.pw wrong\n");
72 return -1;
75 return 0;