Add qemu 2.4.0
[kvmfornfv.git] / qemu / tests / tcg / mips / mips64-dspr2 / mulsaq_s_w_ph.c
1 #include"io.h"
2
3 int main(void)
4 {
5     long long rs, rt, ach, acl;
6     long long resulth, resultl;
7
8     ach = 0x05;
9     acl = 0x00BBDDCC;
10     rs = 0x80001234;
11     rt = 0x80004321;
12     resulth = 0x05;
13     resultl = 0x772ff463;
14
15     __asm
16         ("mthi %0, $ac1\n\t"
17          "mtlo %1, $ac1\n\t"
18          "mulsaq_s.w.ph $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     if (ach != resulth || acl != resultl) {
25         printf("mulsaq_s.w.ph error\n");
26         return -1;
27     }
28
29     return 0;
30 }