https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53929

--- Comment #19 from LIU Hao <lh_mouse at 126 dot com> ---
(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. 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.


[1] https://maskray.me/blog/2023-05-08-assemblers

Reply via email to