s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips32-dsp / precrq_rs_ph_w.c
blob3535b37a58c73d827c518ce80098e52f37f426ea
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rd, rs, rt;
7 int dsp;
8 int result;
10 rs = 0x12345678;
11 rt = 0x87654321;
12 result = 0x12348765;
14 __asm
15 ("precrq_rs.ph.w %0, %1, %2\n\t"
16 : "=r"(rd)
17 : "r"(rs), "r"(rt)
19 assert(result == rd);
21 rs = 0x7fffC678;
22 rt = 0x865432A0;
23 result = 0x7fff8654;
25 __asm
26 ("precrq_rs.ph.w %0, %2, %3\n\t"
27 "rddsp %1\n\t"
28 : "=r"(rd), "=r"(dsp)
29 : "r"(rs), "r"(rt)
31 assert(((dsp >> 22) & 0x01) == 1);
32 assert(result == rd);
34 return 0;