PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / shll_ph.c
blob42b462d20de4a6d1885f4f06e234f77c993d0187
1 #include "io.h"
3 int main(void)
5 long long rd, rt, dsp;
6 long long result, resultdsp;
8 rt = 0x12345678;
9 result = 0x12345678;
10 resultdsp = 0;
12 __asm
13 ("shll.ph %0, %2, 0x0\n\t"
14 "rddsp %1\n\t"
15 : "=r"(rd), "=r"(dsp)
16 : "r"(rt)
18 dsp = (dsp >> 22) & 0x01;
19 if ((dsp != resultdsp) || (rd != result)) {
20 printf("shll.ph wrong\n");
22 return -1;
25 rt = 0x12345678;
26 result = 0xFFFFFFFFA000C000;
27 resultdsp = 1;
29 __asm
30 ("shll.ph %0, %2, 0x0B\n\t"
31 "rddsp %1\n\t"
32 : "=r"(rd), "=r"(dsp)
33 : "r"(rt)
35 dsp = (dsp >> 22) & 0x01;
36 if ((dsp != resultdsp) || (rd != result)) {
37 printf("shll.ph wrong1\n");
39 return -1;
42 return 0;