repo.or.cz
/
qemu.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge tag 'qemu-macppc-20230206' of https://github.com/mcayland/qemu into staging
[qemu.git]
/
tests
/
tcg
/
mips
/
user
/
ase
/
dsp
/
test_dsp_r1_maddu.c
blob
af4bfcfe9df315a117f03110cdf792f45a5475a4
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rt
,
rs
;
7
int
achi
,
acli
;
8
int
acho
,
aclo
;
9
int
resulth
,
resultl
;
10
11
achi
=
0x05
;
12
acli
=
0xB4CB
;
13
rs
=
0x01
;
14
rt
=
0x01
;
15
resulth
=
0x05
;
16
resultl
=
0xB4CC
;
17
18
__asm
19
(
"mthi %2, $ac1
\n\t
"
20
"mtlo %3, $ac1
\n\t
"
21
"madd $ac1, %4, %5
\n\t
"
22
"mfhi %0, $ac1
\n\t
"
23
"mflo %1, $ac1
\n\t
"
24
:
"=r"
(
acho
),
"=r"
(
aclo
)
25
:
"r"
(
achi
),
"r"
(
acli
),
"r"
(
rs
),
"r"
(
rt
)
26
);
27
assert
(
resulth
==
acho
);
28
assert
(
resultl
==
aclo
);
29
30
return
0
;
31
}