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
/
pick_qb.c
blob
a7904752466228bef5537e97ee2ad92289bf7b94
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rs
,
rt
,
dsp
;
7
int
result
;
8
9
rs
=
0x12345678
;
10
rt
=
0x87654321
;
11
dsp
=
0x0f000000
;
12
result
=
0x12345678
;
13
14
__asm
15
(
"wrdsp %3, 0x10
\n\t
"
16
"pick.qb %0, %1, %2
\n\t
"
17
:
"=r"
(
rd
)
18
:
"r"
(
rs
),
"r"
(
rt
),
"r"
(
dsp
)
19
);
20
assert
(
rd
==
result
);
21
22
rs
=
0x12345678
;
23
rt
=
0x87654321
;
24
dsp
=
0x00000000
;
25
result
=
0x87654321
;
26
27
__asm
28
(
"wrdsp %3, 0x10
\n\t
"
29
"pick.qb %0, %1, %2
\n\t
"
30
:
"=r"
(
rd
)
31
:
"r"
(
rs
),
"r"
(
rt
),
"r"
(
dsp
)
32
);
33
assert
(
rd
==
result
);
34
35
return
0
;
36
}