repo.or.cz
/
qemu
/
kevin.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
s390x/misc_helper.c: wrap IO instructions in BQL
[qemu/kevin.git]
/
tests
/
tcg
/
lm32
/
helper.S
blob
3351d41e84255c23d0f84c28064b89988a109d42
1
.text
2
.global _start, _write, _exit
3
.global _tc_fail, _tc_pass
4
5
_write:
6
addi sp, sp, -4
7
sw (sp+4), r8
8
mvi r8, 5
9
scall
10
lw r8, (sp+4)
11
addi sp, sp, 4
12
ret
13
14
_exit:
15
mvi r8, 1
16
scall
17
1:
18
bi 1b
19
20
_tc_pass:
21
.data
22
1:
23
.ascii "OK\n"
24
2:
25
.text
26
addi sp, sp, -16
27
sw (sp+4), ra
28
sw (sp+8), r1
29
sw (sp+12), r2
30
sw (sp+16), r3
31
mvi r1, 1
32
mvhi r2, hi(1b)
33
ori r2, r2, lo(1b)
34
mvi r3, (2b - 1b)
35
calli _write
36
lw r3, (sp+16)
37
lw r2, (sp+12)
38
lw r1, (sp+8)
39
lw ra, (sp+4)
40
addi sp, sp, 16
41
ret
42
43
_tc_fail:
44
.data
45
1:
46
.ascii "FAILED\n"
47
2:
48
.text
49
addi sp, sp, -16
50
sw (sp+4), ra
51
sw (sp+8), r1
52
sw (sp+12), r2
53
sw (sp+16), r3
54
sw (sp+4), ra
55
mvi r1, 1
56
mvhi r2, hi(1b)
57
ori r2, r2, lo(1b)
58
mvi r3, (2b - 1b)
59
calli _write
60
lw r3, (sp+16)
61
lw r2, (sp+12)
62
lw r1, (sp+8)
63
lw ra, (sp+4)
64
addi sp, sp, 16
65
ret