aboutsummaryrefslogtreecommitdiff
path: root/test/func-noreturn.qbe
blob: d1771dc0dffe727ac502d38ecdc5cbf71c8705da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
data $.Lc.2 = align 4 { z 4 }
data $.Lstring.3 = align 1 { b "loop\000", }
export
function $f() {
@start.1
@body.2
@while_cond.3
	%.1 =w loadw $.Lc.2
	jnz %.1, @while_body.4, @while_join.5
@while_body.4
	%.2 =w call $puts(l $.Lstring.3)
	jmp @while_cond.3
@while_join.5
	hlt
}
export
function w $main() {
@start.6
@body.7
	call $exit(w 0)
	hlt
@dead.8
	call $f()
	hlt
@dead.9
	call $f()
	hlt
}