qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

echo.ssa (574B)


      1 export
      2 function w $main(w %argc, l %argv) {
      3 @start
      4 	%fmt =l alloc8 8
      5 	storel 1663398693, %fmt             # "%s%c"
      6 	%av0 =l add %argv, 8
      7 	%ac0 =w sub %argc, 1
      8 @loop
      9 	%av =l phi @start %av0, @loop2 %av1
     10 	%ac =w phi @start %ac0, @loop2 %ac1
     11 	%c0 =w ceqw %ac, 0
     12 	jnz %c0, @end, @loop1
     13 @loop1
     14 	%c1 =w ceqw %ac, 1
     15 	jnz %c1, @last, @nolast
     16 @last
     17 	jmp @loop2
     18 @nolast
     19 	jmp @loop2
     20 @loop2
     21 	%sep =w phi @last 10, @nolast 32
     22 	%arg =l loadl %av
     23 	%r =w call $printf(l %fmt, ..., l %arg, w %sep)
     24 	%av1 =l add %av, 8
     25 	%ac1 =w sub %ac, 1
     26 	jmp @loop
     27 @end
     28 	ret 0
     29 }
     30 
     31 # >>> output
     32 # a b c
     33 # <<<