Add qemu 2.4.0
[kvmfornfv.git] / qemu / tests / tcg / mips / mips64-dsp / dpsu_h_obl.c
1 #include "io.h"
2
3 int main(void)
4 {
5     long long rs, rt;
6     long long ach = 5, acl = 5;
7     long long resulth, resultl;
8
9     rs      = 0x88886666BC0123AD;
10     rt      = 0x9999888801643721;
11
12     resulth = 0x04;
13     resultl = 0xFFFFFFFFFFFEF115;
14
15     __asm
16         ("mthi  %0, $ac1\n\t"
17          "mtlo  %1, $ac1\n\t"
18          "dpsu.h.obl $ac1, %2, %3\n\t"
19          "mfhi  %0, $ac1\n\t"
20          "mflo  %1, $ac1\n\t"
21          : "+r"(ach), "+r"(acl)
22          : "r"(rs), "r"(rt)
23         );
24
25     if ((ach != resulth) || (acl != resultl)) {
26         printf("dpsu.h.obl wrong\n");
27
28         return -1;
29     }
30
31     return 0;
32 }