diff options
Diffstat (limited to 'sysdeps/nios2')
44 files changed, 161 insertions, 328 deletions
diff --git a/sysdeps/nios2/Implies b/sysdeps/nios2/Implies index 387a0ca052..7d69983412 100644 --- a/sysdeps/nios2/Implies +++ b/sysdeps/nios2/Implies @@ -1,3 +1,4 @@ wordsize-32 +ieee754/soft-fp ieee754/dbl-64 ieee754/flt-32 diff --git a/sysdeps/nios2/Makefile b/sysdeps/nios2/Makefile index c63a6a0c72..25fc2abfee 100644 --- a/sysdeps/nios2/Makefile +++ b/sysdeps/nios2/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 1993-2016 Free Software Foundation, Inc. +# Copyright (C) 1993-2018 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,14 +22,9 @@ pic-ccflag = -fpic long-double-fcts = no ifeq ($(subdir),soft-fp) -sysdep_routines += $(filter-out sqrtsf2,$(gcc-single-routines)) \ - $(filter-out sqrtdf2,$(gcc-double-routines)) +sysdep_routines += $(gcc-single-routines) $(gcc-double-routines) endif ifeq ($(subdir),csu) gen-as-const-headers += tcb-offsets.sym endif - -ifeq ($(subdir),debug) -CFLAGS-backtrace.c += -funwind-tables -endif diff --git a/sysdeps/nios2/__longjmp.S b/sysdeps/nios2/__longjmp.S index 7b89e3d93c..d8a6edab8a 100644 --- a/sysdeps/nios2/__longjmp.S +++ b/sysdeps/nios2/__longjmp.S @@ -1,5 +1,5 @@ /* longjmp for Nios II. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/nios2/backtrace.c b/sysdeps/nios2/backtrace.c deleted file mode 100644 index 27ce597b39..0000000000 --- a/sysdeps/nios2/backtrace.c +++ /dev/null @@ -1 +0,0 @@ -#include <sysdeps/x86_64/backtrace.c> diff --git a/sysdeps/nios2/bits/fenv.h b/sysdeps/nios2/bits/fenv.h index 9d046217c8..c39286658b 100644 --- a/sysdeps/nios2/bits/fenv.h +++ b/sysdeps/nios2/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2012-2016 Free Software Foundation, Inc. +/* Copyright (C) 2012-2018 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 @@ -42,3 +42,11 @@ typedef unsigned int fenv_t; /* If the default argument is used we use this value. */ #define FE_DFL_ENV ((const fenv_t *) -1) + +#if __GLIBC_USE (IEC_60559_BFP_EXT) +/* Type representing floating-point control modes. */ +typedef unsigned int femode_t; + +/* Default floating-point control modes. */ +# define FE_DFL_MODE ((const femode_t *) -1L) +#endif diff --git a/sysdeps/nios2/bits/link.h b/sysdeps/nios2/bits/link.h index 46eb7b1a8f..c34198866f 100644 --- a/sysdeps/nios2/bits/link.h +++ b/sysdeps/nios2/bits/link.h @@ -1,5 +1,5 @@ /* Machine-specific declarations for dynamic linker interface, Nios II version. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 diff --git a/sysdeps/nios2/bits/setjmp.h b/sysdeps/nios2/bits/setjmp.h index 8b3865d304..b5cef8b2da 100644 --- a/sysdeps/nios2/bits/setjmp.h +++ b/sysdeps/nios2/bits/setjmp.h @@ -1,5 +1,5 @@ /* Define the machine-dependent type `jmp_buf'. Nios II version. - Copyright (C) 1992-2016 Free Software Foundation, Inc. + Copyright (C) 1992-2018 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 diff --git a/sysdeps/nios2/crti.S b/sysdeps/nios2/crti.S index 921cae7e37..46ab896ac0 100644 --- a/sysdeps/nios2/crti.S +++ b/sysdeps/nios2/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for Nios II. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 @@ -57,6 +57,7 @@ .section .init,"ax",@progbits .align 2 .global _init + .hidden _init .type _init, @function _init: addi sp, sp, -8 @@ -84,6 +85,7 @@ _init: .section .fini,"ax",@progbits .align 2 .global _fini + .hidden _fini .type _fini, @function _fini: addi sp, sp, -8 diff --git a/sysdeps/nios2/crtn.S b/sysdeps/nios2/crtn.S index e1dc6bc6d5..18fe2e0036 100644 --- a/sysdeps/nios2/crtn.S +++ b/sysdeps/nios2/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for Nios II. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 diff --git a/sysdeps/nios2/dl-init.c b/sysdeps/nios2/dl-init.c index f7864984a4..a691706e70 100644 --- a/sysdeps/nios2/dl-init.c +++ b/sysdeps/nios2/dl-init.c @@ -1,5 +1,5 @@ /* Nios II specific procedures for initializing code. - Copyright (C) 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2008-2018 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 @@ -19,7 +19,6 @@ #include <elf/dl-init.c> unsigned int -internal_function _dl_nios2_get_gp_value (struct link_map *main_map) { ElfW(Dyn) *dyn = main_map->l_ld; diff --git a/sysdeps/nios2/dl-machine.h b/sysdeps/nios2/dl-machine.h index 8b4763ea05..1f57a343e0 100644 --- a/sysdeps/nios2/dl-machine.h +++ b/sysdeps/nios2/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. Nios II version. - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 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 @@ -207,6 +207,7 @@ _start:\n\ static inline Elf32_Addr elf_machine_fixup_plt (struct link_map *map, lookup_t t, + const ElfW(Sym) *refsym, const ElfW(Sym) *sym, const Elf32_Rela *reloc, Elf32_Addr *reloc_addr, Elf32_Addr value) { @@ -249,7 +250,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, { const Elf32_Sym *const refsym = sym; struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); - Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; + Elf32_Addr value = SYMBOL_ADDRESS (sym_map, sym, true); switch (r_type) { diff --git a/sysdeps/nios2/dl-sysdep.h b/sysdeps/nios2/dl-sysdep.h index eaaf406316..35103afdac 100644 --- a/sysdeps/nios2/dl-sysdep.h +++ b/sysdeps/nios2/dl-sysdep.h @@ -1,5 +1,5 @@ /* System-specific settings for dynamic linker code. Nios II version. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 diff --git a/sysdeps/nios2/dl-tls.h b/sysdeps/nios2/dl-tls.h index cd794610b6..2f4636233b 100644 --- a/sysdeps/nios2/dl-tls.h +++ b/sysdeps/nios2/dl-tls.h @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. Nios II version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 @@ -43,6 +43,3 @@ extern void *__tls_get_addr (tls_index *ti); # define GET_ADDR_OFFSET (ti->ti_offset + TLS_DTV_OFFSET) # define __TLS_GET_ADDR(__ti) (__tls_get_addr (__ti) - TLS_DTV_OFFSET) - -/* Value used for dtv entries for which the allocation is delayed. */ -#define TLS_DTV_UNALLOCATED ((void *) -1l) diff --git a/sysdeps/nios2/dl-trampoline.S b/sysdeps/nios2/dl-trampoline.S index 4b90c619db..37f738e8f6 100644 --- a/sysdeps/nios2/dl-trampoline.S +++ b/sysdeps/nios2/dl-trampoline.S @@ -1,5 +1,5 @@ /* PLT trampolines. Nios II version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 diff --git a/sysdeps/nios2/gccframe.h b/sysdeps/nios2/gccframe.h index 739e37c756..d031e90e88 100644 --- a/sysdeps/nios2/gccframe.h +++ b/sysdeps/nios2/gccframe.h @@ -1,5 +1,5 @@ /* Definition of object in frame unwind info. Nios II version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/nios2/gmp-mparam.h b/sysdeps/nios2/gmp-mparam.h index c83ab99659..8f9c107d1a 100644 --- a/sysdeps/nios2/gmp-mparam.h +++ b/sysdeps/nios2/gmp-mparam.h @@ -1,6 +1,6 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright (C) 2015-2016 Free Software Foundation, Inc. +Copyright (C) 2015-2018 Free Software Foundation, Inc. This file is part of the GNU MP Library. diff --git a/sysdeps/nios2/jmpbuf-offsets.h b/sysdeps/nios2/jmpbuf-offsets.h index 3c62704dc8..877b958acd 100644 --- a/sysdeps/nios2/jmpbuf-offsets.h +++ b/sysdeps/nios2/jmpbuf-offsets.h @@ -1,5 +1,5 @@ /* Private macros for accessing __jmp_buf contents. Nios II version. - Copyright (C) 2006-2016 Free Software Foundation, Inc. + Copyright (C) 2006-2018 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 diff --git a/sysdeps/nios2/jmpbuf-unwind.h b/sysdeps/nios2/jmpbuf-unwind.h index 8796061889..18b7c6fa37 100644 --- a/sysdeps/nios2/jmpbuf-unwind.h +++ b/sysdeps/nios2/jmpbuf-unwind.h @@ -1,5 +1,5 @@ /* Examine __jmp_buf for unwinding frames. Nios II version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 diff --git a/sysdeps/nios2/ldbl-classify-compat.h b/sysdeps/nios2/ldbl-classify-compat.h new file mode 100644 index 0000000000..a9614de9df --- /dev/null +++ b/sysdeps/nios2/ldbl-classify-compat.h @@ -0,0 +1,8 @@ +#ifndef NIOS2_LDBL_CLASSIFY_COMPAT_H +#define NIOS2_LDBL_CLASSIFY_COMPAT_H 1 + +/* Enable __finitel, __isinfl, and __isnanl for binary compatibility + when built without long double support. */ +#define LDBL_CLASSIFY_COMPAT 1 + +#endif diff --git a/sysdeps/nios2/ldsodefs.h b/sysdeps/nios2/ldsodefs.h index 87d1b8e8bf..b68fb03fe3 100644 --- a/sysdeps/nios2/ldsodefs.h +++ b/sysdeps/nios2/ldsodefs.h @@ -1,5 +1,5 @@ /* Run-time dynamic linker data structures for loaded ELF shared objects. - Copyright (C) 2000-2016 Free Software Foundation, Inc. + Copyright (C) 2000-2018 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 diff --git a/sysdeps/nios2/libc-tls.c b/sysdeps/nios2/libc-tls.c index 82a3e3e1c8..d91af00a1e 100644 --- a/sysdeps/nios2/libc-tls.c +++ b/sysdeps/nios2/libc-tls.c @@ -1,5 +1,5 @@ /* Thread-local storage handling in the ELF dynamic linker. Nios II version. - Copyright (C) 2005-2016 Free Software Foundation, Inc. + Copyright (C) 2005-2018 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 diff --git a/sysdeps/nios2/libm-test-ulps b/sysdeps/nios2/libm-test-ulps index f1a01fdb30..0b9ef2afec 100644 --- a/sysdeps/nios2/libm-test-ulps +++ b/sysdeps/nios2/libm-test-ulps @@ -46,15 +46,15 @@ idouble: 1 ifloat: 2 Function: Imaginary part of "cacos": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Real part of "cacosh": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Imaginary part of "cacosh": @@ -74,15 +74,15 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "casin": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Real part of "casinh": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: Imaginary part of "casinh": @@ -92,7 +92,9 @@ idouble: 1 ifloat: 1 Function: Real part of "catan": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: Imaginary part of "catan": @@ -108,7 +110,9 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "catanh": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "cbrt": @@ -176,7 +180,9 @@ idouble: 2 ifloat: 2 Function: "cos": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "cosh": @@ -187,9 +193,9 @@ ifloat: 1 Function: Real part of "cpow": double: 2 -float: 4 +float: 5 idouble: 2 -ifloat: 4 +ifloat: 5 Function: Imaginary part of "cpow": float: 2 @@ -231,15 +237,15 @@ ifloat: 1 Function: Imaginary part of "ctan": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Real part of "ctanh": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 Function: Imaginary part of "ctanh": double: 2 @@ -336,19 +342,21 @@ idouble: 2 ifloat: 1 Function: "pow": +double: 1 float: 3 +idouble: 1 ifloat: 3 -Function: "pow10": -double: 2 -idouble: 2 - Function: "sin": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "sincos": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "sinh": @@ -387,8 +395,8 @@ ifloat: 2 Function: "yn": double: 3 -float: 2 +float: 3 idouble: 3 -ifloat: 2 +ifloat: 3 # end of automatic generation diff --git a/sysdeps/nios2/libm-test-ulps-name b/sysdeps/nios2/libm-test-ulps-name new file mode 100644 index 0000000000..4ee7692b1b --- /dev/null +++ b/sysdeps/nios2/libm-test-ulps-name @@ -0,0 +1 @@ +Nios II diff --git a/sysdeps/nios2/machine-gmon.h b/sysdeps/nios2/machine-gmon.h index a20d010d24..5d0ff9d5d4 100644 --- a/sysdeps/nios2/machine-gmon.h +++ b/sysdeps/nios2/machine-gmon.h @@ -1,5 +1,5 @@ /* Machine-dependent definitions for profiling support. Nios II version. - Copyright (C) 1996-2016 Free Software Foundation, Inc. + Copyright (C) 1996-2018 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 diff --git a/sysdeps/nios2/math-tests.h b/sysdeps/nios2/math-tests.h index f8f8b66cf5..a1c2762786 100644 --- a/sysdeps/nios2/math-tests.h +++ b/sysdeps/nios2/math-tests.h @@ -1,5 +1,5 @@ /* Configuration for math tests. Nios II version. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/nios2/math_private.h b/sysdeps/nios2/math_private.h deleted file mode 100644 index 373da2a621..0000000000 --- a/sysdeps/nios2/math_private.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef NIO2_MATH_PRIVATE_H -#define NIO2_MATH_PRIVATE_H 1 - -/* Suppress use of exceptions here to avoid build errors if the FE_* - macros aren't defined. Only allow rounding modes implemented for Nios II. - - This does mean that some code will silently fail to report exceptions, - set rounding mode as expected, etc., but it allows math code to compile - that otherwise wouldn't (such as math/s_fma.c) and so is valuable. - - We intentionally ignore the "exception" arguments of functions that - take an exception, since we can't even evaluate the argument - without causing a build failure. The extra level of statement - expression wrapping avoids "statement with no effect" warnings. - Since the callers don't check for errors anyway, we just claim - success in every case. - - The overrides for libc_ functions must happen before we include - the generic math_private.h, and the overrides for regular - <fenv.h> functions must happen afterwards, to avoid clashing with - the declarations of those functions. */ - -#define libc_fesetround(rnd) ({ 0; }) -#define libc_fetestexcept(exc) ({ 0; }) -#define libc_feholdexcept_setround(env, exc) ({ (void) (env); 0; }) -#define libc_feupdateenv_test(env, exc) ({ (void) (env); 0; }) - -/* Enable __finitel, __isinfl, and __isnanl for binary compatibility - when built without long double support. */ -#define LDBL_CLASSIFY_COMPAT 1 - -#include_next <math_private.h> - -#define feraiseexcept(excepts) ({ 0; }) -#define __feraiseexcept(excepts) ({ 0; }) -#define feclearexcept(exc) ({ 0; }) - -#endif diff --git a/sysdeps/nios2/memusage.h b/sysdeps/nios2/memusage.h index f1b56bdd4b..459c811a4d 100644 --- a/sysdeps/nios2/memusage.h +++ b/sysdeps/nios2/memusage.h @@ -1,5 +1,5 @@ /* Machine-specific definitions for memory usage profiling, Nios II version. - Copyright (C) 2000-2016 Free Software Foundation, Inc. + Copyright (C) 2000-2018 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 diff --git a/sysdeps/nios2/nptl/Makefile b/sysdeps/nios2/nptl/Makefile index 88181acbef..bff5331346 100644 --- a/sysdeps/nios2/nptl/Makefile +++ b/sysdeps/nios2/nptl/Makefile @@ -1,5 +1,5 @@ # NPTL makefile fragment for Nios II. -# Copyright (C) 2005-2016 Free Software Foundation, Inc. +# Copyright (C) 2005-2018 Free Software Foundation, Inc. # # This file is part of the GNU C Library. # diff --git a/sysdeps/nios2/nptl/bits/pthreadtypes-arch.h b/sysdeps/nios2/nptl/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..0917cae580 --- /dev/null +++ b/sysdeps/nios2/nptl/bits/pthreadtypes-arch.h @@ -0,0 +1,72 @@ +/* Machine-specific pthread type layouts. Nios II version. + Copyright (C) 2012-2018 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, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#include <endian.h> + +#define __SIZEOF_PTHREAD_ATTR_T 36 +#define __SIZEOF_PTHREAD_MUTEX_T 24 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 32 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 20 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Data structure for mutex handling. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 1 +#define __PTHREAD_MUTEX_USE_UNION 1 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +struct __pthread_rwlock_arch_t +{ + unsigned int __readers; + unsigned int __writers; + unsigned int __wrphase_futex; + unsigned int __writers_futex; + unsigned int __pad3; + unsigned int __pad4; +#if __BYTE_ORDER == __BIG_ENDIAN + unsigned char __pad1; + unsigned char __pad2; + unsigned char __shared; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; +#else + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned char __flags; + unsigned char __shared; + unsigned char __pad1; + unsigned char __pad2; +#endif + int __cur_writer; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/nios2/nptl/bits/pthreadtypes.h b/sysdeps/nios2/nptl/bits/pthreadtypes.h deleted file mode 100644 index 76076d009a..0000000000 --- a/sysdeps/nios2/nptl/bits/pthreadtypes.h +++ /dev/null @@ -1,189 +0,0 @@ -/* Machine-specific pthread type layouts. Nios II version. - Copyright (C) 2012-2016 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, see - <http://www.gnu.org/licenses/>. */ - -#ifndef _BITS_PTHREADTYPES_H -#define _BITS_PTHREADTYPES_H 1 - -#include <endian.h> - -#define __SIZEOF_PTHREAD_ATTR_T 36 -#define __SIZEOF_PTHREAD_MUTEX_T 24 -#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 -#define __SIZEOF_PTHREAD_COND_T 48 -#define __SIZEOF_PTHREAD_CONDATTR_T 4 -#define __SIZEOF_PTHREAD_RWLOCK_T 32 -#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 -#define __SIZEOF_PTHREAD_BARRIER_T 20 -#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 - - -/* Thread identifiers. The structure of the attribute type is - deliberately not exposed. */ -typedef unsigned long int pthread_t; - - -union pthread_attr_t -{ - char __size[__SIZEOF_PTHREAD_ATTR_T]; - long int __align; -}; -#ifndef __have_pthread_attr_t -typedef union pthread_attr_t pthread_attr_t; -# define __have_pthread_attr_t 1 -#endif - - -typedef struct __pthread_internal_slist -{ - struct __pthread_internal_slist *__next; -} __pthread_slist_t; - - -/* Data structures for mutex handling. The structure of the attribute - type is deliberately not exposed. */ -typedef union -{ - struct __pthread_mutex_s - { - int __lock; - unsigned int __count; - int __owner; - /* KIND must stay at this position in the structure to maintain - binary compatibility. */ - int __kind; - unsigned int __nusers; - __extension__ union - { - int __spins; - __pthread_slist_t __list; - }; - } __data; - char __size[__SIZEOF_PTHREAD_MUTEX_T]; - long int __align; -} pthread_mutex_t; - -typedef union -{ - char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; - long int __align; -} pthread_mutexattr_t; - -/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ -#define __PTHREAD_SPINS 0 - - -/* Data structure for conditional variable handling. The structure of - the attribute type is deliberately not exposed. */ -typedef union -{ - struct - { - int __lock; - unsigned int __futex; - __extension__ unsigned long long int __total_seq; - __extension__ unsigned long long int __wakeup_seq; - __extension__ unsigned long long int __woken_seq; - void *__mutex; - unsigned int __nwaiters; - unsigned int __broadcast_seq; - } __data; - char __size[__SIZEOF_PTHREAD_COND_T]; - __extension__ long long int __align; -} pthread_cond_t; - -typedef union -{ - char __size[__SIZEOF_PTHREAD_CONDATTR_T]; - long int __align; -} pthread_condattr_t; - - -/* Keys for thread-specific data */ -typedef unsigned int pthread_key_t; - - -/* Once-only execution */ -typedef int pthread_once_t; - - -#if defined __USE_UNIX98 || defined __USE_XOPEN2K -/* Data structure for read-write lock variable handling. The - structure of the attribute type is deliberately not exposed. */ -typedef union -{ - struct - { - int __lock; - unsigned int __nr_readers; - unsigned int __readers_wakeup; - unsigned int __writer_wakeup; - unsigned int __nr_readers_queued; - unsigned int __nr_writers_queued; -#if __BYTE_ORDER == __BIG_ENDIAN - unsigned char __pad1; - unsigned char __pad2; - unsigned char __shared; - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __flags; -#else - /* FLAGS must stay at this position in the structure to maintain - binary compatibility. */ - unsigned char __flags; - unsigned char __shared; - unsigned char __pad1; - unsigned char __pad2; -#endif - int __writer; - } __data; - char __size[__SIZEOF_PTHREAD_RWLOCK_T]; - long int __align; -} pthread_rwlock_t; - -#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 - -typedef union -{ - char __size[__SIZEOF_PTHREAD_RWLOCKATTR_T]; - long int __align; -} pthread_rwlockattr_t; -#endif - - -#ifdef __USE_XOPEN2K -/* POSIX spinlock data type. */ -typedef volatile int pthread_spinlock_t; - - -/* POSIX barriers data type. The structure of the type is - deliberately not exposed. */ -typedef union -{ - char __size[__SIZEOF_PTHREAD_BARRIER_T]; - long int __align; -} pthread_barrier_t; - -typedef union -{ - char __size[__SIZEOF_PTHREAD_BARRIERATTR_T]; - int __align; -} pthread_barrierattr_t; -#endif - - -#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/nios2/nptl/bits/semaphore.h b/sysdeps/nios2/nptl/bits/semaphore.h index d877316904..457b83e54f 100644 --- a/sysdeps/nios2/nptl/bits/semaphore.h +++ b/sysdeps/nios2/nptl/bits/semaphore.h @@ -1,5 +1,5 @@ /* Machine-specific POSIX semaphore type layouts. Nios II version. - Copyright (C) 2002-2016 Free Software Foundation, Inc. + Copyright (C) 2002-2018 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 diff --git a/sysdeps/nios2/nptl/pthread-offsets.h b/sysdeps/nios2/nptl/pthread-offsets.h new file mode 100644 index 0000000000..9617354dc7 --- /dev/null +++ b/sysdeps/nios2/nptl/pthread-offsets.h @@ -0,0 +1,5 @@ +#define __PTHREAD_MUTEX_NUSERS_OFFSET 16 +#define __PTHREAD_MUTEX_KIND_OFFSET 12 +#define __PTHREAD_MUTEX_SPINS_OFFSET 20 +#define __PTHREAD_MUTEX_ELISION_OFFSET 22 +#define __PTHREAD_MUTEX_LIST_OFFSET 20 diff --git a/sysdeps/nios2/nptl/pthread_spin_lock.c b/sysdeps/nios2/nptl/pthread_spin_lock.c deleted file mode 100644 index 481c563355..0000000000 --- a/sysdeps/nios2/nptl/pthread_spin_lock.c +++ /dev/null @@ -1,24 +0,0 @@ -/* pthread spin-lock implementation for Nios II. - Copyright (C) 2005-2016 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, see - <http://www.gnu.org/licenses/>. */ - -#define SPIN_LOCK_READS_BETWEEN_CMPXCHG 1000 - -/* We can't use the normal "#include <nptl/pthread_spin_lock.c>" because - it will resolve to this very file. Using "sysdeps/.." as reference to the - top level directory does the job. */ -#include <sysdeps/../nptl/pthread_spin_lock.c> diff --git a/sysdeps/nios2/nptl/pthreaddef.h b/sysdeps/nios2/nptl/pthreaddef.h index d74891a08b..b70d1d17b3 100644 --- a/sysdeps/nios2/nptl/pthreaddef.h +++ b/sysdeps/nios2/nptl/pthreaddef.h @@ -1,5 +1,5 @@ /* pthread machine parameter definitions, Nios II version. - Copyright (C) 2002-2016 Free Software Foundation, Inc. + Copyright (C) 2002-2018 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 diff --git a/sysdeps/nios2/nptl/tcb-offsets.sym b/sysdeps/nios2/nptl/tcb-offsets.sym index d9ae952585..3cd8d984ac 100644 --- a/sysdeps/nios2/nptl/tcb-offsets.sym +++ b/sysdeps/nios2/nptl/tcb-offsets.sym @@ -9,6 +9,5 @@ # define thread_offsetof(mem) ((ptrdiff_t) THREAD_SELF + offsetof (struct pthread, mem)) MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) -PID_OFFSET thread_offsetof (pid) TID_OFFSET thread_offsetof (tid) POINTER_GUARD (offsetof (tcbhead_t, pointer_guard) - TLS_TCB_OFFSET - sizeof (tcbhead_t)) diff --git a/sysdeps/nios2/nptl/tls.h b/sysdeps/nios2/nptl/tls.h index ad29ac5ac2..6fedb2a556 100644 --- a/sysdeps/nios2/nptl/tls.h +++ b/sysdeps/nios2/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Nios II version. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 @@ -25,17 +25,7 @@ # include <stdbool.h> # include <stddef.h> # include <stdint.h> - -/* Type for the dtv. */ -typedef union dtv -{ - size_t counter; - struct - { - void *val; - bool is_static; - } pointer; -} dtv_t; +# include <dl-dtv.h> #else /* __ASSEMBLER__ */ # include <tcb-offsets.h> @@ -147,6 +137,7 @@ register struct pthread *__thread_self __asm__("r23"); # define NO_TLS_OFFSET -1 /* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_IN_TCB 1 #define THREAD_GSCOPE_FLAG_UNUSED 0 #define THREAD_GSCOPE_FLAG_USED 1 #define THREAD_GSCOPE_FLAG_WAIT 2 diff --git a/sysdeps/nios2/s_fma.c b/sysdeps/nios2/s_fma.c deleted file mode 100644 index d9613fa67c..0000000000 --- a/sysdeps/nios2/s_fma.c +++ /dev/null @@ -1 +0,0 @@ -#include <soft-fp/fmadf4.c> diff --git a/sysdeps/nios2/s_fmaf.c b/sysdeps/nios2/s_fmaf.c deleted file mode 100644 index aa5c9b2d91..0000000000 --- a/sysdeps/nios2/s_fmaf.c +++ /dev/null @@ -1 +0,0 @@ -#include <soft-fp/fmasf4.c> diff --git a/sysdeps/nios2/setjmp.S b/sysdeps/nios2/setjmp.S index 14eb092224..5e48e68528 100644 --- a/sysdeps/nios2/setjmp.S +++ b/sysdeps/nios2/setjmp.S @@ -1,5 +1,5 @@ /* setjmp for Nios II. - Copyright (C) 1991-2016 Free Software Foundation, Inc. + Copyright (C) 1991-2018 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 diff --git a/sysdeps/nios2/sotruss-lib.c b/sysdeps/nios2/sotruss-lib.c index df8f9613b9..7d8261ff2d 100644 --- a/sysdeps/nios2/sotruss-lib.c +++ b/sysdeps/nios2/sotruss-lib.c @@ -1,5 +1,5 @@ /* Override generic sotruss-lib.c to define actual functions for Nios II. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/nios2/stackinfo.h b/sysdeps/nios2/stackinfo.h index cc0d0f5124..341f7f6f86 100644 --- a/sysdeps/nios2/stackinfo.h +++ b/sysdeps/nios2/stackinfo.h @@ -1,5 +1,5 @@ /* Stack environment definitions for Nios II. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 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 diff --git a/sysdeps/nios2/start.S b/sysdeps/nios2/start.S index 210fa74b87..fa224ef75c 100644 --- a/sysdeps/nios2/start.S +++ b/sysdeps/nios2/start.S @@ -1,5 +1,5 @@ /* Startup code for Nios II - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 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 diff --git a/sysdeps/nios2/sysdep.h b/sysdeps/nios2/sysdep.h index ebcfc20e67..38ea9456af 100644 --- a/sysdeps/nios2/sysdep.h +++ b/sysdeps/nios2/sysdep.h @@ -1,5 +1,5 @@ /* Assembler macros for Nios II. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2018 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 diff --git a/sysdeps/nios2/tst-audit.h b/sysdeps/nios2/tst-audit.h index 5e4b9abf02..ac7e8943fd 100644 --- a/sysdeps/nios2/tst-audit.h +++ b/sysdeps/nios2/tst-audit.h @@ -1,5 +1,5 @@ /* Definitions for testing PLT entry/exit auditing. Nios II version. - Copyright (C) 2009-2016 Free Software Foundation, Inc. + Copyright (C) 2009-2018 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 |