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