PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / addq_pw.c
blob99a7668c0c6a8dbe95568622bd00d606b5e7c340
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, result, dspreg, dspresult;
7 rs = 0x123456787FFFFFFF;
8 rt = 0x1111111100000101;
9 result = 0x2345678980000100;
10 dspresult = 0x1;
12 __asm
13 ("addq.pw %0, %2, %3\n\t"
14 "rddsp %1\n\t"
15 : "=r"(rd), "=r"(dspreg)
16 : "r"(rs), "r"(rt)
19 dspreg = ((dspreg >> 20) & 0x01);
20 if ((rd != result) || (dspreg != dspresult)) {
21 printf("addq.pw error\n");
23 return -1;
26 rs = 0x1234567880FFFFFF;
27 rt = 0x1111111180000001;
28 result = 0x2345678901000000;
29 dspresult = 0x1;
31 __asm
32 ("addq.pw %0, %2, %3\n\t"
33 "rddsp %1\n\t"
34 : "=r"(rd), "=r"(dspreg)
35 : "r"(rs), "r"(rt)
38 dspreg = ((dspreg >> 20) & 0x01);
39 if ((rd != result) || (dspreg != dspresult)) {
40 printf("addq.pw error\n");
42 return -1;
45 return 0;