s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dpaq_sa_l_pw.c
blob1bb2ec2f260a2fea990d729d3fc2f36c1618889f
1 #include "io.h"
3 int main(void)
5 long long rs, rt;
6 long long achi, acli;
7 long long acho, aclo;
8 long long dsp;
9 long long resh, resl;
10 long long resdsp;
12 rs = 0x0000000100000001;
13 rt = 0x0000000200000002;
14 achi = 0x1;
15 acli = 0x1;
16 resh = 0xffffffffffffffff;
17 resl = 0x0;
18 resdsp = 0x01;
20 __asm
21 ("mthi %3, $ac1\n\t"
22 "mtlo %4, $ac1\n\t"
23 "dpaq_sa.l.pw $ac1, %5, %6\n\t"
24 "mfhi %0, $ac1\n\t"
25 "mflo %1, $ac1\n\t"
26 "rddsp %2\n\t"
27 : "=r"(acho), "=r"(aclo), "=r"(dsp)
28 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
31 if ((acho != resh) || (aclo != resl) || ((dsp >> (16 + 1)) != resdsp)) {
32 printf("1 dpaq_sa_l_pw error\n");
34 return -1;
37 rs = 0xaaaabbbbccccdddd;
38 rt = 0x3333444455556666;
39 achi = 0x88888888;
40 acli = 0x66666666;
42 resh = 0xffffffff88888887;
43 resl = 0xffffffff9e2661da;
45 __asm
46 ("mthi %2, $ac1\n\t"
47 "mtlo %3, $ac1\n\t"
48 "dpaq_sa.l.pw $ac1, %4, %5\n\t"
49 "mfhi %0, $ac1\n\t"
50 "mflo %1, $ac1\n\t"
51 : "=r"(acho), "=r"(aclo)
52 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
55 if ((acho != resh) || (aclo != resl)) {
56 printf("2 dpaq_sa_l_pw error\n");
58 return -1;
61 rs = 0x8000000080000000;
62 rt = 0x8000000080000000;
63 achi = 0x88888888;
64 acli = 0x66666666;
66 resh = 0xffffffffffffffff;
67 resl = 0x00;
68 resdsp = 0x01;
70 __asm
71 ("mthi %3, $ac1\n\t"
72 "mtlo %4, $ac1\n\t"
73 "dpaq_sa.l.pw $ac1, %5, %6\n\t"
74 "mfhi %0, $ac1\n\t"
75 "mflo %1, $ac1\n\t"
76 "rddsp %2\n\t"
77 : "=r"(acho), "=r"(aclo), "=r"(dsp)
78 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
81 if ((acho != resh) || (aclo != resl) || ((dsp >> (16 + 1)) != resdsp)) {
82 printf("2 dpaq_sa_l_pw error\n");
84 return -1;
87 return 0;