~mcf/cproc

ref: 34ae0d48e9669687003c26f94e07fa00d12dd41f cproc/test/varargs+riscv64.qbe -rw-r--r-- 347 bytes
34ae0d48Michael Forney Add tests for char/wchar_t signedness 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 $f(w %.1, ...) {
@start.1
	%.2 =l alloc4 4
	storew %.1, %.2
	%.3 =l alloc8 8
@body.2
	vastart %.3
@while_cond.3
	%.4 =w loadw %.2
	jnz %.4, @while_body.4, @while_join.5
@while_body.4
	%.5 =w vaarg %.3
	%.6 =s vaarg %.3
	%.7 =l vaarg %.3
	%.8 =w loadw %.2
	%.9 =w sub %.8, 1
	storew %.9, %.2
	jmp @while_cond.3
@while_join.5
	ret
}