From 0585697658a4f4afd4b9811b7a3f73ff820a20d8 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 20 Feb 2003 22:23:34 +0000 Subject: Update. 2002-07-24 Philip Blundell * sysdeps/unix/sysv/linux/arm/ioperm.c (init_iosys): Yield ENODEV on unknown systems. 2003-02-20 Franz Sirl * sysdeps/powerpc/powerpc32/atomicity.h: Remove compiler workaround. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_NEW_PRCTL_SYSCALL): Defined for ppc32 too. * sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c: Use prctl if possible. * sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S: Avoid short interprocedure branches. * sysdeps/powerpc/soft-fp/Dist (sim-full.c, fenv_const.c): Move to... * sysdeps/powerpc/nofpu/Dist: ...here. * sysdeps/unix/sysv/linux/powerpc/Dist (fe_nomask.c): Move to... * sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist: ...here. * sysdeps/unix/sysv/linux/s390/s390-64/Dist (kernel_stat.h): Delete. * sysdeps/unix/sysv/linux/sparc/Dist (bits/utmpx.h): Delete. * sysdeps/unix/sysv/linux/x86_64/Dist (bits/utmpx.h): Delete. --- sysdeps/unix/sysv/linux/powerpc/Dist | 2 -- sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist | 1 + .../unix/sysv/linux/powerpc/powerpc32/fe_nomask.c | 29 +++++++++++++++++----- sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S | 7 ++++-- 4 files changed, 29 insertions(+), 10 deletions(-) (limited to 'sysdeps/unix/sysv/linux/powerpc') diff --git a/sysdeps/unix/sysv/linux/powerpc/Dist b/sysdeps/unix/sysv/linux/powerpc/Dist index 507728abb1..f36d3685f6 100644 --- a/sysdeps/unix/sysv/linux/powerpc/Dist +++ b/sysdeps/unix/sysv/linux/powerpc/Dist @@ -1,6 +1,4 @@ -bits/utmpx.h dl-brk.S -fe_nomask.c ipc_priv.h kernel_termios.h ldd-rewrite.sed diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist index 381f878080..297e031620 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/Dist @@ -1,2 +1,3 @@ clone.S kernel_stat.h +fe_nomask.c diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c index e51714d312..2c85a3a9e9 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fe_nomask.c @@ -21,7 +21,11 @@ #include #include #include +#include +#include +#include "kernel-features.h" +#if __ASSUME_NEW_PRCTL_SYSCALL == 0 /* This is rather fiddly under Linux. We don't have direct access, and there is no system call, but we can change the bits in a signal handler's context... */ @@ -34,18 +38,31 @@ fe_nomask_handler (int signum, struct sigcontext *sc) sc->regs->msr |= 0x900ul; /* FE0 | FE1 */ sigaction (SIGUSR1, &oact, NULL); } +#endif const fenv_t * __fe_nomask_env (void) { - struct sigaction act; +#if __ASSUME_NEW_PRCTL_SYSCALL == 0 +# if defined PR_SET_FPEXC && defined PR_FP_EXC_PRECISE + int result = INLINE_SYSCALL (prctl, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE); - act.sa_handler = (sighandler_t) fe_nomask_handler; - sigemptyset (&act.sa_mask); - act.sa_flags = 0; + if (result == -1 && errno == EINVAL) +# endif + { + struct sigaction act; - sigaction (SIGUSR1, &act, &oact); - raise (SIGUSR1); + act.sa_handler = (sighandler_t) fe_nomask_handler; + sigemptyset (&act.sa_mask); + act.sa_flags = 0; + + sigaction (SIGUSR1, &act, &oact); + raise (SIGUSR1); + } +#else + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (prctl, err, 2, PR_SET_FPEXC, PR_FP_EXC_PRECISE); +#endif return FE_ENABLED_ENV; } diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S index 9a0f53e99e..5fb7868c31 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/vfork.S @@ -38,7 +38,7 @@ ENTRY (__vfork) bnslr+ /* Check if vfork syscall is known at all. */ cmpwi r3,ENOSYS - bne JUMPTARGET(__syscall_error) + bne- .Lsyscall_error # endif #endif @@ -47,7 +47,10 @@ ENTRY (__vfork) /* If we don't have vfork, fork is close enough. */ DO_CALL (SYS_ify (fork)) - PSEUDO_RET + bnslr+ + +.Lsyscall_error: + b JUMPTARGET(__syscall_error) #endif PSEUDO_END (__vfork) -- cgit 1.4.1