s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dextr_r_w.c
blob2774e9bfcc9894973f3bb780bdaccea93f39ca18
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 = 0x123456;
13 resdsp = 0x01;
15 __asm
16 ("mthi %2, $ac1\n\t"
17 "mtlo %3, $ac1\n\t"
18 "dextr_r.w %0, $ac1, 0x8\n\t"
19 "rddsp %1\n\t"
20 : "=r"(rt), "=r"(dsp)
21 : "r"(achi), "r"(acli)
24 dsp = (dsp >> 23) & 0x1;
26 if ((dsp != resdsp) || (rt != res)) {
27 printf("dextr_r.w error\n");
28 return -1;
31 achi = 0x87654321;
32 acli = 0x12345678;
34 res = 0x12345678;
35 resdsp = 0x01;
37 __asm
38 ("mthi %2, $ac1\n\t"
39 "mtlo %3, $ac1\n\t"
40 "dextr_r.w %0, $ac1, 0x0\n\t"
41 "rddsp %1\n\t"
42 : "=r"(rt), "=r"(dsp)
43 : "r"(achi), "r"(acli)
46 dsp = (dsp >> 23) & 0x1;
48 if ((dsp != resdsp) || (rt != res)) {
49 printf("dextr_r.w error\n");
50 return -1;
53 return 0;