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
s390-ccw.img: replace while loop with a disabled wait on s390 bios
[qemu/agraf.git]
/
tests
/
tcg
/
mips
/
mips32-dsp
/
shll_ph.c
blob
b8f1ff528503cff624c80a8e56b9e9dae109c46d
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rt
,
dsp
;
7
int
result
,
resultdsp
;
8
9
rt
=
0x12345678
;
10
result
=
0xA000C000
;
11
resultdsp
=
1
;
12
13
__asm
14
(
"shll.ph %0, %2, 0x0B
\n\t
"
15
"rddsp %1
\n\t
"
16
:
"=r"
(
rd
),
"=r"
(
dsp
)
17
:
"r"
(
rt
)
18
);
19
dsp
= (
dsp
>>
22
) &
0x01
;
20
assert
(
dsp
==
resultdsp
);
21
assert
(
rd
==
result
);
22
23
return
0
;
24
}