[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r2272 - in /fsf/glibc-2_6-branch/ports: ./ sysdeps/mips/ sysdeps/mips/mips64/n32/ sysdeps/mips/mips64/n64/ sysdeps/mips/mips...
- To: commits@xxxxxxxxxx
- Subject: [commits] r2272 - in /fsf/glibc-2_6-branch/ports: ./ sysdeps/mips/ sysdeps/mips/mips64/n32/ sysdeps/mips/mips64/n64/ sysdeps/mips/mips...
- From: eglibc@xxxxxxxxxx
- Date: Thu, 24 May 2007 16:30:04 -0000
Author: eglibc
Date: Thu May 24 09:30:03 2007
New Revision: 2272
Log:
Import glibc-ports-2.6 for 2007-05-24
Added:
fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/Makefile (with props)
fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/e_sqrtl.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
Modified:
fsf/glibc-2_6-branch/ports/ChangeLog.arm
fsf/glibc-2_6-branch/ports/ChangeLog.hppa
fsf/glibc-2_6-branch/ports/ChangeLog.mips
fsf/glibc-2_6-branch/ports/ChangeLog.powerpc
fsf/glibc-2_6-branch/ports/sysdeps/mips/dl-machine.h
fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n32/Implies
fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n64/Implies
fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h
fsf/glibc-2_6-branch/ports/sysdeps/powerpc/nofpu/feholdexcpt.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/nptl/Versions
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/sigaction.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c
fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
Modified: fsf/glibc-2_6-branch/ports/ChangeLog.arm
==============================================================================
--- fsf/glibc-2_6-branch/ports/ChangeLog.arm (original)
+++ fsf/glibc-2_6-branch/ports/ChangeLog.arm Thu May 24 09:30:03 2007
@@ -1,3 +1,25 @@
+2007-05-23 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_SIGFRAME_V2): Define for 2.6.18 and later.
+ * sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
+ (__default_sa_restorer): Rename to __default_sa_restorer_v1.
+ Don't define if __ASSUME_SIGFRAME_V2.
+ (__default_rt_sa_restorer): Rename to
+ __default_rt_sa_restorer_v1. Don't define if
+ __ASSUME_SIGFRAME_V2.
+ (__default_sa_restorer_v2, __default_rt_sa_restorer_v2): New.
+ * sysdeps/unix/sysv/linux/arm/nptl/Versions
+ (__default_sa_restorer_v1, __default_rt_sa_restorer_v1,
+ __default_sa_restorer_v2, __default_rt_sa_restorer_v2): Add to
+ GLIBC_PRIVATE.
+ * sysdeps/unix/sysv/linux/arm/sigaction.c [__ARM_EABI__]
+ (__default_sa_restorer_v1, __default_sa_restorer_v2,
+ __default_rt_sa_restorer_v1, __default_rt_sa_restorer_v2):
+ Declare.
+ (__default_sa_restorer, __default_rt_sa_restorer): Define as
+ macros depending on kernel version.
+
2007-01-23 Daniel Jacobowitz <dan@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/arm/sysdep.h (PTR_MANGLE, PTR_DEMANGLE):
Modified: fsf/glibc-2_6-branch/ports/ChangeLog.hppa
==============================================================================
--- fsf/glibc-2_6-branch/ports/ChangeLog.hppa (original)
+++ fsf/glibc-2_6-branch/ports/ChangeLog.hppa Thu May 24 09:30:03 2007
@@ -1,3 +1,18 @@
+2007-05-17 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
+ (SEM_VALUE_MAX): Remove.
+
+2007-05-17 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/hppa/sysdep.h (PIC_REG_DEF): Define.
+ (PIC_REG_USE): Define.
+ (INLINE_SYSCALL): Use PIC_REG_DEF, PIC_REG_USE.
+ (INTERNAL_SYSCALL): Likewise.
+ (INTERNAL_SYSCALL_NCS): Likewise.
+ * sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall): Use
+ PIC_REG_DEF, PIC_REG_USE.
+
2007-05-01 Carlos O'Donell <carlos@xxxxxxxxxxxxxxxx>
* sysdeps/unix/sysv/linux/hppa/linuxthreads/bits/pthreadtypes.h
Modified: fsf/glibc-2_6-branch/ports/ChangeLog.mips
==============================================================================
--- fsf/glibc-2_6-branch/ports/ChangeLog.mips (original)
+++ fsf/glibc-2_6-branch/ports/ChangeLog.mips Thu May 24 09:30:03 2007
@@ -1,3 +1,32 @@
+2007-05-24 Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
+ (posix_fadvise): Fix high word of len argument.
+
+2007-05-23 Atsushi Nemoto <anemo@xxxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/readahead.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c: New file.
+ * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: New file.
+
+2007-05-23 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
+
+ * sysdeps/mips/mips64/n32/Implies: Add mips/mips64/soft-fp.
+ * sysdeps/mips/mips64/n64/Implies: Likewise.
+ * sysdeps/mips/mips64/soft-fp/Makefile: New.
+ * sysdeps/mips/mips64/soft-fp/e_sqrtl.c: New.
+ * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Include <fenv.h> and
+ <fpu_control.h>. Use hardware exception and rounding mode
+ settings.
+
+2007-05-23 Richard Sandiford <rsandifo@xxxxxxxxxxxxx>
+
+ * sysdeps/mips/dl-machine.h (elf_machine_reloc): Change type of
+ r_info argument to ElfW(Addr).
+
2007-02-01 Joseph Myers <joseph@xxxxxxxxxxxxxxxx>
* sysdeps/mips/bits/mathdef.h (float_t): Change to float.
Modified: fsf/glibc-2_6-branch/ports/ChangeLog.powerpc
==============================================================================
--- fsf/glibc-2_6-branch/ports/ChangeLog.powerpc (original)
+++ fsf/glibc-2_6-branch/ports/ChangeLog.powerpc Thu May 24 09:30:03 2007
@@ -1,3 +1,9 @@
+2007-05-23 Steven Munroe <sjmunroe@xxxxxxxxxx>
+
+ * sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Disable
+ exceptions. Use the updated env in fesetenv().
+ Add libm_hidden_def.
+
2007-01-23 Steven Munroe <sjmunroe@xxxxxxxxxx>
[BZ #2749]
Modified: fsf/glibc-2_6-branch/ports/sysdeps/mips/dl-machine.h
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/mips/dl-machine.h (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/mips/dl-machine.h Thu May 24 09:30:03 2007
@@ -304,7 +304,7 @@
auto inline void
__attribute__ ((always_inline))
-elf_machine_reloc (struct link_map *map, ElfW(Word) r_info,
+elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info,
const ElfW(Sym) *sym, const struct r_found_version *version,
void *reloc_addr, ElfW(Addr) r_addend, int inplace_p)
{
Modified: fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n32/Implies
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n32/Implies (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n32/Implies Thu May 24 09:30:03 2007
@@ -1,4 +1,5 @@
ieee754/ldbl-128
+mips/mips64/soft-fp
mips/mips64
mips
wordsize-32
Modified: fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n64/Implies
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n64/Implies (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/n64/Implies Thu May 24 09:30:03 2007
@@ -1,4 +1,5 @@
ieee754/ldbl-128
+mips/mips64/soft-fp
mips/mips64
mips
wordsize-64
Added: fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/Makefile
==============================================================================
Binary file - no diff available.
Propchange: fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/Makefile
------------------------------------------------------------------------------
svn:mime-type = audio/x-669-mod
Added: fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/e_sqrtl.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/e_sqrtl.c (added)
+++ fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/e_sqrtl.c Thu May 24 09:30:03 2007
@@ -1,0 +1,39 @@
+/* long double square root in software floating-point emulation.
+ Copyright (C) 1997, 1999, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Richard Henderson (rth@xxxxxxxxxx) and
+ Jakub Jelinek (jj@xxxxxxxxxxxxxx).
+
+ 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 <stdlib.h>
+#include <soft-fp.h>
+#include <quad.h>
+
+long double
+__ieee754_sqrtl (const long double a)
+{
+ FP_DECL_EX;
+ FP_DECL_Q(A); FP_DECL_Q(C);
+ long double c;
+
+ FP_INIT_ROUNDMODE;
+ FP_UNPACK_Q(A, a);
+ FP_SQRT_Q(C, A);
+ FP_PACK_Q(c, C);
+ FP_HANDLE_EXCEPTIONS;
+ return c;
+}
Modified: fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/mips/mips64/soft-fp/sfp-machine.h Thu May 24 09:30:03 2007
@@ -1,3 +1,6 @@
+#include <fenv.h>
+#include <fpu_control.h>
+
#define _FP_W_TYPE_SIZE 64
#define _FP_W_TYPE unsigned long long
#define _FP_WS_TYPE signed long long
@@ -40,8 +43,32 @@
R##_c = FP_CLS_NAN; \
} while (0)
-#define FP_EX_INVALID (1 << 4)
-#define FP_EX_DIVZERO (1 << 3)
-#define FP_EX_OVERFLOW (1 << 2)
-#define FP_EX_UNDERFLOW (1 << 1)
-#define FP_EX_INEXACT (1 << 0)
+#define _FP_DECL_EX fpu_control_t _fcw
+
+#define FP_ROUNDMODE (_fcw & 0x3)
+
+#define FP_RND_NEAREST FE_TONEAREST
+#define FP_RND_ZERO FE_TOWARDZERO
+#define FP_RND_PINF FE_UPWARD
+#define FP_RND_MINF FE_DOWNWARD
+
+#define FP_EX_INVALID FE_INVALID
+#define FP_EX_OVERFLOW FE_OVERFLOW
+#define FP_EX_UNDERFLOW FE_UNDERFLOW
+#define FP_EX_DIVZERO FE_DIVBYZERO
+#define FP_EX_INEXACT FE_INEXACT
+
+#ifdef __mips_hard_float
+#define FP_INIT_ROUNDMODE \
+do { \
+ _FPU_GETCW (_fcw); \
+} while (0)
+
+#define FP_HANDLE_EXCEPTIONS \
+do { \
+ if (__builtin_expect (_fex, 0)) \
+ _FPU_SETCW (_fcw | _fex | (_fex << 10)); \
+} while (0)
+#else
+#define FP_INIT_ROUNDMODE _fcw = FP_RND_NEAREST
+#endif
Modified: fsf/glibc-2_6-branch/ports/sysdeps/powerpc/nofpu/feholdexcpt.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/powerpc/nofpu/feholdexcpt.c (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/powerpc/nofpu/feholdexcpt.c Thu May 24 09:30:03 2007
@@ -1,6 +1,6 @@
/* Store current floating-point environment and clear exceptions
(soft-float edition).
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2007 Free Software Foundation, Inc.
Contributed by Aldy Hernandez <aldyh@xxxxxxxxxx>, 2002.
This file is part of the GNU C Library.
@@ -33,11 +33,12 @@
u.fenv = *envp;
/* Clear everything except the rounding mode. */
u.l[0] &= 0x3;
-
- /* ?? Should we clear the disabled exceptions as well ?? */
+ /* Disable exceptions */
+ u.l[1] = FE_ALL_EXCEPT;
/* Put the new state in effect. */
- fesetenv (envp);
+ fesetenv (&u.fenv);
return 0;
}
+libm_hidden_def (feholdexcept)
Modified: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/eabi/sigrestorer.S Thu May 24 09:30:03 2007
@@ -29,24 +29,49 @@
Start the unwind tables at least one instruction before the signal
trampoline, because the unwinder will assume we are returning after
- a call site. */
+ a call site.
+ Because the signal frame layout changed in 2.6.18, we provide two
+ copies of these functions with different unwind information. */
+
+#ifndef __ASSUME_SIGFRAME_V2
.fnstart
.save {r0-r15}
.pad #12
nop
-ENTRY(__default_sa_restorer)
+ENTRY(__default_sa_restorer_v1)
+ mov r7, $SYS_ify(sigreturn)
+ swi 0x0
+ .fnend
+#endif
+
+ .fnstart
+ .save {r0-r15}
+ .pad #32
+ nop
+ENTRY(__default_sa_restorer_v2)
mov r7, $SYS_ify(sigreturn)
swi 0x0
.fnend
#ifdef __NR_rt_sigreturn
+#ifndef __ASSUME_SIGFRAME_V2
.fnstart
.save {r0-r15}
.pad #168
nop
-ENTRY(__default_rt_sa_restorer)
+ENTRY(__default_rt_sa_restorer_v1)
+ mov r7, $SYS_ify(rt_sigreturn)
+ swi 0x0
+ .fnend
+#endif
+
+ .fnstart
+ .save {r0-r15}
+ .pad #160
+ nop
+ENTRY(__default_rt_sa_restorer_v2)
mov r7, $SYS_ify(rt_sigreturn)
swi 0x0
.fnend
Modified: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h Thu May 24 09:30:03 2007
@@ -46,4 +46,9 @@
# define __ASSUME_VFORK_SYSCALL 1
#endif
+/* The signal frame layout changed in 2.6.18. */
+#if __LINUX_KERNEL_VERSION >= 132626
+# define __ASSUME_SIGFRAME_V2 1
+#endif
+
#include_next <kernel-features.h>
Modified: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/nptl/Versions
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/nptl/Versions (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/nptl/Versions Thu May 24 09:30:03 2007
@@ -2,5 +2,7 @@
GLIBC_PRIVATE {
# A copy of sigaction lives in NPTL, and needs these.
__default_sa_restorer; __default_rt_sa_restorer;
+ __default_sa_restorer_v1; __default_rt_sa_restorer_v1;
+ __default_sa_restorer_v2; __default_rt_sa_restorer_v2;
}
}
Modified: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/sigaction.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/sigaction.c (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/arm/sigaction.c Thu May 24 09:30:03 2007
@@ -36,8 +36,27 @@
#define SA_RESTORER 0x04000000
+#ifdef __ARM_EABI__
+extern void __default_sa_restorer_v1(void);
+extern void __default_sa_restorer_v2(void);
+extern void __default_rt_sa_restorer_v1(void);
+extern void __default_rt_sa_restorer_v2(void);
+# ifdef __ASSUME_SIGFRAME_V2
+# define __default_sa_restorer __default_sa_restorer_v2
+# define __default_rt_sa_restorer __default_rt_sa_restorer_v2
+# else
+# include <ldsodefs.h>
+# define __default_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
+ ? __default_sa_restorer_v2 \
+ : __default_sa_restorer_v1)
+# define __default_rt_sa_restorer (GLRO(dl_osversion) >= 0x020612 \
+ ? __default_rt_sa_restorer_v2 \
+ : __default_rt_sa_restorer_v1)
+# endif
+#else
extern void __default_sa_restorer(void);
extern void __default_rt_sa_restorer(void);
+#endif
/* When RT signals are in use we need to use a different return stub. */
#ifdef __NR_rt_sigreturn
Modified: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/semaphore.h Thu May 24 09:30:03 2007
@@ -20,16 +20,10 @@
# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
#endif
-
#define __SIZEOF_SEM_T 16
-
/* Value returned if `sem_open' failed. */
#define SEM_FAILED ((sem_t *) 0)
-
-/* Maximum value the semaphore can have. */
-#define SEM_VALUE_MAX ((int) ((~0u) >> 1))
-
typedef union
{
Modified: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.c Thu May 24 09:30:03 2007
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2001, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2003, 2007
+ 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
@@ -58,13 +59,14 @@
{
register unsigned long int __res asm("r28");
+ PIC_REG_DEF
LOAD_ARGS_6 (arg0, arg1, arg2, arg3, arg4, arg5)
asm volatile (SAVE_ASM_PIC
" ble 0x100(%%sr2, %%r0) \n"
" copy %1, %%r20 \n"
LOAD_ASM_PIC
: "=r" (__res)
- : "r" (__sysno) ASM_ARGS_6
+ : "r" (__sysno) PIC_REG_USE ASM_ARGS_6
: "memory", CALL_CLOB_REGS CLOB_ARGS_6);
__sys_res = __res;
}
Modified: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h (original)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/hppa/sysdep.h Thu May 24 09:30:03 2007
@@ -1,5 +1,6 @@
/* Assembler macros for PA-RISC.
- Copyright (C) 1999, 2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003, 2007
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@xxxxxxxxxx>, August 1999.
Linux/PA-RISC changes by Philipp Rumpf, <prumpf@xxxxxxx>, March 2000.
@@ -40,7 +41,9 @@
# define TREG_ASM "%r4" /* Cant clobber r3, it holds framemarker */
# define SAVE_ASM_PIC " copy %%r19, %" TREG_ASM "\n"
# define LOAD_ASM_PIC " copy %" TREG_ASM ", %%r19\n"
-# define USING_TREG TREG_ASM,
+# define CLOB_TREG TREG_ASM ,
+# define PIC_REG_DEF register unsigned long __r19 asm("r19");
+# define PIC_REG_USE , "r" (__r19)
#else
# define TREG %r3
# define SAVE_PIC(SREG) nop ASM_LINE_SEP
@@ -49,7 +52,9 @@
# define TREG_ASM
# define SAVE_ASM_PIC "nop \n"
# define LOAD_ASM_PIC "nop \n"
-# define USING_TREG
+# define CLOB_TREG
+# define PIC_REG_DEF
+# define PIC_REG_USE
#endif
#ifdef __ASSEMBLER__
@@ -344,7 +349,7 @@
TREG is clobbered and use that register to save/restore r19
across the syscall. */
-#define CALL_CLOB_REGS "%r1", "%r2", USING_TREG \
+#define CALL_CLOB_REGS "%r1", "%r2", CLOB_TREG \
"%r20", "%r29", "%r31"
#undef INLINE_SYSCALL
@@ -353,6 +358,7 @@
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
+ PIC_REG_DEF \
LOAD_ARGS_##nr(args) \
/* FIXME: HACK save/load r19 around syscall */ \
asm volatile( \
@@ -361,7 +367,7 @@
" ldi %1, %%r20\n" \
LOAD_ASM_PIC \
: "=r" (__res) \
- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
: "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
@@ -398,6 +404,7 @@
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
+ PIC_REG_DEF \
LOAD_ARGS_##nr(args) \
/* FIXME: HACK save/load r19 around syscall */ \
asm volatile( \
@@ -406,7 +413,7 @@
" ldi %1, %%r20\n" \
LOAD_ASM_PIC \
: "=r" (__res) \
- : "i" (SYS_ify(name)) ASM_ARGS_##nr \
+ : "i" (SYS_ify(name)) PIC_REG_USE ASM_ARGS_##nr \
: "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
@@ -422,6 +429,7 @@
long __sys_res; \
{ \
register unsigned long __res asm("r28"); \
+ PIC_REG_DEF \
LOAD_ARGS_##nr(args) \
/* FIXME: HACK save/load r19 around syscall */ \
asm volatile( \
@@ -430,7 +438,7 @@
" copy %1, %%r20\n" \
LOAD_ASM_PIC \
: "=r" (__res) \
- : "r" (name) ASM_ARGS_##nr \
+ : "r" (name) PIC_REG_USE ASM_ARGS_##nr \
: "memory", CALL_CLOB_REGS CLOB_ARGS_##nr \
); \
__sys_res = (long)__res; \
Added: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c (added)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise.c Thu May 24 09:30:03 2007
@@ -1,0 +1,42 @@
+/* Copyright (C) 2007 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 <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+posix_fadvise (int fd, off_t offset, off_t len, int advise)
+{
+/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
+#ifdef __NR_fadvise64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0,
+ __LONG_LONG_PAIR (offset >> 31, offset),
+ __LONG_LONG_PAIR (len >> 31, len),
+ advise);
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+#else
+ return ENOSYS;
+#endif
+}
Added: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c (added)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/posix_fadvise64.c Thu May 24 09:30:03 2007
@@ -1,0 +1,61 @@
+/* Copyright (C) 2007 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 <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
+{
+/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
+#ifdef __NR_fadvise64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64, err, 7, fd, 0,
+ __LONG_LONG_PAIR ((long) (offset >> 32),
+ (long) offset),
+ __LONG_LONG_PAIR ((long) (len >> 32),
+ (long) len),
+ advise);
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+#else
+ return ENOSYS;
+#endif
+}
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
+
+int
+attribute_compat_text_section
+__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
+{
+ return __posix_fadvise64_l64 (fd, offset, len, advise);
+}
+
+versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
+compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
+#else
+strong_alias (__posix_fadvise64_l64, posix_fadvise64);
+#endif
Added: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c (added)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/readahead.c Thu May 24 09:30:03 2007
@@ -1,0 +1,1 @@
+#include <sysdeps/unix/sysv/linux/arm/eabi/readahead.c>
Added: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c (added)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips32/sync_file_range.c Thu May 24 09:30:03 2007
@@ -1,0 +1,47 @@
+/* Selective file content synch'ing.
+ Copyright (C) 2006, 2007 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 <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+
+#ifdef __NR_sync_file_range
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ return INLINE_SYSCALL (sync_file_range, 7, fd, 0,
+ __LONG_LONG_PAIR ((long) (from >> 32), (long) from),
+ __LONG_LONG_PAIR ((long) (to >> 32), (long) to),
+ flags);
+}
+#else
+int
+sync_file_range (int fd, __off64_t from, __off64_t to, unsigned int flags)
+{
+ __set_errno (ENOSYS);
+ return -1;
+}
+stub_warning (sync_file_range)
+
+# include <stub-tag.h>
+#endif
Added: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c (added)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/posix_fadvise64.c Thu May 24 09:30:03 2007
@@ -1,0 +1,56 @@
+/* Copyright (C) 2007 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 <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+__posix_fadvise64_l64 (int fd, off64_t offset, off64_t len, int advise)
+{
+/* MIPS kernel only has NR_fadvise64 which acts as NR_fadvise64_64 */
+#ifdef __NR_fadvise64
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (fadvise64, err, 4, fd, offset, len, advise);
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);
+ return 0;
+#else
+ return ENOSYS;
+#endif
+}
+
+#include <shlib-compat.h>
+
+#if SHLIB_COMPAT(libc, GLIBC_2_2, GLIBC_2_3_3)
+
+int
+attribute_compat_text_section
+__posix_fadvise64_l32 (int fd, off64_t offset, size_t len, int advise)
+{
+ return __posix_fadvise64_l64 (fd, offset, len, advise);
+}
+
+versioned_symbol (libc, __posix_fadvise64_l64, posix_fadvise64, GLIBC_2_3_3);
+compat_symbol (libc, __posix_fadvise64_l32, posix_fadvise64, GLIBC_2_2);
+#else
+strong_alias (__posix_fadvise64_l64, posix_fadvise64);
+#endif
Added: fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list
==============================================================================
--- fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list (added)
+++ fsf/glibc-2_6-branch/ports/sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list Thu May 24 09:30:03 2007
@@ -1,0 +1,5 @@
+# File name Caller Syscall name # args Strong name Weak names
+
+readahead - readahead i:iii __readahead readahead
+sync_file_range - sync_file_range i:iiii sync_file_range
+posix_fadvise - fadvise64 i:iiii posix_fadvise