s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dpaq_s_w_ph.c
blob1bca935008b020ab34ff262979b4499618dfc83a
1 #include "io.h"
3 int main(void)
5 long long rs, rt, dsp;
6 long long ach = 0, acl = 0;
7 long long resulth, resultl, resultdsp;
9 rs = 0x800000FF;
10 rt = 0x80000002;
11 resulth = 0x00;
12 resultl = 0xFFFFFFFF800003FB;
13 resultdsp = 0x01;
14 __asm
15 ("mthi %0, $ac1\n\t"
16 "mtlo %1, $ac1\n\t"
17 "dpaq_s.w.ph $ac1, %3, %4\n\t"
18 "mfhi %0, $ac1\n\t"
19 "mflo %1, $ac1\n\t"
20 "rddsp %2\n\t"
21 : "+r"(ach), "+r"(acl), "=r"(dsp)
22 : "r"(rs), "r"(rt)
24 dsp = dsp >> 17 & 0x01;
25 if ((dsp != resultdsp) || (ach != resulth) || (acl != resultl)) {
26 printf("dpaq_w.w.ph wrong\n");
28 return -1;
31 return 0;