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
/
precrq_rs_ph_w.c
blob
3535b37a58c73d827c518ce80098e52f37f426ea
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rs
,
rt
;
7
int
dsp
;
8
int
result
;
9
10
rs
=
0x12345678
;
11
rt
=
0x87654321
;
12
result
=
0x12348765
;
13
14
__asm
15
(
"precrq_rs.ph.w %0, %1, %2
\n\t
"
16
:
"=r"
(
rd
)
17
:
"r"
(
rs
),
"r"
(
rt
)
18
);
19
assert
(
result
==
rd
);
20
21
rs
=
0x7fffC678
;
22
rt
=
0x865432A0
;
23
result
=
0x7fff8654
;
24
25
__asm
26
(
"precrq_rs.ph.w %0, %2, %3
\n\t
"
27
"rddsp %1
\n\t
"
28
:
"=r"
(
rd
),
"=r"
(
dsp
)
29
:
"r"
(
rs
),
"r"
(
rt
)
30
);
31
assert
(((
dsp
>>
22
) &
0x01
) ==
1
);
32
assert
(
result
==
rd
);
33
34
return
0
;
35
}