s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / subq_pw.c
blob32f96ba4bde7b5d51100bf1807519d953f097c41
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, result, dspreg, dspresult;
6 rt = 0x123456789ABCDEF0;
7 rs = 0x123456789ABCDEF0;
8 result = 0x0;
9 dspresult = 0x0;
11 __asm
12 ("subq.pw %0, %2, %3\n\t"
13 "rddsp %1\n\t"
14 : "=r"(rd), "=r"(dspreg)
15 : "r"(rs), "r"(rt)
17 dspreg = (dspreg >> 20) & 0x1;
18 if ((rd != result) || (dspreg != dspresult)) {
19 printf("subq.pw error1\n\t");
21 return -1;
24 rt = 0x123456789ABCDEF1;
25 rs = 0x123456789ABCDEF2;
26 result = 0x0000000000000001;
27 dspresult = 0x0;
29 __asm
30 ("subq.pw %0, %2, %3\n\t"
31 "rddsp %1\n\t"
32 : "=r"(rd), "=r"(dspreg)
33 : "r"(rs), "r"(rt)
35 dspreg = (dspreg >> 20) & 0x1;
36 if ((rd != result) || (dspreg != dspresult)) {
37 printf("subq.pw error2\n");
39 return -1;
42 return 0;