12 ms·
Why don't people use AT&T syntax for ARM?
by mishurov 9y ago
Why don't people use AT&T syntax for ARM?
- theresistor 9y agoAT&T syntax is a uniquely X86 thing.
- FubarCoder 9y agoIntel syntax is an x86 thing.
- mishurov 9y agoI was very surprised when I'd discovered that the assembly in the Linux kernel sources for x86 was written in the AT&T syntax and the assembly for ARM was not. I always thought that the AT&T syntax was supposed to be independent from an architecture.
- SepUltra 9y ago"Architecture independent assembly language". Just say that out loud and set it sink in for a moment. Anyways, glad that there's no AT&T abomination for ARM, too.
- Houshalter 9y agoAnd web assembly is written in some kind of weird lisp inspired s expression format.
- SepUltra 9y agoWebAssembly is really WebBytecode. https://en.wikipedia.org/wiki/WebAssembly https://en.wikipedia.org/wiki/WebAssembly
- Annatar 9y agoNo it isn't, as AT&T syntax is used on SPARC and Motorola 68000, for example. It has nothing whatsoever to do with any processor in particular.
- danellis 9y agoWhat do you mean by "AT&T syntax"? Neither 68000 nor SPARC use it, because it's an x86 thing. Do you really mean "operand order"? There's more to an assembly language syntax than just the order of the operands.
- Annatar 9y agoAT&T syntax is mainly about operand order, but there are assembler directives and constructs specific to AT&T as found in as(1) on any traditional UNIX, including illumos based ones. That every assembler has his own syntax is nothing new, compare and contrast Master SEKA with ASM-One on Amiga, or MASM, TASM or nasm, for example. AT&T as(1) syntax has nothing to do with x86. Any code written for SVR4 as(1) will be using AT&T syntax, irrespective of processor architecture. ISA used with AT&T as(1) will still be that of the processor, of course, but instead of things like a0 or d0, it'll be %a0 and %d0, for example.