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
libqtest: Inline g_assert_no_errno()
[qemu/armbru.git]
/
tests
/
tcg
/
mips
/
mips64-dspr2
/
addqh_w.c
blob
78559e67842a6936e33099537eeae6d93e3f2f00
1
#include
"io.h"
2
3
int
main
(
void
)
4
{
5
long long
rd
,
rs
,
rt
;
6
long long
result
;
7
8
rs
=
0x00000010
;
9
rt
=
0x00000001
;
10
result
=
0x00000008
;
11
12
__asm
13
(
"addqh.w %0, %1, %2
\n\t
"
14
:
"=r"
(
rd
)
15
:
"r"
(
rs
),
"r"
(
rt
)
16
);
17
18
if
(
rd
!=
result
) {
19
printf
(
"addqh.w wrong
\n
"
);
20
return
-
1
;
21
}
22
23
rs
=
0xFFFFFFFE
;
24
rt
=
0x00000001
;
25
result
=
0xFFFFFFFFFFFFFFFF
;
26
27
__asm
28
(
"addqh.w %0, %1, %2
\n\t
"
29
:
"=r"
(
rd
)
30
:
"r"
(
rs
),
"r"
(
rt
)
31
);
32
33
if
(
rd
!=
result
) {
34
printf
(
"addqh.w wrong
\n
"
);
35
return
-
1
;
36
}
37
38
return
0
;
39
}