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