configure: add configure option avx512f_opt
[qemu/ar7.git] / tests / tcg / openrisc / test_lf_ges.c
blob98e7f50b6e6dfd0282da124369e20f63065ce934
1 #include <stdio.h>
3 int main(void)
5 int a, result;
6 float b, c;
8 a = 0;
9 b = 122.5;
10 c = 123.5;
11 result = 0x1;
12 __asm
13 ("lfges:\n\t"
14 "l.addi %0, %0, 0x1\n\t"
15 "lf.sfge.s %1, %2\n\t"
16 "l.bf lfges\n\t"
17 "l.nop\n\t"
18 : "+r"(a)
19 : "r"(b), "r"(c)
21 if (a != result) {
22 printf("lf.sfge.s error\n");
23 return -1;
26 b = 133.5;
27 c = 13.5;
28 result = 0x3;
29 __asm
30 ("l.addi %0, %0, 0x1\n\t"
31 "l.addi %0, %0, 0x1\n\t"
32 "lf.sfge.s %1, %2\n\t"
33 "l.bf 1f\n\t"
34 "l.nop\n\t"
35 "l.addi %0, %0, 0x1\n\t"
36 "l.addi %0, %0, 0x1\n\t"
37 "1:\n\t"
38 : "+r"(a)
39 : "r"(b), "r"(c)
41 if (a != result) {
42 printf("lf.sfge.s error\n");
43 return -1;
46 /* int a, result;
47 double b, c;
49 a = 0x1;
50 b = 122.5;
51 c = 123.5;
52 result = 0x2;
53 __asm
54 ("lfged:\n\t"
55 "l.addi %0, %0, 0x1\n\t"
56 "lf.sfge.d %1, %2\n\t"
57 "l.bf lfged\n\t"
58 "l.nop\n\t"
59 : "+r"(a)
60 : "r"(b), "r"(c)
62 if (a != result) {
63 printf("lf.sfge.d error\n");
64 return -1;
67 b = 133.5;
68 c = 13.5;
69 result = 0x4;
70 __asm
71 ("lf.sfge.d %1, %2\n\t"
72 "l.bf 1f\n\t"
73 "l.nop\n\t"
74 "l.addi %0, %0, 0x1\n\t"
75 "l.addi %0, %0, 0x1\n\t"
76 "1:\n\t"
77 "l.addi %0, %0, 0x1\n\t"
78 "l.addi %0, %0, 0x1\n\t"
79 : "+r"(a)
80 : "r"(b), "r"(c)
82 if (a != result) {
83 printf("lf.sfge.d error\n");
84 return -1;
85 }*/
87 return 0;