s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dmsubu.c
blobcc4838ad5ff9b19ec099e624b7dd5aae8e1d603f
1 #include "io.h"
3 int main(void)
5 long long rt, rs;
6 long long achi, acli;
7 long long acho, aclo;
8 long long resh, resl;
9 achi = 0x1;
10 acli = 0x8;
12 rs = 0x0000000100000001;
13 rt = 0x0000000200000002;
15 resh = 0x1;
16 resl = 0x4;
18 __asm
19 ("mthi %2, $ac1 \t\n"
20 "mtlo %3, $ac1 \t\n"
21 "dmsubu $ac1, %4, %5\t\n"
22 "mfhi %0, $ac1 \t\n"
23 "mflo %1, $ac1 \t\n"
24 : "=r"(acho), "=r"(aclo)
25 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
27 if ((acho != resh) || (aclo != resl)) {
28 printf("1 dmsubu error\n");
30 return -1;
33 achi = 0xfffffffF;
34 acli = 0xfffffffF;
36 rs = 0x8888999977776666;
37 rt = 0x9999888877776666;
39 resh = 0xffffffffffffffff;
40 resl = 0x789aae13;
42 __asm
43 ("mthi %2, $ac1 \t\n"
44 "mtlo %3, $ac1 \t\n"
45 "dmsubu $ac1, %4, %5\t\n"
46 "mfhi %0, $ac1 \t\n"
47 "mflo %1, $ac1 \t\n"
48 : "=r"(acho), "=r"(aclo)
49 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
52 if ((acho != resh) || (aclo != resl)) {
53 printf("2 dmsubu error\n");
55 return -1;
58 return 0;