block: use drained section in bdrv_close
[qemu/ar7.git] / tests / tcg / mips / mips64-dspr2 / dpsx_w_ph.c
blobb6291b5eb64fdf2df2431674bab2582e104853ac
1 #include"io.h"
3 int main(void)
5 long long rs, rt;
6 long long ach = 5, acl = 5;
7 long long resulth, resultl;
9 rs = 0xBC0123AD;
10 rt = 0x01643721;
11 resulth = 0x04;
12 resultl = 0xFFFFFFFFD751F050;
13 __asm
14 ("mthi %0, $ac1\n\t"
15 "mtlo %1, $ac1\n\t"
16 "dpsx.w.ph $ac1, %2, %3\n\t"
17 "mfhi %0, $ac1\n\t"
18 "mflo %1, $ac1\n\t"
19 : "+r"(ach), "+r"(acl)
20 : "r"(rs), "r"(rt)
22 if (ach != resulth || acl != resultl) {
23 printf("dpsx.w.ph error\n");
24 return -1;
27 return 0;