aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2004-11-24 04:39:24 +0000
committerAndreas Jaeger <aj@suse.de>2004-11-24 04:39:24 +0000
commitc997e9d40ec0f2f9c61a2325efb5b73b92cc91c1 (patch)
tree9bc7bf0b87ba065d1ab9eb60095b729fccff3423
parentcdb7b96289c0605afe393a69a5865a1cedf072dc (diff)
downloadglibc-c997e9d40ec0f2f9c61a2325efb5b73b92cc91c1.tar.xz
glibc-c997e9d40ec0f2f9c61a2325efb5b73b92cc91c1.zip
Update.
2004-11-05 Maciej W. Rozycki <macro@mips.com> * sysdeps/mips/dl-machine.h: Include <sgidefs.h>. Use _ABIO32, _ABIN32 and _ABI64 for ABI selection throughout. * sysdeps/mips/elf/start.S: Likewise. * sysdeps/mips/mips64/__longjmp.c: Likewise. * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. * sysdeps/mips/mips64/setjmp.S: Likewise. * sysdeps/mips/mips64/setjmp_aux.c: Likewise. * sysdeps/mips/sys/regdef.h: Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/mips/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/kernel-features.h: Likewise. * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. * sysdeps/unix/sysv/linux/mips/ptrace.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. * sysdeps/mips/atomicity.h: Use _ABIO32, _ABIN32 and _ABI64 for ABI selection throughout. * sysdeps/mips/bits/setjmp.h: Likewise. * sysdeps/mips/fpu/bits/mathdef.h: Likewise. * sysdeps/mips/machine-gmon.h: Likewise. * sysdeps/mips/sys/asm.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/user.h: Likewise. * sysdeps/mips/sgidefs.h: Prevent <asm/sgidefs.h> from being included by kernel headers and undo its settings if already included. Define _ABIO32, _ABIN32 and _ABI64 if missing and use them to define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32 and _MIPS_SIM_ABI64 for compatibility. * sysdeps/unix/sysv/linux/mips/Makefile: Use _ABIO32, _ABIN32 and _ABI64 for ABI selection in generated syscall-list.h * sysdeps/unix/sysv/linux/mips/configure.in: Use _ABIO32, _ABIN32 and _ABI64 for ABI selection in generated asm-unistd.h. * sysdeps/unix/sysv/linux/mips/configure: Regenerate. * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Correct an inverted _MIPS_SIM conditional.
-rw-r--r--ChangeLog52
-rw-r--r--linuxthreads/ChangeLog7
-rw-r--r--sysdeps/mips/atomicity.h10
-rw-r--r--sysdeps/mips/bits/setjmp.h4
-rw-r--r--sysdeps/mips/dl-machine.h16
-rw-r--r--sysdeps/mips/elf/start.S7
-rw-r--r--sysdeps/mips/fpu/bits/mathdef.h2
-rw-r--r--sysdeps/mips/machine-gmon.h6
-rw-r--r--sysdeps/mips/mips64/__longjmp.c3
-rw-r--r--sysdeps/mips/mips64/bsd-_setjmp.S6
-rw-r--r--sysdeps/mips/mips64/bsd-setjmp.S5
-rw-r--r--sysdeps/mips/mips64/setjmp.S8
-rw-r--r--sysdeps/mips/mips64/setjmp_aux.c3
-rw-r--r--sysdeps/mips/sgidefs.h45
-rw-r--r--sysdeps/mips/sys/asm.h28
-rw-r--r--sysdeps/mips/sys/regdef.h10
-rw-r--r--sysdeps/mips/sys/ucontext.h9
-rw-r--r--sysdeps/unix/mips/sysdep.h5
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/Makefile4
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/fcntl.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/sigcontext.h6
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/stat.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/configure.in6
-rw-r--r--sysdeps/unix/sysv/linux/mips/kernel_stat.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread.c7
-rw-r--r--sysdeps/unix/sysv/linux/mips/pread64.c5
-rw-r--r--sysdeps/unix/sysv/linux/mips/ptrace.c3
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite.c7
-rw-r--r--sysdeps/unix/sysv/linux/mips/pwrite64.c5
-rw-r--r--sysdeps/unix/sysv/linux/mips/sigaction.c9
-rw-r--r--sysdeps/unix/sysv/linux/mips/sigcontextinfo.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/procfs.h7
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/ptrace.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/tas.h3
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/ucontext.h5
-rw-r--r--sysdeps/unix/sysv/linux/mips/sys/user.h8
37 files changed, 214 insertions, 107 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a8acee19a..da423f3618 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,55 @@
+2004-11-05 Maciej W. Rozycki <macro@mips.com>
+
+ * sysdeps/mips/dl-machine.h: Include <sgidefs.h>. Use _ABIO32,
+ _ABIN32 and _ABI64 for ABI selection throughout.
+ * sysdeps/mips/elf/start.S: Likewise.
+ * sysdeps/mips/mips64/__longjmp.c: Likewise.
+ * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise.
+ * sysdeps/mips/mips64/bsd-setjmp.S: Likewise.
+ * sysdeps/mips/mips64/setjmp.S: Likewise.
+ * sysdeps/mips/mips64/setjmp_aux.c: Likewise.
+ * sysdeps/mips/sys/regdef.h: Likewise.
+ * sysdeps/mips/sys/ucontext.h: Likewise.
+ * sysdeps/unix/mips/sysdep.h: Likewise.
+ * sysdeps/unix/sysv/linux/kernel-features.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/pread.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/ptrace.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise.
+
+ * sysdeps/mips/atomicity.h: Use _ABIO32, _ABIN32 and _ABI64 for
+ ABI selection throughout.
+ * sysdeps/mips/bits/setjmp.h: Likewise.
+ * sysdeps/mips/fpu/bits/mathdef.h: Likewise.
+ * sysdeps/mips/machine-gmon.h: Likewise.
+ * sysdeps/mips/sys/asm.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise.
+ * sysdeps/unix/sysv/linux/mips/sys/user.h: Likewise.
+
+ * sysdeps/mips/sgidefs.h: Prevent <asm/sgidefs.h> from being
+ included by kernel headers and undo its settings if already
+ included. Define _ABIO32, _ABIN32 and _ABI64 if missing and use
+ them to define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32 and
+ _MIPS_SIM_ABI64 for compatibility.
+ * sysdeps/unix/sysv/linux/mips/Makefile: Use _ABIO32, _ABIN32 and
+ _ABI64 for ABI selection in generated syscall-list.h
+ * sysdeps/unix/sysv/linux/mips/configure.in: Use _ABIO32, _ABIN32
+ and _ABI64 for ABI selection in generated asm-unistd.h.
+ * sysdeps/unix/sysv/linux/mips/configure: Regenerate.
+
+ * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Correct
+ an inverted _MIPS_SIM conditional.
+
2004-11-23 Alexandre Oliva <aoliva@redhat.com>
* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Use free
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index b52b8f264b..4b4a3c3390 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -1,3 +1,10 @@
+2004-11-05 Maciej W. Rozycki <macro@mips.com>
+
+ * sysdeps/mips/pspinlock.c: Include <sgidefs.h>. Use _ABIO32,
+ _ABIN32 and _ABI64 for ABI selection throughout.
+ * sysdeps/mips/pt-machine.h: Use _ABIO32, _ABIN32 and _ABI64 for
+ ABI selection throughout.
+
2004-10-18 Roland McGrath <roland@redhat.com>
[BZ #406]
diff --git a/sysdeps/mips/atomicity.h b/sysdeps/mips/atomicity.h
index f3d05bd50e..7380e1000c 100644
--- a/sysdeps/mips/atomicity.h
+++ b/sysdeps/mips/atomicity.h
@@ -33,7 +33,7 @@ exchange_and_add (volatile uint32_t *mem, int val)
("/* Inline exchange & add */\n"
"1:\n\t"
".set push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
"ll %0,%3\n\t"
@@ -59,7 +59,7 @@ atomic_add (volatile uint32_t *mem, int val)
("/* Inline atomic add */\n"
"1:\n\t"
".set push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
"ll %0,%2\n\t"
@@ -83,10 +83,10 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
("/* Inline compare & swap */\n"
"1:\n\t"
".set push\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
"lld %1,%5\n\t"
#else
"ll %1,%5\n\t"
@@ -94,7 +94,7 @@ compare_and_swap (volatile long int *p, long int oldval, long int newval)
"move %0,$0\n\t"
"bne %1,%3,2f\n\t"
"move %0,%4\n\t"
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
"scd %0,%2\n\t"
#else
"sc %0,%2\n\t"
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 4ca199d7b6..ec0aaa020d 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -26,7 +26,7 @@
typedef struct
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
/* Program counter. */
__ptr_t __pc;
@@ -62,7 +62,7 @@ typedef struct
int __fpc_csr;
/* Callee-saved floating point registers. */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
double __fpregs[8];
#else
double __fpregs[6];
diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h
index 49fdffb93d..0d87b65691 100644
--- a/sysdeps/mips/dl-machine.h
+++ b/sysdeps/mips/dl-machine.h
@@ -32,6 +32,7 @@
#error ENTRY_POINT needs to be defined for MIPS.
#endif
+#include <sgidefs.h>
#include <sys/asm.h>
/* The offset of gp from GOT might be system-dependent. It's set by
@@ -74,10 +75,9 @@ do { if ((l)->l_info[DT_MIPS (RLD_MAP)]) \
static inline int __attribute_used__
elf_machine_matches_host (const ElfW(Ehdr) *ehdr)
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
/* Don't link o32 and n32 together. */
- if (((ehdr->e_flags & EF_MIPS_ABI2) != 0)
- != (_MIPS_SIM != _MIPS_SIM_ABI32))
+ if (((ehdr->e_flags & EF_MIPS_ABI2) != 0) != (_MIPS_SIM == _ABIN32))
return 0;
#endif
@@ -130,7 +130,7 @@ elf_machine_load_address (void)
}
/* The MSB of got[1] of a gnu object is set to identify gnu objects. */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
# define ELF_MIPS_GNU_GOT1_MASK 0x8000000000000000L
#else
# define ELF_MIPS_GNU_GOT1_MASK 0x80000000L
@@ -257,7 +257,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
return NULL;
}
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
#define ELF_DL_FRAME_SIZE 40
#define ELF_DL_SAVE_ARG_REGS "\
@@ -278,7 +278,7 @@ elf_machine_runtime_link_map (ElfW(Addr) gpreg, ElfW(Addr) stub_pc)
#define IFABIO32(X) X
-#else /* _MIPS_SIM == _MIPS_SIM_NABI32 || _MIPS_SIM == _MIPS_SIM_ABI64 */
+#else /* _MIPS_SIM == _ABIN32 || _MIPS_SIM == _ABI64 */
#define ELF_DL_FRAME_SIZE 80
@@ -550,7 +550,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
switch (r_type)
{
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
case (R_MIPS_64 << 8) | R_MIPS_REL32:
#else
case R_MIPS_REL32:
@@ -615,7 +615,7 @@ elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc,
break;
case R_MIPS_NONE: /* Alright, Wilbur. */
break;
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
case R_MIPS_64:
/* For full compliance with the ELF64 ABI, one must precede the
_REL32/_64 pair of relocations with a _64 relocation, such
diff --git a/sysdeps/mips/elf/start.S b/sysdeps/mips/elf/start.S
index 3dd513777d..d9cc3b7ee2 100644
--- a/sysdeps/mips/elf/start.S
+++ b/sysdeps/mips/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code compliant to the ELF Mips ABI.
- Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003
+ Copyright (C) 1995, 1997, 2000, 2001, 2002, 2003, 2004
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -37,6 +37,7 @@
#define __ASSEMBLY__ 1
#include <entry.h>
+#include <sgidefs.h>
#include <sys/asm.h>
#ifndef ENTRY_POINT
@@ -93,12 +94,12 @@ ENTRY_POINT:
on o32 and quad words (16 bytes) on n32 and n64. */
and $29, -2 * SZREG
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
PTR_SUBIU $29, 32
#endif
PTR_LA $7, __libc_csu_init /* init */
PTR_LA $8, __libc_csu_fini
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
PTR_S $8, 16($29) /* fini */
PTR_S $2, 20($29) /* rtld_fini */
PTR_S $29, 24($29) /* stack_end */
diff --git a/sysdeps/mips/fpu/bits/mathdef.h b/sysdeps/mips/fpu/bits/mathdef.h
index c1ce876bf7..99be0db2b5 100644
--- a/sysdeps/mips/fpu/bits/mathdef.h
+++ b/sysdeps/mips/fpu/bits/mathdef.h
@@ -39,7 +39,7 @@ typedef double double_t; /* `double' expressions are evaluated as
#endif /* ISO C99 */
-#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _MIPS_SIM_ABI32
+#if ! defined __NO_LONG_DOUBLE_MATH && _MIPS_SIM == _ABIO32
/* Signal that we do not really have a `long double'. This disables the
declaration of all the `long double' function variants. */
# define __NO_LONG_DOUBLE_MATH 1
diff --git a/sysdeps/mips/machine-gmon.h b/sysdeps/mips/machine-gmon.h
index f23a4c3008..7a089fa595 100644
--- a/sysdeps/mips/machine-gmon.h
+++ b/sysdeps/mips/machine-gmon.h
@@ -26,7 +26,7 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
/* Call __mcount with the return PC for our caller,
and the return PC our caller will return to. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
#ifdef __PIC__
# define CPLOAD ".cpload $25;"
@@ -83,10 +83,10 @@ static void __attribute_used__ __mcount (u_long frompc, u_long selfpc)
# define CPRETURN
#endif
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
# define PTR_ADDU_STRING "add" /* no u */
# define PTR_SUBU_STRING "sub" /* no u */
-#elif _MIPS_SIM == _MIPS_SIM_ABI64
+#elif _MIPS_SIM == _ABI64
# define PTR_ADDU_STRING "daddu"
# define PTR_SUBU_STRING "dsubu"
#else
diff --git a/sysdeps/mips/mips64/__longjmp.c b/sysdeps/mips/mips64/__longjmp.c
index b2705793b2..546493f842 100644
--- a/sysdeps/mips/mips64/__longjmp.c
+++ b/sysdeps/mips/mips64/__longjmp.c
@@ -19,6 +19,7 @@
02111-1307 USA. */
#include <setjmp.h>
+#include <sgidefs.h>
#include <stdlib.h>
#undef __longjmp
@@ -39,7 +40,7 @@ __longjmp (env, val_arg)
register int val asm ("a1");
/* Pull back the floating point callee-saved registers. */
-#if _MIPS_SIM == _MIPS_SIM_ABI64
+#if _MIPS_SIM == _ABI64
asm volatile ("l.d $f24, %0" : : "m" (env[0].__fpregs[0]));
asm volatile ("l.d $f25, %0" : : "m" (env[0].__fpregs[1]));
asm volatile ("l.d $f26, %0" : : "m" (env[0].__fpregs[2]));
diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S
index 73f5cc2de2..7620cf391f 100644
--- a/sysdeps/mips/mips64/bsd-_setjmp.S
+++ b/sysdeps/mips/mips64/bsd-_setjmp.S
@@ -1,5 +1,6 @@
/* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. MIPS64 version.
- Copyright (C) 1996, 1997, 2000, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2002, 2003, 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
@@ -21,6 +22,7 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */
+#include <sgidefs.h>
#include <sysdep.h>
#include <sys/asm.h>
@@ -33,7 +35,7 @@ ENTRY (_setjmp)
#endif
SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp))
PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp)
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
nop
#endif
RESTORE_GP64
diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S
index f542cb565f..2a1fd9ce71 100644
--- a/sysdeps/mips/mips64/bsd-setjmp.S
+++ b/sysdeps/mips/mips64/bsd-setjmp.S
@@ -1,5 +1,5 @@
/* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version.
- Copyright (C) 1996, 1997, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2002, 2003, 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
@@ -21,6 +21,7 @@
We cannot do it in C because it must be a tail-call, so frame-unwinding
in setjmp doesn't clobber the state restored by longjmp. */