~mcf/cproc

ref: 16c718729adfaf40cf22aa4efeafb0d92ef5ee3c cproc/test/for-loop.qbe -rw-r--r-- 307 bytes
16c71872Michael Forney Prepare for supporting architecture-specific va_list type 8 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export
function $f() {
@start.1
	%.1 =l alloc4 4
@body.2
	storew 0, %.1
@for_cond.3
	%.2 =w loadw %.1
	%.3 =w csltw %.2, 10
	jnz %.3, @for_body.4, @for_join.6
@for_body.4
	%.4 =w loadw %.1
	call $g(w %.4)
@for_cont.5
	%.5 =w loadw %.1
	%.6 =w add %.5, 1
	storew %.6, %.1
	jmp @for_cond.3
@for_join.6
	ret
}