From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112705 invoked by alias); 22 Sep 2019 05:11:11 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 112696 invoked by uid 89); 22 Sep 2019 05:11:10 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=admit, fair, ul, HX-Languages-Length:1905 X-HELO: mx0a-001b2d01.pphosted.com Subject: Re: [PATCH v2 1/6] [powerpc] fenv_private.h clean up To: Paul E Murphy , libc-alpha@sourceware.org Cc: tuliom@ascii.art.br References: <1568918810-20393-1-git-send-email-pc@us.ibm.com> <1568918810-20393-2-git-send-email-pc@us.ibm.com> <009aa58a-f899-486c-7ea8-64a608ca91d5@linux.ibm.com> From: Paul Clarke Message-ID: <7961f154-8cbd-c90e-b6e4-6274a3b1e02c@us.ibm.com> Date: Sun, 22 Sep 2019 05:11:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <009aa58a-f899-486c-7ea8-64a608ca91d5@linux.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-SW-Source: 2019-09/txt/msg00341.txt.bz2 On 9/20/19 10:36 AM, Paul E Murphy wrote: > On 9/19/19 1:46 PM, Paul A. Clarke wrote: >> -static __always_inline void >> -libc_feholdexcept_ppc (fenv_t *envp) >> -{ >> -  __libc_feholdbits_ppc (envp, _FPU_MASK_NOT_RN_NI, 0LL); >> -} >> - >> -static __always_inline void >> -libc_feholdexcept_setround_ppc (fenv_t *envp, int r) >> -{ >> -  __libc_feholdbits_ppc (envp, _FPU_MASK_NOT_RN_NI & _FPU_MASK_RN, r); >> -} >> - >> -static __always_inline void >> -libc_fesetround_ppc (int r) >> -{ >> -  __fesetround_inline (r); >> -} >> - >> -static __always_inline int >> -libc_fetestexcept_ppc (int e) >> -{ >> -  fenv_union_t u; >> -  u.fenv = fegetenv_register (); >> -  return u.l & e; >> -} >> - >> -static __always_inline void >> -libc_feholdsetround_ppc (fenv_t *e, int r) >> -{ >> -  __libc_feholdbits_ppc (e, _FPU_MASK_TRAPS_RN, r); >> -} > > Are these unused? I still see the macro redirections calling out to them after applying this patch. Fair question. I'll admit I'm not an expert, especially in the corner cases, but here's what I see: >> -libc_feholdexcept_ppc This shows up in the ieee754 version of s_nearbyint{f}.c, but that is not used in favor of sysdeps/powerpc/fpu/s_nearbyint{f}.c which does not use it. >> -libc_feholdexcept_setround_ppc This is still used, but my patch doesn't remove it, in spite of how it looks above. As noted in the Changelog, I moved the code from __libc_feholdbits_ppc into libc_feholdexcept_setround_ppc, which makes the patch look like it was removed. >> -libc_fesetround_ppc >> -libc_fetestexcept_ppc These show up in the ieee754 version of s_fma.c, but there is a powerpc version which uses different code (__builtin_fma) instead. >> -libc_feholdsetround_ppc This _appears_ to be referenced in some uses of SET_RESTORE_ROUND_GENERIC, but actually gets mapped to libc_feholdsetround_ppc_ctx. PC