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_movhi.c
blob
737f75b9fdac52824c6015a6fc2377c6ea438707
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
int
a
;
6
int
result
;
7
8
result
=
0x1222
;
9
__asm
10
(
"l.movhi r3, 0x1222
\n\t
"
11
"l.srli %0, r3, 16
\n\t
"
12
:
"=r"
(
a
)
13
);
14
if
(
a
!=
result
) {
15
printf
(
"movhi error
\n
"
);
16
return
-
1
;
17
}
18
19
result
=
0x1111
;
20
__asm
21
(
"l.movhi r8, 0x1111
\n\t
"
22
"l.srli %0, r8, 16
\n\t
"
23
:
"=r"
(
a
)
24
);
25
if
(
a
!=
result
) {
26
printf
(
"movhi error
\n
"
);
27
return
-
1
;
28
}
29
30
return
0
;
31
}