s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dmthlip.c
blob027555fb535b11eac0355abe82f2f54f92d0a8d1
1 #include "io.h"
3 int main(void)
5 long long rs, dsp;
6 long long achi, acli;
8 long long rsdsp;
9 long long acho, aclo;
11 long long res;
12 long long reshi, reslo;
15 rs = 0xaaaabbbbccccdddd;
16 achi = 0x87654321;
17 acli = 0x12345678;
18 dsp = 0x22;
20 res = 0x62;
21 reshi = 0x12345678;
22 reslo = 0xffffffffccccdddd;
24 __asm
25 ("mthi %3, $ac1\n\t"
26 "mtlo %4, $ac1\n\t"
27 "wrdsp %5\n\t"
28 "dmthlip %6, $ac1\n\t"
29 "rddsp %0\n\t"
30 "mfhi %1, $ac1\n\t"
31 "mflo %2, $ac1\n\t"
32 : "=r"(rsdsp), "=r"(acho), "=r"(aclo)
33 : "r"(achi), "r"(acli), "r"(dsp), "r"(rs)
35 if ((rsdsp != res) || (acho != reshi) || (aclo != reslo)) {
36 printf("dmthlip error\n");
37 return -1;
40 return 0;