The tools all emit AT&T/amd syntax by default and you can use -M intel to get the intel format.
The confusing thing is that they don’t use the ‘register prefixes’, so it looks like intel but it is backwards. Oh well. > On Dec 14, 2018, at 3:41 PM, robert engels <reng...@ix.netcom.com> wrote: > > In the go assembly docs, for example: > > 64-bit Intel 386 (a.k.a. amd64) > > The two architectures behave largely the same at the assembler level. > Assembly code to access the m and gpointers on the 64-bit version is the same > as on the 32-bit 386, except it uses MOVQ rather than MOVL: > > get_tls(CX) > MOVQ g(CX), AX // Move g into AX. > MOVQ g_m(AX), BX // Move g.m into BX. > but the operands are backwards according to MOVQ on Intel, it should be > dst,src > > SO, I’m thinking “intermediate code”, so different syntax. Fine, but then > when I use objdump or otool, the assembly still looks backwards, but matches > the above. > > Is this because LLVM is also “backwards” ? > It there anyway to get objdump or otool to output intel assembly that matches > their documentation ? > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com > <mailto:golang-nuts+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.