]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/powerpc/fpu/fraiseexcpt.c
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / powerpc / fpu / fraiseexcpt.c
index 88d18447685f9176619794768e5991eefe81da02..3da7d70ed409c3cb20fc4013c4446dd547c21408 100644 (file)
@@ -1,5 +1,5 @@
 /* Raise given exceptions.
-   Copyright (C) 1997-2013 Free Software Foundation, Inc.
+   Copyright (C) 1997-2024 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
 
    You should have received a copy of the GNU Lesser General Public
    License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
+   <https://www.gnu.org/licenses/>.  */
 
 #include <fenv_libc.h>
-#include <bp-sym.h>
 
-#undef feraiseexcept
 int
 __feraiseexcept (int excepts)
 {
@@ -34,11 +32,11 @@ __feraiseexcept (int excepts)
   u.fenv = fegetenv_register ();
 
   /* Add the exceptions */
-  u.l[1] = (u.l[1]
-           | (excepts & FPSCR_STICKY_BITS)
-           /* Turn FE_INVALID into FE_INVALID_SOFTWARE.  */
-           | (excepts >> ((31 - FPSCR_VX) - (31 - FPSCR_VXSOFT))
-              & FE_INVALID_SOFTWARE));
+  u.l = (u.l
+        | (excepts & FPSCR_STICKY_BITS)
+        /* Turn FE_INVALID into FE_INVALID_SOFTWARE.  */
+        | (excepts >> ((31 - FPSCR_VX) - (31 - FPSCR_VXSOFT))
+           & FE_INVALID_SOFTWARE));
 
   /* Store the new status word (along with the rest of the environment),
      triggering any appropriate exceptions.  */
@@ -50,7 +48,7 @@ __feraiseexcept (int excepts)
         don't have FE_INVALID_SOFTWARE implemented.  Detect this
         case and raise FE_INVALID_SNAN instead.  */
       u.fenv = fegetenv_register ();
-      if ((u.l[1] & FE_INVALID) == 0)
+      if ((u.l & FE_INVALID) == 0)
        set_fpscr_bit (FPSCR_VXSNAN);
     }
 
@@ -61,8 +59,9 @@ __feraiseexcept (int excepts)
 #include <shlib-compat.h>
 #if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
 strong_alias (__feraiseexcept, __old_feraiseexcept)
-compat_symbol (libm, BP_SYM (__old_feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_1);
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
 #endif
 
+libm_hidden_def (__feraiseexcept)
 libm_hidden_ver (__feraiseexcept, feraiseexcept)
-versioned_symbol (libm, BP_SYM (__feraiseexcept), BP_SYM (feraiseexcept), GLIBC_2_2);
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);