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-dspr2
/
cmpgdu_eq_qb.c
blob
2d6340d6fb12c5e9b8040723e4ceae1ce22c3f3b
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
=
0x11777066
;
11
rt
=
0x55AA70FF
;
12
result
=
0x02
;
13
__asm
14
(
"cmpgdu.eq.qb %0, %2, %3
\n\t
"
15
"rddsp %1
\n\t
"
16
:
"=r"
(
rd
),
"=r"
(
dsp
)
17
:
"r"
(
rs
),
"r"
(
rt
)
18
);
19
dsp
= (
dsp
>>
24
) &
0x0F
;
20
assert
(
rd
==
result
);
21
assert
(
dsp
==
result
);
22
23
rs
=
0x11777066
;
24
rt
=
0x11777066
;
25
result
=
0x0F
;
26
__asm
27
(
"cmpgdu.eq.qb %0, %2, %3
\n\t
"
28
"rddsp %1
\n\t
"
29
:
"=r"
(
rd
),
"=r"
(
dsp
)
30
:
"r"
(
rs
),
"r"
(
rt
)
31
);
32
dsp
= (
dsp
>>
24
) &
0x0F
;
33
assert
(
rd
==
result
);
34
assert
(
dsp
==
result
);
35
36
return
0
;
37
}