repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
util: Implement debug-threads for macOS
[qemu/ar7.git]
/
tests
/
tcg
/
openrisc
/
test_sfleu.c
blob
be0a3c3f48bc4ec1ed0e273f4a5110af8a249872
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
int
a
,
b
;
6
int
result
;
7
8
a
=
0
;
9
b
=
3
;
10
result
=
4
;
11
__asm
12
(
"1:
\n\t
"
13
"l.addi %0, %0, 4
\n\t
"
14
"l.sfleu %0, %1
\n\t
"
15
"l.bf 1b
\n\t
"
16
"l.nop
\n\t
"
17
:
"+r"
(
a
)
18
:
"r"
(
b
)
19
);
20
if
(
a
!=
result
) {
21
printf
(
"sfleu error
\n
"
);
22
return
-
1
;
23
}
24
25
a
=
0
;
26
b
=
3
;
27
result
=
4
;
28
__asm
29
(
"1:
\n\t
"
30
"l.addi %0, %0, 1
\n\t
"
31
"l.sfleu %0, %1
\n\t
"
32
"l.bf 1b
\n\t
"
33
"l.nop
\n\t
"
34
:
"+r"
(
a
)
35
:
"r"
(
b
)
36
);
37
if
(
a
!=
result
) {
38
printf
(
"sfleu error
\n
"
);
39
return
-
1
;
40
}
41
42
return
0
;
43
}