aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/bits/fcntl.h4
-rw-r--r--sysdeps/mach/hurd/bits/fcntl.h4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_ceil.S60
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_ceilf.S56
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_floor.S58
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_floorf.S54
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llrint.S (renamed from sysdeps/powerpc/powerpc64/fpu/s_llrint.c)32
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llrintf.S (renamed from sysdeps/powerpc/powerpc64/fpu/s_llrintf.c)28
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llround.S67
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_llroundf.S59
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_lround.S2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_lroundf.S2
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_rint.S54
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_rintf.S47
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_round.S75
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_roundf.S71
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_trunc.S67
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_truncf.S63
-rw-r--r--sysdeps/unix/bsd/bits/fcntl.h4
-rw-r--r--sysdeps/unix/bsd/bsd4.4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/bsd/ultrix4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/common/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/aix/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/irix4/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/arm/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/cris/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/i386/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/fcntl.h4
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/fcntl.h5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h4
40 files changed, 814 insertions, 81 deletions
diff --git a/sysdeps/generic/bits/fcntl.h b/sysdeps/generic/bits/fcntl.h
index f23667eb95..b397f812f1 100644
--- a/sysdeps/generic/bits/fcntl.h
+++ b/sysdeps/generic/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for stub configuration.
- Copyright (C) 1991, 1992, 1997, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1992, 1997, 2000, 2004 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
@@ -54,7 +54,7 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
# define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
diff --git a/sysdeps/mach/hurd/bits/fcntl.h b/sysdeps/mach/hurd/bits/fcntl.h
index 09da177e69..e709cc6fb1 100644
--- a/sysdeps/mach/hurd/bits/fcntl.h
+++ b/sysdeps/mach/hurd/bits/fcntl.h
@@ -1,5 +1,5 @@
/* O_*, F_*, FD_* bit values for GNU.
- Copyright (C) 1993,94,96,97,98,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1993,94,96,97,98,99,2000,01,04 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
@@ -153,7 +153,7 @@
#define F_SETFD 2 /* Set file descriptor flags. */
#define F_GETFL 3 /* Get file status flags. */
#define F_SETFL 4 /* Set file status flags. */
-#if defined __USE_BSD || defined __USE_XOPEN2K
+#if defined __USE_BSD || defined __USE_UNIX98
# define F_GETOWN 5 /* Get owner (receiver of SIGIO). */
# define F_SETOWN 6 /* Set owner (receiver of SIGIO). */
#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
new file mode 100644
index 0000000000..127f302666
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S
@@ -0,0 +1,60 @@
+/* ceil function. PowerPC64 version.
+ Copyright (C) 2004 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .section ".toc","aw"
+.LC0: /* 2**52 */
+ .tc FD_43300000_0[TC],0x4330000000000000
+.LC1: /* -0.0 */
+ .tc FD_80000000_0[TC],0x8000000000000000
+ .section ".text"
+
+ENTRY (__ceil)
+ mffs fp11 /* Save current FPU rounding mode. */
+ lfd fp13,.LC0@toc(2)
+ fabs fp0,fp1
+ fsub fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
+ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
+ bnllr- cr7
+ mtfsfi 7,2 /* Set rounding mode toward +inf. */
+ ble- cr6,.L4
+ fadd fp1,fp1,fp13 /* x+= TWO52; */
+ fsub fp1,fp1,fp13 /* x-= TWO52; */
+.L9:
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ blr
+.L4:
+ bge- cr6,.L9 /* if (x < 0.0) */
+ fsub fp1,fp1,fp13 /* x-= TWO52; */
+ fadd fp1,fp1,fp13 /* x+= TWO52; */
+ fcmpu cr5,fp1,fp12 /* if (x > 0.0) */
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ bnelr+ cr5
+ lfd fp1,.LC1@toc(2) /* x must be -0.0 for the 0.0 case. */
+ blr
+ END (__ceil)
+
+weak_alias (__ceil, ceil)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__ceil, ceill)
+strong_alias (__ceil, __ceill)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
new file mode 100644
index 0000000000..34f61423cc
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S
@@ -0,0 +1,56 @@
+/* float ceil function. PowerPC64 version.
+ Copyright (C) 2004 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .section ".toc","aw"
+.LC0: /* 2**23 */
+ .tc FD_41600000_0[TC],0x4160000000000000
+.LC1: /* -0.0 */
+ .tc FD_80000000_0[TC],0x8000000000000000
+ .section ".text"
+
+ENTRY (__ceilf)
+ mffs fp11 /* Save current FPU rounding mode. */
+ lfd fp13,.LC0@toc(2)
+ fabs fp0,fp1
+ fsubs fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */
+ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
+ bnllr- cr7
+ mtfsfi 7,2 /* Set rounding mode toward +inf. */
+ ble- cr6,.L4
+ fadds fp1,fp1,fp13 /* x+= TWO23; */
+ fsubs fp1,fp1,fp13 /* x-= TWO23; */
+.L9:
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ blr
+.L4:
+ bge- cr6,.L9 /* if (x < 0.0) */
+ fsubs fp1,fp1,fp13 /* x-= TWO23; */
+ fadds fp1,fp1,fp13 /* x+= TWO23; */
+ fcmpu cr5,fp1,fp12 /* if (x > 0.0) */
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ bnelr+ cr5
+ lfd fp1,.LC1@toc(2) /* x must be -0.0 for the 0.0 case. */
+ blr
+ END (__ceilf)
+
+weak_alias (__ceilf, ceilf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/fpu/s_floor.S
new file mode 100644
index 0000000000..57fd63cd66
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_floor.S
@@ -0,0 +1,58 @@
+/* Floor function. PowerPC64 version.
+ Copyright (C) 2004 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .section ".toc","aw"
+.LC0: /* 2**52 */
+ .tc FD_43300000_0[TC],0x4330000000000000
+ .section ".text"
+
+ENTRY (__floor)
+ mffs fp11 /* Save current FPU rounding mode. */
+ lfd fp13,.LC0@toc(2)
+ fabs fp0,fp1
+ fsub fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
+ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
+ bnllr- cr7
+ mtfsfi 7,3 /* Set rounding mode toward -inf. */
+ ble- cr6,.L4
+ fadd fp1,fp1,fp13 /* x+= TWO52; */
+ fsub fp1,fp1,fp13 /* x-= TWO52; */
+ fcmpu cr5,fp1,fp12 /* if (x > 0.0) */
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ bnelr+ cr5
+ fmr fp1,fp12 /* x must be +0.0 for the 0.0 case. */
+ blr
+.L4:
+ bge- cr6,.L9 /* if (x < 0.0) */
+ fsub fp1,fp1,fp13 /* x-= TWO52; */
+ fadd fp1,fp1,fp13 /* x+= TWO52; */
+.L9:
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ blr
+ END (__floor)
+
+weak_alias (__floor, floor)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__floor, floorl)
+strong_alias (__floor, __floorl)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floorf.S b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S
new file mode 100644
index 0000000000..cde92b9174
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S
@@ -0,0 +1,54 @@
+/* float Floor function. PowerPC64 version.
+ Copyright (C) 2004 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, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <sysdep.h>
+
+ .section ".toc","aw"
+.LC0: /* 2**23 */
+ .tc FD_41600000_0[TC],0x4160000000000000
+ .section ".text"
+
+ENTRY (__floorf)
+ mffs fp11 /* Save current FPU rounding mode. */
+ lfd fp13,.LC0@toc(2)
+ fabs fp0,fp1
+ fsubs fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23) */
+ fcmpu cr6,fp1,fp12 /* if (x > 0.0) */
+ bnllr- cr7
+ mtfsfi 7,3 /* Set rounding mode toward -inf. */
+ ble- cr6,.L4
+ fadds fp1,fp1,fp13 /* x+= TWO23; */
+ fsubs fp1,fp1,fp13 /* x-= TWO23; */
+ fcmpu cr5,fp1,fp12 /* if (x > 0.0) */
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ bnelr+ cr5
+ fmr fp1,fp12 /* x must be +0.0 for the 0.0 case. */
+ blr
+.L4:
+ bge- cr6,.L9 /* if (x < 0.0) */
+ fsubs fp1,fp1,fp13 /* x-= TWO23; */
+ fadds fp1,fp1,fp13 /* x+= TWO23; */
+.L9:
+ mtfsf 0x01,fp11 /* restore previous rounding mode. */
+ blr
+ END (__floorf)
+
+weak_alias (__floorf, floorf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrint.c b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S
index f6ea3f4e0f..bc976a7edb 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_llrint.c
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S
@@ -1,5 +1,5 @@
-/* Round a double value to a long long in the current rounding mode.
- Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+/* Round double to long int. PowerPC64 version.
+ Copyright (C) 2004 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
@@ -17,27 +17,23 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Kludge to avoid decls that will confuse strong_alias below. */
-#define __lrint XXX__lrint
-#define __lrintl XXX__lrintl
-#define lrint XXXlrint
-#define lrintl XXXlrintl
+#include <sysdep.h>
-#include "math.h"
+/* long long int[r3] __llrint (double x[fp1]) */
+ENTRY (__llrint)
+ fctid fp13,fp1
+ stfd fp13,-16(r1)
+ nop /* Insure the following load is in a different dispatch group */
+ nop /* to avoid pipe stall on POWER4&5. */
+ nop
+ ld r3,-16(r1)
+ blr
+ END (__llrint)
-#undef __lrint
-#undef __lrintl
-#undef lrint
-#undef lrintl
-
-long long int
-__llrint (double x)
-{
- return (long long int) __rint (x);
-}
strong_alias (__llrint, __lrint)
weak_alias (__llrint, llrint)
weak_alias (__lrint, lrint)
+
#ifdef NO_LONG_DOUBLE
strong_alias (__llrint, __llrintl)
weak_alias (__llrint, llrintl)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.c b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
index 7d8e22a700..aef84de831 100644
--- a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S
@@ -1,5 +1,5 @@
-/* Round a float value to a long long in the current rounding mode.
- Copyright (C) 1997, 2004 Free Software Foundation, Inc.
+/* Round double to long int. PowerPC64 version.
+ Copyright (C) 2004 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
@@ -17,20 +17,20 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-/* Kludge to avoid decls that will confuse strong_alias below. */
-#define __lrintf XXX__lrintf
-#define lrintf XXXlrintf
+#include <sysdep.h>
-#include "math.h"
+/* long long int[r3] __llrintf (float x[fp1]) */
+ENTRY (__llrintf)
+ fctid fp13,fp1
+ stfd fp13,-16(r1)
+ nop /* Insure the following load is in a different dispatch group */
+ nop /* to avoid pipe stall on POWER4&5. */
+ nop
+ ld r3,-16(r1)
+ blr
+ END (__llrintf)
-#undef __lrintf
-#undef lrintf
-
-long long int
-__llrintf (float x)
-{
- return (long long int) __rintf (x);
-}
strong_alias (__llrintf, __lrintf)
weak_alias (__llrintf, llrintf)
weak_alias (__lrintf, lrintf)
+
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llround.S b/sysdeps/powerpc/powerpc64/fpu/s_llround.S
new file mode 100644
index 0000000000..320ef0f6d8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_llround.S
@@ -0,0 +1,67 @@
+/* llround function. PowerPC64 version.
+ Copyright (C) 2004 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