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
/
absq_s_qb.c
blob
af4683f30475862069aaa511c06b7b4e2c8e2b12
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
input
,
result
,
dsp
;
7
int
hope
;
8
9
input
=
0x701BA35E
;
10
hope
=
0x701B5D5E
;
11
12
__asm
13
(
"absq_s.qb %0, %1
\n\t
"
14
:
"=r"
(
result
)
15
:
"r"
(
input
)
16
);
17
assert
(
result
==
hope
);
18
19
20
input
=
0x801BA35E
;
21
hope
=
0x7F1B5D5E
;
22
23
__asm
24
(
"absq_s.qb %0, %2
\n\t
"
25
"rddsp %1
\n\t
"
26
:
"=r"
(
result
),
"=r"
(
dsp
)
27
:
"r"
(
input
)
28
);
29
dsp
=
dsp
>>
20
;
30
dsp
&=
0x01
;
31
assert
(
dsp
==
1
);
32
assert
(
result
==
hope
);
33
34
return
0
;
35
}