~mcf/cproc

ref: 16c718729adfaf40cf22aa4efeafb0d92ef5ee3c cproc/test/while-condition.qbe -rw-r--r-- 354 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
22
export
function w $main() {
@start.1
	%.1 =l alloc8 8
@body.2
	%.2 =d swtof 1
	stored %.2, %.1
@while_cond.3
	%.3 =d loadd %.1
	%.4 =w cned %.3, d_0
	jnz %.4, @while_body.4, @while_join.5
@while_body.4
	%.5 =d loadd %.1
	%.6 =d swtof 2
	%.7 =d div %.5, %.6
	stored %.7, %.1
	jmp @while_cond.3
@while_join.5
	%.8 =d loadd %.1
	%.9 =w dtosi %.8
	ret %.9
}