repo.or.cz
/
qemu
/
kevin.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
vl: Avoid unnecessary 'if' nesting
[qemu/kevin.git]
/
tests
/
tcg
/
openrisc
/
test_j.c
blob
9ddf8bfbb5d84257153a14ef846f694468715f7d
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
int
a
;
6
int
result
;
7
8
a
=
0
;
9
result
=
2
;
10
__asm
11
(
"l.addi %0, %0, 1
\n\t
"
12
"l.j j
\n\t
"
13
"l.nop
\n\t
"
14
"l.addi %0, %0, 1
\n\t
"
15
"l.nop
\n\t
"
16
"j:
\n\t
"
17
"l.addi %0, %0, 1
\n\t
"
18
:
"+r"
(
a
)
19
);
20
if
(
a
!=
result
) {
21
printf
(
"j error
\n
"
);
22
return
-
1
;
23
}
24
25
return
0
;
26
}