qapi/error: Check format string argument in error_*prepend()
[qemu/armbru.git] / tests / tcg / openrisc / test_sfgeui.c
blob40af35c68f7ebb88812147d122b6403a74aa39bb
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.sfgeui %0, 0x3\n\t"
14 "l.bf 1b\n\t"
15 "l.nop\n\t"
16 : "+r"(a)
18 if (a != result) {
19 printf("sfgeui error\n");
20 return -1;
23 a = 0xff;
24 b = 1;
25 result = 2;
26 __asm
27 ("1:\n\t"
28 "l.sub %0, %0, %1\n\t"
29 "l.sfgeui %0, 0x3\n\t"
30 "l.bf 1b\n\t"
31 "l.nop\n\t"
32 : "+r"(a)
33 : "r"(b)
35 if (a != result) {
36 printf("sfgeui error\n");
37 return -1;
40 return 0;