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_shllv_qb.c
blob
6d8ff4a259ba10838cbf075edcdb3a2fd45133db
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rs
,
rt
,
dsp
;
7
int
result
,
resultdsp
;
8
9
rs
=
0x03
;
10
rt
=
0x87654321
;
11
result
=
0x38281808
;
12
resultdsp
=
0x01
;
13
14
__asm
15
(
"shllv.qb %0, %2, %3
\n\t
"
16
"rddsp %1
\n\t
"
17
:
"=r"
(
rd
),
"=r"
(
dsp
)
18
:
"r"
(
rt
),
"r"
(
rs
)
19
);
20
dsp
= (
dsp
>>
22
) &
0x01
;
21
assert
(
rd
==
result
);
22
23
rs
=
0x00
;
24
rt
=
0x87654321
;
25
result
=
0x87654321
;
26
resultdsp
=
0x01
;
27
28
__asm
29
(
"shllv.qb %0, %2, %3
\n\t
"
30
"rddsp %1
\n\t
"
31
:
"=r"
(
rd
),
"=r"
(
dsp
)
32
:
"r"
(
rt
),
"r"
(
rs
)
33
);
34
dsp
= (
dsp
>>
22
) &
0x01
;
35
assert
(
rd
==
result
);
36
37
return
0
;
38
}