From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id A46793858009 for ; Tue, 24 Nov 2020 01:13:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A46793858009 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 0AO1C2D0008322; Mon, 23 Nov 2020 19:12:03 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 0AO1C17b008317; Mon, 23 Nov 2020 19:12:01 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 23 Nov 2020 19:12:01 -0600 From: Segher Boessenkool To: "Maciej W. Rozycki" Cc: gcc-patches@gcc.gnu.org, Anders Magnusson Subject: Re: [PATCH 02/31] VAX: Remove `c' operand format specifier overload Message-ID: <20201124011201.GS2672@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2020 01:13:04 -0000 On Fri, Nov 20, 2020 at 03:34:16AM +0000, Maciej W. Rozycki wrote: > The `c' operand format specifier is handled directly by the middle end > in `output_asm_insn': > > %cN means require operand N to be a constant > and print the constant expression with no punctuation. > > however it resorts to the target for constants that are not valid > addresses: > > else if (letter == 'c') > { > if (CONSTANT_ADDRESS_P (operands[opnum])) > output_addr_const (asm_out_file, operands[opnum]); > else > output_operand (operands[opnum], 'c'); > } > > The VAX backend expects the fallback never to happen and overloads `c' > with the branch condition code. This is confusing however There are 16 targets in trunk that overload the 'c' output modifier. Most do it for something with condition codes (or comparisons). This is a well-established convention, confusing or not :-) (I have nothing against the patch of course.) Segher