aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mips/sys
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 /sysdeps/mips/sys
parentcdb7b96289c0605afe393a69a5865a1cedf072dc (diff)
downloadglibc-c997e9d40ec0f2f9c61a2325efb5b73b92cc91c1.zip
glibc-c997e9d40ec0f2f9c61a2325efb5b73b92cc91c1.tar.gz
glibc-c997e9d40ec0f2f9c61a2325efb5b73b92cc91c1.tar.bz2
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.
Diffstat (limited to 'sysdeps/mips/sys')
-rw-r--r--sysdeps/mips/sys/asm.h28
-rw-r--r--sysdeps/mips/sys/regdef.h10
-rw-r--r--sysdeps/mips/sys/ucontext.h9
3 files changed, 25 insertions, 22 deletions
diff --git a/sysdeps/mips/sys/asm.h b/sysdeps/mips/sys/asm.h
index 76f6af3..b04c36b 100644
--- a/sysdeps/mips/sys/asm.h
+++ b/sysdeps/mips/sys/asm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -37,11 +37,11 @@
* 64 bit address space isn't used yet, so we may use the R3000 32 bit
* defines for now.
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32) || (_MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIN32
# define PTR .word
# define PTRSIZE 4
# define PTRLOG 2
-#elif (_MIPS_SIM == _MIPS_SIM_ABI64)
+#elif _MIPS_SIM == _ABI64
# define PTR .dword
# define PTRSIZE 8
# define PTRLOG 3
@@ -50,7 +50,7 @@
/*
* PIC specific declarations
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#if _MIPS_SIM == _ABIO32
# ifdef __PIC__
# define CPRESTORE(register) \
.cprestore register
@@ -97,7 +97,7 @@ l: \
# define SETUP_GPX64_L(cp_reg, ra_save, l)
# define RESTORE_GP64
# define USE_ALT_CP(a)
-#else /* (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32) */
+#else /* _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32 */
/*
* For callee-saved gp calling convention:
*/
@@ -131,15 +131,15 @@ l: \
/* Use alternate register for context pointer. */
# define USE_ALT_CP(reg) \
.cplocal reg
-#endif /* _MIPS_SIM != _MIPS_SIM_ABI32 */
+#endif /* _MIPS_SIM != _ABIO32 */
/*
* Stack Frame Definitions
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#if _MIPS_SIM == _ABIO32
# define NARGSAVE 4 /* Space for 4 argument registers must be allocated. */
#endif
-#if (_MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
# define NARGSAVE 0 /* No caller responsibilities. */
#endif
@@ -287,7 +287,7 @@ symbol = value
/*
* Stack alignment
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
# define ALSZ 15
# define ALMASK ~15
#else
@@ -298,7 +298,7 @@ symbol = value
/*
* Size of a register
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI64) || (_MIPS_SIM == _MIPS_SIM_NABI32)
+#if _MIPS_SIM == _ABI64 || _MIPS_SIM == _ABIN32
# define SZREG 8
#else
# define SZREG 4
@@ -389,7 +389,7 @@ symbol = value
/*
* How to add/sub/load/store/shift pointers.
*/
-#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 32)
+#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 32)
# define PTR_ADD add
# define PTR_ADDI addi
# define PTR_ADDU addu
@@ -411,7 +411,7 @@ symbol = value
# define PTR_SCALESHIFT 2
#endif
-#if _MIPS_SIM == _MIPS_SIM_NABI32
+#if _MIPS_SIM == _ABIN32
# define PTR_ADD add
# define PTR_ADDI addi
# define PTR_ADDU add /* no u */
@@ -433,8 +433,8 @@ symbol = value
# define PTR_SCALESHIFT 2
#endif
-#if (_MIPS_SIM == _MIPS_SIM_ABI32 && _MIPS_SZPTR == 64 /* o64??? */) \
- || _MIPS_SIM == _MIPS_SIM_ABI64
+#if (_MIPS_SIM == _ABIO32 && _MIPS_SZPTR == 64 /* o64??? */) \
+ || _MIPS_SIM == _ABI64
# define PTR_ADD dadd
# define PTR_ADDI daddi
# define PTR_ADDU daddu
diff --git a/sysdeps/mips/sys/regdef.h b/sysdeps/mips/sys/regdef.h
index 9d2c4c1..8fb898a 100644
--- a/sysdeps/mips/sys/regdef.h
+++ b/sysdeps/mips/sys/regdef.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ralf Baechle <ralf@gnu.org>.
@@ -20,6 +20,8 @@
#ifndef _SYS_REGDEF_H
#define _SYS_REGDEF_H
+#include <sgidefs.h>
+
/*
* Symbolic register names for 32 bit ABI
*/
@@ -31,7 +33,7 @@
#define a1 $5
#define a2 $6
#define a3 $7
-#if _MIPS_SIM != _MIPS_SIM_ABI32
+#if _MIPS_SIM != _ABIO32
#define a4 $8
#define a5 $9
#define a6 $10
@@ -44,7 +46,7 @@
#define ta1 a5
#define ta2 a6
#define ta3 a7
-#else /* if _MIPS_SIM == _MIPS_SIM_ABI32 */
+#else /* if _MIPS_SIM == _ABIO32 */
#define t0 $8 /* caller saved */
#define t1 $9
#define t2 $10
@@ -57,7 +59,7 @@
#define ta1 t5
#define ta2 t6
#define ta3 t7
-#endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */
+#endif /* _MIPS_SIM == _ABIO32 */
#define s0 $16 /* callee saved */
#define s1 $17
#define s2 $18
diff --git a/sysdeps/mips/sys/ucontext.h b/sysdeps/mips/sys/ucontext.h
index 90aa09a..fe378e9 100644
--- a/sysdeps/mips/sys/ucontext.h
+++ b/sysdeps/mips/sys/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 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
@@ -22,10 +22,11 @@
#define _SYS_UCONTEXT_H 1
#include <features.h>
+#include <sgidefs.h>
#include <signal.h>
/* Type for general register. */
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
typedef __uint32_t greg_t;
#else
typedef __uint64_t greg_t;
@@ -119,7 +120,7 @@ typedef struct fpregset
{
union
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
double fp_dregs[16];
float fp_fregs[32];
unsigned int fp_regs[32];
@@ -143,7 +144,7 @@ typedef struct
/* Userlevel context. */
typedef struct ucontext
{
-#if _MIPS_SIM == _MIPS_SIM_ABI32
+#if _MIPS_SIM == _ABIO32
unsigned long int uc_flags;
#else
__uint64_t uc_flags;