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_shrav_qb.c
blob
b21e1b7ca64aac9c01055a0a3b85278e1eafaffd
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rs
,
rt
;
7
int
result
;
8
9
rs
=
0x03
;
10
rt
=
0x12345678
;
11
result
=
0x02060A0F
;
12
13
__asm
14
(
"shrav.qb %0, %1, %2
\n\t
"
15
:
"=r"
(
rd
)
16
:
"r"
(
rt
),
"r"
(
rs
)
17
);
18
assert
(
rd
==
result
);
19
20
rs
=
0x03
;
21
rt
=
0x87654321
;
22
result
=
0xF00C0804
;
23
24
__asm
25
(
"shrav.qb %0, %1, %2
\n\t
"
26
:
"=r"
(
rd
)
27
:
"r"
(
rt
),
"r"
(
rs
)
28
);
29
assert
(
rd
==
result
);
30
31
return
0
;
32
}