https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53929
--- Comment #20 from jbeulich at suse dot com ---
(In reply to LIU Hao from comment #19)
> (In reply to jbeulich from comment #11)
> > I have a rough plan on the gas side, but that will then need a gcc side
> > change as well: For a couple of years we have had quoted symbol names there.
> > While this doesn't currently work right in a number of cases (including the
> > one needed here) the plan is to make e.g.
> >
> > mov eax, "ecx"
> >
> > not be treated the same as
> >
> > mov eax, ecx
> >
> > but considering "ecx" a symbol name due to the quotation. Obviously gcc's
>
> I don't like double quotes here, because it looks something different, like
> in C.
This is assembly; I don't see how (dis)similarity with C would matter. I also
don't see how your example is any different in this regard from
mov eax, "symbol"
which gas has been supporting for quite some time.
> Would it make some sense if we take the approach for MIPS and AArch64
> [1], so
>
> mov eax, %ecx
>
> or
>
> mov eax, :ecx
>
> denotes `ecx` is the name of a label, and otherwise a register. Also, such a
> prefix should be optional, so people who write assembly can omit it if they
> carefully avoid such names.
I can't find any indication of such syntax being supported by gas for either of
these architectures. % on MIPS and : on Arm64 actually are involved in
relocation specifiers instead. Are you suggesting to overload them?
(Note that % is out of game here, for being the register prefix on x86.)