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_qb.c
blob
8c1b91c635d22e36885974333d3670d4fca94211
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
=
0x87654321
;
10
result
=
0x87654321
;
11
resultdsp
=
0x00
;
12
13
__asm
14
(
"shll.qb %0, %2, 0x00
\n\t
"
15
"rddsp %1
\n\t
"
16
:
"=r"
(
rd
),
"=r"
(
dsp
)
17
:
"r"
(
rt
)
18
);
19
dsp
= (
dsp
>>
22
) &
0x01
;
20
assert
(
rd
==
result
);
21
22
rt
=
0x87654321
;
23
result
=
0x38281808
;
24
resultdsp
=
0x01
;
25
26
__asm
27
(
"shll.qb %0, %2, 0x03
\n\t
"
28
"rddsp %1
\n\t
"
29
:
"=r"
(
rd
),
"=r"
(
dsp
)
30
:
"r"
(
rt
)
31
);
32
dsp
= (
dsp
>>
22
) &
0x01
;
33
assert
(
rd
==
result
);
34
35
return
0
;
36
}