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
/
precr_sra_r_ph_w.c
blob
6474a108c057f8f573ad9de7a542a33871297665
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rs
,
rt
;
7
int
result
;
8
9
rs
=
0x12345678
;
10
rt
=
0x87654321
;
11
result
=
0x43215678
;
12
13
__asm
14
(
"precr_sra_r.ph.w %0, %1, 0x00
\n\t
"
15
:
"+r"
(
rt
)
16
:
"r"
(
rs
)
17
);
18
assert
(
result
==
rt
);
19
20
rs
=
0x12345678
;
21
rt
=
0x87654321
;
22
result
=
0xFFFF0000
;
23
24
__asm
25
(
"precr_sra_r.ph.w %0, %1, 0x1F
\n\t
"
26
:
"+r"
(
rt
)
27
:
"r"
(
rs
)
28
);
29
assert
(
result
==
rt
);
30
31
return
0
;
32
}