PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / dmaddu.c
blob39ab0c10db6c0f2b20ede549651df23244d9fe7b
1 #include "io.h"
3 int main(void)
5 long long rt, rs;
6 long long achi, acli;
7 long long acho, aclo;
8 long long resh, resl;
9 achi = 0x1;
10 acli = 0x2;
12 rs = 0x0000000200000002;
13 rt = 0x0000000200000002;
14 resh = 0x1;
15 resl = 0xa;
16 __asm
17 ("mthi %2, $ac1 \t\n"
18 "mtlo %3, $ac1 \t\n"
19 "dmaddu $ac1, %4, %5\t\n"
20 "mfhi %0, $ac1 \t\n"
21 "mflo %1, $ac1 \t\n"
22 : "=r"(acho), "=r"(aclo)
23 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
25 if ((acho != resh) || (aclo != resl)) {
26 printf("1 dmaddu error\n");
28 return -1;
31 achi = 0x1;
32 acli = 0x1;
34 rs = 0xaaaabbbbccccdddd;
35 rt = 0xaaaabbbbccccdddd;
37 resh = 0x0000000000000002;
38 resl = 0xffffffffca860b63;
40 __asm
41 ("mthi %2, $ac1 \t\n"
42 "mtlo %3, $ac1 \t\n"
43 "dmaddu $ac1, %4, %5\t\n"
44 "mfhi %0, $ac1 \t\n"
45 "mflo %1, $ac1 \t\n"
46 : "=r"(acho), "=r"(aclo)
47 : "r"(achi), "r"(acli), "r"(rs), "r"(rt)
49 if ((acho != resh) || (aclo != resl)) {
50 printf("2 dmaddu error\n");
52 return -1;
55 return 0;