repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
hw/arm/virt: introduce DEFINE_VIRT_MACHINE
[qemu/ar7.git]
/
tests
/
tcg
/
mips
/
mips64-dsp
/
addq_s_w.c
blob
3e08f5d482d46e63cfd5a380d510f3a8e4a0237c
1
#include
"io.h"
2
3
int
main
()
4
{
5
long long
rd
,
rs
,
rt
;
6
long long
result
;
7
8
rt
=
0x10017EFD
;
9
rs
=
0x11111111
;
10
result
=
0x2112900e
;
11
12
__asm
13
(
"addq_s.w %0, %1, %2
\n\t
"
14
:
"=r"
(
rd
)
15
:
"r"
(
rs
),
"r"
(
rt
)
16
);
17
if
(
rd
!=
result
) {
18
printf
(
"addq_s.w error
\n
"
);
19
}
20
21
rt
=
0x80017EFD
;
22
rs
=
0x81111111
;
23
result
=
0xffffffff80000000
;
24
25
__asm
26
(
"addq_s.w %0, %1, %2
\n\t
"
27
:
"=r"
(
rd
)
28
:
"r"
(
rs
),
"r"
(
rt
)
29
);
30
if
(
rd
!=
result
) {
31
printf
(
"addq_s.w error
\n
"
);
32
}
33
34
rt
=
0x7fffffff
;
35
rs
=
0x01111111
;
36
result
=
0x7fffffff
;
37
38
__asm
39
(
"addq_s.w %0, %1, %2
\n\t
"
40
:
"=r"
(
rd
)
41
:
"r"
(
rs
),
"r"
(
rt
)
42
);
43
if
(
rd
!=
result
) {
44
printf
(
"addq_s.w error
\n
"
);
45
}
46
47
return
0
;
48
}