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
/
muleq_s_w_phr.c
blob
8066d7d02a1ec16957ff50c2ecef597bf94efc25
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
=
0x8000
;
10
rt
=
0x8000
;
11
result
=
0x7FFFFFFF
;
12
resultdsp
=
1
;
13
14
__asm
15
(
"muleq_s.w.phr %0, %2, %3
\n\t
"
16
"rddsp %1
\n\t
"
17
:
"=r"
(
rd
),
"=r"
(
dsp
)
18
:
"r"
(
rs
),
"r"
(
rt
)
19
);
20
dsp
= (
dsp
>>
21
) &
0x01
;
21
assert
(
rd
==
result
);
22
assert
(
dsp
==
resultdsp
);
23
24
rs
=
0x1234
;
25
rt
=
0x4321
;
26
result
=
0x98be968
;
27
resultdsp
=
1
;
28
29
__asm
30
(
"muleq_s.w.phr %0, %2, %3
\n\t
"
31
"rddsp %1
\n\t
"
32
:
"=r"
(
rd
),
"=r"
(
dsp
)
33
:
"r"
(
rs
),
"r"
(
rt
)
34
);
35
dsp
= (
dsp
>>
21
) &
0x01
;
36
assert
(
rd
==
result
);
37
assert
(
dsp
==
resultdsp
);
38
39
return
0
;
40
}