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
/
cmp_eq_ph.c
blob
957bd88ce01f81e64b5198d1e9eb543cb4f69c21
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rs
,
rt
;
7
int
result
;
8
9
rs
=
0x11777066
;
10
rt
=
0x55AA33FF
;
11
result
=
0x00
;
12
__asm
13
(
"cmp.eq.ph %1, %2
\n\t
"
14
"rddsp %0
\n\t
"
15
:
"=r"
(
rd
)
16
:
"r"
(
rs
),
"r"
(
rt
)
17
);
18
19
rd
= (
rd
>>
24
) &
0x03
;
20
assert
(
rd
==
result
);
21
22
rs
=
0x11777066
;
23
rt
=
0x11777066
;
24
result
=
0x03
;
25
__asm
26
(
"cmp.eq.ph %1, %2
\n\t
"
27
"rddsp %0
\n\t
"
28
:
"=r"
(
rd
)
29
:
"r"
(
rs
),
"r"
(
rt
)
30
);
31
rd
= (
rd
>>
24
) &
0x03
;
32
assert
(
rd
==
result
);
33
34
return
0
;
35
}