PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / addsc.c
blob4b684b9b99bdd257625032ae0df3f88ca81895d6
1 #include "io.h"
3 int main(void)
5 long long rd, rs, rt;
6 long long dsp;
7 long long result;
9 rs = 0x0000000F;
10 rt = 0x00000001;
11 result = 0x00000010;
12 __asm
13 ("addsc %0, %1, %2\n\t"
14 : "=r"(rd)
15 : "r"(rs), "r"(rt)
17 if (rd != result) {
18 printf("1 addsc wrong\n");
20 return -1;
23 rs = 0xFFFF0FFF;
24 rt = 0x00010111;
25 result = 0x00001110;
26 __asm
27 ("addsc %0, %2, %3\n\t"
28 "rddsp %1\n\t"
29 : "=r"(rd), "=r"(dsp)
30 : "r"(rs), "r"(rt)
32 if ((rd != result) || (((dsp >> 13) & 0x01) != 1)) {
33 printf("2 addsc wrong\n");
35 return -1;
38 return 0;