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