PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / addq_ph.c
blob22a36d9805146d46b9b4d63ff1a29553f783bb32
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt;
6 long long dsp;
7 long long result;
9 rs = 0xFFFFFFFF;
10 rt = 0x10101010;
11 result = 0x100F100F;
12 __asm
13 ("addq.ph %0, %1, %2\n\t"
14 : "=r"(rd)
15 : "r"(rs), "r"(rt)
17 if (rd != result) {
18 printf("1 addq.ph wrong\n");
20 return -1;
23 rs = 0x3712847D;
24 rt = 0x0031AF2D;
25 result = 0x374333AA;
26 __asm
27 ("addq.ph %0, %1, %2\n\t"
28 : "=r"(rd)
29 : "r"(rs), "r"(rt)
31 if (rd != result) {
32 printf("2 addq.ph wrong\n");
34 return -1;
37 rs = 0x7fff847D;
38 rt = 0x0031AF2D;
39 result = 0xffffffff803033AA;
40 __asm
41 ("addq.ph %0, %1, %2\n\t"
42 : "=r"(rd)
43 : "r"(rs), "r"(rt)
46 __asm("rddsp %0\n\t"
47 : "=r"(dsp)
50 if (rd != result || (((dsp >> 20) & 0x01) != 1)) {
51 printf("3 addq.ph wrong\n");
53 return -1;
56 return 0;