s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dshilo.c
blobf50584b9c427c79275b6eafbb2bec499ff4a752c
1 #include "io.h"
3 int main(void)
5 long long achi, acli;
6 long long acho, aclo;
7 long long reshi, reslo;
9 achi = 0x87654321;
10 acli = 0x12345678;
12 reshi = 0xfffffffff8765432;
13 reslo = 0x1234567;
15 __asm
16 ("mthi %2, $ac1\n\t"
17 "mtlo %3, $ac1\n\t"
18 "dshilo $ac1, 0x4\n\t"
19 "mfhi %0, $ac1\n\t"
20 "mflo %1, $ac1\n\t"
21 : "=r"(acho), "=r"(aclo)
22 : "r"(achi), "r"(acli)
25 if ((acho != reshi) || (aclo != reslo)) {
26 printf("1 dshilo error\n");
27 return -1;
30 achi = 0x87654321;
31 acli = 0x12345678;
33 reshi = 0x1234567;
34 reslo = 0x00;
36 __asm
37 ("mthi %2, $ac1\n\t"
38 "mtlo %3, $ac1\n\t"
39 "dshilo $ac1, -60\n\t"
40 "mfhi %0, $ac1\n\t"
41 "mflo %1, $ac1\n\t"
42 : "=r"(acho), "=r"(aclo)
43 : "r"(achi), "r"(acli)
46 if ((acho != reshi) || (aclo != reslo)) {
47 printf("2 dshilo error\n");
48 return -1;
51 return 0;