1#include <stdio.h>
2
3int main(void)
4{
5 int a, result;
6 float b, c;
7
8 a = 0;
9 b = 122.5;
10 c = 123.5;
11 result = 0x1;
12 __asm
13 ("lfgts:\n\t"
14 "l.addi %0, %0, 0x1\n\t"
15 "lf.sfgt.s %1, %2\n\t"
16 "l.bf lfgts\n\t"
17 "l.nop\n\t"
18 : "+r"(a)
19 : "r"(b), "r"(c)
20 );
21 if (a != result) {
22 printf("lf.sfgt.s error\n");
23 return -1;
24 }
25
26 b = 133.5;
27 c = 13.5;
28 result = 0x1;
29 __asm
30 ("lf.sfgt.s %1, %2\n\t"
31 "l.bf 1f\n\t"
32 "l.nop\n\t"
33 "l.addi %0, %0, 0x1\n\t"
34 "l.addi %0, %0, 0x1\n\t"
35 "1:\n\t"
36 : "+r"(a)
37 : "r"(b), "r"(c)
38 );
39 if (a != result) {
40 printf("lf.sfgt.s error\n");
41 return -1;
42 }
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85 return 0;
86}
87