s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / addq_s_pw.c
blob2e380bbfc52f4389c33f9c6f5724f6dec8e201ce
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, result, dspreg, dspresult;
6 rs = 0x123456787FFFFFFF;
7 rt = 0x1111111100000001;
8 result = 0x234567897FFFFFFF;
9 dspresult = 0x1;
11 __asm
12 ("addq_s.pw %0, %2, %3\n\t"
13 "rddsp %1\n\t"
14 : "=r"(rd), "=r"(dspreg)
15 : "r"(rs), "r"(rt)
18 dspreg = ((dspreg >> 20) & 0x01);
19 if ((rd != result) || (dspreg != dspresult)) {
20 printf("addq_s.pw error\n");
22 return -1;
25 rs = 0x80FFFFFFE00000FF;
26 rt = 0x80000001200000DD;
27 result = 0x80000000000001DC;
28 dspresult = 0x01;
30 __asm
31 ("addq_s.pw %0, %2, %3\n\t"
32 "rddsp %1\n\t"
33 : "=r"(rd), "=r"(dspreg)
34 : "r"(rs), "r"(rt)
37 dspreg = ((dspreg >> 20) & 0x01);
38 if ((rd != result) || (dspreg != dspresult)) {
39 printf("addq_s.pw error\n");
41 return -1;
44 return 0;