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
Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging
[qemu/ar7.git]
/
tests
/
tcg
/
openrisc
/
test_sfgeu.c
blob
2a491d91ea0038d6fd595f80c7c090ab85a80e02
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
int
a
,
b
,
c
;
6
int
result
;
7
8
a
=
0
;
9
b
=
3
;
10
result
=
1
;
11
__asm
12
(
"1:
\n\t
"
13
"l.addi %0, %0, 1
\n\t
"
14
"l.sfgeu %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
(
"sfgeu error
\n
"
);
22
return
-
1
;
23
}
24
25
a
=
0xff
;
26
b
=
3
;
27
c
=
1
;
28
result
=
2
;
29
__asm
30
(
"1:
\n\t
"
31
"l.sub %0, %0, %2
\n\t
"
32
"l.sfgeu %0, %1
\n\t
"
33
"l.bf 1b
\n\t
"
34
"l.nop
\n\t
"
35
:
"+r"
(
a
)
36
:
"r"
(
b
),
"r"
(
c
)
37
);
38
if
(
a
!=
result
) {
39
printf
(
"sfgeu error
\n
"
);
40
return
-
1
;
41
}
42
43
return
0
;
44
}