PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips32-dsp / shll_s_w.c
blob628c7521027b23efe7fadfef681f51011bdf1064
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rd, rt, dsp;
7 int result, resultdsp;
9 rt = 0x82345678;
10 result = 0x82345678;
11 resultdsp = 0x00;
13 __asm
14 ("shll_s.w %0, %2, 0x0\n\t"
15 "rddsp %1\n\t"
16 : "=r"(rd), "=r"(dsp)
17 : "r"(rt)
19 dsp = (dsp >> 22) & 0x01;
20 assert(dsp == resultdsp);
21 assert(rd == result);
23 rt = 0x82345678;
24 result = 0x80000000;
25 resultdsp = 0x01;
27 __asm
28 ("shll_s.w %0, %2, 0x0B\n\t"
29 "rddsp %1\n\t"
30 : "=r"(rd), "=r"(dsp)
31 : "r"(rt)
33 dsp = (dsp >> 22) & 0x01;
34 assert(dsp == resultdsp);
35 assert(rd == result);
37 rt = 0x12345678;
38 result = 0x7FFFFFFF;
39 resultdsp = 0x01;
41 __asm
42 ("shll_s.w %0, %2, 0x0B\n\t"
43 "rddsp %1\n\t"
44 : "=r"(rd), "=r"(dsp)
45 : "r"(rt)
47 dsp = (dsp >> 22) & 0x01;
48 assert(dsp == resultdsp);
49 assert(rd == result);
51 return 0;