3 ms·
AT&T syntax is best syntax. Linux, GCC, LLVM, etc. all use it. Scott Wolchok writes it in a style that's more verbose than it needs to be. It's probably a good
by jart 6y ago
AT&T syntax is best syntax. Linux, GCC, LLVM, etc. all use it. Scott Wolchok writes it in a style that's more verbose than it needs to be. It's probably a good call since this is an educational blog post. Like there's some nuance to when you need things like q on statements `movq %rdi,8(%rsp)`. For example, this is fine: `mov %rdi,8(%rsp)` but you need it if you move an immediate to memory, e.g. `movq $123,8(%rsp)`. I like to avoid them because mnemonics like `orb` don't appear to the untrained eye as the `or` instruction! The GNU-style suffixes can also appear multiple times within an instruction name in various combinations, e.g. pclmullqlqdq vs. pclmulhqhqdq.
- swolchok 6y ago> Scott Wolchok writes it I didn’t write it, I just copied the compiler output from Godbolt so that the article could be read on mobile, where Godbolt’s UI doesn’t work so well and switching tabs back and forth is difficult.