PPC: Fix rldcl
[qemu/agraf.git] / tests / tcg / openrisc / test_bnf.c
blobf716215f10a1ef7be180cd35b4e8c8959fa85096
1 #include <stdio.h>
3 int main(void)
5 int a, b;
6 int result;
8 a = 0;
9 b = 0;
10 result = 0x3;
11 __asm
12 ("l.sfeqi %1, 0x0\n\t"
13 "l.bnf 1f\n\t"
14 "l.nop\n\t"
15 "\n\t"
16 "l.addi %0, %0, 0x1\n\t"
17 "l.addi %0, %0, 0x1\n\t"
18 "\n\t"
19 "1:\n\t"
20 "l.addi %0, %0, 0x1\n\t"
21 : "+r"(a)
22 : "r"(b)
24 if (a != result) {
25 printf("l.bnf error\n");
26 return -1;
29 a = 0;
30 b = 0;
31 result = 1;
32 __asm
33 ("l.sfeqi %1, 0x1\n\t"
34 "l.bnf 1f\n\t"
35 "l.nop\n\t"
36 "\n\t"
37 "l.addi %0, %0, 0x1\n\t"
38 "l.addi %0, %0, 0x1\n\t"
39 "\n\t"
40 "1:\n\t"
41 "l.addi %0, %0, 0x1\n\t"
42 : "+r"(a)
43 : "r"(b)
45 if (a != result) {
46 printf("l.bnf error\n");
47 return -1;
50 return 0;