diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-03-17 15:47:13 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@redhat.com> | 2003-03-17 15:47:13 +0000 |
commit | 4947b4b20f49324647a7cbcd2596b1f5b4639748 (patch) | |
tree | 0447ee1cce55994f03a92ba7413268c51be85d11 /sysdeps/mips/mips64 | |
parent | de4471dd559ab27a8927135fb5a475eaa613c437 (diff) | |
download | glibc-4947b4b20f49324647a7cbcd2596b1f5b4639748.tar.gz glibc-4947b4b20f49324647a7cbcd2596b1f5b4639748.tar.xz glibc-4947b4b20f49324647a7cbcd2596b1f5b4639748.zip |
* sysdeps/mips/bits/wordsize.h: New file, appropriate for all 3 ABIs. * sysdeps/mips/mips64/gmp-mparam.h: New file. Define BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs. * sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros. (__sigsetjmp_aux): Use them. Adjust for all 3 ABIs. * sysdeps/mips/elf/start.S: Adjust for all 3 ABIs. * sysdeps/unix/mips/brk.S: Likewise. * sysdeps/unix/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. * sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. * sysdeps/mips/mips64/setjmp.S: Likewise. * sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete. * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for 64-bit types.
2003-03-17 Alexandre Oliva <aoliva@redhat.com> * sysdeps/mips/bits/wordsize.h: New file, appropriate for all 3 ABIs. * sysdeps/mips/mips64/gmp-mparam.h: New file. Define BITS_PER_LONGINT to __WORDSIZE, to match all 3 ABIs. * sysdeps/mips/setjmp_aux.c (STRINGXP, REGS, PTRS): New macros. (__sigsetjmp_aux): Use them. Adjust for all 3 ABIs. * sysdeps/mips/elf/start.S: Adjust for all 3 ABIs. * sysdeps/unix/mips/brk.S: Likewise. * sysdeps/unix/mips/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/mips/clone.S: Likewise. * sysdeps/mips/bits/setjmp.h (__jmp_buf): Likewise. * sysdeps/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/profcs.h: Likewise. * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. * sysdeps/mips/mips64/setjmp.S: Likewise. * sysdeps/mips/mips64/bits/setjmp.h: Deleted, obsolete. * sysdeps/mips/mips64/soft-fp/sfp-machine.h: Use long long for 64-bit types.
Diffstat (limited to 'sysdeps/mips/mips64')
-rw-r--r-- | sysdeps/mips/mips64/bits/setjmp.h | 57 | ||||
-rw-r--r-- | sysdeps/mips/mips64/bsd-_setjmp.S | 19 | ||||
-rw-r--r-- | sysdeps/mips/mips64/bsd-setjmp.S | 20 | ||||
-rw-r--r-- | sysdeps/mips/mips64/gmp-mparam.h | 31 | ||||
-rw-r--r-- | sysdeps/mips/mips64/setjmp.S | 12 | ||||
-rw-r--r-- | sysdeps/mips/mips64/soft-fp/sfp-machine.h | 6 |
6 files changed, 72 insertions, 73 deletions
diff --git a/sysdeps/mips/mips64/bits/setjmp.h b/sysdeps/mips/mips64/bits/setjmp.h deleted file mode 100644 index e126427dbd..0000000000 --- a/sysdeps/mips/mips64/bits/setjmp.h +++ /dev/null @@ -1,57 +0,0 @@ -/* Define the machine-dependent type `jmp_buf'. MIPS version. - Copyright (C) 1996, 1997 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. */ - -#ifndef _SETJMP_H -# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." -#endif - -typedef struct - { - /* Program counter. */ - __ptr_t __pc; - - /* Stack pointer. */ - __ptr_t __sp; - - /* Callee-saved registers s0 through s7. */ - int __regs[8]; - - /* The frame pointer. */ - __ptr_t __fp; - - /* The global pointer. */ - __ptr_t __gp; - - /* Floating point status register. */ - int __fpc_csr; - - /* Callee-saved floating point registers. */ - double __fpregs[8]; - } __jmp_buf[1]; - -#ifdef __USE_MISC -/* Offset to the program counter in `jmp_buf'. */ -# define JB_PC 0 -#endif - - -/* Test if longjmp to JMPBUF would unwind the frame - containing a local variable at ADDRESS. */ -#define _JMPBUF_UNWINDS(jmpbuf, address) \ - ((__ptr_t) (address) < (jmpbuf)[0].__sp) diff --git a/sysdeps/mips/mips64/bsd-_setjmp.S b/sysdeps/mips/mips64/bsd-_setjmp.S index c0ff0d7621..9d79ab0a2f 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 (..., 0)'. MIPS64 version. - Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002, 2003 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 @@ -28,10 +28,19 @@ #endif ENTRY (_setjmp) #ifdef __PIC__ - .cpload t9 + SETUP_GP #endif - dla t9, C_SYMBOL_NAME (__sigsetjmp) + SETUP_GP64 (v0, C_SYMBOL_NAME (_setjmp)) + PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) +#if _MIPS_SIM == _MIPS_SIM_ABI32 nop - jr t9 - dli a1, 0 /* Pass a second argument of zero. */ +#endif + RESTORE_GP64 + move a1, zero /* Pass a second argument of zero. */ +#ifdef __PIC__ + jr t9 +#else + j C_SYMBOL_NAME (__sigsetjmp) +#endif + .end _setjmp libc_hidden_def (_setjmp) diff --git a/sysdeps/mips/mips64/bsd-setjmp.S b/sysdeps/mips/mips64/bsd-setjmp.S index ee8678728c..f542cb565f 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 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2002, 2003 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,15 +22,25 @@ in setjmp doesn't clobber the state restored by longjmp. */ #include <sysdep.h> +#include <sys/asm.h> #ifdef PIC .option pic2 #endif ENTRY (setjmp) -#ifdef PIC - .cpload t9 +#ifdef __PIC__ + SETUP_GP #endif - dla t9, C_SYMBOL_NAME (__sigsetjmp) + SETUP_GP64 (v0, C_SYMBOL_NAME (setjmp)) + PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) +#if _MIPS_SIM == _MIPS_SIM_ABI32 nop - jr t9 +#endif + RESTORE_GP64 dli a1, 1 /* Pass a second argument of one. */ +#ifdef __PIC__ + jr t9 +#else + j C_SYMBOL_NAME (__sigsetjmp) +#endif + .end setjmp diff --git a/sysdeps/mips/mips64/gmp-mparam.h b/sysdeps/mips/mips64/gmp-mparam.h new file mode 100644 index 0000000000..7666137a21 --- /dev/null +++ b/sysdeps/mips/mips64/gmp-mparam.h @@ -0,0 +1,31 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright (C) 1991, 1993, 1994, 2002, 2003 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP 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 MP 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 MP Library; see the file COPYING.LIB. If not, write to +the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#if defined __GMP_H__ && ! defined _LONG_LONG_LIMB +#error "Included too late for _LONG_LONG_LIMB to take effect" +#endif + +#define _LONG_LONG_LIMB +#define BITS_PER_MP_LIMB 64 +#define BYTES_PER_MP_LIMB 8 +#define BITS_PER_LONGINT __WORDSIZE +#define BITS_PER_INT 32 +#define BITS_PER_SHORTINT 16 +#define BITS_PER_CHAR 8 diff --git a/sysdeps/mips/mips64/setjmp.S b/sysdeps/mips/mips64/setjmp.S index 5e18897d88..3d2bf20e7c 100644 --- a/sysdeps/mips/mips64/setjmp.S +++ b/sysdeps/mips/mips64/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 2000, 2002, 2003 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,6 +17,7 @@ 02111-1307 USA. */ #include <sysdep.h> +#include <sys/asm.h> /* The function __sigsetjmp_aux saves all the registers, but it can't reliably access the stack or frame pointers, so we pass them in as @@ -26,10 +27,15 @@ #endif ENTRY (__sigsetjmp) #ifdef __PIC__ - .cpload t9 + SETUP_GP #endif + SETUP_GP64 (v0, C_SYMBOL_NAME (__sigsetjmp)) move a2, sp move a3, fp - dla t9, __sigsetjmp_aux + PTR_LA t9, __sigsetjmp_aux +#if _MIPS_SIM == _MIPS_SIM_ABI32 nop +#endif + RESTORE_GP64 jr t9 + .end __sigsetjmp diff --git a/sysdeps/mips/mips64/soft-fp/sfp-machine.h b/sysdeps/mips/mips64/soft-fp/sfp-machine.h index 730deae872..309a14a5f8 100644 --- a/sysdeps/mips/mips64/soft-fp/sfp-machine.h +++ b/sysdeps/mips/mips64/soft-fp/sfp-machine.h @@ -1,7 +1,7 @@ #define _FP_W_TYPE_SIZE 64 -#define _FP_W_TYPE unsigned long -#define _FP_WS_TYPE signed long -#define _FP_I_TYPE long +#define _FP_W_TYPE unsigned long long +#define _FP_WS_TYPE signed long long +#define _FP_I_TYPE long long #define _FP_MUL_MEAT_S(R,X,Y) \ _FP_MUL_MEAT_1_imm(_FP_WFRACBITS_S,R,X,Y) |