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