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
/
mips64-dsp
/
dextrv_w.c
blob
973765c1c0acdfdb73ef78d6fcadd2d3966839a7
1
#include
"io.h"
2
3
int
main
(
void
)
4
{
5
long long
rt
,
rs
;
6
long long
achi
,
acli
;
7
long long
res
;
8
9
achi
=
0x87654321
;
10
acli
=
0x12345678
;
11
rs
=
0x8
;
12
13
res
=
0x123456
;
14
15
__asm
16
(
"mthi %1, $ac1
\n\t
"
17
"mtlo %2, $ac1
\n\t
"
18
"dextrv.w %0, $ac1, %3
\n\t
"
19
:
"=r"
(
rt
)
20
:
"r"
(
achi
),
"r"
(
acli
),
"r"
(
rs
)
21
);
22
if
(
rt
!=
res
) {
23
printf
(
"dextrv.w error
\n
"
);
24
return
-
1
;
25
}
26
27
achi
=
0x87654321
;
28
acli
=
0x12345678
;
29
rs
=
0x0
;
30
31
res
=
0x12345678
;
32
33
__asm
34
(
"mthi %1, $ac1
\n\t
"
35
"mtlo %2, $ac1
\n\t
"
36
"dextrv.w %0, $ac1, %3
\n\t
"
37
:
"=r"
(
rt
)
38
:
"r"
(
achi
),
"r"
(
acli
),
"r"
(
rs
)
39
);
40
if
(
rt
!=
res
) {
41
printf
(
"dextrv.w error
\n
"
);
42
return
-
1
;
43
}
44
45
return
0
;
46
}