s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / addq_s_ph.c
blobad84cdcfe0c93bd932d8dba35ad82d51cbfa4e0e
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt;
6 long long dsp;
7 long long result;
9 rs = 0xFFFFFFFF;
10 rt = 0x10101010;
11 result = 0x100F100F;
12 __asm
13 ("addq_s.ph %0, %1, %2\n\t"
14 : "=r"(rd)
15 : "r"(rs), "r"(rt)
17 if (rd != result) {
18 printf("1 addq_s.ph wrong\n");
20 return -1;
23 rs = 0x3712847D;
24 rt = 0x0031AF2D;
25 result = 0x37438000;
26 __asm
27 ("addq_s.ph %0, %1, %2\n\t"
28 : "=r"(rd)
29 : "r"(rs), "r"(rt)
32 __asm
33 ("rddsp %0\n\t"
34 : "=r"(dsp)
37 if ((rd != result) || (((dsp >> 20) & 0x01) != 1)) {
38 printf("2 addq_s.ph wrong\n");
40 return -1;
43 rs = 0x7fff847D;
44 rt = 0x0031AF2D;
45 result = 0x7fff8000;
46 __asm
47 ("addq_s.ph %0, %1, %2\n\t"
48 : "=r"(rd)
49 : "r"(rs), "r"(rt)
52 __asm
53 ("rddsp %0\n\t"
54 : "=r"(dsp)
57 if ((rd != result) || (((dsp >> 20) & 0x01) != 1)) {
58 printf("3 addq_s.ph wrong\n");
60 return -1;
63 rs = 0x8030847D;
64 rt = 0x8a00AF2D;
65 result = 0xffffffff80008000;
66 __asm
67 ("addq_s.ph %0, %1, %2\n\t"
68 : "=r"(rd)
69 : "r"(rs), "r"(rt)
72 __asm
73 ("rddsp %0\n\t"
74 : "=r"(dsp)
77 if ((rd != result) || (((dsp >> 20) & 0x01) != 1)) {
78 printf("4 addq_s.ph wrong\n");
80 return -1;
83 return 0;