repo.or.cz
/
qemu
/
armbru.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
qapi/error: Check format string argument in error_*prepend()
[qemu/armbru.git]
/
tests
/
tcg
/
openrisc
/
test_divu.c
blob
bff9e3ea590b408d700a880939bd2624c111f2fb
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
int
a
,
b
,
c
;
6
int
result
;
7
8
b
=
0x120
;
9
c
=
0x4
;
10
result
=
0x48
;
11
12
__asm
13
(
"l.divu %0, %1, %2
\n\t
"
14
:
"=r"
(
a
)
15
:
"r"
(
b
),
"r"
(
c
)
16
);
17
if
(
a
!=
result
) {
18
printf
(
"divu error
\n
"
);
19
return
-
1
;
20
}
21
22
result
=
0x4
;
23
__asm
24
(
"l.divu %0, %1, %0
\n\t
"
25
:
"+r"
(
a
)
26
:
"r"
(
b
)
27
);
28
if
(
a
!=
result
) {
29
printf
(
"divu error
\n
"
);
30
return
-
1
;
31
}
32
33
return
0
;
34
}