s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips32-dspr2 / mulq_s_ph.c
blob00e015542e69a95015d04267eabb55a6e4216b32
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rd, rs, rt, dsp;
7 int result, resultdsp;
9 rs = 0x80000000;
10 rt = 0x0ffc0000;
11 result = 0xF0040000;
12 resultdsp = 0;
14 __asm
15 ("mulq_s.ph %0, %2, %3\n\t"
16 "rddsp %1\n\t"
17 : "=r"(rd), "=r"(dsp)
18 : "r"(rs), "r"(rt)
20 dsp = (dsp >> 21) & 0x01;
21 assert(rd == result);
22 assert(dsp == resultdsp);
24 rs = 0x80001234;
25 rt = 0x80004321;
26 result = 0x7FFF098B;
27 resultdsp = 1;
29 __asm
30 ("mulq_s.ph %0, %2, %3\n\t"
31 "rddsp %1\n\t"
32 : "=r"(rd), "=r"(dsp)
33 : "r"(rs), "r"(rt)
35 dsp = (dsp >> 21) & 0x01;
36 assert(rd == result);
37 assert(dsp == resultdsp);
39 return 0;