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
/
mips32-dsp
/
msubu.c
blob
e0f9b5a77ae34618d772d5d6032ee3f43b85d012
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
achi
,
acli
,
rs
,
rt
;
7
int
acho
,
aclo
;
8
int
resulth
,
resultl
;
9
10
rs
=
0x00BBAACC
;
11
rt
=
0x0B1C3D2F
;
12
achi
=
0x00004433
;
13
acli
=
0xFFCC0011
;
14
resulth
=
0xFFF81F29
;
15
resultl
=
0xB355089D
;
16
17
__asm
18
(
"mthi %2, $ac1
\n\t
"
19
"mtlo %3, $ac1
\n\t
"
20
"msubu $ac1, %4, %5
\n\t
"
21
"mfhi %0, $ac1
\n\t
"
22
"mflo %1, $ac1
\n\t
"
23
:
"=r"
(
acho
),
"=r"
(
aclo
)
24
:
"r"
(
achi
),
"r"
(
acli
),
"r"
(
rs
),
"r"
(
rt
)
25
);
26
assert
(
acho
==
resulth
);
27
assert
(
aclo
==
resultl
);
28
29
return
0
;
30
}