s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / subq_s_qh.c
blob4053b6b884444df8dac7cf091fca1527506ff6b6
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, result, dspreg, dspresult;
6 rs = 0x123456789ABCDEF0;
7 rt = 0x123456789ABCDEF0;
8 result = 0x0;
9 dspresult = 0x0;
11 __asm
12 ("subq_s.qh %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.qh error1\n");
21 return -1;
24 rs = 0x4000000080000000;
25 rt = 0x9FFD00009FFC0000;
26 result = 0x7FFF0000E0040000;
27 dspresult = 0x1;
29 __asm
30 ("subq_s.qh %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_s.qh error2\n");
39 return -1;
42 rs = 0x8000000000000000;
43 rt = 0x7000000000000000;
44 result = 0x8000000000000000;
45 dspresult = 0x1;
46 __asm
47 ("subq_s.qh %0, %2, %3\n\t"
48 "rddsp %1\n\t"
49 : "=r"(rd), "=r"(dspreg)
50 : "r"(rs), "r"(rt)
53 dspreg = (dspreg >> 20) & 0x1;
54 if ((rd != result) || (dspreg != dspresult)) {
55 printf("subq_s.qh error3\n");
56 return -1;
59 return 0;