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
/
mips
/
mips64-dsp
/
mult.c
blob
4a294d1a0c465243e8b36a61d3c664ab5a492db9
1
#include
"io.h"
2
3
int
main
(
void
)
4
{
5
long long
rs
,
rt
,
ach
,
acl
;
6
long long
result
,
resulth
,
resultl
;
7
8
rs
=
0x00FFBBAA
;
9
rt
=
0x4B231000
;
10
resulth
=
0x4b0f01
;
11
resultl
=
0x71f8a000
;
12
__asm
13
(
"mult $ac1, %2, %3
\n\t
"
14
"mfhi %0, $ac1
\n\t
"
15
"mflo %1, $ac1
\n\t
"
16
:
"=r"
(
ach
),
"=r"
(
acl
)
17
:
"r"
(
rs
),
"r"
(
rt
)
18
);
19
if
((
ach
!=
resulth
) || (
acl
!=
resultl
)) {
20
printf
(
"mult wrong
\n
"
);
21
22
return
-
1
;
23
}
24
25
return
0
;
26
}