From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79735 invoked by alias); 2 Feb 2018 20:55:39 -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 79726 invoked by uid 89); 2 Feb 2018 20:55:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=risk X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Feb 2018 20:55:36 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id BF40E822B3; Fri, 2 Feb 2018 21:55:34 +0100 (CET) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d4DD6fIrTDtq; Fri, 2 Feb 2018 21:55:34 +0100 (CET) Received: from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net [88.161.99.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 941E481C40; Fri, 2 Feb 2018 21:55:34 +0100 (CET) From: Eric Botcazou To: "H.J. Lu" Cc: GCC Patches , Uros Bizjak Subject: Re: [PATCH] Use ptr_mode to save/restore pointers in builtin jmpbuf Date: Fri, 02 Feb 2018 20:55:00 -0000 Message-ID: <8206435.hoiVHVAjsD@polaris> In-Reply-To: References: <20180201001627.GA21117@gmail.com> <3874588.EQjNKs4VoA@polaris> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2018-02/txt/msg00131.txt.bz2 > But, that is not what the builtin setjmp/longjmp tests have. Yes, but I don't think that we want to risk breaking a working compiler on some targets because peculiar tests don't pass on another. I think that init_eh is OK for x32 so SJLJ exceptions work and the issue is only with the undocumented builtin setjmp/longjmp. What happens on Aarch64 -milp32 for example? Would it be OK to save/restore only 32-bit values? And MIPS n32? Maybe we can define another builtin, e.g. __builtin_setjmp_size, and let the compiler compute the size based on the same formula as init_eh or somesuch: char buf[__builtin_setjmp_size ()]; Btw, the "array of pointers" thing is an interpolation, here's an excerpt of start_dynamic_handler in GCC 2.8.x: /* Emit RTL to start a dynamic handler on the EH runtime dynamic handler stack. This should only be used by expand_eh_region_start or expand_eh_region_start_tree. */ static void start_dynamic_handler () { rtx dhc, dcc; rtx x, arg, buf; int size; #ifndef DONT_USE_BUILTIN_SETJMP /* The number of Pmode words for the setjmp buffer, when using the builtin setjmp/longjmp, see expand_builtin, case BUILT_IN_LONGJMP. */ size = 5; #else so the tests are incorrect, not the implementation. -- Eric Botcazou