s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dmadd.c
blobfb22614725b6aea2faf88ba5321bed2aa6f4d157
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;
10 achi = 0x1;
11 acli = 0x1;
13 rs = 0x0000000100000001;
14 rt = 0x0000000200000002;
16 resh = 0x1;
17 resl = 0x5;
18 __asm
19 ("mthi %2, $ac1 \t\n"
20 "mtlo %3, $ac1 \t\n"
21 "dmadd $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 dmadd error\n");
30 return -1;
33 achi = 0x1;
34 acli = 0x1;
36 rs = 0xaaaabbbbccccdddd;
37 rt = 0xaaaabbbbccccdddd;
39 resh = 0x0000000000000000;
40 resl = 0xffffffffca860b63;
42 __asm
43 ("mthi %2, $ac1 \t\n"
44 "mtlo %3, $ac1 \t\n"
45 "dmadd $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)
51 if ((acho != resh) || (aclo != resl)) {
52 printf("2 dmadd error\n");
54 return -1;
56 return 0;