s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips32-dsp / addsc.c
blobace749f667c4e13a0346788ad7b31f9383b37009
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rd, rs, rt;
7 int dsp;
8 int result;
10 rs = 0x0000000F;
11 rt = 0x00000001;
12 result = 0x00000010;
13 __asm
14 ("addsc %0, %1, %2\n\t"
15 : "=r"(rd)
16 : "r"(rs), "r"(rt)
18 assert(rd == result);
20 rs = 0xFFFF0FFF;
21 rt = 0x00010111;
22 result = 0x00001110;
23 __asm
24 ("addsc %0, %2, %3\n\t"
25 "rddsp %1\n\t"
26 : "=r"(rd), "=r"(dsp)
27 : "r"(rs), "r"(rt)
29 assert(rd == result);
30 assert(((dsp >> 13) & 0x01) == 1);
32 return 0;