s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / bposge32.c
blob97bce44602f41f1933de252863a1101671e4d146
1 #include "io.h"
3 int main(void)
5 long long dsp, sum;
6 long long result;
8 dsp = 0x20;
9 sum = 0x01;
10 result = 0x02;
12 __asm
13 ("wrdsp %1\n\t"
14 "bposge32 test1\n\t"
15 "nop\n\t"
16 "addi %0, 0xA2\n\t"
17 "nop\n\t"
18 "test1:\n\t"
19 "addi %0, 0x01\n\t"
20 : "+r"(sum)
21 : "r"(dsp)
23 if (sum != result) {
24 printf("bposge32 wrong\n");
26 return -1;
29 dsp = 0x10;
30 sum = 0x01;
31 result = 0xA4;
33 __asm
34 ("wrdsp %1\n\t"
35 "bposge32 test2\n\t"
36 "nop\n\t"
37 "addi %0, 0xA2\n\t"
38 "nop\n\t"
39 "test2:\n\t"
40 "addi %0, 0x01\n\t"
41 : "+r"(sum)
42 : "r"(dsp)
44 if (sum != result) {
45 printf("bposge32 wrong\n");
47 return -1;
49 return 0;