From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17008 invoked from network); 20 Nov 2020 18:02:02 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 Nov 2020 18:02:02 -0000 Received: (qmail 13980 invoked by uid 550); 20 Nov 2020 18:01:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 13962 invoked from network); 20 Nov 2020 18:01:56 -0000 Date: Fri, 20 Nov 2020 19:01:44 +0100 From: Szabolcs Nagy To: Jinliang Li Cc: musl@lists.openwall.com Message-ID: <20201120180144.GN1370092@port70.net> Mail-Followup-To: Jinliang Li , musl@lists.openwall.com References: <20201120104503.65390-1-jinliang.li@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201120104503.65390-1-jinliang.li@linux.alibaba.com> Subject: Re: [musl] [PATCH] Fix build error for vabs.f64 and vsqrt.f64 * Jinliang Li [2020-11-20 18:45:03 +0800]: > To fix the build error "Error: selected fpu does not support instruction vabs.f64 or vsqrt.f64", > when single precision fpu, e.g. -mfpu=fpv5-sp-d16 is selected. > > Check if double precision fpu is supported for vabs.f64 and vsqrt.f64. yes i think this patch should work: both vfp and softfp call abi should work with single prec fpu. the fp register state and load/store instructions should be compatible between double prec and single prec only fpu so setjmp/longjmp/fenv asm should work too. so it is enough to fix up math asm to support single prec only fpu. > --- > src/math/arm/fabs.c | 2 +- > src/math/arm/sqrt.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/math/arm/fabs.c b/src/math/arm/fabs.c > index f890520a..6e1d367d 100644 > --- a/src/math/arm/fabs.c > +++ b/src/math/arm/fabs.c > @@ -1,6 +1,6 @@ > #include > > -#if __ARM_PCS_VFP > +#if __ARM_PCS_VFP && __ARM_FP&8 > > double fabs(double x) > { > diff --git a/src/math/arm/sqrt.c b/src/math/arm/sqrt.c > index 874af960..567e2e91 100644 > --- a/src/math/arm/sqrt.c > +++ b/src/math/arm/sqrt.c > @@ -1,6 +1,6 @@ > #include > > -#if __ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__) > +#if (__ARM_PCS_VFP || (__VFP_FP__ && !__SOFTFP__)) && (__ARM_FP&8) > > double sqrt(double x) > { > -- > 2.28.0