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
PPC: Fix rldcl
[qemu/agraf.git]
/
tests
/
tcg
/
mips
/
mips32-dsp
/
cmpu_lt_qb.c
blob
074ca5b402de0f59f02645fd5b9c9a67a5dabe22
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rs
,
rt
;
7
int
dsp
;
8
int
result
;
9
10
rs
=
0x11777066
;
11
rt
=
0x55AA70FF
;
12
result
=
0x0D
;
13
__asm
14
(
"cmpu.lt.qb %1, %2
\n\t
"
15
"rddsp %0
\n\t
"
16
:
"=r"
(
dsp
)
17
:
"r"
(
rs
),
"r"
(
rt
)
18
);
19
dsp
= (
dsp
>>
24
) &
0x0F
;
20
assert
(
dsp
==
result
);
21
22
rs
=
0x11777066
;
23
rt
=
0x11777066
;
24
result
=
0x00
;
25
__asm
26
(
"cmpu.lt.qb %1, %2
\n\t
"
27
"rddsp %0
\n\t
"
28
:
"=r"
(
dsp
)
29
:
"r"
(
rs
),
"r"
(
rt
)
30
);
31
dsp
= (
dsp
>>
24
) &
0x0F
;
32
assert
(
dsp
==
result
);
33
34
return
0
;
35
}