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

--- Comment #11 from jbeulich at suse dot com ---
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
configure mechanism would then need to detect the assemblers capability of
understanding this, and quote symbol names accordingly (perhaps universally
rather than special-casing any particular names).

While this isn't MASM-compatible (MASM treats "ecx" in such a case as an
immediate), I view this as less of a problem than using e.g. Arm's model of
enclosing a register name in parentheses to designate it as a symbol name:

    mov eax, (ecx)

MASM treats this the same as with no parentheses present, and I consider this
form to be more likely to be used in code ported from MASM than double quoted
literals used as immediate constants. (Regardless of the choice in the end it
may turn out necessary to hide the new behavior behind a new command line
option and/or directive extension.)

Reply via email to