From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id E3E603858D35 for ; Wed, 15 Feb 2023 16:12:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E3E603858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=foss.arm.com Authentication-Results: sourceware.org; spf=none smtp.mailfrom=foss.arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 12C0C1042; Wed, 15 Feb 2023 08:12:49 -0800 (PST) Received: from [10.57.52.9] (unknown [10.57.52.9]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D76AF3F881; Wed, 15 Feb 2023 08:12:05 -0800 (PST) Message-ID: Date: Wed, 15 Feb 2023 16:12:04 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH] libc: arm: setjmp jmp_buf exagerated size Content-Language: en-GB To: Bernhard Krug , newlib@sourceware.org References: From: Richard Earnshaw In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3489.6 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 15/02/2023 11:09, Bernhard Krug wrote: > Patch sets correct jmp_buf size for armv6-m conforming to implementation in setjmp.S > > FYI a table of cortex architectures: > __ARM_ARCH_6M__ cortex-m0/m0+/m1 no fpu option > __ARM_ARCH_7M__ cortex-m3 no fpu option > __ARM_ARCH_7EM__ cortex-m4 optional fpu > check using __ARM_FP I don't think it's as simple as this. The ABI supports three variants, two of which are call compatible. hard-float (where you must have hardware FP) soft (where you haven't got any hardware FP) softfp (where you have hardware FP but need to inter-operate with code that doesnt). soft and softfp are call compatible and so any jump-bufs created need to support saving and restoring the FP context. I guess a configure-time option to disable support for softfp might be an option, but the default needs to ensure things are compatible. R.