virtio-serial: make flow control explicit in virtio-console
[qemu/agraf.git] / tests / tcg / mips / mips64-dspr2 / dpa_w_ph.c
blob39dc99aa551ca96e38cd99508adf3458de65268e
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 = 0x00FF00FF;
10 rt = 0x00010002;
11 resulth = 0x05;
12 resultl = 0x0302;
13 __asm
14 ("mthi %0, $ac1\n\t"
15 "mtlo %1, $ac1\n\t"
16 "dpa.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("1 dpa.w.ph error\n");
24 return -1;
27 ach = 6, acl = 7;
28 rs = 0xFFFF00FF;
29 rt = 0xFFFF0002;
30 resulth = 0x05;
31 resultl = 0xfffffffffffe0206;
32 __asm
33 ("mthi %0, $ac1\n\t"
34 "mtlo %1, $ac1\n\t"
35 "dpa.w.ph $ac1, %2, %3\n\t"
36 "mfhi %0, $ac1\n\t"
37 "mflo %1, $ac1\n\t"
38 : "+r"(ach), "+r"(acl)
39 : "r"(rs), "r"(rt)
41 if ((ach != resulth) || (acl != resultl)) {
42 printf("2 dpa.w.ph error\n");
43 return -1;
46 return 0;