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
/
addq_s_w.c
blob
1e13acf68fb9c77d8859b8422a6dfba655c5874e
1
#include<stdio.h>
2
#include<assert.h>
3
4
5
int
main
()
6
{
7
int
rd
,
rs
,
rt
;
8
int
result
;
9
10
rt
=
0x10017EFD
;
11
rs
=
0x11111111
;
12
result
=
0x2112900e
;
13
14
__asm
15
(
"addq_s.w %0, %1, %2
\n\t
"
16
:
"=r"
(
rd
)
17
:
"r"
(
rs
),
"r"
(
rt
)
18
);
19
assert
(
rd
==
result
);
20
21
rt
=
0x80017EFD
;
22
rs
=
0x81111111
;
23
result
=
0x80000000
;
24
25
__asm
26
(
"addq_s.w %0, %1, %2
\n\t
"
27
:
"=r"
(
rd
)
28
:
"r"
(
rs
),
"r"
(
rt
)
29
);
30
assert
(
rd
==
result
);
31
32
rt
=
0x7fffffff
;
33
rs
=
0x01111111
;
34
result
=
0x7fffffff
;
35
36
__asm
37
(
"addq_s.w %0, %1, %2
\n\t
"
38
:
"=r"
(
rd
)
39
:
"r"
(
rs
),
"r"
(
rt
)
40
);
41
assert
(
rd
==
result
);
42
43
return
0
;
44
}