public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 3/3] alpha: Purge __ASSUME_IEEE_RAISE_EXCEPTION
  2012-08-08 14:56 [PATCH 0/3] alpha: post kernel version bump cleanup Richard Henderson
@ 2012-08-08 14:56 ` Richard Henderson
  2012-08-08 14:56 ` [PATCH 2/3] alpha: Tidy up ieee_get/set_fp_control syscalls Richard Henderson
  2012-08-08 14:56 ` [PATCH 1/3] alpha: Purge __ASSUME_STAT64_SYSCALL Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2012-08-08 14:56 UTC (permalink / raw)
  To: libc-ports

---
 ports/ChangeLog.alpha                              |    5 +
 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S  |   56 ++++++++++++
 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c  |   91 --------------------
 .../unix/sysv/linux/alpha/kernel-features.h        |    3 -
 4 files changed, 61 insertions(+), 94 deletions(-)
 create mode 100644 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
 delete mode 100644 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 719fc6a..45061b2 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,5 +1,10 @@
 2012-08-08  Richard Henderson  <rth@redhat.com>
 
+	* sysdeps/unix/sysv/linux/alpha/kernel-features.h
+	(__ASSUME_IEEE_RAISE_EXCEPTION): Remove.
+	* sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S: New file.
+	* sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: Remove.
+
 	* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use dwarf2
 	cfi markup for unwind.  Adjust stack early so that the normal
 	syscall error path can be used.
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S b/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
new file mode 100644
index 0000000..6e770ad
--- /dev/null
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
@@ -0,0 +1,56 @@
+/* Copyright (C) 2004-2012 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
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   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/>.  */
+
+#include <sysdep.h>
+#include "kernel_sysinfo.h"
+
+
+	.text
+
+ENTRY(__feraiseexcept)
+	cfi_startproc
+	PSEUDO_PROLOGUE
+
+	lda	sp, -16(sp)
+	cfi_adjust_cfa_offset(16)
+
+	ldi	v0, __NR_osf_setsysinfo
+	stq	a0, 0(sp)
+	mov	sp, a1
+	ldi	a0, SSI_IEEE_RAISE_EXCEPTION
+	call_pal PAL_callsys
+
+	lda	sp, 16(sp)
+	cfi_adjust_cfa_offset(-16)
+
+	/* Here in libm we can't use SYSCALL_ERROR_LABEL.  Nor is it clear
+	   that we'd want to set errno anyway.  All we're required to do is
+	   return non-zero on error.  Which is exactly A3.  */
+	mov	a3, v0
+	ret
+
+END(__feraiseexcept)
+	cfi_endproc
+
+#include <shlib-compat.h>
+#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
+strong_alias (__feraiseexcept, __old_feraiseexcept)
+compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
+#endif
+
+libm_hidden_ver (__feraiseexcept, feraiseexcept)
+versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c b/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
deleted file mode 100644
index a01b2cf..0000000
--- a/ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* Copyright (C) 2004,2006 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
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   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/>.  */
-
-#include <fenv_libc.h>
-#include <sysdep.h>
-#include <float.h>
-#include <kernel-features.h>
-#include "kernel_sysinfo.h"
-
-
-int
-__feraiseexcept (int excepts)
-{
-  INTERNAL_SYSCALL_DECL (err);
-  unsigned long t = excepts;
-  long r;
-
-  r = INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_RAISE_EXCEPTION, &t);
-
-#ifndef __ASSUME_IEEE_RAISE_EXCEPTION
-  if (!INTERNAL_SYSCALL_ERROR_P (r, err))
-    return 0;
-
-  double d;
-
-  /* If we got an error from SSI_IEEE_RAISE_EXCEPTION, assume it means that
-     the system call isn't actually implemented.  Do the best we can.  */
-
-  /* Invalid implemented with 0 / 0 -> NaN.  */
-  if (excepts & FE_INVALID)
-    __asm__ __volatile__ ("divs/su $f31,$f31,%0; trapb" : "=f"(d) : );
-
-  /* Division By Zero implemented with 1 / 0 -> NaN.  */
-  if (excepts & FE_DIVBYZERO)
-    __asm__ __volatile__ ("divs/su %1,$f31,%0; trapb" : "=&f"(d) : "f"(1.0f));
-
-  /* Overflow and underflow cannot be had all by themselves.  We can
-     generate them with arithmetic, but we always get INEXACT raised
-     at the same time.  Prepare to undo.  */
-  if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW)) && !(excepts & FE_INEXACT))
-    INTERNAL_SYSCALL (osf_getsysinfo, err, 2, GSI_IEEE_FP_CONTROL, &t);
-
-  /* Overflow implemented with FLT_MAX + FLT_MAX -> Inf.  */
-  if (excepts & FE_OVERFLOW)
-    __asm__ __volatile__ ("adds/sui %1,%1,%0; trapb"
-			  : "=&f"(d) : "f"(FLT_MAX));
-
-  /* Underflow implemented with FLT_MIN * FLT_MIN -> 0.  */
-  if (excepts & FE_UNDERFLOW)
-    __asm__ __volatile__ ("muls/sui %1,%1,%0; trapb"
-			  : "=&f"(d) : "f"(FLT_MIN));
-
-  /* Inexact implemented with (long)0.5 -> 0.  */
-  if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW | FE_INEXACT)) == FE_INEXACT)
-    __asm__ __volatile__ ("cvttq/svi %1,%0; trapb" : "=&f"(d) : "f"(0.5f));
-
-  /* If we raised inexact when not asked, and inexact was not previously
-     raised, then clear that exception.  */
-  if ((excepts & (FE_OVERFLOW | FE_UNDERFLOW))
-      && !((excepts | t) & FE_INEXACT))
-    {
-      t |= excepts & SWCR_STATUS_MASK;
-      INTERNAL_SYSCALL (osf_setsysinfo, err, 2, SSI_IEEE_FP_CONTROL, &t);
-    }
-#endif /* !__ASSUME_IEEE_RAISE_EXCEPTION */
-
-  return 0;
-}
-
-#include <shlib-compat.h>
-#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
-strong_alias (__feraiseexcept, __old_feraiseexcept)
-compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1);
-#endif
-
-libm_hidden_ver (__feraiseexcept, feraiseexcept)
-versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2);
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index 53c282d..a4e8de9 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -25,9 +25,6 @@
 
 #define __ASSUME_UTIMES	1
 
-/* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists.  */
-#define __ASSUME_IEEE_RAISE_EXCEPTION	1
-
 /* Support for the O_CLOEXEC flag was added for alpha in 2.6.23.  */
 #if __LINUX_KERNEL_VERSION >= 0x020617
 # define __ASSUME_O_CLOEXEC    1
-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 0/3] alpha: post kernel version bump cleanup
@ 2012-08-08 14:56 Richard Henderson
  2012-08-08 14:56 ` [PATCH 3/3] alpha: Purge __ASSUME_IEEE_RAISE_EXCEPTION Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Richard Henderson @ 2012-08-08 14:56 UTC (permalink / raw)
  To: libc-ports

Since these defines are now 1, and not used outside alpha control,
make the logical simplifications.


r~


Richard Henderson (3):
  alpha: Purge __ASSUME_STAT64_SYSCALL
  alpha: Tidy up ieee_get/set_fp_control syscalls
  alpha: Purge __ASSUME_IEEE_RAISE_EXCEPTION

 ports/ChangeLog.alpha                              |   22 +++++
 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S  |   56 ++++++++++++
 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c  |   91 --------------------
 ports/sysdeps/unix/sysv/linux/alpha/fxstat.c       |   19 +----
 ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c     |   37 +-------
 .../unix/sysv/linux/alpha/ieee_get_fp_control.S    |   38 +++-----
 .../unix/sysv/linux/alpha/ieee_set_fp_control.S    |   38 +++------
 .../unix/sysv/linux/alpha/kernel-features.h        |    6 --
 ports/sysdeps/unix/sysv/linux/alpha/lxstat.c       |   19 +----
 ports/sysdeps/unix/sysv/linux/alpha/xstat.c        |   19 +----
 ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c    |    9 +--
 ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h    |    7 +--
 12 files changed, 114 insertions(+), 247 deletions(-)
 create mode 100644 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.S
 delete mode 100644 ports/sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/3] alpha: Tidy up ieee_get/set_fp_control syscalls
  2012-08-08 14:56 [PATCH 0/3] alpha: post kernel version bump cleanup Richard Henderson
  2012-08-08 14:56 ` [PATCH 3/3] alpha: Purge __ASSUME_IEEE_RAISE_EXCEPTION Richard Henderson
@ 2012-08-08 14:56 ` Richard Henderson
  2012-08-08 14:56 ` [PATCH 1/3] alpha: Purge __ASSUME_STAT64_SYSCALL Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2012-08-08 14:56 UTC (permalink / raw)
  To: libc-ports

---
 ports/ChangeLog.alpha                              |    5 +++
 .../unix/sysv/linux/alpha/ieee_get_fp_control.S    |   38 +++++++------------
 .../unix/sysv/linux/alpha/ieee_set_fp_control.S    |   38 ++++++-------------
 3 files changed, 31 insertions(+), 50 deletions(-)

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 282900a..719fc6a 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,5 +1,10 @@
 2012-08-08  Richard Henderson  <rth@redhat.com>
 
+	* sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use dwarf2
+	cfi markup for unwind.  Adjust stack early so that the normal
+	syscall error path can be used.
+	* sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
+
 	* sysdeps/unix/sysv/linux/alpha/kernel-features.h
 	(__ASSUME_STAT64_SYSCALL): Remove.
 	* sysdeps/unix/sysv/linux/alpha/fxstat.c: Remove test
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S b/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
index ec24297..74ad499 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
 
@@ -22,39 +22,29 @@
 
 	.text
 
-LEAF(__ieee_get_fp_control, 16)
-#ifdef PROF
-	ldgp	gp, 0(pv)
-	lda	sp, -16(sp)
-	.set noat
-	lda	AT, _mcount
-	jsr	AT, (AT), _mcount
-	.set at
-	.prologue 1
-#elif defined PIC
-	lda	sp, -16(sp)
-	.prologue 0
-#else
-	ldgp	gp, 0(pv)
+ENTRY(__ieee_get_fp_control)
+	cfi_startproc
+	PSEUDO_PROLOGUE
+
 	lda	sp, -16(sp)
-	.prologue 1
-#endif
+	cfi_adjust_cfa_offset(16)
 
 	mov	sp, a1
 	ldi	a0, GSI_IEEE_FP_CONTROL
 	ldi	v0, __NR_osf_getsysinfo
 	call_pal PAL_callsys
-	bne	a3, $error
 
-	ldq	v0, 0(sp)
+	ldq	t0, 0(sp)
 	lda	sp, 16(sp)
-	ret
+	cfi_adjust_cfa_offset(-16)
 
-$error:
-	lda	sp, 16(sp)
-	SYSCALL_ERROR_HANDLER
+	bne	a3, SYSCALL_ERROR_LABEL
+
+	mov	t0, v0
+	ret
 
-	END(__ieee_get_fp_control)
+PSEUDO_END(__ieee_get_fp_control)
+	cfi_endproc
 
 libc_hidden_def(__ieee_get_fp_control)
 weak_alias (__ieee_get_fp_control, ieee_get_fp_control)
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S b/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
index 1d42524..f022b42 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
+++ b/ports/sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 2003, 2004
-   Free Software Foundation, Inc.
+/* Copyright (C) 1993-2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger <davidm@azstarnet.com>, 1995.
 
@@ -21,40 +20,27 @@
 #include "kernel_sysinfo.h"
 
 
-LEAF(__ieee_set_fp_control, 16)
-#ifdef PROF
-	ldgp	gp, 0(pv)
-	lda	sp, -16(sp)
-	.set noat
-	lda	AT, _mcount
-	jsr	AT, (AT), _mcount
-	.set at
-	.prologue 1
-#elif defined PIC
-	lda	sp, -16(sp)
-	.prologue 0
-#else
-	ldgp	gp, 0(pv)
+ENTRY(__ieee_set_fp_control)
+	cfi_startproc
+	PSEUDO_PROLOGUE
+
 	lda	sp, -16(sp)
-	.prologue 1
-#endif
+	cfi_adjust_cfa_offset(16)
 
+	ldi	v0, __NR_osf_setsysinfo
 	stq	a0, 0(sp)
 	mov	sp, a1
 	ldi	a0, SSI_IEEE_FP_CONTROL
-	ldi	v0, __NR_osf_setsysinfo
 	call_pal PAL_callsys
 
-	bne	a3, $error
-
 	lda	sp, 16(sp)
-	ret
+	cfi_adjust_cfa_offset(-16)
 
-$error:
-	lda	sp, 16(sp)
-	SYSCALL_ERROR_HANDLER
+	bne	a3, SYSCALL_ERROR_LABEL
+	ret
 
-	END(__ieee_set_fp_control)
+PSEUDO_END(__ieee_set_fp_control)
+	cfi_endproc
 
 libc_hidden_def(__ieee_set_fp_control)
 weak_alias (__ieee_set_fp_control, ieee_set_fp_control)
-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] alpha: Purge __ASSUME_STAT64_SYSCALL
  2012-08-08 14:56 [PATCH 0/3] alpha: post kernel version bump cleanup Richard Henderson
  2012-08-08 14:56 ` [PATCH 3/3] alpha: Purge __ASSUME_IEEE_RAISE_EXCEPTION Richard Henderson
  2012-08-08 14:56 ` [PATCH 2/3] alpha: Tidy up ieee_get/set_fp_control syscalls Richard Henderson
@ 2012-08-08 14:56 ` Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2012-08-08 14:56 UTC (permalink / raw)
  To: libc-ports

---
 ports/ChangeLog.alpha                              |   12 ++++++
 ports/sysdeps/unix/sysv/linux/alpha/fxstat.c       |   19 +---------
 ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c     |   37 +++-----------------
 .../unix/sysv/linux/alpha/kernel-features.h        |    3 --
 ports/sysdeps/unix/sysv/linux/alpha/lxstat.c       |   19 +---------
 ports/sysdeps/unix/sysv/linux/alpha/xstat.c        |   19 +---------
 ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c    |    9 +----
 ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h    |    7 +---
 8 files changed, 22 insertions(+), 103 deletions(-)

diff --git a/ports/ChangeLog.alpha b/ports/ChangeLog.alpha
index 3b94d7e..282900a 100644
--- a/ports/ChangeLog.alpha
+++ b/ports/ChangeLog.alpha
@@ -1,3 +1,15 @@
+2012-08-08  Richard Henderson  <rth@redhat.com>
+
+	* sysdeps/unix/sysv/linux/alpha/kernel-features.h
+	(__ASSUME_STAT64_SYSCALL): Remove.
+	* sysdeps/unix/sysv/linux/alpha/fxstat.c: Remove test
+	for __ASSUME_STAT64_SYSCALL.
+	* sysdeps/unsx/sysv/linux/alpha/fxstatat.c: Likewise.
+	* sysdeps/unsx/sysv/linux/alpha/lxstat.c: Likewise.
+	* sysdeps/unsx/sysv/linux/alpha/xstat.c: Likewise.
+	* sysdeps/unsx/sysv/linux/alpha/xstatconv.c: Likewise.
+	* sysdeps/unsx/sysv/linux/alpha/xstatconv.h: Likewise.
+
 2012-08-07  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/unix/sysv/linux/alpha/kernel-features.h
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c
index e53b2da..5648142 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstat.c
@@ -1,5 +1,5 @@
 /* fxstat using old-style Unix stat system call.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 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
@@ -37,7 +37,6 @@ __fxstat (int vers, int fd, struct stat *buf)
   int result;
   struct kernel_stat kbuf;
 
-#if __ASSUME_STAT64_SYSCALL > 0
   if (vers == _STAT_VER_KERNEL64)
     {
       result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
@@ -46,22 +45,6 @@ __fxstat (int vers, int fd, struct stat *buf)
       __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
       return -1;
     }
-#elif defined __NR_fstat64
-  if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
-    {
-      int errno_out;
-      result = INTERNAL_SYSCALL (fstat64, err, 2, fd, buf);
-      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-	return result;
-      errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-      if (errno_out != ENOSYS)
-	{
-	  __set_errno (errno_out);
-	  return -1;
-	}
-      __libc_missing_axp_stat64 = 1;
-    }
-#endif
 
   result = INTERNAL_SYSCALL (fstat, err, 2, fd, &kbuf);
   if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
index 417f9d3..bd20f86 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/fxstatat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2012 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
@@ -32,9 +32,6 @@
 #ifdef __ASSUME_ATFCTS
 # define __have_atfcts 1
 #endif
-#ifdef __ASSUME_STAT64_SYSCALL
-# define __libc_missing_axp_stat64 0
-#endif
 
 /* Get information about the file NAME in BUF.  */
 int
@@ -99,38 +96,14 @@ __fxstatat (int vers, int fd, const char *file, struct stat *st, int flag)
       file = buf;
     }
 
-#ifdef __NR_stat64
-  if (!__libc_missing_axp_stat64)
-    {
-      if (flag & AT_SYMLINK_NOFOLLOW)
-	result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
-      else
-	result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
-
-      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-	return result;
-      errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-# if __ASSUME_STAT64_SYSCALL == 0
-      if (errno_out == ENOSYS)
-	__libc_missing_axp_stat64 = 1;
-      else
-# endif
-	goto fail;
-    }
-#endif /* __NR_stat64 */
-
-  struct kernel_stat kst;
-
   if (flag & AT_SYMLINK_NOFOLLOW)
-    result = INTERNAL_SYSCALL (lstat, err, 2, file, &kst);
+    result = INTERNAL_SYSCALL (lstat64, err, 2, file, st);
   else
-    result = INTERNAL_SYSCALL (stat, err, 2, file, &kst);
-
+    result = INTERNAL_SYSCALL (stat64, err, 2, file, st);
   if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-    return __xstat_conv (vers, &kst, st);
-  errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
+    return result;
 
- fail:
+  errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
   __atfct_seterrno (errno_out, fd, buf);
 
   return -1;
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index 6f330b5..53c282d 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -23,9 +23,6 @@
 /* The tgkill syscall was introduced for alpha 2.6.0-test1.  */
 #define __ASSUME_TGKILL	1
 
-/* Starting with version 2.6.4, the stat64 syscalls are available.  */
-#define __ASSUME_STAT64_SYSCALL   1
-
 #define __ASSUME_UTIMES	1
 
 /* Starting with version 2.6.9, SSI_IEEE_RAISE_EXCEPTION exists.  */
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c b/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c
index b0f1e81..4401e6a 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/lxstat.c
@@ -1,5 +1,5 @@
 /* lxstat using old-style Unix stat system call.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 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
@@ -37,7 +37,6 @@ __lxstat (int vers, const char *name, struct stat *buf)
   int result;
   struct kernel_stat kbuf;
 
-#if __ASSUME_STAT64_SYSCALL > 0
   if (vers == _STAT_VER_KERNEL64)
     {
       result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
@@ -46,22 +45,6 @@ __lxstat (int vers, const char *name, struct stat *buf)
       __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
       return -1;
     }
-#elif defined __NR_lstat64
-  if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
-    {
-      int errno_out;
-      result = INTERNAL_SYSCALL (lstat64, err, 2, name, buf);
-      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-	return result;
-      errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-      if (errno_out != ENOSYS)
-	{
-	  __set_errno (errno_out);
-	  return -1;
-	}
-      __libc_missing_axp_stat64 = 1;
-    }
-#endif
 
   result = INTERNAL_SYSCALL (lstat, err, 2, name, &kbuf);
   if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstat.c b/ports/sysdeps/unix/sysv/linux/alpha/xstat.c
index a25431c..fe11e52 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/xstat.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/xstat.c
@@ -1,5 +1,5 @@
 /* xstat using old-style Unix stat system call.
-   Copyright (C) 2004 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 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
@@ -37,7 +37,6 @@ __xstat (int vers, const char *name, struct stat *buf)
   int result;
   struct kernel_stat kbuf;
 
-#if __ASSUME_STAT64_SYSCALL > 0
   if (vers == _STAT_VER_KERNEL64)
     {
       result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
@@ -46,22 +45,6 @@ __xstat (int vers, const char *name, struct stat *buf)
       __set_errno (INTERNAL_SYSCALL_ERRNO (result, err));
       return -1;
     }
-#elif defined __NR_stat64
-  if (vers == _STAT_VER_KERNEL64 && !__libc_missing_axp_stat64)
-    {
-      int errno_out;
-      result = INTERNAL_SYSCALL (stat64, err, 2, name, buf);
-      if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
-	return result;
-      errno_out = INTERNAL_SYSCALL_ERRNO (result, err);
-      if (errno_out != ENOSYS)
-	{
-	  __set_errno (errno_out);
-	  return -1;
-	}
-      __libc_missing_axp_stat64 = 1;
-    }
-#endif
 
   result = INTERNAL_SYSCALL (stat, err, 2, name, &kbuf);
   if (__builtin_expect (!INTERNAL_SYSCALL_ERROR_P (result, err), 1))
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c
index d1dc64f..2b27a2d 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c
+++ b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.c
@@ -1,5 +1,5 @@
 /* Convert between the kernel's `struct stat' format, and libc's.
-   Copyright (C) 1997, 2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 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
@@ -23,13 +23,6 @@
 #include <xstatconv.h>
 #include <sys/syscall.h>
 
-
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-int __libc_missing_axp_stat64;
-# endif
-#endif
-
 int
 __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
 {
diff --git a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h
index ea4cbb0..e8754f9 100644
--- a/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h
+++ b/ports/sysdeps/unix/sysv/linux/alpha/xstatconv.h
@@ -1,5 +1,5 @@
 /* Convert between the kernel's `struct stat' format, and libc's.
-   Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2004-2012 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
@@ -19,10 +19,5 @@
 #include <kernel-features.h>
 #include <sys/syscall.h>
 
-#ifdef __NR_stat64
-# if __ASSUME_STAT64_SYSCALL == 0
-extern int __libc_missing_axp_stat64 attribute_hidden;
-# endif
-#endif
 extern int __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
   attribute_hidden;
-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-08-08 14:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-08 14:56 [PATCH 0/3] alpha: post kernel version bump cleanup Richard Henderson
2012-08-08 14:56 ` [PATCH 3/3] alpha: Purge __ASSUME_IEEE_RAISE_EXCEPTION Richard Henderson
2012-08-08 14:56 ` [PATCH 2/3] alpha: Tidy up ieee_get/set_fp_control syscalls Richard Henderson
2012-08-08 14:56 ` [PATCH 1/3] alpha: Purge __ASSUME_STAT64_SYSCALL Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).