s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips32-dsp / addq_s_ph.c
blob5f865f6cffd519d3a50548cbeb51eef236354ebb
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rd, rs, rt;
7 int dsp;
8 int result;
10 rs = 0xFFFFFFFF;
11 rt = 0x10101010;
12 result = 0x100F100F;
13 __asm
14 ("addq_s.ph %0, %1, %2\n\t"
15 : "=r"(rd)
16 : "r"(rs), "r"(rt)
18 assert(result == rd);
20 rs = 0x3712847D;
21 rt = 0x0031AF2D;
22 result = 0x37438000;
23 __asm
24 ("addq_s.ph %0, %1, %2\n\t"
25 : "=r"(rd)
26 : "r"(rs), "r"(rt)
28 assert(result == rd);
30 __asm
31 ("rddsp %0\n\t"
32 : "=r"(dsp)
34 assert(((dsp >> 20) & 0x01) == 1);
36 rs = 0x7fff847D;
37 rt = 0x0031AF2D;
38 result = 0x7fff8000;
39 __asm
40 ("addq_s.ph %0, %1, %2\n\t"
41 : "=r"(rd)
42 : "r"(rs), "r"(rt)
44 assert(result == rd);
46 __asm
47 ("rddsp %0\n\t"
48 : "=r"(dsp)
50 assert(((dsp >> 20) & 0x01) == 1);
52 rs = 0x8030847D;
53 rt = 0x8a00AF2D;
54 result = 0x80008000;
55 __asm
56 ("addq_s.ph %0, %1, %2\n\t"
57 : "=r"(rd)
58 : "r"(rs), "r"(rt)
60 assert(result == rd);
62 __asm
63 ("rddsp %0\n\t"
64 : "=r"(dsp)
66 assert(((dsp >> 20) & 0x01) == 1);
68 return 0;