Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / tcg / mips / user / ase / dsp / test_dsp_r1_shra_ph.c
blob5b2d840a6bc5ebd1638d1fc92709781deb4bec63
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int rd, rt;
7 int result;
9 rt = 0x87654321;
10 result = 0xF0EC0864;
12 __asm
13 ("shra.ph %0, %1, 0x03\n\t"
14 : "=r"(rd)
15 : "r"(rt)
17 assert(rd == result);
19 rt = 0x87654321;
20 result = 0x87654321;
22 __asm
23 ("shra.ph %0, %1, 0x00\n\t"
24 : "=r"(rd)
25 : "r"(rt)
27 assert(rd == result);
29 return 0;