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
/
absq_s_w.c
blob
3f52a48039cdc03c49303ec3e2fdbe56ba473f81
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
rd
,
rt
;
7
int
result
;
8
9
rt
=
0x80000000
;
10
result
=
0x7FFFFFFF
;
11
__asm
12
(
"absq_s.w %0, %1
\n\t
"
13
:
"=r"
(
rd
)
14
:
"r"
(
rt
)
15
);
16
assert
(
rd
==
result
);
17
18
rt
=
0x80030000
;
19
result
=
0x7FFD0000
;
20
__asm
21
(
"absq_s.w %0, %1
\n\t
"
22
:
"=r"
(
rd
)
23
:
"r"
(
rt
)
24
);
25
assert
(
rd
==
result
);
26
27
rt
=
0x31036080
;
28
result
=
0x31036080
;
29
__asm
30
(
"absq_s.w %0, %1
\n\t
"
31
:
"=r"
(
rd
)
32
:
"r"
(
rt
)
33
);
34
assert
(
rd
==
result
);
35
36
return
0
;
37
}