From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39555 invoked by alias); 20 Jan 2020 13:15:44 -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 39307 invoked by uid 89); 20 Jan 2020 13:15:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,KAM_MANYTO,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 spammy=factors X-HELO: gate.crashing.org Received: from gate.crashing.org (HELO gate.crashing.org) (63.228.1.57) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Jan 2020 13:14:57 +0000 Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 00KDErmr028274; Mon, 20 Jan 2020 07:14:53 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 00KDEq0i028272; Mon, 20 Jan 2020 07:14:52 -0600 Date: Mon, 20 Jan 2020 13:20:00 -0000 From: Segher Boessenkool To: "Kewen.Lin" , GCC Patches , Bill Schmidt , "bin.cheng" , Richard Guenther , richard.sandiford@arm.com Subject: Re: [PATCH 2/4 GCC11] Add target hook stride_dform_valid_p Message-ID: <20200120131451.GX3191@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-IsSubscribed: yes X-SW-Source: 2020-01/txt/msg01215.txt.bz2 Hi! On Mon, Jan 20, 2020 at 10:42:12AM +0000, Richard Sandiford wrote: > "Kewen.Lin" writes: > > gcc/ChangeLog > > > > 2020-01-16 Kewen Lin > > > > * config/rs6000/rs6000.c (TARGET_STRIDE_DFORM_VALID_P): New macro. > > (rs6000_stride_dform_valid_p): New function. > > * doc/tm.texi: Regenerate. > > * doc/tm.texi.in (TARGET_STRIDE_DFORM_VALID_P): New hook. > > * target.def (stride_dform_valid_p): New hook. > > It looks like we should able to derive this information from the normal > legitimate_address_p hook. Yes, probably. > Also, "D-form" vs. "X-form" is AFAIK a PowerPC-specific classification. > It would be good to use a more generic term in target-independent code. Yeah. X-form is [reg+reg] addressing; D-form is [reg+imm] addressing. We can do simple [reg] addressing in either form as well. Whether D-form can be used for some access depends on many factors (ISA version, mode of the datum, alignment, and how big the offset is of course). But the usual legitimate_address_p hook should do fine. The ivopts code already has an addr_offset_valid_p function, maybe that could be adjusted for this? Segher