aboutsummaryrefslogtreecommitdiff
path: root/test/bitfield-assignment-sign-extend.qbe
blob: c2af6b82eb6e100b1c5a89a862c03cabe135ede6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
export
function w $main() {
@start.1
@body.2
	%.1 =l copy $s
	%.2 =l mul 0, 1
	%.3 =l add %.1, %.2
	%.4 =l copy %.3
	%.5 =w shl 15, 0
	%.6 =w shl %.5, 28
	%.7 =w sar %.6, 28
	%.8 =w and %.5, 15
	%.9 =w loadw %.4
	%.10 =w and %.9, 18446744073709551600
	%.11 =w or %.8, %.10
	storew %.11, %.4
	%.12 =w sub 0, 1
	%.13 =w cnew %.7, %.12
	ret %.13
}
export data $s = align 4 { z 4 }