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 392F03858D35 for ; Thu, 30 Jul 2020 22:40:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 392F03858D35 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 06UMeaT6026233; Thu, 30 Jul 2020 17:40:36 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 06UMeZC9026232; Thu, 30 Jul 2020 17:40:35 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 30 Jul 2020 17:40:35 -0500 From: Segher Boessenkool To: David Edelsohn Cc: HAO CHEN GUI , GCC Patches , Bill Schmidt Subject: Re: [PATCH, rs6000] Add non-relative jump table support for 64bit rs6000 Message-ID: <20200730224035.GA6753@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=-9.0 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, 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: Thu, 30 Jul 2020 22:40:38 -0000 Hi! On Thu, Jul 30, 2020 at 04:35:57AM -0400, David Edelsohn wrote: > The purpose should not be to exclude AIX. If there is no fundamental > limitation with use of the new tablejump design on AIX then the patch > is not acceptable without AIX support. The patch should work on all subtargets. It will be controlled by an (undocumented?) command line option, for easy experimentation, and to make it easy to (temporarily) disable it for some subtarget. This change will probably cause some problems on different OSes and with different binary file formats, so it is useful to be able to control the default separately for each, to keep things working while we figure things out. (It is not just AIX and Darwin, but also 32-bit Linux, the several BSDs (which are different), bare-metal ports, the embedded OSes, etc.) But the goal is for this to work everywhere, yes. We could default it to non-relative, to see what breaks ;-) > The patch should use DOUBLE_INT_ASM_OP, not explicit ".quad". AIX > always is PIC. It's not obvious to me why the patch should limit > support to PPC64 Linux. It's the only thing that was tested so far (I'm not sure if BE was tested even there?) > The section selection seems Linux/ELF > specific, but the rest seems like a general design optimization for > all PowerPC-based operating systems. Yup, needs some work. This patch should be split into the core piece, which creates the flag and adds infrastructure etc., and patches for the subtarget-specific pieces. It is likely that different subtargets will want to choose different sections for the jump tables? But the basic things can work everywhere, in principle. Segher