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
/
shilo.c
blob
ce8ebc69c2ac1dc6357bdce24379c09a4f18976a
1
#include<stdio.h>
2
#include<assert.h>
3
4
int
main
()
5
{
6
int
ach
,
acl
;
7
int
resulth
,
resultl
;
8
9
ach
=
0xBBAACCFF
;
10
acl
=
0x1C3B001D
;
11
12
resulth
=
0x17755
;
13
resultl
=
0x99fe3876
;
14
15
__asm
16
(
"mthi %0, $ac1
\n\t
"
17
"mtlo %1, $ac1
\n\t
"
18
"shilo $ac1, 0x0F
\n\t
"
19
"mfhi %0, $ac1
\n\t
"
20
"mflo %1, $ac1
\n\t
"
21
:
"+r"
(
ach
),
"+r"
(
acl
)
22
);
23
assert
(
ach
==
resulth
);
24
assert
(
acl
==
resultl
);
25
26
27
ach
=
0x1
;
28
acl
=
0x80000000
;
29
30
resulth
=
0x3
;
31
resultl
=
0x0
;
32
33
__asm
34
(
"mthi %0, $ac1
\n\t
"
35
"mtlo %1, $ac1
\n\t
"
36
"shilo $ac1, -1
\n\t
"
37
"mfhi %0, $ac1
\n\t
"
38
"mflo %1, $ac1
\n\t
"
39
:
"+r"
(
ach
),
"+r"
(
acl
)
40
);
41
assert
(
ach
==
resulth
);
42
assert
(
acl
==
resultl
);
43
44
return
0
;
45
}