From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34082 invoked by alias); 5 Nov 2015 10:22:09 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 34071 invoked by uid 89); 5 Nov 2015 10:22:08 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=AWL,BAYES_05,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 05 Nov 2015 10:22:07 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 967D0935F4; Thu, 5 Nov 2015 10:22:06 +0000 (UTC) Received: from localhost.localdomain (vpn1-7-84.ams2.redhat.com [10.36.7.84]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA5AM5ZU003993; Thu, 5 Nov 2015 05:22:05 -0500 Subject: Re: [PATCH/RFC/RFA] Machine modes for address printing (all targets) To: Julian Brown , gcc-patches@gcc.gnu.org References: <20151104125418.5b15143a@octopus> From: Bernd Schmidt Message-ID: <563B2DCC.1000108@redhat.com> Date: Thu, 05 Nov 2015 10:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151104125418.5b15143a@octopus> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00434.txt.bz2 On 11/04/2015 01:54 PM, Julian Brown wrote: > That's not all targets by any means, but may be enough to warrant a > change in the interface. I propose that: > > * The output_address function should have a machine_mode argument > added. Bare addresses (e.g. the 'a' case in final.c) should pass > "VOIDmode" for this argument. > > * Other callers of output_address -- actually all in backends -- can > pass the machine mode for the memory access in question. > > * The TARGET_PRINT_OPERAND_ADDRESS hook shall also have a machine_mode > argument added. The legacy PRINT_OPERAND_ADDRESS hook can be left > alone. (The documentation for the operand-printing hooks needs fixing > too, incidentally.) I think this approach seems fine. > static void > -mcore_print_operand_address (FILE * stream, rtx x) > +mcore_print_operand_address (FILE * stream, machine_mode mode ATTRIBUTE_UNUSED, > + rtx x) So apparently we're settling on writing the unused arg as just "machine_mode" without a name. Please change everywhere. > @@ -1754,7 +1754,7 @@ mmix_print_operand_punct_valid_p (unsign > /* TARGET_PRINT_OPERAND_ADDRESS. */ > > static void > -mmix_print_operand_address (FILE *stream, rtx x) > +mmix_print_operand_address (FILE *stream, machine_mode mode, rtx x) > { > if (REG_P (x)) > { The arg appears to be unused - I'd expect to see a warning here. Other thank that it looks OK. I'm not going to require that you test every target, but it would be good to have the full set built to cc1 before and after, and please be on the lookout for fallout. Bernd