3 comments

[ 5.7 ms ] story [ 22.1 ms ] thread
I'm confused, go is supported by gcc but does something very different to gcc's inline asm (ie gas) Which can do both intel and att syntax? Why? Yet another assembly language syntax seems insane at this point. Has go got an abi so you can just compile object files with your assmbler of choice then link?

Am I missing the point?

Go uses the Plan 9 syntax because its compilers are derived from the Plan 9 compilers.
Go's assembler is built in. It is easy to drop a .s file in and `go build` just assembles it and links it without you doing anything.

The weird syntax makes more sense when you compare different processors. It is kind of standardized so you can switch between them easily. That choice makes the syntax please no-one I expect but it does make maintaining multiple platforms easier.