aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/alpha')
-rw-r--r--sysdeps/alpha/fpu/fclrexcpt.c20
-rw-r--r--sysdeps/alpha/fpu/fegetenv.c19
-rw-r--r--sysdeps/alpha/fpu/fesetenv.c24
-rw-r--r--sysdeps/alpha/fpu/feupdateenv.c20
-rw-r--r--sysdeps/alpha/fpu/fgetexcptflg.c14
-rw-r--r--sysdeps/alpha/fpu/fraiseexcpt.c47
-rw-r--r--sysdeps/alpha/fpu/fsetexcptflg.c18
7 files changed, 98 insertions, 64 deletions
diff --git a/sysdeps/alpha/fpu/fclrexcpt.c b/sysdeps/alpha/fpu/fclrexcpt.c
index 7aa79af100..2e76995f4e 100644
--- a/sysdeps/alpha/fpu/fclrexcpt.c
+++ b/sysdeps/alpha/fpu/fclrexcpt.c
@@ -1,5 +1,5 @@
/* Clear given exceptions in current floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,17 +20,23 @@
#include <fenv.h>
-void
-feclearexcept (int excepts)
+int
+__feclearexcept (int excepts)
{
- unsigned long swcr;
+ unsigned long int swcr;
/* Get the current state. */
- swcr = __ieee_get_fp_control();
+ swcr = __ieee_get_fp_control ();
/* Clear the relevant bits. */
- swcr &= ~((unsigned long)excepts & FE_ALL_EXCEPT);
+ swcr &= ~((unsigned long int) excepts & FE_ALL_EXCEPT);
/* Put the new state in effect. */
- __ieee_set_fp_control(swcr);
+ __ieee_set_fp_control (swcr);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feclearexcept, __old_feclearexcept)
+symbol_version (__old_feclearexcept, feclearexcept, GLIBC_2.1);
+default_symbol_version (__feclearexcept, feclearexcept, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fegetenv.c b/sysdeps/alpha/fpu/fegetenv.c
index c8b705d230..63dc7ffaaf 100644
--- a/sysdeps/alpha/fpu/fegetenv.c
+++ b/sysdeps/alpha/fpu/fegetenv.c
@@ -1,5 +1,5 @@
/* Store current floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -20,18 +20,25 @@
#include <fenv.h>
-void
-fegetenv (fenv_t *envp)
+int
+__fegetenv (fenv_t *envp)
{
- unsigned long fpcr, swcr;
+ unsigned long int fpcr;
+ unsigned long int swcr;
/* Get status from software and hardware. Note that we don't need an
excb because the callsys is an implied trap barrier. */
- swcr = __ieee_get_fp_control();
- __asm__ __volatile__("mf_fpcr %0" : "=f"(fpcr));
+ swcr = __ieee_get_fp_control ();
+ __asm__ __volatile__ ("mf_fpcr %0" : "=f" (fpcr));
/* Merge the two bits of information. The magic number at the end is
the exception enable mask. */
*envp = (fpcr & (3UL << 58)) | (swcr & (FE_ALL_EXCEPT | 0x3e));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetenv, __old_fegetenv)
+symbol_version (__old_fegetenv, fegetenv, GLIBC_2.1);
+default_symbol_version (__fegetenv, fegetenv, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fesetenv.c b/sysdeps/alpha/fpu/fesetenv.c
index 3692967a5b..9a38778b0c 100644
--- a/sysdeps/alpha/fpu/fesetenv.c
+++ b/sysdeps/alpha/fpu/fesetenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997
@@ -20,26 +20,32 @@
#include <fenv.h>
-void
-fesetenv (const fenv_t *envp)
+int
+__fesetenv (const fenv_t *envp)
{
- unsigned long fpcr;
+ unsigned long int fpcr;
fenv_t env;
/* Magic encoding of default values: high bit set (never possible for a
user-space address) is not indirect. And we don't even have to get
rid of it since we mask things around just below. */
- if ((long)envp >= 0)
+ if ((long int) envp >= 0)
env = *envp;
else
- env = (unsigned long)envp;
+ env = (unsigned long int) envp;
/* Reset the rounding mode with the hardware fpcr. Note that the following
system call is an implied trap barrier for our modification. */
- __asm__ __volatile__("excb; mf_fpcr %0" : "=f"(fpcr));
+ __asm__ __volatile__ ("excb; mf_fpcr %0" : "=f" (fpcr));
fpcr = (fpcr & ~(3UL << 58)) | (env & (3UL << 58));
- __asm__ __volatile__("mt_fpcr %0" : : "f"(fpcr));
+ __asm__ __volatile__ ("mt_fpcr %0" : : "f" (fpcr));
/* Reset the exception status and mask with the kernel's FP code. */
- __ieee_set_fp_control(env & (FE_ALL_EXCEPT | 0x3e));
+ __ieee_set_fp_control (env & (FE_ALL_EXCEPT | 0x3e));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetenv, __old_fesetenv)
+symbol_version (__old_fesetenv, fesetenv, GLIBC_2.1);
+default_symbol_version (__fesetenv, fesetenv, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/feupdateenv.c b/sysdeps/alpha/fpu/feupdateenv.c
index 816575a134..bd6a979aa7 100644
--- a/sysdeps/alpha/fpu/feupdateenv.c
+++ b/sysdeps/alpha/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,19 +20,25 @@
#include <fenv.h>
-void
-feupdateenv (const fenv_t *envp)
+int
+__feupdateenv (const fenv_t *envp)
{
- unsigned long tmp;
+ unsigned long int tmp;
/* Get the current exception state. */
- tmp = __ieee_get_fp_control();
+ tmp = __ieee_get_fp_control ();
/* Install new environment. */
- fesetenv(envp);
+ fesetenv (envp);
/* Raise the saved exception. Incidently for us the implementation
defined format of the values in objects of type fexcept_t is the
same as the ones specified using the FE_* constants. */
- feraiseexcept((int)tmp & FE_ALL_EXCEPT);
+ feraiseexcept ((int) tmp & FE_ALL_EXCEPT);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feupdateenv, __old_feupdateenv)
+symbol_version (__old_feupdateenv, feupdateenv, GLIBC_2.1);
+default_symbol_version (__feupdateenv, feupdateenv, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fgetexcptflg.c b/sysdeps/alpha/fpu/fgetexcptflg.c
index 28d9e129b1..2811d02cd1 100644
--- a/sysdeps/alpha/fpu/fgetexcptflg.c
+++ b/sysdeps/alpha/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,14 +20,20 @@
#include <fenv.h>
-void
-fegetexceptflag (fexcept_t *flagp, int excepts)
+int
+__fegetexceptflag (fexcept_t *flagp, int excepts)
{
- unsigned long tmp;
+ unsigned long int tmp;
/* Get the current state. */
tmp = __ieee_get_fp_control();
/* Return that portion that corresponds to the requested exceptions. */
*flagp = tmp & excepts & FE_ALL_EXCEPT;
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fegetexceptflag, __old_fegetexceptflag)
+symbol_version (__old_fegetexceptflag, fegetexceptflag, GLIBC_2.1);
+default_symbol_version (__fegetexceptflag, fegetexceptflag, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fraiseexcpt.c b/sysdeps/alpha/fpu/fraiseexcpt.c
index 9b61ddb843..bcbc06b400 100644
--- a/sysdeps/alpha/fpu/fraiseexcpt.c
+++ b/sysdeps/alpha/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -22,9 +22,10 @@
#include <math.h>
void
-feraiseexcept (int excepts)
+__feraiseexcept (int excepts)
{
- double tmp, dummy;
+ double tmp;
+ double dummy;
/* Raise exceptions represented by EXPECTS. But we must raise only
one signal at a time. It is important the if the overflow/underflow
@@ -36,38 +37,34 @@ feraiseexcept (int excepts)
/* First: invalid exception. */
if (FE_INVALID & excepts)
- {
- /* One example of a invalid operation is 0 * Infinity. */
- __asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
- : "=&f"(tmp) : "f"(HUGE_VAL));
- }
+ /* One example of a invalid operation is 0 * Infinity. */
+ __asm__ __volatile__("mult/sui $f31,%1,%0; trapb"
+ : "=&f" (tmp) : "f" (HUGE_VAL));
/* Next: division by zero. */
if (FE_DIVBYZERO & excepts)
- {
- __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
- : "=&f"(tmp), "=f"(dummy));
- }
+ __asm__ __volatile__("cmpteq $f31,$f31,%1; divt/sui %1,$f31,%0; trapb"
+ : "=&f" (tmp), "=f" (dummy));
/* Next: overflow. */
if (FE_OVERFLOW & excepts)
- {
- __asm__ __volatile__("mult/sui %1,%1,%0; trapb"
- : "=&f"(tmp) : "f"(DBL_MAX));
- }
+ __asm__ __volatile__("mult/sui %1,%1,%0; trapb"
+ : "=&f" (tmp) : "f" (DBL_MAX));
/* Next: underflow. */
if (FE_UNDERFLOW & excepts)
- {
- __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=&f"(tmp) : "f"(DBL_MIN),
- "f"((double) (1UL << 60)));
- }
+ __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
+ : "=&f" (tmp) : "f" (DBL_MIN),
+ "f" ((double) (1UL << 60)));
/* Last: inexact. */
if (FE_INEXACT & excepts)
- {
- __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
- : "=&f"(tmp) : "f"(1.0), "f"(M_PI));
- }
+ __asm__ __volatile__("divt/sui %1,%2,%0; trapb"
+ : "=&f" (tmp) : "f" (1.0), "f" (M_PI));
+
+ /* Success. */
+ return 0;
}
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+symbol_version (__old_feraiseexcept, feraiseexcept, GLIBC_2.1);
+default_symbol_version (__feraiseexcept, feraiseexcept, GLIBC_2.1.3);
diff --git a/sysdeps/alpha/fpu/fsetexcptflg.c b/sysdeps/alpha/fpu/fsetexcptflg.c
index 5764a6ec7b..eeb987ede2 100644
--- a/sysdeps/alpha/fpu/fsetexcptflg.c
+++ b/sysdeps/alpha/fpu/fsetexcptflg.c
@@ -1,5 +1,5 @@
/* Set floating-point environment exception handling.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@tamu.edu>, 1997.
@@ -20,17 +20,23 @@
#include <fenv.h>
-void
-fesetexceptflag (const fexcept_t *flagp, int excepts)
+int
+__fesetexceptflag (const fexcept_t *flagp, int excepts)
{
- unsigned long tmp;
+ unsigned long int tmp;
/* Get the current exception state. */
- tmp = __ieee_get_fp_control();
+ tmp = __ieee_get_fp_control ();
/* Set all the bits that were called for. */
tmp = (tmp & ~FE_ALL_EXCEPT) | (*flagp & excepts & FE_ALL_EXCEPT);
/* And store it back. */
- __ieee_set_fp_control(tmp);
+ __ieee_set_fp_control (tmp);
+
+ /* Success. */
+ return 0;
}
+strong_alias (__fesetexceptflag, __old_fesetexceptflag)
+symbol_version (__old_fesetexceptflag, fesetexceptflag, GLIBC_2.1);
+default_symbol_version (__fesetexceptflag, fesetexceptflag, GLIBC_2.1.3);