PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dpsq_s_w_qh.c
blob2cc50c577ede93c72db477754689acfd9daafab2
1 #include "io.h"
3 int main(void)
5 long long rs, rt;
6 long long achi, acli;
7 long long acho, aclo;
8 long long resh, resl;
10 rs = 0xffffeeeeddddcccc;
11 rt = 0x9999888877776666;
12 achi = 0x67576;
13 acli = 0x98878;
15 resh = 0x67576;
16 resl = 0x5b1682c4;
17 __asm
18 ("mthi %2, $ac1\n\t"
19 "mtlo %3, $ac1\n\t"
20 "dpsq_s.w.qh $ac1, %4, %5\n\t"
21 "mfhi %0, $ac1\n\t"
22 "mflo %1, $ac1\n\t"
23 : "=r"(acho), "=r"(aclo)
24 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
26 if ((acho != resh) || (aclo != resl)) {
27 printf("1 dpsq_s.w.qh wrong\n");
29 return -1;
32 rs = 0x8000800080008000;
33 rt = 0x8000800080008000;
34 achi = 0x67576;
35 acli = 0x98878;
37 resh = 0x67575;
38 resl = 0x0009887c;
40 __asm
41 ("mthi %2, $ac1\n\t"
42 "mtlo %3, $ac1\n\t"
43 "dpsq_s.w.qh $ac1, %4, %5\n\t"
44 "mfhi %0, $ac1\n\t"
45 "mflo %1, $ac1\n\t"
46 : "=r"(acho), "=r"(aclo)
47 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
49 if ((acho != resh) || (aclo != resl)) {
50 printf("2 dpsq_s.w.qh wrong\n");
52 return -1;
55 return 0;