cproc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/cproc
Log | Files | Refs | Submodules | README | LICENSE

bitfield-assignment-sign-extend.qbe (379B)


      1 export
      2 function w $main() {
      3 @start.1
      4 @body.2
      5 	%.1 =l copy $s
      6 	%.2 =l mul 0, 1
      7 	%.3 =l add %.1, %.2
      8 	%.4 =l copy %.3
      9 	%.5 =w shl 15, 0
     10 	%.6 =w shl %.5, 28
     11 	%.7 =w sar %.6, 28
     12 	%.8 =w and %.5, 15
     13 	%.9 =w loaduw %.4
     14 	%.10 =w and %.9, 18446744073709551600
     15 	%.11 =w or %.8, %.10
     16 	storew %.11, %.4
     17 	%.12 =w sub 0, 1
     18 	%.13 =w cnew %.7, %.12
     19 	ret %.13
     20 }
     21 export data $s = align 4 { z 4 }