Easy to read Golang assembly output?

  1. You can redirect the output to a file like this:

     go tool compile -S file.go > file.s
    
  2. You can disable the optimization with -N:

     go tool compile -S -N file.go
    

Alternatively, you can use gccgo:

gccgo -S -O0 -masm=intel test.go

which will generate test.s. You can play with the -O0/1/2/3 to see the different optimizations.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)