s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dpau_h_obl.c
blob54905e8f933ead12526f4a35c799775762ccf2ae
2 #include "io.h"
4 int main(void)
6 long long rs, rt;
7 long long achi, acli;
8 long long acho, aclo;
9 long long resh, resl;
11 rs = 0x0000000100000001;
12 rt = 0x0000000200000002;
13 achi = 0x1;
14 acli = 0x1;
15 resh = 0x1;
16 resl = 0x3;
18 __asm
19 ("mthi %2, $ac1\n\t"
20 "mtlo %3, $ac1\n\t"
21 "dpau.h.obl $ac1, %4, %5\n\t"
22 "mfhi %0, $ac1\n\t"
23 "mflo %1, $ac1\n\t"
24 : "=r"(acho), "=r"(aclo)
25 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
28 if ((acho != resh) || (aclo != resl)) {
29 printf("1 dpau.h.obl error\n");
31 return -1;
34 rs = 0xaaaabbbbccccdddd;
35 rt = 0x3333444455556666;
36 achi = 0x88888888;
37 acli = 0x66666666;
39 resh = 0xffffffff88888888;
40 resl = 0x66670d7a;
42 __asm
43 ("mthi %2, $ac1\n\t"
44 "mtlo %3, $ac1\n\t"
45 "dpau.h.obl $ac1, %4, %5\n\t"
46 "mfhi %0, $ac1\n\t"
47 "mflo %1, $ac1\n\t"
48 : "=r"(acho), "=r"(aclo)
49 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
52 if ((acho != resh) || (aclo != resl)) {
53 printf("1 dpau.h.obl error\n");
55 return -1;
58 return 0;