blockdev: add note that block_job_cb() must be thread-safe
[qemu/ar7.git] / tests / tcg / openrisc / test_bf.c
blob79f3fb99aa46f025e169e52fb1fe45a1a0b23a51
1 #include <stdio.h>
3 int main(void)
5 int a, b, c;
6 int result;
8 a = 0;
9 b = 10;
10 c = 11;
11 result = 0x2;
12 __asm
13 ("1:\n\t"
14 "l.addi %1, %1, 0x01\n\t"
15 "l.addi %0, %0, 0x01\n\t"
16 "l.sfeq %1, %2\n\t"
17 "l.bf 1b\n\t"
18 "l.nop\n\t"
19 : "+r"(a)
20 : "r"(b), "r"(c)
22 if (a != result) {
23 printf("sfeq error\n");
24 return -1;
27 a = 0x00;
28 b = 0x11;
29 c = 0x11;
30 result = 0x01;
31 __asm
32 ("1:\n\t"
33 "l.addi %1, %1, 0x01\n\t"
34 "l.addi %0, %0, 0x01\n\t"
35 "l.sfeq %1, %2\n\t"
36 "l.bf 1b\n\t"
37 "l.nop\n\t"
38 : "+r"(a)
39 : "r"(b), "r"(c)
41 if (a != result) {
42 printf("sfeq error\n");
43 return -1;
46 return 0;