s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dpaq_sa_l_w.c
blobf840cdd761c37cd36b612821ed779a63fff3dddc
1 #include "io.h"
3 int main(void)
5 long long rs, rt, dsp;
6 long long ach = 0, acl = 0;
7 long long resulth, resultl, resultdsp;
9 rs = 0x80000000;
10 rt = 0x80000000;
11 resulth = 0x7FFFFFFF;
12 resultl = 0xffffffffFFFFFFFF;
13 resultdsp = 0x01;
14 __asm
15 ("mthi %0, $ac1\n\t"
16 "mtlo %0, $ac1\n\t"
17 "dpaq_sa.l.w $ac1, %3, %4\n\t"
18 "mfhi %0, $ac1\n\t"
19 "mflo %1, $ac1\n\t"
20 "rddsp %2\n\t"
21 : "+r"(ach), "+r"(acl), "=r"(dsp)
22 : "r"(rs), "r"(rt)
24 dsp = (dsp >> 17) & 0x01;
25 if ((dsp != resultdsp) || (ach != resulth) || (acl != resultl)) {
26 printf("dpaq_sa.l.w error\n");
28 return -1;
31 ach = 0x12;
32 acl = 0x48;
33 rs = 0x80000000;
34 rt = 0x80000000;
36 resulth = 0x7FFFFFFF;
37 resultl = 0xffffffffFFFFFFFF;
38 resultdsp = 0x01;
39 __asm
40 ("mthi %0, $ac1\n\t"
41 "mtlo %0, $ac1\n\t"
42 "dpaq_sa.l.w $ac1, %3, %4\n\t"
43 "mfhi %0, $ac1\n\t"
44 "mflo %1, $ac1\n\t"
45 "rddsp %2\n\t"
46 : "+r"(ach), "+r"(acl), "=r"(dsp)
47 : "r"(rs), "r"(rt)
49 dsp = (dsp >> 17) & 0x01;
50 if ((dsp != resultdsp) || (ach != resulth) || (acl != resultl)) {
51 printf("dpaq_sa.l.w error\n");
53 return -1;
56 ach = 0x741532A0;
57 acl = 0xfceabb08;
58 rs = 0x80000000;
59 rt = 0x80000000;
61 resulth = 0x7fffffff;
62 resultl = 0xffffffffffffffff;
63 resultdsp = 0x01;
64 __asm
65 ("mthi %0, $ac1\n\t"
66 "mtlo %0, $ac1\n\t"
67 "dpaq_sa.l.w $ac1, %3, %4\n\t"
68 "mfhi %0, $ac1\n\t"
69 "mflo %1, $ac1\n\t"
70 "rddsp %2\n\t"
71 : "+r"(ach), "+r"(acl), "=r"(dsp)
72 : "r"(rs), "r"(rt)
74 dsp = (dsp >> 17) & 0x01;
75 if ((dsp != resultdsp) || (ach != resulth) || (acl != resultl)) {
76 printf("dpaq_sa.l.w error\n");
78 return -1;
81 return 0;