s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dextr_rs_w.c
blobebe5f99db09d288c6be0e4075fb6c1f1491afa55
1 #include "io.h"
3 int main(void)
5 long long rt, dsp;
6 long long achi, acli;
7 long long res, resdsp;
9 achi = 0x87654321;
10 acli = 0x12345678;
12 res = 0xffffffff80000000;
13 resdsp = 0x1;
15 __asm
16 ("mthi %2, $ac1\n\t"
17 "mtlo %3, $ac1\n\t"
18 "dextr_rs.w %0, $ac1, 0x8\n\t"
19 "rddsp %1\n\t"
20 : "=r"(rt), "=r"(dsp)
21 : "r"(achi), "r"(acli)
23 dsp = (dsp >> 23) & 0x1;
25 if ((dsp != resdsp) || (rt != res)) {
26 printf("dextr_rs.w error\n");
27 return -1;
30 achi = 0x00;
31 acli = 0x12345678;
33 res = 0x123456;
34 resdsp = 0x1;
36 __asm
37 ("mthi %2, $ac1\n\t"
38 "mtlo %3, $ac1\n\t"
39 "dextr_rs.w %0, $ac1, 0x8\n\t"
40 "rddsp %1\n\t"
41 : "=r"(rt), "=r"(dsp)
42 : "r"(achi), "r"(acli)
44 dsp = (dsp >> 23) & 0x1;
46 if ((dsp != resdsp) || (rt != res)) {
47 printf("dextr_rs.w error\n");
48 return -1;
51 return 0;