Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git] / tests / tcg / mips / user / ase / dsp / test_dsp_r1_bposge32.c
blobd25417ea77b2a84a06a2384e242b682b0efd99a4
1 #include<stdio.h>
2 #include<assert.h>
4 int main()
6 int dsp, sum;
7 int result;
9 dsp = 0x20;
10 sum = 0x01;
11 result = 0x02;
13 __asm
14 ("wrdsp %1\n\t"
15 "bposge32 test1\n\t"
16 "nop\n\t"
17 "addi %0, 0xA2\n\t"
18 "nop\n\t"
19 "test1:\n\t"
20 "addi %0, 0x01\n\t"
21 : "+r"(sum)
22 : "r"(dsp)
24 assert(sum == result);
26 dsp = 0x10;
27 sum = 0x01;
28 result = 0xA4;
30 __asm
31 ("wrdsp %1\n\t"
32 "bposge32 test2\n\t"
33 "nop\n\t"
34 "addi %0, 0xA2\n\t"
35 "nop\n\t"
36 "test2:\n\t"
37 "addi %0, 0x01\n\t"
38 : "+r"(sum)
39 : "r"(dsp)
41 assert(sum == result);
43 return 0;