3 ms·
Your sense of which is intuitive, isn't universal. When we say Move this over there, it's left-to-right. > why the higher-level syntax has never made its way t
by MaxBarraclough 7y ago
Your sense of which is intuitive, isn't universal. When we say Move this over there, it's left-to-right.
> why the higher-level syntax has never made its way to lower level ASM has baffled me.
It has. In the AT&T x86 assembly syntax, MOV is left-to-right. (In the Intel syntax, though, it's right-to-left.)
https://en.wikipedia.org/w/index.php?title=X86_assembly_language&oldid=943655045#Syntax https://en.wikipedia.org/w/index.php?title=X86_assembly_lang...
- oso2k 7y agoI like to say that AT&T follows natural English flow and byte order of the finally assembled binary code. Intel followed the more mathematically oriented syntax. Might be a bit back duck syndrome since I learned math and Intel first, but Intel seemed more intuitive to me as well. AT&T ASM | English | Binary MOVE src, dst | src -> dst | 01 src dst ADD src, dst | src + dst -> dst | 02 src dst or src + dst = dst Compared to Intel ASM | English | Binary MOV dst, src | dst <- src | 01 dst src ADD dst, src | dst <- dst + src | 02 dst src or dst = dst + src dst += src <- could be read as `loaded from` -> could be read as `stored to` Notice the RISC-y-ness of that. However, ISAs developed later and are primarily MIPS-like follow Intel convention and extend it because it aligns better with 3AC [0] SSA[1] based optimizations. [0] https://en.wikipedia.org/wiki/Three-address_code https://en.wikipedia.org/wiki/Three-address_code [1] https://en.wikipedia.org/wiki/Static_single_assignment_form https://en.wikipedia.org/wiki/Static_single_assignment_form