From 5155e70cbe179919d3d10a7b8d91ba9ee775c9fc Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sat, 7 Jan 2012 20:32:29 +0000 Subject: [PATCH] Remove ARM old-ABI support (straightforward parts). --- ChangeLog.arm | 44 +++ sysdeps/arm/__longjmp.S | 37 --- sysdeps/arm/bits/atomic.h | 101 ------- sysdeps/arm/bits/huge_val.h | 56 ---- sysdeps/arm/bits/setjmp.h | 34 --- sysdeps/arm/fpu/__longjmp.S | 36 --- sysdeps/arm/fpu/bits/fenv.h | 58 ---- sysdeps/arm/fpu/bits/setjmp.h | 34 --- sysdeps/arm/fpu/fclrexcpt.c | 50 ---- sysdeps/arm/fpu/fedisblxcpt.c | 40 --- sysdeps/arm/fpu/feenablxcpt.c | 40 --- sysdeps/arm/fpu/fegetenv.c | 41 --- sysdeps/arm/fpu/fegetexcept.c | 32 --- sysdeps/arm/fpu/fegetround.c | 26 -- sysdeps/arm/fpu/feholdexcpt.c | 39 --- sysdeps/arm/fpu/fesetenv.c | 45 --- sysdeps/arm/fpu/fesetround.c | 29 -- sysdeps/arm/fpu/fpu_control.h | 102 ------- sysdeps/arm/fpu/fraiseexcpt.c | 44 --- sysdeps/arm/fpu/fsetexcptflg.c | 49 ---- sysdeps/arm/fpu/ftestexcept.c | 33 --- sysdeps/arm/fpu/jmpbuf-offsets.h | 20 -- sysdeps/arm/fpu/setjmp.S | 37 --- sysdeps/arm/jmpbuf-offsets.h | 20 -- sysdeps/arm/machine-gmon.h | 90 ------ sysdeps/arm/preconfigure | 3 +- sysdeps/arm/setjmp.S | 33 --- sysdeps/unix/sysv/linux/arm/____longjmp_chk.S | 75 ----- sysdeps/unix/sysv/linux/arm/check_pf.c | 312 --------------------- sysdeps/unix/sysv/linux/arm/eabi/Makefile | 3 - sysdeps/unix/sysv/linux/arm/eabi/check_pf.c | 1 - sysdeps/unix/sysv/linux/arm/mmap64.S | 89 ------ sysdeps/unix/sysv/linux/arm/msgctl.c | 1 - sysdeps/unix/sysv/linux/arm/nptl/Makefile | 8 - sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h | 136 --------- .../unix/sysv/linux/arm/nptl/unwind-forcedunwind.c | 146 ---------- sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c | 87 ------ sysdeps/unix/sysv/linux/arm/nptl/unwind.h | 31 -- sysdeps/unix/sysv/linux/arm/semctl.c | 1 - sysdeps/unix/sysv/linux/arm/shmctl.c | 1 - sysdeps/unix/sysv/linux/arm/sigrestorer.S | 35 --- 41 files changed, 46 insertions(+), 2053 deletions(-) delete mode 100644 sysdeps/arm/__longjmp.S delete mode 100644 sysdeps/arm/bits/atomic.h delete mode 100644 sysdeps/arm/bits/huge_val.h delete mode 100644 sysdeps/arm/bits/setjmp.h delete mode 100644 sysdeps/arm/fpu/__longjmp.S delete mode 100644 sysdeps/arm/fpu/bits/fenv.h delete mode 100644 sysdeps/arm/fpu/bits/setjmp.h delete mode 100644 sysdeps/arm/fpu/fclrexcpt.c delete mode 100644 sysdeps/arm/fpu/fedisblxcpt.c delete mode 100644 sysdeps/arm/fpu/feenablxcpt.c delete mode 100644 sysdeps/arm/fpu/fegetenv.c delete mode 100644 sysdeps/arm/fpu/fegetexcept.c delete mode 100644 sysdeps/arm/fpu/fegetround.c delete mode 100644 sysdeps/arm/fpu/feholdexcpt.c delete mode 100644 sysdeps/arm/fpu/fesetenv.c delete mode 100644 sysdeps/arm/fpu/fesetround.c delete mode 100644 sysdeps/arm/fpu/fpu_control.h delete mode 100644 sysdeps/arm/fpu/fraiseexcpt.c delete mode 100644 sysdeps/arm/fpu/fsetexcptflg.c delete mode 100644 sysdeps/arm/fpu/ftestexcept.c delete mode 100644 sysdeps/arm/fpu/jmpbuf-offsets.h delete mode 100644 sysdeps/arm/fpu/setjmp.S delete mode 100644 sysdeps/arm/jmpbuf-offsets.h delete mode 100644 sysdeps/arm/machine-gmon.h delete mode 100644 sysdeps/arm/setjmp.S delete mode 100644 sysdeps/unix/sysv/linux/arm/____longjmp_chk.S delete mode 100644 sysdeps/unix/sysv/linux/arm/check_pf.c delete mode 100644 sysdeps/unix/sysv/linux/arm/eabi/check_pf.c delete mode 100644 sysdeps/unix/sysv/linux/arm/mmap64.S delete mode 100644 sysdeps/unix/sysv/linux/arm/msgctl.c delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/Makefile delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c delete mode 100644 sysdeps/unix/sysv/linux/arm/nptl/unwind.h delete mode 100644 sysdeps/unix/sysv/linux/arm/semctl.c delete mode 100644 sysdeps/unix/sysv/linux/arm/shmctl.c delete mode 100644 sysdeps/unix/sysv/linux/arm/sigrestorer.S diff --git a/ChangeLog.arm b/ChangeLog.arm index 0d0b6ff..70bc540 100644 --- a/ChangeLog.arm +++ b/ChangeLog.arm @@ -1,3 +1,47 @@ +2012-01-07 Joseph Myers + + * sysdeps/arm/preconfigure: Give error for old-ABI ARM. + * sysdeps/unix/sysv/linux/arm/eabi/Makefile (arm-using-eabi): + Don't define. + * sysdeps/arm/__longjmp.S: Remove. + * sysdeps/arm/bits/atomic.h: Remove. + * sysdeps/arm/bits/huge_val.h: Remove. + * sysdeps/arm/bits/setjmp.h: Remove. + * sysdeps/arm/fpu/__longjmp.S: Remove. + * sysdeps/arm/fpu/bits/fenv.h: Remove. + * sysdeps/arm/fpu/bits/setjmp.h: Remove. + * sysdeps/arm/fpu/fclrexcpt.c: Remove. + * sysdeps/arm/fpu/fedisblxcpt.c: Remove. + * sysdeps/arm/fpu/feenablxcpt.c: Remove. + * sysdeps/arm/fpu/fegetenv.c: Remove. + * sysdeps/arm/fpu/fegetexcept.c: Remove. + * sysdeps/arm/fpu/fegetround.c: Remove. + * sysdeps/arm/fpu/feholdexcpt.c: Remove. + * sysdeps/arm/fpu/fesetenv.c: Remove. + * sysdeps/arm/fpu/fesetround.c: Remove. + * sysdeps/arm/fpu/fpu_control.h: Remove. + * sysdeps/arm/fpu/fraiseexcpt.c: Remove. + * sysdeps/arm/fpu/fsetexcptflg.c: Remove. + * sysdeps/arm/fpu/ftestexcept.c: Remove. + * sysdeps/arm/fpu/jmpbuf-offsets.h: Remove. + * sysdeps/arm/fpu/setjmp.S: Remove. + * sysdeps/arm/jmpbuf-offsets.h: Remove. + * sysdeps/arm/machine-gmon.h: Remove. + * sysdeps/arm/setjmp.S: Remove. + * sysdeps/unix/sysv/linux/arm/____longjmp_chk.S: Remove. + * sysdeps/unix/sysv/linux/arm/check_pf.c: Remove. + * sysdeps/unix/sysv/linux/arm/eabi/check_pf.c: Remove. + * sysdeps/unix/sysv/linux/arm/mmap64.S: Remove. + * sysdeps/unix/sysv/linux/arm/msgctl.c: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/Makefile: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c: Remove. + * sysdeps/unix/sysv/linux/arm/nptl/unwind.h: Remove. + * sysdeps/unix/sysv/linux/arm/semctl.c: Remove. + * sysdeps/unix/sysv/linux/arm/shmctl.c: Remove. + * sysdeps/unix/sysv/linux/arm/sigrestorer.S: Remove. + 2012-01-05 Nathan Sidwell Tom de Vries diff --git a/sysdeps/arm/__longjmp.S b/sysdeps/arm/__longjmp.S deleted file mode 100644 index 09e6386..0000000 --- a/sysdeps/arm/__longjmp.S +++ /dev/null @@ -1,37 +0,0 @@ -/* longjmp for ARM. - Copyright (C) 1997, 1998, 2009 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 -#define _SETJMP_H -#define _ASM -#include - -/* __longjmp(jmpbuf, val) */ - -ENTRY (__longjmp) - mov ip, r0 - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - -#ifdef CHECK_SP - ldr r4, [ip, #32] - CHECK_SP (r4) -#endif - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) -END (__longjmp) diff --git a/sysdeps/arm/bits/atomic.h b/sysdeps/arm/bits/atomic.h deleted file mode 100644 index 14d2dbe..0000000 --- a/sysdeps/arm/bits/atomic.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (C) 2002, 2003, 2004, 2005 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 -#include - - -typedef int8_t atomic8_t; -typedef uint8_t uatomic8_t; -typedef int_fast8_t atomic_fast8_t; -typedef uint_fast8_t uatomic_fast8_t; - -typedef int32_t atomic32_t; -typedef uint32_t uatomic32_t; -typedef int_fast32_t atomic_fast32_t; -typedef uint_fast32_t uatomic_fast32_t; - -typedef intptr_t atomicptr_t; -typedef uintptr_t uatomicptr_t; -typedef intmax_t atomic_max_t; -typedef uintmax_t uatomic_max_t; - -void __arm_link_error (void); - -#define atomic_exchange_acq(mem, newvalue) \ - ({ __typeof (*mem) result; \ - if (sizeof (*mem) == 1) \ - __asm__ __volatile__ ("swpb %0, %1, [%2]" \ - : "=&r,&r" (result) \ - : "r,0" (newvalue), "r,r" (mem) : "memory"); \ - else if (sizeof (*mem) == 4) \ - __asm__ __volatile__ ("swp %0, %1, [%2]" \ - : "=&r,&r" (result) \ - : "r,0" (newvalue), "r,r" (mem) : "memory"); \ - else \ - { \ - result = 0; \ - abort (); \ - } \ - result; }) - -/* Atomic compare and exchange. These sequences are not actually atomic; - there is a race if *MEM != OLDVAL and we are preempted between the two - swaps. However, they are very close to atomic, and are the best that a - pre-ARMv6 implementation can do without operating system support. - LinuxThreads has been using these sequences for many years. */ - -#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \ - ({ __typeof (oldval) result, tmp; \ - __asm__ ("\n" \ - "0:\tldr\t%1,[%2]\n\t" \ - "cmp\t%1,%4\n\t" \ - "movne\t%0,%1\n\t" \ - "bne\t1f\n\t" \ - "swpb\t%0,%3,[%2]\n\t" \ - "cmp\t%1,%0\n\t" \ - "swpbne\t%1,%0,[%2]\n\t" \ - "bne\t0b\n\t" \ - "1:" \ - : "=&r" (result), "=&r" (tmp) \ - : "r" (mem), "r" (newval), "r" (oldval) \ - : "cc", "memory"); \ - result; }) - -#define __arch_compare_and_exchange_val_16_acq(mem, newval, oldval) \ - ({ __arm_link_error (); oldval; }) - -#define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ - ({ __typeof (oldval) result, tmp; \ - __asm__ ("\n" \ - "0:\tldr\t%1,[%2]\n\t" \ - "cmp\t%1,%4\n\t" \ - "movne\t%0,%1\n\t" \ - "bne\t1f\n\t" \ - "swp\t%0,%3,[%2]\n\t" \ - "cmp\t%1,%0\n\t" \ - "swpne\t%1,%0,[%2]\n\t" \ - "bne\t0b\n\t" \ - "1:" \ - : "=&r" (result), "=&r" (tmp) \ - : "r" (mem), "r" (newval), "r" (oldval) \ - : "cc", "memory"); \ - result; }) - -#define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \ - ({ __arm_link_error (); oldval; }) diff --git a/sysdeps/arm/bits/huge_val.h b/sysdeps/arm/bits/huge_val.h deleted file mode 100644 index 3339a0d..0000000 --- a/sysdeps/arm/bits/huge_val.h +++ /dev/null @@ -1,56 +0,0 @@ -/* `HUGE_VAL' constant for IEEE 754 machines (where it is infinity). - Used by and functions for overflow. - ARM version. - Copyright (C) 1992, 95, 96, 97, 98, 99, 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 - 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 _MATH_H -# error "Never use directly; include instead." -#endif - -/* IEEE positive infinity (-HUGE_VAL is negative infinity). */ - -#if __GNUC_PREREQ(3,3) -# define HUGE_VAL (__builtin_huge_val()) -#elif __GNUC_PREREQ(2,96) -# define HUGE_VAL (__extension__ 0x1.0p2047) -#elif defined __GNUC__ - -# define HUGE_VAL \ - (__extension__ \ - ((union { unsigned __l __attribute__((__mode__(__DI__))); double __d; }) \ - { __l: 0x000000007ff00000ULL }).__d) - -#else /* not GCC */ - -# include - -typedef union { unsigned char __c[8]; double __d; } __huge_val_t; - -# if __BYTE_ORDER == __BIG_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0, 0, 0x7f, 0xf0, 0, 0 } -# endif -# if __BYTE_ORDER == __LITTLE_ENDIAN -# define __HUGE_VAL_bytes { 0, 0, 0xf0, 0x7f, 0, 0, 0, 0 } -# endif - -static __huge_val_t __huge_val = { __HUGE_VAL_bytes }; -# define HUGE_VAL (__huge_val.__d) - -#endif /* GCC. */ diff --git a/sysdeps/arm/bits/setjmp.h b/sysdeps/arm/bits/setjmp.h deleted file mode 100644 index 2792350..0000000 --- a/sysdeps/arm/bits/setjmp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1997,1998,2005,2006 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. */ - -/* Define the machine-dependent type `jmp_buf'. ARM version. */ - -#ifndef _BITS_SETJMP_H -#define _BITS_SETJMP_H 1 - -#if !defined _SETJMP_H && !defined _PTHREAD_H -# error "Never include directly; use instead." -#endif - -#ifndef _ASM -/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -typedef int __jmp_buf[10]; -#endif - -#endif diff --git a/sysdeps/arm/fpu/__longjmp.S b/sysdeps/arm/fpu/__longjmp.S deleted file mode 100644 index 90efeec..0000000 --- a/sysdeps/arm/fpu/__longjmp.S +++ /dev/null @@ -1,36 +0,0 @@ -/* longjmp for ARM. - Copyright (C) 1997, 1998 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 -#define _SETJMP_H -#define _ASM -#include - -/* __longjmp(jmpbuf, val) */ - -ENTRY (__longjmp) - mov ip, r0 /* save jmp_buf pointer */ - - movs r0, r1 /* get the return value in place */ - moveq r0, #1 /* can't let setjmp() return zero! */ - - lfmfd f4, 4, [ip] ! /* load the floating point regs */ - - LOADREGS(ia, ip, {v1-v6, sl, fp, sp, pc}) -END (__longjmp) diff --git a/sysdeps/arm/fpu/bits/fenv.h b/sysdeps/arm/fpu/bits/fenv.h deleted file mode 100644 index 7bd2423..0000000 --- a/sysdeps/arm/fpu/bits/fenv.h +++ /dev/null @@ -1,58 +0,0 @@ -/* Copyright (C) 1997, 1998, 1999 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 _FENV_H -# error "Never use directly; include instead." -#endif - -/* Define bits representing exceptions in the FPU status word. */ -enum - { - FE_INVALID = 1, -#define FE_INVALID FE_INVALID - FE_DIVBYZERO = 2, -#define FE_DIVBYZERO FE_DIVBYZERO - FE_OVERFLOW = 4, -#define FE_OVERFLOW FE_OVERFLOW - FE_UNDERFLOW = 8, -#define FE_UNDERFLOW FE_UNDERFLOW - }; - -/* Amount to shift by to convert an exception to a mask bit. */ -#define FE_EXCEPT_SHIFT 16 - -/* All supported exceptions. */ -#define FE_ALL_EXCEPT \ - (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW | FE_UNDERFLOW) - -/* The ARM FPU basically only supports round-to-nearest. Other rounding - modes exist, but you have to encode them in the actual instruction. */ -#define FE_TONEAREST 0 - -/* Type representing exception flags. */ -typedef unsigned long int fexcept_t; - -/* Type representing floating-point environment. */ -typedef struct - { - unsigned long int __cw; - } -fenv_t; - -/* If the default argument is used we use this value. */ -#define FE_DFL_ENV ((fenv_t *) -1l) diff --git a/sysdeps/arm/fpu/bits/setjmp.h b/sysdeps/arm/fpu/bits/setjmp.h deleted file mode 100644 index 431fa03..0000000 --- a/sysdeps/arm/fpu/bits/setjmp.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1997, 1998, 2005, 2006 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. */ - -/* Define the machine-dependent type `jmp_buf'. ARM version. */ - -#ifndef _BITS_SETJMP_H -#define _BITS_SETJMP_H 1 - -#if !defined _SETJMP_H && !defined _PTHREAD_H -# error "Never include directly; use instead." -#endif - -#ifndef _ASM -/* Jump buffer contains v1-v6, sl, fp, sp and pc. Other registers are not - saved. */ -typedef int __jmp_buf[22]; -#endif - -#endif diff --git a/sysdeps/arm/fpu/fclrexcpt.c b/sysdeps/arm/fpu/fclrexcpt.c deleted file mode 100644 index c6a53df..0000000 --- a/sysdeps/arm/fpu/fclrexcpt.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Clear given exceptions in current floating-point environment. - Copyright (C) 1997,98,99,2000,01 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 -#include - -int -__feclearexcept (int excepts) -{ - unsigned long int temp; - - /* Mask out unsupported bits/exceptions. */ - excepts &= FE_ALL_EXCEPT; - - /* Get the current floating point status. */ - _FPU_GETCW (temp); - - /* Clear the relevant bits. */ - temp &= excepts ^ FE_ALL_EXCEPT; - - /* Put the new data in effect. */ - _FPU_SETCW (temp); - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feclearexcept, __old_feclearexcept) -compat_symbol (libm, __old_feclearexcept, feclearexcept, GLIBC_2_1); -#endif - -versioned_symbol (libm, __feclearexcept, feclearexcept, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fedisblxcpt.c b/sysdeps/arm/fpu/fedisblxcpt.c deleted file mode 100644 index 91f60a9..0000000 --- a/sysdeps/arm/fpu/fedisblxcpt.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Disable floating-point exceptions. - Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell , 2001. - - 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 -#include - -int -fedisableexcept (int excepts) -{ - unsigned long int new_exc, old_exc; - - _FPU_GETCW(new_exc); - - old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; - - excepts &= FE_ALL_EXCEPT; - - new_exc &= ~(excepts << FE_EXCEPT_SHIFT); - - _FPU_SETCW(new_exc); - - return old_exc; -} diff --git a/sysdeps/arm/fpu/feenablxcpt.c b/sysdeps/arm/fpu/feenablxcpt.c deleted file mode 100644 index e77e45a..0000000 --- a/sysdeps/arm/fpu/feenablxcpt.c +++ /dev/null @@ -1,40 +0,0 @@ -/* Enable floating-point exceptions. - Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell , 2001. - - 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 -#include - -int -feenableexcept (int excepts) -{ - unsigned long int new_exc, old_exc; - - _FPU_GETCW(new_exc); - - old_exc = (new_exc >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; - - excepts &= FE_ALL_EXCEPT; - - new_exc |= (excepts << FE_EXCEPT_SHIFT); - - _FPU_SETCW(new_exc); - - return old_exc; -} diff --git a/sysdeps/arm/fpu/fegetenv.c b/sysdeps/arm/fpu/fegetenv.c deleted file mode 100644 index e59d2eb..0000000 --- a/sysdeps/arm/fpu/fegetenv.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Store current floating-point environment. - Copyright (C) 1997,98,99,2000,01,10 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 -#include - -int -__fegetenv (fenv_t *envp) -{ - unsigned long int temp; - _FPU_GETCW (temp); - envp->__cw = temp; - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fegetenv, __old_fegetenv) -compat_symbol (libm, __old_fegetenv, fegetenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__fegetenv, fegetenv) -versioned_symbol (libm, __fegetenv, fegetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fegetexcept.c b/sysdeps/arm/fpu/fegetexcept.c deleted file mode 100644 index 653c8d5..0000000 --- a/sysdeps/arm/fpu/fegetexcept.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Get floating-point exceptions. - Copyright (C) 2001 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Philip Blundell , 2001 - - 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 -#include - -int -fegetexcept (void) -{ - unsigned long temp; - - _FPU_GETCW (temp); - - return (temp >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT; -} diff --git a/sysdeps/arm/fpu/fegetround.c b/sysdeps/arm/fpu/fegetround.c deleted file mode 100644 index 6bf65f5..0000000 --- a/sysdeps/arm/fpu/fegetround.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Return current rounding direction. - Copyright (C) 1997, 1998 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 - -int -fegetround (void) -{ - return FE_TONEAREST; /* Easy. :-) */ -} diff --git a/sysdeps/arm/fpu/feholdexcpt.c b/sysdeps/arm/fpu/feholdexcpt.c deleted file mode 100644 index ae8c6a6..0000000 --- a/sysdeps/arm/fpu/feholdexcpt.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Store current floating-point environment and clear exceptions. - Copyright (C) 1997, 1998, 1999 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 -#include - -int -feholdexcept (fenv_t *envp) -{ - unsigned long int temp; - - /* Store the environment. */ - _FPU_GETCW(temp); - envp->__cw = temp; - - /* Now set all exceptions to non-stop. */ - temp &= ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT); - _FPU_SETCW(temp); - - return 0; -} - -libm_hidden_def (feholdexcept) diff --git a/sysdeps/arm/fpu/fesetenv.c b/sysdeps/arm/fpu/fesetenv.c deleted file mode 100644 index bb8812a..0000000 --- a/sysdeps/arm/fpu/fesetenv.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Install given floating-point environment. - Copyright (C) 1997,98,99,2000,01,02 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 -#include - -int -__fesetenv (const fenv_t *envp) -{ - if (envp == FE_DFL_ENV) - _FPU_SETCW (_FPU_DEFAULT); - else - { - unsigned long int temp = envp->__cw; - _FPU_SETCW (temp); - } - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetenv, __old_fesetenv) -compat_symbol (libm, __old_fesetenv, fesetenv, GLIBC_2_1); -#endif - -libm_hidden_ver (__fesetenv, fesetenv) -versioned_symbol (libm, __fesetenv, fesetenv, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fesetround.c b/sysdeps/arm/fpu/fesetround.c deleted file mode 100644 index 2733e7f..0000000 --- a/sysdeps/arm/fpu/fesetround.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Set current rounding direction. - Copyright (C) 1997, 1998 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 - -int -fesetround (int round) -{ - /* We only support FE_TONEAREST, so there is no need for any work. */ - return (round == FE_TONEAREST)?0:1; -} - -libm_hidden_def (fesetround) diff --git a/sysdeps/arm/fpu/fpu_control.h b/sysdeps/arm/fpu/fpu_control.h deleted file mode 100644 index 65912e4..0000000 --- a/sysdeps/arm/fpu/fpu_control.h +++ /dev/null @@ -1,102 +0,0 @@ -/* FPU control word definitions. ARM version. - Copyright (C) 1996, 1997, 1998, 2000 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 _FPU_CONTROL_H -#define _FPU_CONTROL_H - -/* We have a slight terminology confusion here. On the ARM, the register - * we're interested in is actually the FPU status word - the FPU control - * word is something different (which is implementation-defined and only - * accessible from supervisor mode.) - * - * The FPSR looks like this: - * - * 31-24 23-16 15-8 7-0 - * | system ID | trap enable | system control | exception flags | - * - * We ignore the system ID bits; for interest's sake they are: - * - * 0000 "old" FPE - * 1000 FPPC hardware - * 0001 FPE 400 - * 1001 FPA hardware - * - * The trap enable and exception flags are both structured like this: - * - * 7 - 5 4 3 2 1 0 - * | reserved | INX | UFL | OFL | DVZ | IVO | - * - * where a `1' bit in the enable byte means that the trap can occur, and - * a `1' bit in the flags byte means the exception has occurred. - * - * The exceptions are: - * - * IVO - invalid operation - * DVZ - divide by zero - * OFL - overflow - * UFL - underflow - * INX - inexact (do not use; implementations differ) - * - * The system control byte looks like this: - * - * 7-5 4 3 2 1 0 - * | reserved | AC | EP | SO | NE | ND | - * - * where the bits mean - * - * ND - no denormalised numbers (force them all to zero) - * NE - enable NaN exceptions - * SO - synchronous operation - * EP - use expanded packed-decimal format - * AC - use alternate definition for C flag on compare operations - */ - -/* masking of interrupts */ -#define _FPU_MASK_IM 0x00010000 /* invalid operation */ -#define _FPU_MASK_ZM 0x00020000 /* divide by zero */ -#define _FPU_MASK_OM 0x00040000 /* overflow */ -#define _FPU_MASK_UM 0x00080000 /* underflow */ -#define _FPU_MASK_PM 0x00100000 /* inexact */ -#define _FPU_MASK_DM 0x00000000 /* denormalized operation */ - -/* The system id bytes cannot be changed. - Only the bottom 5 bits in the trap enable byte can be changed. - Only the bottom 5 bits in the system control byte can be changed. - Only the bottom 5 bits in the exception flags are used. - The exception flags are set by the fpu, but can be zeroed by the user. */ -#define _FPU_RESERVED 0xffe0e0e0 /* These bits are reserved. */ - -/* The fdlibm code requires strict IEEE double precision arithmetic, - no interrupts for exceptions, rounding to nearest. Changing the - rounding mode will break long double I/O. Turn on the AC bit, - the compiler generates code that assumes it is on. */ -#define _FPU_DEFAULT 0x00001000 /* Default value. */ -#define _FPU_IEEE 0x001f1000 /* Default + exceptions enabled. */ - -/* Type of the control word. */ -typedef unsigned int fpu_control_t; - -/* Macros for accessing the hardware control word. */ -#define _FPU_GETCW(cw) __asm__ ("rfs %0" : "=r" (cw)) -#define _FPU_SETCW(cw) __asm__ ("wfs %0" : : "r" (cw)) - -/* Default control word set at startup. */ -extern fpu_control_t __fpu_control; - -#endif /* _FPU_CONTROL_H */ diff --git a/sysdeps/arm/fpu/fraiseexcpt.c b/sysdeps/arm/fpu/fraiseexcpt.c deleted file mode 100644 index f7dede2..0000000 --- a/sysdeps/arm/fpu/fraiseexcpt.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Raise given exceptions. - Copyright (C) 1997,98,99,2000,01,02 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 -#include -#include - -int -__feraiseexcept (int excepts) -{ - /* Raise exceptions represented by EXPECTS. */ - fexcept_t temp; - _FPU_GETCW (temp); - temp |= (excepts & FE_ALL_EXCEPT); - _FPU_SETCW (temp); - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__feraiseexcept, __old_feraiseexcept) -compat_symbol (libm, __old_feraiseexcept, feraiseexcept, GLIBC_2_1); -#endif - -libm_hidden_ver (__feraiseexcept, feraiseexcept) -versioned_symbol (libm, __feraiseexcept, feraiseexcept, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/fsetexcptflg.c b/sysdeps/arm/fpu/fsetexcptflg.c deleted file mode 100644 index 4e1d2cb..0000000 --- a/sysdeps/arm/fpu/fsetexcptflg.c +++ /dev/null @@ -1,49 +0,0 @@ -/* Set floating-point environment exception handling. - Copyright (C) 1997,98,99,2000,01 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 -#include -#include - -int -__fesetexceptflag (const fexcept_t *flagp, int excepts) -{ - fexcept_t temp; - - /* Get the current environment. */ - _FPU_GETCW (temp); - - /* Set the desired exception mask. */ - temp &= ~((excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT); - temp |= (*flagp & excepts & FE_ALL_EXCEPT) << FE_EXCEPT_SHIFT; - - /* Save state back to the FPU. */ - _FPU_SETCW (temp); - - /* Success. */ - return 0; -} - -#include -#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2) -strong_alias (__fesetexceptflag, __old_fesetexceptflag) -compat_symbol (libm, __old_fesetexceptflag, fesetexceptflag, GLIBC_2_1); -#endif - -versioned_symbol (libm, __fesetexceptflag, fesetexceptflag, GLIBC_2_2); diff --git a/sysdeps/arm/fpu/ftestexcept.c b/sysdeps/arm/fpu/ftestexcept.c deleted file mode 100644 index c796b01..0000000 --- a/sysdeps/arm/fpu/ftestexcept.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Test exception in current environment. - Copyright (C) 1997, 1998, 2010 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 -#include - -int -fetestexcept (int excepts) -{ - fexcept_t temp; - - /* Get current exceptions. */ - _FPU_GETCW(temp); - - return temp & excepts & FE_ALL_EXCEPT; -} -libm_hidden_def (fetestexcept) diff --git a/sysdeps/arm/fpu/jmpbuf-offsets.h b/sysdeps/arm/fpu/jmpbuf-offsets.h deleted file mode 100644 index ad2a75b..0000000 --- a/sysdeps/arm/fpu/jmpbuf-offsets.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Private macros for accessing __jmp_buf contents. ARM/FPU version. - Copyright (C) 2006 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. */ - -#define __JMP_BUF_SP 20 diff --git a/sysdeps/arm/fpu/setjmp.S b/sysdeps/arm/fpu/setjmp.S deleted file mode 100644 index 82a7e19..0000000 --- a/sysdeps/arm/fpu/setjmp.S +++ /dev/null @@ -1,37 +0,0 @@ -/* setjmp for ARM. - Copyright (C) 1997, 1998 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 -#define _SETJMP_H -#define _ASM -#include - -ENTRY (__sigsetjmp) - /* Save registers */ - sfmea f4, 4, [r0]! - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Restore pointer to jmp_buf */ - sub r0, r0, #48 - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -END (__sigsetjmp) - -hidden_def (__sigsetjmp) diff --git a/sysdeps/arm/jmpbuf-offsets.h b/sysdeps/arm/jmpbuf-offsets.h deleted file mode 100644 index d4f7fe2..0000000 --- a/sysdeps/arm/jmpbuf-offsets.h +++ /dev/null @@ -1,20 +0,0 @@ -/* Private macros for accessing __jmp_buf contents. ARM version. - Copyright (C) 2006 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. */ - -#define __JMP_BUF_SP 8 diff --git a/sysdeps/arm/machine-gmon.h b/sysdeps/arm/machine-gmon.h deleted file mode 100644 index dbda0dd..0000000 --- a/sysdeps/arm/machine-gmon.h +++ /dev/null @@ -1,90 +0,0 @@ -/* Machine-dependent definitions for profiling support. ARM version. - Copyright (C) 1996, 1997, 1998 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. */ - -/* GCC for the ARM cannot compile __builtin_return_address(N) for N != 0, - so we must use an assembly stub. */ - -#include -#ifndef NO_UNDERSCORES -/* The asm symbols for C functions are `_function'. - The canonical name for the counter function is `mcount', no _. */ -void _mcount (void) asm ("mcount"); -#else -/* The canonical name for the function is `_mcount' in both C and asm, - but some old asm code might assume it's `mcount'. */ -void _mcount (void); -weak_alias (_mcount, mcount) -#endif - -static void mcount_internal (u_long frompc, u_long selfpc) __attribute_used__; - -#define _MCOUNT_DECL(frompc, selfpc) \ -static void mcount_internal (u_long frompc, u_long selfpc) - -/* This macro/func MUST save r0, r1 because the compiler inserts - blind calls to _mount(), ignoring the fact that _mcount may - clobber registers; therefore, _mcount may NOT clobber registers */ -/* if (this_fp!=0) { - r0 = this_fp - r1 = this_lr - r1 = [r1-4] which is caller's lr - if (r1!=0) - r1 = caller's lr - call mcount_internal(this_lr, caller's_lr) - } -*/ - -#ifdef __thumb2__ - -#define MCOUNT \ -void _mcount (void) \ -{ \ - __asm__("push {r0, r1, r2, r3};" \ - "movs fp, fp;" \ - "it eq;" \ - "moveq r1, #0;" \ - "itttt ne;" \ - "ldrne r1, [fp, $-4];" \ - "ldrne r0, [fp, $-12];" \ - "movnes r0, r0;" \ - "ldrne r0, [r0, $-4];" \ - "movs r0, r0;" \ - "it ne;" \ - "blne mcount_internal;" \ - "pop {r0, r1, r2, r3}"); \ -} - -#else - -#define MCOUNT \ -void _mcount (void) \ -{ \ - __asm__("stmdb sp!, {r0, r1, r2, r3};" \ - "movs fp, fp;" \ - "moveq r1, #0;" \ - "ldrne r1, [fp, $-4];" \ - "ldrne r0, [fp, $-12];" \ - "movnes r0, r0;" \ - "ldrne r0, [r0, $-4];" \ - "movs r0, r0;" \ - "blne mcount_internal;" \ - "ldmia sp!, {r0, r1, r2, r3}"); \ -} - -#endif diff --git a/sysdeps/arm/preconfigure b/sysdeps/arm/preconfigure index 276661d..a496700 100644 --- a/sysdeps/arm/preconfigure +++ b/sysdeps/arm/preconfigure @@ -42,7 +42,8 @@ arm*) CFLAGS="$CFLAGS -fno-unwind-tables" ;; *) - machine=arm/$machine + echo "Old ABI no longer supported" 2>&1 + exit 1 ;; esac ;; diff --git a/sysdeps/arm/setjmp.S b/sysdeps/arm/setjmp.S deleted file mode 100644 index 3fff9e9..0000000 --- a/sysdeps/arm/setjmp.S +++ /dev/null @@ -1,33 +0,0 @@ -/* setjmp for ARM. - Copyright (C) 1997, 1998, 2008 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 -#define _SETJMP_H -#define _ASM -#include - -ENTRY (__sigsetjmp) - /* Save registers */ - stmia r0, {v1-v6, sl, fp, sp, lr} - - /* Make a tail call to __sigjmp_save; it takes the same args. */ - B PLTJMP(C_SYMBOL_NAME(__sigjmp_save)) -END (__sigsetjmp) - -hidden_def (__sigsetjmp) diff --git a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S b/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S deleted file mode 100644 index bac2563..0000000 --- a/sysdeps/unix/sysv/linux/arm/____longjmp_chk.S +++ /dev/null @@ -1,75 +0,0 @@ -/* Copyright (C) 2009 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 - - .section .rodata.str1.1,"aMS",%progbits,1 - .type longjmp_msg,%object -longjmp_msg: - .string "longjmp causes uninitialized stack frame" - .size longjmp_msg, .-longjmp_msg - .text - -#define __longjmp ____longjmp_chk - -#ifdef PIC -# define CALL_FAIL \ - ldr sl, .L_GOT; \ -.L_GOT_OFF: \ - add sl, pc, sl; \ - ldr r0, .Lstr; \ - add r0, sl, r0; \ - B PLTJMP(HIDDEN_JUMPTARGET(__fortify_fail)); \ -.L_GOT: \ - .word _GLOBAL_OFFSET_TABLE_-(.L_GOT_OFF+8); \ -.Lstr: \ - .word longjmp_msg(GOTOFF); -#else -# define CALL_FAIL \ - ldr r0, .Lstr; \ - B HIDDEN_JUMPTARGET(__fortify_fail); \ -.Lstr: \ - .word longjmp_msg; -#endif - -#define CHECK_SP(reg) \ - cmp sp, reg; \ - bls .Lok; \ - mov r5, r0; \ - mov r0, #0; \ - sub sp, sp, #16; \ - mov r1, sp; \ - swi #SYS_ify(sigaltstack); \ - cmp r0, #0; \ - bne .Lok2; \ - ldr r1, [sp, #4]; \ - tst r1, #1; \ - beq .Lfail; \ - ldr r2, [sp, #0]; \ - ldr r3, [sp, #8]; \ - add r2, r2, r3; \ - sub r2, r2, reg; \ - cmp r2, r3; \ - bhi .Lok2; \ -.Lfail: \ - CALL_FAIL \ -.Lok2: \ - mov r0, r5; \ -.Lok: - -#include <__longjmp.S> diff --git a/sysdeps/unix/sysv/linux/arm/check_pf.c b/sysdeps/unix/sysv/linux/arm/check_pf.c deleted file mode 100644 index 209f364..0000000 --- a/sysdeps/unix/sysv/linux/arm/check_pf.c +++ /dev/null @@ -1,312 +0,0 @@ -/* Determine protocol families for which interfaces exist. Linux version. - Copyright (C) 2003, 2006, 2007, 2008 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 -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include - - -#ifndef IFA_F_HOMEADDRESS -# define IFA_F_HOMEADDRESS 0 -#endif -#ifndef IFA_F_OPTIMISTIC -# define IFA_F_OPTIMISTIC 0 -#endif - - -static int -make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6, - struct in6addrinfo **in6ai, size_t *in6ailen) -{ - struct req - { - struct nlmsghdr nlh; - struct rtgenmsg g; - } req; - struct sockaddr_nl nladdr; - - /* struct rtgenmsg consists of a single byte but the ARM ABI rounds - it up to a word. Clear the padding explicitly here. */ - assert (sizeof (req.g) == 4); - memset (&req.g, '\0', sizeof (req.g)); - - req.nlh.nlmsg_len = sizeof (req); - req.nlh.nlmsg_type = RTM_GETADDR; - req.nlh.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST; - req.nlh.nlmsg_pid = 0; - req.nlh.nlmsg_seq = time (NULL); - req.g.rtgen_family = AF_UNSPEC; - - memset (&nladdr, '\0', sizeof (nladdr)); - nladdr.nl_family = AF_NETLINK; - -#ifdef PAGE_SIZE - /* Help the compiler optimize out the malloc call if PAGE_SIZE - is constant and smaller or equal to PTHREAD_STACK_MIN/4. */ - const size_t buf_size = PAGE_SIZE; -#else - const size_t buf_size = __getpagesize (); -#endif - bool use_malloc = false; - char *buf; - - if (__libc_use_alloca (buf_size)) - buf = alloca (buf_size); - else - { - buf = malloc (buf_size); - if (buf != NULL) - use_malloc = true; - else - goto out_fail; - } - - struct iovec iov = { buf, buf_size }; - - if (TEMP_FAILURE_RETRY (__sendto (fd, (void *) &req, sizeof (req), 0, - (struct sockaddr *) &nladdr, - sizeof (nladdr))) < 0) - goto out_fail; - - *seen_ipv4 = false; - *seen_ipv6 = false; - - bool done = false; - struct in6ailist - { - struct in6addrinfo info; - struct in6ailist *next; - } *in6ailist = NULL; - size_t in6ailistlen = 0; - - do - { - struct msghdr msg = - { - (void *) &nladdr, sizeof (nladdr), - &iov, 1, - NULL, 0, - 0 - }; - - ssize_t read_len = TEMP_FAILURE_RETRY (__recvmsg (fd, &msg, 0)); - if (read_len < 0) - goto out_fail; - - if (msg.msg_flags & MSG_TRUNC) - goto out_fail; - - struct nlmsghdr *nlmh; - for (nlmh = (struct nlmsghdr *) buf; - NLMSG_OK (nlmh, (size_t) read_len); - nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len)) - { - if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid - || nlmh->nlmsg_seq != req.nlh.nlmsg_seq) - continue; - - if (nlmh->nlmsg_type == RTM_NEWADDR) - { - struct ifaddrmsg *ifam = (struct ifaddrmsg *) NLMSG_DATA (nlmh); - struct rtattr *rta = IFA_RTA (ifam); - size_t len = nlmh->nlmsg_len - NLMSG_LENGTH (sizeof (*ifam)); - - if (ifam->ifa_family != AF_INET - && ifam->ifa_family != AF_INET6) - continue; - - const void *local = NULL; - const void *address = NULL; - while (RTA_OK (rta, len)) - { - switch (rta->rta_type) - { - case IFA_LOCAL: - local = RTA_DATA (rta); - break; - - case IFA_ADDRESS: - address = RTA_DATA (rta); - goto out; - } - - rta = RTA_NEXT (rta, len); - } - - if (local != NULL) - { - address = local; - out: - if (ifam->ifa_family == AF_INET) - { - if (*(const in_addr_t *) address - != htonl (INADDR_LOOPBACK)) - *seen_ipv4 = true; - } - else - { - if (!IN6_IS_ADDR_LOOPBACK (address)) - *seen_ipv6 = true; - } - } - - struct in6ailist *newp = alloca (sizeof (*newp)); - newp->info.flags = (((ifam->ifa_flags - & (IFA_F_DEPRECATED - | IFA_F_OPTIMISTIC)) - ? in6ai_deprecated : 0) - | ((ifam->ifa_flags - & IFA_F_HOMEADDRESS) - ? in6ai_homeaddress : 0)); - newp->info.prefixlen = ifam->ifa_prefixlen; - newp->info.index = ifam->ifa_index; - if (ifam->ifa_family == AF_INET) - { - newp->info.addr[0] = 0; - newp->info.addr[1] = 0; - newp->info.addr[2] = htonl (0xffff); - newp->info.addr[3] = *(const in_addr_t *) address; - } - else - memcpy (newp->info.addr, address, sizeof (newp->info.addr)); - newp->next = in6ailist; - in6ailist = newp; - ++in6ailistlen; - } - else if (nlmh->nlmsg_type == NLMSG_DONE) - /* We found the end, leave the loop. */ - done = true; - } - } - while (! done); - - close_not_cancel_no_status (fd); - - if (*seen_ipv6 && in6ailist != NULL) - { - *in6ai = malloc (in6ailistlen * sizeof (**in6ai)); - if (*in6ai == NULL) - goto out_fail; - - *in6ailen = in6ailistlen; - - do - { - (*in6ai)[--in6ailistlen] = in6ailist->info; - in6ailist = in6ailist->next; - } - while (in6ailist != NULL); - } - - if (use_malloc) - free (buf); - return 0; - -out_fail: - if (use_malloc) - free (buf); - return -1; -} - - -/* We don't know if we have NETLINK support compiled in in our - Kernel. */ -#if __ASSUME_NETLINK_SUPPORT == 0 -/* Define in ifaddrs.h. */ -extern int __no_netlink_support attribute_hidden; -#else -# define __no_netlink_support 0 -#endif - - -void -attribute_hidden -__check_pf (bool *seen_ipv4, bool *seen_ipv6, - struct in6addrinfo **in6ai, size_t *in6ailen) -{ - *in6ai = NULL; - *in6ailen = 0; - - if (! __no_netlink_support) - { - int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); - - struct sockaddr_nl nladdr; - memset (&nladdr, '\0', sizeof (nladdr)); - nladdr.nl_family = AF_NETLINK; - - socklen_t addr_len = sizeof (nladdr); - - if (fd >= 0 - && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0 - && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0 - && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6, - in6ai, in6ailen) == 0) - /* It worked. */ - return; - - if (fd >= 0) - __close (fd); - -#if __ASSUME_NETLINK_SUPPORT == 0 - /* Remember that there is no netlink support. */ - __no_netlink_support = 1; -#else - /* We cannot determine what interfaces are available. Be - pessimistic. */ - *seen_ipv4 = true; - *seen_ipv6 = true; -#endif - } - -#if __ASSUME_NETLINK_SUPPORT == 0 - /* No netlink. Get the interface list via getifaddrs. */ - struct ifaddrs *ifa = NULL; - if (getifaddrs (&ifa) != 0) - { - /* We cannot determine what interfaces are available. Be - pessimistic. */ - *seen_ipv4 = true; - *seen_ipv6 = true; - return; - } - - struct ifaddrs *runp; - for (runp = ifa; runp != NULL; runp = runp->ifa_next) - if (runp->ifa_addr->sa_family == PF_INET) - *seen_ipv4 = true; - else if (runp->ifa_addr->sa_family == PF_INET6) - *seen_ipv6 = true; - - (void) freeifaddrs (ifa); -#endif -} diff --git a/sysdeps/unix/sysv/linux/arm/eabi/Makefile b/sysdeps/unix/sysv/linux/arm/eabi/Makefile index 1318bc4..b7baae9 100644 --- a/sysdeps/unix/sysv/linux/arm/eabi/Makefile +++ b/sysdeps/unix/sysv/linux/arm/eabi/Makefile @@ -1,6 +1,3 @@ -# Set this flag here so that arm/nptl/Makefile will see it. -arm-using-eabi = yes - ifeq ($(subdir),csu) # In order for unwinding to fail when it falls out of main, we need a # cantunwind marker. There's one in start.S. To make sure we reach it, add diff --git a/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c b/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c deleted file mode 100644 index 3e80bbd..0000000 --- a/sysdeps/unix/sysv/linux/arm/eabi/check_pf.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/mmap64.S b/sysdeps/unix/sysv/linux/arm/mmap64.S deleted file mode 100644 index 3c1f247..0000000 --- a/sysdeps/unix/sysv/linux/arm/mmap64.S +++ /dev/null @@ -1,89 +0,0 @@ -/* Copyright (C) 2000, 2003, 2005 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 - -#define EINVAL 22 -#define ENOSYS 38 - -#include "kernel-features.h" - -#ifdef __ARMEB__ -# define LOW_OFFSET 4 + 4 -/* The initial + 4 is for the stack postdecrement. */ -# define HIGH_OFFSET 4 + 4 + 0 -#else -# define LOW_OFFSET 4 + 0 -# define HIGH_OFFSET 4 + 4 + 4 -#endif - - /* The mmap2 system call takes six arguments, all in registers. */ - .text -ENTRY (__mmap64) -#ifdef __NR_mmap2 - ldr ip, [sp, $LOW_OFFSET] - str r5, [sp, #-4]! - ldr r5, [sp, $HIGH_OFFSET] - str r4, [sp, #-4]! - movs r4, ip, lsl $20 @ check that offset is page-aligned - mov ip, ip, lsr $12 - moveqs r4, r5, lsr $12 @ check for overflow - bne .Linval - ldr r4, [sp, $8] @ load fd - orr r5, ip, r5, lsl $20 @ compose page offset - mov ip, r0 - DO_CALL (mmap2, 0) - cmn r0, $4096 -# ifdef __ASSUME_MMAP2_SYSCALL - ldr r4, [sp], #4 - ldr r5, [sp], #4 - RETINSTR(cc, lr) - b PLTJMP(syscall_error) -# else - ldrcc r4, [sp], #4 - ldrcc r5, [sp], #4 - RETINSTR(cc, lr) - cmn r0, $ENOSYS - bne .Lerror - /* The current kernel does not support mmap2. Fall back to plain - mmap if the offset is small enough. */ - ldr r5, [sp, $16] - mov r0, ip @ first arg was clobbered - teq r5, $0 - ldreq r4, [sp], #4 - ldreq r5, [sp], #4 - beq PLTJMP(__mmap) -# endif -.Linval: - mov r0, $-EINVAL -.Lerror: - ldr r4, [sp], #4 - ldr r5, [sp], #4 - b PLTJMP(syscall_error) -#else - /* The kernel headers do not support mmap2. Fall back to plain - mmap if the offset is small enough. */ - ldr ip, [sp, $8] - teq ip, $0 - beq PLTJMP(__mmap) - mov r0, $-EINVAL - b PLTJMP(syscall_error) -#endif -PSEUDO_END (__mmap64) - -weak_alias (__mmap64, mmap64) diff --git a/sysdeps/unix/sysv/linux/arm/msgctl.c b/sysdeps/unix/sysv/linux/arm/msgctl.c deleted file mode 100644 index 9f9b843..0000000 --- a/sysdeps/unix/sysv/linux/arm/msgctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/nptl/Makefile b/sysdeps/unix/sysv/linux/arm/nptl/Makefile deleted file mode 100644 index f270f19..0000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -ifeq ($(subdir),nptl) -ifneq ($(arm-using-eabi),yes) -# These tests rely on PTHREAD_KEYS_MAX. The SJLJ exception machinery -# in libgcc registers one key, however, so only PTHREAD_KEYS_MAX-1 -# keys are available. This works fine for EABI targets. -tests := $(filter-out tst-key1 tst-key4,$(tests)) -endif -endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h b/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h deleted file mode 100644 index 506558d..0000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h +++ /dev/null @@ -1,136 +0,0 @@ -/* Copyright (C) 2003, 2004, 2005, 2007, 2008, 2012 - 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 -#include -#ifndef __ASSEMBLER__ -# include -#endif - -#if !defined NOT_IN_libc || defined IS_IN_libpthread || defined IS_IN_librt - -# undef PSEUDO -# define PSEUDO(name, syscall_name, args) \ - .section ".text"; \ - PSEUDO_PROLOGUE; \ - ENTRY (__##syscall_name##_nocancel); \ - DO_CALL (syscall_name, args); \ - PSEUDO_RET; \ - END (__##syscall_name##_nocancel); \ - ENTRY (name); \ - SINGLE_THREAD_P; \ - DOARGS_##args; \ - bne .Lpseudo_cancel; \ - DO_CALL (syscall_name, 0); \ - UNDOARGS_##args; \ - cmn r0, $4096; \ - PSEUDO_RET; \ - .Lpseudo_cancel: \ - DOCARGS_##args; /* save syscall args etc. around CENABLE. */ \ - CENABLE; \ - mov ip, r0; /* put mask in safe place. */ \ - UNDOCARGS_##args; /* restore syscall args. */ \ - swi SYS_ify (syscall_name); /* do the call. */ \ - str r0, [sp, $-4]!; /* save syscall return value. */ \ - mov r0, ip; /* get mask back. */ \ - CDISABLE; \ - ldmfd sp!, {r0, lr}; /* retrieve return value and address. */ \ - UNDOARGS_##args; \ - cmn r0, $4096; - -# define DOCARGS_0 str lr, [sp, #-4]!; -# define UNDOCARGS_0 - -# define DOCARGS_1 stmfd sp!, {r0, lr}; -# define UNDOCARGS_1 ldr r0, [sp], #4; - -# define DOCARGS_2 stmfd sp!, {r0, r1, lr}; -# define UNDOCARGS_2 ldmfd sp!, {r0, r1}; - -# define DOCARGS_3 stmfd sp!, {r0, r1, r2, lr}; -# define UNDOCARGS_3 ldmfd sp!, {r0, r1, r2}; - -# define DOCARGS_4 stmfd sp!, {r0, r1, r2, r3, lr}; -# define UNDOCARGS_4 ldmfd sp!, {r0, r1, r2, r3}; - -# define DOCARGS_5 DOCARGS_4 -# define UNDOCARGS_5 UNDOCARGS_4 - -# define DOCARGS_6 DOCARGS_5 -# define UNDOCARGS_6 UNDOCARGS_5 - -# ifdef IS_IN_libpthread -# define CENABLE bl PLTJMP(__pthread_enable_asynccancel) -# define CDISABLE bl PLTJMP(__pthread_disable_asynccancel) -# define __local_multiple_threads __pthread_multiple_threads -# elif !defined NOT_IN_libc -# define CENABLE bl PLTJMP(__libc_enable_asynccancel) -# define CDISABLE bl PLTJMP(__libc_disable_asynccancel) -# define __local_multiple_threads __libc_multiple_threads -# elif defined IS_IN_librt -# define CENABLE bl PLTJMP(__librt_enable_asynccancel) -# define CDISABLE bl PLTJMP(__librt_disable_asynccancel) -# else -# error Unsupported library -# endif - -# if defined IS_IN_libpthread || !defined NOT_IN_libc -# ifndef __ASSEMBLER__ -extern int __local_multiple_threads attribute_hidden; -# define SINGLE_THREAD_P __builtin_expect (__local_multiple_threads == 0, 1) -# else -# define SINGLE_THREAD_P \ - ldr ip, 1b; \ -2: \ - ldr ip, [pc, ip]; \ - teq ip, #0; -# define PSEUDO_PROLOGUE \ - 1: .word __local_multiple_threads - 2f - 8; -# endif -# else -/* There is no __local_multiple_threads for librt, so use the TCB. */ -# ifndef __ASSEMBLER__ -# define SINGLE_THREAD_P \ - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0, 1) -# else -# define PSEUDO_PROLOGUE -# define SINGLE_THREAD_P \ - stmfd sp!, {r0, lr}; \ - bl __aeabi_read_tp; \ - ldr ip, [r0, #MULTIPLE_THREADS_OFFSET]; \ - ldmfd sp!, {r0, lr}; \ - teq ip, #0 -# define SINGLE_THREAD_P_PIC(x) SINGLE_THREAD_P -# endif -# endif - -#elif !defined __ASSEMBLER__ - -/* For rtld, et cetera. */ -# define SINGLE_THREAD_P 1 -# define NO_CANCELLATION 1 - -#endif - -#ifndef __ASSEMBLER__ -# define RTLD_SINGLE_THREAD_P \ - __builtin_expect (THREAD_GETMEM (THREAD_SELF, \ - header.multiple_threads) == 0, 1) -#endif diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c deleted file mode 100644 index e19facf..0000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-forcedunwind.c +++ /dev/null @@ -1,146 +0,0 @@ -/* Copyright (C) 2003, 2009 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include -#include - -static void *libgcc_s_handle; -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); -static _Unwind_Reason_Code (*libgcc_s_forcedunwind) - (struct _Unwind_Exception *, _Unwind_Stop_Fn, void *); -static _Unwind_Word (*libgcc_s_getcfa) (struct _Unwind_Context *); -static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *); -static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *); - -void -__attribute_noinline__ -pthread_cancel_init (void) -{ - void *resume, *personality, *forcedunwind, *getcfa; - void *handle; - void *sjlj_register, *sjlj_unregister; - - if (__builtin_expect (libgcc_s_handle != NULL, 1)) - { - /* Force gcc to reload all values. */ - asm volatile ("" ::: "memory"); - return; - } - - handle = __libc_dlopen ("libgcc_s.so.1"); - - if (handle == NULL - || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL - || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL - || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL - || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL - || (forcedunwind = __libc_dlsym (handle, "_Unwind_SjLj_ForcedUnwind")) - == NULL - || (getcfa = __libc_dlsym (handle, "_Unwind_GetCFA")) == NULL - ) - __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); - - libgcc_s_resume = resume; - libgcc_s_personality = personality; - libgcc_s_forcedunwind = forcedunwind; - libgcc_s_sjlj_register = sjlj_register; - libgcc_s_sjlj_unregister = sjlj_unregister; - libgcc_s_getcfa = getcfa; - /* Make sure libgcc_s_getcfa is written last. Otherwise, - pthread_cancel_init might return early even when the pointer the - caller is interested in is not initialized yet. */ - atomic_write_barrier (); - libgcc_s_handle = handle; -} - -void -__libc_freeres_fn_section -__unwind_freeres (void) -{ - void *handle = libgcc_s_handle; - if (handle != NULL) - { - libgcc_s_handle = NULL; - __libc_dlclose (handle); - } -} - -void -_Unwind_Resume (struct _Unwind_Exception *exc) -{ - if (__builtin_expect (libgcc_s_resume == NULL, 0)) - pthread_cancel_init (); - - libgcc_s_resume (exc); -} - -_Unwind_Reason_Code -__gcc_personality_v0 (int version, _Unwind_Action actions, - _Unwind_Exception_Class exception_class, - struct _Unwind_Exception *ue_header, - struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_personality == NULL, 0)) - pthread_cancel_init (); - - return libgcc_s_personality (version, actions, exception_class, - ue_header, context); -} - -_Unwind_Reason_Code -_Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop, - void *stop_argument) -{ - if (__builtin_expect (libgcc_s_forcedunwind == NULL, 0)) - pthread_cancel_init (); - - return libgcc_s_forcedunwind (exc, stop, stop_argument); -} - -_Unwind_Word -_Unwind_GetCFA (struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_getcfa == NULL, 0)) - pthread_cancel_init (); - - return libgcc_s_getcfa (context); -} - -void -_Unwind_SjLj_Register (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0)) - pthread_cancel_init (); - - libgcc_s_sjlj_register (fc); -} - -void -_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0)) - pthread_cancel_init (); - - libgcc_s_sjlj_unregister (fc); -} diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c b/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c deleted file mode 100644 index 8dcfd34..0000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind-resume.c +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (C) 2003 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Jakub Jelinek . - - 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; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#include -#include -#include - -static void (*libgcc_s_resume) (struct _Unwind_Exception *exc); -static _Unwind_Reason_Code (*libgcc_s_personality) - (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, - struct _Unwind_Context *); -static void (*libgcc_s_sjlj_register) (struct SjLj_Function_Context *); -static void (*libgcc_s_sjlj_unregister) (struct SjLj_Function_Context *); - -static void -init (void) -{ - void *resume, *personality; - void *handle; - void *sjlj_register, *sjlj_unregister; - - handle = __libc_dlopen ("libgcc_s.so.1"); - - if (handle == NULL - || (sjlj_register = __libc_dlsym (handle, "_Unwind_SjLj_Register")) == NULL - || (sjlj_unregister = __libc_dlsym (handle, "_Unwind_SjLj_Unregister")) == NULL - || (resume = __libc_dlsym (handle, "_Unwind_SjLj_Resume")) == NULL - || (personality = __libc_dlsym (handle, "__gcc_personality_sj0")) == NULL) - __libc_fatal ("libgcc_s.so.1 must be installed for pthread_cancel to work\n"); - - libgcc_s_resume = resume; - libgcc_s_personality = personality; - libgcc_s_sjlj_register = sjlj_register; - libgcc_s_sjlj_unregister = sjlj_unregister; -} - -void -_Unwind_Resume (struct _Unwind_Exception *exc) -{ - if (__builtin_expect (libgcc_s_resume == NULL, 0)) - init (); - libgcc_s_resume (exc); -} - -_Unwind_Reason_Code -__gcc_personality_v0 (int version, _Unwind_Action actions, - _Unwind_Exception_Class exception_class, - struct _Unwind_Exception *ue_header, - struct _Unwind_Context *context) -{ - if (__builtin_expect (libgcc_s_personality == NULL, 0)) - init (); - return libgcc_s_personality (version, actions, exception_class, - ue_header, context); -} - -void -_Unwind_SjLj_Register (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_register == NULL, 0)) - init (); - libgcc_s_sjlj_register (fc); -} - -void -_Unwind_SjLj_Unregister (struct SjLj_Function_Context *fc) -{ - if (__builtin_expect (libgcc_s_sjlj_unregister == NULL, 0)) - init (); - libgcc_s_sjlj_unregister (fc); -} diff --git a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h b/sysdeps/unix/sysv/linux/arm/nptl/unwind.h deleted file mode 100644 index 8dd834e..0000000 --- a/sysdeps/unix/sysv/linux/arm/nptl/unwind.h +++ /dev/null @@ -1,31 +0,0 @@ -/* Exception handling and frame unwind runtime interface routines. - Copyright (C) 2005 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 _ARM_UNWIND_H -#define _ARM_UNWIND_H 1 - -#include - -/* Call the SjLj versions of these functions. */ -#define _Unwind_ForcedUnwind _Unwind_SjLj_ForcedUnwind -#define _Unwind_Resume _Unwind_SjLj_Resume -#define __gcc_personality_v0 __gcc_personality_sj0 - -#endif /* unwind.h */ diff --git a/sysdeps/unix/sysv/linux/arm/semctl.c b/sysdeps/unix/sysv/linux/arm/semctl.c deleted file mode 100644 index e9b1a48..0000000 --- a/sysdeps/unix/sysv/linux/arm/semctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/shmctl.c b/sysdeps/unix/sysv/linux/arm/shmctl.c deleted file mode 100644 index 7eac638..0000000 --- a/sysdeps/unix/sysv/linux/arm/shmctl.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/sigrestorer.S b/sysdeps/unix/sysv/linux/arm/sigrestorer.S deleted file mode 100644 index d9cc40f..0000000 --- a/sysdeps/unix/sysv/linux/arm/sigrestorer.S +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1999, 2012 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 - -/* If no SA_RESTORER function was specified by the application we use - one of these. This avoids the need for the kernel to synthesise a return - instruction on the stack, which would involve expensive cache flushes. */ - -ENTRY(__default_sa_restorer) - swi SYS_ify(sigreturn) -END(__default_sa_restorer) - -#ifdef __NR_rt_sigreturn - -ENTRY(__default_rt_sa_restorer) - swi SYS_ify(rt_sigreturn) -END(__default_rt_sa_restorer) - -#endif -- 2.7.4