s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / mulsaq_s_l_pw.c
blob02548f85cf8a726cb69cc94877f0a52b0280cf4c
1 #include "io.h"
3 int main(void)
5 long long rs, rt, dsp;
6 long long achi, acli;
7 long long acho, aclo;
8 long long resl, resh;
10 achi = 0x4;
11 acli = 0x4;
13 rs = 0x1234567887654321;
14 rt = 0x8765432112345678;
16 resh = 0x4;
17 resl = 0x4;
18 __asm
19 ("mthi %2, $ac1\n\t"
20 "mtlo %3, $ac1\n\t"
21 "mulsaq_s.l.pw $ac1, %4, %5\n\t"
22 "mfhi %0, $ac1\n\t"
23 "mflo %1, $ac1\n\t"
24 : "=r"(acho), "=r"(aclo)
25 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
28 if ((acho != resh) || (aclo != resl)) {
29 printf("1 mulsaq_s.l.pw wrong\n");
31 return -1;
34 achi = 0x4;
35 acli = 0x4;
37 rs = 0x8000000087654321;
38 rt = 0x8000000012345678;
40 resh = 0x4;
41 resl = 0x1e8ee513;
42 __asm
43 ("mthi %3, $ac1\n\t"
44 "mtlo %4, $ac1\n\t"
45 "mulsaq_s.l.pw $ac1, %5, %6\n\t"
46 "mfhi %0, $ac1\n\t"
47 "mflo %1, $ac1\n\t"
48 "rddsp %2\n\t"
49 : "=r"(acho), "=r"(aclo), "=r"(dsp)
50 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
52 dsp = (dsp >> 17) & 0x1;
53 if ((dsp != 0x1) || (acho != resh) || (aclo != resl)) {
54 printf("2 mulsaq_s.l.pw wrong\n");
56 return -1;
58 return 0;