diff options
Diffstat (limited to 'sysdeps/microblaze')
46 files changed, 246 insertions, 401 deletions
diff --git a/sysdeps/microblaze/Implies b/sysdeps/microblaze/Implies index 73c766c52e..746b21ad66 100644 --- a/sysdeps/microblaze/Implies +++ b/sysdeps/microblaze/Implies @@ -1,4 +1,5 @@ wordsize-32 # MicroBlaze uses IEEE 754 floating point. +ieee754/soft-fp ieee754/flt-32 ieee754/dbl-64 diff --git a/sysdeps/microblaze/__longjmp.S b/sysdeps/microblaze/__longjmp.S index 647a950896..b93639bca0 100644 --- a/sysdeps/microblaze/__longjmp.S +++ b/sysdeps/microblaze/__longjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/_mcount.S b/sysdeps/microblaze/_mcount.S index b5a7c867fc..2fcf3c0d09 100644 --- a/sysdeps/microblaze/_mcount.S +++ b/sysdeps/microblaze/_mcount.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/asm-syntax.h b/sysdeps/microblaze/asm-syntax.h index cdb265ed71..5fd720a831 100644 --- a/sysdeps/microblaze/asm-syntax.h +++ b/sysdeps/microblaze/asm-syntax.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/atomic-machine.h b/sysdeps/microblaze/atomic-machine.h index af7acacc96..5ff5d16d75 100644 --- a/sysdeps/microblaze/atomic-machine.h +++ b/sysdeps/microblaze/atomic-machine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2016 Free Software Foundation, Inc. +/* Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -38,6 +38,9 @@ typedef uintmax_t uatomic_max_t; #define __HAVE_64B_ATOMICS 0 #define USE_ATOMIC_COMPILER_BUILTINS 0 +/* XXX Is this actually correct? */ +#define ATOMIC_EXCHANGE_USES_CAS 1 + /* Microblaze does not have byte and halfword forms of load and reserve and store conditional. So for microblaze we stub out the 8- and 16-bit forms. */ @@ -47,12 +50,6 @@ typedef uintmax_t uatomic_max_t; #define __arch_compare_and_exchange_bool_16_acq(mem, newval, oldval) \ (abort (), 0) -#define __arch_compare_and_exchange_bool_8_rel(mem, newval, oldval) \ - (abort (), 0) - -#define __arch_compare_and_exchange_bool_16_rel(mem, newval, oldval) \ - (abort (), 0) - #define __arch_compare_and_exchange_val_32_acq(mem, newval, oldval) \ ({ \ __typeof (*(mem)) __tmp; \ diff --git a/sysdeps/microblaze/backtrace.c b/sysdeps/microblaze/backtrace.c index 9eb17dd192..3ba44679f4 100644 --- a/sysdeps/microblaze/backtrace.c +++ b/sysdeps/microblaze/backtrace.c @@ -1,4 +1,4 @@ -/* 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. @@ -27,7 +27,7 @@ _identify_sighandler (unsigned long fp, unsigned long pc, unsigned long *pprev_fp, unsigned long *pprev_pc, unsigned long *retaddr); -inline long +static inline long get_frame_size (unsigned long instr) { return abs ((short signed) (instr & 0xFFFF)); diff --git a/sysdeps/microblaze/backtrace_linux.c b/sysdeps/microblaze/backtrace_linux.c index 797afbd2d0..a566c03be5 100644 --- a/sysdeps/microblaze/backtrace_linux.c +++ b/sysdeps/microblaze/backtrace_linux.c @@ -1,4 +1,4 @@ -/* 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/microblaze/bits/endian.h b/sysdeps/microblaze/bits/endian.h index 3ab2648749..90641ddce6 100644 --- a/sysdeps/microblaze/bits/endian.h +++ b/sysdeps/microblaze/bits/endian.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/bits/fenv.h b/sysdeps/microblaze/bits/fenv.h index 3891f4a186..9a8d87dae6 100644 --- a/sysdeps/microblaze/bits/fenv.h +++ b/sysdeps/microblaze/bits/fenv.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2016 Free Software Foundation, Inc. +/* Copyright (C) 2011-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 @@ -40,3 +40,11 @@ typedef unsigned int fenv_t; /* If the default argument is used we use this value. */ #define FE_DFL_ENV ((const fenv_t *) -1l) + +#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/microblaze/bits/link.h b/sysdeps/microblaze/bits/link.h index e247c79dcf..de401731f9 100644 --- a/sysdeps/microblaze/bits/link.h +++ b/sysdeps/microblaze/bits/link.h @@ -1,4 +1,4 @@ -/* 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/microblaze/bits/setjmp.h b/sysdeps/microblaze/bits/setjmp.h index 52ba6d62c9..fda93eeae2 100644 --- a/sysdeps/microblaze/bits/setjmp.h +++ b/sysdeps/microblaze/bits/setjmp.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -25,7 +25,7 @@ # error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead." #endif -typedef struct +typedef struct __jmp_buf_internal_tag { /* There are 21 4-byte registers that should be saved: r1, r2, r13-r31. Actually, there seems no need to save diff --git a/sysdeps/microblaze/bsd-_setjmp.S b/sysdeps/microblaze/bsd-_setjmp.S index ed2a9834c6..7129be02cd 100644 --- a/sysdeps/microblaze/bsd-_setjmp.S +++ b/sysdeps/microblaze/bsd-_setjmp.S @@ -1,5 +1,5 @@ /* BSD `_setjmp' entry point to `sigsetjmp (..., 0)'. - Copyright (C) 1997-2016 Free Software Foundation, Inc. + Copyright (C) 1997-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/microblaze/bsd-setjmp.S b/sysdeps/microblaze/bsd-setjmp.S index f78c1f1fd2..388689dc3b 100644 --- a/sysdeps/microblaze/bsd-setjmp.S +++ b/sysdeps/microblaze/bsd-setjmp.S @@ -1,5 +1,5 @@ /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. - 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/microblaze/crti.S b/sysdeps/microblaze/crti.S index 15fbb3b0c4..09c8cd7ccd 100644 --- a/sysdeps/microblaze/crti.S +++ b/sysdeps/microblaze/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MicroBlaze. - 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 @@ -58,6 +58,7 @@ .section .init,"ax",@progbits .align 2 .globl _init + .hidden _init .type _init, @function _init: addik r1,r1,-32 @@ -79,6 +80,7 @@ $Lno_weak_fn: .section .fini,"ax",@progbits .align 2 .globl _fini + .hidden _fini .type _fini, @function _fini: addik r1,r1,-32 diff --git a/sysdeps/microblaze/crtn.S b/sysdeps/microblaze/crtn.S index a1676f7fb5..61ec067244 100644 --- a/sysdeps/microblaze/crtn.S +++ b/sysdeps/microblaze/crtn.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MicroBlaze. - 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/microblaze/dl-machine.h b/sysdeps/microblaze/dl-machine.h index fd4fe0543f..8480a7a34e 100644 --- a/sysdeps/microblaze/dl-machine.h +++ b/sysdeps/microblaze/dl-machine.h @@ -1,4 +1,4 @@ -/* 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. @@ -174,6 +174,7 @@ _dl_start_user:\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) { @@ -222,7 +223,7 @@ elf_machine_rela (struct link_map *map, const Elf32_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); value += reloc->r_addend; if (r_type == R_MICROBLAZE_GLOB_DAT || diff --git a/sysdeps/microblaze/dl-tls.h b/sysdeps/microblaze/dl-tls.h index f0f8205181..66ba0dd7ab 100644 --- a/sysdeps/microblaze/dl-tls.h +++ b/sysdeps/microblaze/dl-tls.h @@ -1,4 +1,4 @@ -/* 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. @@ -24,6 +24,3 @@ typedef struct } tls_index; extern void *__tls_get_addr (tls_index *ti); - -/* Value used for dtv entries for which the allocation is delayed. */ -#define TLS_DTV_UNALLOCATED ((void *) -1l) diff --git a/sysdeps/microblaze/dl-trampoline.S b/sysdeps/microblaze/dl-trampoline.S index f000f5f976..8ddd968ff8 100644 --- a/sysdeps/microblaze/dl-trampoline.S +++ b/sysdeps/microblaze/dl-trampoline.S @@ -1,4 +1,4 @@ -/* 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/microblaze/gccframe.h b/sysdeps/microblaze/gccframe.h index 202ee97530..2bccbf41aa 100644 --- a/sysdeps/microblaze/gccframe.h +++ b/sysdeps/microblaze/gccframe.h @@ -1,4 +1,4 @@ -/* 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/microblaze/jmpbuf-unwind.h b/sysdeps/microblaze/jmpbuf-unwind.h index 209784c6e6..27b519677d 100644 --- a/sysdeps/microblaze/jmpbuf-unwind.h +++ b/sysdeps/microblaze/jmpbuf-unwind.h @@ -1,4 +1,4 @@ -/* 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/microblaze/ldbl-classify-compat.h b/sysdeps/microblaze/ldbl-classify-compat.h new file mode 100644 index 0000000000..38c5c99949 --- /dev/null +++ b/sysdeps/microblaze/ldbl-classify-compat.h @@ -0,0 +1,8 @@ +#ifndef MICROBLAZE_LDBL_CLASSIFY_COMPAT_H +#define MICROBLAZE_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/microblaze/ldsodefs.h b/sysdeps/microblaze/ldsodefs.h index 1d67be4da0..73ac775e92 100644 --- a/sysdeps/microblaze/ldsodefs.h +++ b/sysdeps/microblaze/ldsodefs.h @@ -1,4 +1,4 @@ -/* 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/microblaze/libc-tls.c b/sysdeps/microblaze/libc-tls.c index 2265441eda..9971d105ba 100644 --- a/sysdeps/microblaze/libc-tls.c +++ b/sysdeps/microblaze/libc-tls.c @@ -1,4 +1,4 @@ -/* 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/microblaze/libm-test-ulps b/sysdeps/microblaze/libm-test-ulps index c252c96d0a..e4b4d4e490 100644 --- a/sysdeps/microblaze/libm-test-ulps +++ b/sysdeps/microblaze/libm-test-ulps @@ -1,23 +1,44 @@ # Begin of automatic generation # Maximal error of functions: +Function: "acos": +float: 1 +ifloat: 1 + Function: "acosh": -double: 1 -idouble: 1 +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "asin": +float: 1 +ifloat: 1 Function: "asinh": double: 1 float: 1 +idouble: 1 ifloat: 1 -Function: "atan2": +Function: "atan": float: 1 ifloat: 1 -Function: "atanh": +Function: "atan2": float: 1 ifloat: 1 +Function: "atanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "cabs": +double: 1 +idouble: 1 + Function: Real part of "cacos": double: 1 float: 2 @@ -25,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": @@ -42,6 +63,10 @@ float: 2 idouble: 1 ifloat: 2 +Function: "carg": +float: 1 +ifloat: 1 + Function: Real part of "casin": double: 1 float: 1 @@ -49,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": @@ -67,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": @@ -83,13 +110,15 @@ idouble: 1 ifloat: 1 Function: Imaginary part of "catanh": +double: 1 float: 1 +idouble: 1 ifloat: 1 Function: "cbrt": -double: 1 +double: 3 float: 1 -idouble: 1 +idouble: 3 ifloat: 1 Function: Real part of "ccos": @@ -129,47 +158,37 @@ idouble: 1 ifloat: 2 Function: Real part of "clog": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 3 +float: 3 +idouble: 3 +ifloat: 3 Function: Imaginary part of "clog": float: 1 ifloat: 1 Function: Real part of "clog10": +double: 3 +float: 4 +idouble: 3 +ifloat: 4 + +Function: Imaginary part of "clog10": double: 2 float: 2 idouble: 2 ifloat: 2 -Function: Imaginary part of "clog10": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - Function: "cos": float: 1 ifloat: 1 -Function: "cos_tonearest": -float: 1 -ifloat: 1 - Function: "cosh": double: 1 float: 1 idouble: 1 ifloat: 1 -Function: "cosh_tonearest": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - Function: Real part of "cpow": double: 2 float: 4 @@ -197,36 +216,24 @@ idouble: 1 ifloat: 1 Function: Real part of "csqrt": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 2 +float: 2 +idouble: 2 +ifloat: 2 Function: Imaginary part of "csqrt": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Real part of "ctan": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 - -Function: Imaginary part of "ctan": double: 2 -float: 1 +float: 2 idouble: 2 -ifloat: 1 +ifloat: 2 -Function: Real part of "ctan_tonearest": +Function: Real part of "ctan": double: 1 float: 1 idouble: 1 ifloat: 1 -Function: Imaginary part of "ctan_tonearest": +Function: Imaginary part of "ctan": double: 2 float: 1 idouble: 2 @@ -244,53 +251,43 @@ float: 2 idouble: 2 ifloat: 2 -Function: Real part of "ctanh_tonearest": -double: 2 +Function: "erf": +double: 1 float: 1 -idouble: 2 +idouble: 1 ifloat: 1 -Function: Imaginary part of "ctanh_tonearest": -double: 2 +Function: "erfc": +double: 3 float: 2 -idouble: 2 +idouble: 3 ifloat: 2 -Function: "erf": -double: 1 -idouble: 1 - -Function: "erfc": -double: 1 +Function: "exp": float: 1 -idouble: 1 ifloat: 1 Function: "exp10": -double: 1 -idouble: 1 +double: 2 +idouble: 2 -Function: "exp10_tonearest": -double: 1 -idouble: 1 - -Function: "expm1": +Function: "exp2": double: 1 float: 1 idouble: 1 ifloat: 1 -Function: "expm1_tonearest": +Function: "expm1": double: 1 float: 1 idouble: 1 ifloat: 1 Function: "gamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 4 +float: 4 +idouble: 4 +ifloat: 4 Function: "hypot": double: 1 @@ -315,34 +312,34 @@ idouble: 4 ifloat: 4 Function: "lgamma": -double: 1 -float: 1 -idouble: 1 -ifloat: 1 +double: 4 +float: 4 +idouble: 4 +ifloat: 4 Function: "log": float: 1 ifloat: 1 Function: "log10": -double: 1 +double: 2 float: 2 -idouble: 1 +idouble: 2 ifloat: 2 Function: "log1p": +double: 1 float: 1 +idouble: 1 ifloat: 1 -Function: "pow": +Function: "log2": +double: 2 float: 1 +idouble: 2 ifloat: 1 -Function: "pow10": -double: 1 -idouble: 1 - -Function: "pow_tonearest": +Function: "pow": float: 1 ifloat: 1 @@ -350,19 +347,31 @@ Function: "sin": float: 1 ifloat: 1 -Function: "sin_tonearest": +Function: "sincos": float: 1 ifloat: 1 -Function: "sincos": +Function: "sinh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + +Function: "tan": float: 1 ifloat: 1 +Function: "tanh": +double: 2 +float: 2 +idouble: 2 +ifloat: 2 + Function: "tgamma": -double: 4 -float: 3 -idouble: 4 -ifloat: 3 +double: 5 +float: 4 +idouble: 5 +ifloat: 4 Function: "y0": double: 2 diff --git a/sysdeps/microblaze/libm-test-ulps-name b/sysdeps/microblaze/libm-test-ulps-name new file mode 100644 index 0000000000..1edbaa8d98 --- /dev/null +++ b/sysdeps/microblaze/libm-test-ulps-name @@ -0,0 +1 @@ +MicroBlaze diff --git a/sysdeps/microblaze/machine-gmon.h b/sysdeps/microblaze/machine-gmon.h index d2dd6cc342..70acd61bab 100644 --- a/sysdeps/microblaze/machine-gmon.h +++ b/sysdeps/microblaze/machine-gmon.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2011-2016 Free Software Foundation, Inc. +/* Copyright (C) 2011-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/math_private.h b/sysdeps/microblaze/math_private.h deleted file mode 100644 index d82e8bf820..0000000000 --- a/sysdeps/microblaze/math_private.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef MICROBLAZE_MATH_PRIVATE_H -#define MICROBLAZE_MATH_PRIVATE_H 1 - -/* Suppress use of exceptions here to avoid build errors if the FE_* - macros aren't definied. Only allow rounding modes implemented for - MicroBlaze. - - 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/microblaze/memusage.h b/sysdeps/microblaze/memusage.h index 8d314e18ee..de17609cba 100644 --- a/sysdeps/microblaze/memusage.h +++ b/sysdeps/microblaze/memusage.h @@ -1,4 +1,4 @@ -/* 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. diff --git a/sysdeps/microblaze/nptl/Makefile b/sysdeps/microblaze/nptl/Makefile index 486aeca81e..bebbdef871 100644 --- a/sysdeps/microblaze/nptl/Makefile +++ b/sysdeps/microblaze/nptl/Makefile @@ -1,4 +1,4 @@ -# 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/microblaze/nptl/bits/pthreadtypes-arch.h b/sysdeps/microblaze/nptl/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..846d5d0a57 --- /dev/null +++ b/sysdeps/microblaze/nptl/bits/pthreadtypes-arch.h @@ -0,0 +1,72 @@ +/* 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 + 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 + +/* Definitions for internal mutex struct. */ +#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/microblaze/nptl/bits/pthreadtypes.h b/sysdeps/microblaze/nptl/bits/pthreadtypes.h deleted file mode 100644 index 9e9e307cf9..0000000000 --- a/sysdeps/microblaze/nptl/bits/pthreadtypes.h +++ /dev/null @@ -1,181 +0,0 @@ -/* Copyright (C) 2002-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_COND_COMPAT_T 12 -# 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 not - exposed on purpose. */ -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 not exposed on purpose. */ -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; - -/* Mutex __spins initializer used by PTHREAD_MUTEX_INITIALIZER. */ -#define __PTHREAD_SPINS 0 - -typedef union -{ - char __size[__SIZEOF_PTHREAD_MUTEXATTR_T]; - int __align; -} pthread_mutexattr_t; - -/* Data structure for conditional variable handling. The structure of - the attribute type is not exposed on purpose. */ -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]; - 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 not exposed on purpose. */ -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/microblaze/nptl/bits/semaphore.h b/sysdeps/microblaze/nptl/bits/semaphore.h index ea05026a06..d08e71e56b 100644 --- a/sysdeps/microblaze/nptl/bits/semaphore.h +++ b/sysdeps/microblaze/nptl/bits/semaphore.h @@ -1,4 +1,4 @@ -/* 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. diff --git a/sysdeps/microblaze/nptl/pthread-offsets.h b/sysdeps/microblaze/nptl/pthread-offsets.h new file mode 100644 index 0000000000..9617354dc7 --- /dev/null +++ b/sysdeps/microblaze/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/microblaze/nptl/pthread_spin_lock.c b/sysdeps/microblaze/nptl/pthread_spin_lock.c deleted file mode 100644 index 21a54b8215..0000000000 --- a/sysdeps/microblaze/nptl/pthread_spin_lock.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 2008-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/microblaze/nptl/pthreaddef.h b/sysdeps/microblaze/nptl/pthreaddef.h index 56d80e18ea..12fac81398 100644 --- a/sysdeps/microblaze/nptl/pthreaddef.h +++ b/sysdeps/microblaze/nptl/pthreaddef.h @@ -1,4 +1,4 @@ -/* 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. diff --git a/sysdeps/microblaze/nptl/tcb-offsets.sym b/sysdeps/microblaze/nptl/tcb-offsets.sym index 18afbee291..614f0dfed6 100644 --- a/sysdeps/microblaze/nptl/tcb-offsets.sym +++ b/sysdeps/microblaze/nptl/tcb-offsets.sym @@ -7,5 +7,4 @@ #define thread_offsetof(mem) (long)(offsetof (struct pthread, mem) - sizeof (struct pthread)) MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) -PID_OFFSET thread_offsetof (pid) TID_OFFSET thread_offsetof (tid) diff --git a/sysdeps/microblaze/nptl/tls.h b/sysdeps/microblaze/nptl/tls.h index 8376f5005e..8b489740f2 100644 --- a/sysdeps/microblaze/nptl/tls.h +++ b/sysdeps/microblaze/nptl/tls.h @@ -1,4 +1,4 @@ -/* 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. @@ -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> @@ -126,6 +116,7 @@ typedef struct (descr->member[idx] = (value)) /* 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/microblaze/s_fma.c b/sysdeps/microblaze/s_fma.c deleted file mode 100644 index d9613fa67c..0000000000 --- a/sysdeps/microblaze/s_fma.c +++ /dev/null @@ -1 +0,0 @@ -#include <soft-fp/fmadf4.c> diff --git a/sysdeps/microblaze/s_fmaf.c b/sysdeps/microblaze/s_fmaf.c deleted file mode 100644 index aa5c9b2d91..0000000000 --- a/sysdeps/microblaze/s_fmaf.c +++ /dev/null @@ -1 +0,0 @@ -#include <soft-fp/fmasf4.c> diff --git a/sysdeps/microblaze/setjmp.S b/sysdeps/microblaze/setjmp.S index 7d42dd6b89..dda1f26e1b 100644 --- a/sysdeps/microblaze/setjmp.S +++ b/sysdeps/microblaze/setjmp.S @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/sotruss-lib.c b/sysdeps/microblaze/sotruss-lib.c index 761ddeffa6..a5f1f8decc 100644 --- a/sysdeps/microblaze/sotruss-lib.c +++ b/sysdeps/microblaze/sotruss-lib.c @@ -1,5 +1,5 @@ /* Override generic sotruss-lib.c to define actual functions for MicroBlaze. - 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/microblaze/stackinfo.h b/sysdeps/microblaze/stackinfo.h index 193ea10a89..cfa339bdee 100644 --- a/sysdeps/microblaze/stackinfo.h +++ b/sysdeps/microblaze/stackinfo.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2016 Free Software Foundation, Inc. +/* Copyright (C) 2001-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/start.S b/sysdeps/microblaze/start.S index 337c415563..cc8dd13fe4 100644 --- a/sysdeps/microblaze/start.S +++ b/sysdeps/microblaze/start.S @@ -1,4 +1,4 @@ -/* 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. diff --git a/sysdeps/microblaze/sysdep.h b/sysdeps/microblaze/sysdep.h index 366b3ca1a5..86cd827a09 100644 --- a/sysdeps/microblaze/sysdep.h +++ b/sysdeps/microblaze/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1997-2016 Free Software Foundation, Inc. +/* Copyright (C) 1997-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/sysdeps/microblaze/tls-macros.h b/sysdeps/microblaze/tls-macros.h index 8ca20f0463..23d2f617f3 100644 --- a/sysdeps/microblaze/tls-macros.h +++ b/sysdeps/microblaze/tls-macros.h @@ -1,4 +1,4 @@ -/* 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. diff --git a/sysdeps/microblaze/tst-audit.h b/sysdeps/microblaze/tst-audit.h index 115e14b282..11e73e0e10 100644 --- a/sysdeps/microblaze/tst-audit.h +++ b/sysdeps/microblaze/tst-audit.h @@ -1,6 +1,6 @@ /* Definitions for testing PLT entry/exit auditing. MicroBlaze 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. |