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_r2_addqh_w.c
blob
de6926ebbb72831faa1f4fcb58b4522718272ca4
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rs
,
rt
;
7
int
result
;
8
9
rs
=
0x00000010
;
10
rt
=
0x00000001
;
11
result
=
0x00000008
;
12
13
__asm
14
(
"addqh.w %0, %1, %2
\n\t
"
15
:
"=r"
(
rd
)
16
:
"r"
(
rs
),
"r"
(
rt
)
17
);
18
19
assert
(
rd
==
result
);
20
21
rs
=
0xFFFFFFFE
;
22
rt
=
0x00000001
;
23
result
=
0xFFFFFFFF
;
24
25
__asm
26
(
"addqh.w %0, %1, %2
\n\t
"
27
:
"=r"
(
rd
)
28
:
"r"
(
rs
),
"r"
(
rt
)
29
);
30
31
assert
(
rd
==
result
);
32
33
return
0
;
34
}