s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dshilov.c
blob792bd23730141b873719ca1595e082e0010096da
1 #include "io.h"
3 int main(void)
5 long long achi, acli, rs;
6 long long acho, aclo;
7 long long reshi, reslo;
9 achi = 0x87654321;
10 acli = 0x12345678;
11 rs = 0x4;
13 reshi = 0xfffffffff8765432;
14 reslo = 0x1234567;
16 __asm
17 ("mthi %2, $ac1\n\t"
18 "mtlo %3, $ac1\n\t"
19 "dshilov $ac1, %4\n\t"
20 "mfhi %0, $ac1\n\t"
21 "mflo %1, $ac1\n\t"
22 : "=r"(acho), "=r"(aclo)
23 : "r"(achi), "r"(acli), "r"(rs)
26 if ((acho != reshi) || (aclo != reslo)) {
27 printf("dshilov error\n");
28 return -1;
31 rs = 0x44;
32 achi = 0x87654321;
33 acli = 0x12345678;
35 reshi = 0x1234567;
36 reslo = 0x00;
38 __asm
39 ("mthi %2, $ac1\n\t"
40 "mtlo %3, $ac1\n\t"
41 "dshilov $ac1, %4\n\t"
42 "mfhi %0, $ac1\n\t"
43 "mflo %1, $ac1\n\t"
44 : "=r"(acho), "=r"(aclo)
45 : "r"(achi), "r"(acli), "r"(rs)
48 if ((acho != reshi) || (aclo != reslo)) {
49 printf("dshilov error\n");
50 return -1;
53 return 0;