]> git.proxmox.com Git - mirror_qemu.git/blob - tests/tcg/mips/mips64-dspr2/append.c
target-mips: Add ASE DSP testcases
[mirror_qemu.git] / tests / tcg / mips / mips64-dspr2 / append.c
1 #include"io.h"
2
3 int main(void)
4 {
5 long long rs, rt;
6 long long result;
7
8 rs = 0xFF0055AA;
9 rt = 0x0113421B;
10 result = 0x02268436;
11 __asm
12 ("append %0, %1, 0x01\n\t"
13 : "+r"(rt)
14 : "r"(rs)
15 );
16 if (rt != result) {
17 printf("append error\n");
18 return -1;
19 }
20
21 rs = 0xFFFF0FFF;
22 rt = 0x00010111;
23 result = 0x0010111F;
24 __asm
25 ("append %0, %1, 0x04\n\t"
26 : "+r"(rt)
27 : "r"(rs)
28 );
29 if (rt != result) {
30 printf("append error\n");
31 return -1;
32 }
33
34 return 0;
35 }