PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / pick_ob.c
blob160049ffd4015fad8b71ac4cf8f847ff84a9465a
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, dsp;
6 long long res;
8 dsp = 0xff000000;
10 rs = 0x1234567812345678;
11 rt = 0x8765432187654321;
13 res = 0x1234567812345678;
15 __asm
16 ("wrdsp %1, 0x10\n\t"
17 "pick.ob %0, %2, %3\n\t"
18 : "=r"(rd)
19 : "r"(dsp), "r"(rs), "r"(rt)
22 if (rd != res) {
23 printf("1 pick.ob 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 "pick.ob %0, %2, %3\n\t"
37 : "=r"(rd)
38 : "r"(dsp), "r"(rs), "r"(rt)
41 if (rd != res) {
42 printf("2 pick.ob error\n");
43 return -1;
46 dsp = 0x34000000;
48 rs = 0x1234567812345678;
49 rt = 0x8765432187654321;
51 res = 0x8765567887344321;
53 __asm
54 ("wrdsp %1, 0x10\n\t"
55 "pick.ob %0, %2, %3\n\t"
56 : "=r"(rd)
57 : "r"(dsp), "r"(rs), "r"(rt)
60 if (rd != res) {
61 printf("3 pick.ob error\n");
62 return -1;
65 return 0;