s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / pick_pw.c
blob24d80f551a1dc58a95ebd8bbd6fab27080a6bd82
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.pw %0, %2, %3\n\t"
18 : "=r"(rd), "+r"(dsp)
19 : "r"(rs), "r"(rt)
22 if (rd != res) {
23 printf("pick.pw 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.pw %0, %2, %3\n\t"
38 : "=r"(rd), "+r"(dsp)
39 : "r"(rs), "r"(rt)
42 if (rd != res) {
43 printf("pick.pw error\n");
44 return -1;
47 return 0;