s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / pick_ph.c
blob8800c14d1eff445b09d2e024b0f517dcfb32f239
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt, dsp;
6 long long result;
8 rs = 0x12345678;
9 rt = 0x87654321;
10 dsp = 0x0A000000;
11 result = 0x12344321;
13 __asm
14 ("wrdsp %3, 0x10\n\t"
15 "pick.ph %0, %1, %2\n\t"
16 : "=r"(rd)
17 : "r"(rs), "r"(rt), "r"(dsp)
19 if (rd != result) {
20 printf("1 pick.ph wrong\n");
22 return -1;
25 rs = 0x12345678;
26 rt = 0x87654321;
27 dsp = 0x03000000;
28 result = 0x12345678;
30 __asm
31 ("wrdsp %3, 0x10\n\t"
32 "pick.ph %0, %1, %2\n\t"
33 : "=r"(rd)
34 : "r"(rs), "r"(rt), "r"(dsp)
36 if (rd != result) {
37 printf("2 pick.ph wrong\n");
39 return -1;
42 rs = 0x12345678;
43 rt = 0x87654321;
44 dsp = 0x00000000;
45 result = 0xffffffff87654321;
47 __asm
48 ("wrdsp %3, 0x10\n\t"
49 "pick.ph %0, %1, %2\n\t"
50 : "=r"(rd)
51 : "r"(rs), "r"(rt), "r"(dsp)
53 if (rd != result) {
54 printf("3 pick.ph wrong\n");
56 return -1;
59 return 0;