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