PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / mips / mips64-dsp / bposge64.c
blob36161ad852daee9f335abd8cfd7c4f8c4f0b5b0b
1 #include "io.h"
3 int main(void)
5 long long dsp, sum;
6 long long result;
8 dsp = 0x40;
9 sum = 0x01;
10 result = 0x02;
12 __asm
13 ("wrdsp %1\n\t"
14 "bposge64 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("bposge64 wrong\n");
26 return -1;
29 dsp = 0x10;
30 sum = 0x01;
31 result = 0xA4;
33 __asm
34 ("wrdsp %1\n\t"
35 "bposge64 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("bposge64 wrong\n");
47 return -1;
49 return 0;