~mcf/cproc

ref: 16c718729adfaf40cf22aa4efeafb0d92ef5ee3c cproc/test/uint64-to-float.qbe -rw-r--r-- 348 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
export
function s $f() {
@start.1
@body.2
	%.1 =l call $g()
	%.2 =w csltl %.1, 0
	jnz %.2, @utof_big.5, @utof_small.4
@utof_small.4
	%.3 =s sltof %.1
	jmp @utof_join.3
@utof_big.5
	%.4 =l and %.1, 1
	%.5 =l shr %.1, 1
	%.6 =l or %.5, %.4
	%.7 =s sltof %.6
	%.8 =s add %.7, %.7
@utof_join.3
	%.9 =s phi @utof_small.4 %.3, @utof_big.5 %.8
	ret %.9
}