From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A00C5385780F; Thu, 10 Jun 2021 07:25:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A00C5385780F From: "jbeulich at suse dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53929] [meta-bug] -masm=intel with global symbol Date: Thu, 10 Jun 2021 07:25:03 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.6.3 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: jbeulich at suse dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2021 07:25:03 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53929 --- 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 cha= nge 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 th= is form to be more likely to be used in code ported from MASM than double quot= ed 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.)=