PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / pick_qh.c
blobaa2e2938af9cb83815864adb3fb504ba919aee47
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, dsp;
6 long long res;
7 dsp = 0xff000000;
9 rs = 0x1234567812345678;
10 rt = 0x8765432187654321;
12 res = 0x1234567812345678;
14 __asm
15 ("wrdsp %1, 0x10\n\t"
16 "wrdsp %1\n\t"
17 "pick.qh %0, %2, %3\n\t"
18 : "=r"(rd), "+r"(dsp)
19 : "r"(rs), "r"(rt)
22 if (rd != res) {
23 printf("pick.qh error\n");
24 return -1;
27 dsp = 0x00000000;
29 rs = 0x1234567812345678;
30 rt = 0x8765432187654321;
32 res = 0x8765432187654321;
34 __asm
35 ("wrdsp %1, 0x10\n\t"
36 "wrdsp %1\n\t"
37 "pick.qh %0, %2, %3\n\t"
38 : "=r"(rd), "+r"(dsp)
39 : "r"(rs), "r"(rt)
42 if (rd != res) {
43 printf("pick.qh error\n");
44 return -1;
47 return 0;