Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / tcg / mips / user / ase / dsp / test_dsp_r1_shilo.c
blobce8ebc69c2ac1dc6357bdce24379c09a4f18976a
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int ach, acl;
7 int resulth, resultl;
9 ach = 0xBBAACCFF;
10 acl = 0x1C3B001D;
12 resulth = 0x17755;
13 resultl = 0x99fe3876;
15 __asm
16 ("mthi %0, $ac1\n\t"
17 "mtlo %1, $ac1\n\t"
18 "shilo $ac1, 0x0F\n\t"
19 "mfhi %0, $ac1\n\t"
20 "mflo %1, $ac1\n\t"
21 : "+r"(ach), "+r"(acl)
23 assert(ach == resulth);
24 assert(acl == resultl);
27 ach = 0x1;
28 acl = 0x80000000;
30 resulth = 0x3;
31 resultl = 0x0;
33 __asm
34 ("mthi %0, $ac1\n\t"
35 "mtlo %1, $ac1\n\t"
36 "shilo $ac1, -1\n\t"
37 "mfhi %0, $ac1\n\t"
38 "mflo %1, $ac1\n\t"
39 : "+r"(ach), "+r"(acl)
41 assert(ach == resulth);
42 assert(acl == resultl);
44 return 0;