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