~mcf/cproc

ref: 34ae0d48e9669687003c26f94e07fa00d12dd41f cproc/test/struct-flexible-array.qbe -rw-r--r-- 277 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
export data $x = align 4 { w 4, }
export
function w $f(l %.1) {
@start.1
	%.2 =l alloc8 8
	storel %.1, %.2
@body.2
	%.3 =l loadl %.2
	%.4 =l mul 4, 1
	%.5 =l add %.3, %.4
	%.6 =l extsw 2
	%.7 =l mul %.6, 2
	%.8 =l add %.5, %.7
	%.9 =w loadsh %.8
	%.10 =w extsh %.9
	ret %.10
}