target/mips: Simplify meson TCG rules
[qemu/ar7.git] / tests / tcg / openrisc / test_sfgtui.c
blob565d44f1126d92bdcbf33304c56b43ba86d26f07
1 #include <stdio.h>
3 int main(void)
5 int a, b;
6 int result;
8 a = 0;
9 result = 1;
10 __asm
11 ("1:\n\t"
12 "l.addi %0, %0, 1\n\t"
13 "l.sfgtui %0, 0x3\n\t"
14 "l.bf 1b\n\t"
15 "l.nop\n\t"
16 : "+r"(a)
18 if (a != result) {
19 printf("sfgtui error\n");
20 return -1;
24 a = 0xff;
25 b = 1;
26 result = 3;
27 __asm
28 ("1:\n\t"
29 "l.sub %0, %0, %1\n\t"
30 "l.sfgtui %0, 0x3\n\t"
31 "l.bf 1b\n\t"
32 "l.nop\n\t"
33 : "+r"(a)
34 : "r"(b)
36 if (a != result) {
37 printf("sfgtui error\n");
38 return -1;
41 return 0;