1*d901eff3SJia Liu #include <stdio.h>
2*d901eff3SJia Liu
main(void)3*d901eff3SJia Liu int main(void)
4*d901eff3SJia Liu {
5*d901eff3SJia Liu int a, b;
6*d901eff3SJia Liu int result;
7*d901eff3SJia Liu
8*d901eff3SJia Liu a = 0;
9*d901eff3SJia Liu b = 0;
10*d901eff3SJia Liu result = 0x3;
11*d901eff3SJia Liu __asm
12*d901eff3SJia Liu ("l.sfeqi %1, 0x0\n\t"
13*d901eff3SJia Liu "l.bnf 1f\n\t"
14*d901eff3SJia Liu "l.nop\n\t"
15*d901eff3SJia Liu "\n\t"
16*d901eff3SJia Liu "l.addi %0, %0, 0x1\n\t"
17*d901eff3SJia Liu "l.addi %0, %0, 0x1\n\t"
18*d901eff3SJia Liu "\n\t"
19*d901eff3SJia Liu "1:\n\t"
20*d901eff3SJia Liu "l.addi %0, %0, 0x1\n\t"
21*d901eff3SJia Liu : "+r"(a)
22*d901eff3SJia Liu : "r"(b)
23*d901eff3SJia Liu );
24*d901eff3SJia Liu if (a != result) {
25*d901eff3SJia Liu printf("l.bnf error\n");
26*d901eff3SJia Liu return -1;
27*d901eff3SJia Liu }
28*d901eff3SJia Liu
29*d901eff3SJia Liu a = 0;
30*d901eff3SJia Liu b = 0;
31*d901eff3SJia Liu result = 1;
32*d901eff3SJia Liu __asm
33*d901eff3SJia Liu ("l.sfeqi %1, 0x1\n\t"
34*d901eff3SJia Liu "l.bnf 1f\n\t"
35*d901eff3SJia Liu "l.nop\n\t"
36*d901eff3SJia Liu "\n\t"
37*d901eff3SJia Liu "l.addi %0, %0, 0x1\n\t"
38*d901eff3SJia Liu "l.addi %0, %0, 0x1\n\t"
39*d901eff3SJia Liu "\n\t"
40*d901eff3SJia Liu "1:\n\t"
41*d901eff3SJia Liu "l.addi %0, %0, 0x1\n\t"
42*d901eff3SJia Liu : "+r"(a)
43*d901eff3SJia Liu : "r"(b)
44*d901eff3SJia Liu );
45*d901eff3SJia Liu if (a != result) {
46*d901eff3SJia Liu printf("l.bnf error\n");
47*d901eff3SJia Liu return -1;
48*d901eff3SJia Liu }
49*d901eff3SJia Liu
50*d901eff3SJia Liu return 0;
51*d901eff3SJia Liu }
52