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
/
bposge64.c
blob
36161ad852daee9f335abd8cfd7c4f8c4f0b5b0b
1
#include
"io.h"
2
3
int
main
(
void
)
4
{
5
long long
dsp
,
sum
;
6
long long
result
;
7
8
dsp
=
0x40
;
9
sum
=
0x01
;
10
result
=
0x02
;
11
12
__asm
13
(
"wrdsp %1
\n\t
"
14
"bposge64 test1
\n\t
"
15
"nop
\n\t
"
16
"addi %0, 0xA2
\n\t
"
17
"nop
\n\t
"
18
"test1:
\n\t
"
19
"addi %0, 0x01
\n\t
"
20
:
"+r"
(
sum
)
21
:
"r"
(
dsp
)
22
);
23
if
(
sum
!=
result
) {
24
printf
(
"bposge64 wrong
\n
"
);
25
26
return
-
1
;
27
}
28
29
dsp
=
0x10
;
30
sum
=
0x01
;
31
result
=
0xA4
;
32
33
__asm
34
(
"wrdsp %1
\n\t
"
35
"bposge64 test2
\n\t
"
36
"nop
\n\t
"
37
"addi %0, 0xA2
\n\t
"
38
"nop
\n\t
"
39
"test2:
\n\t
"
40
"addi %0, 0x01
\n\t
"
41
:
"+r"
(
sum
)
42
:
"r"
(
dsp
)
43
);
44
if
(
sum
!=
result
) {
45
printf
(
"bposge64 wrong
\n
"
);
46
47
return
-
1
;
48
}
49
return
0
;
50
}