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
/
dps_w_ph.c
blob
99f292ecb21c58d6c171323fa6ea6b7f079b92e3
1
#include
"io.h"
2
3
int
main
(
void
)
4
{
5
long long
rs
,
rt
;
6
long long
ach
=
5
,
acl
=
5
;
7
long long
resulth
,
resultl
;
8
9
rs
=
0x00FF00FF
;
10
rt
=
0x00010002
;
11
resulth
=
0x04
;
12
resultl
=
0xFFFFFFFFFFFFFFD08
;
13
__asm
14
(
"mthi %0, $ac1
\n\t
"
15
"mtlo %1, $ac1
\n\t
"
16
"dps.w.ph $ac1, %2, %3
\n\t
"
17
"mfhi %0, $ac1
\n\t
"
18
"mflo %1, $ac1
\n\t
"
19
:
"+r"
(
ach
),
"+r"
(
acl
)
20
:
"r"
(
rs
),
"r"
(
rt
)
21
);
22
if
(
ach
!=
resulth
||
acl
!=
resultl
) {
23
printf
(
"dps.w.ph error
\n
"
);
24
return
-
1
;
25
}
26
27
return
0
;
28
}