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
/
addu_s_qb.c
blob
fe7fd3e6aa2df00d536cbf043bff37b83b627f4e
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
=
0x10FF01FF
;
11
rt
=
0x10010001
;
12
result
=
0x20FF01FF
;
13
__asm
14
(
"addu_s.qb %0, %2, %3
\n\t
"
15
"rddsp %1
\n\t
"
16
:
"=r"
(
rd
),
"=r"
(
dsp
)
17
:
"r"
(
rs
),
"r"
(
rt
)
18
);
19
assert
(
rd
==
result
);
20
assert
(((
dsp
>>
20
) &
0x1
) ==
1
);
21
22
rs
=
0xFFFF1111
;
23
rt
=
0x00020001
;
24
result
=
0xFFFF1112
;
25
__asm
26
(
"addu_s.qb %0, %2, %3
\n\t
"
27
"rddsp %1
\n\t
"
28
:
"=r"
(
rd
),
"=r"
(
dsp
)
29
:
"r"
(
rs
),
"r"
(
rt
)
30
);
31
assert
(
rd
==
result
);
32
assert
(((
dsp
>>
20
) &
0x1
) ==
1
);
33
34
return
0
;
35
}