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
/
adduh_qb.c
blob
796b409a86ddb0695db09dce212579a866dafede
1
#include
"io.h"
2
3
int
main
(
void
)
4
{
5
long long
rd
,
rs
,
rt
;
6
long long
result
;
7
8
rs
=
0xFF0055AA
;
9
rt
=
0x0113421B
;
10
result
=
0xffffffff80094B62
;
11
__asm
12
(
"adduh.qb %0, %1, %2
\n\t
"
13
:
"=r"
(
rd
)
14
:
"r"
(
rs
),
"r"
(
rt
)
15
);
16
if
(
rd
!=
result
) {
17
printf
(
"adduh.qb error
\n
"
);
18
return
-
1
;
19
}
20
rs
=
0xFFFF0FFF
;
21
rt
=
0x00010111
;
22
result
=
0x7F800888
;
23
24
__asm
25
(
"adduh.qb %0, %1, %2
\n\t
"
26
:
"=r"
(
rd
)
27
:
"r"
(
rs
),
"r"
(
rt
)
28
);
29
if
(
rd
!=
result
) {
30
printf
(
"adduh.qb error
\n
"
);
31
return
-
1
;
32
}
33
34
return
0
;
35
}