aboutsummaryrefslogtreecommitdiff
path: root/test/varargs.qbe
blob: cb3542a6b1e8da73ea8e1ad605bf97d058e16deb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export
function $f(w %.1, ...) {
@start.1
	%.2 =l alloc4 4
	storew %.1, %.2
	%.3 =l alloc8 32
@body.2
	vastart %.3
@while_cond.3
	%.4 =w loadsw %.2
	%.5 =w cnew %.4, 0
	jnz %.5, @while_body.4, @while_join.5
@while_body.4
	%.6 =w vaarg %.3
	%.7 =s vaarg %.3
	%.8 =l vaarg %.3
	%.9 =w loadsw %.2
	%.10 =w sub %.9, 1
	storew %.10, %.2
	jmp @while_cond.3
@while_join.5
	ret
}