3 ms·
And Golang uses a separate syntax from Intel syntax and AT&T syntax, so now there are three incompatible syntaxes in common use. What a mess. :( In Go's case i
by pcwalton 10y ago
And Golang uses a separate syntax from Intel syntax and AT&T syntax, so now there are three incompatible syntaxes in common use. What a mess. :(
In Go's case it's because they wanted to have the syntax reflect the MachineInstr-like abstraction they have in place. I wouldn't be surprised if something similar was responsible for the AT&T syntax as well.
(In case it isn't clear, my preference is to do what LLVM does and to treat MachineInstr and machine code as distinct objects, and to use the vendor syntax for the human readable representation of the latter.)
- flamedoge 10y agoThey should all have same binary encoding, which means they can all be decoded to any human readable format regardless...
- theparanoid 10y agoFor extra points the Go syntax has /no/ spec. To quote "The details vary with architecture, and we apologize for the imprecision; the situation is not well-defined." [0] [0] https://golang.org/doc/asm https://golang.org/doc/asm