qapi/error: Check format string argument in error_*prepend()
[qemu/armbru.git] / tests / tcg / openrisc / test_sfgesi.c
blob54a2d51cd5cac8f0dcf48c2ecb00fa715f4e3c20
1 #include <stdio.h>
2 int main(void)
4 int a, b;
5 int result;
7 a = 0;
8 result = 1;
9 __asm
10 ("1:\n\t"
11 "l.addi %0, %0, 1\n\t"
12 "l.sfgesi %0, 0x3\n\t"
13 "l.bf 1b\n\t"
14 "l.nop\n\t"
15 : "+r"(a)
17 if (a != result) {
18 printf("sfgesi error\n");
19 return -1;
22 a = 0xff;
23 b = 1;
24 result = 2;
25 __asm
26 ("1:\n\t"
27 "l.sub %0, %0, %1\n\t"
28 "l.sfgesi %0, 0x3\n\t"
29 "l.bf 1b\n\t"
30 "l.nop\n\t"
31 : "+r"(a)
32 : "r"(b)
34 if (a != result) {
35 printf("sfgesi error\n");
36 return -1;
39 return 0;