s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dextr_l.c
blob538846df1818d5e9b9714875db6f7fc2ec8ae474
1 #include "io.h"
3 int main(void)
5 long long rt;
6 long long achi, acli;
7 long long res;
9 achi = 0x87654321;
10 acli = 0x12345678;
12 res = 0x2100000000123456;
14 __asm
15 ("mthi %1, $ac1\n\t"
16 "mtlo %2, $ac1\n\t"
17 "dextr.l %0, $ac1, 0x8\n\t"
18 : "=r"(rt)
19 : "r"(achi), "r"(acli)
21 if (rt != res) {
22 printf("dextr.l error\n");
23 return -1;
26 achi = 0x87654321;
27 acli = 0x12345678;
29 res = 0x12345678;
31 __asm
32 ("mthi %1, $ac1\n\t"
33 "mtlo %2, $ac1\n\t"
34 "dextr.l %0, $ac1, 0x0\n\t"
35 : "=r"(rt)
36 : "r"(achi), "r"(acli)
38 if (rt != res) {
39 printf("dextr.l error\n");
40 return -1;
43 return 0;