4 ms·
It disambiguates labels from registers, assuming of course you allow labels to have register names. eg this is valid: mov rax,%rax
by rwmj 4y ago
It disambiguates labels from registers, assuming of course you allow labels to have register names. eg this is valid:
mov rax,%rax
rax: .ascii "hello\0"
Stupid perhaps, but valid.
- jck 4y agoI wonder if it would have been more ergonomic to have the labels be % prefixed instead of registers.
- int_19h 4y agoThe above-linked article specifically points out that registers are referenced much more often than labels.
- userbinator 4y agoProbably an artifact of the original use of the assembler being to process compiler output, and causing variable names to appear. One of the x86 assemblers I remember trying out in the late 80s had a slight variant of Intel syntax in that everything that wasn't a reserved word/mnemonic was automatically assumed to be a label.
- professoretc 4y agoYep, the "nice" thing about AT&T is that, from a parsing perspective, you don't really need to know much about the target architecture to be able to determine what's an instruction vs. a register vs. a label, etc.