s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / subq_s_pw.c
blobe8e0b0567e4c385218f42622a063ca97fbb552fe
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, result, dspreg, dspresult;
6 rt = 0x9FFFFFFD9FFFFFFD;
7 rs = 0x4000000080000000;
8 result = 0x7fffffffe0000003;
9 dspresult = 0x1;
11 __asm
12 ("subq_s.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_s.pw error1\n");
21 return -1;
24 rt = 0x123456789ABCDEF1;
25 rs = 0x123456789ABCDEF2;
26 result = 0x0000000000000001;
27 /* This time we do not set dspctrl, but it setted in pre-action. */
28 dspresult = 0x1;
30 __asm
31 ("subq_s.pw %0, %2, %3\n\t"
32 "rddsp %1\n\t"
33 : "=r"(rd), "=r"(dspreg)
34 : "r"(rs), "r"(rt)
36 dspreg = (dspreg >> 20) & 0x1;
37 if ((rd != result) || (dspreg != dspresult)) {
38 printf("subq_s.pw error2\n");
40 return -1;
43 rt = 0x8000000080000000;
44 rs = 0x7000000070000000;
45 dspresult = 0x1;
47 __asm
48 ("subq_s.pw %0, %2, %3\n\t"
49 "rddsp %1\n\t"
50 : "=r"(rd), "=r"(dspreg)
51 : "r"(rs), "r"(rt)
54 dspreg = (dspreg >> 20) & 0x1;
55 if ((dspreg != dspresult)) {
56 printf("subq_s.pw error3\n");
58 return -1;
61 return 0;