s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dextrv_rs_w.c
bloba65183c0304b08fbb97f84b4de8277d16ffd304a
1 #include "io.h"
3 int main(void)
5 long long rt, rs, dsp;
6 long long achi, acli;
7 long long res, resdsp;
9 achi = 0x87654321;
10 acli = 0x12345678;
11 rs = 0x8;
13 res = 0xffffffff80000000;
14 resdsp = 0x1;
16 __asm
17 ("mthi %2, $ac1\n\t"
18 "mtlo %3, $ac1\n\t"
19 "dextrv_rs.w %0, $ac1, %4\n\t"
20 "rddsp %1\n\t"
21 : "=r"(rt), "=r"(dsp)
22 : "r"(achi), "r"(acli), "r"(rs)
24 dsp = (dsp >> 23) & 0x1;
26 if ((dsp != resdsp) || (rt != res)) {
27 printf("dextrv_rs.w error\n");
28 return -1;
31 achi = 0x00;
32 acli = 0x12345678;
33 rs = 0x8;
35 res = 0x123456;
36 resdsp = 0x1;
38 __asm
39 ("mthi %2, $ac1\n\t"
40 "mtlo %3, $ac1\n\t"
41 "dextrv_rs.w %0, $ac1, %4\n\t"
42 "rddsp %1\n\t"
43 : "=r"(rt), "=r"(dsp)
44 : "r"(achi), "r"(acli), "r"(rs)
46 dsp = (dsp >> 23) & 0x1;
48 if ((dsp != resdsp) || (rt != res)) {
49 printf("dextrv_rs.w error\n");
50 return -1;
53 return 0;