PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips32-dsp / addq_s_w.c
blob1e13acf68fb9c77d8859b8422a6dfba655c5874e
1 #include<stdio.h>
2 #include<assert.h>
5 int main()
7 int rd, rs, rt;
8 int result;
10 rt = 0x10017EFD;
11 rs = 0x11111111;
12 result = 0x2112900e;
14 __asm
15 ("addq_s.w %0, %1, %2\n\t"
16 : "=r"(rd)
17 : "r"(rs), "r"(rt)
19 assert(rd == result);
21 rt = 0x80017EFD;
22 rs = 0x81111111;
23 result = 0x80000000;
25 __asm
26 ("addq_s.w %0, %1, %2\n\t"
27 : "=r"(rd)
28 : "r"(rs), "r"(rt)
30 assert(rd == result);
32 rt = 0x7fffffff;
33 rs = 0x01111111;
34 result = 0x7fffffff;
36 __asm
37 ("addq_s.w %0, %1, %2\n\t"
38 : "=r"(rd)
39 : "r"(rs), "r"(rt)
41 assert(rd == result);
43 return 0;