repo.or.cz
/
qemu
/
agraf.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PPC: Fix rldcl
[qemu/agraf.git]
/
tests
/
tcg
/
openrisc
/
test_addic.c
blob
4ba7432521c721fe9dafa07f8d33beda77395e45
1
#include <stdio.h>
2
3
int
main
(
void
)
4
{
5
int
a
,
b
,
c
;
6
int
result
;
7
8
a
=
1
;
9
result
=
0x1
;
10
__asm
11
(
"l.addic %0, %0, 0xffff
\n\t
"
12
:
"+r"
(
a
)
13
);
14
if
(
a
!=
result
) {
15
printf
(
"first addic error
\n
"
);
16
return
-
1
;
17
}
18
19
a
=
0x1
;
20
result
=
0x201
;
21
__asm
22
(
"l.addic %0, %0, 0xffff
\n\t
"
23
"l.ori %0, r0, 0x100
\n\t
"
24
"l.addic %0, %0, 0x100
\n\t
"
25
:
"+r"
(
a
)
26
);
27
if
(
a
!=
result
) {
28
printf
(
"second addic error
\n
"
);
29
return
-
1
;
30
}
31
32
return
0
;
33
}