From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by sourceware.org (Postfix) with ESMTPS id 655EA385DC21 for ; Thu, 18 Jan 2024 12:54:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 655EA385DC21 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 655EA385DC21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::232 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705582491; cv=none; b=hSEBZ5QkdEaR9KUrvxv226IB/0AmIi6/FFCk245ywCl2+5SLR7OD8hrmq7pfDsb1CcaOdQb/lB5+F0yNPTk9svHWTkcVOjxJ3gAx/M+lM/3CDn7tBeHB4flzPFQtph6DbiGTk/hG27QojqsStBtDjKjvx/PwQ8nwoelCu0Z86yw= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1705582491; c=relaxed/simple; bh=/MOvLjQbmhZqZULw+LhRLaABqFnhgVplaY3Cb57sSvM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=YmifEnOPBJIhoX9hhn4m6KLTI5Stgk3X3uDox2kEWzW18vRXHVWmYBssgL4HeYIYLCHkmDM9Mmo7ba0i5oiDL15Zn5wQSv/e1xZldIBFNvgc+A2ajHzsel85E4ar21u3XgmbirXWIWwSIwNnM0D32TtTD4D4iteHyMPAvKhlN+s= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2cdf69bb732so7450971fa.3 for ; Thu, 18 Jan 2024 04:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705582486; x=1706187286; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:cc:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Is6NQ/3f84er0xxVZcVD4Irx/jk6vCrlZ9AberyWOqY=; b=ASvadojj8DbFFvI5HDnxsbrcfRk9jfVw2vyyI4HyyRmDlPwomir3TH+opBJA5B+S3y bVyLMzDDDPcZWlUqaxGz5Ih7c8JpfDcvZiQ2zFknyZuL83B4JwOfz9geppM+SiO28RXV QcyEKqTQxw7r+CxeDP/q48oCfKxYTCuR0kXxodHE4o2+3ZAZwvbBTEKq6a1Jiv+Ruk40 vYp5Bac76POM4uErjyCrc6m4q3XYpcOsPthBtnOWVKXMwWU9egGEDPJxT+HnO5Ivm8BH VXBHwOvzEasjcnDRU5Xzmo9BgJN2hG2qWK6/INiOxJACgXRGXmj9E46ZN04R/2Wk6zYl g5oQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705582486; x=1706187286; h=content-transfer-encoding:in-reply-to:autocrypt:from:cc:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Is6NQ/3f84er0xxVZcVD4Irx/jk6vCrlZ9AberyWOqY=; b=Ba4eFMb/NM1DNVQOLiRh1OWXiXkgDPcH86YLeSkpQDwoI4UciWlp0qRkx7b5WpwRCo shgnaysswfS+Tt2PrSrC1Gh6jpG3m6avNGFlkFp13bIz1if4anbc71laJ6OrnbVzjbc6 a1xeznzURq37ODYetROa2QADdt0iO7IZOrLOZWgA3mNjuNyWjXu8qVLkPlR8Js793hl8 CHqY9PFAsyBunx3XjlWpBQ8l6U1Lix4rjlK8MOANZvm04ws9JWzM1Mj27lt1roCZPpVz wUK88pHtTWjG5VmyzSt5by+GupUCDArMmIDuHjfHYFrkq/xPCqFDThY7kvQ5uX3RENd+ APqA== X-Gm-Message-State: AOJu0YwDsN3yVkiHAqiVik9CACZEf8VrPZDhZ/p8DnNRgBaE1ZYyBfTD jWel1acjZnadNMFdnvKVKuHsL/ajtGcAhjkg+uZYo6jjyJrKjanGm+o4WjmTPw== X-Google-Smtp-Source: AGHT+IFrLtYATQOgSq/RZTw6snN58REeqqngItHjHOyrDYir7xagTeO6ViGsEtna8dM/JlSUn5vNzA== X-Received: by 2002:a05:651c:145:b0:2cc:eb98:3c35 with SMTP id c5-20020a05651c014500b002cceb983c35mr242151ljd.84.1705582485731; Thu, 18 Jan 2024 04:54:45 -0800 (PST) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id l5-20020a023905000000b0046e0388eb45sm984965jaa.94.2024.01.18.04.54.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jan 2024 04:54:45 -0800 (PST) Message-ID: <95e373fb-24f3-4b10-9ad1-948597ed9d67@suse.com> Date: Thu, 18 Jan 2024 13:54:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: RFC: Formalization of the Intel assembly syntax (PR53929) Content-Language: en-US To: LIU Hao References: Cc: binutils@sourceware.org, GCC Development From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSD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FAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3025.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 18.01.2024 06:34, LIU Hao wrote: > My complete proposal can be found at > . Some ideas actually > reflect the AT&T syntax. I hope it helps. I'm sorry, but most of your proposal may even be considered for being acceptable only if you would gain buy-off from the MASM guys. Anything MASM treats as valid ought to be permitted by gas as well (within the scope of certain divergence that cannot be changed in gas without risking to break people's code). It could probably be considered to introduce a "strict" mode of Intel syntax, following some / most of what you propose; making this the default cannot be an option. Commenting on individual aspects of your proposal is a little difficult, as you didn't provide the proposal inline (and hence it cannot be easily used as context in a reply). But to mention the imo worst aspect: Declaring mov eax, [rcx] as invalid is a no-go. I also don't see how this would be related to the issue at hand. What's in the square brackets may as well be a symbol name, so requiring the "mode specifier" doesn't disambiguate things at all. Otoh the "offset" part of point 3 may be possible to accept even by default, provided (didn't check) that current gas consistently rejects that (as an invalid use of a register name). One remark regarding the underlying pattern leading to the issue: Personally I view it as questionable practice to have extern or static variables in C code with names as short as register names are. Avoiding them does not only avoid the issue here, but also is quite likely going to improve the code (by having more descriptive variable names). And automatic variables aren't affected aiui, so can remain short (after all, commonly automatic variable names are as short as a single char). That said, I can certainly also see how the introduction of new registers can lead to new conflicts, which isn't nice. Iirc old 32-bit MASM escaped this problem by requiring architecture extensions to be explicitly enabled (may have changed in newer MASM). Gas, otoh, enables everything by default (and I don't see how we could change that). Jan