diff -rNpu glibc-2.3.4/catgets/gencat.c glibc-2.3.5/catgets/gencat.c --- glibc-2.3.4/catgets/gencat.c 2004-05-17 11:37:10.000000000 -0700 +++ glibc-2.3.5/catgets/gencat.c 2005-02-16 02:29:38.000000000 -0800 @@ -248,7 +248,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -rNpu glibc-2.3.4/ChangeLog glibc-2.3.5/ChangeLog --- glibc-2.3.4/ChangeLog 2004-12-20 00:34:53.000000000 -0800 +++ glibc-2.3.5/ChangeLog 2005-04-05 20:44:01.000000000 -0700 @@ -1,5480 +1,1154 @@ -2004-12-20 Jakub Jelinek , - Jim Gifford +2005-04-05 Roland McGrath - [BZ #562] - * sysdeps/mips/Makefile (librt-sysdep_routines): Add. - * sysdeps/unix/mips/rt-sysdep.S: New file. - -2004-12-19 Roland McGrath - - * iconv/Makefile (test-iconvconfig): New target. - [$(cross-compiling) != yes] (xtests): Depend on it. - - * iconv/iconvconfig.c (nostdlib, output_file, output_file_len): - New variables. - (options, parse_opt, main): Take new options --nostdlib and - --output/-o to set them. Under --nostdlib, skip GCONV_PATH dirs. - (write_output): If output_file is set, write the output there. - -2004-12-19 Andreas Jaeger - - [BZ #560] - * inet/netinet/in.h: Use __interface_addr instead of __interface. - - [BZ #573] - * sunrpc/xcrypt.c (passwd2des_internal): Make it hidden instead of - internal linkage. - -2004-12-19 Roland McGrath - - * version.h (VERSION): 2.3.4. - * README.template: Various updates. + * NEWS, version.h (VERSION): 2.3.5. + * README.template: Note incompatibility with GCC 4. * README: Regenerated. - * NEWS: Mention ports. - * README-alpha: File removed. - - [BZ #416] - * locale/langinfo.h: Comment fixes. - -2004-12-17 Ulrich Drepper - - * po/ja.po: Update from translation team. - -2004-12-17 Richard Henderson - - * sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Add support - for NPTL where the PID is stored at userlevel and needs to be - reset when CLONE_THREAD is not used. - -2004-12-17 Jakub Jelinek - - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. - -2004-12-17 Andreas Jaeger - - * math/libm-test.inc (atan2_test): Compute value with 36 digits. - * sysdeps/alpha/fpu/libm-test-ulps: Adjust for changed result. - * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. - * sysdeps/s390/fpu/libm-test-ulps: Likewise. - * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Likewise. - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. - * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. - -2004-12-16 Ulrich Drepper - - * stdlib/tst-setcontext.c: Enlarge st1 and st2 arrays. - -2004-09-02 Steven Munroe - - [BZ #610] - * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S - (__novec_getcontext): Fix typo in store of fp29. - (__getcontext): Fix typo in store of fp29. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S - (__novec_swapcontext): Fix typo in store of fp29. - (__swapcontext): Fix typo in store of fp29. - -2004-12-17 GOTO Masanori - - * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): Fix - vague message. -2004-12-16 Roland McGrath - - * nscd/Makefile ($(objpfx)nscd): Don't depend on $(selinux-LIBS), - which is usually a -lselinux that make will resolve wrongly. - -2004-12-16 Andreas Jaeger - - * math/math.h: Use #if defined to not receive warnings about - undefined symbols. - -2004-12-16 Jakub Jelinek - - * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone): Add support - for NPTL where the PID is stored at userlevel and needs to be reset - when CLONE_THREAD is not used. - - * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h - (SYSCALL_ERROR_HANDLER): If RTLD_PRIVATE_ERRNO, use rtld_errno - instead of errno. - * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Include - sysdep-cancel.h instead of sysdep.h. Handle cancellation. - * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Regenerate. - - * sysdeps/ieee754/ldbl-128/e_expl.c: Include stdlib.h. - -2004-12-15 Jakub Jelinek - - * sysdeps/unix/sysv/linux/gethostid.c: Make bi-arch safe. - -2004-12-15 Steven Munroe - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Correct stack - alignment. Clean up flag bit tests. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Correct stack - alignment. Clean up flag bit tests. Remove redundent SP assignment. - Add TOC register save/restore around function call. - - * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Make no_vmx symbol - local. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Make no_vmx symbol - local. - * sysdeps/powerpc/powerpc64/__longjmp-common.S: Make no_vmx symbol - local. - * sysdeps/powerpc/powerpc64/setjmp-common.S: Make no_vmx and - aligned_save_vmx symbol local. - -2004-12-15 Ulrich Drepper - - * sysdeps/i386/i486/bits/string.h (__strncat_g): Fix i686 - implementation. - -2004-09-08 H.J. Lu - - * Makeconfig (libunwind): New. - (libgcc_eh): Add $(libunwind). - (gnulib): Always set to -lgcc $(libgcc_eh). - (static-gnulib): Always set to -lgcc -lgcc_eh $(libunwind). - (libc.so-gnulib): New. - * Makerules (LDLIBS-c.so): Use $(libc.so-gnulib) instead of - $(static-gnulib). - * configure.in (libc_cv_cc_with_libunwind): Set to yes if gcc - uses -lunwind for static binaries. - -2004-06-05 Joseph S. Myers - - * malloc/Makefile (install-bin): Remove memusage. - (install-bin-script): Add memusage. - -2004-12-15 Jakub Jelinek - - * nis/nis_domain_of_r.c (nis_domain_of_r): Use libnsl_hidden_def, - not libnsl_hidden_proto. - - * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (__clone): Add support - for NPTL where the PID is stored at userlevel and needs to be reset - when CLONE_THREAD is not used. - * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (__clone): Likewise. - - * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Save - and restore r2 around call to fn. - -2004-12-15 Andreas Jaeger - - * sysdeps/ia64/dl-machine.h (elf_machine_rela): Mark auto instead - of static, add always_inline attribute. - (elf_machine_rela_relative): Likewise. - (elf_machine_lazy_rel): Likewise. - -2004-12-15 Ulrich Drepper - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Add support - for pid caching in nptl. - -2004-12-14 Ulrich Drepper - - * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Add support - for pid caching in nptl. - -2004-10-18 Maciej W. Rozycki - - * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Use - __NTH instead of __THROW in the inline definition. - * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. - - * sysdeps/mips/bits/dlfcn.h (RTLD_DEEPBIND): New macro. - - * sysdeps/unix/sysv/linux/mips/bits/mman.h - (PROT_GROWSDOWN, PROT_GROWSUP): New macros. - -2004-10-06 Alan Modra - - * sysdeps/powerpc/powerpc64/ppc-mcount.S (PROF): Don't undef. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S: Invoke CALL_MOUNT. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise. - -2004-10-19 Wolfram Gloger - - * malloc/hooks.c (mem2chunk_check, top_check): Handle - non-contiguous arena. Reported by Michael Dalton - [BZ #457]. Add further checks for top chunk. - -2004-12-14 Jakub Jelinek - - * sysdeps/posix/sysconf.c (__sysconf_check_spec): Remove leading - underscore from GETCONF_DIR filenames. - -2004-12-13 Ulrich Drepper - - * po/de.po: Update from translation team. - - * nss/getnssent.c (__nss_getent): Double buffer size each round to - avoid problems with delays for some people's huge entries. - * nss/getXXbyYY.c (FUNCTION_NAME): Likewise. - -2004-12-13 Jakub Jelinek - - * posix/getconf.c (main): Prepend just $GETCONF_DIR/ instead of - $GETCONF_DIR/_ to spec. - * posix/confstr.c (confstr): Remove leading underscores for - _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS. - -2004-12-12 Ulrich Drepper - - * elf/dl-load.c (_dl_map_object_from_fd): Fix computation of - mapping start. It must take the actual pagesize into account, not - the alignment in the file. - -2004-12-11 Ulrich Drepper - - * malloc/malloc.c (_int_realloc): Add checks for corrupted memory. - (_int_free): Make clear message are result of free() calls. - - * malloc/malloc.c (_int_realloc): Remove unnecessary tests for - oldmem and size == 0. - -2004-12-10 Ulrich Drepper - - * malloc/arena.c (arena_get2): Prevent endless loop if arenas and - list lock are taken. - -2004-12-08 Thorsten Kukuk - - * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_getnetgrent_r): - Add check if the value is not an empty string. [BZ #597] - -2004-11-29 Jakub Jelinek - - * stdlib/strtod_l.c (INTERNAL (__STRTOF)): If densize > 2 - and numsize < densize, always shift num up by empty + 1 limbs. - -2004-12-07 Paolo Bonzini - - * posix/regexec.c (proceed_next_node): Simplify treatment of epsilon - nodes. Pass the pushed node to push_fail_stack. - (push_fail_stack): Accept a single node rather than an array - of two epsilon destinations. - (build_sifted_states): Only walk non-epsilon nodes. - (check_arrival): Don't pass epsilon nodes to - check_arrival_add_next_nodes. - (check_arrival_add_next_nodes) [DEBUG]: Abort if an epsilon node is - found. - (check_node_accept): Do expensive checks later. - (add_epsilon_src_nodes): Cache result of merging the inveclosures. - * posix/regex_internal.h (re_dfastate_t): Add non_eps_nodes and - inveclosure. - (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at, - re_string_context_at, re_string_peek_byte_case, - re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains): - Declare as pure. - * posix/regex_internal.c (create_newstate_common): Remove. - (register_state): Move part of it here. Initialize non_eps_nodes. - (free_state): Free inveclosure and non_eps_nodes. - (create_cd_newstate, create_ci_newstate): Allocate the new - re_dfastate_t here. - -2004-12-09 Ulrich Drepper - - * malloc/malloc.c (public_rEALLOc): Add parameter checks. - (_int_free): Provide better error message for invalid pointers. - -2004-12-01 Jakub Jelinek - - * posix/tst-regex.c: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 - conditionals instead of defined _POSIX_CPUTIME. - (main): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME - option is available. - * posix/tst-regex.c2: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 - conditionals instead of defined _POSIX_CPUTIME. - (do_test): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME - option is available. - * sysdeps/posix/sysconf.c (__sysconf): If _POSIX_CPUTIME resp. - _POSIX_THREAD_CPUTIME is defined to 0, return -1 for the corresponding - _SC_ argument. - -2004-12-08 Jakub Jelinek - - * elf/ldd.bash.in: When set -o pipefail is available, use that for - piping to cat; when not, don't use the pipe at all. - Pipe to cat in all cases of running the executable. - When direct running exits with code 5, retry running via ${RTLD}. - * elf/rtld.c (process_envvars): If __libc_enable_secure and - mode != normal, exit with exitcode 5. - -2004-12-07 Jakub Jelinek - - * sysdeps/posix/sysconf.c (__sysconf_check_spec): Only define - if it will be actually used. - -2004-12-07 Roland McGrath - - * rt/tst-timer5.c (setup_test): New function. - (TEST_CLOCK_MISSING): Use it to punt test if timer_create does not - support CLOCK_MONOTONIC. - -2004-12-07 Jakub Jelinek - - * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Add support for - NPTL where the PID is stored at userlevel and needs to be reset when - CLONE_THREAD is not used. Restore gp before calling _exit. - -2004-12-07 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/clone.S: Clear the frame pointer when - starting a new thread. Add support for NPTL where the PID is stored - at userlevel and needs to be reset when CLONE_THREAD is not used. - -2004-12-01 Jakub Jelinek - - * elf/rtld.c (process_envvars): Don't consider LD_SHOW_AUXV - and LD_DYNAMIC_WEAK if __libc_enable_secure. - If __libc_enable_secure, /etc/suid-debug doesn't exist and - program will be actually run, turn off all debugging. - * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add LD_DEBUG, - LD_DYNAMIC_WEAK and LD_SHOW_AUXV. - -2004-12-06 Jakub Jelinek - - * time/tzset.c (tzset_internal): If + or - is seen, - but no offset after it, reset offset to 0. [BZ #601] - -2004-12-06 Ulrich Drepper - - * libio/ioseekpos.c (_IO_seekpos_unlocked): Call _IO_SEEKOFF not - _IO_SEEKPOS, saving one indirect jump. - - * libio/fileops.c (_IO_new_file_seekoff): Fix optimization of in-buffer - seek. Remove dead code. - -2004-12-02 Jakub Jelinek - - * libio/Makefile (tests): Add bug-ungetc4. - * libio/bug-ungetc4.c: New test. - -2004-12-06 Roland McGrath - - * sysdeps/unix/clock_nanosleep.c (clock_nanosleep): Diagnose EINVAL - for CLOCK_THREAD_CPUTIME_ID, not ENOTSUP. - Use SYSDEP_NANOSLEEP handler before validating CLOCK_ID value. - - * rt/tst-timer4.c (TEST_CLOCK, TEST_CLOCK_NANOSLEEP): New macros. - Use them throughout in place of CLOCK_REALTIME and nanosleep. - (do_test) [TEST_CLOCK_MISSING]: Call this macro and if it returns - non-null, punt the test with a message using the string returned. - * rt/tst-timer5.c: New file. - * rt/Makefile (tests): Add it. - -2004-12-01 Paolo Bonzini - - * posix/regcomp.c (free_dfa_content, init_dfa): Remove - references to re_dfa_t's subexps field. - (parse_sub_exp, parse_expression): Do not use it. Use - completed_bkref_map instead. - (create_initial_state, peek_token): Store a backreference \N - with opr.idx = N-1. - * posix/regexec.c (proceed_next_node, check_dst_limits, get_subexp): - Likewise. - (check_subexp_limits): Remove useless condition. - * posix/regex_internal.h (re_subexp_t): Remove. - (re_dfa_t): Remove subexps and subexps_alloc field, add - completed_bkref_map. - -2004-12-05 Roland McGrath - - * Makeconfig: Comment typo fix. - -2004-11-30 Andreas Schwab - - * nis/ypclnt.c (ypprot_err): Remove unused entries. - -2004-11-30 Paolo Bonzini - - * posix/regexec.c (check_dst_limits_calc_pos_1): Check for - bkref_idx == -1, and don't recurse in that case. - -2004-11-30 GOTO Masanori - - * posix/confstr.c: Enclose #error message with double quote - for gcc-3.3 and lower. - -2004-12-04 Ulrich Drepper - - * sysdeps/unix/sysv/linux/i386/clone.S: Add support for NPTL where - the PID is stored at userlevel and needs to be reset when CLONE_THREAD - is not used. - * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. - -2004-11-18 Daniel Jacobowitz - - * sysdeps/arm/sysdep.h: Define __USE_BX__ if bx is available. - Use it instead of __THUMB_INTERWORK__. Make RETINSTR take - only a condition and a register. - * sysdeps/arm/dl-machine.h: Use __USE_BX__ instead of - __THUMB_INTERWORK__. - (_dl_start_user): Use BX. - * sysdeps/arm/strlen.S: Use DO_RET. - * sysdeps/unix/arm/brk.S: Likewise. - * sysdeps/unix/arm/fork.S: Likewise. - * sysdeps/unix/arm/sysdep.S: Likewise. - * sysdeps/unix/arm/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/arm/clone.S: Update uses of RETINSTR. - * sysdeps/unix/sysv/linux/arm/mmap.S: Likewise. - * sysdeps/unix/sysv/linux/arm/mmap64.S: Likewise. - * sysdeps/unix/sysv/linux/arm/socket.S: Likewise. - * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise. - -2004-12-02 Roland McGrath - - * extra-lib.mk (object-suffixes-$(lib)): Add .oS when - $(lib)-static-only-routines is nonempty. - (extra-objs, o-iterator.mk rule): Filter out .oS from generators. - Add a special rule for .oS objects -> _nonshared.a library. - -2004-12-01 Jakub Jelinek - - * time/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC, - convert T2, not T. - * time/Makefile (tests): Add tst-mktime3. - * time/tst-mktime3.c: New test. - -2004-12-01 Jakub Jelinek - - * stdlib/stdlib.h (realpath): Remove nonnull attribute. - - * posix/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after - normal_bracket label. - - * time/tst-mktime2.c (bigtime_test): Initialize tm.tm_isdst to -1. - -2004-12-01 Roland McGrath - - * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.c): - Do $(make-target-directory). - -2004-11-29 Roland McGrath - - * posix/confstr.c: Avoid punctuation in #error text. - -2004-11-27 Ulrich Drepper - - * posix/Makefile (tests): Add tst-sysconf. - * posix/tst-sysconf.c: New file. - - * posix/getconf.c (vars): Add support for _SC_IPV6 and - _SC_RAW_SOCKETS. - * sysdeps/posix/sysconf.c (__sysconf): Add support for _SC_IPV6 - and _SC_RAW_SOCKETS. - * sysdeps/generic/bits/confname.h: Define _SC_IPV6 and - _SC_RAW_SOCKETS. - -2004-11-26 Jakub Jelinek - - * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR. - -2004-11-26 Kaz Kojima - - * sysdeps/unix/sysv/linux/mips/pread.c: Include sgidefs.h only if - NO_SGIDEFS_H isn't defined. Don't include sgidefs.h twice. - * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. - -2004-11-27 Ulrich Drepper - - * include/dlfcn.h (__libc_dlopen): Add __RTLD_DLOPEN to the mode - parameter. Reported by VY Newsum . - -2004-11-10 Daniel Jacobowitz - - * libio/iolibio.h (_IO_fclose, _IO_new_fclose, _IO_old_fclose, - _IO_fflush, _IO_fgetpos, _IO_fgetpos64, _IO_fgets, _IO_fopen, - _IO_old_fopen, _IO_new_fopen, _IO_fopen64, __fopen_internal, - _IO_fprintf, _IO_fputs, _IO_fsetpos, _IO_fsetpos64, _IO_ftell, - _IO_fread, _IO_fwrite, _IO_gets, _IO_printf, _IO_puts, _IO_scanf, - _IO_fflush_internal, _IO_ftell_internal, _IO_fputs_internal) - _IO_fwrite_internal): Remove incorrect __THROW. - * libio/libioP.h (_IO_default_xsputn, _IO_wdefault_xsputn, - _IO_default_xsgetn, _IO_wdefault_xsgetn, _IO_default_write, - _IO_default_read, _IO_getline, _IO_getline_info, _IO_getwline, - _IO_getwline_info, _IO_file_read_internal, _IO_sgetn_internal, - _IO_wdo_write_internal, _IO_do_write_internal, - _IO_getline_info_internal, _IO_getline_internal, - _IO_vfprintf_internal, _IO_putc_internal, _IO_read, _IO_write, - _IO_close): Likewise. - -2004-11-26 Jakub Jelinek - - * posix/Makefile (install-others): Add $(inst_libexecdir)/getconf. - (CFLAGS-sysconf.c): Add -D_GETCONF_DIR. - (CFLAGS-getconf.c): New. - ($(inst_libexecdir)/getconf): New. - * posix/confstr.c (confstr): Use __sysconf to query specifications - that don't have _POSIX_V6_* macros defined. Use __*_{C,LD}FLAGS - macros defined in bits/environments.h. - * sysdeps/posix/sysconf.c: Include stdlib.h, string.h and - sys/stat.h. - (__sysconf_check_spec): New routine. - (__sysconf): Use it. - * posix/getconf.c (specs): Change into structure array. - (main): If -v is not given, try to get default from - $(libexecdir)/getconf/default. If specification is not - supported by this getconf, try to execute - $(libexecdir)/getconf/$(specification). - * sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h: New file. - * sysdeps/unix/sysv/linux/s390/bits/environments.h: New file. - * sysdeps/unix/sysv/linux/powerpc/bits/environments.h: New file. - * sysdeps/unix/sysv/linux/sparc/bits/environments.h: New file. - * sysdeps/unix/sysv/linux/i386/bits/environments.h: New file. - * sysdeps/unix/sysv/linux/x86_64/bits/environments.h: New file. - * sysdeps/generic/bits/environments.h (__ILP32_OFFBIG_CFLAGS): - Define. - - * stdlib/stdlib.h (setenv): Use nonnull only for second argument. - (unsetenv): Remove. - -2004-11-23 Paolo Bonzini - - * posix/regcomp.c (analyze_tree): Always call calc_epsdest. - (calc_inveclosure): Use re_node_set_insert_last. - (parse_dup_op): Lower X{1,5} to (X(X(X(XX?)?)?)?)? - rather than X?X?X?X?X?. - * posix/regex_internal.h (re_node_set_insert_last): New declaration. - * posix/regex_internal.c (re_node_set_insert_last): New function. - * posix/PCRE.tests: Add testcases. - -2004-11-25 Ulrich Drepper - - * dlfcn/dlfcn.h: Remove nonnull attribute from dlopen. - - * posix/confstr.c (confstr): Return appropriate strings for - _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, and _CS_LFS64_LINTFLAGS. - -2004-11-05 Maciej W. Rozycki - - * sysdeps/mips/dl-machine.h: Include . Use _ABIO32, - _ABIN32 and _ABI64 for ABI selection throughout. - * sysdeps/mips/elf/start.S: Likewise. - * sysdeps/mips/mips64/__longjmp.c: Likewise. - * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. - * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. - * sysdeps/mips/mips64/setjmp.S: Likewise. - * sysdeps/mips/mips64/setjmp_aux.c: Likewise. - * sysdeps/mips/sys/regdef.h: Likewise. - * sysdeps/mips/sys/ucontext.h: Likewise. - * sysdeps/unix/mips/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/kernel-features.h: Likewise. - * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/ptrace.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. - - * sysdeps/mips/atomicity.h: Use _ABIO32, _ABIN32 and _ABI64 for - ABI selection throughout. - * sysdeps/mips/bits/setjmp.h: Likewise. - * sysdeps/mips/fpu/bits/mathdef.h: Likewise. - * sysdeps/mips/machine-gmon.h: Likewise. - * sysdeps/mips/sys/asm.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/user.h: Likewise. - - * sysdeps/mips/sgidefs.h: Prevent from being - included by kernel headers and undo its settings if already - included. Define _ABIO32, _ABIN32 and _ABI64 if missing and use - them to define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32 and - _MIPS_SIM_ABI64 for compatibility. - * sysdeps/unix/sysv/linux/mips/Makefile: Use _ABIO32, _ABIN32 and - _ABI64 for ABI selection in generated syscall-list.h - * sysdeps/unix/sysv/linux/mips/configure.in: Use _ABIO32, _ABIN32 - and _ABI64 for ABI selection in generated asm-unistd.h. - * sysdeps/unix/sysv/linux/mips/configure: Regenerate. - - * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Correct - an inverted _MIPS_SIM conditional. - -2004-11-23 Alexandre Oliva - - * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Use free - range even if it doesn't match exactly. - -2004-11-23 Jakub Jelinek - - * nss/nss_files/files-XXX.c (internal_getent): If parse_line returned - -1, also do H_ERRNO_SET (NETDB_INTERNAL). - -2004-11-22 Ulrich Drepper - - * sysdeps/i386/fpu_control.h: Add volatile to the asms. - Patch by Alexander Stohr. - -2004-11-22 Jakub Jelinek - - * nscd/nscd_getai (__nscd_getai): Avoid memory and file descriptor - leaks. - * sysdeps/posix/getaddrinfo.c (gaih_inet): Free air. - -2004-11-15 Maciej W. Rozycki - - * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (__SI_MAX_SIZE): - Define appropriately based on __WORDSIZE. - [struct siginfo] (__pad0): Add for explicit padding. - - * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Formatting fixes - throughout. - -2004-11-22 Ulrich Drepper - - * dirent/dirent.h: Add nonnull attributes. - * dlfcn/dlfcn.h: Likewise. - -2004-11-20 Jakub Jelinek - - * sysdeps/ieee754/k_standard.c: Document code 50. - (__kernel_standard) : Avoid raising div-by-zero - exception again. - -2004-11-19 H.J. Lu - - [BZ #552] - * math/libm-test.inc (tgamma_test): Update tgamma (0) and - tgamma (-0). - * sysdeps/generic/w_tgamma.c (__tgamma): Properly handle |x| == 0. - * sysdeps/generic/w_tgammaf.c (__tgammaf): Likewise. - * sysdeps/generic/w_tgammal.c (__tgammal): Likewise. - * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Likewise. - * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. - * sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise. - * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise. - * sysdeps/ieee754/k_standard.c (__kernel_standard): Handle - tgamma (0) and tgamma (-0). - -2004-11-20 Ulrich Drepper - - * time/tzfile.c (__tzfile_read): Avoid open for checking whether - the file we already use changed. - - * misc/syslog.c: Remove !USE_IN_LIBIO code. - -2004-11-20 Jakub Jelinek - - * signal/signal.h (__sysv_signal, sysv_signal, signal, bsd_signal, - ssignal): Remove __nonnull attribute. - -2004-11-20 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/sys/procfs.h: New file. - -2004-11-20 Ulrich Drepper - - * signal/signal.h: Add nonnull attributes. - - * signal/signal.h: Add deprecated attributes to sigstack, - sigpause, sigblock, sigsetmask, siggetmask. - -2004-11-20 Jakub Jelinek - - * sysdeps/unix/sysv/linux/bits/socket.h (SCM_RIGHTS): Avoid - comma at the end of enum if __USE_BSD is not defined. - -2004-11-19 Ulrich Drepper - - * malloc/malloc.c (_int_malloc): Check for corruption of chunk - which is about to be returned. - - * malloc/malloc.c (_int_free): Add a few more cheap tests for - corruption. - -2004-11-17 Randolph Chung - - * sysdeps/hppa/dl-machine.h (TRAMPOLINE_TEMPLATE): Add unwind - annotations. - -2004-11-18 Jakub Jelinek - - [BZ #544] - * posix/regex.h (RE_NO_SUB): New define. - * posix/regex_internal.h (OP_DELETED_SUBEXP): New. - (re_dfa_t): Add subexp_map. - * posix/regcomp.c (struct subexp_optimize): New type. - (optimize_subexps): New routine. - (re_compile_internal): Call it. - (re_compile_pattern): Set preg->no_sub to 1 if RE_NO_SUB. - (free_dfa_content): Free subexp_map. - (calc_inveclosure, calc_eclosure): Skip OP_DELETED_SUBEXP nodes. - * posix/regexec.c (re_search_internal): If subexp_map - is not NULL, duplicate registers as needed. - * posix/Makefile: Add rules to build and run tst-regex2. - * posix/tst-regex2.c: New test. - * posix/rxspencer/tests: Fix last two tests (\0 -> \1). - Add some new tests for nested subexpressions. - -2004-11-18 Ulrich Drepper - - * libio/libio.h (_IO_FLAGS2_FORTIFY): Renamed from - _IO_FLAGS2_CHECK_PERCENT_N. - * debug/fprintf_chk.c: Adjust all users. - * debug/printf_chk.c: Likewise. - * debug/vfprintf_chk.c: Likewise. - * debug/vprintf_chk.c: Likewise. - * debug/vsnprintf_chk.c: Likewise. - * debug/vsprintf_chk.c: Likewise. - * stdio-common/vfprintf.c: Likewise. Detect missing %N$ formats. - * debug/tst-chk1.c: Test detection of missing %N$ formats. - -2004-11-15 Jakub Jelinek - - * posix/bug-regex24.c: Include string.h. - - * nis/nis_clone_obj.c (nis_clone_object): Rename out3 label to out2 - and out2 to out. Remove out label. Formatting. - -2004-11-15 Ulrich Drepper - - * include/stdio.h: Do not mark __libc_message as noreturn. - * sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Add loop to - fool gcc. Include . - * sysdeps/posix/libc_fatal.c (__libc_fatal): Add loop to fool gcc. - (__libc_message): Fix typo. - -2004-11-13 Ulrich Drepper - - * malloc/malloc.c (malloc_state): stat_lock_* elements need only - be defined if THREAD_STATS is defined. Remove pad0_ since it does - not align with cache line sizes in general anyway. - -2004-11-13 Jakub Jelinek - - * elf/rtld.c (print_statistics): Avoid segfaults if not all namespaces - are used. Fix computation of num_relative_relocations on RELA - architectures other than IA-64 and Alpha. - -2004-11-13 Ulrich Drepper - - * malloc/malloc.c (_int_free): Use munmap_chunk for handling - mmaped memory. - -2004-11-12 Ulrich Drepper - - * malloc/malloc.c (_int_free): Remove test for NULL parameter. - (_int_realloc): Call _int_free only if memory parameter is not NULL. - - * sysdeps/unix/sysv/linux/libc_fatal.c: Add new function __libc_message - which performs the printing and simple format string handling. The - string is written to tty, stderr, syslog in this order, stopping after - the first successful output. - (__libc_fatal): Call __libc_message. - * include/stdio.h: Declare __libc_message. - * malloc/malloc.c (malloc_printerr): Use __libc_message. - * debug/chk_fail.c: Also print message with __libc_message. - * debug/test-strcpy_chk.c: Ensure that debug messages are not printed - to the terminal or stderr. - * debug/tst-chk1.c: Likewise. - - * posix/Makefile: Remove gpl2lgpl variable. - -2004-11-12 Martin Schwidefsky - - * elf/elf.h: Add 20 bit relocations R_390_*20. - -2004-11-12 Jakub Jelinek - - * sysdeps/unix/sysv/linux/i386/setuid.c: Include linux/posix_types.h. - * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. - -2004-11-12 Andreas Schwab - - * nis/ypclnt.c (ypprot_err): Fix "minor optimizations". - -2004-11-12 Ulrich Drepper - - * posix/Makefile (tests): Add bug-regex24. - * posix/bug-regex24.c: New file. - -2004-11-12 Paolo Bonzini - - * posix/regexec.c (check_dst_limits_calc_pos_1): Use the map to - cut recursive paths. Make exit condition more precise. - (match_ctx_add_entry): Initialize the map. - * posix/regex_internal.h (struct re_backref_cache_entry): Add a map of - reachable subexpression nodes from each backreference cache entry. - -2004-11-10 Jakub Jelinek - - * sysdeps/unix/sysv/linux/setreuid.c: Remove sys/syscall.h, - sys/types.h, linux/posix_types.h, sysdep.h and pthread-functions.h - includes. Include setxid.h. Use INLINE_SETXID_SYSCALL macro - instead of INLINE_SYSCALL, kill the HAVE_PTR__NPTL_SETXID guarded - snippets. - * sysdeps/unix/sysv/linux/setegid.c: Likewise. - * sysdeps/unix/sysv/linux/setuid.c: Likewise. - * sysdeps/unix/sysv/linux/seteuid.c: Likewise. - * sysdeps/unix/sysv/linux/setgid.c: Likewise. - * sysdeps/unix/sysv/linux/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/setresgid.c: Likewise. - * sysdeps/unix/sysv/linux/setregid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/setreuid.c: Likewise. - Formatting. Change signed int into int. - * sysdeps/unix/sysv/linux/alpha/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/setresgid.c: Likewise. - * sysdeps/unix/sysv/linux/alpha/setregid.c: Likewise. - * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid): - Remove. - * sysdeps/unix/setxid.h: New file. - - * Rules (binaries-static): Add xtests-static. - * Makeconfig (run-program-prefix): Filter also xtests-static. - -2004-11-09 Paul Eggert since it is marked as an obsolescent - interface. Include , , and instead. - (TYPE_BITS, TYPE_FLOATING, TYPE_SIGNED): New macros. - (subtract): New static function, that works correctly without - double-rounding, even on hosts with 64-bit time_t. Also cater - to hosts with padding bits. - (__difftime): Use it. Use DBL_MANT_DIG and LDBL_MANT_DIG to - determine whether floating types are wide enough: the old - test (which used sizeof) could in theory report the wrong results - on hosts with padding bits in floating-point values. - -2004-11-11 Simon Josefsson - - [BZ #542] - * sysdeps/generic/strtok_r.c [HAVE_CONFIG_H]: Include config.h. - [!_LIBC]: Include strtok_r.h (in gnulib), map __strtok_r to - strtok_r and __rawmemchr to strch. - (__strtok_r): Use C89 prototype. - [weak_alias]: Move calls to libc_hidden_def and weak_alias into - this #ifdef. - -2004-11-10 Paul Eggert - - [BZ #541] - * time/mktime.c (SHR): New macro, which is a portable - substitute for >> that should work even on Crays. - (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it. - Problem reported by Mark D. Baushke in - . - -2004-11-09 Paolo Bonzini - - * posix/regexec.c (match_ctx_free_subtops): Remove, merge into... - (match_ctx_clean): ... this function. - (match_ctx_free): Call match_ctx_clean. - - * posix/regexec.c (transit_state): Remove the check for - out-of-bounds buffers. - (check_matching): Check here for out-of-bounds buffers. - (re_search_internal): Store into match_kind a set of bits - indicating which incantation of fastmap scanning must be - used. Use a switch statement instead of multiple ifs. - Exit the final "for (;;)" with goto free_return unless - the match succeeded, thus simplifying some conditionals. - - * posix/regex_internal.c (re_string_reconstruct, - re_string_context_at): Add several branch predictions for - case-sensitive matching and no transition table being used. - -2004-11-10 Ulrich Drepper - - * posix/tst-waitid.c: Don't use error to print error message, they - won't end up in the .out file. - -2004-11-09 Ulrich Drepper - - * nscd/nscd-client.h (libc_locked_map_ptr): Add new first - parameter, used as class for definition. - * nscd/nscd_getpw_r.c: Adjust for libc_locked_map_ptr change. - (pw_map_free): Ensure no crash after memory is freed. - * nscd/nscd_getgr_r.c: Likewise. Make map externally visible. - * nscd/nscd_gethst_r.c: Likewise. - * nscd/nscd_getai.c: Use map from nscd_gethost.c. - * nscd/nscd_initgroups.c: Use map from nscd_getgr.c. - - * nscd/nscd_getai.c: Add some checks to detect corrupt databases. - * nscd/nscd_getgr_r.c: Likewise - * nscd/nscd_gethst_r.c: Likewise. - * nscd/nscd_getpw_r.c: Likewise - -2004-11-09 Jakub Jelinek - - * posix/regcomp.c (calc_eclosure_iter): Don't access - dfa->edests[node].elems[0] if dfa->edests[node].nelem == 0. - * posix/rxspencer/tests: Add 5 new tests. - -2004-11-09 Ulrich Drepper - - * sysdeps/unix/sysv/linux/ifaddrs.c: Determine sin6_scope_id field - value correctly. Patch by Mitsuru Kanda . - -2004-11-04 Jakub Jelinek - - * libio/fileops.c (_IO_new_file_seekoff): If mode is 0 and - fp->_offset == _IO_pos_BAD, just call _IO_SYSSEEK (fp, 0, dir) - and if successful set fp->_offset. - * libio/Makefile (tests): Add bug-ungetc3. - * libio/bug-ungetc3.c: New test. - -2004-11-03 Marcus Brinkmann - - * sysdeps/gnu/_G_config.h (_G_HAVE_MREMAP): Define symbol. - * sysdeps/mach/hurd/_G_config.h: New file. - * libio/fileops.c (mmap_remap_check) [__linux__]: Replaced with - [_G_HAVE_MREMAP]. - -2004-11-08 Ulrich Drepper - - * posix/regcomp.c (utf8_sb_map): Define. - (free_dfa_content): Don't free dfa->sb_char if it's a pointer to - utf8_sb_map. - (init_dfa): Use utf8_sb_map instead of initializing memory when the - encoding is UTF-8. - -2004-11-03 Paolo Bonzini - - * posix/regcomp.c (init_dfa): Get the codeset name outside glibc as - well. Check if it is spelled UTF8 as well as UTF-8, and check - case-insensitively. Set dfa->map_notascii manually when outside - glibc. - * posix/regex_internal.c (build_wcs_upper_buffer) [!_LIBC]: Enable - optimizations based on map_notascii. - * posix/regex_internal.h [HAVE_LANGINFO_H || HAVE_LANGINFO_CODESET - || _LIBC]: Include langinfo.h. - - * posix/regex_internal.h (struct re_backref_cache_entry): Add "more" - field. - * posix/regexec.c (check_dst_limits): Hoist computation of the source - and destination bkref_idx out of the loop. Pass it to - check_dst_limits_calc_pos. - (check_dst_limits_calc_pos_1): New function, containing the recursive - loop of check_dst_limits_calc_pos; uses the "more" field of - struct re_backref_cache to control the loop. - (check_dst_limits_calc_pos): Store into "boundaries" the position - relative to lim's start and end positions. Do not accept eclosures, - accept bkref_idx instead. Call check_dst_limits_calc_pos_1 to do the - work. - (sift_states_bkref): Use the "more" field of struct re_backref_cache - to control the loop. A big "if" was turned into a continue and the - function was reindented. - (get_subexp): Use the "more" field of struct re_backref_cache - to control the loop. - (match_ctx_add_entry): Initialize the bkref_ents' "more" field. - (search_cur_bkref_entry): Return -1 if out of bounds. - - * posix/regexec.c (empty_set): Remove. - (sift_states_backward): Remove cur_src variable. Move inner loop - to build_sifted_states. - (build_sifted_states): Extract from sift_states_backward. Do not - use empty_set. - (update_cur_sifted_state): Do not use empty_set. Special case - dest_nodes->nelem == 0. - - * posix/regex_internal.h (struct re_backref_cache_entry): Remove flag - field. - (struct re_sift_context_t): Remove cur_bkref, cls_subexp_idx, - check_subexp fields. Move limits last. - * posix/regexec.c (match_ctx_clear_flag): Remove. - (sift_ctx_init): Remove check_subexp parameter. Do not set removed - fields. Callers adjusted. - (expand_bkref_cache): Remove last_str parameter. Callers adjusted. - (re_search_internal): Remove fast_translate variable. - (update_cur_sifted_state): Pass candidates as the final parameter - to sift_states_bkref. - (sift_states_bkref): Change last unused parameter to be "candidates", - do not fetch candidates into a local variable. - Remove dead test for "node == sctx->bkref", and the cur_bkref_idx - variable. - Remove loops that set/reset the flag field of backref cache entries. - (check_arrival_add_next_nodes): Use a signed int to hold the return - value of re_node_set_insert. - (group_nodes_into_DFAstates): Likewise. - (match_ctx_add_entry): Do not set the flag field of the new entry. - -2004-11-05 Roland McGrath - - * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Define - _dl_sysinfo_dso under [NEED_DL_SYSINFO_DSO] as well. - * elf/rtld.c (dl_main): Set up GLRO(dl_sysinfo_dso) under - [NEED_DL_SYSINFO_DSO] as well. - * sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Always include - AT_SYSINFO and AT_SYSINFO_EHDR in name table. - (_dl_sysdep_start) [NEED_DL_SYSINFO_DSO]: Match AT_SYSINFO_EHDR. - * elf/dl-support.c (_dl_sysinfo_dso): Define also under - [NEED_DL_SYSINFO_DSO]. - (_dl_aux_init) [NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO]: - Match AT_SYSINFO_EHDR and set GL(dl_sysinfo_dso). - -2004-11-05 Roland McGrath - - * manual/errno.texi (Error Codes): Revert last change for now. - * sysdeps/gnu/errlist.c: Regenerated. - -2004-11-04 Roland McGrath - - * Makeconfig (link-libc, rpath-dirs): Remove AIX cruft definitions. - (LDFLAGS-rpath-ORIGIN, LDFLAGS-soname-fname): Likewise. - (LDFLAGS-rdynamic, LDFLAGS-Bsymbolic): Likewise. - ($(common-objpfx)gnu/lib-names.stmp): Likewise. - -2004-11-01 Jakub Jelinek - - * sysdeps/unix/sysv/linux/x86_64/sys/procfs.h [__WORDSIZE == 32] - (elf_fpxregset_t): New type. - (struct elf_prpsinfo): If __WORDSIZE == 32, change pr_[ug]id type - to unsigned short int. - * sysdeps/unix/sysv/linux/x86_64/sys/user.h - (struct user_fpregs_struct): Fix comment. - * sysdeps/i386/fpu/bits/mathdef.h (float_t, double_t): If - __FLOAT_EVAL_METHOD__ is defined and 0, typedef to float resp. double. - * sysdeps/x86_64/fpu/bits/mathdef.h: Include bits/wordsize.h. - (float_t, double_t): If -m32 and not -mfpmath=sse, typedef to - long double. - * sysdeps/x86_64/fpu/bits/fenv.h: Include bits/wordsize.h. - (fenv_t): Remove __mxcsr field for -m32. - -2004-11-04 Jakub Jelinek - - * libio/ftello.c (ftello): Don't subtract save_end - save_base - if pos is _IO_pos_BAD. - * libio/ftello64.c (ftello64): Likewise. - * libio/iofgetpos.c (_IO_new_fgetpos): Likewise. - * libio/iofgetpos64.c (_IO_new_fgetpos64): Likewise. - * libio/oldiofgetpos.c (_IO_old_fgetpos): Likewise. - * libio/oldiofgetpos64.c (_IO_old_fgetpos64): Likewise. - * libio/ioftell.c (_IO_ftell): Likewise. - Cast to long int instead of off_t when checking for overflow. - -2004-11-04 Richard Henderson - - * sysdeps/unix/sysv/linux/alpha/register-dump.h (regnames): Align. - (linefeed): Remove. - (register_dump): Rewrite to generate into a flat buffer instead - of into iovecs. - -2004-11-02 Jakub Jelinek - - * debug/tst-chk1.c (ret): New volatile variable. - (CHK_FAIL_END): Remove redundant ret setting. - (do_test): Remote ret variable. - -2004-01-03 Paolo Bonzini - - * posix/regex_internal.h (__regfree) [!_LIBC]: Define to regfree. - -2004-11-03 Marcus Brinkmann - - * sysdeps/generic/utime.c: Include . - - * sysdeps/generic/sysconf.c: Include and . - - * sysdeps/generic/tempname.c (__path_search): Add missing argument - TRY_TMPDIR. - -2004-10-31 Mariusz Mazur - - * sysdeps/unix/sysv/linux/alpha/setregid.c: New file. - * sysdeps/unix/sysv/linux/alpha/setresgid.c: New file. - * sysdeps/unix/sysv/linux/alpha/setresuid.c: New file. - * sysdeps/unix/sysv/linux/alpha/setreuid.c: New file. - -2004-10-27 Derek R. Price - - [BZ #487] This change is imported from gnulib. - * time/mktime.c (not_equal_tm) [DEBUG]: Remove redundant check. - -2004-10-24 Paul Eggert - - [BZ #473] - * time/tst-mktime.c (main): Don't assume that mktime fails - when given time stamps before 1970. It returns negative - time_t values instead, for compatibility with BSD. - - * time/tst-mktime2.c: New file. - * time/Makefile (tests): Add it. - - [BZ #473] Import from gnulib. Revamp to avoid several problems near - time_t extrema, and on hosts with 64-bit time_t and 32-bit int. - This fixes Debian bug 177940. - * time/mktime.c (TIME_T_MIDPOINT): New macro. - (ydhms_diff): Renamed from ydhms_tm_diff, with a new signature, - which avoids overflow problems on hosts with 64-bit time_t and - 32-bit int. All callers changed. Now an inline function. - Verify at compile-time that long int is wide enough to avoid - these overflow problems. - (guess_time_tm): New function. - (__mktime_internal): Use it. Avoid overflow when computing yday on - hosts with 64-bit long and 32-bit int. Remove tests for 69; - no longer needed. Use if rather than #ifdef for LEAP_SECONDS_POSSIBLE - so that the code is checked by more compilers. - Do not rely on floating point to probe: stick to integer arithmetic, - to avoid potential porting problems. - Repair potential overflow correctly in the Southern Hemisphere. - (localtime_offset): Add a FIXME for the case where time_t is unsigned. - -2004-10-30 Andreas Schwab - - * sysdeps/m68k/dl-machine.h (elf_machine_rela) - (elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto - instead of static. - -2004-10-30 Andreas Schwab - - * sysdeps/unix/sysv/linux/waitid.c: Include for NULL. - -2004-10-30 Ulrich Drepper - - * malloc/malloc.c (_int_free): Use unique comments for the error - cases. - -2004-10-28 Roland McGrath - - * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_fork): Use i386_thread_state - instead of machine_thread_state. - -2004-10-28 Roland McGrath - - * sysdeps/unix/sysv/linux/syscalls.list: Remove setaltroot. - -2004-10-28 Ulrich Drepper - - * elf/dl-open.c (dl_open_worker): Remove reference to glibcbug script. - -2004-10-27 Ulrich Drepper - - * elf/dl-load.c (_dl_map_object): Use cache_rpath to check for - existing rpath in main executable, not explicit test. - -2004-10-27 Jakub Jelinek - - * include/resolv.h (_res_opcodes): New extern. - Add libresolv_hidden_proto. - * resolv/res_debug.c (_res_opcodes): Remove. - (__p_class_syms, __p_type_syms): Add libresolv_hidden_proto - and libresolv_hidden_data_def. Remove attribute_hidden. - * resolv/res_mkquery (_res_opcodes): Remove. - * resolv/res_data.c (_res_opcodes): Remove attribute_hidden. - Add libresolv_hidden_data_def. - -2004-10-27 Ulrich Drepper - - * elf/dl-open.c (_dl_open): Don't allow explicitly opening a DSO - into an empty namespace. - - * elf/dl-fini.c (_dl_fini): Fix search for map in maps array. - Reverse order of namespaces. - * elf/Makefile: Add rules to build and run tst-dlmopen3. - * elf/tst-dlmopen3.c: New file. - * elf/tst-dlmopen1mod.c: Add check whether constructor runs. - -2004-10-27 Jakub Jelinek - - * sysdeps/generic/glob.c (globfree): Clear gl_pathv after freeing it. - * posix/Makefile: Add rules to build and run bug-glob2 test. - * posix/bug-glob2.c: New test. - -2004-10-27 Roland McGrath - - * sysdeps/mach/hurd/i386/tls.h (HURD_TLS_DESC_DECL): New macro. - (_hurd_tls_init): Use it. - (_hurd_tls_fork): New function. - * sysdeps/mach/hurd/fork.c (__fork) [USE_TLS]: Call it. - -2004-10-26 Roland McGrath - - * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Initialize TCB->tcb. - -2004-10-26 Jakub Jelinek - - * sysdeps/gnu/netinet/udp.h (struct udphdr): Use u_int16_t - type instead of uint16_t. Formatting. - -2004-10-25 Roland McGrath - - * login/openpty.c (openpty): Add libutil_hidden_def. - - * nss/nss_files/files-parse.c (nss_files_parse_hidden_def): Define to - either libc_hidden_def or libnss_files_hidden_def, not hidden_def. - This file is also compiled into libnss_hesiod by #include. - -2004-10-25 Roland McGrath - - * sysdeps/unix/bsd/hp: Directory and all files removed. - These are now in the ports repository. - * sysdeps/unix/bsd/osf: Likewise. - * sysdeps/unix/bsd/sequent: Likewise. - * sysdeps/unix/bsd/sony: Likewise. - * sysdeps/unix/bsd/ultrix4: Likewise. - * sysdeps/unix/sysv/aix: Likewise. - * sysdeps/unix/sysv/hpux: Likewise. - * sysdeps/unix/sysv/irix4: Likewise. - * sysdeps/unix/sysv/isc2.2: Likewise. - * sysdeps/unix/sysv/minix: Likewise. - * sysdeps/unix/sysv/sco3.2.4: Likewise. - * sysdeps/unix/sysv/sco3.2: Likewise. - * sysdeps/unix/sysv/sysv4: Likewise. - - * configure.in (ASM_LINE_SEP): Move this setting to ... - * sysdeps/hppa/configure.in: ... here, new file. - * sysdeps/hppa/configure: New generated file. - * configure: Regenerated. - -2004-10-25 Kaz Kojima - - * sysdeps/sh/dl-machine.h: Include sysdep.h. - (ELF_MACHINE_RUNTIME_TRAMPOLINE): Add CFI directives. - (elf_machine_runtime_setup): Add always_inline attribute. - (_dl_start_user): Pass the correct environ. - (elf_machine_rela): Replace static inline by auto inline, add - always_inline attribute. - (elf_machine_rela_relative): Likewise. - (elf_machine_lazy_rel): Likewise. - -2004-10-24 Ulrich Drepper - - * nis/nis_call.c: Pretty printing. Minor cleanups. - * nis/nis_addmember.c (nis_addmember): Add assert to check buffer - bounds. - - * resolv/nss_dns/dns-host.c: Avoid using PLTs. - * include/libc-symbols.h: Define hidden attribute macros for - libnss_nisplus and libutil. - * include/utmp.h: Add libutil_hidden_proto for login_tty. - * login/login_tty.c: Add libutil_hidden_def. - * nis/nisplus-parser.h: Add libnss_nisplus_hidden_proto for parsers. - * nis/nss_nisplus/nisplus-parser.c: Add libnss_nisplus_hidden_def. - * include/pty.h: New file. - * include/rpcsvc/yp.h: New file. - * include/rpcsvc/ypclnt.h: New file. - * include/rpcsvc/ypupd.h: New file. - * include/libc-symbols.h: Define hidden attribute macros for libnsl. - * include/rpcsvc/nislib.h: Use libnsl_hidden_proto for various - functions. - * nis/nis_add.c: Add libnsl_hidden_def. Minor optimizations. - * nis/nis_call.c: Likewise. - * nis/nis_clone_obj.c: Likewise. - * nis/nis_defaults.c: Likewise. - * nis/nis_domain_of_r.c: Likewise. - * nis/nis_error.c: Likewise. - * nis/nis_file.c: Likewise. - * nis/nis_free.c: Likewise. - * nis/nis_local_names.c: Likewise. - * nis/nis_lookup.c: Likewise. - * nis/nis_modify.c: Likewise. - * nis/nis_print.c: Likewise. - * nis/nis_remove.c: Likewise. - * nis/nis_subr.c: Likewise. - * nis/nis_table.c: Likewise. - * nis/nis_util.c: Likewise. - * nis/yp_xdr.c: Likewise. - * nis/ypclnt.c: Likewise. - * nis/ypupdate_xdr.c: Likewise. - - * resolv/res_send.c (send_dg): Cope with failures. - - * include/libc-symbols.h: Define hidden attribute macros for - libnss_files. - * include/netdb.h: Use libnss_files_hidden_proto for the parsers - defined in libnss_files, not libc_hidden_proto. - * include/netinet/ether.h: Likewise. - * include/rpc/netdb.h: Likewise. - * nss/nss_files/files-parse.c: Use hidden_def in parser definitions - instead of libc_hidden_def. - * nss/nss_files/files-netgrp.c: Add libnss_files_hidden_def to - _nss_netgroup_parseline definition. - -2004-10-23 Roland McGrath - - * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Don't return early - after an RPC succeeds. - - * sysdeps/vax, sysdeps/unix/bsd/vax: Directories and all files removed. - These are now in the ports repository. - * sysdeps/tahoe, sysdeps/unix/bsd/tahoe: Likewise. - * sysdeps/cris, sysdeps/unix/sysv/linux/cris: Likewise. - * sysdeps/am29k, sysdeps/i860, sysdeps/i960, sysdeps/m88k: Likewise. - * sysdeps/standalone, sysdeps/z8000: Likewise. - -2004-10-23 Ulrich Drepper - - * resolv/res_send.c (send_dg): Combine write and read to socket - into one loop. - -2004-10-22 Roland McGrath - - * Makefile (%.bz2, %.gz): Move these pattern rules ... - * Makerules: ... to here. - -2001-10-31 Alexandre Oliva - - * elf/elf.h: Add R_MN10300_* relocation numbers. - -2004-10-22 Paul Eggert - - [BZ #471] Fix imported from gnulib. - * time/mktime.c (leapyear, ydms_tm_diff): Year is of type - long int, not int, to avoid problems when tm_year == INT_MAX - and tm_mon > 12. - (__mktime_intenral): Compute year using long int arithmetic, - not int arithmetic, to avoid problems on hosts where time_t - and long are 64 bits but int is 32. - - [BZ #468] Import a fix from gnulib. - * time/mktime.c [! DEBUG]: Do not include . - It's needed only if DEBUG is nonzero. - - [BZ #470] Import fix from gnulib. - * time/mktime.c [!_LIBC] (__mktime_internal): Define to - mktime_internal, to avoid clashes with any __mktime_internal - function defined in the standard library. - - [BZ #469] Imported from gnulib. - * time/mktime.c (__isleap): Remove; all uses replaced by: - (leapyear): New function, which avoids overflow by not adding - 1900 to year before testing whether it is a leap year. - - [BZ #472] Imported from gnulib. - * time/mktime.c (Local Variables): Remove -DHAVE_TIME_R_POSIX; - no longer used. - -2004-10-22 Ulrich Drepper - - * resolv/res_send.c: Remove compatibility code which is unused in - glibc and probably bitrotten. - - * debug/execinfo.h: Remove __THROW from backtrace prototype. - -2004-10-22 Jakub Jelinek - - * sysdeps/i386/Makefile (CFLAGS-backtrace.c): Add -fexceptions. - * sysdeps/i386/backtrace.c: Include , , - and . Remove include. - (struct trace_arg): New type. - (unwind_backtrace, unwind_getip, unwind_getcfa, unwind_getgr): New - fn pointers resp. macros. - (init, backtrace_helper): New functions. - (__backtrace): Rewritten to use _Unwind_Backtrace first and fall - back to frame pointer walking. - -2004-10-22 Ulrich Drepper - - * sysdeps/unix/sysv/linux/Versions: Things are still in flux, it - seems. Undo last additions. - -2004-10-21 Ulrich Drepper - - * posix/execvp.c (execvp): Also ignore ENODEV and ETIMEDOUT errno - values. - -2004-10-20 Roland McGrath - - * Makeconfig ($(common-objpfx)shlib-versions.v.i): Check also - $(config-sysdirs) for shlib-versions files. - - * Makeconfig ($(common-objpfx)soversions.i): Replace shell loop with - use of ... - * scripts/soversions.awk: ... this new file. Collect lib info and - match any DEFAULT line before emitting anything, so DEFAULT can come - later in the concatenation of shlib-versions files. - - * manual/errno.texi (Error Codes): Add ENOKEY, EKEYEXPIRED, - EKEYREVOKED, EKEYREJECTED. - * sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.3.4): New errlist. - * sysdeps/gnu/errlist.c: Regenerated - - * sysdeps/gnu/errlist-compat.awk: Don't bail if Versions gives a count - higher than ERR_MAX reports. Instead, emit a #define ERR_MAX. - * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.h): New target. - (generated): Add errlist-compat.h. - * sysdeps/gnu/errlist.awk: Make output #include to - define ERR_MAX and use that for table size. - -2004-10-20 Ulrich Drepper - - * sysdeps/unix/sysv/linux/syscalls.list: Add entries for setaltroot, - key_add, key_request, and keyctl syscalls. - * sysdeps/unix/sysv/linux/Versions: Export them. - -2004-10-19 Roland McGrath - - * sysdeps/mach/readonly-area.c: New file. - -2004-10-19 Ulrich Drepper - - * elf/Versions [ld, GLIBC_PRIVATE]: Add _dl_debug_state. - * elf/dl-debug.c (_dl_debug_state): Add rtld_hidden_def. - * sysdeps/generic/ldsodefs.h (_dl_debug_state): Don't mark as - hidden but use rtld_hidden_proto. - -2004-10-19 Alfred M. Szmidt - - * sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ... - (__readonly_area): ... this. - -2004-10-18 Jakub Jelinek - - * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking - destlen only every 4 bytes. - -2004-10-19 Ulrich Drepper - - * nss/getent.c (hosts_keys): Let inet_pton decide whether the - string is an address or not. - -2004-10-19 Jakub Jelinek - - * elf/dl-addr.c (_dl_addr): Don't look at STT_TLS symbols. - Use DL_SYMBOL_ADDRESS to set dli_saddr. - - * debug/Makefile (catchsegv): Prefix $LIB with a backslash. - -2004-10-19 Ulrich Drepper - - * debug/Makefile ($(objpfx)catchsegv): To support multilib - platforms, use $LIB in path to slibdir. - -2004-10-19 Jakub Jelinek - - * debug/catchsegv.sh: Update copyright year. - Use mktemp to create segv_output file. - -2004-10-18 Jakub Jelinek - - * elf/dl-libc.c (__libc_dlsym_private, __libc_register_dl_open_hook): - New functions. - (__libc_dlopen_mode): Call __libc_register_dl_open_hook and - __libc_register_dlfcn_hook. - * dlfcn/Makefile (routines, elide-routines.os): Set. - Add rules to build and test tststatic2. - * dlfcn/tststatic2.c: New test. - * dlfcn/modstatic2.c: New test module. - * dlfcn/dladdr.c: Call _dlfcn_hook from libdl.so if not NULL. - Define __ prefixed routine in libc.a and in libdl.a just call it. - * dlfcn/dladdr1.c: Likewise. - * dlfcn/dlclose.c: Likewise. - * dlfcn/dlerror.c: Likewise. - * dlfcn/dlinfo.c: Likewise. - * dlfcn/dlmopen.c: Likewise. - * dlfcn/dlopen.c: Likewise. - * dlfcn/dlopenold.c: Likewise. - * dlfcn/dlsym.c: Likewise. - * dlfcn/dlvsym.c: Likewise. - * dlfcn/sdladdr.c: New file. - * dlfcn/sdladdr1.c: New file. - * dlfcn/sdlclose.c: New file. - * dlfcn/sdlerror.c: New file. - * dlfcn/sdlinfo.c: New file. - * dlfcn/sdlopen.c: New file. - * dlfcn/sdlsym.c: New file. - * dlfcn/sdlvsym.c: New file. - * dlfcn/Versions (libdl): Export _dlfcn_hook@GLIBC_PRIVATE. - * include/dlfcn.h (DL_CALLER_DECL, DL_CALLER RETURN_ADDRESS): Define. - (struct dlfcn_hook): New type. - (_dlfcn_hook): New extern decl. - (__dlopen, __dlclose, __dlsym, __dlerror, __dladdr, __dladdr1, - __dlinfo, __dlmopen, __libc_dlsym_private, - __libc_register_dl_open_hook, __libc_register_dlfcn_hook): New - prototypes. - (__dlvsym): Use DL_CALLER_DECL. - * include/libc-symbols.h: Define libdl_hidden_proto and friends. - - * malloc/arena.c (_dl_open_hook): Extern decl. - (ptmalloc_init): Don't call _dl_addr when dlopened from statically - linked programs but don't use brk for them either. - -2004-10-18 Roland McGrath - - * dlfcn/bug-dlsym1.c (main): Remove bogus setenv call. - -2004-10-18 Ulrich Drepper - - * elf/dl-open.c (dl_open_worker): Avoid dereferencing map in - statically linked code if there might none be found. - -2004-10-06 Maciej W. Rozycki - - * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h - (__SYSCALL_CLOBBERS): Add "memory". - * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h - (__SYSCALL_CLOBBERS): Likewise. - * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h - (__SYSCALL_CLOBBERS): Likewise. - -2004-10-17 Ulrich Drepper - - * include/libc-symbols.h: Define libresolv_hidden_proto and friends. - * include/resolv.h: Add libresolv_hidden_proto for symbols defined, - used, and exported in libresolv. - * resolv/base64.c: Add libresolv_hidden_def. - * resolv/gethnamaddr.c: Likewise. - * resolv/ns_name.c: Likewise. - * resolv/ns_netint.c: Likewise. - * resolv/res_comp.c: Likewise. - * resolv/res_data.c: Likewise. - * resolv/res_debug.c: Likewise. - * resolv/res_mkquery.c: Likewise. - * resolv/res_query.c: Likewise. - * resolv/res_send.c: Likewise. - -2004-10-15 Jakub Jelinek - - * elf/dl-minimal.c (__chk_fail): New. Add rtld_hidden_def. - * sysdeps/unix/sysv/linux/readonly-area.c: New file. - * sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking - routine. - * sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise. - * sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise. - * sysdeps/i386/i686/memset.S (__memset_chk): Likewise. - * sysdeps/i386/i686/memmove-chk.S: New file. - * sysdeps/i386/i686/memcpy-chk.S: Likewise. - * sysdeps/i386/i686/mempcpy-chk.S: Likewise. - * sysdeps/i386/i686/memset-chk.S: Likewise. - * sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail - if exactly fitting into buffer. - * sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise. - * sysdeps/generic/readonly-area.c: New file. - * sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test - destlen once. - * sysdeps/x86_64/memset.S (__memset_chk): Add checking routine. - * sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise. - * sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk. - * sysdeps/x86_64/memcpy-chk.S: New file. - * sysdeps/x86_64/mempcpy-chk.S: Likewise. - * sysdeps/x86_64/memset-chk.S: Likewise. - * sysdeps/x86_64/strcpy-chk.S: Likewise. - * sysdeps/x86_64/stpcpy-chk.S: Likewise. - * argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing. - * argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise. - * debug/tst-chk1.c: New test. - * debug/tst-chk2.c: Likewise. - * debug/tst-chk3.c: Likewise. - * debug/test-strcpy_chk.c: Likewise. - * debug/test-stpcpy_chk.c: Likewise. - * debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request - _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. - * debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk, - vfprintf_chk, gets_chk and readonly-area. - (CFLAGS-*_chk.c): Set. - (tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and - test-stpcpy_chk. - * debug/vprintf_chk.c: New file. - * debug/printf_chk.c: Likewise. - * debug/vfprintf_chk.c: Likewise. - * debug/fprintf_chk.c: Likewise. - * debug/gets_chk.c: Likewise. - * debug/chk_fail.c (__chk_fail): Add libc_hidden_def. - * debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments - passed to __vsnprintf_chk. - * debug/Versions (libc): Export __printf_chk, __fprintf_chk, - __vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4. - * debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call - __vsnprintf, instead create a temporary file with - _IO_strn_jumps jumptable. If flags > 0, request - _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. - * libio/Makefile (headers): Add bits/stdio2.h. - * libio/stdio.h: Include if __USE_FORTIFY_LEVEL. - (sprintf, snprintf, vsprintf, vsnprintf): Remove defines. - * libio/strfile.h (_IO_strnfile): New type. - (_IO_strn_jumps): New extern. - * libio/vsnprintf.c (_IO_strnfile): Remove. - (_IO_strn_jumps): Remove static. - * libio/bits/stdio2.h: New file. - * libio/vswprintf.c (_IO_strnfile): Rename type to... - (_IO_wstrnfile): ...this. Adjust all uses. - * libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define. - * stdio-common/vfprintf.c (STR_LEN): Define. - (vfprintf): Add readonly_format variable. - Handle _IO_FLAGS2_CHECK_PERCENT_N. - (buffered_vfprintf): Copy _flags2. - * include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk, - __vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk, - __vfprintf_chk): New prototypes. - (__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto. - * include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk, - __memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk, - __strncat_chk): New prototypes. - * include/bits/string3.h: New file. - * include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto - and rtld_hidden_proto. - * string/Makefile (headers): Add bits/string3.h. - * string/bits/string3.h (bcopy, bzero): New defines. - (memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change - macros so that inlines are used only if unknown destination size - or side-effects in destination argument. - (mempcpy, stpcpy): Likewise. Protect with #ifdef __USE_GNU. - -2004-09-16 Ulrich Drepper - - * debug/Makefile (routines): Add *_chk. - * debug/Versions (libc): Export __chk_fail, __memcpy_chk, - __memmove_chk, __mempcpy_chk, __memset_chk, __stpcpy_chk, - __strcat_chk, __strcpy_chk, __strncat_chk, __strncpy_chk, - __sprintf_chk, __vsprintf_chk, __snprintf_chk, __vsnprintf_chk - @GLIBC_2.3.4. - * debug/chk_fail.c: New file. - * debug/snprintf_chk.c: Likewise. - * debug/sprintf_chk.c: Likewise. - * debug/vsnprintf_chk.c: Likewise. - * debug/vsprintf_chk.c: Likewise. - * include/features.h (_FORTIFY_SOURCE): Document, handle. - (__USE_FORTIFY_LEVEL): Define. - (__GNUC_PREREQ): Move to earlier location. - * include/sys/cdefs.h (__chk_fail): New prototype. - * libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf): - Define if __USE_FORTIFY_LEVEL. - * misc/sys/cdefs.h (__bos, __bos0): Define. - * string/string.h: Include if __USE_FORTIFY_LEVEL. - * bits/string/string3.h: New header. - * sysdeps/generic/memcpy_chk.c: New file. - * sysdeps/generic/memmove_chk.c: Likewise. - * sysdeps/generic/mempcpy_chk.c: Likewise. - * sysdeps/generic/memset_chk.c: Likewise. - * sysdeps/generic/stpcpy_chk.c: Likewise. - * sysdeps/generic/strcat_chk.c: Likewise. - * sysdeps/generic/strcpy_chk.c: Likewise. - * sysdeps/generic/strncat_chk.c: Likewise. - * sysdeps/generic/strncpy_chk.c: Likewise. - -2004-10-17 Roland McGrath - - * manual/memory.texi (Page Lock Functions): Typo fix. - Reported by Carlos Maziero - -2004-10-16 Alfred M. Szmidt - - * sysdeps/mach/hurd/Makefile (link-libc-static): Use - `$(static-gnulib') instead of `$(gnulib)'. - -2004-10-17 Ulrich Drepper - - * sunrpc/rpc_clntout.c: Avoid including rcsid into binary. - * sunrpc/rpc_cout.c: Likewise. - * sunrpc/rpc_hout.c: Likewise. - * sunrpc/rpc_main.c: Likewise. - * sunrpc/rpc_parse.c: Likewise. - * sunrpc/rpc_sample.c: Likewise. - * sunrpc/rpc_scan.c: Likewise. - * sunrpc/rpc_svcout.c: Likewise. - * sunrpc/rpc_tblout.c: Likewise. - * sunrpc/rpc_util.c: Likewise. - -2004-10-15 Jakub Jelinek - - * sysdeps/unix/sysv/linux/i386/sysdep.h (PUSHARGS_6, DOARGS_6, - POPARGS_6, _PUSHARGS_6, _DOARGS_6, _POPARGS_6): Define. - * sysdeps/unix/sysv/linux/i386/syscall.S (syscall): Handle 6 argument - syscalls. - -2004-10-15 Ulrich Drepper - - * nscd/nscd.h (_PATH_NSCD_PASSWD_DB): Move to /var/db. - (_PATH_NSCD_GROUP_DB): Likewise. - (_PATH_NSCD_HOSTS_DB): Likewise. - (_PATH_NSCD_XYZ_DB_TMP): New #define, point to /var/run. - * nscd/connections.c (nscd_init): Non-persistent database files - are created with the _PATH_NSCD_XYZ_DB_TMP path. - * nscd/nscd.init: Create /var/db/nscd if necessary. - -2004-10-15 Richard Henderson - - * sysdeps/unix/sysv/linux/alpha/register-dump.h: New file. - * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h (SIGCONTEXT): Add - _code argument, pass sigcontext by pointer. - (SIGCONTEXT_EXTRA_ARGS): Likewise. - (GET_PC, GET_FRAME, GET_STACK): Expect ctx as pointer. - -2004-10-14 Richard Henderson - - * sysdeps/alpha/dl-machine.h (elf_machine_rela, - elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto - instead of static. - - * sysdeps/unix/sysv/linux/adjtime.c (ADJTIME): Use prototype - style definition. - * sysdeps/unix/sysv/linux/alpha/adjtime.c (ADJTIME): If - __ASSUME_TIMEVAL64, define __adjtime directly rather than - via strong_alias. - -2004-10-14 Ulrich Drepper - - * nscd/Makefile: When using compilers without -fpie support, also - link with -lselinux if necessary. - Patch by Arkadiusz Miskiewicz . - - * nscd/connections.c (nscd_init): Remove file if not persistent - and not shared. Patch by Jerome Borsboom . - -2004-10-14 Jakub Jelinek - - * sysdeps/unix/sysv/linux/i386/setresuid.c: Handle - defined __NR_setresuid32 && !defined __NR_setresuid. - * sysdeps/unix/sysv/linux/i386/setresgid.c: Handle - defined __NR_setresgid32 && !defined __NR_setresgid. - - * sysdeps/sparc/fpu/bits/mathinline.h (__signbitf, __signbit, - __signbitl, sqrtf, sqrt, sqrtl, fdim, fdimf): Use __NTH macro. - - * sysdeps/generic/errno-loc.c: Don't undef #errno - if RTLD_PRIVATE_ERRNO. - * include/errno.h (__errno_location): If RTLD_PRIVATE_ERRNO, - add attribute_hidden. - - * dlfcn/dlinfo.c (dlinfo_doit): Replace iteration over GL(dl_loaded) - chain with iteration over all namespaces' _ns_loaded chains. - * sysdeps/powerpc/powerpc32/dl-machine.c (__elf_preferred_address): - Likewise. - * sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Likewise. - - * elf/rtld.c (_dl_start): Fix one last dl_loaded. - * elf/dl-load.c (_dl_map_object_from_fd): Avoid definition of - label when it is not needed. - * elf/dl-close.c (_dl_close): Typo: & -> &&. - -2004-10-12 Jakub Jelinek - - * sysdeps/generic/segfault.c: Include alloca.h and stdint.h. - Don't include frame.h. - (CURRENT_STACK_FRAME, INNER_THAN, ADVANCE_STACK_FRAME): Remove. - (catch_segfault): Use backtrace function. - - * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Fix comment. - * sysdeps/unix/sysv/linux/ia64/register-dump.h: New file. - * sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h (GET_PC): Return sc_ip - field. - -2004-10-13 Ulrich Drepper - - Add support for namespaces in the dynamic linker. - * dlfcn/Makefile (libdl-routines): Add dlmopen. - * dlfcn/Versions [libdl, GLIBC_2.3.4]: Add dlmopen. - * dlfcn/dlfcn.h: Define Lmid_t, LM_ID_BASE, and LM_ID_NEWLM. - Declare dlmopen. Document RTLD_DI_LMID. - * dlfcn/dlinfo.c: Handle RTLD_DI_LMID. - * dlfcn/dlmopen.c: New file. - * dlfcn/dlopen.c: Pass new parameter to _dl_open. - * dlfcn/dlopenold.c: Likewise. - * elf/dl-addr.c: Adjust for removal of GL(dl_loaded). - * elf/dl-caller.c: Likewise. - * elf/dl-close.c: Likewise. - * elf/dl-conflict.c: Likewise. - * elf/dl-debug.c: Likewise. - * elf/dl-lookup.c: Likewise. - * elf/dl-sym.c: Likewise. - * elf/dl-version.c: Likewise. - * elf/do-lookup.h: Likewise. - * elf/rtld.c: Likewise. - * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. - * elf/dl-depsc: Likewise. Add new parameter to _dl_map_object. - * elf/dl-fini.c: Call destructors in all namespaces. - * elf/dl-iteratephdr.c: Compute total nloaded. Adjust for removal of - GL(dl_loaded). - * elf/dl-libc.c: Pass new parameter to _dl_open. Adjust for removal - of GL(dl_loaded). - * elf/dl-load.c (_dl_map_object_from_fd): Don't load ld.so a second - time. Reuse the one from the main namespace in all others. - Pass new parameter to _dl_new_object. - Adjust for removal of GL(dl_loaded). - * elf/dl-object.c: Take new parameter. Use it to initialize l_ns. - Adjust for removal of GL(dl_loaded). - * elf/dl-open.c (_dl_open): Take new parameter. - Adjust for removal of GL(dl_loaded). - * elf/dl-support.c: Replace global _dl_loaded etc variables with - _dl_ns variable. - * include/dlfcn.h: Adjust prototype of _dl_open. - Define __LM_ID_CALLER. - * include/link.h: Add l_real, l_ns, and l_direct_opencount elements. - * sysdeps/generic/dl-tls.c: Bump TLS_STATIC_SURPLUS. Since libc is - using TLS we need memory appropriate to the number of namespaces. - * sysdeps/generic/ldsodefs.h (struct rtld_global): Replace _dl_loaded, - _dl_nloaded, _dl_global_scope, _dl_main_searchlist, and - _dl_global_scope_alloc with _dl_ns element. Define DL_NNS. - Adjust prototypes of _dl_map_object and member in rtld_global_ro. - * malloc/malloc.c: Include . - * malloc/arena.c (ptmalloc_init): If libc is not in primary namespace, - never use brk. - * elf/Makefile: Add rules to build and run tst-dlmopen1 and - tst-dlmopen2. - * elf/tst-dlmopen1.c: New file. - * elf/tst-dlmopen1mod.c: New file. - * elf/tst-dlmopen2.c: New file. - - * elf/dl-close.c: Improve reference counting by tracking direct loads. - * elf/dl-lookup.c (add_dependency): Likewise. - * elf/dl-open.c (dl_open_worker): Likewise. - * elf/rtld.c (dl_main): Likewise. - -2004-09-09 GOTO Masanori - - [BZ #77] - * elf/dl-close.c: Count down l_opencount to check not only for - l_reldeps, but also l_initfini. - -2004-10-13 Ulrich Drepper - - * elf/dl-close.c (_dl_close): Update bug reporting instructions. + * Makefile (glibc-%.tar rule): Use make -q to ensure configure scripts + are up to date in srcdir. Touch all configure scripts after export. -2004-10-11 Ulrich Drepper +2005-04-05 H.J. Lu - * timezone/asia: Update from tzdata2004e. - * timezone/southamerica: Likewise. - * timezone/private.h: Update from tzcode2004e. + [BZ #592] + * sysdeps/ia64/fpu/e_acosh.S: Update from Intel libm 2005-04-05 + (comment changes only). + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_atanh.S: Likewise. + * sysdeps/ia64/fpu/e_cosh.S: Likewise. + * sysdeps/ia64/fpu/e_coshf.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_exp10.S: Likewise. + * sysdeps/ia64/fpu/e_exp10f.S: Likewise. + * sysdeps/ia64/fpu/e_exp2.S: Likewise. + * sysdeps/ia64/fpu/e_exp2f.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_logf.S: Likewise. + * sysdeps/ia64/fpu/e_pow.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_sinh.S: Likewise. + * sysdeps/ia64/fpu/e_sinhf.S: Likewise. + * sysdeps/ia64/fpu/libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. + * sysdeps/ia64/fpu/s_asinh.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erff.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_log1p.S: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanhf.S: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + +2005-04-04 Ulrich Drepper + + [BZ #825] + * timezone/scheck.c: Update from tzcode2005h. + * timezone/tzfile.h: Likewise. * timezone/zdump.c: Likewise. + * timezone/zic.c: Likewise. - * stdio-common/vfscanf.c: Add support for reading localized - digits. Patch mainly by Hamed Malek . - - * resolv/res_init.c (res_thread_freeres): Reset _res.options. - [BZ #434] - - * resolv/res_send.c (send_dg): Use nonblocking sockets. Add - appropriate poll/select calls and restart operation if necessary. - Also handle EINTR. - - * elf/tst-dlopenrpath.c (do_test): Enable code which was disabled - for debugging. - - * elf/dl-sym.c (do_sym): Avoid using global variable. - - * elf/dl-addr.c (_dl_addr): Really use match everywhere. - -2004-10-09 Andreas Schwab - - * sysdeps/m68k/memcopy.h (WORD_COPY_BWD): Remove use of cast as - lvalue. - - * sysdeps/m68k/fpu/bits/mathinline.h: Remove __THROW from inline - definitions. - -2004-10-07 Andreas Schwab - - * misc/sys/uio.h: Change __vector to __iovec to avoid clash with - altivec. - -2004-10-06 Alan Modra - - * gmon/Makefile (CFLAGS-mcount.c): Move before inclusion of "Rules". - * sysdeps/powerpc/powerpc64/Makefile (CFLAGS-mcount.c): Add - -msoft-float. - * sysdeps/powerpc/powerpc64/sysdep.h (SAVE_ARG, REST_ARG): New macros. - (CALL_MCOUNT): Replace with a gas macro implementation. - (EALIGN): Delete PROF version. - * sysdeps/powerpc/powerpc64/__longjmp-common.S: Invoke CALL_MCOUNT. - * sysdeps/powerpc/powerpc64/bsd-_setjmp.S: Likewise. - * sysdeps/powerpc/powerpc64/bsd-setjmp.S: Likewise. - * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc64/memcpy.S: Likewise. - * sysdeps/powerpc/powerpc64/memset.S: Likewise. - * sysdeps/powerpc/powerpc64/stpcpy.S: Likewise. - * sysdeps/powerpc/powerpc64/strchr.S: Likewise. - * sysdeps/powerpc/powerpc64/strcmp.S: Likewise. - * sysdeps/powerpc/powerpc64/strcpy.S: Likewise. - * sysdeps/powerpc/powerpc64/strlen.S: Likewise. - * sysdeps/powerpc/powerpc64/strncmp.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise. - * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise. - - * sysdeps/powerpc/powerpc64/setjmp-common.S: Add extra entry point - past _mcount call. - * sysdeps/powerpc/powerpc64/bsd-_setjmp.S: Use it. - * sysdeps/powerpc/powerpc64/bsd-setjmp.S: Likewise. - -2004-10-06 Ulrich Drepper - - * resolv/res_mkquery.c (res_nmkquery): Reject randombits value if - low 16 bits are zero. - -2004-10-06 Jakub Jelinek - - * posix/tst-getaddrinfo2.c: Include stdlib.h and string.h. - (do_test): Use %p instead of 0x%08X to print a pointer. - - * malloc/malloc.c: Include stdio-common/_itoa.h. - -2004-10-05 Ulrich Drepper - - * elf/rtld.c (dl_main): Use _dl_debug_printf instead of _dl_printf - for prelink message. - -2004-10-05 Jakub Jelinek - - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Include dl-sysdep.h. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. - -2004-10-05 Ulrich Drepper - - * grp/initgroups.c: Remove duplicate group IDs. - * grp/compat-initgroups.c: Likewise. - * nscd/initgrcache.c: Likewise. - -2004-10-05 Jakub Jelinek - - * sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Return 200112L - for _SC_CPUTIME or _SC_THREAD_CPUTIME. - - * nscd/Makefile (nscd-cflags): Set to -DIS_IN_nscd=1, plus - -fpie if building PIE. - (CFLAGS-*.c): Use it. - - * nscd/Makefile (relro-LDFLAGS): Add -Wl,-z,now if have-z-relro. - ($(objpfx)nscd): Add $(relro-LDFLAGS). - - * sysdeps/unix/sysv/linux/i386/sysconf.c: Include hp-timing.h. - (__sysconf): Return -1 for _SC_CPUTIME or _SC_THREAD_CPUTIME if - !HP_TIMING_AVAIL. - -2004-10-05 Ulrich Drepper - - * nscd/Makefile (distribute): Remove TODO. - * nscd/TODO: Removed. - -2004-10-04 Ulrich Drepper - - * nscd/gai.c: Define __no_netlink_support if NEED_NETLINK is - defined and __ASSUME_NETLINK_SUPPORT is zero. - * sysdeps/unix/sysv/linux/Makefile (CFLAGS-gai.c): Add - -DNEED_NETLINK. - - * malloc/mtrace.pl: Avoid calling location unless it is needed for - output. Patch by Edward Bishop . - - * nscd/Makefile (CFLAGS-gai.c): Add -fpie. - -2004-10-04 H.J. Lu - - * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c - (clock_getcpuclockid): Add missing retval. - - * sysdeps/unix/sysv/linux/ia64/sysconf.c (linux_sysconf): Fix a typo. - -2004-10-04 Roland McGrath - - * include/errno.h [RTLD_PRIVATE_ERRNO] (errno): Rename the real symbol - to rtld_errno. - * sysdeps/generic/errno.c [RTLD_PRIVATE_ERRNO] (rtld_errno): Define it, - and don't define any other errno names. - * sysdeps/unix/alpha/sysdep.h [RTLD_PRIVATE_ERRNO]: Use rtld_errno in - place of errno. - * sysdeps/unix/i386/sysdep.S: Likewise. - * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. - * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. - * sysdeps/unix/x86_64/sysdep.S: Likewise. - - * sysdeps/generic/errno.c [! USE___THREAD] (errno): Use `nocommon' - attribute instead of `section'. - -2004-10-04 Ulrich Drepper - - * sysdeps/unix/sysv/linux/ia64/sysconf.c: New file. - * sysdeps/unix/sysv/linux/ia64/Dist: Add has_cpuclock.c. - * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c: Move actual - testing code to... - * sysdeps/unix/sysv/linux/ia64/has_cpuclock.c: ...here. New file. - * sysdeps/unix/sysv/linux/i386/sysconf.c: Add dynamic check for - _SC_CPUTIME and _SC_THREAD_CPUTIME. - - * nscd/connections.c (start_threads): Use sysconf in case - _POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not greater zero. - - * nscd/Makefile (nscd-modules): Add gai. - * nscd/gai.c: New file. - * nscd/nscd.c: Remove getaddrinfo stub definition. - - * assert/assert.h: Give up on using __builtin_expect. - - * elf/rtld.c (dl_main): Only skip => output in ldd mode if both - strings are identical. - -2004-03-18 Jakub Jelinek - - * malloc/arena.c (aligned_heap_area): New variable. - (new_heap): If aligned_heap_area != NULL, attempt to use that - first. If HEAP_MAX_SIZE << 1 area is already HEAP_MAX_SIZE bytes - aligned, remember the second half in aligned_heap_area. - (delete_heap): Clear aligned_heap_area if deleting the area right - before aligned_heap_area. - -2004-10-03 Juerg Billeter - - * nscd/nscd_initgroups.c (__nscd_getgrouplist): Return -1 if nscd - can't be used. [BZ #424] - -2004-10-03 Ulrich Drepper - - Dynamically create new threads if necessary. - * nscd/connections.c (fd_ready): If no thread available for processing - the request, create a new one unless the limit is reached. - (start_threads): Check errors from pthread_create. - * nscd/nscd.h: Declare max_nthreads. - * nscd/nscd_conf.c: Parse max-nthreads entry. - * nscd/nscd.conf: Add max-threads entry. - * nscd/nscd_stat.c: Print current and maximum number of threads. - - Implement paranoia mode. - * nscd/connections.c (nscd_init): Mark database and socket descriptors - as close on exec. - (restart): New function. - (restart_p): New function. - (nscd_run): Add missing descrement of nready in case readylist is - empty. - (main_loop_poll): Call restart_p and restart. - (main_loop_epoll): Likewise. - (begin_drop_privileges): Save original UID and GID. - * nscd/nscd.c: Define new variables paranoia, restart_time, - restart_interval, oldcwd, old_gid, old_uid. - (main): Disable paranoia mode if we are not forking. - (check_pid): When re-execing, the PID file contains the same PID as - the current process. Do not fail in this case. - * nscd/nscd.conf: Add paranoia and restart-interval entries. - * nscd/nscd.h: Define RESTART_INTERVAL. Declare new variables. - * nscd/nscd_conf.c: Parse paranoia and restart-internal configurations. - * nscd/nscd_stat.c: Print paranoia and restart-internal values. - - * nscd/connections.c: Implement alternative loop for main thread - which uses epoll. - * sysdeps/unix/sysv/linux/Makefile [subdir=nscd] - (CFLAGS-connections.c): Add -DHAVE_EPOLL. - -2004-10-02 Ulrich Drepper - - * nscd/Makefile (CFLAGS-initgrcache.c): Add to CFLAGS-* variables, - don't replace old content. - - * nscd/connections.c: Rewrite handling of incoming connections. All - are handled by one thread which then hands off the descriptors for the - real work to the worker threads. - * nscd/Makefile: Link nscd with librt. - - * nscd/selinux.c: Pretty printing. - - * nscd/dbg_log.c (dbg_log): Don't add unnecessary newline to - output. Let syslog do the formatting if debug_level == 0. - - * nscd/nscd_helper.c (get_mapping): No need to check timestamp if - nscd_certainly_running is nonzero. - -2004-10-02 Simon Josefsson - - [BZ #420] - * sysdeps/generic/memmem.c [!_LIBC]: Define __builtin_expect, to - make the file usable inside gnulib. - -2004-10-01 Ulrich Drepper - - * malloc/malloc.c (public_vALLOc): Add missing use of hooks. - (public_pVALLOc): Likewise. - - * nscd/nscd_initgroups.c (__nscd_getgrouplist): Always add the - group the caller provided unless there is a real problem. - - * posix/bug-glob1.c (prepare): Fix creation of symlink. - -2004-09-30 Ulrich Drepper - - * posix/Makefile: Add rules to build and run bug-glob1. - * posix/bug-glob1.c: New file. - - * iconv/iconv_prog.c (main): Print progress information to stderr. - - * nscd/nscd.c (termination_handler): Reset timestamp so that - clients immediately stop using the database. - - * nscd/nscd-client.h (__nscd_get_map_ref): Drop volatile from last - parameter. - (__nscd_drop_map_ref): Change second parameter to be a reference to - a variable. Update variable when cycle count changed. - * nscd/nscd_helper.c (__nscd_get_map_ref): Remove volatile here, too. - * nscd/nscd_getai.c: Correctly use __nscd_drop_map_ref. Reinitialize - all variables and avoid memory leak in case of retries. - * nscd/nscd_getgr_r.c: Likewise. - * nscd/nscd_gethst_r.c: Likewise. - * nscd/nscd_getpw_r.c: Likewise. - * nscd/nscd_initgroups.c: Likewise. - - * nscd/nscd.h: Add declaration of addinitgroups and - readdinitgroups. - -2004-09-30 Andreas Jaeger - - * nscd/Makefile (CFLAGS-nscd_initgroups.c): Set to -fpie. - (CFLAGS-initgrcache.c): Set to -fexceptions. - -2004-09-29 Ulrich Drepper - - * sysdeps/generic/glob.c (glob_in_dir): Don't blindly trust - readdir results; for symlinks or files of unknown type check using - stat whether the file exists. - - * posix/tst-gnuglob.c (find_file): Handle leading "./". Fix - recognition of files. - -2004-09-29 Jakub Jelinek - - * time/tzfile.c (tzfile_mtime): New variable. - (__tzfile_read): Reread the file if mtime is different. - -2004-09-28 Jakub Jelinek - - * sysdeps/alpha/fpu/bits/mathinline.h (__fdimf, __fdim, fdimf, fdim): - Handle +inf/+inf. - * sysdeps/powerpc/fpu/bits/mathinline.h (fdim, fdimf): Likewise. - * sysdeps/sparc/fpu/bits/mathinline.h (fdim, fdimf): Likewise. - -2004-09-29 Ulrich Drepper - - * nscd/nscd_gethst_r.c (nscd_gethst_r): Use correct constant for - testing result of __nscd_get_map_ref. - -2004-09-29 Jakub Jelinek - - * sysdeps/i386/fpu/s_fdim.S (__fdim): Handle +inf/+inf. - * sysdeps/i386/fpu/s_fdimf.S (__fdimf): Likewise. - * sysdeps/i386/fpu/s_fdiml.S (__fdiml): Likewise. - -004-09-29 Ulrich Drepper - - * grp/initgroups.c: Move compat_call implementation... - * grp/compat-initgroups.c: ...to here. New file. - * grp/Makefile (distribute): Add compat-initgroups.c. - (CFLAGS-initgroups.c): Add -DUSE_NSCD=1. - * mscd/initgrcache.c: New file. - * nscd/nscd_initgroups.c: New file. - * nscd/Makefile (routines): Add nscd_initgroups. - (nscd-modules): Add initgrcache. - * nscd/cache.c (prune_cache): Add support for INITGROUPS entries. - * nscd/connections.c: Handle INITGROUPS requests. - * nscd/nscd-client.h: Define INITGROUPS, initgr_response_header. - Add initgrdata element to struct datahead. Fix typo in comment. - * nscd/nscd_proto.h: Declare __nscd_getgrouplist. Fix parameter - type in __nscd_getgrgrid_r. - * nscd/selinux.c (perms): Add INITGROUPS entry. - - * nscd/nscd_getai.c: No need to include . - - * sunrpc/get_myaddr.c (get_myaddress): Account for interfaces without - assigned addresses. - * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. - * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. - * sunrpc/clnt_udp.c (is_network_up): Likewise. - - * nscd/nscd.c: Define getaddrinfo hidden so that it is never found - outside. - - * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (si_segvflags): - Renamed from si_flags due to conflict with si_flags from . - -2004-09-28 Ulrich Drepper - - * nscd/nscd_getai.c: Use NO_MAPPING instead of MAP_FAILED for test - of failing __nscd_get_map_ref. Fix a few typos. - - * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Make sure - SIGSETXID is not blocked. - * sysdeps/unix/sysv/linux/sigwaitinfo.c (do_sigwaitinfo): Likewise. - * sysdeps/unix/sysv/linux/sigtimedwait.c (do_sigtimedwait): Likewise. - * sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Likewise. - * sysdeps/generic/sigfillset.c (sigfillset): Don't set SIGSETXID. - - * sunrpc/get_myaddr.c (get_myaddress): Fix test for failing - getifaddrs call. - * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. - * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. - * sunrpc/Makefile (xtests): Add tst-getmyaddr. - * sunrpc/tst-getmyaddr.c: New file. - - * malloc/arena.c (ptmalloc_init): Allow MALLOC_CHECK_==0 to - disable all checking. - - * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (si_flags): Add - support to get this value. - -2004-09-28 Jakub Jelinek - - * io/utime.h (utime): Allow second argument to be NULL. - -2004-09-28 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): If NAME is a numerical IP - address and AI_CANONNAME is set, return copy of NAME as ai_canonname. - -2004-09-27 Andreas Jaeger - - * sysdeps/i386/dl-machine.h (elf_machine_rela_relative): Replace - static inline by auto inline, add always_inline attribute. - (elf_machine_rel): Likewise. - (elf_machine_rela): Likewise. - (elf_machine_lazy_rel): Likewise. - (elf_machine_lazy_rela): Likewise. - (elf_machine_rel_relative): Likewise. - -2004-09-27 Ulrich Drepper - - * sunrpc/xdr_intXX_t.c: Add xdr_quad_t and xdr_u_quad_t aliases. - * sunrpc/rpc/xdr.h: Declare xdr_quad_t and xdr_u_quad_t. - * sunrpc/rpc_parse.c (get_type): Use "quad_t" for TOK_HYPER. - Otherwise isvectordef will loop infinitely if typedef hyper int64_t - is seen. - (unsigned_dec): Use "u_quad_t" for similar reasons. - * sunrpc/Versions: Export xdr_quad_t and xdr_u_quad_t. - -2004-09-27 Roland McGrath - - * sysdeps/generic/bits/waitstatus.h (__WIFSIGNALED): Simplify bit - twiddling in last change. - - * posix/tst-waitid.c (do_test): Add tests for waitpid with WCONTINUED. - - [BZ #409] - * posix/sys/wait.h [__WIFCONTINUED] (WIFCONTINUED): New macro. - * stdlib/stdlib.h [__WIFCONTINUED] (WIFCONTINUED): New macro. - * sysdeps/generic/bits/waitstatus.h (__W_CONTINUED): New macro. - [WCONTINUED] (__WIFCONTINUED): New macro. - (__WIFSIGNALED): Rewritten to exclude __W_CONTINUED value, and have no - branches. - - * sysdeps/unix/sysv/linux/waitid.c (do_waitid): Add fifth argument to - all three syscall uses, not just one! - -2004-09-26 Richard Henderson - - * sysdeps/alpha/alphaev6/memcpy.S: Mark .prologue. - * sysdeps/unix/alpha/sysdep.h (LEAF, ENTRY): Align entry points - to 16 byte boundaries. - -2004-09-26 Ulrich Drepper - - * elf/readlib.c (process_file): Before complaining about too-short - file, check that it potentially be an ELF file. Also complain about - empty files. [BZ #151]. - - * scripts/test-installation.pl: Fix ld.so recognition for new - LD_TRACE_LOADED_OBJECTS output format. - Patch by [BZ #407]. - - * elf/dl-support.c (_dl_non_dynamic_init): Fix cleaning of - environment. [BZ #384] - - * sunrpc/clnt_udp.c (is_network_up): Use getifaddrs instead of ioctl. - * sunrpc/get_myaddr.c (get_myaddress): Likewise. - * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. - * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. Change interface - to avoid buffer overrun and remove now useless parameters. - (clnt_broadcast): Adjust caller. [BZ #381]. - - * sysdeps/generic/s_fdim.c: Handle +inf/+inf - * sysdeps/generic/s_fdimf.c: Likewise. - * sysdeps/generic/s_fdiml.c: Likewise. - * sysdeps/i386/i686/fpu/s_fdim.S: Likewise. - * sysdeps/i386/i686/fpu/s_fdimf.S: Likewise. - * sysdeps/i386/i686/fpu/s_fdiml.S: Likewise. - * sysdeps/powerpc/fpu/s_fdim.c: Likewise. - * sysdeps/powerpc/fpu/s_fdimf.c: Likewise. - * sysdeps/x86_64/fpu/s_fdiml.S: Likewise. - * math/libm-test.inc (fdim_test): Add test case. [BZ #376]. - - * sysdeps/generic/bits/types.h: Fix __SQUAD_TYPE and __UQUAD_TYPE - for compilers without __GLIBC_HAVE_LONG_LONG. [BZ #362] - - * sysdeps/posix/getaddrinfo.c (getaddrinfo): Remove incorrect - requirement on socktype and protocol. - (gaih_inet): If numeric port number is given, return records for all - possible socket types. - * posix/tst-getaddrinfo2.c: New file. - * posix/Makefile (tests): Add tst-getaddrinfo2. [BZ #358] - -2004-09-25 Ulrich Drepper - - * locale/loadlocale.c (_nl_intern_locale_data): Recognize LC_CTYPE - data where _nl_value_type_LC_CTYPE does not contain the type - information. Add range checks. - Reported by John Lumby [BZ #356]. - - * libio/vasprintf.c (_IO_vasprintf): Fix condition to decide - whether to realloc or not. - Reported by Pavel Kankovsky [BZ #346]. - - * intl/dcigettext.c (DCIGETTEXT): Protect tfind/tsearch calls. - * intl/dcigettext.c (_nl_find_msg): Call _nl_load_domain also if - decided < 0. - * intl/finddomain.c (_nl_find_domain): Likewise. - * intl/loadmsgcat.c (_nl_load_domain): Set decided to 1 only once we - are done. First set to -1 to signal initialization is ongoing. - Protect against concurrent callers with recursive lock. - * intl/finddomain.c (_nl_find_domain): Protect calls to - _nl_make_l10nflist. [BZ #322] - - * sysdeps/posix/getaddrinfo.c (getaddrinfo): If determinination of - source address fails, initialized source_addr_len field so that - duplicate address recognition does not copy junk. - -2004-09-25 Jakub Jelinek - - * sysdeps/unix/sysv/linux/i386/setuid.c (__setuid): Remove second - result declaration. - -2004-09-22 Andreas Schwab - - * sysdeps/unix/sysv/linux/ia64/sysdep.h: Adjust whitespace. - -2004-09-24 Ulrich Drepper - - * misc/daemon.c (daemon): Don't succeed if /dev/null cannot be - opened. - - * nis/ypclnt.c (do_ypcall): Add one missing unlock. Simplify the - code a bit. - - * misc/daemon.c (daemon): Define errno in case /dev/null is not - the correct device. - - * nis/ypclnt.c (yp_bind_file): Optimize a bit. Minimal cleanups. - -2004-09-23 Andreas Jaeger - - * locale/weight.h (findidx): Remove static, it's not supported - anymore with GCC 4.0 in a block scope. - * locale/weightwc.h (findidx): Likewise. - * posix/regcomp.c (seek_collating_symbol_entry): Likewise. - (lookup_collation_sequence_value): Likewise. - (build_range_exp): Likewise. - (build_collating_symbol): Likewise. - * iconv/iconvconfig.c (write_output): Likewise. - * elf/do-rel.h (elf_dynamic_do_rel): Likewise. - - * sysdeps/x86_64/dl-machine.h (elf_machine_rela_relative): Remove - static, add always_inline attribute. - (elf_machine_rela): Likewise. - (elf_machine_lazy_rel): Likewise. - - * elf/dynamic-link.h (elf_get_dynamic_info): Make static dependend - on !RESOLVE so that it's not defined in local scope. - -2004-09-23 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/sysdep.h (INTERNAL_SYSCALL_NCS): Define. - -2004-09-23 Thorsten Kukuk - - * sysdeps/unix/sysv/linux/sys/mount.h: Sync MS_RMT_MASK flag - and BLK* ioctls with linux kernel headers. - -2004-09-23 Ulrich Drepper - - * sysdeps/generic/bits/dlfcn.h: Add RTLD_DEEPBIND. - * elf/dl-object.c (_dl_new_object): Add new parameter mode. If mode - has RTLD_DEEPBIND set add local searchlist before global scope. - * sysdeps/generic/ldsodefs.h (_dl_new_object): Adjust prototype. - * elf/rtld.c: Adjust callers of _dl_new_object. - * elf/dl-load.c: Likewise. - (_dl_map_object_from_fd): If RTLD_DEEPBIND is used, don't do anything - for DF_SYMBOLIC. - * elf/dl-open.c (dl_open_writer): Pass RTLD_DEEPBIND flag on to - _dl_map_object_deps. - * elf/tst-deep1.c: New file. - * elf/tst-deep1mod1.c: New file. - * elf/tst-deep1mod2.c: New file. - * elf/tst-deep1mod3.c: New file. - * elf/Makefile: Add rules to build and run new tests. - - * elf/dl-deps.c: Pretty printing. - -2004-09-23 Jakub Jelinek - - * sysdeps/unix/alpha/sysdep.h (inline_syscall[0-6]): Change name - argument to numbers from syscall names. - (INLINE_SYSCALL1): Pass __NR_##name to inline_syscall##nr. - (INTERNAL_SYSCALL_NCS): Renamed from... - (INTERNAL_SYSCALL_1): ... this. Use INTERNAL_SYSCALL_NCS. - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h - (INTERNAL_SYSCALL_NCS): Define. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h - (INTERNAL_SYSCALL_NCS): Likewise. - * sysdeps/unix/sysv/linux/sparc/sysdep.h (inline_syscall[0-6]): - Change name argument to numbers from syscall names. - (INLINE_SYSCALL, INTERNAL_SYSCALL): Adjust. - (INTERNAL_SYSCALL_NCS): Define. - -2004-09-22 Ulrich Drepper - - * malloc/malloc.c (malloc_printerr): Use syslog if writev failed. - - * string/string.h: Add __nonnull annotations. - * stdlib/stdlib.h: Likewise. - -2004-09-20 H.J. Lu - - * sysdeps/unix/sysv/linux/ia64/sysdep.h (DO_INLINE_SYSCALL): - Renamed to ... - (DO_INLINE_SYSCALL_NCS): This. - (DO_INLINE_SYSCALL): New. - (INLINE_SYSCALL): Updated. - (INTERNAL_SYSCALL_NCS): Updated. - -2004-09-21 Ulrich Drepper - - * elf/sprof.c (load_shobj): Add support for reading symbol table - from debuginfo file. - - * elf/ldd.bash.in: Fix syntax errors. - -2004-09-20 Ulrich Drepper - - * sysdeps/unix/sysv/linux/dl-execstack.c - (_dl_make_stack_executable): Remove some duplication. - - * nscd/nscd.c (options): Mark S option as hidden. - (parse_opt): When S option is used, print warning message. - * nscd/grpcache.c (adgrptbyX): Don't handle secure mode. - * nscd/hstcache.c (addhstbyX): Don't handle secure mode. - * nscd/aicache.c (addhstaiX): Don't handle secure mode. - * nscd/pwdcache.c (addpwbyX): Don't handle secure mode. - -2004-09-20 Roland McGrath - - * elf/dl-load.c (__stack_prot): Only use PROT_GROWSUP/PROT_GROWSDOWN - in initializer #if defined. - -2004-09-18 Paul Eggert - - [BZ #391] - * stdlib/getsubopt.c: Merge fixes from gnulib. - (__strchrnul) [!_LIBC]: Define and include "strchrnul.c". - (getsubopt): Use prototypes, not K&R style. - Fix bug: memcmp(A,B,N) was being invoked on a memory block B - whose size might be smaller than N. Use strncmp to avoid the bug. - -2004-09-20 Ulrich Drepper - - * configure.in: If selinux has not explictly been requested, don't - comment on it missing. - - * elf/dl-load.c: Define __stack_prot. - * sysdeps/unix/sysv/linux/dl-execstack.c: Don't define - __stack_prot here, just declare it. - -2004-09-20 Jakub Jelinek - - * configure.in (libc_cv_z_relro): Only set to yes if linker script - contains DATA_SEGMENT_RELRO_END. - -2004-09-20 Ulrich Drepper - - * elf/dl-load.c (_dl_map_object_from_fd): Add some error checking. - Reorder code slightly. - * elf/rtld.c (dl_main): No need to check whether l_info[DT_HASH] - is non-null, _dl_setup_hash will do that. - -2004-09-19 Ulrich Drepper - - * sysdeps/unix/sysv/linux/setegid.c [HAVE_PTR__NPTL_SETXID]: Call - callback to set IDs in all other threads as well. - * sysdeps/unix/sysv/linux/seteuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/setuid.c: New file. - * sysdeps/unix/sysv/linux/setgid.c: New file. - * sysdeps/unix/sysv/linux/setreuid.c: New file. - * sysdeps/unix/sysv/linux/setregid.c: New file. - * sysdeps/unix/sysv/linux/setresuid.c: New file. - * sysdeps/unix/sysv/linux/setresgid.c: New file. - * sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NCS. - * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Use x86 version. - * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. - * sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: New file. - * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Remove setresgid - and setresuid. - * nscd/aicache.c: Use pthread_seteuid_np instead of seteuid. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c: Likewise. - * nscd/pwdcache.c: Likewise. + [BZ #825] + * timezone/antarctica: Update from tzdata2005h. + * timezone/asia: Likewise. + * timezone/australasia: Likewise. + * timezone/etcetera: Likewise. + * timezone/europe: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/leapseconds: Likewise. + * timezone/iso3166.tab: Likewise. - * resolv/res_mkquery.c (res_nmkquery): Fix typo. +2005-03-31 H.J. Lu -2004-09-18 Ulrich Drepper + [BZ #592] + * sysdeps/ia64/fpu/libm_cpu_defs.h: Update copyright. - * sysdeps/unisx/sysv/linux/dl-execstack.c: Get protection flag - from memory. - * elf/dl-load.c (_dl_map_object_from_fd): Add PROT_EXEC flag to - __stack_flags. - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Do not use - gethostbyname3_r if we are not looking for the canonical name. - - * resolv/res_mkquery.c (res_nmkquery): Randomize request ID every - time. - -2004-09-18 Roland McGrath - - * sysdeps/unix/sysv/linux/waitid.c (do_waitid): Pass fifth argument to - system call. - -2004-09-17 Ulrich Drepper - - * include/link.h (struct link_map): Add l_used element. - * sysdeps/generic/ldsodefs.h: Define DL_DEBUG_UNUSED. - * elf/rtld.c (process_dl_debug): Recognize unused. - (dl_main): When unused debug flag is set check for unused direct - dependencies. - When printing dependencies and SONAME starts with /, omit the SONAME => - part. - * elf/dl-lookup.c (_dl_lookup_symbol_x): Mark object in which the - symbol has been found as used. - * elf/ldd.bash.in: Add -u option. - -2004-09-18 Jakub Jelinek - - * sysdeps/unix/sysv/linux/nscd_setup_thread.c (setup_thread): - Do nothing if __NR_set_tid_address is not defined. [BZ #390] - -2004-09-17 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c: Use gethostbyname3_r NSS function - in case it is available. - -2004-09-17 Jakub Jelinek - - * nscd/nscd.c (parse_opt): Write arg string instead of (void *) - key to the socket. - -2004-09-17 Ulrich Drepper - - * misc/sys/cdefs.h: Define __nonnull using nonnull function attribute - for gcc 3.3 and higher. - * io/fcntl.h: Add __nonnull where appropriate. - * io/ftw.h: Likewise. - * io/utime.h: Likewise. - * io/sys/poll.h: Likewise. - * io/sys/sendfile.h: Likewise. - * io/sys/stat.h: Likewise. - * io/sys/statfs.h: Likewise. - * io/sys/statvfs.h: Likewise. - * posix/unistd.h: Likewise. - * catgets/nl_types.h: Likewise. - * crypt/crypt.h: Likewise. - * debug/execinfo.h: Likewise. - -2004-09-16 Ulrich Drepper - - * posix/glob.h: Remove cruft to make header usable outside glibc. - The maintenance headache is too big. - - * configure.in: Add test for required SELinux features. - * config.make.in: Add have-selinux entry. - * config.h.in: Add HAVE_SELINUX entry. - * nscd/Makefile (nscd-modules): Add selinux. - (CFLAGS-selinux.c): Add -fpie. - Define selinux-LIBS and use in link line. - * nscd/connections.c (handle_request): Check access SELinux permissions - before processing request. - * nscd/nscd.c (main): Initialize selinux_enabled and stop avc thread. - * nscd/nscd_stat.c: Transmit and print AVC statistics. - * nscd/selinux.c: New file. - * nscd/selinux.h: New file. - Patch mostly by Matthew Rickard . - -2004-09-16 Jakub Jelinek - - * nscd/nscd_helper.c (__nscd_unmap, get_mapping): Use __munmap - instead of munmap. - - * nscd/Makefile (CFLAGS-aicache.c): Set to -fpie. - -2004-09-16 Thorsten Kukuk - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Check - __nss_not_use_nscd_hosts variable if nscd should be used or not. - -2004-09-16 Ulrich Drepper - - * nscd/nscd_proto.h: Define NSS_NSCD_RETRY. - Add __nscd_getai prototype. - * nss/getXXbyYY_r.c: Remode definition of NSS_NSCD_RETRY. - * nscd/nscd-client.h: Remove __nscd_getai prototype. - * nscd/nscd_getai.c: Include nscd_proto.h. - - * elf/ldd.bash.in: Add support for SELinux environments. - Patch by Stephen Smalley . - -2004-09-16 Roland McGrath - - * configure.in (--with-headers): Let argument contain a : separated - list of directories to use, not just one. - * configure: Regenerated. - -2004-09-15 Richard Henderson - - * sysdeps/alpha/fpu/libm-test-ulps: Update. - * scripts/data/c++-types-alpha-linux-gnu.data: New file. - -2004-09-15 Ulrich Drepper - - * nscd/aicache.c: Prefer using gethostbyname3_r NSS callback to also - get ttl and canonical name. Use these two values. - * resolv/Versions: Export _nss_dns_gethostbyname3_r from libnss_dns. - * resolv/nss_dns/dns-host.c (getanswer_r): Take two new parameters. - If nonnull fill with TTL and pointer to canonical name respectively. - (_nss_dns_gethostbyaddr_r): Pass NULL in new parameters of getanswer_r. - (_nss_dns_gethostbyname2_r): Just wrapper around - _nss_dns_gethostbyname3_r. - (_nss_dns_gethostbyname3_r): Renamed from _nss_dns_gethostbyname2_r. - Take two new parameters which as passed to getanswer_r. - - * nscd/Makefile (rountines): Add nscd_getai. - (nscd-modules): Add aicache. - * nscd/aicache.c: New file. - * nscd/nscd_getai.c: New file. - * nscd/cache.c (prune_cache): Handle GETAI request type. - * nscd/connections.c: Add GETAI support in request handling. - * nscd/nscd-client.h (request_type): Add GETAI. - Define ai_response_header and struct nscd_ai_result types. - (struct datahead): Add aidata field. - Declare __nscd_getai. - * nscd/nscd.c: Add getaddrinfo definition to catch problems. - * nscd/nscd.h: Declare addhstai and readdhstai. - - * sysdeps/posix/getaddrinfo.c: Add support for using cached results. - * posix/Makefile (CFLAGS-getaddrinfo.c): Add -DUSE_NSCD. - - * nscd/nscd-client.h (struct datahead): Use uint8_t instead of bool. - -2004-09-14 Ulrich Drepper - - * misc/sys/cdefs.h: Remove debugging text from __P and __PMT. - -2004-09-13 Ulrich Drepper - - * misc/sys/cdefs.h: Restore old definition of __P. - * csu/munch.awk: Remove uses of __P and __PMT. - * gmon/gmon.c: Likewise. - * hesiod/hesiod.h: Likewise. - * include/stdio.h: Likewise. - * io/fts.c: Likewise. - * libio/genops.c: Likewise. - * libio/libioP.h: Likewise. - * libio/fileops.c: Likewise. - * libio/iolibio.h: Likewise. - * libio/libio.h: Likewise. - * libio/memstream.c: Likewise. - * libio/oldfileops.c: Likewise. - * libio/oldstdfiles.c: Likewise. - * libio/iopopen.c: Likewise. - * libio/vsnprintf.c: Likewise. - * libio/vswprintf.c: Likewise. - * libio/wgenops.c: Likewise. - * libio/oldiopopen.c: Likewise. - * locale/programs/xmalloc.c: Likewise. - * locale/programs/xstrdup.c: Likewise. - * malloc/mtrace.c: Likewise. - * misc/getttyent.c: Likewise. - * misc/getusershell.c: Likewise. - * nis/rpcsvc/ypupd.h: Likewise. - * posix/fnmatch.h: Likewise. - * posix/glob.h: Likewise. - * resolv/arpa/nameser.h: Likewise. - * resolv/gethnamaddr.c: Likewise. - * resolv/resolv.h: Likewise. - * resolv/inet_net_ntop.c: Likewise. - * resolv/inet_net_pton.c: Likewise. - * resolv/res_init.c: Likewise. - * resolv/nss_dns/dns-network.c: Likewise. - * stdio-common/vfprintf.c: Likewise. - * stdio-common/reg-printf.c: Likewise. - * sysdeps/generic/chflags.c: Likewise. - * sysdeps/generic/fchflags.c: Likewise. - * sysdeps/generic/glob.c: Likewise. - * sysdeps/generic/printf_fphex.c: Likewise. - * sysdeps/generic/memcmp.c: Likewise. - * sysdeps/generic/memcopy.h: Likewise. - * sysdeps/generic/morecore.c: Likewise. - * sysdeps/generic/sstk.c: Likewise. - * sysdeps/posix/sigvec.c: Likewise. - * sysdeps/posix/ttyname_r.c: Likewise. - * sysdeps/standalone/arm/bits/errno.h: Likewise. - * sysdeps/standalone/standalone.h: Likewise. - * sysdeps/standalone/i386/force_cpu386/brdinit.c: Likewise. - * sysdeps/standalone/i386/force_cpu386/_exit.c: Likewise. - * sysdeps/unix/arm/start.c: Likewise. - * sysdeps/unix/bsd/sigaction.c: Likewise. - * sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise. - * sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise. - * sysdeps/unix/bsd/sun/sunos4/wait4.c: Likewise. - * sysdeps/unix/bsd/ultrix4/mips/sigvec.c: Likewise. - * sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise. - * sysdeps/unix/sparc/start.c: Likewise. - * sysdeps/unix/sysv/getdents.c: Likewise. - * sysdeps/unix/sysv/irix4/fpathconf.c: Likewise. - * sysdeps/unix/sysv/irix4/getgroups.c: Likewise. - * sysdeps/unix/sysv/irix4/getpriority.c: Likewise. - * sysdeps/unix/sysv/irix4/getrusage.c: Likewise. - * sysdeps/unix/sysv/irix4/pathconf.c: Likewise. - * sysdeps/unix/sysv/irix4/setgroups.c: Likewise. - * sysdeps/unix/sysv/irix4/sigtramp.c: Likewise. - * sysdeps/unix/sysv/irix4/start.c: Likewise. - * sysdeps/unix/sysv/irix4/sysconf.c: Likewise. - * sysdeps/unix/sysv/sco3.2.4/__setpgid.c: Likewise. - * sysdeps/unix/sysv/sco3.2.4/getgroups.c: Likewise. - * sysdeps/unix/sysv/sysv4/__getpgid.c: Likewise. - * sysdeps/unix/sysv/sysv4/__setpgid.c: Likewise. - * sysdeps/unix/sysv/sysv4/getpgid.c: Likewise. - * sysdeps/unix/sysv/sysv4/setpgid.c: Likewise. - * sysdeps/unix/sysv/sysv4/sethostname.c: Likewise. - * sysdeps/unix/sysv/sysv4/setsid.c: Likewise. - * sysdeps/unix/sysv/sysv4/sysconf.c: Likewise. - * sysdeps/unix/sysv/sysv4/waitpid.c: Likewise. - * sysdeps/unix/sysv/sysv4/solaris2/getdents.c: Likewise. - * time/tzset.c: Likewise. - * time/strftime_l.c: Likewise. - * time/strptime_l.c: Likewise. - * crypt/md5.h: Likewise. - -2004-09-13 Andreas Jaeger - - * configure.in: Support GCC 4.x. - * configure: Regenerated. - -2004-09-13 Thorsten Kukuk - - * nscd/nscd_stat.c: Don't access dbs[cnt].head for disabled services. - - * nscd/nscd.init: Fix path to socket. - -2004-09-12 Ulrich Drepper - - * nscd/nscd_helper.c (get_mapping): Correctly check cmsg length. - Avoid file descriptor leak in case of size mismatch. - - * nscd/nscd-client.h: Fix database structure layout for biarch. - * nscd/mem.c (gc): Add casts to avoid warnings. - - * nss/getent.c: Don't preconstruct help message. Do it only when - needed. - - * locale/programs/locale.c: Simplify help message printing. - -2004-09-12 Roland McGrath - - * sysdeps/mach/hurd/i386/init-first.c (init1) [! SHARED]: Add decls - missing in last change. - -2004-09-11 Thorsten Kukuk - - * nis/nss_compat/compat-grp.c: Check that buflen is greater zero - before writing data into the buffer with negative offset. - * nis/nss_compat/compat-initgroups.c: Likewise. - * nis/nss_compat/compat-pwd.c: Likewise. - * nis/nss_compat/compat-spwd.c Likewise. - -2004-09-12 Ulrich Drepper - - * misc/syslog.c (vsyslog): Fix copying of PID in case of - out-of-memory situation. [BZ #365]. - - * sysdeps/alpha/fpu/bits/mathinline.h: Use __NTH instead of - __THROW in inline function definitions. - - * posix/spawn.h [__USE_GNU]: Define POSIX_SPAWN_USEVFORK. - * posix/spawnattr_setflags.c: Check whether any unknown bit is set - in FLAGS parameter and fail if this is the case. - * sysdeps/posix/spawni.c: Use vfork if POSIX_SPAWN_USEVFORK flag is - set. +2005-03-30 H.J. Lu - * nscd/pwdcache.c (cache_addpw): Sync also negative results to disk. - * nscd/grpcache.c (cache_addgr): Likewise. + [BZ #592] + * sysdeps/ia64/fpu/e_acosf.S: Update from Intel libm 2005-03-21. + * sysdeps/ia64/fpu/e_acoshf.S: Likewise. + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_acosh.S: Likewise. + * sysdeps/ia64/fpu/e_acosl.S: Likewise. + * sysdeps/ia64/fpu/e_acos.S: Likewise. + * sysdeps/ia64/fpu/e_asinf.S: Likewise. + * sysdeps/ia64/fpu/e_asinl.S: Likewise. + * sysdeps/ia64/fpu/e_asin.S: Likewise. + * sysdeps/ia64/fpu/e_atan2f.S: Likewise. + * sysdeps/ia64/fpu/e_atan2.S: Likewise. + * sysdeps/ia64/fpu/e_atanhf.S: Likewise. + * sysdeps/ia64/fpu/e_atanhl.S: Likewise. + * sysdeps/ia64/fpu/e_atanh.S: Likewise. + * sysdeps/ia64/fpu/e_coshf.S: Likewise. + * sysdeps/ia64/fpu/e_coshl.S: Likewise. + * sysdeps/ia64/fpu/e_cosh.S: Likewise. + * sysdeps/ia64/fpu/e_exp10f.S: Likewise. + * sysdeps/ia64/fpu/e_exp10l.S: Likewise. + * sysdeps/ia64/fpu/e_exp10.S: Likewise. + * sysdeps/ia64/fpu/e_exp2f.S: Likewise. + * sysdeps/ia64/fpu/e_exp2l.S: Likewise. + * sysdeps/ia64/fpu/e_exp2.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_fmodf.S: Likewise. + * sysdeps/ia64/fpu/e_fmodl.S: Likewise. + * sysdeps/ia64/fpu/e_fmod.S: Likewise. + * sysdeps/ia64/fpu/e_hypotf.S: Likewise. + * sysdeps/ia64/fpu/e_hypotl.S: Likewise. + * sysdeps/ia64/fpu/e_hypot.S: Likewise. + * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/e_log2f.S: Likewise. + * sysdeps/ia64/fpu/e_log2l.S: Likewise. + * sysdeps/ia64/fpu/e_log2.S: Likewise. + * sysdeps/ia64/fpu/e_logf.S: Likewise. + * sysdeps/ia64/fpu/e_logl.S: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_powl.S: Likewise. + * sysdeps/ia64/fpu/e_pow.S: Likewise. + * sysdeps/ia64/fpu/e_remainderf.S: Likewise. + * sysdeps/ia64/fpu/e_remainderl.S: Likewise. + * sysdeps/ia64/fpu/e_remainder.S: Likewise. + * sysdeps/ia64/fpu/e_scalbf.S: Likewise. + * sysdeps/ia64/fpu/e_scalbl.S: Likewise. + * sysdeps/ia64/fpu/e_scalb.S: Likewise. + * sysdeps/ia64/fpu/e_sinhf.S: Likewise. + * sysdeps/ia64/fpu/e_sinhl.S: Likewise. + * sysdeps/ia64/fpu/e_sinh.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. + * sysdeps/ia64/fpu/e_sqrt.S: Likewise. + * sysdeps/ia64/fpu/libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. + * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. + * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos_large.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosl.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos.S: Likewise. + * sysdeps/ia64/fpu/libm_support.h: Likewise. + * sysdeps/ia64/fpu/s_asinhl.S: Likewise. + * sysdeps/ia64/fpu/s_asinh.S: Likewise. + * sysdeps/ia64/fpu/s_atanf.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtf.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_cosl.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfl.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_expm1l.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_fdimf.S: Likewise. + * sysdeps/ia64/fpu/s_fdiml.S: Likewise. + * sysdeps/ia64/fpu/s_fdim.S: Likewise. + * sysdeps/ia64/fpu/s_frexp.c: Likewise. + * sysdeps/ia64/fpu/s_frexpf.c: Likewise. + * sysdeps/ia64/fpu/s_frexpl.c: Likewise. + * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. + * sysdeps/ia64/fpu/s_ilogb.S: Likewise. + * sysdeps/ia64/fpu/s_ldexp.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise. + * sysdeps/ia64/fpu/s_log1pf.S: Likewise. + * sysdeps/ia64/fpu/s_log1pl.S: Likewise. + * sysdeps/ia64/fpu/s_log1p.S: Likewise. + * sysdeps/ia64/fpu/s_logbf.S: Likewise. + * sysdeps/ia64/fpu/s_logbl.S: Likewise. + * sysdeps/ia64/fpu/s_logb.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. + * sysdeps/ia64/fpu/s_nextafter.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. + * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. + * sysdeps/ia64/fpu/s_roundf.S: Likewise. + * sysdeps/ia64/fpu/s_roundl.S: Likewise. + * sysdeps/ia64/fpu/s_round.S: Likewise. + * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbn.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnf.c: Likewise. + * sysdeps/ia64/fpu/s_scalbnl.c: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanhl.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanl.S: Likewise. + * sysdeps/ia64/fpu/s_tan.S: Likewise. + * sysdeps/ia64/fpu/w_lgamma.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/libm_cpu_defs.h: New file. + * sysdeps/ia64/fpu/libm_error_codes.h: New file. + + [BZ #592] + * sysdeps/ia64/fpu/gen_import_file_list: Updated for Intel libm + 2005-03-21. + * sysdeps/ia64/fpu/import_file.awk: Likewise. + * sysdeps/ia64/fpu/import_intel_libm: Likewise. + * sysdeps/ia64/fpu/Makefile: Likewise. + +2005-03-29 Thorsten Kukuk + + [BZ #661] + * grp/initgroups.c (internal_getgrouplist): Check if we have + enough space before adding the primary group to the list. + + * posix/tst-execle1.c (do_test): Fix execle arguments. + * posix/tst-execle2.c (do_test): Likewise. + +2005-03-23 Jakub Jelinek + + [BZ #822] + * nis/ypclnt.c (yp_2_yperr): Revert 2004-11-30 patch. + (ypprot_err): Use yp_2_yperr table also for YP_NODOM .. YP_NOMORE. + +2005-03-20 Alfred M. Szmidt + + * elf/dl-open.c (dl_open_worker): Fix typo. + +2005-03-19 Ulrich Drepper + + [BZ #821] + * elf/dl-lookup.c (add_dependency): Always search l_initfini if + the list exists. + + [BZ #821] + * elf/Makefile: Add rules to build and run order2. + * elf/order2.c: New file. + * elf/order2mod1.c: New file. + * elf/order2mod2.c: New file. + * elf/order2mod3.c: New file. + * elf/order2mod4.c: New file. + +2005-03-19 Jakub Jelinek + + [BZ #821] + * elf/dl-open.c (dl_open_worker): Print exact l_direct_opencount value, + it has been incremented before. + +2005-03-18 Ulrich Drepper + + [BZ #821] + * elf/dl-fini.c (_dl_fini): Split sorting of the maps in separate + function _dl_sort_fini. + (_dl_sort_fini): New function. + * sysdeps/generic/ldsodefs.h: Declare _dl_sort_fini. + * elf/dl-close.c (_dl_close): Call _dl_sort_fini before running + destructors to call them in the right order. + +2005-03-18 Ulrich Drepper + + [BZ #821] + * include/link.h (struct link_map): Remove l_opencount. Add l_removed. + Change type of l_idx to int. + * elf/dl-close.c: Basically rewrite. Do not use l_opencount to + determine whether a DSO has to be unloaded. Instead compute this + in this function. + * elf/dl-deps.c: No need to manipulate l_opencount anymore. + * elf/dl-lookup.c: Likewise. + * elf/rtld.c: Likewise + * elf/dl-open.c: Likewise. Use l_init_called to determine whether + object was just loaded. + * elf/dl-fini.c: Bump l_direct_opencount instead of l_opencount. + * elf/dl-load.c (_dl_map_object_from_fd): Do not recognize DSO which + is about to be unloaded as a match. + (_dl_map_object): Likewise. + * elf/do-lookup.h (do_lookup_x): Do not look into DSO which is about + to be unloaded. + * elf/circleload1.c: Don't use l_opencount anymore. + * elf/neededtest.c: Likewise. + * elf/neededtest2.c: Likewise. + * elf/neededtest3.c: Likewise. + * elf/neededtest4.c: Likewise. + * elf/unload.c: Likewise. + * elf/unload2.c: Likewise. + * elf/loadtest.c: Likewise. + + [BZ #821] + * elf/rtld.c: Preloading errors are now never fatal. + +2005-03-08 Jakub Jelinek + + [BZ #821] + * elf/Makefile: Add rules to build and run unload5 test. + * elf/unload5.c: New file. + + [BZ #821] + * elf/Makefile: Add rules to build and run unload4 test. + * elf/unload4.c: New file. + * elf/unload4mod1.c: New file. + * elf/unload4mod2.c: New file. + * elf/unload4mod3.c: New file. + * elf/unload4mod4.c: New file. + +2005-03-05 Roland McGrath + + [BZ #821] + * elf/unload3mod4.c: Declare foo. + * elf/testobj2.c: Include . + +2005-03-01 H.J. Lu + + [BZ #776] + * iconv/iconvconfig.c: Fix comment for the output file. + (write_output): Clear padding in header. + +2005-03-03 Ulrich Drepper + + [BZ #821] + * elf/dl-close.c (_dl_close): Don't try to set up new searchpath if the + loader is closed. Fixes unload3. + * elf/tst-global1.c: New file. + * elf/Makefile (tests): Add tst-global1. + * elf/testobj2.c (p): New function. + +2005-03-03 Jakub Jelinek + + [BZ #821] + * elf/Makefile: Add rules to build and run unload3 test. + * elf/unload3.c: New test. + * elf/unload3mod1.c: New file. + * elf/unload3mod2.c: New file. + * elf/unload3mod3.c: New file. + * elf/unload3mod4.c: New file. + +2005-03-01 Alfred M. Szmidt + + [BZ #777] + * elf/dl-load.c (__stack_prot) [!PROT_GROWSUP && !PROT_GROWSDOWN]: + Add missing initializer. + + [BZ #777] + * malloc/arena.c: #include outside of [SHARED && + USE_TLS && !USE___THREAD]. + +2005-02-23 Ulrich Drepper + + [BZ #719] + * elf/Makefile: Run tst-tls9-static again. + +2005-02-22 Ulrich Drepper + + [BZ #719] + * sysdeps/generic/libc-tls.c (static_dtv): Size the same as the + slotinfo array. + (__libc_setup_tls): Initialize length of DTV based on array length. + * elf/dl-load.c: Revert last change. + * sysdeps/generic/dl-tls.c: Revert last change. + + * posix/Makefile (tests): Add tst-execvp1, tst-execvp2, tst-execlp1, + tst-execlp2, tst-execv1, tst-execv2, tst-execl1, tst-execl2, + tst-execve1, tst-execve2, tst-execle1, and tst-execle2. + * posix/tst-execl1.c: New file. + * posix/tst-execl2.c: New file. + * posix/tst-execle1.c: New file. + * posix/tst-execle2.c: New file. + * posix/tst-execlp1.c: New file. + * posix/tst-execlp2.c: New file. + * posix/tst-execv1.c: New file. + * posix/tst-execv2.c: New file. + * posix/tst-execve1.c: New file. + * posix/tst-execve2.c: New file. + * posix/tst-execvp1.c: New file. + * posix/tst-execvp2.c: New file. + +2005-02-22 Jakub Jelinek + + [BZ #769] + * nscd/nscd-client.h: Include sys/uio.h. + (__readall, __readvall, writeall): New prototypes. + * nscd/connections.c (writeall): New function. + (handle_request): Use it. + * nscd/aicache.c (addhstaiX): Likewise. + * nscd/initgrcache.c (addinitgroupsX): Likewise. * nscd/hstcache.c (cache_addhst): Likewise. - -2004-09-11 Roland McGrath - - * sysdeps/mach/hurd/i386/init-first.c (init1) [! SHARED]: - Set _dl_phdr and _dl_phnum. - (init1): When bootstrap task, bail early and never examine *D. - -2004-09-11 Alfred M. Szmidt - - * sysdeps/mach/hurd/i386/tls.h (__i386_set_gdt) [!HAVE_I386_SET_GDT]: - Cast THR, SEL and DESC to `void'. - -2004-09-11 Ulrich Drepper - - * nscd/connections.c (nscd_run): Call setup_thread only for enabled - databases. - - * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Use __NTH for __cmsg_nxthdr. - -2004-09-10 Ulrich Drepper - - * nscd/nscd.c (pagesize_m1): New variable. - (main): Initialize it. - * nscd/nscd.h: Declare pagesize_m1. - * nscd/hstcache.c: Pass correctly aligned address to msync. - * nscd/grpcache.c: Likewise. - * nscd/pwdcache.c: Likewise. - -2004-09-10 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Decrement - __nwaiters. If pthread_cond_destroy has been called and this is - the last waiter, signal pthread_cond_destroy caller and avoid - using the pthread_cond_t structure after unlock. - * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. - -2004-09-10 Ulrich Drepper - - * sysdeps/unix/sysv/linux/kernel-features.h: Don't define - __ASSUME_CLONE_STOPPED. - -2004-09-10 Jakub Jelinek - - * misc/sys/cdefs.h (__REDIRECT_NTH): Change order of __THROW and - __asm__ for C++. [BZ #377] - -2004-09-10 Ulrich Drepper - - * nscd/nscd_stat.c: Improve output by also printing .shared and - .persistent. - - * nscd/connections.c: Allow cache sharing to be really disabled. - -2004-09-10 Jakub Jelinek - - * malloc/malloc.c (_int_free): Only do arena boundary check for - contiguous arenas. - -2004-09-10 Kazuhiro Inaoka - - * stdlib/longlong.h [__M32R__] (add_ssaaaa, sub_ddmmss): Fix broken - instruct operands. - * elf/elf.h: Add R_M32R_* relocs. - -2004-09-09 Ulrich Drepper - - * misc/sys/cdefs.h: Despite what the gcc manual says, gcc 3.2 - seems not to support the nothrow attribute. Use it only for gcc - 3.3 and higher. - - * malloc/hooks.c (top_check): Print top chunk corruption as normal - error message. - - * malloc/malloc.c (malloc_printerr): Don't make informational - message look like error message. - -2004-09-09 Andreas Jaeger - - * nscd/Makefile (CFLAGS-nscd_setup_thread.c): Set to -fpie. - -2004-09-08 Ulrich Drepper - - * sysdeps/unix/sysv/linux/bits/socket.h (__SCM_CONNECT): Removed. - - * malloc/malloc.c (_int_free): Add inexpensive double free and - memory corruption tests. - (malloc_printf_nc): Renamed to malloc_printerr. Second parameter - is no format string anymore. Don't use stdio. Adjust all callers. - * malloc/hooks.c: Adjust malloc_printf_nc callers. - -2004-09-08 Roland McGrath - - * malloc/mcheck.c: Don't use __P. - Use prototypes definitions for static functions. - -2004-09-08 Ulrich Drepper - - * sysdeps/ia64/fpu/bits/mathinline.h: Use __NTH instead of __THROW. - -2004-09-08 Ulrich Drepper - Jakub Jelinek - - * nscd/nscd-client.h: Add a few #includes. - - * nscd/Makefile (nscd-modules): Add nscd_setup_thread. - * nscd/connections.c (nscd_run): Call setup_thread for maintenance - threads. - * nscd/nscd-client.h (struct database_pers_head): Add - nscd_certainly_running field. - * nscd/nscd.h: Declare setup_thread. - * nscd/nscd_helper.c (__nscd_get_map_ref): Avoid the time test if - nscd_certainly_running is nonzero. - * sysdeps/generic/nscd_setup_thread.c: New file. - * sysdeps/unix/sysv/linux/nscd_setup_thread.c: New file. - -2004-09-08 Ulrich Drepper - - * nscd/connections.c: Implement r/o sharing of nscd's cache with client - processes via shared memory. - * nscd/nscd-client.h: Likewise. - * nscd/nscd.h: Likewise. - * nscd/nscd_conf.c: Likewise. - * nscd/nscd_getgr_r.c: Likewise. - * nscd/nscd_getpw_r.c: Likewise. - * nscd/nscd_gethst_r.c: Likewise. - * nscd/nscd.conf: Add new config parameters. - * nscd/Makefile (aux): Add nscd_helper. - * nscd/nscd_helper.c: New file. - * nscd/mem.c (gc): Indicate beginning and end of the gc cycle. - - * nscd/hstcache.c: Simplify a lot. We cache only the request itself, - no derived information. - * connections.c (nscd_init): Fix bug in testing size of the persistent. - - * nis/Makefile (aux): Add nis_hash. - * nis/nis_hash.c: New file. Split out from nis_util.c. - * nis/nis_util.c: Move __nis_hash code in separate file. - - * csu/tst-atomic.c: Improve atomic_increment_val test which would - not have found a ppc bug. - - * sysdeps/s390/fpu/bits/mathinline.h: Remove unnecessary includes. - - * malloc/arena.c: Remove __MALLOC_P uses. - * malloc/malloc.c: Likewise. - - * malloc/mtrace.c: Remove __P uses. - * malloc/mcheck-init.c: Likewise. - -2004-09-07 Jakub Jelinek - - * sysdeps/powerpc/powerpc64/configure.in: New file. - * config.h.in (USE_PPC64_OVERLAPPING_OPD): Add. - * configure.in (HAVE_ASM_GLOBAL_DOT_NAME): Remove. - * sysdeps/powerpc/powerpc64/sysdep.h: Formatting. - (OPD_ENT, BODY_LABEL, ENTRY_1, ENTRY_2, END_2, DOT_PREFIX, - BODY_PREFIX): Define. - (ENTRY, DOT_LABEL, END, TRACEBACK, END_GEN_TB, EALIGN): Support - HAVE_ASM_GLOBAL_DOT_NAME or no dot symbols, - USE_PPC64_OVERLAPPING_OPD or never overlapping .opd entries. - * sysdeps/powerpc/powerpc64/dl-machine.h: Include sysdep.h. - (TRAMPOLINE_TEMPLATE, RTLD_START): Use the new sysdep.h macros. - -2004-09-07 Ulrich Drepper - - * malloc/malloc.h: Don't define __THROW if it is already defined. - - * sysdeps/powerpc/bits/atomic.h (atomic_increment): Define. - (atomic_decrement): Define. - - * sysdeps/powerpc/bits/atomic.h: Implement atomic_increment_val and - atomic_decrement_val. - * sysdeps/powerpc/powerpc32/bits/atomic.h: Likewise. - * sysdeps/powerpc/powerpc64/bits/atomic.h: Likewise. - - * csu/tst-atomic.c (do_test): Add tests of atomic_increment_val - and atomic_decrement_val. - - * include/atomic.h: Define atomic_increment_val, atomic_decrement_val, - and atomic_delay is not already defined. - * sysdeps/i386/i486/bits/atomic.h: Define atomic_delay. - * sysdeps/x86_64/bits/atomic.h: Likewise. - - * miscd/sys/cdefs.h (__NTH): New macro. - (__THROW): Define using nothrow attribute for C code and gcc >= 3.2. - (__REDIRECT_NTH): New macro. - * argp/argp.h: Use __NTH and __REDIRECT_NTH where necessary. - * ctype/ctype.h: Likewise. - * dirent/dirent.h: Likewise. - * io/fcntl.h: Likewise. - * io/sys/sendfile.h: Likewise. - * io/sys/stat.h: Likewise. - * io/sys/statfs.h: Likewise. - * io/sys/statvfs.h: Likewise. - * libio/bits/stdio.h: Likewise. - * misc/sys/mman.h: Likewise. - * posix/unistd.h: Likewise. - * resource/sys/resource.h: Likewise. - * rt/aio.h: Likewise. - * signal/signal.h: Likewise. - * stdlib/stdlib.h: Likewise. - * string/argz.h: Likewise. - * string/string.h: Likewise. - * sysdeps/generic/inttypes.h: Likewise. - * sysdeps/i386/fpu/bits/mathinline.h: Likewise. - * sysdeps/powerpc/fpu/bits/mathinline.h: Likewise. - * sysdeps/s390/fpu/bits/mathinline.h: Likewise. - * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise. - * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. - * sysdeps/unix/sysv/linux/bits/sys/sysmacros.h: Likewise. - * wcsmbs/wchar.h: Likewise. - - * sysdeps/generic/glob.c: Use __PMT isntead of __P where appropriate. - - * resolv/gethnamaddr.c (getanswer): Remove __P use in variable - definition. - - * io/sys/poll.h: Remove __THROW from poll prototype, it's a - cancellation point. - - * io/fts.c (fts_open): Remove uses of __P. - - * include/stdlib.h: No need to use __THROW in this header. - -2004-09-06 Roland McGrath - - * sysdeps/mach/hurd/dl-sysdep.c (__writev): Does use assert on FD - validity, since __assert_fail gets to here anyway. Just fail. - -2004-09-06 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix problem with - AF_UNSPEC lookup with AI_CANONNAME of name which has only IPv6 - addresses. - -2004-09-05 Richard Henderson - - * sysdeps/alpha/fpu/fraiseexcpt.c: Remove file. - * sysdeps/unix/sysv/linux/kernel-features.h - (__ASSUME_IEEE_RAISE_EXCEPTION): New. - * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: New file. - * sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h: New file. - * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use it. - * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. - -2004-09-05 Richard Henderson - - * sysdeps/alpha/div.S: Save and restore FPCR around fp operations. - * sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, - sysdeps/alpha/ldiv.S, sysdeps/alpha/reml.S, sysdeps/alpha/remq.S, - sysdeps/alpha/remqu.S: Likewise. - * sysdeps/alpha/div_libc.h (FRAME): Increase to 64. - -2004-09-05 Ulrich Drepper - - * nscd/cache.c (cache_add): Correctly log GETHOSTBYADDR and - GETHOSTBYADDRv6 requests. - -2004-09-04 Ulrich Drepper - - * nscd/pwdcache.c (cache_addpw): Use correct key length in - cache_add calls. * nscd/grpcache.c (cache_addgr): Likewise. + * nscd/pwdcache.c (cache_addpw): Likewise. + * nscd/nscd_helper.c (__readall, __readvall): New functions. + * nscd/nscd_getai.c (__nscd_getai): Use them. + * nscd/nscd_getpw_r.c (__nscd_getpw_r): Likewise. + * nscd/nscd_getgr_r.c (__nscd_getgr_r): Likewise. + * nscd/nscd_gethst_r.c (__nscd_gethst_r): Likewise. + * nscd/nscd_initgroups.c (__nscd_getgrouplist): Likewise. -2004-09-03 Alfred M. Szmidt - - * sysdeps/mach/hurd/i386/tls.h (THREAD_DTV): Changed type of _DTV - to `dtv_t *'. +2005-02-22 Andreas Schwab -2004-09-03 Ulrich Drepper + * posix/execvp.c (execvp): Fix invalid free. - * nscd/nscd.c (parse_opt): Use writev instead of two write for - invalidate command. +2005-02-21 Alan Modra -2004-09-02 Ulrich Drepper + [BZ #719] + * elf/dl-reloc.c (_dl_nothread_init_static_tls): Assert that dtv + array index is within bounds. - * nscd/connections.c (nscd_run): Check early for invalid request types. +2005-02-21 Ulrich Drepper -2004-09-02 Roland McGrath + [BZ #719] + * elf/dl-load.c: Do not allow PT_TLS in modules loaded in statically + linked code. + * sysdeps/generic/dl-tls.c [!SHARED]: Don't build _dl_next_tls_modid. + * elf/Makefile: Remove rules to build and run tst-tls9-static. - * sysdeps/mach/hurd/i386/tls.h (TLS_INIT_TP_EXPENSIVE): New macro. - (INSTALL_NEW_DTV, THREAD_DTV): Rewritten to fetch the right word. - (THREAD_SELF): New macro. + [BZ #719] + * elf/dl-reloc.c (_dl_nothread_init_static_tls): Avoid using + THREAD_DTV multiple times, this minimally reduces code size on + some archs. -2004-09-02 Steven Munroe +2005-02-21 Jakub Jelinek - [BZ #357] - * stdlib/tst-setcontext.c (test_stack): Added test for stack clobber. - (main): Call test_stack. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S - (__getcontext): Push stack frame then save parms in local frame. - Improve instruction scheduling. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S - (__swapcontext): Likewise. + [BZ #768] + * nscd/nscd_gethst_r.c (nscd_gethst_r): Set *h_errnop to + NETDB_INTERNAL if buffer is too small. -2004-09-01 Andreas Schwab + [BZ #768] + * nscd/hstcache.c (INCR): Remove. + (addhstbyX): Double buflen in each iteration rather than add INCR. + * nscd/grpcache.c: Likewise. + * nscd/pwdcache.c: Likewise. - * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h [g++ >= 3.5]: Use - __builtin_offsetof. +2005-02-21 Ulrich Drepper -2004-09-01 Jakub Jelinek + [BZ #767] + * posix/unistd.h: symlink and readlink are unconditionally + available in the 2001 spec. - [BZ #361] - * posix/fnmatch_loop.c (FCT): For backslash between brackets, branch - to normal_bracket after fetching the next character. - * posix/tst-fnmatch.input: Add 25 new tests. - Reported by Markus Oberhumer . +2004-07-23 Jakub Jelinek -2004-09-01 Ulrich Drepper + [BZ #284] + * include/features.h (_POSIX_SOURCE, _POSIX_C_SOURCE): Define + if _XOPEN_SOURCE >= 500 even if __STRICT_ANSI__ is defined. - * elf/rtld.c (dl_main): First check existence of ld.so.preload - with access. +2005-02-11 Barry deFrese -2004-09-01 Roland McGrath + [BZ #722] + * sysdeps/mach/hurd/setresgid.c: Use weak_alias. + * sysdeps/mach/hurd/setresuid.c: Likewise. - * sysdeps/unix/sysv/linux/bits/waitflags.h - (WSTOPPED, WEXITED, WCONTINUED, WNOWAIT): New macros. - * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_WAITID_SYSCALL): - New macro. - * sysdeps/unix/sysv/linux/waitid.c: New file. Use new syscall when - available, or fall back to the waitpid-based generic code. +2005-02-09 Jakub Jelinek -2004-08-14 Alfred M. Szmidt + [BZ #710] + * stdlib/random_r.c (__initstate_r): Save old state. + * stdlib/Makefile (tests): Add tst-random2. + * stdlib/tst-random2.c: New test. + Reported by Peter Bergner . - * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Let gcc - clobber the `ebp' register. - * sysdeps/mach/hurd/i386/Makefile (CFLAGS-init-first.c): Removed. - Reverts change from 2004-05-07 by Jeroen Dekkers. +2005-02-07 Ulrich Drepper - * sysdeps/mach/hurd/i386/init-first.c (init): Changed the type of - NEWSP from `void *' to `int *'. Changed all casts accordingly. + * elf/dl-load.c (_dl_map_object_from_fd): Make sure registers are + set correctly. -2004-08-31 Jakub Jelinek +2005-01-07 Jakub Jelinek - * wcsmbs/wcsmbsload.c (__wcsmbs_getfct): Move attribute_hidden - before return type. - * locale/localename.c (__current_locale_name): Likewise. + [BZ #738] + * elf/dl-load.c (open_path): If rtld_search_dirs is in RELRO segment, + avoid writing to it if none of the standard search directories exist. -2004-08-30 Roland McGrath +2005-02-07 Steven Munroe - * scripts/extract-abilist.awk: If `lastversion' variable defined, omit - later sets from output. - * Makerules (check-abi): Pass option to set that with value of - LIB-abi-frozen variable if one is set. + [BZ #700] + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S + (__novec_setcontext, __setcontext): Fix typo so CCR is restored. + Load MSR as a doubleword. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S + (__novec_swapcontext, __swapcontext): Likewise. - * abilist/libcidn.abilist: New file (empty). +2005-02-07 Ulrich Drepper -2004-08-30 Jakub Jelinek + * sysdeps/unix/sysv/linux/i386/sysdep.h (check_consistency): Define. - * posix/bits/posix1_lim.h (_POSIX_CHILD_MAX, _POSIX_OPEN_MAX): If - not __USE_XOPEN2K, use the Unix98 mandated values. +2005-02-07 Jakub Jelinek -2004-08-27 Roland McGrath + [BZ #741] + * nscd/nscd.c (termination_handler): Avoid segfault if some database + is not enabled. - * configure.in (usetls): Default to yes. - * configure: Regenerated. + [BZ #741] + * nscd/nscd_getai.c (__nscd_getai): If ai_resp->found == -1, set + __nss_not_use_nscd_hosts and return -1. + * nscd/nscd_initgroups.c (__nscd_getgrouplist): If + initgr_resp->found == -1, set __nss_not_use_nscd_group and return -1. + Avoid leaking sockets. -2004-08-26 Roland McGrath +2005-02-07 Jakub Jelinek - * configure.in (add_ons_automatic): New variable, set to yes or no - indicating --enable-add-ons with no explicit list. - (running add-on fragments): Allow a fragment to modify $libc_add_on - and have that affect its place in the list of add-ons to use. - * configure: Regenerated. + [BZ #742] + * nscd/nscd.init (reload): Print Reloading nscd: before and a newline + after the status string printed by killproc. -2004-08-26 Ulrich Drepper +2005-02-02 Alfred M. Szmidt - * nscd/cache.c: Major rewrite. The data is now optionally kept in - a mmaped memory region which is automatically mirrored on disk. - This implements persistent data storage. The Memory handled - needed to be completely revamped, it now uses a garbage collection - mechanism instead of malloc. - * nscd/connections.c: Likewise. - * nscd/nscd.c: Likewise. - * nscd/nscd.h: Likewise. - * nscd/nscd_conf.c: Likewise. - * nscd/nscd_stat.c: Likewise. - * nscd/grpcache.c: Likewise. - * nscd/hstcache.c:: Likewise. - * nscd/pwdcache.c:: Likewise. - * nscd/Makefile: Add rules to build mem.c. - * nscd/mem.c: New file. - * nscd/nscd.conf: Describe new configuration options. + [BZ #671] + * sysdeps/generic/syslog.c (send_flags) [!send_flags]: Define it. -2004-08-26 Kaz Kojima + [BZ #765] + * libio/fmemopen.c: Include . - * sysdeps/unix/sysv/linux/mips/pread.c: Include sgidefs.h only if - NO_SGIDEFS_H isn't defined. - * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. +2005-01-28 Martin Schwidefsky - * sysdeps/unix/sysv/linux/sh/pread.c: Define NO_SGIDEFS_H and - _MIPS_SIM. - * sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/sh/pread64.c: Likewise. - * sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise. + [BZ #743] + * sysdeps/s390/bits/string.h (strlen, strncpy, strcat, strncat, + strncat, memchr, strcmp): Add missing memory clobber. -2004-08-26 Ulrich Drepper +2005-01-27 Jakub Jelinek - * nscd/connections.c (nscd_run): atomic_increment was not missing. + * stdlib/tst-fmtmsg.c: Include stdlib.h. [BZ #731] + * stdio-common/tst-fmemopen2.c: Include string.h. [BZ #730] + * posix/execvp.c: Include stdbool.h. - * sysdeps/gnu/Makefile (libdl-sysdep_routines): Don't add eval. - Patch by Greg Schafer. +2005-01-26 Ulrich Drepper -2004-08-25 Richard Henderson + [BZ #671] + * sysdeps/unix/sysv/linux/kernel-features.h: Found reference to + MSG_NOSIGNAL being in 2.2 kernels. - * sysdeps/alpha/elf/start.S (_start): Use $15 as frame unwind - instead of $31. Zero $15. - * sysdeps/unix/sysv/linux/alpha/clone.S (thread_start): Likewise. +2005-01-26 Jakub Jelinek -2004-08-25 Ulrich Drepper + [BZ #737] + * sysdeps/unix/sysv/linux/i386/sysdep.h + (SYSCALL_ERROR_HANDLER_TLS_STORE): Remove unnecessary 0 imm. - * sysdeps/powerpc/powerpc64/bits/atomic.h - (__arch_compare_and_exchange_bool_32_acq): Fix case where oldval - is negative. - (__arch_compare_and_exchange_bool_32_rel): Likewise. + [BZ #693] + * posix/regex_internal.h (DUMMY_CONSTRAINT): Rename to... + (WORD_DELIM_CONSTRAINT): ...this. + (NOT_WORD_DELIM_CONSTRAINT): Define. + (re_context_type): Add INSIDE_NOTWORD and NOT_WORD_DELIM, + change WORD_DELIM to use WORD_DELIM_CONSTRAINT. + * posix/regcomp.c (peek_token): For \B create NOT_WORD_DELIM + anchor instead of INSIDE_WORD. + (parse_expression): Handle NOT_WORD_DELIM constraint. + * posix/bug-regex19.c (tests): Adjust tests that relied on \B + being inside word instead of not word delim. + * posix/tst-rxspencer.c (mb_frob_pattern): Don't frob escaped + characters. + * posix/rxspencer/tests: Add some new tests. - * nscd/connections.c: Make socket nonblocking so that threads - don't get stuck on accept. Fix locking. +2005-01-25 Roland McGrath - * nscd/grpcache.c (cache_addgr): Use copy of original key in hash - entry with alternative key. - * nscd/pwdcache.c (cache_addpw): Likewise. + [BZ #671] + * sysdeps/generic/syslog.c [NO_SIGPIPE]: Protect sigpipe_handler decl. -2004-08-25 Richard Sandiford +2005-01-23 Roland McGrath - * sysdeps/mips/dl-machine.h (_dl_start_user): Don't set - __libc_stack_end. + [BZ #737] + * sysdeps/i386/Makefile (defines): If -mno-tls-direct-seg-refs appears + in $(CFLAGS), add -DNO_TLS_DIRECT_SEG_REFS. + * sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD] + (SYSCALL_ERROR_HANDLER) [NO_TLS_DIRECT_SEG_REFS]: Load thread pointer + from %gs:0 and add to that value, rather that direct %gs:OFFSET access. + * sysdeps/unix/i386/sysdep.S [NO_TLS_DIRECT_SEG_REFS]: Likewise. -2004-08-23 Ulrich Drepper +2005-01-25 Jakub Jelinek - * sysdeps/gnu/netinet/udp.h: Cosmetic changes. Remove unnecessary - __BEGIN_DECLS/__END_DECLS. - -2004-08-23 Andreas Jaeger - - [BZ #341] - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_NOATIME): Define. - * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (O_NOATIME): Likewise. - * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (O_NOATIME): Likewise. - -2004-08-21 Ulrich Drepper - - * malloc/hooks.c (DEFAULT_CHECK_ACTION): Moved to malloc.c. - (check_action): Likewise. - When printing error messages, use malloc_printf_nc now instead of - fiddling with the streams cancellation flag in every place. - * malloc/malloc.c (DEFAULT_CHECK_ACTION): New definition. Change - default to 3. - (check_action): New variable. - (unlink): Print error message and eventually terminate in case list - is corrupted. - (malloc_printf_nc): New function. Use it in _int_free. - Change proposed by Arjan van de Ven. - - * dlfcn/Makefile: Don't build eval.c anymore. - -2004-08-20 Roland McGrath - - * csu/Makefile ($(objpfx)version-info.h): Use printf in place - of echo -e for POSIX.2 portability. - Reported by Paul Jarc . - -2004-08-19 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Minor optimizations in - list generation. - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use - getcanonname_r function if AI_CANONNAME flag is not set in - request. - - * nis/nss_compat/compat-initgroups.c (getgrent_next_nss): - Initialize mysize with limits only if latter is >= 0. Use mysize - in malloc call. - -2004-08-19 Jakub Jelinek - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Cast canon to (char *) - to avoid warning. - - * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Initialize - status to NSS_STATUS_UNAVAIL. - -2004-08-19 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Use h->h_name in the - cannoname lookup since it has the FQDN even if the original NAME - value has not. - -2004-08-18 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Store NAME parameter - pointer in new variable ORIG_NAME and use this pointer when - determination of canonical name failed, not the possibly IDN - translated value of NAME. - -2004-08-17 Ulrich Drepper - - * resolv/resolv.h (RES_DEFAULT): Add RES_NOIP6DOTINT. - * resolv/res_init.c (res_setoptions): Recognize ip6-dotint option. - Reset RES_NOIP6DOTINT flag in this case.. - - * sysdeps/posix/getaddrinfo.c: Fix memory handling of - ai_canonname. - -2004-08-16 Ulrich Drepper - - * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Don't use - CNAME records, we better follow the chain of CNAME records which - can be accomplished with A/AAAA lookups. - -2004-08-15 Roland McGrath - - * sysdeps/unix/sysv/linux/bits/resource.h (enum __rusage_who): - Remove __RUSAGE_BOTH constant and RUSAGE_BOTH macro. - * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. - -2004-08-15 Roland McGrath - - * sysdeps/i386/i686/Makefile (elide-routines.os): Append hp-timing to - this, not ... - (static-only-routines): ... this. - * sysdeps/ia64/Makefile: Likewise. - * sysdeps/sparc/sparc32/sparcv9/Makefile: Likewise. - * sysdeps/sparc/sparc64/Makefile: Likewise. - * sysdeps/x86_64/Makefile: Likewise. - * sysdeps/i386/i686/hp-timing.c: Revert copyright terms change. - * sysdeps/ia64/hp-timing.c: Likewise. - * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise. - * sysdeps/sparc/sparc64/hp-timing.c: Likewise. - - * csu/elf-init.c: Update copyright terms including special exception - for these trivial files, which are statically linked into executables - that use dynamic linking for the significant library code. - * io/fstat.c: Likewise. - * io/fstat64.c: Likewise. - * io/lstat.c: Likewise. - * io/lstat64.c: Likewise. - * io/stat.c: Likewise. - * io/stat64.c: Likewise. - * stdlib/atexit.c: Likewise. - * sysdeps/alpha/elf/initfini.c: Likewise. - * sysdeps/alpha/elf/start.S: Likewise. - * sysdeps/arm/elf/start.S: Likewise. - * sysdeps/cris/elf/start.S: Likewise. - * sysdeps/generic/initfini.c: Likewise. - * sysdeps/generic/mknod.c: Likewise. - * sysdeps/hppa/elf/initfini.c: Likewise. - * sysdeps/hppa/elf/start.S: Likewise. - * sysdeps/i386/elf/start.S: Likewise. - * sysdeps/i386/i686/hp-timing.c: Likewise. - * sysdeps/ia64/elf/initfini.c: Likewise. - * sysdeps/ia64/elf/start.S: Likewise. - * sysdeps/ia64/hp-timing.c: Likewise. - * sysdeps/m68k/elf/start.S: Likewise. - * sysdeps/mach/start.c: Likewise. - * sysdeps/mips/elf/start.S: Likewise. - * sysdeps/powerpc/powerpc32/elf/start.S: Likewise. - * sysdeps/powerpc/powerpc64/elf/start.S: Likewise. - * sysdeps/s390/s390-32/elf/start.S: Likewise. - * sysdeps/s390/s390-32/initfini.c: Likewise. - * sysdeps/s390/s390-64/elf/start.S: Likewise. - * sysdeps/s390/s390-64/initfini.c: Likewise. - * sysdeps/sh/elf/initfini.c: Likewise. - * sysdeps/sh/elf/start.S: Likewise. - * sysdeps/sparc/sparc32/elf/start.S: Likewise. - * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise. - * sysdeps/sparc/sparc64/elf/start.S: Likewise. - * sysdeps/sparc/sparc64/hp-timing.c: Likewise. - * sysdeps/standalone/i386/start.S: Likewise. - * sysdeps/standalone/i960/start.S: Likewise. - * sysdeps/standalone/m68k/m68020/start.S: Likewise. - * sysdeps/unix/arm/start.c: Likewise. - * sysdeps/unix/bsd/osf/alpha/start.S: Likewise. - * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise. - * sysdeps/unix/sparc/start.c: Likewise. - * sysdeps/unix/start.c: Likewise. - * sysdeps/unix/sysv/aix/start.s: Likewise. - * sysdeps/unix/sysv/irix4/start.c: Likewise. - * sysdeps/x86_64/elf/initfini.c: Likewise. - * sysdeps/x86_64/elf/start.S: Likewise. - -2004-08-15 Roland McGrath - - [BZ #227] - * sysdeps/unix/sysv/linux/kernel-features.h - (__ASSUME_BRK_PAGE_ROUNDED): New macro. - * sysdeps/unix/sysv/linux/dl-sysdep.c (frob_brk) - [! __ASSUME_BRK_PAGE_ROUNDED]: Adjust the break up if it falls within - the partial page after the dynamic linker's own data segment. - -2004-08-15 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Optimize generation of - v4-mapped addresses a bit. - (gethosts): Move alloca out of macro, so that it is done only once. - - * sysdeps/posix/getaddrinfo.c (gaih_addrtuple): Change type of - addr to avoid casts. - (gethosts): Removed. - (gethosts2): Renamed to gethosts. Make it usable for family != - AF_UNSPEC. Fix AI_V4MAPPED. - (gaih_inet): Remove use of old gethosts. Always use what used to be - gethosts2. If entry is found, try to use the same NSS module's - getcanonname_r function. Use gethostbyaddr for AI_CANONNAME only - if getcanonname_r was not available. Fix filtering of AI_V4MAPPED - addresses. Numerous cleanups. - * resolv/nss_dns/dns-canon.c: New file. - * resolv/Makefile (libnss_dns-routines): Add dns-canon. - * resolv/Versions (libnss_dns): Add _nss_dns_getcanonname_r. - - * elf/Makefile: Add rules to build and run tst-dlopenrpath. - * elf/tst-dlopenrpath.c: New file. - * elf/tst-dlopenrpathmod.c: New file. - - * intl/tst-gettext.sh: Adjust for change of de.po file to UTF-8. - * intl/tst-gettext.c: Likewise. - - * nss/getent.c (ahosts_keys_int): Correctly print IPv6 addresses. - - * nss/getent.c: Allow queries for getaddrinfo with AF_INET and - AF_INET6. - -2004-08-14 Ulrich Drepper - - * po/de.po: Update from translation team. - -2004-08-14 Roland McGrath - - * sysdeps/mach/configure: Regenerated. - * sysdeps/mach/hurd/configure: Regenerated. - -2004-08-14 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (getaddrinfo): If RFC3484 sorting is - performed, make sure it is still the first entry after sorting - that has the ai_canonname information. - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Really set ai_canonname - only in one entry. - -2004-08-13 Daniel Jacobowitz - - * scripts/output-format.sed: Handle default case of three-argument - OUTPUT_FORMAT. - - * sysdeps/arm/machine-gmon.h (mcount_internal): Mark as - __attribute_used__. - -2004-08-13 Ulrich Drepper - - * nss/getent.c (ahosts_keys): ai_canonname is NULL for all but the - first returned entry. Print name only if not NULL. - - * nis/nss_nis/nis-netgrp.c: Remove locking by using data in struct - __netgrent object passed in instead of global variables. - Optimize. - * nis/nss_nisplus/nisplus-netgrp.c: Remove locking by using data - in struct __netgrent object passed in instead of global variables. - * inet/netgroup.h (struct __netgrent): Add service_user field. - Move cursor in anonymous union, add new field location to that - union. - * inet/getnetgrent_r.c: Extensive rewrite to really enable - concurrent uset of set/get/endnetgrent and innetgr. - Reported by Chuck Simmons. - - * inet/netgroup.h (struct name_list): Replace name pointer with - zero-sized array. - * inet/getnetgrent_r.c: Adjust code for change in name_list - layout. Numerous strdup and free calls removed. - - * elf/sprof.c (read_symbols): When comparing aliases, prefer - non-hidden over hidden symbols and strong over weak symbols - if both don't start with '_'. - - * malloc/malloc.c: Use strong_alias instead of weak_alias wherever - possible. - -2004-08-12 Jakub Jelinek - - * sysdeps/unix/sysv/linux/bits/resource.h: Define non-standard - RUSAGE_ enums as __RUSAGE_ and adjust macros accordingly. - * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise. - Define non-standard RLIMIT_ enums as __RLIMIT_ and adjust macros - accordingly. - -2004-08-11 Andreas Schwab - - * resolv/res_libc.c: Move definition of __res_initstamp ... - * resolv/res_init.c: ... here. - -2004-08-10 GOTO Masanori - - * locale/C-time.c: Change default ERA value from NULL to "". - * locale/tst-C-locale.c: Add test case for ERA keywords. - -2004-08-12 Ulrich Drepper - - * sysdeps/unix/sysv/linux/bits/resource.h: Define non-standard - RLIMIT__ enums as __RLIMIT_ and adjust macros accordingly. - * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. - -2004-08-12 Jakub Jelinek - - * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_SIGPENDING, - RLIMIT_MSGQUEUE): Add. - (RLIMIT_NLIMITS, RLIM_NLIMITS): Adjust. - * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_SIGPENDING, - RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. - (RLIM_NLIMITS): Adjust. - * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIMIT_SIGPENDING, - RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. - (RLIM_NLIMITS): Adjust. - * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_SIGPENDING, - RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. - (RLIM_NLIMITS): Adjust. - -2004-08-12 Jakub Jelinek - - * resolv/res_query.c (__libc_res_nsearch): Protect the debugging - printf with #ifdef DEBUG and RES_DEBUG check. - - * sysdeps/unix/sysv/linux/bits/shm.h: Move __END_DECLS after - __USE_MISC #endif. - * sysdeps/generic/bits/shm.h: Add __BEGIN_DECLS for __getpagesize - declaration. - * sysdeps/gnu/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/shm.h: Likewise. - * sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise. - -2004-08-12 Ulrich Drepper - - * po/ca.po: Update from translation team. - -2004-08-11 Ulrich Drepper - - * sysdeps/unix/sysv/linux/bits/shm.h: Add __BEGIN_DECLS for - __getpagesize declaration. - -2004-08-11 Roland McGrath - - * configure.in (libc_cv_cpp_asm_debuginfo): Add missing braces around - commands inside &&. - Reported by Andreas Schwab . - * configure: Regenerated. - - * posix/tst-waitid.c (do_test): Ignore SIGCHLD before cleanup SIGKILL. - -2004-08-11 Ulrich Drepper - - * time/tzset.c (tzset_internal): Add new parameter which is - nonzero if called through tzset. Use TZDEFAULT name including - name comparison if the new parameter is zero. This means implicit - tzset calls will not cause files to be opened and read by tzfile.c - all the time. - -2004-08-11 Jakub Jelinek - - * rt/tst-timer2.c (do_test): If timer_create fails, just continue. - * rt/tst-timer4.c (do_test): If one of the timer_create calls fails, - return 1 immediately. - - * time/tzfile.c (__tzfile_read): Free transitions only if it will - not be reused. - - * sysdeps/ieee754/dbl-64/mpa.c: Include . - * sysdeps/ieee754/dbl-64/mpa.h (MAX, MIN): Macros removed. - - * stdio-common/tst-popen.c: Include . - - * resolv/res_send.c (__libc_res_nsend): Only define TMPBUF #if DEBUG. - - * sysdeps/pthread/aio_misc.c (handle_fildes_io): Remove noreturn - attribute. Return NULL instead of calling pthread_exit at the end. - -2004-08-11 Roland McGrath - - * iconvdata/testdata/ISO-2022-JP-3: Regenerated. - -2004-08-10 Alfred M. Szmidt - - * sysdeps/generic/bits/in.h (struct ip_mreq): Remove definition. - -2004-08-10 Jakub Jelinek - - * libio/bits/stdio.h (fread_unlocked): Cast 0 to (size_t). - (fwrite_unlocked): When checking if size * n is <= 8, cast each - argument to size_t individually. Cast n to (void) instead of - (size_t), surround with (), return (size_t) 0 if one of n or size - is 0. [BZ #316] - * stdio-common/Makefile (tests): Add tst-unlockedio. - * stdio-common/tst-unlockedio.c: New test. - -2004-08-09 Roland McGrath - - * manual/install.texi (Supported Configurations): Replace bug-glibc - mention with web URL. - * INSTALL: Regenerated. - * locale/iso-3166.def: Likewise, in comment. - * locale/iso-4217.def: Likewise. - * locale/iso-639.def: Likewise. - * posix/cpio.h: Remove bug reporting comment. - -2004-08-09 Ulrich Drepper - - * libio/bits/stdio.h (fread_unlocked): Add a couple of (size_t) - casts to handle funny calls with floating point argument values - and signed values correctly and without warning. - (fwrite_unlocked): Likewise. [BZ #309] - - * malloc/memusage.c (me): Use creat64, not creat. - * malloc/memusagestat.c: Fix handling of very large sizes. [BZ #285] - Patch by Guy Maor . - - * elf/ldconfig.c (options): Mark parameter option names as - translatable. [BZ #253] Patch by Jakub Bogusz . - - * iconv/gconv_charset.h (strip): Also allow comma which is what is - used to separate options. [BZ #194] - -2004-08-09 Roland McGrath - - * FAQ.in: Refer to web pages instead of bug-glibc. - * FAQ: Regenerated. - - * time/strptime_l.c: #include , `bool' used in last change. - -2004-08-09 Ulrich Drepper - - * time/tzset.c (tzset_internal): If TZ is not set do not compare - old and new tz value since it might be /etc/localtime in both - cases although the file changed. [BZ #154] - Patch by Christian Franke . - - * time/tzfile.c (__tzfile_read): Determine dev/ino of file. - Compare with values of previously opened file. Don't do anything - is they match. - -2004-08-08 Ulrich Drepper - - * elf/dl-load.c (_dl_map_object): If __RTLD_CALLMAP flag is set, - reset loader before the actual loading. - * elf/dl-open.c (dl_open_worker): If file name contains no path - element determine map of caller. Pass caller map in this case to - _dl_map_object. Set __RTLD_CALLMAP in mode. - * include/dlfcn.h (__RTLD_CALLMAP): Define. [BZ #116] - Patch by Greg Wolodkin . - - * misc/syslog.c (openlog_internal): Always try both UDP and TCP. - [BZ #108] Patch mainly by Bjorn Andersson . - - * configure.in: Also recognize i786. [BZ #106] - Patch by . - - * resolv/res_query.c (__libc_res_nsearch): Correctly test whether - name contains any dots. [BZ #95] - - * resolv/res_send.c: Compiling with DEBUG defined works again. - * resolv/gethnamaddr.c (dprintf): Renamed to Dprintf. Adjust all - callers. - - * resolv/tst-leaks.c (TIMEOUT): Define so that if no server is - available the process is not killed. [BZ #41] - - * intl/tst-gettext.c (main): Improve some messages. [BZ #33] - - * time/strptime_l.c (__strptime_internal): Fix handling of %Ey. - [BZ #28] - - * po/sv.po: Update from translation team. - -2004-08-07 Ulrich Drepper - - * inet/netinet/in.h: Add more const to the setipv4soucefilter, - getsourcefilter, and setsourcefilter parameter list. - * sysdeps/generic/setipv4sourcefilter.c: Likewise. - * sysdeps/generic/getsourcefilter.c: Likewise. - * sysdeps/generic/setsourcefilter.c: Likewise. - * sysdeps/unix/sysv/linux/setipv4sourcefilter.c: Likewise. - * sysdeps/unix/sysv/linux/getsourcefilter.c: Likewise. - * sysdeps/unix/sysv/linux/setsourcefilter.c: Likewise. - - * po/tr.po: Update from translation team. - -2004-08-06 Ulrich Drepper - - * iconvdata/jisx0213.h (jisx0213_added_in_2004_p): Fix typo. - Reported by Paolo Bonzini. - -2004-08-06 Jakub Jelinek - - * sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Add - always_inline. - * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_runtime_setup, - elf_machine_fixup_plt, elf_machine_plt_conflict): Likewise. - - * sysdeps/unix/sysv/linux/netatalk/at.h: Include bits/sockaddr.h - before including linux/atalk.h. - - * resolv/res_libc.c: Include atomic.h. - - * intl/finddomain.c (free_mem): Rename to... - (_nl_finddomain_subfreeres): ... this. Add - __libc_freeres_fn_section. - * intl/loadmsgcat.c (_nl_unload_domain): Add - __libc_freeres_fn_section. - * intl/gettextP.h (_nl_unload_domain): Move into #ifdef _LIBC. - Add attribute_hidden. - (_nl_findomain_subfreeres): New prototype. - * iconv/gconv_db.c (free_mem): Call _nl_findomain_subfreeres. - -2004-07-30 Guido Guenther - - * nss/getent.c (passwd_keys): Use strtoul instead of isdigit to - test if the key is numeric or not. - (group_keys): Likewise. - -2004-08-05 Ulrich Drepper - - * inet/netinet/in.h: Define struct ip_msfilter, IP_MSFILTER_SIZE, - struct group_filter, and GROUP_FILTER_SIZE. - * include/sys/socket.h: Declare __getsockopt. - * sysdeps/unix/sysv/linux/setipv4sourcefilter.c: New file. - * sysdeps/unix/sysv/linux/getipv4sourcefilter.c: New file. - * sysdeps/unix/sysv/linux/setsourcefilter.c: New file. - * sysdeps/unix/sysv/linux/getsourcefilter.c: New file. [BZ #211] - - * po/ko.po: Update from translation team. - -2004-08-04 Jakub Jelinek - - * hesiod/hesiod.c (__hesiod_res_get): Use calloc instead of malloc + - memset. - (__hesiod_res_set): Free nsaddrs. - - * include/resolv.h (__res_maybe_init): Add prototype. - * resolv/resolv.h (struct __res_state): Add _u._ext.initstamp field. - * resolv/Versions (libc): Add __res_maybe_init@@GLIBC_PRIVATE. - * resolv/res_libc.c (__res_initstamp, lock): New variables. - (res_init): Increase __res_initstamp. - (__res_maybe_init): New function. - * resolv/res_init.c (__res_vinit): Initialize _u._ext.initstamp. - * hesiod/hesiod.c (__hesiod_res_get): Use __res_maybe_init instead - of RES_INIT check and {res_ninit,__res_ninit,res_init} call. - * sysdeps/posix/getaddrinfo.c (gaih_inet): Likewise. - * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r, - _nss_dns_gethostbyaddr_r): Likewise. - * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r, - _nss_dns_getnetbyaddr_r): Likewise. - * resolv/gethnamaddr.c (gethostbyname, gethostbyname2, - gethostbyaddr): Likewise. - * resolv/res_data.c (fp_nquery, res_mkquery, res_mkupdate, - res_isourserver, res_sendsigned, res_update, res_search, - res_querydomain): Likewise. - * nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)): Likewise. - * nss/digits_dots.c (__nss_hostname_digits_dots): Likewise. - * nss/getnssent_r.c (__nss_setent, __nss_endent, __nss_getent_r): - Likewise. - -2004-08-05 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Set ai_family for - V4-mapped IPv6 addresses and req->ai_family==AF_INET. - Reported by A. Guru . - - * po/sv.po: Update from translation team. - * po/sk.po: Likewise. - * po/pl.po: Likewise. - -2004-08-04 Jakub Jelinek - Ulrich Drepper - - * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Don't read more input - characters than necessary. - -2004-08-05 Ulrich Drepper - - * wcsmbs/Makefile (tests): Add tst-mbsrtowcs. - * wcsmbs/tst-mbsrtowcs.c: New file. - - * po/fr.po: Update from translation team. - -2004-08-04 Jakub Jelinek - - * resolv/inet_pton.c (inet_pton4): Disallow octal numbers. Reported - by A. Guru . [BZ #295] - -2004-08-05 Ulrich Drepper - - * po/nl.po: Update from translation team. - - * sysdeps/posix/getaddrinfo.c (gaih_inet): Recognize all the IPv4 - numeric address formats inet_addr knows. - (getaddrinfo): Allow AI_NUMERICSERV flag. - If neither IPv4 nor IPv6 interface is present we cannot make any - decision for AI_ADDRCONFIG. Fail if AI_NUMERICSERV is set and the - string is not just a number. Remove useless freeaddrinfo call. - * resolv/netdb.h (AI_NUMERICSERV): Define. - Based on a patch by a.guru@sympatico.ca. - -2004-08-04 Jakub Jelinek - - * stdlib/strfmon_l.c (__vstrfmon_l): Memset whole info structure - instead of trying to initialize some, but not all, fields one by - one. - * stdio-common/printf_size.c (printf_size): Initialize fb_info - structure with *info instead of trying to initialize some, but not - all, fields from it. - - * nscd/connections.c (handle_request): Check if req->type is in - LASTDBREQ .. LASTREQ range instead of req. - - * locale/programs/linereader.c (lr_create): Initialize - lr->return_widestr to 0. - - * elf/dl-close.c (free_slotinfo): Add __libc_freeres_fn_section. - (free_mem): Call free_slotinfo just once. - - * stdio-common/tst-fmemopen.c (main): Check for MAP_FAILED instead - of NULL. - - * locale/localeinfo.h (_nl_locale_subfreeres): New prototype. - * locale/setlocale.c (free_category): Add __libc_freeres_fn_section. - (free_mem): Rename to _nl_locale_subfreeres. - * iconv/gconv_db.c: Include locale/localeinfo.h. - (free_derivation, free_modules_db): Add __libc_freeres_fn_section. - (free_mem): Call _nl_locale_subfreeres. - * iconv/gconv_dl.c (do_release_all): Add __libc_freeres_fn_section. - -2004-08-04 Roland McGrath - - * Makeconfig ($(common-objpfx)config.status): - Fix typo: $(add_ons) -> $(add-ons). - (Makeconfig-add-on): New variable. When doing $(sysdep-makeconfigs) - include, use black magic to get it set to an add-on's name during the - include of the add-on's Makeconfig. - - * configure.in: Use variable name `libc_add_on' when sourcing add-on - configure fragments, so they can refer to this. - * configure: Regenerated. - -2004-08-04 Roland McGrath - - * posix/tst-waitid.c (test_child): Sleep a second before stopping. - (do_test): Bump sleep to three seconds. - (sigchld, check_sigchld): New functions. - (do_test): Handle SIGCHLD and check for getting the right details. - - * posix/tst-waitid.c (do_test): Kill the child process when bailing - out early on some failure. - [WCONTINUED]: Test WCONTINUED functionality. - -2004-08-03 Ulrich Drepper - - * nscd/connections.c (handle_request): Print more descriptive - message for invalid request types. - -2004-08-02 Jakub Jelinek - - * iconvdata/ibm932.c (BODY): Avoid binary search for ch >= 0xffff. - Always treat high as highest number in range + 1. - * iconvdata/ibm943.c (BODY): Likewise. - -2004-07-31 Bruno Haible - - * iconvdata/JISX0213.TXT: Updated to JISX0213 plane 1 version 2004. - * iconvdata/jisx0213.c (__jisx0213_to_ucs_main, - __jisx0213_to_ucs_pagestart, __jisx0213_from_ucs_level1, - __jisx0213_from_ucs_level2): Regenerated. - * iconvdata/jisx0213.h (jisx0213_added_in_2004_p): New function. - * iconvdata/iso-2022-jp-3.c (JISX0213_1_2000_set): Renamed from - JISX0213_1_set. - (JISX0213_1_2004_set): New enum value. - (BODY for FROM_LOOP): Treat ESC $ ( Q like ESC $ ( O. - (BODY for TO_LOOP): For JISX 0213 plane 1 characters, emit ESC $ ( O - when possible, ESC $ ( Q when needed. - * iconvdata/testdata/EUC-JISX0213: Add the 10 new characters. - * iconvdata/testdata/EUC-JISX0213..UTF8: Update. - * iconvdata/testdata/SHIFT_JISX0213: Add the 10 new characters. - * iconvdata/testdata/SHIFT_JISX0213..UTF8: Update. - * iconvdata/testdata/ISO-2022-JP-3: Add the 10 new JISX0213 characters. - * iconvdata/testdata/ISO-2022-JP-3..UTF8: Update. - -2004-07-22 Bruno Haible - - * iconvdata/gconv-modules (ISO-8859-7): Add alias ISO_8859-7:2003. - -2004-07-29 David S. Miller - - * sysdeps/sparc/sparc64/sparcv9b/memcpy.S (memcpy): Optimize - better for smaller than 256 byte copies. Also, use only one - unrolled loop instead of two for the large copy case. - -2004-07-30 Richard Henderson - - * sysdeps/alpha/divq.S: Save t3 before it gets clobbered. - * sysdeps/alpha/remq.S: Likewise. - * sysdeps/alpha/div.S, sysdeps/alpha/ldiv.S: Rewrite with the - new division algorithms in divl.S and divq.S respectively. + [BZ #731] + * stdlib/fmtmsg.c (addseverity): Remove new_string variable. + (free_mem): Don't free string. + * stdlib/tst-fmtmsg.c: Include string.h. + (main): Add some more tests. -2004-07-28 GOTO Masanori +2005-01-25 Andreas Schwab - * timezone/asia: Update from tzdata2004b. + [BZ #736] + * timezone/asia: Update from tzdata2005c. * timezone/backward: Likewise. * timezone/europe: Likewise. - * timezone/iso3166.tab: Likewise. * timezone/leapseconds: Likewise. * timezone/northamerica: Likewise. * timezone/southamerica: Likewise. - * timezone/zone.tab: Likewise. - * timezone/private.h: Update from tzcode2004b. + [BZ #736] + * timezone/private.h: Update from tzcode2005c. + * timezone/tzfile.h: Likewise. + * timezone/zdump.c: Likewise. * timezone/zic.c: Likewise. -2004-07-27 Ulrich Drepper - - * nscd/grpcache.c (cache_addgr): If necessary, add entry also - under the name the user provided. - * nscd/pwdcache.c (cache_addpw): Likewise. - -2004-07-26 Roland McGrath - - * sysdeps/posix/waitid.c [WEXITED]: Clear WEXITED bit in OPTIONS for - call to __waitpid. - -2004-07-26 Ulrich Drepper - - * nscd/hstcache.c (cache_addhst): Fix two scenarios which lead to - memory leaks. - - * sysdeps/unix/sysv/linux/ifreq.c (__ifreq): Assign pointer for - new buffer at the right time. - Reported by Jakub Bogusz . - -2004-07-25 Ulrich Drepper - - * inet/Versions [libc, GLIBC_2.3.4]: Add getipv4sourcefilter, - getsourcefilter, setipv4sourcefilter, and setsourcefilter. - * inet/Makefile (routines): Likewise. - * inet/netinet/in.h: Add prototypes for getipv4sourcefilter, - getsourcefilter, setipv4sourcefilter, and setsourcefilter. - * sysdeps/generic/getipv4sourcefilter.c: New file. - * sysdeps/generic/setipv4sourcefilter.c: New file. - * sysdeps/generic/getsourcefilter.c: New file. - * sysdeps/generic/setsourcefilter.c: New file. - -2004-07-17 Steven Munroe - - * sysdeps/powerpc/powerpc64/memcpy.S: Improve instruction scheduling - for POWER4 machines. - -2004-07-21 Jakub Jelinek - - [BZ #274] - * stdlib/strtod_l.c (INTERNAL (__STRTOF)): Fix used >= - BITS_PER_MP_LIMB shifting up. - * stdlib/tst-strtod.c (main): Add new tests. - -2004-07-23 Jakub Jelinek - - [BZ #282] - * libio/iopopen.c (_IO_new_popen): Use _IO_init instead of - _IO_no_init. Remove wd from struct locked_FILE. - (_IO_wproc_jumps): Remove. - Reported by Andrew Josey . - * stdio-common/Makefile (tests): Add tst-popen. - * stdio-common/tst-popen.c: New test. - -2004-07-23 Ulrich Drepper - - * posix/bits/posix1_lim.h: Fix values for _POSIX_CHILD_MAX and - _POSIX_OPEN_MAX. Add _POSIX_HOST_NAME_MAX, _POSIX_SYMLINK_MAX, - _POSIX_SYMLOOP_MAX, and _POSIX_RE_DUP_MAX. - Reported by Andrew Josey. - - * include/features.h: Document _POSIX_C_SOURCE == 200112L. - - * grp/grp.h: Define gid_t if __USE_XOPEN2K is defined. - * pwd/pwd.h: Define uid_t and gid_t if __USE_XOPEN2K is defined. - * io/sys/stat.h: Define dev_t, gid_t, ino_t, mode_t, nlink_t, - off_t, time_t, and uid_t if __USE_XOPEN2K is defined. - * signal/signal.h: Define pid_t if __USE_XOPEN2K is defined. - * posix/unistd.h: Define gid_t, off_t, pid_t, uid_t, and - useconds_t if __USE_XOPEN2K is defined. - * io/utime.h: Define time_t if __USE_XOPEN2K is defined. - * libio/stdio.h: Declare fseeko and ftello if __USE_XOPEN2K is defined. - -2004-07-19 Thorsten Kukuk - - * nis/nss_compat/compat-initgroups.c (getgrent_next_nss): Don't - allocate memory for large temporary variables with alloca. - -2004-07-22 Ulrich Drepper - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Compatibility - code must have version GLIBC_2.0. Patch by Dwayne McConnell. - - * nscd/nscd_getgr_r.c (nscd_getgr_r): Avoid read call with NULL - pointer and zero length. - -2004-07-21 Ulrich Drepper - - * nscd/cache.c (prune_cache): Print correct list when debugging. - -2004-07-21 Jakub Jelinek - - * resolv/res_libc.c (res_init): If RES_INIT is set and - _res.nscount > 0, call __res_nclose and free nsaddrs. - * resolv/Makefile: Add rules to build and run tst-leaks2. - * resolv/tst-leaks2.c: New test. - -2004-07-21 Ulrich Drepper - - * intl/libintl.h: Don't define macros for C++. - Patch by Goto Masanori. - -2004-07-22 GOTO Masanori - - [BZ #276] - * include/arpa/inet.h: Change inet_aton type from in_addr_t to int. - * inet/arpa/inet.h: Likewise. - * resolv/inet_addr.c: Likewise. - -2004-07-21 Alexandre Oliva - - * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Add semtimedop. - -2004-07-20 Roland McGrath - - * configure.in (add_ons): Substitute this. Move $add_ons handling - after AC_CANONICAL_HOST and default setting of $machine et al. - Don't set $subdirs from $add_ons. - Instead, source add-on/configure fragments early on. - (base_machine): If it's already set, don't set it based on $machine. - (libc_config_ok): New variable, set to no. If an add-on fragment sets - it to yes, skip the tuple sanity check as if --enable-hacker-mode. - (sysnames): Try appending add-on names after machine as well. - * config.make.in (add-ons): Set from @add_ons@ instead of @subdirs@. - * Makeconfig ($(common-objpfx)config.status): Also depend on configure - files in $(add_ons) dirs. - - * sysdeps/unix/sysv/linux/bits/in.h (struct ip_mreq): Remove - definition, now in netinet/in.h proper. - -2004-07-20 Alexandre Oliva - - * sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h): - Sort by syscalls. Make sure we get headers such as sgidefs.h from - the build tree before just-installed ones. - - * sysdeps/mips/atomicity.h: Use standard names for ABI macros, - include sgidefs.h where appropriate. - * sysdeps/mips/dl-machine.h: Likewise. - * sysdeps/mips/machine-gmon.h: Likewise. - * sysdeps/mips/bits/setjmp.h: Likewise. - * sysdeps/mips/fpu/bits/mathdef.h: Likewise. - * sysdeps/mips/mips64/__longjmp.c: Likewise. - * sysdeps/mips/mips64/setjmp_aux.c: Likewise. - * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. - * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/ptrace.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. - * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. - * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Likewise. - * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. - * sysdeps/unix/sysv/linux/mips/sys/user.h: Likewise. - * sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h): - Likewise. - * sysdeps/unix/sysv/linux/mips/configure.in (asm-unistd.h): - Likewise. - - * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Update to use - _dl_lookup_symbol_x. - (elf_machine_runtime_link_map): Don't INTUSE _dl_signal_error. - -2004-07-20 Ulrich Drepper - - * inet/netinet/in.h: Define struct ip_mreq and struct - ip_mreq_source. - Define struct group_req and struct group_source_req. - * sysdeps/unix/sysv/linux/bits/in.h: Define IP_UNBLOCK_SOURCE, - IP_BLOCK_SOURCE, IP_ADD_SOURCE_MEMBERSHIP, - IP_DROP_SOURCE_MEMBERSHIP, IP_MSFILTER, MCAST_JOIN_GROUP, - MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE, MCAST_LEAVE_GROUP, - MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP, and - MCAST_MSFILTER. - Define MCAST_INCLUDE and MCAST_EXCLUDE. - - * iconvdata/gconv-modules: Add alias for IBM874 [BZ #244]. - -2004-07-19 Jakub Jelinek - - [BZ #258] - * math/libm-test.inc (max_value, min_value): New variables. - (initialize): Initialize them. - (pow_test): Add a couple of new tests. - * sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Don't generate invalid - exception if |y| >= 1U<<31. - * sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Don't generate invalid - exception if |y| >= 1L<<63. - * sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise. - If y*log2(x) overflows to +-inf, return still +inf/+0 instead of NaN. - * sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise. - -2004-07-18 Ulrich Drepper - - * nscd/pwdcache.c (cache_addpw): Optimize case of unsuccessful - lookup a bit. - * nscd/grpcache.c (cache_addgr): Likewise. - * nscd/hstcache.c (cache_addhst): Likewise. - -2004-07-10 GOTO Masanori - - * sysdeps/s390/s390-32/elf/start.S: Remove symbol _fp_hw. - * sysdeps/s390/s390-64/elf/start.S: Likewise. - -2004-04-16 Andreas Schwab - - * sysdeps/ia64/bits/atomic.h: Cast first argument of - __sync_bool_compare_and_swap_si correct to void*. - -2004-07-17 Ulrich Drepper - - * iconv/iconv_prog.c (print_known_names): Make machine-readable - output even less cluttered. - -2004-07-16 Steven Munroe - - [BZ #269] - * setjmp/Makefile (tests): Add bug269-setjmp. - * setjmp/bug269-setjmp.c: New file. - * sysdeps/powerpc/powerpc64/__longjmp-common.S [SHARED && !IS_IN_rtld]: - Store R2 from jmpbuf in callers TOC save area. - * sysdeps/powerpc/powerpc64/bsd-_setjmp.S [SHARED && !IS_IN_rtld]: - Store R2 in TOC save area. - * sysdeps/powerpc/powerpc64/setjmp-common.S [SHARED && !IS_IN_rtld]: - Copy TOC save area from previous frame as R2 (TOC) in jmpbuf. - -2004-07-16 Jakub Jelinek - - * locale/newlocale.c: Include bits/libc-lock.h. - (__libc_setlocale_lock): Extern decl. - (__newlocale): Use it. - Reported by Ulrich Weigand . - -2004-07-15 Jakub Jelinek - - * sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Remove - static inline __attribute ((always_inline)). Don't define if - NO_CANCELLATION. - (__libc_fcntl): Use INLINE_SYSCALL directly instead of - __fcntl_nocancel. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c (__fcntl_nocancel): - Remove static inline __attribute ((always_inline)). Don't define - if NO_CANCELLATION. - (__libc_fcntl): Use INLINE_SYSCALL directly instead of - __fcntl_nocancel. - * sysdeps/unix/sysv/linux/i386/fcntl.c (__fcntl_nocancel): Define to - __libc_fcntl if NO_CANCELLATION and __ASSUME_FCNTL64 == 0. - Don't define at all if NO_CANCELLATION and __ASSUME_FCNTL64 > 0. - (__libc_fcntl): Don't define if __fcntl_nocancel is a macro. - - [BZ #262] - * sysdeps/i386/elf/start.S (_start): Use @GOT instead of @GOTOFF - for main. - * elf/Makefile: Add rules to build and run tst-pie1. - * elf/tst-pie1.c: New test. - * elf/tst-piemod1.c: New file. - -2004-07-14 Jakub Jelinek - - [BZ #266] - * manual/string.texi (l64a): Note that the static buffer is 7 bytes - long. Rewrite example code so that it takes into account l64a output - shorter than 6 characters. - Reported by Julian Graham . - -2004-07-14 Kaz Kojima - - * sysdeps/sh/dl-machine.h: Don't reset _dl_starting_up here. - (elf_machine_rela_relative): Remove unused valiable. - -2004-07-12 Paul Eggert - - [BZ #263] - * sysdeps/unix/sysv/linux/getloadavg.c (getloadavg): Don't store - outside the buffer if the read returns 0. __strtod_l can't set - endp to NULL, so remove a test for that case. - -2004-07-12 Roland McGrath - - * manual/signal.texi (Interrupted Primitives): Make clear that - TEMP_FAILURE_RETRY evaluates its expression as long int and compares - it to -1 to define "failure". - -2004-07-10 Ulrich Drepper - - * elf/ldconfig.c: Define PROCINFO_CLASS as static before including - ldsodefs.h. - * sysdeps/generic/ldsodefs.h: Only define PROCINFO_CLASS if it is not - already defined. - * sysdeps/i386/dl-procinfo.c: Define PROCINFO_CALLS only if not - already defined. - - * elf/rtld.c (print_statistics): Mark with noinline attribute. - * sysdeps/i386/dl-machine.h (elf_machine_rel): Mark with always_inline - attribute. - (elf_machine_rel_relative): Likewise. - - * include/string.h: Add libc_hidden_proto for __strtok_r and - __strsep_g. - * sysdeps/generic/strsep.c: Add libc_hidden_def. - * sysdeps/generic/strtok_r.c: Likewise. - * sysdeps/i386/strtok_r.S: Add alias for internal symbol. - * sysdeps/i386/i686/strtok_r.S: Likewise. - * sysdeps/x86_64/strtok_r.S: Likewise. - -2004-07-09 Alexandre Oliva - - * inet/getnetgrent_r.c (internal_setnetgrent): Make it hidden - instead of internal-linkage, such that we can alias to it. - (internal_endnetgrent, internal_getnetgrent_r): Likewise. - -2004-07-09 Ulrich Drepper - - * sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Move attribute - to the front for gcc 3.5+. - * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c: Likewise. - * include/fcntl.h: Don't declare __fcntl_nocancel here if - NO_CANCELLATION is defined. - -2004-07-07 Jakub Jelinek - - * elf/dl-fini.c (_dl_fini): Add nloaded variable, load - GL(dl_nloaded) into it while still in critical section. - -2004-07-06 Thorsten Kukuk - - * nss/getent.c (print_group, print_passwd): Use %lu format for - `unsigned long int' values. - - * sysdeps/unix/sysv/linux/i386/fcntl.c (__fcntl_nocancel): Fix syntax - error typos in goto statements. - -2004-07-07 Roland McGrath - - * Makefile (dist-separate): New variable. - (glibc-%.tar rule): Make separate tar files for add-ons listed there. - Depend on their configure files. - (dist-do-separate-dirs): New canned sequence to do that. - (dist-separate-libidn, dist-separate-linuxthreads): New variables. - (dist): Depend on add-on tar files based on $(dist-separate). - (dist-version): New variable, default to $(version). - (tag-for-dist, dist): Use that in place of $(version) in deps. - -2004-07-07 Ulrich Drepper - - * elf/dl-fini.c (_dl_fini): Move the unlock of the ld.so lock - before the loop running the destructors. - -2004-05-18 Andreas Schwab - - * elf/dl-load.c (_dl_map_object_from_fd): Use the end address of - the first segment for mprotect, not l_text_end. - -2004-07-05 Ulrich Drepper - - * elf/dl-profile.c (_dl_start_profile): Compact error handling. - Remove hashfraction variable. Make kcount and kcountsize local - variables. - - * elf/dl-init.c: Don't define and use _dl_starting_up if - HAVE_INLINED_SYSCALLS is defined and the variable is not used. - * elf/dl-support.c: Likewise. - * elf/rtld.c: Likewise. - * elf/dl-misc.c (_dl_debug_vdprintf): Use writev syscall directly - if HAVE_INLINED_SYSCALLS is defined. - * sysdeps/powerpc/powerpc64/dl-machine.h: Don't reset _dl_starting_up - here. - * sysdeps/powerpc/powerpc32/dl-start.S: Likewise. - * sysdeps/unix/sysv/linux/configure.in: Define HAVE_INLINED_SYSCALLS. - * config.h.in: Add entry for HAVE_INLINED_SYSCALLS. - - * sysdeps/posix/profil.c: If compiled for ld.so, omit code which - is needed to stop profiling. - * elf/dl-open.c (dl_open_worker): If a newly opened object is to be - profile make sure it cannot be unloaded. - - * sysdeps/unix/sysv/linux/dl-origin.c: Inline readlink syscall. +2005-01-24 Ulrich Drepper - * sysdeps/unix/sysv/linux/fcntl.c: If compiled without cancellation - support, make sure the helper function is inlined. - * sysdeps/unix/sysv/linux/pread.c: Likewise. - * sysdeps/unix/sysv/linux/pwrite.c: Likewise. - * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c: Likewise. - -2004-07-05 Jakub Jelinek - - * include/string.h (ffs): Add libc_hidden_builtin_proto. - * sysdeps/rs6000/ffs.c (ffs): Add libc_hidden_builtin_def. - * sysdeps/alpha/alphaev67/ffs.S (ffs): Likewise. - * sysdeps/alpha/ffs.S (ffs): Likewise. - * sysdeps/s390/ffs.c (ffs): Likewise. - * sysdeps/powerpc/ffs.c (ffs): Likewise. - * sysdeps/i386/ffs.c (ffs): Likewise. - * sysdeps/i386/i686/ffs.c (ffs): Likewise. - * sysdeps/m68k/ffs.c (ffs): Likewise. - * sysdeps/generic/ffs.c (ffs): Likewise. - * sysdeps/m88k/ffs.c (ffs): Likewise. - * sysdeps/am29k/ffs.c (ffs): Likewise. - * sysdeps/i960/ffs.c (ffs): Likewise. - * sysdeps/x86_64/ffs.c (ffs): Likewise. - - * Makerules (check-abi): Use diff -p -U 0 instead of diff -pu0. - - * sysdeps/powerpc/novmx-longjmp.c (__libc_longjmp, - __libc_siglongjmp): Remove symbol_version. - * sysdeps/powerpc/longjmp.c (__libc_longjmp, __libc_siglongjmp): - Export @@GLIBC_PRIVATE, not @@GLIBC_2.3.4. - * sysdeps/powerpc/sigjmp.c (__sigjmp_save): Use strong_alias - unconditionally. - * sysdeps/powerpc/novmx-sigjmp.c (__sigjmp_save): Remove. - * sysdeps/powerpc/powerpc32/__longjmp.S (__longjmp): Use - strong_alias instead of default_symbol_version, remove - symbol_version. - * sysdeps/powerpc/powerpc64/__longjmp.S (__longjmp): Likewise. - * sysdeps/powerpc/powerpc32/bsd-setjmp.S (__novmx__setjmp): Change - into strong_alias to __novmxsetjmp. - (__vmx__setjmp): Similarly with __vmxsetjmp. - (__setjmp): Make it strong_alias to __vmx__setjmp, remove - default_symbol_version and symbol_version. - * sysdeps/powerpc/powerpc64/bsd-setjmp.S (__novmx__setjmp): Change - into strong_alias to __novmxsetjmp. - (__vmx__setjmp): Similarly with __vmxsetjmp. - (__setjmp): Make it strong_alias to __vmx__setjmp, remove - default_symbol_version and symbol_version. - - * nscd/nscd_getgr_r.c: Include stdio-common/_itoa.h. - -2004-07-05 Ulrich Drepper - - * elf/rtld.c (dl_main): Mark dyn_temp with attribute_relro. - -2004-07-04 Matthew Reppert - - * sysdeps/unix/sysv/linux/i386/glob64.c (glob64): Use libc_hidden_ver - instead of libc_hidden_def. - -2004-07-01 Roland McGrath - - * aclocal.m4: Add provide for AC_CONFIG_AUX_DIR_DEFAULT. - - * Makeconfig ($(common-objpfx)shlib-versions.v.i): Move top-level - $(..)shlib-versions file to last in deps list. This lets add-ons give - more-specific matches that override defaults in the top-level file. - - * sysdeps/unix/sysv/linux/configure.in: If arch_minimum_kernel was - already set, don't set it or libc_cv_gcc_unwind_find_fde. - * sysdeps/unix/sysv/linux/configure: Regenerated. - -2004-07-01 Martin Schwidefsky - - * sysdeps/s390/fpu/bits/mathinline.h [__LIBC_INTERNAL_MATH_INLINES] - (__ieee754_sqrt): Define as __MATH_INLINE using sqdbr instruction. - (__ieee754_sqrtf): Define as __MATH_INLINE using sqebr instruction. - * sysdeps/s390/fpu/e_sqrt.c: New file. - * sysdeps/s390/fpu/e_sqrtf.c: New file. - * sysdeps/s390/Implies: New file. - * sysdeps/s390/s390-32/Implies: Remove ieee754, move - ieee754/dbl-64 and ieee754/flt-32 to s390/Implies. - * sysdeps/s390/s390-64/Implies: Likewise. - -2004-06-30 Jakub Jelinek - - * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Include tls.h. - * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. - - * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (thread_start): - DO_CALL (exit, 1) instead of branching to _exit. - * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (thread_start): - Likewise. - - * sysdeps/s390/fpu/bits/mathinline.h: New file. - - * include/glob.h (glob64): Add libc_hidden_proto. - * sysdeps/generic/glob64.c (glob64): Add libc_hidden_def. - * sysdeps/gnu/glob64.c (glob64): Likewise. - * sysdeps/unix/sysv/linux/i386/glob64.c (glob64): Likewise. - -2004-06-11 Jakub Jelinek - - * sysdeps/i386/fpu/libm-test-ulps: Update for GCC 3.4. - * sysdeps/s390/fpu/libm-test-ulps: Likewise. - -2004-06-11 Dwayne Grant McConnell - - * sysdeps/powerpc/fpu/s_lround.c: Removed. - * sysdeps/powerpc/fpu/s_lroundf.c: Removed. - * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_floor.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_lrint.c: Removed. - * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_lroundf.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_lround.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_rint.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_round.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: New file. - * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: New file. - -2004-06-30 Ulrich Drepper - - * include/net/if.h: Handle if_nameindex and if_freenameindex with - libc_proto_hidden. - * sysdeps/unix/sysv/linux/netlinkaccess.h: New file. - * sysdeps/unix/sysv/linux/ifaddrs.c: Export netlink handling functions. - * sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Implement using - netlink if possible. Fall back on ioctl method if necessary. - * sysdeps/unix/sysv/linux/Dist: Add netlinkaccess.h. - - * include/unistd.h: Declare __truncate. - * sysdeps/generic/truncate.c: Also define __truncate. - * sysdeps/mach/hurd/truncate.c: Likewise. - * sysdeps/unix/common/syscalls.list: Likewise. - * sysdeps/unix/sysv/linux/truncate64.c: Use __truncate, not truncate. - -2004-06-29 Ulrich Drepper - - * stdio-common/printf-parsemb.c (__parse_one_specmb): Initialize - info.extra. Patch by Marcus Meissner. - -2004-06-29 Kaz Kojima - - * sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER): - Fix branch offset for a PLT entry. - -2004-06-20 Jim Meyering - - * malloc/obstack.h (obstack_base): Cast to `void *', to align with - documentation. - -2004-06-28 Ulrich Drepper - - * inet/bug-if1.c (do_test): Simply use 0 as invalid index. - Workaround for [BZ #232]. - - * sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Use extend_alloca. - -2004-06-28 GOTO Masanori - - * iconv/gconv_simple.c: Use get16/put16 for user given buffer - in ucs2/ucs2reverse when unaligned memory access is attempted. - * iconv/tst-iconv5.c: New file. - * iconv/Makefile (tests): Add tst-iconv5. - -2004-06-28 Jakub Jelinek - - * inet/bug-if1.c: Include . - -2004-06-19 Roland McGrath - - * sysdeps/posix/waitid.c (do_waitid) [DO_WAITID]: Define function - under this macro name instead. - [NO_DO_WAITID]: Don't define it at all. - (do_waitid) [WNOWAIT, WEXITED]: If these POSIX.1 waitid flag bits are - defined, then return ENOTSUP for combinations of selection bits other - than WEXITED and WEXITED|WSTOPPED, which this version cannot support. - - * posix/tst-waitid.c: New file. - * posix/Makefile (tests): Add it. - -2004-06-28 Jakub Jelinek - - * sysdeps/unix/alpha/sysdep.h (inline_syscall6): Fix a typo. - - [BZ #231] - * sysdeps/unix/alpha/sysdep.S (__syscall_error): Avoid !samegp - relocation in librt.so. - - [BZ #230] - * sysdeps/alpha/dl-machine.h (_dl_start_user): Use ldah/ldl to load - _dl_skip_args. Patch by Jakub Bogusz . - -2004-06-27 Ulrich Drepper - - * elf/ldconfig.c (add_dir): Take chroot into account. - Based on changes by HJ Lu and Hideki Iwamoto. - - * nscd/connections.c (invalidate_cache): If the host cache has to - be invalidated, re-read resolv.conf. - - * resolv/resolv.h (RES_NOIP6DOTINT): Define. - * resolv/res_init.c (res_setoptions): Handle no-ip6-dotint option. - * resolv/gethnamaddr.c (gethostbyaddr): Don't lookup with .ip6.int - if RES_NOIP6DOTINT flag is set. - * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. - -2004-06-25 Jakub Jelinek - - * sysdeps/unix/sysv/linux/powerpc/fcntl.c: Move to... - * sysdeps/unix/sysv/linux/powerpc/powerpc32/fcntl.c: ... here. - * sysdeps/unix/sysv/linux/powerpc/lockf64.c: Move to... - * sysdeps/unix/sysv/linux/powerpc/powerpc32/lockf64.c: ... here. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c: New file. - - * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (F_GETLK, F_SETLK, - F_SETLKW): Fix values for -m32 -D_FILE_OFFSET_BITS=64. - -2004-06-21 Jakub Jelinek - - [BZ #231] - * sysdeps/unix/alpha/Makefile: New file. - * sysdeps/unix/alpha/rt-sysdep.S: New file. - Reported by Jakub Bogusz . - -2004-06-18 Ulrich Drepper - - * sysdeps/posix/getaddrinfo.c (gaih_inet): For AI_CANONNAME, - determine the canonical name only for the first returned entry. - - * inet/bug-if1.c: New file. - * inet/Makefile (tests): Add bug-if1. - -2004-06-18 Roland McGrath - - * Makerules (compile-mkdep-flags): Add -MT $@. - - * Makefile (dist, tag-for-dist): New targets. - (files-for-dist, tag-of-stem): New variables. - (glibc-%.tar glibc-linuxthreads-%.tar): New pattern rule. - Make tar files using cvs export. - (%.bz2, %.gz, tag-%): New pattern rules. - (distribute): Variable removed. - (+subdir_targets): Remove distinfo targets. - (echo_subdirs, echo-distinfo, parent_echo-distinfo): Targets removed. - (rpm/%): Pattern rule removed. - * rpm/Makefile, rpm/rpmrc, rpm/template: Ancient cruft files removed. - * Rules (subdir_echo-headers, subdir_echo-distinfo, subdir_dist): - Targets removed. - * Makerules (dist, subdir_distinfo): Targets removed. - ($(objpfx)distinfo): Depend on $(distribute). - * Make-dist: File removed. - - * NEWS: Fix a typo. Update bug-reporting instructions. - -2004-06-17 Thorsten Kukuk - - * sysdeps/unix/sysv/linux/sched_setaffinity.c - (__sched_setaffinity_new): Set errno to EINVAL and return -1 if - cpuset is wrongly set. - -2004-06-15 Steven Munroe - - * sysdeps/powerpc/powerpc64/memcpy.S: Improve instruction scheduling - for POWER4 machines. - -2004-06-14 Jakub Jelinek - - [BZ #218] - * sunrpc/pmap_prot2.c (xdr_pmaplist): When freeing, remember pml_next - in a local variable, point rp to that local variable afterwards. - -2004-06-11 Jakub Jelinek - - * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Handle special - cases properly. - -2004-06-17 Ulrich Drepper - - * sysdeps/unix/sysv/linux/if_index.c (if_indextoname): Correct - error value for unknown interface. [BZ #198] - -2004-06-13 Jakub Jelinek - - * sysdeps/i386/bits/string.h (memcpy): Add () around arguments. - (memchr, __memrchr, strlen, strcmp, strncmp, __strchr_g, __strchr_c, - __strchrnul_g, __strchrnul_c, strspn, strcspn, strpbrk): Add memory - the asm uses as its input, either of size __n where __n is known or - 0xfffffff. - (strstr): Add "memory" clobber. - -2004-06-14 Jakub Jelinek - - [BZ #219] - * nss/nsswitch.c (free_mem): Don't try to close a library handle - if the handle is invalid. Patch by David Kimdon . - -2004-06-11 Dmitry V. Levin - - [BZ #217] - * debug/xtrace.sh: Fix typo in error diagnostics. - -2004-06-14 Andreas Schwab - - * stdio-common/psignal.c (psignal): Don't use BUF when asprintf - failed. - -2004-06-15 Steven Munroe - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Fix pasto - that clobbers r19. Fix pasto that overflowed sigcontext.v_reserve. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Fix pasto - that clobbers r19. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Fix pasto - that clobbers r19. Fix pasto that overflowed sigcontext.v_reserve. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: - Fix setting of sigcontext.v_regs. Fix pasto that clobbers r19. - Fix pasto that overflowed sigcontext.v_reserve. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: - Fix pasto that clobbers r19. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Fix setting - of sigcontext.v_regs. Fix pasto that clobbers r19. Fix pasto that - overflowed sigcontext.v_reserve. - -2004-05-04 H.J. Lu - - [BZ #150] - * sysdeps/generic/strtol_l.c (DEF): Use ".gnu.linkonce.r." - instead of ".gnu.linkonce.ro." as the prefix for linkonce - read-only section name. - -2004-06-14 Richard Henderson - - * sysdeps/alpha/div_libc.h (_ITOFS): Use "sp" not "$sp". - (_ITOFT, _FTOIT, _ITOFT2): Likewise. - -2004-06-08 Jakub Jelinek - - * sysdeps/s390/s390-32/backtrace.c (init): Guard with #ifdef SHARED. - (unwind_backtrace, unwind_getip): Define #ifndef SHARED. - (__backtrace): Don't call init #ifndef SHARED. - * sysdeps/s390/s390-64/backtrace.c (init): Guard with #ifdef SHARED. - (unwind_backtrace, unwind_getip): Define #ifndef SHARED. - (__backtrace): Don't call init #ifndef SHARED. - * sysdeps/ia64/backtrace.c (init): Guard with #ifdef SHARED. - (unwind_backtrace, unwind_getip): Define #ifndef SHARED. - (__backtrace): Don't call init #ifndef SHARED. - -2004-06-11 Roland McGrath - - * sysdeps/arm/strlen.S [__ARMEB__]: Compute correctly for big-endian. - From Krzysztof Halasa . - -2004-06-10 Jakub Jelinek - - * elf/tls-macros.h [__s390x__] (TLS_LD, TLS_GD): Clobber also r14. - -2004-06-08 Jakub Jelinek - - [BZ #199] - * crypt/md5-crypt.c (__md5_crypt): Only update buflen if realloc - succeeds. Reported by Miles Ohlrich . - - * elf/chroot_canon.c (chroot_canon): Avoid segfault if first malloc - fails. Avoid memory leak if realloc fails. - -2004-06-09 Jakub Jelinek - - * sysdeps/generic/setenv.c (setenv): Return -1/EINVAL if name is - NULL, "" or contains '=' character in it. Reported by - Michael T Kerrisk . - * stdlib/tst-environ.c: Include errno.h. - (main): Add tests for these arguments to setenv/unsetenv. - -2004-06-07 Roland McGrath - - * NEWS: Update bug reporting instructions. Fix some typos. - -2004-06-05 Ulrich Drepper - - * stdio-common/_itoa.h: Don't expand _itoa inline for libc. - * stdio-common/_itoa.c: Add _itoa implementation. - - * nscd/nscd_gethst_r.c (__nscd_open_socket): Change implementation - to also send request. Add parameter to allow this. - Change callers. - * nscd/nscd_getgr_r.c: Change __nscd_open_socket caller. - * nscd/nscd_getpw_r.c: Likewise. - * nscd/nscd-client.h: Change __nscd_open_socket prototype. - -2004-06-05 Andreas Jaeger - - * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): - Handle more than 6 args correctly. Based on a patch by Masahide - Washizawa . - -2004-06-04 Ulrich Drepper - - * nscd/nscd_gethst_r.c (nscd_gethst_r): Use __nss_not_use_nscd_hosts - in all places, not __nss_not_use_nscd_group. - Reported by Philippe Gregoire. - -2004-06-03 Ulrich Drepper - - * sysdeps/i386/i486/bits/atomic.h: Optimize a bit. - -2004-05-07 Dmitry V. Levin - - * argp/argp-help.c (__argp_error, __argp_failure): Check result - of __asprintf call and don't use string if it failed. - * stdio-common/psignal.c (psignal): Likewise. - * locale/programs/localedef.c (more_help): Likewise. - * resolv/res_hconf.c (arg_service_list, arg_trimdomain_list, - arg_bool, parse_line): Check result of __asprintf calls and - don't use string if they failed. - * sunrpc/svc_simple.c (registerrpc, universal): Likewise. - * elf/ldconfig.c (parse_conf_include): Check result of __asprintf - call and exit if it failed. - -2004-05-10 Jakub Jelinek - - * sysdeps/posix/sysconf.c (__sysconf) : Return _POSIX_* value instead of 1. - * sysdeps/unix/sysv/linux/sysconf.c (__sysconf) - : Return _POSIX_VERSION instead of 1. - -2004-05-07 Jeroen Dekkers - - * sysdeps/mach/hurd/i386/Makefile (CFLAGS-init-first.c): Add - -momit-leaf-frame-pointer. - - * inet/test-ifaddrs.c (addr_string): Surround AF_PACKET case with - #ifdef AF_PACKET. - - * sysdeps/mach/hurd/getcwd.c - (_hurd_canonicalize_directory_name_intern): Only realloc when - size is <= 0. - - * sysdeps/mach/hurd/mmap.c (__mmap): Fail when addr or offset - isn't page aligned. - - * sysdeps/mach/hurd/spawni.c (EXPAND_DTABLE): Set dtablesize to - new size. - - * sysdeps/mach/hurd/Versions (GLIBC_PRIVATE): Add __libc_read, - __libc_write and __libc_lseek64. - -2004-05-29 Roland McGrath - - * elf/Makefile (shared-only-routines): Add dl-caller. - -2004-05-28 Ulrich Drepper - - * sysdeps/powerpc/configure.in: New file. - -2004-05-28 Steven Munroe - - * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Add .machine - "altivec" to enable VMX instructions. - * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise. - * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. - -2004-05-27 Jakub Jelinek - - * sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Define using - __builtin_expm1l for GCC 3.5+. - (__expl): Define using __builtin_expl for GCC 3.4+. - (exp, expf, expl): Don't define for GCC 3.4+. - (tan, tanf, tanl): Don't define for GCC 3.5+. - (__atan2l): Define using __builtin_atan2l for GCC 3.4+. - (atan2, atan2f, atan2l): Don't define for GCC 3.4+ or !__FAST_MATH__. - (fmod, fmodf, fmodl): Don't define for GCC 3.5+ or !__FAST_MATH__. - (fabsf, fabsl): Only provide if __USE_MISC or __USE_ISOC99. - (sin, sinf, sinl, cos, cosf, cosl, log, logf, logl): Don't define - for GCC 3.4+. - (log10, log10f, log10l, asin, asinf, asinl, acos, acosf, acosl): - Don't define for GCC 3.5+. - (atan, atanf, atanl): Don't define for GCC 3.4+ or !__FAST_MATH__. - (log1p, log1pf, log1pl, logb, logbf, logbl, log2, log2f, log2l): Don't - define for GCC 3.5+. - (drem, dremf, dreml): Don't define for GCC 3.5+ or !__FAST_MATH__. - * sysdeps/sparc/fpu/bits/mathinline.h (sqrt, sqrtf, sqrtl): Don't - define for GCC 3.2+. - -2004-05-27 Jakub Jelinek - - * string/bits/string2.h (__bzero): Define even for GCC 3.0+. - * sysdeps/alpha/stpcpy.S (stpcpy): Add libc_hidden_builtin_def. - * sysdeps/alpha/alphaev67/stpcpy.S (stpcpy): Likewise. - * sysdeps/powerpc/powerpc32/stpcpy.S (stpcpy): Likewise. - * sysdeps/powerpc/powerpc64/stpcpy.S (stpcpy): Likewise. - * sysdeps/sparc/sparc32/stpcpy.S (stpcpy): Likewise. - * sysdeps/sparc/sparc64/stpcpy.S (stpcpy): Likewise. - * sysdeps/i386/stpcpy.S (stpcpy): Likewise. - * sysdeps/i386/i586/stpcpy.S (stpcpy): Likewise. - * sysdeps/generic/stpcpy.c (stpcpy): Likewise. - * sysdeps/x86_64/stpcpy.S (stpcpy): Likewise. - * sysdeps/i386/i586/memcpy.S (memcpy): Remove - libc_hidden_builtin_def if MEMPCPY_P. - * sysdeps/x86_64/memcpy.S (memcpy): Likewise. - * sysdeps/i386/i686/mempcpy.S (mempcpy): Add libc_hidden_builtin_def. - * sysdeps/i386/i586/mempcpy.S (mempcpy): Likewise. - * sysdeps/generic/mempcpy.c (mempcpy): Likewise. - * sysdeps/x86_64/mempcpy.S (mempcpy): Likewise. - -2004-05-26 Roland McGrath - - * sysdeps/generic/bits/in.h - (IMPLINK_IP, IMPLINK_LOWEXPER, IMPLINK_HIGHEXPER): Macros removed. - These are long obsolete in BSD systems where they originated. - * conform/data/netinet/in.h-data: Remove `allow IMPLINK_*' - -2004-05-26 Jakub Jelinek - - * include/string.h (mempcpy, stpcpy): Add libc_hidden_builtin_proto. - * string/bits/string2.h (memset): Disable macro for GCC 3.0+. - (__mempcpy): Use __builtin_mempcpy for GCC 3.4+. - (strchr): For GCC 3.2+, only use __rawmemchr if second argument is - constant '\0' and first argument is not constant. - (__stpcpy): Use __builtin_stpcpy for GCC 3.4+. - (strncpy): Remove #ifdef _USE_STRING_ARCH_mempcpy variant. - For GCC 3.2+ use __builtin_strncpy. - (strncat): For GCC 3.2+ use __builtin_strncat. - (strcmp): For GCC 3.2+ use __builtin_strcmp if both arguments are - constant. - (strcspn, strspn, strpbrk): For GCC 3.2+, use builtin function - if both arguments are constant. - -2004-05-26 Ulrich Drepper - - * nss/nss_files/files-hosts.c: Fix condition for looking up IPv4 - mapped addresses in gethostbyaddr. - -2004-05-25 Ulrich Drepper - - * nss/digits_dots.c (__nss_hostname_digits_dots): Remove typep and - flags parameter, convert afp to simple int parameter. Adjust code. - typep was never != NULL and flags therefore also unused. *afp is - never modified. - * nss/nsswitch.h: Adjust __nss_hostname_digits_dots prototype. - * nss/getXXbyYY.c: Remove HAVE_TYPE handling. Adjust af parameter - handling for __nss_hostname_digits_dots calls. - * nss/getXXbyYY_r.c: Likewise. - - * elf/dl-load.c (_dl_map_object_from_fd): Map DSOs with MAP_DENYWRITE. - -2004-05-25 Steven Munroe - - * sysdeps/powerpc/fpu/Makefile: Make ld.so a dependency of libm.so. - * sysdeps/powerpc/fpu/bits/mathinline.h [__LIBC_INERNAL_MATH_INLINES] - (__ieee754_sqrt): Define as __MATH_INLINE using fsqrt instruction. - (__ieee754_sqrtf): Define as __MATH_INLINE using fsqrts instruction. - * sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Moved - implementation from w_sqrt.c. - * sysdeps/powerpc/fpu/e_sqrtf.c (__slow_ieee754_sqrtf): Moved - implementation from w_sqrtf.c. - * sysdeps/powerpc/fpu/w_sqrt.c (__sqrt): Wrapper implementation - using inline __ieee754_sqrt(). - * sysdeps/powerpc/fpu/w_sqrtf.c (__sqrtf): Wrapper implementation - using inline __ieee754_sqrtf(). - * sysdeps/powerpc/powerpc32/sysdep.h [__ASSEMBLER__]: Include - independent of __ASSEMBLER__. - * sysdeps/powerpc/sysdep.h [__ASSEMBLER__] (PPC_FEATURE_*): Define - PPC_FEATURE_* independent of __ASSEMBLER__. - -2004-05-25 Jakub Jelinek - - * sysdeps/pthread/aio_notify.c: Use <> instead of "" for aio_misc.h - include. - (aio_start_notify_thread): Define if not defined. - (notify_func_wrapper): Use it. - * sysdeps/pthread/aio_misc.c: Use <> instead of "" for aio_misc.h - include. - (aio_create_helper_thread): Define if not defined. - (__aio_create_helper_thread): New function. - (__aio_enqueue_request): Use aio_create_helper_thread. - - * nis/ypclnt.c (ypall_data, ypall_foreach): Remove. - (struct ypresp_all_data): New type. - (__xdr_ypresp_all): Change second argument to - struct ypresp_all_data *. Replace ypall_foreach and - ypall_data with objp->foreach and objp->data. - (yp_all): Remove status variable, add data. Replace - all uses of status with data.status. Initialize data.foreach - and data.data instead of ypall_foreach and ypall_data. - -2004-05-24 Jakub Jelinek - - * elf/dl-lookup.c (add_dependency): Set DF_1_NODELETE bit - in l_flags_1, not in l_flags. - -2004-04-10 Robert Millan - - * sysdeps/unix/sysv/linux/bits/in.h: Cosmetic fixes to get in sync - with sysdeps/generic/bits/in.h. - -2004-05-25 Roland McGrath - - * sysdeps/generic/unwind-dw2-fde-glibc.c: Change copyright terms from - GCC GPL to standard glibc LGPL. - -2004-05-24 Ulrich Drepper - - * manual/string.texi (Copying and Concatenation): Fixed second - concat example. - Reported by Fabian Pietsch . - -2004-05-23 Ulrich Drepper - - * malloc/obstack.c: Don't allow linking with _obstack. - -2004-05-23 Andreas Schwab - - * sysdeps/m68k/m68020/bits/atomic.h: Use "+m" constraint instead - of separate "m" constraints. - -2004-05-15 Chris Demetriou - - * sysdeps/mips/dl-machine.h (ELF_DL_FRAME_SIZE) - (ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS): For the N32 - and 64 ABIs, save and restore regs $10 and $11 (a6 and a7). - -2004-05-20 Paul Eggert - - * malloc/obstack.c (_obstack) [!defined _LIBC]: Remove; not used. - Add comment explaining why libc still defines it. - -2004-05-19 Paul Eggert - - * malloc/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast, - obstack_alignment_mask, obstack_alloc, obstack_base, - obstack_blank, obstack_blank_fast, obstack_chunk_size, - obstack_copy, obstack_copy0, obstack_finish, obstack_grow, - obstack_grow0, obstack_init, obstack_int_grow, - obstack_int_grow_fast, obstack_make_room, obstack_memory_used, - obstack_next_free, obstack_object_size, obstack_ptr_grow, - obstack_ptr_grow_fast, obstack_room): Remove declarations of - nonexistent functions. - -2004-05-18 Steven Munroe - - * sysdeps/powerpc/powerpc64/sysdep.h [__ASSEMBLER__]: Include - independent of __ASSEMBLER__. - [PIC]: Redundent for powerpc64, removed. - (ENTRY): Generate size and alignment for opd entry. - (EALIGN): Generate size and alignment for opd entry. - (END): Use DOT_LABEL in ASM_SIZE_DIRECTIVE. - (END_GEN_TB): Use DOT_LABEL in ASM_SIZE_DIRECTIVE. - -2004-05-19 Ulrich Drepper - - * misc/regexp.h: Say the functions have been withdrawn. - - * wcsmbs/tst-wcpncpy.c: Add more tests. - -2004-05-18 Roland McGrath - - * sysdeps/generic/unwind.h: Change copyright terms from GCC GPL to - standard glibc LGPL. - * sysdeps/generic/unwind-dw2.c: Likewise. - * sysdeps/generic/unwind-dw2-fde.c: Likewise. - * sysdeps/generic/unwind-dw2-fde.h: Likewise. - * sysdeps/generic/unwind-pe.h: Likewise. - -2004-05-15 Petter Reinholdtsen - - * locale/iso-3166.def: Remove YUGOSLAVIA and insert "SERBIA AND - MONTENEGRO" which have taken over the code 819. Patch from - Danilo Segan. [BZ #40] - -2004-05-15 Jakub Jelinek - - * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h - (SYSCALL_ERROR_HANDLER): Rename __sparc.get_pic.l7 to - __sparc_get_pic_l7. - -2004-05-15 Joseph S. Myers - - * catgets/gencat.c: Update bug reporting instructions. + [BZ #671] + * misc/syslog.c: Moved to... + * sysdeps/generic/syslog.c: ...here. + [NO_SIGIPE]: Don't install SIGPIPE handler. + * sysdeps/unix/sysv/linux/syslog.c: New file. + * sysdeps/unix/sysv/linux/kernel-features.h: Define + __ASSUME_MSG_NOSIGNAL. + +2005-01-22 Ulrich Drepper + + * posix/Makefile: Use CFLAGS-*.os instead of CFLAGS-*.c for frame + pointer option. + * stdlib/Makefile (CFLAGS-system.os): Use this instead of + CFLAGS-system.c for frame pointer option. + +2005-01-21 Jakub Jelinek + + [BZ #735] + * elf/Makefile: Add rules to build and run tst-align2. + * elf/tst-align2.c: New test. + * elf/tst-alignmod2.c: New file. + * sysdeps/powerpc/tst-stack-align.h: New file. + * sysdeps/i386/dl-machine.h (RTLD_START): Align stack and clear frame + pointer before calling _dl_init. + * sysdeps/x86_64/dl-machine.h (RTLD_START): Likewise. + +2005-01-20 Ulrich Drepper + + * posix/execl.c: Do not allocate potentially large buffers on the + stack. + * posix/execle.c: Likewise. + * posix/execlp.c: Likewise. + * posix/execvp.c: Likewise. + (script_execute): Removed. + (allocate_scripts_argv): New function. Called at most once to + allocate memory, not every time a script is run. Adjust caller. + + * sysdeps/generic/wordexp.c (exec_comm): Add a few + TEMP_FAILURE_RETRY. Reorganize code to avoid multiple calls to + exec_comm_child. + (exec_comm_child): Can now be inlined. + + * posix/Makefile: Add -fomit-frame-pointer for a few more files. + * stdlib/Makefile: Likewise. + +2005-01-19 Roland McGrath + + [BZ #681] + * sunrpc/openchild.c (_openchild): Use NULL instead of 0 for trailing + argument to execlp. + Reported by Marcus Meissner . + +2005-01-19 Jakub Jelinek + + * hurd/sigunwind.c (_hurdsig_longjmp_from_handler): Fix a typo + in assert. + * iconv/strtab.c (strtabfinalize): Likewise. + + [BZ #730] + * libio/iofopncook.c (_IO_cookie_seekoff): Add prototype. + +2005-01-17 Roland McGrath + + [BZ #745] + * nscd/Makefile (LDLIBS-nscd): New variable. + ($(objpfx)nscd): Use that instead of selinux-LIBS. + + [BZ #745] + * Makeconfig (link-extra-libs): Define just as $(LDLIBS-$(@F)). + (link-extra-libs-static): Define to $(link-extra-libs). + (link-extra-libs-bounded): Likewise. + +2005-01-16 GOTO Masanori + + [BZ #734] + * sysdeps/unix/rewinddir.c: Reset filepos. + * dirent/tst-seekdir.c: Check telldir value after calling rewinddir. + +2005-01-14 Ulrich Drepper + + [BZ #731] + * stdlib/fmtmsg.c (internal_addseverity): Remove incorrect free call. + * stdlib/tst-fmtmsg.c (main): Add another addseverity test. + +2005-01-12 Ulrich Drepper + + [BZ #728] + * posix/getconf.c: Update copyright year. + * nss/getent.c: Likewise. + * nscd/nscd_nischeck.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * iconv/iconv_prog.c: Likewise. + * elf/ldconfig.c: Likewise. + * catgets/gencat.c: Likewise. * csu/version.c: Likewise. - * debug/catchsegv.sh: Likewise. - * debug/pcprofiledump.c: Likewise. - * debug/xtrace.sh: Likewise. * elf/ldd.bash.in: Likewise. - * iconv/iconv_prog.c: Likewise. - * iconv/iconvconfig.c: Likewise. + * elf/sprof.c (print_version): Likewise. * locale/programs/locale.c: Likewise. * locale/programs/localedef.c: Likewise. - * login/programs/pt_chown.c: Likewise. + * nscd/nscd.c (print_version): Likewise. + * debug/xtrace.sh: Likewise. * malloc/memusage.sh: Likewise. - * malloc/memusagestat.c: Likewise. * malloc/mtrace.pl: Likewise. - * manual/crypt.texi: Likewise. - * manual/install.texi: Likewise. - * nss/makedb.c: Likewise. - -2004-05-14 Jakub Jelinek - - * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Only - CHECK_STATIC_TLS if sym != NULL. - * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise. - * sysdeps/i386/dl-machine.h (elf_machine_rela): Likewise. - -2004-05-12 Andreas Schwab - - * posix/regex_internal.c (build_wcs_buffer): Also set pstr->mbs - when translating. - -2004-05-13 H.J. Lu - - * Rules (xtests): Depend on tests. - -2004-05-13 Jakub Jelinek - - * libio/genops.c (_IO_default_xsputn): Avoid one overflow per char if - count is negative, yet write_ptr < write_end. - (_IO_default_xsgetn): Avoid one underflow per char if count is - negative, yet read_ptr < read_end. - -2004-05-12 Steven Munroe - - * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (XTABS): Define XTABS - equal to TAB3. - -2004-05-12 Ulrich Drepper - - * elf/dl-lookup.c (_dl_lookup_symbol_x): Correct _dl_signal_cerror - call. - -2004-05-10 Roland McGrath - - * hurd/hurdlookup.c (__hurd_file_name_split): Return ENOENT for "". - (__hurd_directory_name_split): Likewise. - -2004-05-10 Ulrich Drepper - - * po/fr.po: Update from translation team. - -2004-05-10 Andreas Jaeger - - * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): - Correctly compute alignment. - Patch by Michael Matz . - -2004-05-09 Ulrich Drepper - - * sysdeps/generic/sigpause.c: Prevent sigpause prototype. - * sysdeps/posix/sigpause.c: Likewise. - * signal/signal.h: Don't define sigpause macro unless needed. - -2004-05-08 Jakub Jelinek - - * configure.in (libc_cv_libgcc_s_suffix): New check. - (libc_cv_as_needed): Use -lgcc_s$libc_cv_libgcc_s_suffix. - * config.make.in (libgcc_s_suffix): Set. - * Makeconfig (libgcc_eh): Use -lgcc_s$(libgcc_s_suffix). - -2004-05-08 Ulrich Drepper - - * signal/signal.h: Use BSD sigpause only if BSD behavior is preferred. - -2004-04-29 Steven Munroe - - * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (LOADARGS_1, - LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5, LOADARGS_6): - Load argument values into temporary variables. - * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (LOADARGS_1, - LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5, LOADARGS_6): - Likewise. - -2004-05-07 Ulrich Drepper - - * sysdeps/unix/sysv/linux/Makefile: mq_send.c and mq_receive.c - need to be compiled with exceptions. - -2004-05-06 Ulrich Drepper - - * sysdeps/unix/sysv/linux/ifreq.c (__ifreq): Fix memory handling. - * sysdeps/generic/ifreq.c (__ifreq): Fix memory handling. - - * resolv/res_hconf.c (_res_hconf_reorder_addrs): Make clear that - realloc cannot fail. - - * nss/nss_files/files-netgrp.c (EXPAND): Free buffer which cannot - be expanded. - - * nis/nis_table.c: Clean up memory handling. - * nis/nis_subr.c (nis_getnames): Clean up memory handling. - * nis/nis_removemember.c (nis_removemember): Add comment - explaining use of realloc. - - * math/tgmath.h (fabs): Use __TGMATH_UNARY_REAL_IMAG_RET_REAL. - (carg): Likewise. - Patch by Lev S Bishop . - - * math/bug-tgmath1.c (main): Test fabs and carg as well. - -2004-05-06 Richard Henderson - - * elf/elf.h (AT_L1I_CACHESHAPE, AT_L1D_CACHESHAPE, - AT_L2_CACHESHAPE, AT_L3_CACHESHAPE): New. - * sysdeps/unix/sysv/linux/alpha/Versions: Export - __libc_alpha_cache_shape as a private symbol. - * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: New file. - * sysdeps/unix/sysv/linux/alpha/sysconf.c: New file. - -2004-05-06 Richard Henderson - - * sysdeps/alpha/div_libc.h (_ITOFS, _ITOFT, _FTOIT, _ITOFT2): New. - * sysdeps/alpha/divl.S: Use them. - * sysdeps/alpha/divq.S: Likewise. - * sysdeps/alpha/divqu.S: Likewise. - * sysdeps/alpha/reml.S: Likewise. - * sysdeps/alpha/remq.S: Likewise. - * sysdeps/alpha/remqu.S: Likewise. - -2004-05-06 Ulrich Drepper - - * math/tgmath.h (__TGMATH_UNARY_REAL_IMAG_RET_REAL):Define. - (cimag): Use it. - (creal): Likewise. - * math/Makefile (tests): Add bug-tgmath1. - * math/bug-tgmath1.c: New file. - -2004-05-05 Jakub Jelinek - - * sysdeps/alpha/atomicity.h: Remove. - * sysdeps/generic/atomicity.h: Remove. - -2004-05-05 H.J. Lu - - * sysdeps/i386/i486/bits/string.h (strpbrk): Cast return to - char *. - -2004-04-22 David Mosberger - - * sysdeps/unix/sysv/linux/ia64/Makefile (librt-routines): Mention - rt-sysdep. - * sysdeps/unix/sysv/linux/ia64/rt-sysdep.S: New file. - - * sysdeps/ia64/strcat.c: New file. - * sysdeps/ia64/strcat.S: Delete. - -2004-05-04 Jakub Jelinek - - * sysdeps/unix/sysv/linux/ia64/sysdep.S (USE___THREAD): Remove - defined. - -2004-04-23 Jakub Jelinek - - * sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Add - libc_hidden_proto. Define to __GI___libm_error_support for - assembly going into libc.so. - * sysdeps/ia64/fpu/libc_libm_error.c (__libm_error_support): Add - libc_hidden_def. - - * include/libc-symbols.h (HIDDEN_BUILTIN_JUMPTARGET): Define. - * sysdeps/ia64/bcopy.S (bcopy): Use it for jump to memmove. - - * sysdeps/unix/sysv/linux/ia64/sysdep.S (__syscall_error): Access - gprel errno if RTLD_PRIVATE_ERRNO or __thread __libc_errno/errno - if USE___THREAD. - -2004-05-03 Jakub Jelinek - - * sysdeps/unix/bsd/bits/fcntl.h (F_SETOWN, F_GETOWN): Define if - __USE_BSD or __USE_UNIX98. - * sysdeps/unix/bsd/ultrix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. - * sysdeps/unix/bsd/bsd4.4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. - * sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/common/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. - * sysdeps/unix/sysv/aix/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. - * sysdeps/unix/sysv/irix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. - * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (F_SETOWN, F_GETOWN): - Likewise. - * sysdeps/generic/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. - * sysdeps/mach/hurd/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. - * io/sys/stat.h (S_ISSOCK, S_IFSOCK): Likewise. - -2004-05-01 Jakub Jelinek - - * posix/Versions (libc): Remove __libc_wait, __libc_waitpid, - __libc_pause, __libc_nanosleep, __libc_pread, __libc_pread64, - __libc_pwrite64, __waitid and __pselect @@GLIBC_PRIVATE. - * stdlib/Versions (libc): Remove __on_exit@@GLIBC_PRIVATE. - * sysdeps/unix/sysv/linux/Versions (libc): Remove - __libc_sigaction@@GLIBC_PRIVATE. - * sysdeps/unix/sysv/linux/x86_64/Versions (libc): Remove - __modify_ldt@@GLIBC_PRIVATE. - * socket/Versions (libc): Remove __libc_accept, __libc_send, - __libc_recvfrom, __libc_recvmsg, __libc_sendmsg, __libc_recv, - __libc_sendto and __libc_connect @@GLIBC_PRIVATE. - * stdio-common/Versions (libc): Remove - _itoa_upper_digits@@GLIBC_PRIVATE. - * resolv/Versions (libresolv): Remove __ns_samename@@GLIBC_PRIVATE. - * misc/Versions (libc): Remove __libc_fsync, __libc_msync, - __libc_readv and __libc_writev @@GLIBC_PRIVATE. - * termios/Versions (libc): Remove __libc_tcdrain@@GLIBC_PRIVATE. - * io/Versions (libc): Remove __libc_open, __libc_close, __libc_read, - __libc_write, __libc_lseek, __libc_fcntl, __libc_open64 and - __libc_lseek64 @@GLIBC_PRIVATE. - -2004-04-30 Jakub Jelinek - - * elf/dl-load.c (open_verify): Move e_phentsize check after e_type - check. - -2004-04-29 Steven Munroe - - * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_floor.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_llrint.c: Removed. - * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_llrintf.c: Removed. - * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_llround.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_lround.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_lroundf.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_rint.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_round.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: New file. - * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: New file. - - * math/test-misc.c [LDBL_MANT_DIG == 106](main): Correct LDBL_MAX - mantissa for AIX long double format. - * misc/qefgcvt.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Define for AIX - long double format. - * misc/qefgcvt_r.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Likewise. - * stdlib/fpioconst.c [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024] - (_fpioconst_pow10): AIX long double format has same exponent range as - double. - * stdlib/fpioconst.h [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024] - (LDBL_MAX_10_EXP_LOG): AIX long double format has same exponent range - as double. - -2004-04-23 Art Haas - - * sysdeps/unix/sysv/linux/kernel-features.h: Add 'defined'. - -2004-04-28 Carlos O'Donell - - * sysdeps/unix/sysv/linux/mq_getattr.c: Include . - * sysdeps/unix/sysv/linux/mq_notify.c: Likewise. - * sysdeps/unix/sysv/linux/mq_open.c: Likewise. - * sysdeps/unix/sysv/linux/mq_receive.c: Likewise. - * sysdeps/unix/sysv/linux/mq_send.c: Likewise. - -2004-04-29 Philip Blundell - - * sysdeps/arm/dl-machine.h (RTLD_START): Avoid unnecessary GOT - entries. - -2004-04-29 Jakub Jelinek - - * manual/resource.texi (sched_setaffinity, sched_getaffinity): Fix - prototypes and description [BZ #131]. - - * string/bits/string2.h (strpbrk): Cast NULL to char * [BZ #130]. - Patch by Ed Catmur . - * string/tst-inlcall.c (main): Add test for strpbrk. - - [BZ #140] - * sysdeps/unix/sysv/linux/sys/sysctl.h: Remove linux/compiler.h - include. - (_LINUX_KERNEL_H, _LINUX_TYPES_H, _LINUX_LIST_H): Only define if not - yet defined, #undef back after including linux/sysctl.h if defined - here. - (__LINUX_COMPILER_H, __user): Define if not yet defined, #undef - back after including linux/sysctl.h if defined here. - - * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c (_Qp_qtoi): Use %f31 - for single precision register, add it to __asm clobbers [BZ #139]. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c (_Qp_qtoui): Use %f31 - for single precision register, add it to __asm clobbers. - * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c (_Qp_qtoux): Use fqtox - instead of fqtoi in QP_HANDLE_EXCEPTIONS. - * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c (_Qp_qtox): Likewise. - Reported by M. H. VanLeeuwen . - -2004-04-23 Andreas Schwab - - * sysdeps/unix/sysv/linux/m68k/register-dump.h: Use - __attribute_used__. - -2004-04-22 Philip Blundell - - * sysdeps/arm/dl-machine.h (elf_machine_rela): Don't use INTUSE - when calling _dl_signal_error. - (elf_machine_rel): Likewise. - -2004-04-21 Ulrich Drepper - - * sysdeps/unix/sysv/linux/ia64/setjmp.S: Define _GI___sigsetjmp - and use it internally instead of __sigsetjmp. - * sysdeps/ia64/fpu/s_frexpf.c (frexpf): Use _GI___libm_frexp_4f. - * sysdeps/ia64/fpu/s_frexpl.c (frexpl): Use _GI___libm_frexp_4l. - * sysdeps/ia64/fpu/libm_frexp4.S: Define _GI___libm_frexp_4. - * sysdeps/ia64/fpu/libm_frexp4f.S: Define _GI___libm_frexp_4f. - * sysdeps/ia64/fpu/libm_frexp4l.S: Define _GI___libm_frexp_4l. - * sysdeps/ia64/fpu/s_frexp.c (frexp): Use _GI___libm_frexp_4. - * sysdeps/ia64/fpu/libm_support.h: Declare _GI___libm_frexp_4, - _GI___libm_frexp_4f, _GI___libm_frexp_4l. - * sysdeps/ia64/fpu/bits/mathinline.h: New file. - * sysdeps/unix/sysv/linux/ia64/__start_context.S: Use - HIDDEN_JUMPTARGET for exit call. - * sysdeps/unix/sysv/linux/ia64/clone2.S: Use HIDDEN_JUMPTARGET for - _exit call. - * sysdeps/ia64/bcopy.S: Use HIDDEN_JUMPTARGET for memmove call. - * sysdeps/ia64/strcat.S: Use HIDDEN_JUMPTARGET for strlen and - strcpy calls. - -2004-04-21 Jakub Jelinek - - * posix/tst-chmod.c (do_test): Fix a typo. - - * elf/lateglobal.c (main): Fix error checks. - Patch by Stephen Clarke . - - * manual/ctype.texi (isblank, iswblank): Mark as ISO functions, - mention they have been added in ISO C99. - Reported by Ben Pfaff . - -2004-03-31 H.J. Lu - - * sysdeps/ieee754/ldbl-128/bits/huge_vall.h: Fix typo. - -2004-04-20 Jakub Jelinek - - * sysdeps/unix/sysv/linux/shm_open.c (shm_unlink): Change EPERM into - EACCES. - -2004-04-20 Jakub Jelinek - - * stdio-common/vfscanf.c (_IO_vfscanf): Revert last %% whitespace - handling change. - * stdio-common/tst-sscanf.c (int_tests): Adjust. + * debug/catchsegv.sh: Likewise. - * nis/nss-nis.c: Include stdlib.h. +2005-01-11 Thorsten Kukuk - * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Shut up a - warning. - * sysdeps/sparc/sparc64/memcmp.S (memcmp): Remove BP_SYM () from - libc_hidden_builtin_def. + [BZ #733] + * sunrpc/svc_tcp.c (svctcp_create): Call listen with SOMAXCONN + as backlog. + * sunrpc/svc_unix.c (svcunix_create): Likewise. -2004-04-20 Jim Meyering +2005-01-10 Jakub Jelinek - * misc/error.c (error_tail): Don't leak upon realloc failure. + [BZ #732] + * time/tst-strptime.c (day_tests): Add 2 new tests. + (test_tm, main): Issue an error instead of segfaulting if + strptime returns NULL. -2004-04-20 Martin Schwidefsky +2005-01-12 GOTO Masanori - * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): - Use RETURN_ADDRESS instead of __builtin_return_address. + [BZ #650] + * malloc/malloc.h: Always include features.h. + +2005-01-10 Ulrich Drepper + + * sysdeps/generic/dl-tls.c (_dl_next_tls_modid): Fix assertion and + recognition of last entry. + +2005-01-09 Andreas Jaeger + + [BZ #732] + * time/strptime_l.c (__strptime_internal): Add braces to avoid + warning. -2004-04-19 Ulrich Drepper +2005-01-08 Jakub Jelinek - * sysdeps/unix/sysv/linux/mq_unlink.c: Rewrite to produce more - compact code. + * elf/Makefile (generated): Add tst-pie1{,.out,.o}. -2004-04-20 Jakub Jelinek +2005-01-06 Roland McGrath - * stdio-common/vfscanf.c (_IO_vfscanf): When skipping whitespace, - do input_error () instead of conv_error () and don't look at errno. - Don't eat any whitespace before %% if skip_space == 0. - * stdio-common/tst-sscanf.c (int_tests): New array. - (main): Run int_tests. + [BZ #633] + * sysdeps/unix/sysv/linux/futimes.c (__futimes): Catch errno values + indicating file-name lookup errors, and return ENOSYS or EBADF instead. + +2005-01-06 Ulrich Drepper + + * posix/unistd.h: Declare ftruncate for POSIX 2003. [BZ #640] + +2004-12-22 Steven Munroe + + [BZ #602] + * math/libm-test.inc (rint_test_tonearest): New test. + (rint_test_towardzero): New test. + (rint_test_downward): New test. + (rint_test_upward): New test. + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: Fix -0.0 case. + Remove redundant const values. + * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: Fix -0.0 case. + Remove redundant const values. Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S: Fix -0.0 case. + * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: Fix -0.0 case. + Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S: Fix -0.0 case. + * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: Fix -0.0 case. + Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_round.S: Fix -0.0 case. + Remove redundant const values. + * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: Fix -0.0 case. + Remove redundant const values. Use float const. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: Fix -0.0 case. + Remove redundant const values. + * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: Fix -0.0 case. + Remove redundant const values. Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. + * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. + * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_round.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + Use float const. + * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. + * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Use EALIGN for Quadword + alignment. Fix -0.0 case. Remove redundant const values. + Use float const. + +2004-12-29 Jakub Jelinek + + [BZ #592] + * sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Use + libc_hidden_proto instead of HIDDEN_PROTO. + * sysdeps/ia64/fpu/libm-symbols.h (HIDDEN_PROTO): Remove. + (__libm_error_support): If ASSEMBLER and in libc, define to + HIDDEN_JUMPTARGET(__libm_error_support). + +2004-12-28 David Mosberger + + [BZ #592] + * sysdeps/ia64/fpu/Makefile (duplicated-routines): New macro. + (sysdep_routines): Replace libm_ldexp{,f,l} and libm_scalbn{,f,l} + with $(duplicated-routines). + (libm-sysdep_routines): Likewise, but substitute "s_" prefix for + "m_" prefix. + +2004-12-27 David Mosberger + + [BZ #592] + * sysdeps/ia64/fpu/libm-symbols.h: Add include of and + undefine "ret" macro. Add __libm_error_support hidden definitions. + + [BZ #592] + * sysdeps/ia64/fpu/e_lgamma_r.c: Remove CVS-id comment. Add + missing portion of copyright statement. + * sysdeps/ia64/fpu/e_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.c: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/w_lgamma.c: Remove CVS-id comment. Add + missing portion of copyright statement. + (__ieee754_lgamma): Rename from lgamma(). Make lgamma() a weak alias. + (__ieee754_gamma): Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + +2004-12-09 H.J. Lu + + [BZ #592] + * sysdeps/ia64/fpu/s_nextafterl.c: Remove. + * sysdeps/ia64/fpu/s_nexttoward.c: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.c: Likewise. + * sysdeps/ia64/fpu/e_atan2l.S: Remove (duplicate of e_atan2l.c). + * sysdeps/ia64/fpu/e_expl.S: Likewise. + * sysdeps/ia64/fpu/e_logl.c: Remove (conflicts with e_logl.S). + +2004-11-18 David Mosberger + + [BZ #592] + * sysdeps/ia64/fpu/README: New file. + * sysdeps/ia64/fpu/gen_import_file_list: New file. + * sysdeps/ia64/fpu/import_check: Likewise. + * sysdeps/ia64/fpu/import_diffs: Likewise. + * sysdeps/ia64/fpu/import_file.awk: Likewise. + * sysdeps/ia64/fpu/import_intel_libm: Likewise. + * sysdeps/ia64/fpu/libm-symbols.h: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_acos.S: Update from Intel libm v2.1+. + * sysdeps/ia64/fpu/e_acosf.S: Likewise. + * sysdeps/ia64/fpu/e_acosl.S: Likewise. + * sysdeps/ia64/fpu/e_asin.S: Likewise. + * sysdeps/ia64/fpu/e_asinf.S: Likewise. + * sysdeps/ia64/fpu/e_asinl.S: Likewise. + * sysdeps/ia64/fpu/e_atan2.S: Likewise. + * sysdeps/ia64/fpu/e_atan2f.S: Likewise. + * sysdeps/ia64/fpu/e_cosh.S: Likewise. + * sysdeps/ia64/fpu/e_coshf.S: Likewise. + * sysdeps/ia64/fpu/e_coshl.S: Likewise. + * sysdeps/ia64/fpu/e_exp.S: Likewise. + * sysdeps/ia64/fpu/e_expf.S: Likewise. + * sysdeps/ia64/fpu/e_fmod.S: Likewise. + * sysdeps/ia64/fpu/e_fmodf.S: Likewise. + * sysdeps/ia64/fpu/e_fmodl.S: Likewise. + * sysdeps/ia64/fpu/e_hypot.S: Likewise. + * sysdeps/ia64/fpu/e_hypotf.S: Likewise. + * sysdeps/ia64/fpu/e_hypotl.S: Likewise. + * sysdeps/ia64/fpu/e_log.S: Likewise. + * sysdeps/ia64/fpu/e_log2.S: Likewise. + * sysdeps/ia64/fpu/e_log2f.S: Likewise. + * sysdeps/ia64/fpu/e_log2l.S: Likewise. + * sysdeps/ia64/fpu/e_logf.S: Likewise. + * sysdeps/ia64/fpu/e_pow.S: Likewise. + * sysdeps/ia64/fpu/e_powf.S: Likewise. + * sysdeps/ia64/fpu/e_powl.S: Likewise. + * sysdeps/ia64/fpu/e_remainder.S: Likewise. + * sysdeps/ia64/fpu/e_remainderf.S: Likewise. + * sysdeps/ia64/fpu/e_remainderl.S: Likewise. + * sysdeps/ia64/fpu/e_scalb.S: Likewise. + * sysdeps/ia64/fpu/e_scalbf.S: Likewise. + * sysdeps/ia64/fpu/e_scalbl.S: Likewise. + * sysdeps/ia64/fpu/e_sinh.S: Likewise. + * sysdeps/ia64/fpu/e_sinhf.S: Likewise. + * sysdeps/ia64/fpu/e_sinhl.S: Likewise. + * sysdeps/ia64/fpu/e_sqrt.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtf.S: Likewise. + * sysdeps/ia64/fpu/e_sqrtl.S: Likewise. + * sysdeps/ia64/fpu/libm_error.c: Likewise. + * sysdeps/ia64/fpu/libm_reduce.c: Likewise. + * sysdeps/ia64/fpu/libm_support.h: Likewise. + * sysdeps/ia64/fpu/s_atan.S: Likewise. + * sysdeps/ia64/fpu/s_atanf.S: Likewise. + * sysdeps/ia64/fpu/s_atanl.S: Likewise. + * sysdeps/ia64/fpu/s_cbrt.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtf.S: Likewise. + * sysdeps/ia64/fpu/s_cbrtl.S: Likewise. + * sysdeps/ia64/fpu/s_ceil.S: Likewise. + * sysdeps/ia64/fpu/s_ceilf.S: Likewise. + * sysdeps/ia64/fpu/s_ceill.S: Likewise. + * sysdeps/ia64/fpu/s_cos.S: Likewise. + * sysdeps/ia64/fpu/s_cosf.S: Likewise. + * sysdeps/ia64/fpu/s_cosl.S: Likewise. + * sysdeps/ia64/fpu/s_expm1.S: Likewise. + * sysdeps/ia64/fpu/s_expm1f.S: Likewise. + * sysdeps/ia64/fpu/s_expm1l.S: Likewise. + * sysdeps/ia64/fpu/s_fabs.S: Likewise. + * sysdeps/ia64/fpu/s_fabsf.S: Likewise. + * sysdeps/ia64/fpu/s_fabsl.S: Likewise. + * sysdeps/ia64/fpu/s_floor.S: Likewise. + * sysdeps/ia64/fpu/s_floorf.S: Likewise. + * sysdeps/ia64/fpu/s_floorl.S: Likewise. + * sysdeps/ia64/fpu/s_frexp.c: Likewise. + * sysdeps/ia64/fpu/s_frexpf.c: Likewise. + * sysdeps/ia64/fpu/s_frexpl.c: Likewise. + * sysdeps/ia64/fpu/s_ilogb.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbf.S: Likewise. + * sysdeps/ia64/fpu/s_ilogbl.S: Likewise. + * sysdeps/ia64/fpu/s_log1p.S: Likewise. + * sysdeps/ia64/fpu/s_log1pf.S: Likewise. + * sysdeps/ia64/fpu/s_log1pl.S: Likewise. + * sysdeps/ia64/fpu/s_logb.S: Likewise. + * sysdeps/ia64/fpu/s_logbf.S: Likewise. + * sysdeps/ia64/fpu/s_logbl.S: Likewise. + * sysdeps/ia64/fpu/s_modf.S: Likewise. + * sysdeps/ia64/fpu/s_modff.S: Likewise. + * sysdeps/ia64/fpu/s_modfl.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyint.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintf.S: Likewise. + * sysdeps/ia64/fpu/s_nearbyintl.S: Likewise. + * sysdeps/ia64/fpu/s_rint.S: Likewise. + * sysdeps/ia64/fpu/s_rintf.S: Likewise. + * sysdeps/ia64/fpu/s_rintl.S: Likewise. + * sysdeps/ia64/fpu/s_round.S: Likewise. + * sysdeps/ia64/fpu/s_roundf.S: Likewise. + * sysdeps/ia64/fpu/s_roundl.S: Likewise. + * sysdeps/ia64/fpu/s_significand.S: Likewise. + * sysdeps/ia64/fpu/s_significandf.S: Likewise. + * sysdeps/ia64/fpu/s_significandl.S: Likewise. + * sysdeps/ia64/fpu/s_tan.S: Likewise. + * sysdeps/ia64/fpu/s_tanf.S: Likewise. + * sysdeps/ia64/fpu/s_tanl.S: Likewise. + * sysdeps/ia64/fpu/s_trunc.S: Likewise. + * sysdeps/ia64/fpu/s_truncf.S: Likewise. + * sysdeps/ia64/fpu/s_truncl.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_acosh.S: New file from Intel libm v2.1+. + * sysdeps/ia64/fpu/e_acoshf.S: Likewise. + * sysdeps/ia64/fpu/e_acoshl.S: Likewise. + * sysdeps/ia64/fpu/e_atanh.S: Likewise. + * sysdeps/ia64/fpu/e_atanhf.S: Likewise. + * sysdeps/ia64/fpu/e_atanhl.S: Likewise. + * sysdeps/ia64/fpu/e_exp10.S: Likewise. + * sysdeps/ia64/fpu/e_exp10f.S: Likewise. + * sysdeps/ia64/fpu/e_exp10l.S: Likewise. + * sysdeps/ia64/fpu/e_exp2.S: Likewise. + * sysdeps/ia64/fpu/e_exp2f.S: Likewise. + * sysdeps/ia64/fpu/e_exp2l.S: Likewise. + * sysdeps/ia64/fpu/e_lgamma_r.S: Likewise. + * sysdeps/ia64/fpu/e_lgammaf_r.S: Likewise. + * sysdeps/ia64/fpu/e_lgammal_r.S: Likewise. + * sysdeps/ia64/fpu/e_logl.S: Likewise. + * sysdeps/ia64/fpu/libm_frexp.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpf.S: Likewise. + * sysdeps/ia64/fpu/libm_frexpl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexp.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_ldexpl.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbn.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnf.S: Likewise. + * sysdeps/ia64/fpu/s_libm_scalbnl.S: Likewise. + * sysdeps/ia64/fpu/libm_lgamma.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammaf.S: Likewise. + * sysdeps/ia64/fpu/libm_lgammal.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos.S: Likewise. + * sysdeps/ia64/fpu/libm_sincos_large.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosf.S: Likewise. + * sysdeps/ia64/fpu/libm_sincosl.S: Likewise. + * sysdeps/ia64/fpu/libm_scalblnf.S: Likewise. + * sysdeps/ia64/fpu/s_asinh.S: Likewise. + * sysdeps/ia64/fpu/s_asinhf.S: Likewise. + * sysdeps/ia64/fpu/s_asinhl.S: Likewise. + * sysdeps/ia64/fpu/s_erf.S: Likewise. + * sysdeps/ia64/fpu/s_erfc.S: Likewise. + * sysdeps/ia64/fpu/s_erfcf.S: Likewise. + * sysdeps/ia64/fpu/s_erfcl.S: Likewise. + * sysdeps/ia64/fpu/s_erff.S: Likewise. + * sysdeps/ia64/fpu/s_erfl.S: Likewise. + * sysdeps/ia64/fpu/s_fdim.S: Likewise. + * sysdeps/ia64/fpu/s_fdimf.S: Likewise. + * sysdeps/ia64/fpu/s_fdiml.S: Likewise. + * sysdeps/ia64/fpu/s_fma.S: Likewise. + * sysdeps/ia64/fpu/s_fmaf.S: Likewise. + * sysdeps/ia64/fpu/s_fmal.S: Likewise. + * sysdeps/ia64/fpu/s_fmax.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxf.S: Likewise. + * sysdeps/ia64/fpu/s_fmaxl.S: Likewise. + * sysdeps/ia64/fpu/s_ldexp.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.c: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.c: Likewise. + * sysdeps/ia64/fpu/s_nextafter.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterf.S: Likewise. + * sysdeps/ia64/fpu/s_nextafterl.S: Likewise. + * sysdeps/ia64/fpu/s_nexttoward.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardf.S: Likewise. + * sysdeps/ia64/fpu/s_nexttowardl.S: Likewise. + * sysdeps/ia64/fpu/s_tanh.S: Likewise. + * sysdeps/ia64/fpu/s_tanhf.S: Likewise. + * sysdeps/ia64/fpu/s_tanhl.S: Likewise. + * sysdeps/ia64/fpu/s_scalblnf.c: Likewise. + * sysdeps/ia64/fpu/w_lgamma.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal.c: Likewise. + * sysdeps/ia64/fpu/w_tgamma.S: Likewise. + * sysdeps/ia64/fpu/w_tgammaf.S: Likewise. + * sysdeps/ia64/fpu/w_tgammal.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_gamma_r.c: New empty dummy-file. + * sysdeps/ia64/fpu/e_gammaf_r.c: Likewise. + * sysdeps/ia64/fpu/e_gammal_r.c: Likewise. + * sysdeps/ia64/fpu/w_acosh.c: Likewise. + * sysdeps/ia64/fpu/w_acoshf.c: Likewise. + * sysdeps/ia64/fpu/w_acoshl.c: Likewise. + * sysdeps/ia64/fpu/w_atanh.c: Likewise. + * sysdeps/ia64/fpu/w_atanhf.c: Likewise. + * sysdeps/ia64/fpu/w_atanhl.c: Likewise. + * sysdeps/ia64/fpu/w_exp10.c: Likewise. + * sysdeps/ia64/fpu/w_exp10f.c: Likewise. + * sysdeps/ia64/fpu/w_exp10l.c: Likewise. + * sysdeps/ia64/fpu/w_exp2.c: Likewise. + * sysdeps/ia64/fpu/w_exp2f.c: Likewise. + * sysdeps/ia64/fpu/w_exp2l.c: Likewise. + * sysdeps/ia64/fpu/w_expl.c: Likewise. + * sysdeps/ia64/fpu/e_expl.S: Likewise. + * sysdeps/ia64/fpu/w_lgamma_r.c: Likewise. + * sysdeps/ia64/fpu/w_lgammaf_r.c: Likewise. + * sysdeps/ia64/fpu/w_lgammal_r.c: Likewise. + * sysdeps/ia64/fpu/w_log2.c: Likewise. + * sysdeps/ia64/fpu/w_log2f.c: Likewise. + * sysdeps/ia64/fpu/w_log2l.c: Likewise. + * sysdeps/ia64/fpu/w_sinh.c: Likewise. + * sysdeps/ia64/fpu/w_sinhf.c: Likewise. + * sysdeps/ia64/fpu/w_sinhl.c: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/libm_atan2_reg.S: Remove. + * sysdeps/ia64/fpu/s_ldexp.S: Likewise. + * sysdeps/ia64/fpu/s_ldexpf.S: Likewise. + * sysdeps/ia64/fpu/s_ldexpl.S: Likewise. + * sysdeps/ia64/fpu/s_scalbn.S: Likewise. + * sysdeps/ia64/fpu/s_scalbnf.S: Likewise. + * sysdeps/ia64/fpu/s_scalbnl.S: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/s_sincos.c: Make it an empty dummy-file. + * sysdeps/ia64/fpu/s_sincosf.c: Likewise. + * sysdeps/ia64/fpu/s_sincosl.c: Likewise. + + [BZ #592] + * sysdeps/ia64/fpu/e_atan2l.S: Add "Not needed" comment. + + [BZ #592] + * sysdeps/ia64/fpu/s_copysign.S: Add __libm_copysign{,f,l} + alias for use by libm_error.c + + [BZ #592] + * sysdeps/ia64/fpu/Makefile (libm-sysdep_routines): Remove + libm_atan2_reg, libm_tan, libm_frexp4{f,l}. + Mention s_erfc{,f,l}, libm_frexp{,f,l}, libm_ldexp{,f,l}, + libm_sincos{,f,l}, libm_sincos_large, libm_lgamma{,f,l}, + libm_scalbn{,f,l}, libm_scalblnf. + (sysdep_routines): Remove libm_frexp4{,f,l}. + Mention libm_frexp{,f,l}, libm_ldexp{,f,l}, and libm_scalbn{,f,l}. + (sysdep-CPPFLAGS): Add -include libm-symbols.h, -D__POSIX__, + _D_LIB_VERSIONIMF=_LIB_VERSION, -DSIZE_LONG_INT_64, and + -DSIZE_LONG_LONG_INT_64. + +2005-01-05 Steven Munroe + + [BZ #729] + * elf/rtld.c (dl_main) [NEED_DL_SYSINFO_DSO]: Insure l_map_end and + l_text_end are set for a VDSO with a single PT_LOAD entry. + +2005-01-05 Ulrich Drepper + + [BZ #730] + * libio/iofopncook.c (_IO_cookie_seekoff): Define. Mark offset as + invalid to disable optimizations in fileops which won't work here. + (_IO_cookie_jumps): Use it. + (_IO_old_cookie_jumps): Likewise. + * libio/fmemopen.c (fmemopen_seek): Result must be returned in *P, + not the return value. + * stdio-common/Makefile (tests): Add tst-fmemopen2. + * stdio-common/tst-fmemopen2.c: New file. + +2005-01-03 Ulrich Drepper + + [BZ #727] + * sysdeps/generic/libc-start.c [SHARED] (__libc_start_main): Don't + initialize __environ again. + * stdlib/Makefile: Add rules to build and run tst-putenv. + * stdlib/tst-putenv.c: New file. + * stdlib/tst-putenvmod.c: New file. + +2005-01-03 Andreas Jaeger + + * csu/Makefile (generated): Add start.os and start.ob. + +2004-12-29 Roland McGrath + + [BZ #626] + * sysdeps/unix/alarm.c (alarm): Round return value to nearest rather + than always up; when nearest is zero, round up to one. + +2004-12-28 Ulrich Drepper + + [BZ #726] + * sysdeps/generic/dl-tls.c (__tls_get_addr): Fix typo. + +2004-12-27 Ulrich Drepper + + [BZ #744] + * include/signal.h: Define __sigemptyset. + +2004-12-21 Jakub Jelinek + + [BZ #723] + * sysdeps/unix/sysv/linux/i386/clone.S (__clone): Make sure %esp when + calling fn is 16 byte aligned. + * sysdeps/i386/tst-stack-align.h: New file. + + [BZ #725] + * misc/efgcvt_r.c (FLOAT_MIN_10_EXP, FLOAT_MIN_10_NORM): Define. + (ecvt_r): Special case denormals. + * misc/qefgcvt_r.c (FLOAT_MIN_10_EXP, FLOAT_MIN_10_NORM): Define. + * misc/tst-efgcvt.c: Include float.h. + (ecvt_tests): Add 2 new tests. -See ChangeLog.14 for earlier changes. +See ChangeLog.15 for earlier changes. diff -rNpu glibc-2.3.4/ChangeLog.15 glibc-2.3.5/ChangeLog.15 --- glibc-2.3.4/ChangeLog.15 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/ChangeLog.15 2005-02-15 23:35:41.000000000 -0800 @@ -0,0 +1,5480 @@ +2004-12-20 Jakub Jelinek , + Jim Gifford + + [BZ #562] + * sysdeps/mips/Makefile (librt-sysdep_routines): Add. + * sysdeps/unix/mips/rt-sysdep.S: New file. + +2004-12-19 Roland McGrath + + * iconv/Makefile (test-iconvconfig): New target. + [$(cross-compiling) != yes] (xtests): Depend on it. + + * iconv/iconvconfig.c (nostdlib, output_file, output_file_len): + New variables. + (options, parse_opt, main): Take new options --nostdlib and + --output/-o to set them. Under --nostdlib, skip GCONV_PATH dirs. + (write_output): If output_file is set, write the output there. + +2004-12-19 Andreas Jaeger + + [BZ #560] + * inet/netinet/in.h: Use __interface_addr instead of __interface. + + [BZ #573] + * sunrpc/xcrypt.c (passwd2des_internal): Make it hidden instead of + internal linkage. + +2004-12-19 Roland McGrath + + * version.h (VERSION): 2.3.4. + * README.template: Various updates. + * README: Regenerated. + * NEWS: Mention ports. + * README-alpha: File removed. + + [BZ #416] + * locale/langinfo.h: Comment fixes. + +2004-12-17 Ulrich Drepper + + * po/ja.po: Update from translation team. + +2004-12-17 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/clone.S (__clone): Add support + for NPTL where the PID is stored at userlevel and needs to be + reset when CLONE_THREAD is not used. + +2004-12-17 Jakub Jelinek + + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update. + +2004-12-17 Andreas Jaeger + + * math/libm-test.inc (atan2_test): Compute value with 36 digits. + * sysdeps/alpha/fpu/libm-test-ulps: Adjust for changed result. + * sysdeps/powerpc/fpu/libm-test-ulps: Likewise. + * sysdeps/s390/fpu/libm-test-ulps: Likewise. + * sysdeps/sparc/sparc32/fpu/libm-test-ulps: Likewise. + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Likewise. + * sysdeps/x86_64/fpu/libm-test-ulps: Likewise. + +2004-12-16 Ulrich Drepper + + * stdlib/tst-setcontext.c: Enlarge st1 and st2 arrays. + +2004-09-02 Steven Munroe + + [BZ #610] + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S + (__novec_getcontext): Fix typo in store of fp29. + (__getcontext): Fix typo in store of fp29. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S + (__novec_swapcontext): Fix typo in store of fp29. + (__swapcontext): Fix typo in store of fp29. + +2004-12-17 GOTO Masanori + + * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): Fix + vague message. + +2004-12-16 Roland McGrath + + * nscd/Makefile ($(objpfx)nscd): Don't depend on $(selinux-LIBS), + which is usually a -lselinux that make will resolve wrongly. + +2004-12-16 Andreas Jaeger + + * math/math.h: Use #if defined to not receive warnings about + undefined symbols. + +2004-12-16 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sparc/sparc32/clone.S (__clone): Add support + for NPTL where the PID is stored at userlevel and needs to be reset + when CLONE_THREAD is not used. + + * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h + (SYSCALL_ERROR_HANDLER): If RTLD_PRIVATE_ERRNO, use rtld_errno + instead of errno. + * sysdeps/unix/sysv/linux/sparc/sparc64/socket.S: Include + sysdep-cancel.h instead of sysdep.h. Handle cancellation. + * sysdeps/sparc/sparc64/fpu/libm-test-ulps: Regenerate. + + * sysdeps/ieee754/ldbl-128/e_expl.c: Include stdlib.h. + +2004-12-15 Jakub Jelinek + + * sysdeps/unix/sysv/linux/gethostid.c: Make bi-arch safe. + +2004-12-15 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Correct stack + alignment. Clean up flag bit tests. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Correct stack + alignment. Clean up flag bit tests. Remove redundent SP assignment. + Add TOC register save/restore around function call. + + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Make no_vmx symbol + local. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Make no_vmx symbol + local. + * sysdeps/powerpc/powerpc64/__longjmp-common.S: Make no_vmx symbol + local. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Make no_vmx and + aligned_save_vmx symbol local. + +2004-12-15 Ulrich Drepper + + * sysdeps/i386/i486/bits/string.h (__strncat_g): Fix i686 + implementation. + +2004-09-08 H.J. Lu + + * Makeconfig (libunwind): New. + (libgcc_eh): Add $(libunwind). + (gnulib): Always set to -lgcc $(libgcc_eh). + (static-gnulib): Always set to -lgcc -lgcc_eh $(libunwind). + (libc.so-gnulib): New. + * Makerules (LDLIBS-c.so): Use $(libc.so-gnulib) instead of + $(static-gnulib). + * configure.in (libc_cv_cc_with_libunwind): Set to yes if gcc + uses -lunwind for static binaries. + +2004-06-05 Joseph S. Myers + + * malloc/Makefile (install-bin): Remove memusage. + (install-bin-script): Add memusage. + +2004-12-15 Jakub Jelinek + + * nis/nis_domain_of_r.c (nis_domain_of_r): Use libnsl_hidden_def, + not libnsl_hidden_proto. + + * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (__clone): Add support + for NPTL where the PID is stored at userlevel and needs to be reset + when CLONE_THREAD is not used. + * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (__clone): Likewise. + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S (__clone): Save + and restore r2 around call to fn. + +2004-12-15 Andreas Jaeger + + * sysdeps/ia64/dl-machine.h (elf_machine_rela): Mark auto instead + of static, add always_inline attribute. + (elf_machine_rela_relative): Likewise. + (elf_machine_lazy_rel): Likewise. + +2004-12-15 Ulrich Drepper + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/clone.S: Add support + for pid caching in nptl. + +2004-12-14 Ulrich Drepper + + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Add support + for pid caching in nptl. + +2004-10-18 Maciej W. Rozycki + + * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Use + __NTH instead of __THROW in the inline definition. + * sysdeps/unix/sysv/linux/mips/sys/tas.h (_test_and_set): Likewise. + + * sysdeps/mips/bits/dlfcn.h (RTLD_DEEPBIND): New macro. + + * sysdeps/unix/sysv/linux/mips/bits/mman.h + (PROT_GROWSDOWN, PROT_GROWSUP): New macros. + +2004-10-06 Alan Modra + + * sysdeps/powerpc/powerpc64/ppc-mcount.S (PROF): Don't undef. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/brk.S: Invoke CALL_MOUNT. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/clone.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/makecontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/vfork.S: Likewise. + +2004-10-19 Wolfram Gloger + + * malloc/hooks.c (mem2chunk_check, top_check): Handle + non-contiguous arena. Reported by Michael Dalton + [BZ #457]. Add further checks for top chunk. + +2004-12-14 Jakub Jelinek + + * sysdeps/posix/sysconf.c (__sysconf_check_spec): Remove leading + underscore from GETCONF_DIR filenames. + +2004-12-13 Ulrich Drepper + + * po/de.po: Update from translation team. + + * nss/getnssent.c (__nss_getent): Double buffer size each round to + avoid problems with delays for some people's huge entries. + * nss/getXXbyYY.c (FUNCTION_NAME): Likewise. + +2004-12-13 Jakub Jelinek + + * posix/getconf.c (main): Prepend just $GETCONF_DIR/ instead of + $GETCONF_DIR/_ to spec. + * posix/confstr.c (confstr): Remove leading underscores for + _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS. + +2004-12-12 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object_from_fd): Fix computation of + mapping start. It must take the actual pagesize into account, not + the alignment in the file. + +2004-12-11 Ulrich Drepper + + * malloc/malloc.c (_int_realloc): Add checks for corrupted memory. + (_int_free): Make clear message are result of free() calls. + + * malloc/malloc.c (_int_realloc): Remove unnecessary tests for + oldmem and size == 0. + +2004-12-10 Ulrich Drepper + + * malloc/arena.c (arena_get2): Prevent endless loop if arenas and + list lock are taken. + +2004-12-08 Thorsten Kukuk + + * nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_getnetgrent_r): + Add check if the value is not an empty string. [BZ #597] + +2004-11-29 Jakub Jelinek + + * stdlib/strtod_l.c (INTERNAL (__STRTOF)): If densize > 2 + and numsize < densize, always shift num up by empty + 1 limbs. + +2004-12-07 Paolo Bonzini + + * posix/regexec.c (proceed_next_node): Simplify treatment of epsilon + nodes. Pass the pushed node to push_fail_stack. + (push_fail_stack): Accept a single node rather than an array + of two epsilon destinations. + (build_sifted_states): Only walk non-epsilon nodes. + (check_arrival): Don't pass epsilon nodes to + check_arrival_add_next_nodes. + (check_arrival_add_next_nodes) [DEBUG]: Abort if an epsilon node is + found. + (check_node_accept): Do expensive checks later. + (add_epsilon_src_nodes): Cache result of merging the inveclosures. + * posix/regex_internal.h (re_dfastate_t): Add non_eps_nodes and + inveclosure. + (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at, + re_string_context_at, re_string_peek_byte_case, + re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains): + Declare as pure. + * posix/regex_internal.c (create_newstate_common): Remove. + (register_state): Move part of it here. Initialize non_eps_nodes. + (free_state): Free inveclosure and non_eps_nodes. + (create_cd_newstate, create_ci_newstate): Allocate the new + re_dfastate_t here. + +2004-12-09 Ulrich Drepper + + * malloc/malloc.c (public_rEALLOc): Add parameter checks. + (_int_free): Provide better error message for invalid pointers. + +2004-12-01 Jakub Jelinek + + * posix/tst-regex.c: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 + conditionals instead of defined _POSIX_CPUTIME. + (main): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME + option is available. + * posix/tst-regex.c2: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0 + conditionals instead of defined _POSIX_CPUTIME. + (do_test): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME + option is available. + * sysdeps/posix/sysconf.c (__sysconf): If _POSIX_CPUTIME resp. + _POSIX_THREAD_CPUTIME is defined to 0, return -1 for the corresponding + _SC_ argument. + +2004-12-08 Jakub Jelinek + + * elf/ldd.bash.in: When set -o pipefail is available, use that for + piping to cat; when not, don't use the pipe at all. + Pipe to cat in all cases of running the executable. + When direct running exits with code 5, retry running via ${RTLD}. + * elf/rtld.c (process_envvars): If __libc_enable_secure and + mode != normal, exit with exitcode 5. + +2004-12-07 Jakub Jelinek + + * sysdeps/posix/sysconf.c (__sysconf_check_spec): Only define + if it will be actually used. + +2004-12-07 Roland McGrath + + * rt/tst-timer5.c (setup_test): New function. + (TEST_CLOCK_MISSING): Use it to punt test if timer_create does not + support CLOCK_MONOTONIC. + +2004-12-07 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ia64/clone2.S (__clone2): Add support for + NPTL where the PID is stored at userlevel and needs to be reset when + CLONE_THREAD is not used. Restore gp before calling _exit. + +2004-12-07 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/clone.S: Clear the frame pointer when + starting a new thread. Add support for NPTL where the PID is stored + at userlevel and needs to be reset when CLONE_THREAD is not used. + +2004-12-01 Jakub Jelinek + + * elf/rtld.c (process_envvars): Don't consider LD_SHOW_AUXV + and LD_DYNAMIC_WEAK if __libc_enable_secure. + If __libc_enable_secure, /etc/suid-debug doesn't exist and + program will be actually run, turn off all debugging. + * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add LD_DEBUG, + LD_DYNAMIC_WEAK and LD_SHOW_AUXV. + +2004-12-06 Jakub Jelinek + + * time/tzset.c (tzset_internal): If + or - is seen, + but no offset after it, reset offset to 0. [BZ #601] + +2004-12-06 Ulrich Drepper + + * libio/ioseekpos.c (_IO_seekpos_unlocked): Call _IO_SEEKOFF not + _IO_SEEKPOS, saving one indirect jump. + + * libio/fileops.c (_IO_new_file_seekoff): Fix optimization of in-buffer + seek. Remove dead code. + +2004-12-02 Jakub Jelinek + + * libio/Makefile (tests): Add bug-ungetc4. + * libio/bug-ungetc4.c: New test. + +2004-12-06 Roland McGrath + + * sysdeps/unix/clock_nanosleep.c (clock_nanosleep): Diagnose EINVAL + for CLOCK_THREAD_CPUTIME_ID, not ENOTSUP. + Use SYSDEP_NANOSLEEP handler before validating CLOCK_ID value. + + * rt/tst-timer4.c (TEST_CLOCK, TEST_CLOCK_NANOSLEEP): New macros. + Use them throughout in place of CLOCK_REALTIME and nanosleep. + (do_test) [TEST_CLOCK_MISSING]: Call this macro and if it returns + non-null, punt the test with a message using the string returned. + * rt/tst-timer5.c: New file. + * rt/Makefile (tests): Add it. + +2004-12-01 Paolo Bonzini + + * posix/regcomp.c (free_dfa_content, init_dfa): Remove + references to re_dfa_t's subexps field. + (parse_sub_exp, parse_expression): Do not use it. Use + completed_bkref_map instead. + (create_initial_state, peek_token): Store a backreference \N + with opr.idx = N-1. + * posix/regexec.c (proceed_next_node, check_dst_limits, get_subexp): + Likewise. + (check_subexp_limits): Remove useless condition. + * posix/regex_internal.h (re_subexp_t): Remove. + (re_dfa_t): Remove subexps and subexps_alloc field, add + completed_bkref_map. + +2004-12-05 Roland McGrath + + * Makeconfig: Comment typo fix. + +2004-11-30 Andreas Schwab + + * nis/ypclnt.c (ypprot_err): Remove unused entries. + +2004-11-30 Paolo Bonzini + + * posix/regexec.c (check_dst_limits_calc_pos_1): Check for + bkref_idx == -1, and don't recurse in that case. + +2004-11-30 GOTO Masanori + + * posix/confstr.c: Enclose #error message with double quote + for gcc-3.3 and lower. + +2004-12-04 Ulrich Drepper + + * sysdeps/unix/sysv/linux/i386/clone.S: Add support for NPTL where + the PID is stored at userlevel and needs to be reset when CLONE_THREAD + is not used. + * sysdeps/unix/sysv/linux/x86_64/clone.S: Likewise. + +2004-11-18 Daniel Jacobowitz + + * sysdeps/arm/sysdep.h: Define __USE_BX__ if bx is available. + Use it instead of __THUMB_INTERWORK__. Make RETINSTR take + only a condition and a register. + * sysdeps/arm/dl-machine.h: Use __USE_BX__ instead of + __THUMB_INTERWORK__. + (_dl_start_user): Use BX. + * sysdeps/arm/strlen.S: Use DO_RET. + * sysdeps/unix/arm/brk.S: Likewise. + * sysdeps/unix/arm/fork.S: Likewise. + * sysdeps/unix/arm/sysdep.S: Likewise. + * sysdeps/unix/arm/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/arm/clone.S: Update uses of RETINSTR. + * sysdeps/unix/sysv/linux/arm/mmap.S: Likewise. + * sysdeps/unix/sysv/linux/arm/mmap64.S: Likewise. + * sysdeps/unix/sysv/linux/arm/socket.S: Likewise. + * sysdeps/unix/sysv/linux/arm/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/arm/vfork.S: Likewise. + +2004-12-02 Roland McGrath + + * extra-lib.mk (object-suffixes-$(lib)): Add .oS when + $(lib)-static-only-routines is nonempty. + (extra-objs, o-iterator.mk rule): Filter out .oS from generators. + Add a special rule for .oS objects -> _nonshared.a library. + +2004-12-01 Jakub Jelinek + + * time/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC, + convert T2, not T. + * time/Makefile (tests): Add tst-mktime3. + * time/tst-mktime3.c: New test. + +2004-12-01 Jakub Jelinek + + * stdlib/stdlib.h (realpath): Remove nonnull attribute. + + * posix/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after + normal_bracket label. + + * time/tst-mktime2.c (bigtime_test): Initialize tm.tm_isdst to -1. + +2004-12-01 Roland McGrath + + * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.c): + Do $(make-target-directory). + +2004-11-29 Roland McGrath + + * posix/confstr.c: Avoid punctuation in #error text. + +2004-11-27 Ulrich Drepper + + * posix/Makefile (tests): Add tst-sysconf. + * posix/tst-sysconf.c: New file. + + * posix/getconf.c (vars): Add support for _SC_IPV6 and + _SC_RAW_SOCKETS. + * sysdeps/posix/sysconf.c (__sysconf): Add support for _SC_IPV6 + and _SC_RAW_SOCKETS. + * sysdeps/generic/bits/confname.h: Define _SC_IPV6 and + _SC_RAW_SOCKETS. + +2004-11-26 Jakub Jelinek + + * sysdeps/generic/unsecvars.h (UNSECURE_ENVVARS): Add GETCONF_DIR. + +2004-11-26 Kaz Kojima + + * sysdeps/unix/sysv/linux/mips/pread.c: Include sgidefs.h only if + NO_SGIDEFS_H isn't defined. Don't include sgidefs.h twice. + * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. + +2004-11-27 Ulrich Drepper + + * include/dlfcn.h (__libc_dlopen): Add __RTLD_DLOPEN to the mode + parameter. Reported by VY Newsum . + +2004-11-10 Daniel Jacobowitz + + * libio/iolibio.h (_IO_fclose, _IO_new_fclose, _IO_old_fclose, + _IO_fflush, _IO_fgetpos, _IO_fgetpos64, _IO_fgets, _IO_fopen, + _IO_old_fopen, _IO_new_fopen, _IO_fopen64, __fopen_internal, + _IO_fprintf, _IO_fputs, _IO_fsetpos, _IO_fsetpos64, _IO_ftell, + _IO_fread, _IO_fwrite, _IO_gets, _IO_printf, _IO_puts, _IO_scanf, + _IO_fflush_internal, _IO_ftell_internal, _IO_fputs_internal) + _IO_fwrite_internal): Remove incorrect __THROW. + * libio/libioP.h (_IO_default_xsputn, _IO_wdefault_xsputn, + _IO_default_xsgetn, _IO_wdefault_xsgetn, _IO_default_write, + _IO_default_read, _IO_getline, _IO_getline_info, _IO_getwline, + _IO_getwline_info, _IO_file_read_internal, _IO_sgetn_internal, + _IO_wdo_write_internal, _IO_do_write_internal, + _IO_getline_info_internal, _IO_getline_internal, + _IO_vfprintf_internal, _IO_putc_internal, _IO_read, _IO_write, + _IO_close): Likewise. + +2004-11-26 Jakub Jelinek + + * posix/Makefile (install-others): Add $(inst_libexecdir)/getconf. + (CFLAGS-sysconf.c): Add -D_GETCONF_DIR. + (CFLAGS-getconf.c): New. + ($(inst_libexecdir)/getconf): New. + * posix/confstr.c (confstr): Use __sysconf to query specifications + that don't have _POSIX_V6_* macros defined. Use __*_{C,LD}FLAGS + macros defined in bits/environments.h. + * sysdeps/posix/sysconf.c: Include stdlib.h, string.h and + sys/stat.h. + (__sysconf_check_spec): New routine. + (__sysconf): Use it. + * posix/getconf.c (specs): Change into structure array. + (main): If -v is not given, try to get default from + $(libexecdir)/getconf/default. If specification is not + supported by this getconf, try to execute + $(libexecdir)/getconf/$(specification). + * sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h: New file. + * sysdeps/unix/sysv/linux/s390/bits/environments.h: New file. + * sysdeps/unix/sysv/linux/powerpc/bits/environments.h: New file. + * sysdeps/unix/sysv/linux/sparc/bits/environments.h: New file. + * sysdeps/unix/sysv/linux/i386/bits/environments.h: New file. + * sysdeps/unix/sysv/linux/x86_64/bits/environments.h: New file. + * sysdeps/generic/bits/environments.h (__ILP32_OFFBIG_CFLAGS): + Define. + + * stdlib/stdlib.h (setenv): Use nonnull only for second argument. + (unsetenv): Remove. + +2004-11-23 Paolo Bonzini + + * posix/regcomp.c (analyze_tree): Always call calc_epsdest. + (calc_inveclosure): Use re_node_set_insert_last. + (parse_dup_op): Lower X{1,5} to (X(X(X(XX?)?)?)?)? + rather than X?X?X?X?X?. + * posix/regex_internal.h (re_node_set_insert_last): New declaration. + * posix/regex_internal.c (re_node_set_insert_last): New function. + * posix/PCRE.tests: Add testcases. + +2004-11-25 Ulrich Drepper + + * dlfcn/dlfcn.h: Remove nonnull attribute from dlopen. + + * posix/confstr.c (confstr): Return appropriate strings for + _CS_LFS_LINTFLAGS, _CS_LFS64_CFLAGS, and _CS_LFS64_LINTFLAGS. + +2004-11-05 Maciej W. Rozycki + + * sysdeps/mips/dl-machine.h: Include . Use _ABIO32, + _ABIN32 and _ABI64 for ABI selection throughout. + * sysdeps/mips/elf/start.S: Likewise. + * sysdeps/mips/mips64/__longjmp.c: Likewise. + * sysdeps/mips/mips64/bsd-_setjmp.S: Likewise. + * sysdeps/mips/mips64/bsd-setjmp.S: Likewise. + * sysdeps/mips/mips64/setjmp.S: Likewise. + * sysdeps/mips/mips64/setjmp_aux.c: Likewise. + * sysdeps/mips/sys/regdef.h: Likewise. + * sysdeps/mips/sys/ucontext.h: Likewise. + * sysdeps/unix/mips/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/kernel-features.h: Likewise. + * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/ptrace.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. + + * sysdeps/mips/atomicity.h: Use _ABIO32, _ABIN32 and _ABI64 for + ABI selection throughout. + * sysdeps/mips/bits/setjmp.h: Likewise. + * sysdeps/mips/fpu/bits/mathdef.h: Likewise. + * sysdeps/mips/machine-gmon.h: Likewise. + * sysdeps/mips/sys/asm.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/user.h: Likewise. + + * sysdeps/mips/sgidefs.h: Prevent from being + included by kernel headers and undo its settings if already + included. Define _ABIO32, _ABIN32 and _ABI64 if missing and use + them to define _MIPS_SIM_ABI32, _MIPS_SIM_NABI32 and + _MIPS_SIM_ABI64 for compatibility. + * sysdeps/unix/sysv/linux/mips/Makefile: Use _ABIO32, _ABIN32 and + _ABI64 for ABI selection in generated syscall-list.h + * sysdeps/unix/sysv/linux/mips/configure.in: Use _ABIO32, _ABIN32 + and _ABI64 for ABI selection in generated asm-unistd.h. + * sysdeps/unix/sysv/linux/mips/configure: Regenerate. + + * sysdeps/unix/sysv/linux/mips/pwrite.c (__libc_pwrite): Correct + an inverted _MIPS_SIM conditional. + +2004-11-23 Alexandre Oliva + + * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Use free + range even if it doesn't match exactly. + +2004-11-23 Jakub Jelinek + + * nss/nss_files/files-XXX.c (internal_getent): If parse_line returned + -1, also do H_ERRNO_SET (NETDB_INTERNAL). + +2004-11-22 Ulrich Drepper + + * sysdeps/i386/fpu_control.h: Add volatile to the asms. + Patch by Alexander Stohr. + +2004-11-22 Jakub Jelinek + + * nscd/nscd_getai (__nscd_getai): Avoid memory and file descriptor + leaks. + * sysdeps/posix/getaddrinfo.c (gaih_inet): Free air. + +2004-11-15 Maciej W. Rozycki + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h (__SI_MAX_SIZE): + Define appropriately based on __WORDSIZE. + [struct siginfo] (__pad0): Add for explicit padding. + + * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Formatting fixes + throughout. + +2004-11-22 Ulrich Drepper + + * dirent/dirent.h: Add nonnull attributes. + * dlfcn/dlfcn.h: Likewise. + +2004-11-20 Jakub Jelinek + + * sysdeps/ieee754/k_standard.c: Document code 50. + (__kernel_standard) : Avoid raising div-by-zero + exception again. + +2004-11-19 H.J. Lu + + [BZ #552] + * math/libm-test.inc (tgamma_test): Update tgamma (0) and + tgamma (-0). + * sysdeps/generic/w_tgamma.c (__tgamma): Properly handle |x| == 0. + * sysdeps/generic/w_tgammaf.c (__tgammaf): Likewise. + * sysdeps/generic/w_tgammal.c (__tgammal): Likewise. + * sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r): Likewise. + * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise. + * sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise. + * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise. + * sysdeps/ieee754/k_standard.c (__kernel_standard): Handle + tgamma (0) and tgamma (-0). + +2004-11-20 Ulrich Drepper + + * time/tzfile.c (__tzfile_read): Avoid open for checking whether + the file we already use changed. + + * misc/syslog.c: Remove !USE_IN_LIBIO code. + +2004-11-20 Jakub Jelinek + + * signal/signal.h (__sysv_signal, sysv_signal, signal, bsd_signal, + ssignal): Remove __nonnull attribute. + +2004-11-20 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/sys/procfs.h: New file. + +2004-11-20 Ulrich Drepper + + * signal/signal.h: Add nonnull attributes. + + * signal/signal.h: Add deprecated attributes to sigstack, + sigpause, sigblock, sigsetmask, siggetmask. + +2004-11-20 Jakub Jelinek + + * sysdeps/unix/sysv/linux/bits/socket.h (SCM_RIGHTS): Avoid + comma at the end of enum if __USE_BSD is not defined. + +2004-11-19 Ulrich Drepper + + * malloc/malloc.c (_int_malloc): Check for corruption of chunk + which is about to be returned. + + * malloc/malloc.c (_int_free): Add a few more cheap tests for + corruption. + +2004-11-17 Randolph Chung + + * sysdeps/hppa/dl-machine.h (TRAMPOLINE_TEMPLATE): Add unwind + annotations. + +2004-11-18 Jakub Jelinek + + [BZ #544] + * posix/regex.h (RE_NO_SUB): New define. + * posix/regex_internal.h (OP_DELETED_SUBEXP): New. + (re_dfa_t): Add subexp_map. + * posix/regcomp.c (struct subexp_optimize): New type. + (optimize_subexps): New routine. + (re_compile_internal): Call it. + (re_compile_pattern): Set preg->no_sub to 1 if RE_NO_SUB. + (free_dfa_content): Free subexp_map. + (calc_inveclosure, calc_eclosure): Skip OP_DELETED_SUBEXP nodes. + * posix/regexec.c (re_search_internal): If subexp_map + is not NULL, duplicate registers as needed. + * posix/Makefile: Add rules to build and run tst-regex2. + * posix/tst-regex2.c: New test. + * posix/rxspencer/tests: Fix last two tests (\0 -> \1). + Add some new tests for nested subexpressions. + +2004-11-18 Ulrich Drepper + + * libio/libio.h (_IO_FLAGS2_FORTIFY): Renamed from + _IO_FLAGS2_CHECK_PERCENT_N. + * debug/fprintf_chk.c: Adjust all users. + * debug/printf_chk.c: Likewise. + * debug/vfprintf_chk.c: Likewise. + * debug/vprintf_chk.c: Likewise. + * debug/vsnprintf_chk.c: Likewise. + * debug/vsprintf_chk.c: Likewise. + * stdio-common/vfprintf.c: Likewise. Detect missing %N$ formats. + * debug/tst-chk1.c: Test detection of missing %N$ formats. + +2004-11-15 Jakub Jelinek + + * posix/bug-regex24.c: Include string.h. + + * nis/nis_clone_obj.c (nis_clone_object): Rename out3 label to out2 + and out2 to out. Remove out label. Formatting. + +2004-11-15 Ulrich Drepper + + * include/stdio.h: Do not mark __libc_message as noreturn. + * sysdeps/unix/sysv/linux/libc_fatal.c (__libc_fatal): Add loop to + fool gcc. Include . + * sysdeps/posix/libc_fatal.c (__libc_fatal): Add loop to fool gcc. + (__libc_message): Fix typo. + +2004-11-13 Ulrich Drepper + + * malloc/malloc.c (malloc_state): stat_lock_* elements need only + be defined if THREAD_STATS is defined. Remove pad0_ since it does + not align with cache line sizes in general anyway. + +2004-11-13 Jakub Jelinek + + * elf/rtld.c (print_statistics): Avoid segfaults if not all namespaces + are used. Fix computation of num_relative_relocations on RELA + architectures other than IA-64 and Alpha. + +2004-11-13 Ulrich Drepper + + * malloc/malloc.c (_int_free): Use munmap_chunk for handling + mmaped memory. + +2004-11-12 Ulrich Drepper + + * malloc/malloc.c (_int_free): Remove test for NULL parameter. + (_int_realloc): Call _int_free only if memory parameter is not NULL. + + * sysdeps/unix/sysv/linux/libc_fatal.c: Add new function __libc_message + which performs the printing and simple format string handling. The + string is written to tty, stderr, syslog in this order, stopping after + the first successful output. + (__libc_fatal): Call __libc_message. + * include/stdio.h: Declare __libc_message. + * malloc/malloc.c (malloc_printerr): Use __libc_message. + * debug/chk_fail.c: Also print message with __libc_message. + * debug/test-strcpy_chk.c: Ensure that debug messages are not printed + to the terminal or stderr. + * debug/tst-chk1.c: Likewise. + + * posix/Makefile: Remove gpl2lgpl variable. + +2004-11-12 Martin Schwidefsky + + * elf/elf.h: Add 20 bit relocations R_390_*20. + +2004-11-12 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/setuid.c: Include linux/posix_types.h. + * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. + +2004-11-12 Andreas Schwab + + * nis/ypclnt.c (ypprot_err): Fix "minor optimizations". + +2004-11-12 Ulrich Drepper + + * posix/Makefile (tests): Add bug-regex24. + * posix/bug-regex24.c: New file. + +2004-11-12 Paolo Bonzini + + * posix/regexec.c (check_dst_limits_calc_pos_1): Use the map to + cut recursive paths. Make exit condition more precise. + (match_ctx_add_entry): Initialize the map. + * posix/regex_internal.h (struct re_backref_cache_entry): Add a map of + reachable subexpression nodes from each backreference cache entry. + +2004-11-10 Jakub Jelinek + + * sysdeps/unix/sysv/linux/setreuid.c: Remove sys/syscall.h, + sys/types.h, linux/posix_types.h, sysdep.h and pthread-functions.h + includes. Include setxid.h. Use INLINE_SETXID_SYSCALL macro + instead of INLINE_SYSCALL, kill the HAVE_PTR__NPTL_SETXID guarded + snippets. + * sysdeps/unix/sysv/linux/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/setreuid.c: Likewise. + Formatting. Change signed int into int. + * sysdeps/unix/sysv/linux/alpha/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/alpha/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid): + Remove. + * sysdeps/unix/setxid.h: New file. + + * Rules (binaries-static): Add xtests-static. + * Makeconfig (run-program-prefix): Filter also xtests-static. + +2004-11-09 Paul Eggert since it is marked as an obsolescent + interface. Include , , and instead. + (TYPE_BITS, TYPE_FLOATING, TYPE_SIGNED): New macros. + (subtract): New static function, that works correctly without + double-rounding, even on hosts with 64-bit time_t. Also cater + to hosts with padding bits. + (__difftime): Use it. Use DBL_MANT_DIG and LDBL_MANT_DIG to + determine whether floating types are wide enough: the old + test (which used sizeof) could in theory report the wrong results + on hosts with padding bits in floating-point values. + +2004-11-11 Simon Josefsson + + [BZ #542] + * sysdeps/generic/strtok_r.c [HAVE_CONFIG_H]: Include config.h. + [!_LIBC]: Include strtok_r.h (in gnulib), map __strtok_r to + strtok_r and __rawmemchr to strch. + (__strtok_r): Use C89 prototype. + [weak_alias]: Move calls to libc_hidden_def and weak_alias into + this #ifdef. + +2004-11-10 Paul Eggert + + [BZ #541] + * time/mktime.c (SHR): New macro, which is a portable + substitute for >> that should work even on Crays. + (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it. + Problem reported by Mark D. Baushke in + . + +2004-11-09 Paolo Bonzini + + * posix/regexec.c (match_ctx_free_subtops): Remove, merge into... + (match_ctx_clean): ... this function. + (match_ctx_free): Call match_ctx_clean. + + * posix/regexec.c (transit_state): Remove the check for + out-of-bounds buffers. + (check_matching): Check here for out-of-bounds buffers. + (re_search_internal): Store into match_kind a set of bits + indicating which incantation of fastmap scanning must be + used. Use a switch statement instead of multiple ifs. + Exit the final "for (;;)" with goto free_return unless + the match succeeded, thus simplifying some conditionals. + + * posix/regex_internal.c (re_string_reconstruct, + re_string_context_at): Add several branch predictions for + case-sensitive matching and no transition table being used. + +2004-11-10 Ulrich Drepper + + * posix/tst-waitid.c: Don't use error to print error message, they + won't end up in the .out file. + +2004-11-09 Ulrich Drepper + + * nscd/nscd-client.h (libc_locked_map_ptr): Add new first + parameter, used as class for definition. + * nscd/nscd_getpw_r.c: Adjust for libc_locked_map_ptr change. + (pw_map_free): Ensure no crash after memory is freed. + * nscd/nscd_getgr_r.c: Likewise. Make map externally visible. + * nscd/nscd_gethst_r.c: Likewise. + * nscd/nscd_getai.c: Use map from nscd_gethost.c. + * nscd/nscd_initgroups.c: Use map from nscd_getgr.c. + + * nscd/nscd_getai.c: Add some checks to detect corrupt databases. + * nscd/nscd_getgr_r.c: Likewise + * nscd/nscd_gethst_r.c: Likewise. + * nscd/nscd_getpw_r.c: Likewise + +2004-11-09 Jakub Jelinek + + * posix/regcomp.c (calc_eclosure_iter): Don't access + dfa->edests[node].elems[0] if dfa->edests[node].nelem == 0. + * posix/rxspencer/tests: Add 5 new tests. + +2004-11-09 Ulrich Drepper + + * sysdeps/unix/sysv/linux/ifaddrs.c: Determine sin6_scope_id field + value correctly. Patch by Mitsuru Kanda . + +2004-11-04 Jakub Jelinek + + * libio/fileops.c (_IO_new_file_seekoff): If mode is 0 and + fp->_offset == _IO_pos_BAD, just call _IO_SYSSEEK (fp, 0, dir) + and if successful set fp->_offset. + * libio/Makefile (tests): Add bug-ungetc3. + * libio/bug-ungetc3.c: New test. + +2004-11-03 Marcus Brinkmann + + * sysdeps/gnu/_G_config.h (_G_HAVE_MREMAP): Define symbol. + * sysdeps/mach/hurd/_G_config.h: New file. + * libio/fileops.c (mmap_remap_check) [__linux__]: Replaced with + [_G_HAVE_MREMAP]. + +2004-11-08 Ulrich Drepper + + * posix/regcomp.c (utf8_sb_map): Define. + (free_dfa_content): Don't free dfa->sb_char if it's a pointer to + utf8_sb_map. + (init_dfa): Use utf8_sb_map instead of initializing memory when the + encoding is UTF-8. + +2004-11-03 Paolo Bonzini + + * posix/regcomp.c (init_dfa): Get the codeset name outside glibc as + well. Check if it is spelled UTF8 as well as UTF-8, and check + case-insensitively. Set dfa->map_notascii manually when outside + glibc. + * posix/regex_internal.c (build_wcs_upper_buffer) [!_LIBC]: Enable + optimizations based on map_notascii. + * posix/regex_internal.h [HAVE_LANGINFO_H || HAVE_LANGINFO_CODESET + || _LIBC]: Include langinfo.h. + + * posix/regex_internal.h (struct re_backref_cache_entry): Add "more" + field. + * posix/regexec.c (check_dst_limits): Hoist computation of the source + and destination bkref_idx out of the loop. Pass it to + check_dst_limits_calc_pos. + (check_dst_limits_calc_pos_1): New function, containing the recursive + loop of check_dst_limits_calc_pos; uses the "more" field of + struct re_backref_cache to control the loop. + (check_dst_limits_calc_pos): Store into "boundaries" the position + relative to lim's start and end positions. Do not accept eclosures, + accept bkref_idx instead. Call check_dst_limits_calc_pos_1 to do the + work. + (sift_states_bkref): Use the "more" field of struct re_backref_cache + to control the loop. A big "if" was turned into a continue and the + function was reindented. + (get_subexp): Use the "more" field of struct re_backref_cache + to control the loop. + (match_ctx_add_entry): Initialize the bkref_ents' "more" field. + (search_cur_bkref_entry): Return -1 if out of bounds. + + * posix/regexec.c (empty_set): Remove. + (sift_states_backward): Remove cur_src variable. Move inner loop + to build_sifted_states. + (build_sifted_states): Extract from sift_states_backward. Do not + use empty_set. + (update_cur_sifted_state): Do not use empty_set. Special case + dest_nodes->nelem == 0. + + * posix/regex_internal.h (struct re_backref_cache_entry): Remove flag + field. + (struct re_sift_context_t): Remove cur_bkref, cls_subexp_idx, + check_subexp fields. Move limits last. + * posix/regexec.c (match_ctx_clear_flag): Remove. + (sift_ctx_init): Remove check_subexp parameter. Do not set removed + fields. Callers adjusted. + (expand_bkref_cache): Remove last_str parameter. Callers adjusted. + (re_search_internal): Remove fast_translate variable. + (update_cur_sifted_state): Pass candidates as the final parameter + to sift_states_bkref. + (sift_states_bkref): Change last unused parameter to be "candidates", + do not fetch candidates into a local variable. + Remove dead test for "node == sctx->bkref", and the cur_bkref_idx + variable. + Remove loops that set/reset the flag field of backref cache entries. + (check_arrival_add_next_nodes): Use a signed int to hold the return + value of re_node_set_insert. + (group_nodes_into_DFAstates): Likewise. + (match_ctx_add_entry): Do not set the flag field of the new entry. + +2004-11-05 Roland McGrath + + * sysdeps/generic/ldsodefs.h (struct rtld_global_ro): Define + _dl_sysinfo_dso under [NEED_DL_SYSINFO_DSO] as well. + * elf/rtld.c (dl_main): Set up GLRO(dl_sysinfo_dso) under + [NEED_DL_SYSINFO_DSO] as well. + * sysdeps/generic/dl-sysdep.c (_dl_show_auxv): Always include + AT_SYSINFO and AT_SYSINFO_EHDR in name table. + (_dl_sysdep_start) [NEED_DL_SYSINFO_DSO]: Match AT_SYSINFO_EHDR. + * elf/dl-support.c (_dl_sysinfo_dso): Define also under + [NEED_DL_SYSINFO_DSO]. + (_dl_aux_init) [NEED_DL_SYSINFO || NEED_DL_SYSINFO_DSO]: + Match AT_SYSINFO_EHDR and set GL(dl_sysinfo_dso). + +2004-11-05 Roland McGrath + + * manual/errno.texi (Error Codes): Revert last change for now. + * sysdeps/gnu/errlist.c: Regenerated. + +2004-11-04 Roland McGrath + + * Makeconfig (link-libc, rpath-dirs): Remove AIX cruft definitions. + (LDFLAGS-rpath-ORIGIN, LDFLAGS-soname-fname): Likewise. + (LDFLAGS-rdynamic, LDFLAGS-Bsymbolic): Likewise. + ($(common-objpfx)gnu/lib-names.stmp): Likewise. + +2004-11-01 Jakub Jelinek + + * sysdeps/unix/sysv/linux/x86_64/sys/procfs.h [__WORDSIZE == 32] + (elf_fpxregset_t): New type. + (struct elf_prpsinfo): If __WORDSIZE == 32, change pr_[ug]id type + to unsigned short int. + * sysdeps/unix/sysv/linux/x86_64/sys/user.h + (struct user_fpregs_struct): Fix comment. + * sysdeps/i386/fpu/bits/mathdef.h (float_t, double_t): If + __FLOAT_EVAL_METHOD__ is defined and 0, typedef to float resp. double. + * sysdeps/x86_64/fpu/bits/mathdef.h: Include bits/wordsize.h. + (float_t, double_t): If -m32 and not -mfpmath=sse, typedef to + long double. + * sysdeps/x86_64/fpu/bits/fenv.h: Include bits/wordsize.h. + (fenv_t): Remove __mxcsr field for -m32. + +2004-11-04 Jakub Jelinek + + * libio/ftello.c (ftello): Don't subtract save_end - save_base + if pos is _IO_pos_BAD. + * libio/ftello64.c (ftello64): Likewise. + * libio/iofgetpos.c (_IO_new_fgetpos): Likewise. + * libio/iofgetpos64.c (_IO_new_fgetpos64): Likewise. + * libio/oldiofgetpos.c (_IO_old_fgetpos): Likewise. + * libio/oldiofgetpos64.c (_IO_old_fgetpos64): Likewise. + * libio/ioftell.c (_IO_ftell): Likewise. + Cast to long int instead of off_t when checking for overflow. + +2004-11-04 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/register-dump.h (regnames): Align. + (linefeed): Remove. + (register_dump): Rewrite to generate into a flat buffer instead + of into iovecs. + +2004-11-02 Jakub Jelinek + + * debug/tst-chk1.c (ret): New volatile variable. + (CHK_FAIL_END): Remove redundant ret setting. + (do_test): Remote ret variable. + +2004-01-03 Paolo Bonzini + + * posix/regex_internal.h (__regfree) [!_LIBC]: Define to regfree. + +2004-11-03 Marcus Brinkmann + + * sysdeps/generic/utime.c: Include . + + * sysdeps/generic/sysconf.c: Include and . + + * sysdeps/generic/tempname.c (__path_search): Add missing argument + TRY_TMPDIR. + +2004-10-31 Mariusz Mazur + + * sysdeps/unix/sysv/linux/alpha/setregid.c: New file. + * sysdeps/unix/sysv/linux/alpha/setresgid.c: New file. + * sysdeps/unix/sysv/linux/alpha/setresuid.c: New file. + * sysdeps/unix/sysv/linux/alpha/setreuid.c: New file. + +2004-10-27 Derek R. Price + + [BZ #487] This change is imported from gnulib. + * time/mktime.c (not_equal_tm) [DEBUG]: Remove redundant check. + +2004-10-24 Paul Eggert + + [BZ #473] + * time/tst-mktime.c (main): Don't assume that mktime fails + when given time stamps before 1970. It returns negative + time_t values instead, for compatibility with BSD. + + * time/tst-mktime2.c: New file. + * time/Makefile (tests): Add it. + + [BZ #473] Import from gnulib. Revamp to avoid several problems near + time_t extrema, and on hosts with 64-bit time_t and 32-bit int. + This fixes Debian bug 177940. + * time/mktime.c (TIME_T_MIDPOINT): New macro. + (ydhms_diff): Renamed from ydhms_tm_diff, with a new signature, + which avoids overflow problems on hosts with 64-bit time_t and + 32-bit int. All callers changed. Now an inline function. + Verify at compile-time that long int is wide enough to avoid + these overflow problems. + (guess_time_tm): New function. + (__mktime_internal): Use it. Avoid overflow when computing yday on + hosts with 64-bit long and 32-bit int. Remove tests for 69; + no longer needed. Use if rather than #ifdef for LEAP_SECONDS_POSSIBLE + so that the code is checked by more compilers. + Do not rely on floating point to probe: stick to integer arithmetic, + to avoid potential porting problems. + Repair potential overflow correctly in the Southern Hemisphere. + (localtime_offset): Add a FIXME for the case where time_t is unsigned. + +2004-10-30 Andreas Schwab + + * sysdeps/m68k/dl-machine.h (elf_machine_rela) + (elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto + instead of static. + +2004-10-30 Andreas Schwab + + * sysdeps/unix/sysv/linux/waitid.c: Include for NULL. + +2004-10-30 Ulrich Drepper + + * malloc/malloc.c (_int_free): Use unique comments for the error + cases. + +2004-10-28 Roland McGrath + + * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_fork): Use i386_thread_state + instead of machine_thread_state. + +2004-10-28 Roland McGrath + + * sysdeps/unix/sysv/linux/syscalls.list: Remove setaltroot. + +2004-10-28 Ulrich Drepper + + * elf/dl-open.c (dl_open_worker): Remove reference to glibcbug script. + +2004-10-27 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object): Use cache_rpath to check for + existing rpath in main executable, not explicit test. + +2004-10-27 Jakub Jelinek + + * include/resolv.h (_res_opcodes): New extern. + Add libresolv_hidden_proto. + * resolv/res_debug.c (_res_opcodes): Remove. + (__p_class_syms, __p_type_syms): Add libresolv_hidden_proto + and libresolv_hidden_data_def. Remove attribute_hidden. + * resolv/res_mkquery (_res_opcodes): Remove. + * resolv/res_data.c (_res_opcodes): Remove attribute_hidden. + Add libresolv_hidden_data_def. + +2004-10-27 Ulrich Drepper + + * elf/dl-open.c (_dl_open): Don't allow explicitly opening a DSO + into an empty namespace. + + * elf/dl-fini.c (_dl_fini): Fix search for map in maps array. + Reverse order of namespaces. + * elf/Makefile: Add rules to build and run tst-dlmopen3. + * elf/tst-dlmopen3.c: New file. + * elf/tst-dlmopen1mod.c: Add check whether constructor runs. + +2004-10-27 Jakub Jelinek + + * sysdeps/generic/glob.c (globfree): Clear gl_pathv after freeing it. + * posix/Makefile: Add rules to build and run bug-glob2 test. + * posix/bug-glob2.c: New test. + +2004-10-27 Roland McGrath + + * sysdeps/mach/hurd/i386/tls.h (HURD_TLS_DESC_DECL): New macro. + (_hurd_tls_init): Use it. + (_hurd_tls_fork): New function. + * sysdeps/mach/hurd/fork.c (__fork) [USE_TLS]: Call it. + +2004-10-26 Roland McGrath + + * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Initialize TCB->tcb. + +2004-10-26 Jakub Jelinek + + * sysdeps/gnu/netinet/udp.h (struct udphdr): Use u_int16_t + type instead of uint16_t. Formatting. + +2004-10-25 Roland McGrath + + * login/openpty.c (openpty): Add libutil_hidden_def. + + * nss/nss_files/files-parse.c (nss_files_parse_hidden_def): Define to + either libc_hidden_def or libnss_files_hidden_def, not hidden_def. + This file is also compiled into libnss_hesiod by #include. + +2004-10-25 Roland McGrath + + * sysdeps/unix/bsd/hp: Directory and all files removed. + These are now in the ports repository. + * sysdeps/unix/bsd/osf: Likewise. + * sysdeps/unix/bsd/sequent: Likewise. + * sysdeps/unix/bsd/sony: Likewise. + * sysdeps/unix/bsd/ultrix4: Likewise. + * sysdeps/unix/sysv/aix: Likewise. + * sysdeps/unix/sysv/hpux: Likewise. + * sysdeps/unix/sysv/irix4: Likewise. + * sysdeps/unix/sysv/isc2.2: Likewise. + * sysdeps/unix/sysv/minix: Likewise. + * sysdeps/unix/sysv/sco3.2.4: Likewise. + * sysdeps/unix/sysv/sco3.2: Likewise. + * sysdeps/unix/sysv/sysv4: Likewise. + + * configure.in (ASM_LINE_SEP): Move this setting to ... + * sysdeps/hppa/configure.in: ... here, new file. + * sysdeps/hppa/configure: New generated file. + * configure: Regenerated. + +2004-10-25 Kaz Kojima + + * sysdeps/sh/dl-machine.h: Include sysdep.h. + (ELF_MACHINE_RUNTIME_TRAMPOLINE): Add CFI directives. + (elf_machine_runtime_setup): Add always_inline attribute. + (_dl_start_user): Pass the correct environ. + (elf_machine_rela): Replace static inline by auto inline, add + always_inline attribute. + (elf_machine_rela_relative): Likewise. + (elf_machine_lazy_rel): Likewise. + +2004-10-24 Ulrich Drepper + + * nis/nis_call.c: Pretty printing. Minor cleanups. + * nis/nis_addmember.c (nis_addmember): Add assert to check buffer + bounds. + + * resolv/nss_dns/dns-host.c: Avoid using PLTs. + * include/libc-symbols.h: Define hidden attribute macros for + libnss_nisplus and libutil. + * include/utmp.h: Add libutil_hidden_proto for login_tty. + * login/login_tty.c: Add libutil_hidden_def. + * nis/nisplus-parser.h: Add libnss_nisplus_hidden_proto for parsers. + * nis/nss_nisplus/nisplus-parser.c: Add libnss_nisplus_hidden_def. + * include/pty.h: New file. + * include/rpcsvc/yp.h: New file. + * include/rpcsvc/ypclnt.h: New file. + * include/rpcsvc/ypupd.h: New file. + * include/libc-symbols.h: Define hidden attribute macros for libnsl. + * include/rpcsvc/nislib.h: Use libnsl_hidden_proto for various + functions. + * nis/nis_add.c: Add libnsl_hidden_def. Minor optimizations. + * nis/nis_call.c: Likewise. + * nis/nis_clone_obj.c: Likewise. + * nis/nis_defaults.c: Likewise. + * nis/nis_domain_of_r.c: Likewise. + * nis/nis_error.c: Likewise. + * nis/nis_file.c: Likewise. + * nis/nis_free.c: Likewise. + * nis/nis_local_names.c: Likewise. + * nis/nis_lookup.c: Likewise. + * nis/nis_modify.c: Likewise. + * nis/nis_print.c: Likewise. + * nis/nis_remove.c: Likewise. + * nis/nis_subr.c: Likewise. + * nis/nis_table.c: Likewise. + * nis/nis_util.c: Likewise. + * nis/yp_xdr.c: Likewise. + * nis/ypclnt.c: Likewise. + * nis/ypupdate_xdr.c: Likewise. + + * resolv/res_send.c (send_dg): Cope with failures. + + * include/libc-symbols.h: Define hidden attribute macros for + libnss_files. + * include/netdb.h: Use libnss_files_hidden_proto for the parsers + defined in libnss_files, not libc_hidden_proto. + * include/netinet/ether.h: Likewise. + * include/rpc/netdb.h: Likewise. + * nss/nss_files/files-parse.c: Use hidden_def in parser definitions + instead of libc_hidden_def. + * nss/nss_files/files-netgrp.c: Add libnss_files_hidden_def to + _nss_netgroup_parseline definition. + +2004-10-23 Roland McGrath + + * sysdeps/mach/hurd/i386/tls.h (_hurd_tls_init): Don't return early + after an RPC succeeds. + + * sysdeps/vax, sysdeps/unix/bsd/vax: Directories and all files removed. + These are now in the ports repository. + * sysdeps/tahoe, sysdeps/unix/bsd/tahoe: Likewise. + * sysdeps/cris, sysdeps/unix/sysv/linux/cris: Likewise. + * sysdeps/am29k, sysdeps/i860, sysdeps/i960, sysdeps/m88k: Likewise. + * sysdeps/standalone, sysdeps/z8000: Likewise. + +2004-10-23 Ulrich Drepper + + * resolv/res_send.c (send_dg): Combine write and read to socket + into one loop. + +2004-10-22 Roland McGrath + + * Makefile (%.bz2, %.gz): Move these pattern rules ... + * Makerules: ... to here. + +2001-10-31 Alexandre Oliva + + * elf/elf.h: Add R_MN10300_* relocation numbers. + +2004-10-22 Paul Eggert + + [BZ #471] Fix imported from gnulib. + * time/mktime.c (leapyear, ydms_tm_diff): Year is of type + long int, not int, to avoid problems when tm_year == INT_MAX + and tm_mon > 12. + (__mktime_intenral): Compute year using long int arithmetic, + not int arithmetic, to avoid problems on hosts where time_t + and long are 64 bits but int is 32. + + [BZ #468] Import a fix from gnulib. + * time/mktime.c [! DEBUG]: Do not include . + It's needed only if DEBUG is nonzero. + + [BZ #470] Import fix from gnulib. + * time/mktime.c [!_LIBC] (__mktime_internal): Define to + mktime_internal, to avoid clashes with any __mktime_internal + function defined in the standard library. + + [BZ #469] Imported from gnulib. + * time/mktime.c (__isleap): Remove; all uses replaced by: + (leapyear): New function, which avoids overflow by not adding + 1900 to year before testing whether it is a leap year. + + [BZ #472] Imported from gnulib. + * time/mktime.c (Local Variables): Remove -DHAVE_TIME_R_POSIX; + no longer used. + +2004-10-22 Ulrich Drepper + + * resolv/res_send.c: Remove compatibility code which is unused in + glibc and probably bitrotten. + + * debug/execinfo.h: Remove __THROW from backtrace prototype. + +2004-10-22 Jakub Jelinek + + * sysdeps/i386/Makefile (CFLAGS-backtrace.c): Add -fexceptions. + * sysdeps/i386/backtrace.c: Include , , + and . Remove include. + (struct trace_arg): New type. + (unwind_backtrace, unwind_getip, unwind_getcfa, unwind_getgr): New + fn pointers resp. macros. + (init, backtrace_helper): New functions. + (__backtrace): Rewritten to use _Unwind_Backtrace first and fall + back to frame pointer walking. + +2004-10-22 Ulrich Drepper + + * sysdeps/unix/sysv/linux/Versions: Things are still in flux, it + seems. Undo last additions. + +2004-10-21 Ulrich Drepper + + * posix/execvp.c (execvp): Also ignore ENODEV and ETIMEDOUT errno + values. + +2004-10-20 Roland McGrath + + * Makeconfig ($(common-objpfx)shlib-versions.v.i): Check also + $(config-sysdirs) for shlib-versions files. + + * Makeconfig ($(common-objpfx)soversions.i): Replace shell loop with + use of ... + * scripts/soversions.awk: ... this new file. Collect lib info and + match any DEFAULT line before emitting anything, so DEFAULT can come + later in the concatenation of shlib-versions files. + + * manual/errno.texi (Error Codes): Add ENOKEY, EKEYEXPIRED, + EKEYREVOKED, EKEYREJECTED. + * sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.3.4): New errlist. + * sysdeps/gnu/errlist.c: Regenerated + + * sysdeps/gnu/errlist-compat.awk: Don't bail if Versions gives a count + higher than ERR_MAX reports. Instead, emit a #define ERR_MAX. + * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.h): New target. + (generated): Add errlist-compat.h. + * sysdeps/gnu/errlist.awk: Make output #include to + define ERR_MAX and use that for table size. + +2004-10-20 Ulrich Drepper + + * sysdeps/unix/sysv/linux/syscalls.list: Add entries for setaltroot, + key_add, key_request, and keyctl syscalls. + * sysdeps/unix/sysv/linux/Versions: Export them. + +2004-10-19 Roland McGrath + + * sysdeps/mach/readonly-area.c: New file. + +2004-10-19 Ulrich Drepper + + * elf/Versions [ld, GLIBC_PRIVATE]: Add _dl_debug_state. + * elf/dl-debug.c (_dl_debug_state): Add rtld_hidden_def. + * sysdeps/generic/ldsodefs.h (_dl_debug_state): Don't mark as + hidden but use rtld_hidden_proto. + +2004-10-19 Alfred M. Szmidt + + * sysdeps/generic/readonly-area.c (__readonly_str): Renamed to ... + (__readonly_area): ... this. + +2004-10-18 Jakub Jelinek + + * sysdeps/generic/strcpy_chk.c (__strcpy_chk): Speed up by checking + destlen only every 4 bytes. + +2004-10-19 Ulrich Drepper + + * nss/getent.c (hosts_keys): Let inet_pton decide whether the + string is an address or not. + +2004-10-19 Jakub Jelinek + + * elf/dl-addr.c (_dl_addr): Don't look at STT_TLS symbols. + Use DL_SYMBOL_ADDRESS to set dli_saddr. + + * debug/Makefile (catchsegv): Prefix $LIB with a backslash. + +2004-10-19 Ulrich Drepper + + * debug/Makefile ($(objpfx)catchsegv): To support multilib + platforms, use $LIB in path to slibdir. + +2004-10-19 Jakub Jelinek + + * debug/catchsegv.sh: Update copyright year. + Use mktemp to create segv_output file. + +2004-10-18 Jakub Jelinek + + * elf/dl-libc.c (__libc_dlsym_private, __libc_register_dl_open_hook): + New functions. + (__libc_dlopen_mode): Call __libc_register_dl_open_hook and + __libc_register_dlfcn_hook. + * dlfcn/Makefile (routines, elide-routines.os): Set. + Add rules to build and test tststatic2. + * dlfcn/tststatic2.c: New test. + * dlfcn/modstatic2.c: New test module. + * dlfcn/dladdr.c: Call _dlfcn_hook from libdl.so if not NULL. + Define __ prefixed routine in libc.a and in libdl.a just call it. + * dlfcn/dladdr1.c: Likewise. + * dlfcn/dlclose.c: Likewise. + * dlfcn/dlerror.c: Likewise. + * dlfcn/dlinfo.c: Likewise. + * dlfcn/dlmopen.c: Likewise. + * dlfcn/dlopen.c: Likewise. + * dlfcn/dlopenold.c: Likewise. + * dlfcn/dlsym.c: Likewise. + * dlfcn/dlvsym.c: Likewise. + * dlfcn/sdladdr.c: New file. + * dlfcn/sdladdr1.c: New file. + * dlfcn/sdlclose.c: New file. + * dlfcn/sdlerror.c: New file. + * dlfcn/sdlinfo.c: New file. + * dlfcn/sdlopen.c: New file. + * dlfcn/sdlsym.c: New file. + * dlfcn/sdlvsym.c: New file. + * dlfcn/Versions (libdl): Export _dlfcn_hook@GLIBC_PRIVATE. + * include/dlfcn.h (DL_CALLER_DECL, DL_CALLER RETURN_ADDRESS): Define. + (struct dlfcn_hook): New type. + (_dlfcn_hook): New extern decl. + (__dlopen, __dlclose, __dlsym, __dlerror, __dladdr, __dladdr1, + __dlinfo, __dlmopen, __libc_dlsym_private, + __libc_register_dl_open_hook, __libc_register_dlfcn_hook): New + prototypes. + (__dlvsym): Use DL_CALLER_DECL. + * include/libc-symbols.h: Define libdl_hidden_proto and friends. + + * malloc/arena.c (_dl_open_hook): Extern decl. + (ptmalloc_init): Don't call _dl_addr when dlopened from statically + linked programs but don't use brk for them either. + +2004-10-18 Roland McGrath + + * dlfcn/bug-dlsym1.c (main): Remove bogus setenv call. + +2004-10-18 Ulrich Drepper + + * elf/dl-open.c (dl_open_worker): Avoid dereferencing map in + statically linked code if there might none be found. + +2004-10-06 Maciej W. Rozycki + + * sysdeps/unix/sysv/linux/mips/mips32/sysdep.h + (__SYSCALL_CLOBBERS): Add "memory". + * sysdeps/unix/sysv/linux/mips/mips64/n32/sysdep.h + (__SYSCALL_CLOBBERS): Likewise. + * sysdeps/unix/sysv/linux/mips/mips64/n64/sysdep.h + (__SYSCALL_CLOBBERS): Likewise. + +2004-10-17 Ulrich Drepper + + * include/libc-symbols.h: Define libresolv_hidden_proto and friends. + * include/resolv.h: Add libresolv_hidden_proto for symbols defined, + used, and exported in libresolv. + * resolv/base64.c: Add libresolv_hidden_def. + * resolv/gethnamaddr.c: Likewise. + * resolv/ns_name.c: Likewise. + * resolv/ns_netint.c: Likewise. + * resolv/res_comp.c: Likewise. + * resolv/res_data.c: Likewise. + * resolv/res_debug.c: Likewise. + * resolv/res_mkquery.c: Likewise. + * resolv/res_query.c: Likewise. + * resolv/res_send.c: Likewise. + +2004-10-15 Jakub Jelinek + + * elf/dl-minimal.c (__chk_fail): New. Add rtld_hidden_def. + * sysdeps/unix/sysv/linux/readonly-area.c: New file. + * sysdeps/i386/i686/memmove.S (__memmove_chk): Add checking + routine. + * sysdeps/i386/i686/memcpy.S (__memcpy_chk): Likewise. + * sysdeps/i386/i686/mempcpy.S (__mempcpy_chk): Likewise. + * sysdeps/i386/i686/memset.S (__memset_chk): Likewise. + * sysdeps/i386/i686/memmove-chk.S: New file. + * sysdeps/i386/i686/memcpy-chk.S: Likewise. + * sysdeps/i386/i686/mempcpy-chk.S: Likewise. + * sysdeps/i386/i686/memset-chk.S: Likewise. + * sysdeps/generic/strcat-chk.c (__strcat_chk): Don't __chk_fail + if exactly fitting into buffer. + * sysdeps/generic/strncat-chk.c (__strncat_chk): Likewise. + * sysdeps/generic/readonly-area.c: New file. + * sysdeps/generic/strncpy-chk.c (__strncpy_chk): Only test + destlen once. + * sysdeps/x86_64/memset.S (__memset_chk): Add checking routine. + * sysdeps/x86_64/memcpy.S (__memcpy_chk): Likewise. + * sysdeps/x86_64/mempcpy.S (__memcpy_chk): Define to __mempcpy_chk. + * sysdeps/x86_64/memcpy-chk.S: New file. + * sysdeps/x86_64/mempcpy-chk.S: Likewise. + * sysdeps/x86_64/memset-chk.S: Likewise. + * sysdeps/x86_64/strcpy-chk.S: Likewise. + * sysdeps/x86_64/stpcpy-chk.S: Likewise. + * argp/argp-xinl.c (__OPTIMIZE__): Define to 1 instead of nothing. + * argp/argp-fs-xinl.c (__OPTIMIZE__): Likewise. + * debug/tst-chk1.c: New test. + * debug/tst-chk2.c: Likewise. + * debug/tst-chk3.c: Likewise. + * debug/test-strcpy_chk.c: Likewise. + * debug/test-stpcpy_chk.c: Likewise. + * debug/vsprintf_chk.c (__vsprintf_chk): If flags > 0, request + _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. + * debug/Makefile (routines): Add printf_chk, fprintf_chk, vprintf_chk, + vfprintf_chk, gets_chk and readonly-area. + (CFLAGS-*_chk.c): Set. + (tests): Add tst-chk1, tst-chk2, tst-chk3, test-strcpy_chk and + test-stpcpy_chk. + * debug/vprintf_chk.c: New file. + * debug/printf_chk.c: Likewise. + * debug/vfprintf_chk.c: Likewise. + * debug/fprintf_chk.c: Likewise. + * debug/gets_chk.c: Likewise. + * debug/chk_fail.c (__chk_fail): Add libc_hidden_def. + * debug/snprintf_chk.c (__snprintf_chk): Fix order of arguments + passed to __vsnprintf_chk. + * debug/Versions (libc): Export __printf_chk, __fprintf_chk, + __vprintf_chk, __vfprintf_chk and __gets_chk @GLIBC_2.3.4. + * debug/vsnprintf_chk.c (__vsnprintf_chk): Don't call + __vsnprintf, instead create a temporary file with + _IO_strn_jumps jumptable. If flags > 0, request + _IO_FLAGS2_CHECK_PERCENT_N. Add libc_hidden_def. + * libio/Makefile (headers): Add bits/stdio2.h. + * libio/stdio.h: Include if __USE_FORTIFY_LEVEL. + (sprintf, snprintf, vsprintf, vsnprintf): Remove defines. + * libio/strfile.h (_IO_strnfile): New type. + (_IO_strn_jumps): New extern. + * libio/vsnprintf.c (_IO_strnfile): Remove. + (_IO_strn_jumps): Remove static. + * libio/bits/stdio2.h: New file. + * libio/vswprintf.c (_IO_strnfile): Rename type to... + (_IO_wstrnfile): ...this. Adjust all uses. + * libio/libio.h (_IO_FLAGS2_CHECK_PERCENT_N): Define. + * stdio-common/vfprintf.c (STR_LEN): Define. + (vfprintf): Add readonly_format variable. + Handle _IO_FLAGS2_CHECK_PERCENT_N. + (buffered_vfprintf): Copy _flags2. + * include/stdio.h (__sprintf_chk, __snprintf_chk, __vsprintf_chk, + __vsnprintf_chk, __printf_chk, __fprintf_chk, __vprintf_chk, + __vfprintf_chk): New prototypes. + (__vsprintf_chk, __vsnprintf_chk): Add libc_hidden_proto. + * include/string.h (__memcpy_chk, __memmove_chk, __mempcpy_chk, + __memset_chk, __strcpy_chk, __stpcpy_chk, __strncpy_chk, __strcat_chk, + __strncat_chk): New prototypes. + * include/bits/string3.h: New file. + * include/sys/cdefs.h (__chk_fail): Add libc_hidden_proto + and rtld_hidden_proto. + * string/Makefile (headers): Add bits/string3.h. + * string/bits/string3.h (bcopy, bzero): New defines. + (memset, memcpy, memmove, strcpy, strncpy, strcat, strncat): Change + macros so that inlines are used only if unknown destination size + or side-effects in destination argument. + (mempcpy, stpcpy): Likewise. Protect with #ifdef __USE_GNU. + +2004-09-16 Ulrich Drepper + + * debug/Makefile (routines): Add *_chk. + * debug/Versions (libc): Export __chk_fail, __memcpy_chk, + __memmove_chk, __mempcpy_chk, __memset_chk, __stpcpy_chk, + __strcat_chk, __strcpy_chk, __strncat_chk, __strncpy_chk, + __sprintf_chk, __vsprintf_chk, __snprintf_chk, __vsnprintf_chk + @GLIBC_2.3.4. + * debug/chk_fail.c: New file. + * debug/snprintf_chk.c: Likewise. + * debug/sprintf_chk.c: Likewise. + * debug/vsnprintf_chk.c: Likewise. + * debug/vsprintf_chk.c: Likewise. + * include/features.h (_FORTIFY_SOURCE): Document, handle. + (__USE_FORTIFY_LEVEL): Define. + (__GNUC_PREREQ): Move to earlier location. + * include/sys/cdefs.h (__chk_fail): New prototype. + * libio/bits/stdio.h (sprintf, vsprintf, snprintf, vsnprintf): + Define if __USE_FORTIFY_LEVEL. + * misc/sys/cdefs.h (__bos, __bos0): Define. + * string/string.h: Include if __USE_FORTIFY_LEVEL. + * bits/string/string3.h: New header. + * sysdeps/generic/memcpy_chk.c: New file. + * sysdeps/generic/memmove_chk.c: Likewise. + * sysdeps/generic/mempcpy_chk.c: Likewise. + * sysdeps/generic/memset_chk.c: Likewise. + * sysdeps/generic/stpcpy_chk.c: Likewise. + * sysdeps/generic/strcat_chk.c: Likewise. + * sysdeps/generic/strcpy_chk.c: Likewise. + * sysdeps/generic/strncat_chk.c: Likewise. + * sysdeps/generic/strncpy_chk.c: Likewise. + +2004-10-17 Roland McGrath + + * manual/memory.texi (Page Lock Functions): Typo fix. + Reported by Carlos Maziero + +2004-10-16 Alfred M. Szmidt + + * sysdeps/mach/hurd/Makefile (link-libc-static): Use + `$(static-gnulib') instead of `$(gnulib)'. + +2004-10-17 Ulrich Drepper + + * sunrpc/rpc_clntout.c: Avoid including rcsid into binary. + * sunrpc/rpc_cout.c: Likewise. + * sunrpc/rpc_hout.c: Likewise. + * sunrpc/rpc_main.c: Likewise. + * sunrpc/rpc_parse.c: Likewise. + * sunrpc/rpc_sample.c: Likewise. + * sunrpc/rpc_scan.c: Likewise. + * sunrpc/rpc_svcout.c: Likewise. + * sunrpc/rpc_tblout.c: Likewise. + * sunrpc/rpc_util.c: Likewise. + +2004-10-15 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/sysdep.h (PUSHARGS_6, DOARGS_6, + POPARGS_6, _PUSHARGS_6, _DOARGS_6, _POPARGS_6): Define. + * sysdeps/unix/sysv/linux/i386/syscall.S (syscall): Handle 6 argument + syscalls. + +2004-10-15 Ulrich Drepper + + * nscd/nscd.h (_PATH_NSCD_PASSWD_DB): Move to /var/db. + (_PATH_NSCD_GROUP_DB): Likewise. + (_PATH_NSCD_HOSTS_DB): Likewise. + (_PATH_NSCD_XYZ_DB_TMP): New #define, point to /var/run. + * nscd/connections.c (nscd_init): Non-persistent database files + are created with the _PATH_NSCD_XYZ_DB_TMP path. + * nscd/nscd.init: Create /var/db/nscd if necessary. + +2004-10-15 Richard Henderson + + * sysdeps/unix/sysv/linux/alpha/register-dump.h: New file. + * sysdeps/unix/sysv/linux/alpha/sigcontextinfo.h (SIGCONTEXT): Add + _code argument, pass sigcontext by pointer. + (SIGCONTEXT_EXTRA_ARGS): Likewise. + (GET_PC, GET_FRAME, GET_STACK): Expect ctx as pointer. + +2004-10-14 Richard Henderson + + * sysdeps/alpha/dl-machine.h (elf_machine_rela, + elf_machine_rela_relative, elf_machine_lazy_rel): Mark auto + instead of static. + + * sysdeps/unix/sysv/linux/adjtime.c (ADJTIME): Use prototype + style definition. + * sysdeps/unix/sysv/linux/alpha/adjtime.c (ADJTIME): If + __ASSUME_TIMEVAL64, define __adjtime directly rather than + via strong_alias. + +2004-10-14 Ulrich Drepper + + * nscd/Makefile: When using compilers without -fpie support, also + link with -lselinux if necessary. + Patch by Arkadiusz Miskiewicz . + + * nscd/connections.c (nscd_init): Remove file if not persistent + and not shared. Patch by Jerome Borsboom . + +2004-10-14 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/setresuid.c: Handle + defined __NR_setresuid32 && !defined __NR_setresuid. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Handle + defined __NR_setresgid32 && !defined __NR_setresgid. + + * sysdeps/sparc/fpu/bits/mathinline.h (__signbitf, __signbit, + __signbitl, sqrtf, sqrt, sqrtl, fdim, fdimf): Use __NTH macro. + + * sysdeps/generic/errno-loc.c: Don't undef #errno + if RTLD_PRIVATE_ERRNO. + * include/errno.h (__errno_location): If RTLD_PRIVATE_ERRNO, + add attribute_hidden. + + * dlfcn/dlinfo.c (dlinfo_doit): Replace iteration over GL(dl_loaded) + chain with iteration over all namespaces' _ns_loaded chains. + * sysdeps/powerpc/powerpc32/dl-machine.c (__elf_preferred_address): + Likewise. + * sysdeps/mips/dl-machine.h (elf_machine_runtime_link_map): Likewise. + + * elf/rtld.c (_dl_start): Fix one last dl_loaded. + * elf/dl-load.c (_dl_map_object_from_fd): Avoid definition of + label when it is not needed. + * elf/dl-close.c (_dl_close): Typo: & -> &&. + +2004-10-12 Jakub Jelinek + + * sysdeps/generic/segfault.c: Include alloca.h and stdint.h. + Don't include frame.h. + (CURRENT_STACK_FRAME, INNER_THAN, ADVANCE_STACK_FRAME): Remove. + (catch_segfault): Use backtrace function. + + * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h: Fix comment. + * sysdeps/unix/sysv/linux/ia64/register-dump.h: New file. + * sysdeps/unix/sysv/linux/ia64/sigcontextinfo.h (GET_PC): Return sc_ip + field. + +2004-10-13 Ulrich Drepper + + Add support for namespaces in the dynamic linker. + * dlfcn/Makefile (libdl-routines): Add dlmopen. + * dlfcn/Versions [libdl, GLIBC_2.3.4]: Add dlmopen. + * dlfcn/dlfcn.h: Define Lmid_t, LM_ID_BASE, and LM_ID_NEWLM. + Declare dlmopen. Document RTLD_DI_LMID. + * dlfcn/dlinfo.c: Handle RTLD_DI_LMID. + * dlfcn/dlmopen.c: New file. + * dlfcn/dlopen.c: Pass new parameter to _dl_open. + * dlfcn/dlopenold.c: Likewise. + * elf/dl-addr.c: Adjust for removal of GL(dl_loaded). + * elf/dl-caller.c: Likewise. + * elf/dl-close.c: Likewise. + * elf/dl-conflict.c: Likewise. + * elf/dl-debug.c: Likewise. + * elf/dl-lookup.c: Likewise. + * elf/dl-sym.c: Likewise. + * elf/dl-version.c: Likewise. + * elf/do-lookup.h: Likewise. + * elf/rtld.c: Likewise. + * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. + * elf/dl-depsc: Likewise. Add new parameter to _dl_map_object. + * elf/dl-fini.c: Call destructors in all namespaces. + * elf/dl-iteratephdr.c: Compute total nloaded. Adjust for removal of + GL(dl_loaded). + * elf/dl-libc.c: Pass new parameter to _dl_open. Adjust for removal + of GL(dl_loaded). + * elf/dl-load.c (_dl_map_object_from_fd): Don't load ld.so a second + time. Reuse the one from the main namespace in all others. + Pass new parameter to _dl_new_object. + Adjust for removal of GL(dl_loaded). + * elf/dl-object.c: Take new parameter. Use it to initialize l_ns. + Adjust for removal of GL(dl_loaded). + * elf/dl-open.c (_dl_open): Take new parameter. + Adjust for removal of GL(dl_loaded). + * elf/dl-support.c: Replace global _dl_loaded etc variables with + _dl_ns variable. + * include/dlfcn.h: Adjust prototype of _dl_open. + Define __LM_ID_CALLER. + * include/link.h: Add l_real, l_ns, and l_direct_opencount elements. + * sysdeps/generic/dl-tls.c: Bump TLS_STATIC_SURPLUS. Since libc is + using TLS we need memory appropriate to the number of namespaces. + * sysdeps/generic/ldsodefs.h (struct rtld_global): Replace _dl_loaded, + _dl_nloaded, _dl_global_scope, _dl_main_searchlist, and + _dl_global_scope_alloc with _dl_ns element. Define DL_NNS. + Adjust prototypes of _dl_map_object and member in rtld_global_ro. + * malloc/malloc.c: Include . + * malloc/arena.c (ptmalloc_init): If libc is not in primary namespace, + never use brk. + * elf/Makefile: Add rules to build and run tst-dlmopen1 and + tst-dlmopen2. + * elf/tst-dlmopen1.c: New file. + * elf/tst-dlmopen1mod.c: New file. + * elf/tst-dlmopen2.c: New file. + + * elf/dl-close.c: Improve reference counting by tracking direct loads. + * elf/dl-lookup.c (add_dependency): Likewise. + * elf/dl-open.c (dl_open_worker): Likewise. + * elf/rtld.c (dl_main): Likewise. + +2004-09-09 GOTO Masanori + + [BZ #77] + * elf/dl-close.c: Count down l_opencount to check not only for + l_reldeps, but also l_initfini. + +2004-10-13 Ulrich Drepper + + * elf/dl-close.c (_dl_close): Update bug reporting instructions. + +2004-10-11 Ulrich Drepper + + * timezone/asia: Update from tzdata2004e. + * timezone/southamerica: Likewise. + * timezone/private.h: Update from tzcode2004e. + * timezone/zdump.c: Likewise. + + * stdio-common/vfscanf.c: Add support for reading localized + digits. Patch mainly by Hamed Malek . + + * resolv/res_init.c (res_thread_freeres): Reset _res.options. + [BZ #434] + + * resolv/res_send.c (send_dg): Use nonblocking sockets. Add + appropriate poll/select calls and restart operation if necessary. + Also handle EINTR. + + * elf/tst-dlopenrpath.c (do_test): Enable code which was disabled + for debugging. + + * elf/dl-sym.c (do_sym): Avoid using global variable. + + * elf/dl-addr.c (_dl_addr): Really use match everywhere. + +2004-10-09 Andreas Schwab + + * sysdeps/m68k/memcopy.h (WORD_COPY_BWD): Remove use of cast as + lvalue. + + * sysdeps/m68k/fpu/bits/mathinline.h: Remove __THROW from inline + definitions. + +2004-10-07 Andreas Schwab + + * misc/sys/uio.h: Change __vector to __iovec to avoid clash with + altivec. + +2004-10-06 Alan Modra + + * gmon/Makefile (CFLAGS-mcount.c): Move before inclusion of "Rules". + * sysdeps/powerpc/powerpc64/Makefile (CFLAGS-mcount.c): Add + -msoft-float. + * sysdeps/powerpc/powerpc64/sysdep.h (SAVE_ARG, REST_ARG): New macros. + (CALL_MCOUNT): Replace with a gas macro implementation. + (EALIGN): Delete PROF version. + * sysdeps/powerpc/powerpc64/__longjmp-common.S: Invoke CALL_MCOUNT. + * sysdeps/powerpc/powerpc64/bsd-_setjmp.S: Likewise. + * sysdeps/powerpc/powerpc64/bsd-setjmp.S: Likewise. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc64/memcpy.S: Likewise. + * sysdeps/powerpc/powerpc64/memset.S: Likewise. + * sysdeps/powerpc/powerpc64/stpcpy.S: Likewise. + * sysdeps/powerpc/powerpc64/strchr.S: Likewise. + * sysdeps/powerpc/powerpc64/strcmp.S: Likewise. + * sysdeps/powerpc/powerpc64/strcpy.S: Likewise. + * sysdeps/powerpc/powerpc64/strlen.S: Likewise. + * sysdeps/powerpc/powerpc64/strncmp.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_llround.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise. + * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise. + + * sysdeps/powerpc/powerpc64/setjmp-common.S: Add extra entry point + past _mcount call. + * sysdeps/powerpc/powerpc64/bsd-_setjmp.S: Use it. + * sysdeps/powerpc/powerpc64/bsd-setjmp.S: Likewise. + +2004-10-06 Ulrich Drepper + + * resolv/res_mkquery.c (res_nmkquery): Reject randombits value if + low 16 bits are zero. + +2004-10-06 Jakub Jelinek + + * posix/tst-getaddrinfo2.c: Include stdlib.h and string.h. + (do_test): Use %p instead of 0x%08X to print a pointer. + + * malloc/malloc.c: Include stdio-common/_itoa.h. + +2004-10-05 Ulrich Drepper + + * elf/rtld.c (dl_main): Use _dl_debug_printf instead of _dl_printf + for prelink message. + +2004-10-05 Jakub Jelinek + + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Include dl-sysdep.h. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. + +2004-10-05 Ulrich Drepper + + * grp/initgroups.c: Remove duplicate group IDs. + * grp/compat-initgroups.c: Likewise. + * nscd/initgrcache.c: Likewise. + +2004-10-05 Jakub Jelinek + + * sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Return 200112L + for _SC_CPUTIME or _SC_THREAD_CPUTIME. + + * nscd/Makefile (nscd-cflags): Set to -DIS_IN_nscd=1, plus + -fpie if building PIE. + (CFLAGS-*.c): Use it. + + * nscd/Makefile (relro-LDFLAGS): Add -Wl,-z,now if have-z-relro. + ($(objpfx)nscd): Add $(relro-LDFLAGS). + + * sysdeps/unix/sysv/linux/i386/sysconf.c: Include hp-timing.h. + (__sysconf): Return -1 for _SC_CPUTIME or _SC_THREAD_CPUTIME if + !HP_TIMING_AVAIL. + +2004-10-05 Ulrich Drepper + + * nscd/Makefile (distribute): Remove TODO. + * nscd/TODO: Removed. + +2004-10-04 Ulrich Drepper + + * nscd/gai.c: Define __no_netlink_support if NEED_NETLINK is + defined and __ASSUME_NETLINK_SUPPORT is zero. + * sysdeps/unix/sysv/linux/Makefile (CFLAGS-gai.c): Add + -DNEED_NETLINK. + + * malloc/mtrace.pl: Avoid calling location unless it is needed for + output. Patch by Edward Bishop . + + * nscd/Makefile (CFLAGS-gai.c): Add -fpie. + +2004-10-04 H.J. Lu + + * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c + (clock_getcpuclockid): Add missing retval. + + * sysdeps/unix/sysv/linux/ia64/sysconf.c (linux_sysconf): Fix a typo. + +2004-10-04 Roland McGrath + + * include/errno.h [RTLD_PRIVATE_ERRNO] (errno): Rename the real symbol + to rtld_errno. + * sysdeps/generic/errno.c [RTLD_PRIVATE_ERRNO] (rtld_errno): Define it, + and don't define any other errno names. + * sysdeps/unix/alpha/sysdep.h [RTLD_PRIVATE_ERRNO]: Use rtld_errno in + place of errno. + * sysdeps/unix/i386/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + * sysdeps/unix/x86_64/sysdep.S: Likewise. + + * sysdeps/generic/errno.c [! USE___THREAD] (errno): Use `nocommon' + attribute instead of `section'. + +2004-10-04 Ulrich Drepper + + * sysdeps/unix/sysv/linux/ia64/sysconf.c: New file. + * sysdeps/unix/sysv/linux/ia64/Dist: Add has_cpuclock.c. + * sysdeps/unix/sysv/linux/ia64/clock_getcpuclockid.c: Move actual + testing code to... + * sysdeps/unix/sysv/linux/ia64/has_cpuclock.c: ...here. New file. + * sysdeps/unix/sysv/linux/i386/sysconf.c: Add dynamic check for + _SC_CPUTIME and _SC_THREAD_CPUTIME. + + * nscd/connections.c (start_threads): Use sysconf in case + _POSIX_CLOCK_SELECTION or _POSIX_MONOTONIC_CLOCK is not greater zero. + + * nscd/Makefile (nscd-modules): Add gai. + * nscd/gai.c: New file. + * nscd/nscd.c: Remove getaddrinfo stub definition. + + * assert/assert.h: Give up on using __builtin_expect. + + * elf/rtld.c (dl_main): Only skip => output in ldd mode if both + strings are identical. + +2004-03-18 Jakub Jelinek + + * malloc/arena.c (aligned_heap_area): New variable. + (new_heap): If aligned_heap_area != NULL, attempt to use that + first. If HEAP_MAX_SIZE << 1 area is already HEAP_MAX_SIZE bytes + aligned, remember the second half in aligned_heap_area. + (delete_heap): Clear aligned_heap_area if deleting the area right + before aligned_heap_area. + +2004-10-03 Juerg Billeter + + * nscd/nscd_initgroups.c (__nscd_getgrouplist): Return -1 if nscd + can't be used. [BZ #424] + +2004-10-03 Ulrich Drepper + + Dynamically create new threads if necessary. + * nscd/connections.c (fd_ready): If no thread available for processing + the request, create a new one unless the limit is reached. + (start_threads): Check errors from pthread_create. + * nscd/nscd.h: Declare max_nthreads. + * nscd/nscd_conf.c: Parse max-nthreads entry. + * nscd/nscd.conf: Add max-threads entry. + * nscd/nscd_stat.c: Print current and maximum number of threads. + + Implement paranoia mode. + * nscd/connections.c (nscd_init): Mark database and socket descriptors + as close on exec. + (restart): New function. + (restart_p): New function. + (nscd_run): Add missing descrement of nready in case readylist is + empty. + (main_loop_poll): Call restart_p and restart. + (main_loop_epoll): Likewise. + (begin_drop_privileges): Save original UID and GID. + * nscd/nscd.c: Define new variables paranoia, restart_time, + restart_interval, oldcwd, old_gid, old_uid. + (main): Disable paranoia mode if we are not forking. + (check_pid): When re-execing, the PID file contains the same PID as + the current process. Do not fail in this case. + * nscd/nscd.conf: Add paranoia and restart-interval entries. + * nscd/nscd.h: Define RESTART_INTERVAL. Declare new variables. + * nscd/nscd_conf.c: Parse paranoia and restart-internal configurations. + * nscd/nscd_stat.c: Print paranoia and restart-internal values. + + * nscd/connections.c: Implement alternative loop for main thread + which uses epoll. + * sysdeps/unix/sysv/linux/Makefile [subdir=nscd] + (CFLAGS-connections.c): Add -DHAVE_EPOLL. + +2004-10-02 Ulrich Drepper + + * nscd/Makefile (CFLAGS-initgrcache.c): Add to CFLAGS-* variables, + don't replace old content. + + * nscd/connections.c: Rewrite handling of incoming connections. All + are handled by one thread which then hands off the descriptors for the + real work to the worker threads. + * nscd/Makefile: Link nscd with librt. + + * nscd/selinux.c: Pretty printing. + + * nscd/dbg_log.c (dbg_log): Don't add unnecessary newline to + output. Let syslog do the formatting if debug_level == 0. + + * nscd/nscd_helper.c (get_mapping): No need to check timestamp if + nscd_certainly_running is nonzero. + +2004-10-02 Simon Josefsson + + [BZ #420] + * sysdeps/generic/memmem.c [!_LIBC]: Define __builtin_expect, to + make the file usable inside gnulib. + +2004-10-01 Ulrich Drepper + + * malloc/malloc.c (public_vALLOc): Add missing use of hooks. + (public_pVALLOc): Likewise. + + * nscd/nscd_initgroups.c (__nscd_getgrouplist): Always add the + group the caller provided unless there is a real problem. + + * posix/bug-glob1.c (prepare): Fix creation of symlink. + +2004-09-30 Ulrich Drepper + + * posix/Makefile: Add rules to build and run bug-glob1. + * posix/bug-glob1.c: New file. + + * iconv/iconv_prog.c (main): Print progress information to stderr. + + * nscd/nscd.c (termination_handler): Reset timestamp so that + clients immediately stop using the database. + + * nscd/nscd-client.h (__nscd_get_map_ref): Drop volatile from last + parameter. + (__nscd_drop_map_ref): Change second parameter to be a reference to + a variable. Update variable when cycle count changed. + * nscd/nscd_helper.c (__nscd_get_map_ref): Remove volatile here, too. + * nscd/nscd_getai.c: Correctly use __nscd_drop_map_ref. Reinitialize + all variables and avoid memory leak in case of retries. + * nscd/nscd_getgr_r.c: Likewise. + * nscd/nscd_gethst_r.c: Likewise. + * nscd/nscd_getpw_r.c: Likewise. + * nscd/nscd_initgroups.c: Likewise. + + * nscd/nscd.h: Add declaration of addinitgroups and + readdinitgroups. + +2004-09-30 Andreas Jaeger + + * nscd/Makefile (CFLAGS-nscd_initgroups.c): Set to -fpie. + (CFLAGS-initgrcache.c): Set to -fexceptions. + +2004-09-29 Ulrich Drepper + + * sysdeps/generic/glob.c (glob_in_dir): Don't blindly trust + readdir results; for symlinks or files of unknown type check using + stat whether the file exists. + + * posix/tst-gnuglob.c (find_file): Handle leading "./". Fix + recognition of files. + +2004-09-29 Jakub Jelinek + + * time/tzfile.c (tzfile_mtime): New variable. + (__tzfile_read): Reread the file if mtime is different. + +2004-09-28 Jakub Jelinek + + * sysdeps/alpha/fpu/bits/mathinline.h (__fdimf, __fdim, fdimf, fdim): + Handle +inf/+inf. + * sysdeps/powerpc/fpu/bits/mathinline.h (fdim, fdimf): Likewise. + * sysdeps/sparc/fpu/bits/mathinline.h (fdim, fdimf): Likewise. + +2004-09-29 Ulrich Drepper + + * nscd/nscd_gethst_r.c (nscd_gethst_r): Use correct constant for + testing result of __nscd_get_map_ref. + +2004-09-29 Jakub Jelinek + + * sysdeps/i386/fpu/s_fdim.S (__fdim): Handle +inf/+inf. + * sysdeps/i386/fpu/s_fdimf.S (__fdimf): Likewise. + * sysdeps/i386/fpu/s_fdiml.S (__fdiml): Likewise. + +004-09-29 Ulrich Drepper + + * grp/initgroups.c: Move compat_call implementation... + * grp/compat-initgroups.c: ...to here. New file. + * grp/Makefile (distribute): Add compat-initgroups.c. + (CFLAGS-initgroups.c): Add -DUSE_NSCD=1. + * mscd/initgrcache.c: New file. + * nscd/nscd_initgroups.c: New file. + * nscd/Makefile (routines): Add nscd_initgroups. + (nscd-modules): Add initgrcache. + * nscd/cache.c (prune_cache): Add support for INITGROUPS entries. + * nscd/connections.c: Handle INITGROUPS requests. + * nscd/nscd-client.h: Define INITGROUPS, initgr_response_header. + Add initgrdata element to struct datahead. Fix typo in comment. + * nscd/nscd_proto.h: Declare __nscd_getgrouplist. Fix parameter + type in __nscd_getgrgrid_r. + * nscd/selinux.c (perms): Add INITGROUPS entry. + + * nscd/nscd_getai.c: No need to include . + + * sunrpc/get_myaddr.c (get_myaddress): Account for interfaces without + assigned addresses. + * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. + * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. + * sunrpc/clnt_udp.c (is_network_up): Likewise. + + * nscd/nscd.c: Define getaddrinfo hidden so that it is never found + outside. + + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (si_segvflags): + Renamed from si_flags due to conflict with si_flags from . + +2004-09-28 Ulrich Drepper + + * nscd/nscd_getai.c: Use NO_MAPPING instead of MAP_FAILED for test + of failing __nscd_get_map_ref. Fix a few typos. + + * sysdeps/unix/sysv/linux/sigwait.c (do_sigwait): Make sure + SIGSETXID is not blocked. + * sysdeps/unix/sysv/linux/sigwaitinfo.c (do_sigwaitinfo): Likewise. + * sysdeps/unix/sysv/linux/sigtimedwait.c (do_sigtimedwait): Likewise. + * sysdeps/unix/sysv/linux/sigprocmask.c (__sigprocmask): Likewise. + * sysdeps/generic/sigfillset.c (sigfillset): Don't set SIGSETXID. + + * sunrpc/get_myaddr.c (get_myaddress): Fix test for failing + getifaddrs call. + * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. + * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. + * sunrpc/Makefile (xtests): Add tst-getmyaddr. + * sunrpc/tst-getmyaddr.c: New file. + + * malloc/arena.c (ptmalloc_init): Allow MALLOC_CHECK_==0 to + disable all checking. + + * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h (si_flags): Add + support to get this value. + +2004-09-28 Jakub Jelinek + + * io/utime.h (utime): Allow second argument to be NULL. + +2004-09-28 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): If NAME is a numerical IP + address and AI_CANONNAME is set, return copy of NAME as ai_canonname. + +2004-09-27 Andreas Jaeger + + * sysdeps/i386/dl-machine.h (elf_machine_rela_relative): Replace + static inline by auto inline, add always_inline attribute. + (elf_machine_rel): Likewise. + (elf_machine_rela): Likewise. + (elf_machine_lazy_rel): Likewise. + (elf_machine_lazy_rela): Likewise. + (elf_machine_rel_relative): Likewise. + +2004-09-27 Ulrich Drepper + + * sunrpc/xdr_intXX_t.c: Add xdr_quad_t and xdr_u_quad_t aliases. + * sunrpc/rpc/xdr.h: Declare xdr_quad_t and xdr_u_quad_t. + * sunrpc/rpc_parse.c (get_type): Use "quad_t" for TOK_HYPER. + Otherwise isvectordef will loop infinitely if typedef hyper int64_t + is seen. + (unsigned_dec): Use "u_quad_t" for similar reasons. + * sunrpc/Versions: Export xdr_quad_t and xdr_u_quad_t. + +2004-09-27 Roland McGrath + + * sysdeps/generic/bits/waitstatus.h (__WIFSIGNALED): Simplify bit + twiddling in last change. + + * posix/tst-waitid.c (do_test): Add tests for waitpid with WCONTINUED. + + [BZ #409] + * posix/sys/wait.h [__WIFCONTINUED] (WIFCONTINUED): New macro. + * stdlib/stdlib.h [__WIFCONTINUED] (WIFCONTINUED): New macro. + * sysdeps/generic/bits/waitstatus.h (__W_CONTINUED): New macro. + [WCONTINUED] (__WIFCONTINUED): New macro. + (__WIFSIGNALED): Rewritten to exclude __W_CONTINUED value, and have no + branches. + + * sysdeps/unix/sysv/linux/waitid.c (do_waitid): Add fifth argument to + all three syscall uses, not just one! + +2004-09-26 Richard Henderson + + * sysdeps/alpha/alphaev6/memcpy.S: Mark .prologue. + * sysdeps/unix/alpha/sysdep.h (LEAF, ENTRY): Align entry points + to 16 byte boundaries. + +2004-09-26 Ulrich Drepper + + * elf/readlib.c (process_file): Before complaining about too-short + file, check that it potentially be an ELF file. Also complain about + empty files. [BZ #151]. + + * scripts/test-installation.pl: Fix ld.so recognition for new + LD_TRACE_LOADED_OBJECTS output format. + Patch by [BZ #407]. + + * elf/dl-support.c (_dl_non_dynamic_init): Fix cleaning of + environment. [BZ #384] + + * sunrpc/clnt_udp.c (is_network_up): Use getifaddrs instead of ioctl. + * sunrpc/get_myaddr.c (get_myaddress): Likewise. + * sunrpc/pmap_clnt.c (__get_myaddress): Likewise. + * sunrpc/pmap_rmt.c (getbroadcastnets): Likewise. Change interface + to avoid buffer overrun and remove now useless parameters. + (clnt_broadcast): Adjust caller. [BZ #381]. + + * sysdeps/generic/s_fdim.c: Handle +inf/+inf + * sysdeps/generic/s_fdimf.c: Likewise. + * sysdeps/generic/s_fdiml.c: Likewise. + * sysdeps/i386/i686/fpu/s_fdim.S: Likewise. + * sysdeps/i386/i686/fpu/s_fdimf.S: Likewise. + * sysdeps/i386/i686/fpu/s_fdiml.S: Likewise. + * sysdeps/powerpc/fpu/s_fdim.c: Likewise. + * sysdeps/powerpc/fpu/s_fdimf.c: Likewise. + * sysdeps/x86_64/fpu/s_fdiml.S: Likewise. + * math/libm-test.inc (fdim_test): Add test case. [BZ #376]. + + * sysdeps/generic/bits/types.h: Fix __SQUAD_TYPE and __UQUAD_TYPE + for compilers without __GLIBC_HAVE_LONG_LONG. [BZ #362] + + * sysdeps/posix/getaddrinfo.c (getaddrinfo): Remove incorrect + requirement on socktype and protocol. + (gaih_inet): If numeric port number is given, return records for all + possible socket types. + * posix/tst-getaddrinfo2.c: New file. + * posix/Makefile (tests): Add tst-getaddrinfo2. [BZ #358] + +2004-09-25 Ulrich Drepper + + * locale/loadlocale.c (_nl_intern_locale_data): Recognize LC_CTYPE + data where _nl_value_type_LC_CTYPE does not contain the type + information. Add range checks. + Reported by John Lumby [BZ #356]. + + * libio/vasprintf.c (_IO_vasprintf): Fix condition to decide + whether to realloc or not. + Reported by Pavel Kankovsky [BZ #346]. + + * intl/dcigettext.c (DCIGETTEXT): Protect tfind/tsearch calls. + * intl/dcigettext.c (_nl_find_msg): Call _nl_load_domain also if + decided < 0. + * intl/finddomain.c (_nl_find_domain): Likewise. + * intl/loadmsgcat.c (_nl_load_domain): Set decided to 1 only once we + are done. First set to -1 to signal initialization is ongoing. + Protect against concurrent callers with recursive lock. + * intl/finddomain.c (_nl_find_domain): Protect calls to + _nl_make_l10nflist. [BZ #322] + + * sysdeps/posix/getaddrinfo.c (getaddrinfo): If determinination of + source address fails, initialized source_addr_len field so that + duplicate address recognition does not copy junk. + +2004-09-25 Jakub Jelinek + + * sysdeps/unix/sysv/linux/i386/setuid.c (__setuid): Remove second + result declaration. + +2004-09-22 Andreas Schwab + + * sysdeps/unix/sysv/linux/ia64/sysdep.h: Adjust whitespace. + +2004-09-24 Ulrich Drepper + + * misc/daemon.c (daemon): Don't succeed if /dev/null cannot be + opened. + + * nis/ypclnt.c (do_ypcall): Add one missing unlock. Simplify the + code a bit. + + * misc/daemon.c (daemon): Define errno in case /dev/null is not + the correct device. + + * nis/ypclnt.c (yp_bind_file): Optimize a bit. Minimal cleanups. + +2004-09-23 Andreas Jaeger + + * locale/weight.h (findidx): Remove static, it's not supported + anymore with GCC 4.0 in a block scope. + * locale/weightwc.h (findidx): Likewise. + * posix/regcomp.c (seek_collating_symbol_entry): Likewise. + (lookup_collation_sequence_value): Likewise. + (build_range_exp): Likewise. + (build_collating_symbol): Likewise. + * iconv/iconvconfig.c (write_output): Likewise. + * elf/do-rel.h (elf_dynamic_do_rel): Likewise. + + * sysdeps/x86_64/dl-machine.h (elf_machine_rela_relative): Remove + static, add always_inline attribute. + (elf_machine_rela): Likewise. + (elf_machine_lazy_rel): Likewise. + + * elf/dynamic-link.h (elf_get_dynamic_info): Make static dependend + on !RESOLVE so that it's not defined in local scope. + +2004-09-23 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/sysdep.h (INTERNAL_SYSCALL_NCS): Define. + +2004-09-23 Thorsten Kukuk + + * sysdeps/unix/sysv/linux/sys/mount.h: Sync MS_RMT_MASK flag + and BLK* ioctls with linux kernel headers. + +2004-09-23 Ulrich Drepper + + * sysdeps/generic/bits/dlfcn.h: Add RTLD_DEEPBIND. + * elf/dl-object.c (_dl_new_object): Add new parameter mode. If mode + has RTLD_DEEPBIND set add local searchlist before global scope. + * sysdeps/generic/ldsodefs.h (_dl_new_object): Adjust prototype. + * elf/rtld.c: Adjust callers of _dl_new_object. + * elf/dl-load.c: Likewise. + (_dl_map_object_from_fd): If RTLD_DEEPBIND is used, don't do anything + for DF_SYMBOLIC. + * elf/dl-open.c (dl_open_writer): Pass RTLD_DEEPBIND flag on to + _dl_map_object_deps. + * elf/tst-deep1.c: New file. + * elf/tst-deep1mod1.c: New file. + * elf/tst-deep1mod2.c: New file. + * elf/tst-deep1mod3.c: New file. + * elf/Makefile: Add rules to build and run new tests. + + * elf/dl-deps.c: Pretty printing. + +2004-09-23 Jakub Jelinek + + * sysdeps/unix/alpha/sysdep.h (inline_syscall[0-6]): Change name + argument to numbers from syscall names. + (INLINE_SYSCALL1): Pass __NR_##name to inline_syscall##nr. + (INTERNAL_SYSCALL_NCS): Renamed from... + (INTERNAL_SYSCALL_1): ... this. Use INTERNAL_SYSCALL_NCS. + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h + (INTERNAL_SYSCALL_NCS): Define. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h + (INTERNAL_SYSCALL_NCS): Likewise. + * sysdeps/unix/sysv/linux/sparc/sysdep.h (inline_syscall[0-6]): + Change name argument to numbers from syscall names. + (INLINE_SYSCALL, INTERNAL_SYSCALL): Adjust. + (INTERNAL_SYSCALL_NCS): Define. + +2004-09-22 Ulrich Drepper + + * malloc/malloc.c (malloc_printerr): Use syslog if writev failed. + + * string/string.h: Add __nonnull annotations. + * stdlib/stdlib.h: Likewise. + +2004-09-20 H.J. Lu + + * sysdeps/unix/sysv/linux/ia64/sysdep.h (DO_INLINE_SYSCALL): + Renamed to ... + (DO_INLINE_SYSCALL_NCS): This. + (DO_INLINE_SYSCALL): New. + (INLINE_SYSCALL): Updated. + (INTERNAL_SYSCALL_NCS): Updated. + +2004-09-21 Ulrich Drepper + + * elf/sprof.c (load_shobj): Add support for reading symbol table + from debuginfo file. + + * elf/ldd.bash.in: Fix syntax errors. + +2004-09-20 Ulrich Drepper + + * sysdeps/unix/sysv/linux/dl-execstack.c + (_dl_make_stack_executable): Remove some duplication. + + * nscd/nscd.c (options): Mark S option as hidden. + (parse_opt): When S option is used, print warning message. + * nscd/grpcache.c (adgrptbyX): Don't handle secure mode. + * nscd/hstcache.c (addhstbyX): Don't handle secure mode. + * nscd/aicache.c (addhstaiX): Don't handle secure mode. + * nscd/pwdcache.c (addpwbyX): Don't handle secure mode. + +2004-09-20 Roland McGrath + + * elf/dl-load.c (__stack_prot): Only use PROT_GROWSUP/PROT_GROWSDOWN + in initializer #if defined. + +2004-09-18 Paul Eggert + + [BZ #391] + * stdlib/getsubopt.c: Merge fixes from gnulib. + (__strchrnul) [!_LIBC]: Define and include "strchrnul.c". + (getsubopt): Use prototypes, not K&R style. + Fix bug: memcmp(A,B,N) was being invoked on a memory block B + whose size might be smaller than N. Use strncmp to avoid the bug. + +2004-09-20 Ulrich Drepper + + * configure.in: If selinux has not explictly been requested, don't + comment on it missing. + + * elf/dl-load.c: Define __stack_prot. + * sysdeps/unix/sysv/linux/dl-execstack.c: Don't define + __stack_prot here, just declare it. + +2004-09-20 Jakub Jelinek + + * configure.in (libc_cv_z_relro): Only set to yes if linker script + contains DATA_SEGMENT_RELRO_END. + +2004-09-20 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object_from_fd): Add some error checking. + Reorder code slightly. + * elf/rtld.c (dl_main): No need to check whether l_info[DT_HASH] + is non-null, _dl_setup_hash will do that. + +2004-09-19 Ulrich Drepper + + * sysdeps/unix/sysv/linux/setegid.c [HAVE_PTR__NPTL_SETXID]: Call + callback to set IDs in all other threads as well. + * sysdeps/unix/sysv/linux/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/setuid.c: New file. + * sysdeps/unix/sysv/linux/setgid.c: New file. + * sysdeps/unix/sysv/linux/setreuid.c: New file. + * sysdeps/unix/sysv/linux/setregid.c: New file. + * sysdeps/unix/sysv/linux/setresuid.c: New file. + * sysdeps/unix/sysv/linux/setresgid.c: New file. + * sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NCS. + * sysdeps/unix/sysv/linux/ia64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Use x86 version. + * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: New file. + * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Remove setresgid + and setresuid. + * nscd/aicache.c: Use pthread_seteuid_np instead of seteuid. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + + * resolv/res_mkquery.c (res_nmkquery): Fix typo. + +2004-09-18 Ulrich Drepper + + * sysdeps/unisx/sysv/linux/dl-execstack.c: Get protection flag + from memory. + * elf/dl-load.c (_dl_map_object_from_fd): Add PROT_EXEC flag to + __stack_flags. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Do not use + gethostbyname3_r if we are not looking for the canonical name. + + * resolv/res_mkquery.c (res_nmkquery): Randomize request ID every + time. + +2004-09-18 Roland McGrath + + * sysdeps/unix/sysv/linux/waitid.c (do_waitid): Pass fifth argument to + system call. + +2004-09-17 Ulrich Drepper + + * include/link.h (struct link_map): Add l_used element. + * sysdeps/generic/ldsodefs.h: Define DL_DEBUG_UNUSED. + * elf/rtld.c (process_dl_debug): Recognize unused. + (dl_main): When unused debug flag is set check for unused direct + dependencies. + When printing dependencies and SONAME starts with /, omit the SONAME => + part. + * elf/dl-lookup.c (_dl_lookup_symbol_x): Mark object in which the + symbol has been found as used. + * elf/ldd.bash.in: Add -u option. + +2004-09-18 Jakub Jelinek + + * sysdeps/unix/sysv/linux/nscd_setup_thread.c (setup_thread): + Do nothing if __NR_set_tid_address is not defined. [BZ #390] + +2004-09-17 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c: Use gethostbyname3_r NSS function + in case it is available. + +2004-09-17 Jakub Jelinek + + * nscd/nscd.c (parse_opt): Write arg string instead of (void *) + key to the socket. + +2004-09-17 Ulrich Drepper + + * misc/sys/cdefs.h: Define __nonnull using nonnull function attribute + for gcc 3.3 and higher. + * io/fcntl.h: Add __nonnull where appropriate. + * io/ftw.h: Likewise. + * io/utime.h: Likewise. + * io/sys/poll.h: Likewise. + * io/sys/sendfile.h: Likewise. + * io/sys/stat.h: Likewise. + * io/sys/statfs.h: Likewise. + * io/sys/statvfs.h: Likewise. + * posix/unistd.h: Likewise. + * catgets/nl_types.h: Likewise. + * crypt/crypt.h: Likewise. + * debug/execinfo.h: Likewise. + +2004-09-16 Ulrich Drepper + + * posix/glob.h: Remove cruft to make header usable outside glibc. + The maintenance headache is too big. + + * configure.in: Add test for required SELinux features. + * config.make.in: Add have-selinux entry. + * config.h.in: Add HAVE_SELINUX entry. + * nscd/Makefile (nscd-modules): Add selinux. + (CFLAGS-selinux.c): Add -fpie. + Define selinux-LIBS and use in link line. + * nscd/connections.c (handle_request): Check access SELinux permissions + before processing request. + * nscd/nscd.c (main): Initialize selinux_enabled and stop avc thread. + * nscd/nscd_stat.c: Transmit and print AVC statistics. + * nscd/selinux.c: New file. + * nscd/selinux.h: New file. + Patch mostly by Matthew Rickard . + +2004-09-16 Jakub Jelinek + + * nscd/nscd_helper.c (__nscd_unmap, get_mapping): Use __munmap + instead of munmap. + + * nscd/Makefile (CFLAGS-aicache.c): Set to -fpie. + +2004-09-16 Thorsten Kukuk + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Check + __nss_not_use_nscd_hosts variable if nscd should be used or not. + +2004-09-16 Ulrich Drepper + + * nscd/nscd_proto.h: Define NSS_NSCD_RETRY. + Add __nscd_getai prototype. + * nss/getXXbyYY_r.c: Remode definition of NSS_NSCD_RETRY. + * nscd/nscd-client.h: Remove __nscd_getai prototype. + * nscd/nscd_getai.c: Include nscd_proto.h. + + * elf/ldd.bash.in: Add support for SELinux environments. + Patch by Stephen Smalley . + +2004-09-16 Roland McGrath + + * configure.in (--with-headers): Let argument contain a : separated + list of directories to use, not just one. + * configure: Regenerated. + +2004-09-15 Richard Henderson + + * sysdeps/alpha/fpu/libm-test-ulps: Update. + * scripts/data/c++-types-alpha-linux-gnu.data: New file. + +2004-09-15 Ulrich Drepper + + * nscd/aicache.c: Prefer using gethostbyname3_r NSS callback to also + get ttl and canonical name. Use these two values. + * resolv/Versions: Export _nss_dns_gethostbyname3_r from libnss_dns. + * resolv/nss_dns/dns-host.c (getanswer_r): Take two new parameters. + If nonnull fill with TTL and pointer to canonical name respectively. + (_nss_dns_gethostbyaddr_r): Pass NULL in new parameters of getanswer_r. + (_nss_dns_gethostbyname2_r): Just wrapper around + _nss_dns_gethostbyname3_r. + (_nss_dns_gethostbyname3_r): Renamed from _nss_dns_gethostbyname2_r. + Take two new parameters which as passed to getanswer_r. + + * nscd/Makefile (rountines): Add nscd_getai. + (nscd-modules): Add aicache. + * nscd/aicache.c: New file. + * nscd/nscd_getai.c: New file. + * nscd/cache.c (prune_cache): Handle GETAI request type. + * nscd/connections.c: Add GETAI support in request handling. + * nscd/nscd-client.h (request_type): Add GETAI. + Define ai_response_header and struct nscd_ai_result types. + (struct datahead): Add aidata field. + Declare __nscd_getai. + * nscd/nscd.c: Add getaddrinfo definition to catch problems. + * nscd/nscd.h: Declare addhstai and readdhstai. + + * sysdeps/posix/getaddrinfo.c: Add support for using cached results. + * posix/Makefile (CFLAGS-getaddrinfo.c): Add -DUSE_NSCD. + + * nscd/nscd-client.h (struct datahead): Use uint8_t instead of bool. + +2004-09-14 Ulrich Drepper + + * misc/sys/cdefs.h: Remove debugging text from __P and __PMT. + +2004-09-13 Ulrich Drepper + + * misc/sys/cdefs.h: Restore old definition of __P. + * csu/munch.awk: Remove uses of __P and __PMT. + * gmon/gmon.c: Likewise. + * hesiod/hesiod.h: Likewise. + * include/stdio.h: Likewise. + * io/fts.c: Likewise. + * libio/genops.c: Likewise. + * libio/libioP.h: Likewise. + * libio/fileops.c: Likewise. + * libio/iolibio.h: Likewise. + * libio/libio.h: Likewise. + * libio/memstream.c: Likewise. + * libio/oldfileops.c: Likewise. + * libio/oldstdfiles.c: Likewise. + * libio/iopopen.c: Likewise. + * libio/vsnprintf.c: Likewise. + * libio/vswprintf.c: Likewise. + * libio/wgenops.c: Likewise. + * libio/oldiopopen.c: Likewise. + * locale/programs/xmalloc.c: Likewise. + * locale/programs/xstrdup.c: Likewise. + * malloc/mtrace.c: Likewise. + * misc/getttyent.c: Likewise. + * misc/getusershell.c: Likewise. + * nis/rpcsvc/ypupd.h: Likewise. + * posix/fnmatch.h: Likewise. + * posix/glob.h: Likewise. + * resolv/arpa/nameser.h: Likewise. + * resolv/gethnamaddr.c: Likewise. + * resolv/resolv.h: Likewise. + * resolv/inet_net_ntop.c: Likewise. + * resolv/inet_net_pton.c: Likewise. + * resolv/res_init.c: Likewise. + * resolv/nss_dns/dns-network.c: Likewise. + * stdio-common/vfprintf.c: Likewise. + * stdio-common/reg-printf.c: Likewise. + * sysdeps/generic/chflags.c: Likewise. + * sysdeps/generic/fchflags.c: Likewise. + * sysdeps/generic/glob.c: Likewise. + * sysdeps/generic/printf_fphex.c: Likewise. + * sysdeps/generic/memcmp.c: Likewise. + * sysdeps/generic/memcopy.h: Likewise. + * sysdeps/generic/morecore.c: Likewise. + * sysdeps/generic/sstk.c: Likewise. + * sysdeps/posix/sigvec.c: Likewise. + * sysdeps/posix/ttyname_r.c: Likewise. + * sysdeps/standalone/arm/bits/errno.h: Likewise. + * sysdeps/standalone/standalone.h: Likewise. + * sysdeps/standalone/i386/force_cpu386/brdinit.c: Likewise. + * sysdeps/standalone/i386/force_cpu386/_exit.c: Likewise. + * sysdeps/unix/arm/start.c: Likewise. + * sysdeps/unix/bsd/sigaction.c: Likewise. + * sysdeps/unix/bsd/sun/m68k/sigtramp.c: Likewise. + * sysdeps/unix/bsd/sun/sparc/sigtramp.c: Likewise. + * sysdeps/unix/bsd/sun/sunos4/wait4.c: Likewise. + * sysdeps/unix/bsd/ultrix4/mips/sigvec.c: Likewise. + * sysdeps/unix/bsd/ultrix4/sysconf.c: Likewise. + * sysdeps/unix/sparc/start.c: Likewise. + * sysdeps/unix/sysv/getdents.c: Likewise. + * sysdeps/unix/sysv/irix4/fpathconf.c: Likewise. + * sysdeps/unix/sysv/irix4/getgroups.c: Likewise. + * sysdeps/unix/sysv/irix4/getpriority.c: Likewise. + * sysdeps/unix/sysv/irix4/getrusage.c: Likewise. + * sysdeps/unix/sysv/irix4/pathconf.c: Likewise. + * sysdeps/unix/sysv/irix4/setgroups.c: Likewise. + * sysdeps/unix/sysv/irix4/sigtramp.c: Likewise. + * sysdeps/unix/sysv/irix4/start.c: Likewise. + * sysdeps/unix/sysv/irix4/sysconf.c: Likewise. + * sysdeps/unix/sysv/sco3.2.4/__setpgid.c: Likewise. + * sysdeps/unix/sysv/sco3.2.4/getgroups.c: Likewise. + * sysdeps/unix/sysv/sysv4/__getpgid.c: Likewise. + * sysdeps/unix/sysv/sysv4/__setpgid.c: Likewise. + * sysdeps/unix/sysv/sysv4/getpgid.c: Likewise. + * sysdeps/unix/sysv/sysv4/setpgid.c: Likewise. + * sysdeps/unix/sysv/sysv4/sethostname.c: Likewise. + * sysdeps/unix/sysv/sysv4/setsid.c: Likewise. + * sysdeps/unix/sysv/sysv4/sysconf.c: Likewise. + * sysdeps/unix/sysv/sysv4/waitpid.c: Likewise. + * sysdeps/unix/sysv/sysv4/solaris2/getdents.c: Likewise. + * time/tzset.c: Likewise. + * time/strftime_l.c: Likewise. + * time/strptime_l.c: Likewise. + * crypt/md5.h: Likewise. + +2004-09-13 Andreas Jaeger + + * configure.in: Support GCC 4.x. + * configure: Regenerated. + +2004-09-13 Thorsten Kukuk + + * nscd/nscd_stat.c: Don't access dbs[cnt].head for disabled services. + + * nscd/nscd.init: Fix path to socket. + +2004-09-12 Ulrich Drepper + + * nscd/nscd_helper.c (get_mapping): Correctly check cmsg length. + Avoid file descriptor leak in case of size mismatch. + + * nscd/nscd-client.h: Fix database structure layout for biarch. + * nscd/mem.c (gc): Add casts to avoid warnings. + + * nss/getent.c: Don't preconstruct help message. Do it only when + needed. + + * locale/programs/locale.c: Simplify help message printing. + +2004-09-12 Roland McGrath + + * sysdeps/mach/hurd/i386/init-first.c (init1) [! SHARED]: Add decls + missing in last change. + +2004-09-11 Thorsten Kukuk + + * nis/nss_compat/compat-grp.c: Check that buflen is greater zero + before writing data into the buffer with negative offset. + * nis/nss_compat/compat-initgroups.c: Likewise. + * nis/nss_compat/compat-pwd.c: Likewise. + * nis/nss_compat/compat-spwd.c Likewise. + +2004-09-12 Ulrich Drepper + + * misc/syslog.c (vsyslog): Fix copying of PID in case of + out-of-memory situation. [BZ #365]. + + * sysdeps/alpha/fpu/bits/mathinline.h: Use __NTH instead of + __THROW in inline function definitions. + + * posix/spawn.h [__USE_GNU]: Define POSIX_SPAWN_USEVFORK. + * posix/spawnattr_setflags.c: Check whether any unknown bit is set + in FLAGS parameter and fail if this is the case. + * sysdeps/posix/spawni.c: Use vfork if POSIX_SPAWN_USEVFORK flag is + set. + + * nscd/pwdcache.c (cache_addpw): Sync also negative results to disk. + * nscd/grpcache.c (cache_addgr): Likewise. + * nscd/hstcache.c (cache_addhst): Likewise. + +2004-09-11 Roland McGrath + + * sysdeps/mach/hurd/i386/init-first.c (init1) [! SHARED]: + Set _dl_phdr and _dl_phnum. + (init1): When bootstrap task, bail early and never examine *D. + +2004-09-11 Alfred M. Szmidt + + * sysdeps/mach/hurd/i386/tls.h (__i386_set_gdt) [!HAVE_I386_SET_GDT]: + Cast THR, SEL and DESC to `void'. + +2004-09-11 Ulrich Drepper + + * nscd/connections.c (nscd_run): Call setup_thread only for enabled + databases. + + * sysdeps/unix/bsd/bsd4.4/bits/socket.h: Use __NTH for __cmsg_nxthdr. + +2004-09-10 Ulrich Drepper + + * nscd/nscd.c (pagesize_m1): New variable. + (main): Initialize it. + * nscd/nscd.h: Declare pagesize_m1. + * nscd/hstcache.c: Pass correctly aligned address to msync. + * nscd/grpcache.c: Likewise. + * nscd/pwdcache.c: Likewise. + +2004-09-10 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/pthread_cond_wait.S: Decrement + __nwaiters. If pthread_cond_destroy has been called and this is + the last waiter, signal pthread_cond_destroy caller and avoid + using the pthread_cond_t structure after unlock. + * sysdeps/unix/sysv/linux/sh/pthread_cond_timedwait.S: Likewise. + +2004-09-10 Ulrich Drepper + + * sysdeps/unix/sysv/linux/kernel-features.h: Don't define + __ASSUME_CLONE_STOPPED. + +2004-09-10 Jakub Jelinek + + * misc/sys/cdefs.h (__REDIRECT_NTH): Change order of __THROW and + __asm__ for C++. [BZ #377] + +2004-09-10 Ulrich Drepper + + * nscd/nscd_stat.c: Improve output by also printing .shared and + .persistent. + + * nscd/connections.c: Allow cache sharing to be really disabled. + +2004-09-10 Jakub Jelinek + + * malloc/malloc.c (_int_free): Only do arena boundary check for + contiguous arenas. + +2004-09-10 Kazuhiro Inaoka + + * stdlib/longlong.h [__M32R__] (add_ssaaaa, sub_ddmmss): Fix broken + instruct operands. + * elf/elf.h: Add R_M32R_* relocs. + +2004-09-09 Ulrich Drepper + + * misc/sys/cdefs.h: Despite what the gcc manual says, gcc 3.2 + seems not to support the nothrow attribute. Use it only for gcc + 3.3 and higher. + + * malloc/hooks.c (top_check): Print top chunk corruption as normal + error message. + + * malloc/malloc.c (malloc_printerr): Don't make informational + message look like error message. + +2004-09-09 Andreas Jaeger + + * nscd/Makefile (CFLAGS-nscd_setup_thread.c): Set to -fpie. + +2004-09-08 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/socket.h (__SCM_CONNECT): Removed. + + * malloc/malloc.c (_int_free): Add inexpensive double free and + memory corruption tests. + (malloc_printf_nc): Renamed to malloc_printerr. Second parameter + is no format string anymore. Don't use stdio. Adjust all callers. + * malloc/hooks.c: Adjust malloc_printf_nc callers. + +2004-09-08 Roland McGrath + + * malloc/mcheck.c: Don't use __P. + Use prototypes definitions for static functions. + +2004-09-08 Ulrich Drepper + + * sysdeps/ia64/fpu/bits/mathinline.h: Use __NTH instead of __THROW. + +2004-09-08 Ulrich Drepper + Jakub Jelinek + + * nscd/nscd-client.h: Add a few #includes. + + * nscd/Makefile (nscd-modules): Add nscd_setup_thread. + * nscd/connections.c (nscd_run): Call setup_thread for maintenance + threads. + * nscd/nscd-client.h (struct database_pers_head): Add + nscd_certainly_running field. + * nscd/nscd.h: Declare setup_thread. + * nscd/nscd_helper.c (__nscd_get_map_ref): Avoid the time test if + nscd_certainly_running is nonzero. + * sysdeps/generic/nscd_setup_thread.c: New file. + * sysdeps/unix/sysv/linux/nscd_setup_thread.c: New file. + +2004-09-08 Ulrich Drepper + + * nscd/connections.c: Implement r/o sharing of nscd's cache with client + processes via shared memory. + * nscd/nscd-client.h: Likewise. + * nscd/nscd.h: Likewise. + * nscd/nscd_conf.c: Likewise. + * nscd/nscd_getgr_r.c: Likewise. + * nscd/nscd_getpw_r.c: Likewise. + * nscd/nscd_gethst_r.c: Likewise. + * nscd/nscd.conf: Add new config parameters. + * nscd/Makefile (aux): Add nscd_helper. + * nscd/nscd_helper.c: New file. + * nscd/mem.c (gc): Indicate beginning and end of the gc cycle. + + * nscd/hstcache.c: Simplify a lot. We cache only the request itself, + no derived information. + * connections.c (nscd_init): Fix bug in testing size of the persistent. + + * nis/Makefile (aux): Add nis_hash. + * nis/nis_hash.c: New file. Split out from nis_util.c. + * nis/nis_util.c: Move __nis_hash code in separate file. + + * csu/tst-atomic.c: Improve atomic_increment_val test which would + not have found a ppc bug. + + * sysdeps/s390/fpu/bits/mathinline.h: Remove unnecessary includes. + + * malloc/arena.c: Remove __MALLOC_P uses. + * malloc/malloc.c: Likewise. + + * malloc/mtrace.c: Remove __P uses. + * malloc/mcheck-init.c: Likewise. + +2004-09-07 Jakub Jelinek + + * sysdeps/powerpc/powerpc64/configure.in: New file. + * config.h.in (USE_PPC64_OVERLAPPING_OPD): Add. + * configure.in (HAVE_ASM_GLOBAL_DOT_NAME): Remove. + * sysdeps/powerpc/powerpc64/sysdep.h: Formatting. + (OPD_ENT, BODY_LABEL, ENTRY_1, ENTRY_2, END_2, DOT_PREFIX, + BODY_PREFIX): Define. + (ENTRY, DOT_LABEL, END, TRACEBACK, END_GEN_TB, EALIGN): Support + HAVE_ASM_GLOBAL_DOT_NAME or no dot symbols, + USE_PPC64_OVERLAPPING_OPD or never overlapping .opd entries. + * sysdeps/powerpc/powerpc64/dl-machine.h: Include sysdep.h. + (TRAMPOLINE_TEMPLATE, RTLD_START): Use the new sysdep.h macros. + +2004-09-07 Ulrich Drepper + + * malloc/malloc.h: Don't define __THROW if it is already defined. + + * sysdeps/powerpc/bits/atomic.h (atomic_increment): Define. + (atomic_decrement): Define. + + * sysdeps/powerpc/bits/atomic.h: Implement atomic_increment_val and + atomic_decrement_val. + * sysdeps/powerpc/powerpc32/bits/atomic.h: Likewise. + * sysdeps/powerpc/powerpc64/bits/atomic.h: Likewise. + + * csu/tst-atomic.c (do_test): Add tests of atomic_increment_val + and atomic_decrement_val. + + * include/atomic.h: Define atomic_increment_val, atomic_decrement_val, + and atomic_delay is not already defined. + * sysdeps/i386/i486/bits/atomic.h: Define atomic_delay. + * sysdeps/x86_64/bits/atomic.h: Likewise. + + * miscd/sys/cdefs.h (__NTH): New macro. + (__THROW): Define using nothrow attribute for C code and gcc >= 3.2. + (__REDIRECT_NTH): New macro. + * argp/argp.h: Use __NTH and __REDIRECT_NTH where necessary. + * ctype/ctype.h: Likewise. + * dirent/dirent.h: Likewise. + * io/fcntl.h: Likewise. + * io/sys/sendfile.h: Likewise. + * io/sys/stat.h: Likewise. + * io/sys/statfs.h: Likewise. + * io/sys/statvfs.h: Likewise. + * libio/bits/stdio.h: Likewise. + * misc/sys/mman.h: Likewise. + * posix/unistd.h: Likewise. + * resource/sys/resource.h: Likewise. + * rt/aio.h: Likewise. + * signal/signal.h: Likewise. + * stdlib/stdlib.h: Likewise. + * string/argz.h: Likewise. + * string/string.h: Likewise. + * sysdeps/generic/inttypes.h: Likewise. + * sysdeps/i386/fpu/bits/mathinline.h: Likewise. + * sysdeps/powerpc/fpu/bits/mathinline.h: Likewise. + * sysdeps/s390/fpu/bits/mathinline.h: Likewise. + * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise. + * sysdeps/unix/sysv/linux/bits/socket.h: Likewise. + * sysdeps/unix/sysv/linux/bits/sys/sysmacros.h: Likewise. + * wcsmbs/wchar.h: Likewise. + + * sysdeps/generic/glob.c: Use __PMT isntead of __P where appropriate. + + * resolv/gethnamaddr.c (getanswer): Remove __P use in variable + definition. + + * io/sys/poll.h: Remove __THROW from poll prototype, it's a + cancellation point. + + * io/fts.c (fts_open): Remove uses of __P. + + * include/stdlib.h: No need to use __THROW in this header. + +2004-09-06 Roland McGrath + + * sysdeps/mach/hurd/dl-sysdep.c (__writev): Does use assert on FD + validity, since __assert_fail gets to here anyway. Just fail. + +2004-09-06 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Fix problem with + AF_UNSPEC lookup with AI_CANONNAME of name which has only IPv6 + addresses. + +2004-09-05 Richard Henderson + + * sysdeps/alpha/fpu/fraiseexcpt.c: Remove file. + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_IEEE_RAISE_EXCEPTION): New. + * sysdeps/unix/sysv/linux/alpha/fraiseexcpt.c: New file. + * sysdeps/unix/sysv/linux/alpha/kernel_sysinfo.h: New file. + * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Use it. + * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise. + +2004-09-05 Richard Henderson + + * sysdeps/alpha/div.S: Save and restore FPCR around fp operations. + * sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, + sysdeps/alpha/ldiv.S, sysdeps/alpha/reml.S, sysdeps/alpha/remq.S, + sysdeps/alpha/remqu.S: Likewise. + * sysdeps/alpha/div_libc.h (FRAME): Increase to 64. + +2004-09-05 Ulrich Drepper + + * nscd/cache.c (cache_add): Correctly log GETHOSTBYADDR and + GETHOSTBYADDRv6 requests. + +2004-09-04 Ulrich Drepper + + * nscd/pwdcache.c (cache_addpw): Use correct key length in + cache_add calls. + * nscd/grpcache.c (cache_addgr): Likewise. + +2004-09-03 Alfred M. Szmidt + + * sysdeps/mach/hurd/i386/tls.h (THREAD_DTV): Changed type of _DTV + to `dtv_t *'. + +2004-09-03 Ulrich Drepper + + * nscd/nscd.c (parse_opt): Use writev instead of two write for + invalidate command. + +2004-09-02 Ulrich Drepper + + * nscd/connections.c (nscd_run): Check early for invalid request types. + +2004-09-02 Roland McGrath + + * sysdeps/mach/hurd/i386/tls.h (TLS_INIT_TP_EXPENSIVE): New macro. + (INSTALL_NEW_DTV, THREAD_DTV): Rewritten to fetch the right word. + (THREAD_SELF): New macro. + +2004-09-02 Steven Munroe + + [BZ #357] + * stdlib/tst-setcontext.c (test_stack): Added test for stack clobber. + (main): Call test_stack. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S + (__getcontext): Push stack frame then save parms in local frame. + Improve instruction scheduling. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S + (__swapcontext): Likewise. + +2004-09-01 Andreas Schwab + + * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h [g++ >= 3.5]: Use + __builtin_offsetof. + +2004-09-01 Jakub Jelinek + + [BZ #361] + * posix/fnmatch_loop.c (FCT): For backslash between brackets, branch + to normal_bracket after fetching the next character. + * posix/tst-fnmatch.input: Add 25 new tests. + Reported by Markus Oberhumer . + +2004-09-01 Ulrich Drepper + + * elf/rtld.c (dl_main): First check existence of ld.so.preload + with access. + +2004-09-01 Roland McGrath + + * sysdeps/unix/sysv/linux/bits/waitflags.h + (WSTOPPED, WEXITED, WCONTINUED, WNOWAIT): New macros. + * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_WAITID_SYSCALL): + New macro. + * sysdeps/unix/sysv/linux/waitid.c: New file. Use new syscall when + available, or fall back to the waitpid-based generic code. + +2004-08-14 Alfred M. Szmidt + + * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Let gcc + clobber the `ebp' register. + * sysdeps/mach/hurd/i386/Makefile (CFLAGS-init-first.c): Removed. + Reverts change from 2004-05-07 by Jeroen Dekkers. + + * sysdeps/mach/hurd/i386/init-first.c (init): Changed the type of + NEWSP from `void *' to `int *'. Changed all casts accordingly. + +2004-08-31 Jakub Jelinek + + * wcsmbs/wcsmbsload.c (__wcsmbs_getfct): Move attribute_hidden + before return type. + * locale/localename.c (__current_locale_name): Likewise. + +2004-08-30 Roland McGrath + + * scripts/extract-abilist.awk: If `lastversion' variable defined, omit + later sets from output. + * Makerules (check-abi): Pass option to set that with value of + LIB-abi-frozen variable if one is set. + + * abilist/libcidn.abilist: New file (empty). + +2004-08-30 Jakub Jelinek + + * posix/bits/posix1_lim.h (_POSIX_CHILD_MAX, _POSIX_OPEN_MAX): If + not __USE_XOPEN2K, use the Unix98 mandated values. + +2004-08-27 Roland McGrath + + * configure.in (usetls): Default to yes. + * configure: Regenerated. + +2004-08-26 Roland McGrath + + * configure.in (add_ons_automatic): New variable, set to yes or no + indicating --enable-add-ons with no explicit list. + (running add-on fragments): Allow a fragment to modify $libc_add_on + and have that affect its place in the list of add-ons to use. + * configure: Regenerated. + +2004-08-26 Ulrich Drepper + + * nscd/cache.c: Major rewrite. The data is now optionally kept in + a mmaped memory region which is automatically mirrored on disk. + This implements persistent data storage. The Memory handled + needed to be completely revamped, it now uses a garbage collection + mechanism instead of malloc. + * nscd/connections.c: Likewise. + * nscd/nscd.c: Likewise. + * nscd/nscd.h: Likewise. + * nscd/nscd_conf.c: Likewise. + * nscd/nscd_stat.c: Likewise. + * nscd/grpcache.c: Likewise. + * nscd/hstcache.c:: Likewise. + * nscd/pwdcache.c:: Likewise. + * nscd/Makefile: Add rules to build mem.c. + * nscd/mem.c: New file. + * nscd/nscd.conf: Describe new configuration options. + +2004-08-26 Kaz Kojima + + * sysdeps/unix/sysv/linux/mips/pread.c: Include sgidefs.h only if + NO_SGIDEFS_H isn't defined. + * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. + + * sysdeps/unix/sysv/linux/sh/pread.c: Define NO_SGIDEFS_H and + _MIPS_SIM. + * sysdeps/unix/sysv/linux/sh/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/sh/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/sh/pwrite64.c: Likewise. + +2004-08-26 Ulrich Drepper + + * nscd/connections.c (nscd_run): atomic_increment was not missing. + + * sysdeps/gnu/Makefile (libdl-sysdep_routines): Don't add eval. + Patch by Greg Schafer. + +2004-08-25 Richard Henderson + + * sysdeps/alpha/elf/start.S (_start): Use $15 as frame unwind + instead of $31. Zero $15. + * sysdeps/unix/sysv/linux/alpha/clone.S (thread_start): Likewise. + +2004-08-25 Ulrich Drepper + + * sysdeps/powerpc/powerpc64/bits/atomic.h + (__arch_compare_and_exchange_bool_32_acq): Fix case where oldval + is negative. + (__arch_compare_and_exchange_bool_32_rel): Likewise. + + * nscd/connections.c: Make socket nonblocking so that threads + don't get stuck on accept. Fix locking. + + * nscd/grpcache.c (cache_addgr): Use copy of original key in hash + entry with alternative key. + * nscd/pwdcache.c (cache_addpw): Likewise. + +2004-08-25 Richard Sandiford + + * sysdeps/mips/dl-machine.h (_dl_start_user): Don't set + __libc_stack_end. + +2004-08-23 Ulrich Drepper + + * sysdeps/gnu/netinet/udp.h: Cosmetic changes. Remove unnecessary + __BEGIN_DECLS/__END_DECLS. + +2004-08-23 Andreas Jaeger + + [BZ #341] + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (O_NOATIME): Define. + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (O_NOATIME): Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (O_NOATIME): Likewise. + +2004-08-21 Ulrich Drepper + + * malloc/hooks.c (DEFAULT_CHECK_ACTION): Moved to malloc.c. + (check_action): Likewise. + When printing error messages, use malloc_printf_nc now instead of + fiddling with the streams cancellation flag in every place. + * malloc/malloc.c (DEFAULT_CHECK_ACTION): New definition. Change + default to 3. + (check_action): New variable. + (unlink): Print error message and eventually terminate in case list + is corrupted. + (malloc_printf_nc): New function. Use it in _int_free. + Change proposed by Arjan van de Ven. + + * dlfcn/Makefile: Don't build eval.c anymore. + +2004-08-20 Roland McGrath + + * csu/Makefile ($(objpfx)version-info.h): Use printf in place + of echo -e for POSIX.2 portability. + Reported by Paul Jarc . + +2004-08-19 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Minor optimizations in + list generation. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Don't use + getcanonname_r function if AI_CANONNAME flag is not set in + request. + + * nis/nss_compat/compat-initgroups.c (getgrent_next_nss): + Initialize mysize with limits only if latter is >= 0. Use mysize + in malloc call. + +2004-08-19 Jakub Jelinek + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Cast canon to (char *) + to avoid warning. + + * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Initialize + status to NSS_STATUS_UNAVAIL. + +2004-08-19 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Use h->h_name in the + cannoname lookup since it has the FQDN even if the original NAME + value has not. + +2004-08-18 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Store NAME parameter + pointer in new variable ORIG_NAME and use this pointer when + determination of canonical name failed, not the possibly IDN + translated value of NAME. + +2004-08-17 Ulrich Drepper + + * resolv/resolv.h (RES_DEFAULT): Add RES_NOIP6DOTINT. + * resolv/res_init.c (res_setoptions): Recognize ip6-dotint option. + Reset RES_NOIP6DOTINT flag in this case.. + + * sysdeps/posix/getaddrinfo.c: Fix memory handling of + ai_canonname. + +2004-08-16 Ulrich Drepper + + * resolv/nss_dns/dns-canon.c (_nss_dns_getcanonname_r): Don't use + CNAME records, we better follow the chain of CNAME records which + can be accomplished with A/AAAA lookups. + +2004-08-15 Roland McGrath + + * sysdeps/unix/sysv/linux/bits/resource.h (enum __rusage_who): + Remove __RUSAGE_BOTH constant and RUSAGE_BOTH macro. + * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. + +2004-08-15 Roland McGrath + + * sysdeps/i386/i686/Makefile (elide-routines.os): Append hp-timing to + this, not ... + (static-only-routines): ... this. + * sysdeps/ia64/Makefile: Likewise. + * sysdeps/sparc/sparc32/sparcv9/Makefile: Likewise. + * sysdeps/sparc/sparc64/Makefile: Likewise. + * sysdeps/x86_64/Makefile: Likewise. + * sysdeps/i386/i686/hp-timing.c: Revert copyright terms change. + * sysdeps/ia64/hp-timing.c: Likewise. + * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise. + * sysdeps/sparc/sparc64/hp-timing.c: Likewise. + + * csu/elf-init.c: Update copyright terms including special exception + for these trivial files, which are statically linked into executables + that use dynamic linking for the significant library code. + * io/fstat.c: Likewise. + * io/fstat64.c: Likewise. + * io/lstat.c: Likewise. + * io/lstat64.c: Likewise. + * io/stat.c: Likewise. + * io/stat64.c: Likewise. + * stdlib/atexit.c: Likewise. + * sysdeps/alpha/elf/initfini.c: Likewise. + * sysdeps/alpha/elf/start.S: Likewise. + * sysdeps/arm/elf/start.S: Likewise. + * sysdeps/cris/elf/start.S: Likewise. + * sysdeps/generic/initfini.c: Likewise. + * sysdeps/generic/mknod.c: Likewise. + * sysdeps/hppa/elf/initfini.c: Likewise. + * sysdeps/hppa/elf/start.S: Likewise. + * sysdeps/i386/elf/start.S: Likewise. + * sysdeps/i386/i686/hp-timing.c: Likewise. + * sysdeps/ia64/elf/initfini.c: Likewise. + * sysdeps/ia64/elf/start.S: Likewise. + * sysdeps/ia64/hp-timing.c: Likewise. + * sysdeps/m68k/elf/start.S: Likewise. + * sysdeps/mach/start.c: Likewise. + * sysdeps/mips/elf/start.S: Likewise. + * sysdeps/powerpc/powerpc32/elf/start.S: Likewise. + * sysdeps/powerpc/powerpc64/elf/start.S: Likewise. + * sysdeps/s390/s390-32/elf/start.S: Likewise. + * sysdeps/s390/s390-32/initfini.c: Likewise. + * sysdeps/s390/s390-64/elf/start.S: Likewise. + * sysdeps/s390/s390-64/initfini.c: Likewise. + * sysdeps/sh/elf/initfini.c: Likewise. + * sysdeps/sh/elf/start.S: Likewise. + * sysdeps/sparc/sparc32/elf/start.S: Likewise. + * sysdeps/sparc/sparc32/sparcv9/hp-timing.c: Likewise. + * sysdeps/sparc/sparc64/elf/start.S: Likewise. + * sysdeps/sparc/sparc64/hp-timing.c: Likewise. + * sysdeps/standalone/i386/start.S: Likewise. + * sysdeps/standalone/i960/start.S: Likewise. + * sysdeps/standalone/m68k/m68020/start.S: Likewise. + * sysdeps/unix/arm/start.c: Likewise. + * sysdeps/unix/bsd/osf/alpha/start.S: Likewise. + * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise. + * sysdeps/unix/sparc/start.c: Likewise. + * sysdeps/unix/start.c: Likewise. + * sysdeps/unix/sysv/aix/start.s: Likewise. + * sysdeps/unix/sysv/irix4/start.c: Likewise. + * sysdeps/x86_64/elf/initfini.c: Likewise. + * sysdeps/x86_64/elf/start.S: Likewise. + +2004-08-15 Roland McGrath + + [BZ #227] + * sysdeps/unix/sysv/linux/kernel-features.h + (__ASSUME_BRK_PAGE_ROUNDED): New macro. + * sysdeps/unix/sysv/linux/dl-sysdep.c (frob_brk) + [! __ASSUME_BRK_PAGE_ROUNDED]: Adjust the break up if it falls within + the partial page after the dynamic linker's own data segment. + +2004-08-15 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Optimize generation of + v4-mapped addresses a bit. + (gethosts): Move alloca out of macro, so that it is done only once. + + * sysdeps/posix/getaddrinfo.c (gaih_addrtuple): Change type of + addr to avoid casts. + (gethosts): Removed. + (gethosts2): Renamed to gethosts. Make it usable for family != + AF_UNSPEC. Fix AI_V4MAPPED. + (gaih_inet): Remove use of old gethosts. Always use what used to be + gethosts2. If entry is found, try to use the same NSS module's + getcanonname_r function. Use gethostbyaddr for AI_CANONNAME only + if getcanonname_r was not available. Fix filtering of AI_V4MAPPED + addresses. Numerous cleanups. + * resolv/nss_dns/dns-canon.c: New file. + * resolv/Makefile (libnss_dns-routines): Add dns-canon. + * resolv/Versions (libnss_dns): Add _nss_dns_getcanonname_r. + + * elf/Makefile: Add rules to build and run tst-dlopenrpath. + * elf/tst-dlopenrpath.c: New file. + * elf/tst-dlopenrpathmod.c: New file. + + * intl/tst-gettext.sh: Adjust for change of de.po file to UTF-8. + * intl/tst-gettext.c: Likewise. + + * nss/getent.c (ahosts_keys_int): Correctly print IPv6 addresses. + + * nss/getent.c: Allow queries for getaddrinfo with AF_INET and + AF_INET6. + +2004-08-14 Ulrich Drepper + + * po/de.po: Update from translation team. + +2004-08-14 Roland McGrath + + * sysdeps/mach/configure: Regenerated. + * sysdeps/mach/hurd/configure: Regenerated. + +2004-08-14 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (getaddrinfo): If RFC3484 sorting is + performed, make sure it is still the first entry after sorting + that has the ai_canonname information. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Really set ai_canonname + only in one entry. + +2004-08-13 Daniel Jacobowitz + + * scripts/output-format.sed: Handle default case of three-argument + OUTPUT_FORMAT. + + * sysdeps/arm/machine-gmon.h (mcount_internal): Mark as + __attribute_used__. + +2004-08-13 Ulrich Drepper + + * nss/getent.c (ahosts_keys): ai_canonname is NULL for all but the + first returned entry. Print name only if not NULL. + + * nis/nss_nis/nis-netgrp.c: Remove locking by using data in struct + __netgrent object passed in instead of global variables. + Optimize. + * nis/nss_nisplus/nisplus-netgrp.c: Remove locking by using data + in struct __netgrent object passed in instead of global variables. + * inet/netgroup.h (struct __netgrent): Add service_user field. + Move cursor in anonymous union, add new field location to that + union. + * inet/getnetgrent_r.c: Extensive rewrite to really enable + concurrent uset of set/get/endnetgrent and innetgr. + Reported by Chuck Simmons. + + * inet/netgroup.h (struct name_list): Replace name pointer with + zero-sized array. + * inet/getnetgrent_r.c: Adjust code for change in name_list + layout. Numerous strdup and free calls removed. + + * elf/sprof.c (read_symbols): When comparing aliases, prefer + non-hidden over hidden symbols and strong over weak symbols + if both don't start with '_'. + + * malloc/malloc.c: Use strong_alias instead of weak_alias wherever + possible. + +2004-08-12 Jakub Jelinek + + * sysdeps/unix/sysv/linux/bits/resource.h: Define non-standard + RUSAGE_ enums as __RUSAGE_ and adjust macros accordingly. + * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/resource.h: Likewise. + Define non-standard RLIMIT_ enums as __RLIMIT_ and adjust macros + accordingly. + +2004-08-11 Andreas Schwab + + * resolv/res_libc.c: Move definition of __res_initstamp ... + * resolv/res_init.c: ... here. + +2004-08-10 GOTO Masanori + + * locale/C-time.c: Change default ERA value from NULL to "". + * locale/tst-C-locale.c: Add test case for ERA keywords. + +2004-08-12 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/resource.h: Define non-standard + RLIMIT__ enums as __RLIMIT_ and adjust macros accordingly. + * sysdeps/unix/sysv/linux/alpha/bits/resource.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/resource.h: Likewise. + +2004-08-12 Jakub Jelinek + + * sysdeps/unix/sysv/linux/bits/resource.h (RLIMIT_SIGPENDING, + RLIMIT_MSGQUEUE): Add. + (RLIMIT_NLIMITS, RLIM_NLIMITS): Adjust. + * sysdeps/unix/sysv/linux/alpha/bits/resource.h (RLIMIT_SIGPENDING, + RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. + (RLIM_NLIMITS): Adjust. + * sysdeps/unix/sysv/linux/sparc/bits/resource.h (RLIMIT_SIGPENDING, + RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. + (RLIM_NLIMITS): Adjust. + * sysdeps/unix/sysv/linux/mips/bits/resource.h (RLIMIT_SIGPENDING, + RLIMIT_MSGQUEUE, RLIMIT_NLIMITS): Add. + (RLIM_NLIMITS): Adjust. + +2004-08-12 Jakub Jelinek + + * resolv/res_query.c (__libc_res_nsearch): Protect the debugging + printf with #ifdef DEBUG and RES_DEBUG check. + + * sysdeps/unix/sysv/linux/bits/shm.h: Move __END_DECLS after + __USE_MISC #endif. + * sysdeps/generic/bits/shm.h: Add __BEGIN_DECLS for __getpagesize + declaration. + * sysdeps/gnu/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/s390/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/shm.h: Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/shm.h: Likewise. + +2004-08-12 Ulrich Drepper + + * po/ca.po: Update from translation team. + +2004-08-11 Ulrich Drepper + + * sysdeps/unix/sysv/linux/bits/shm.h: Add __BEGIN_DECLS for + __getpagesize declaration. + +2004-08-11 Roland McGrath + + * configure.in (libc_cv_cpp_asm_debuginfo): Add missing braces around + commands inside &&. + Reported by Andreas Schwab . + * configure: Regenerated. + + * posix/tst-waitid.c (do_test): Ignore SIGCHLD before cleanup SIGKILL. + +2004-08-11 Ulrich Drepper + + * time/tzset.c (tzset_internal): Add new parameter which is + nonzero if called through tzset. Use TZDEFAULT name including + name comparison if the new parameter is zero. This means implicit + tzset calls will not cause files to be opened and read by tzfile.c + all the time. + +2004-08-11 Jakub Jelinek + + * rt/tst-timer2.c (do_test): If timer_create fails, just continue. + * rt/tst-timer4.c (do_test): If one of the timer_create calls fails, + return 1 immediately. + + * time/tzfile.c (__tzfile_read): Free transitions only if it will + not be reused. + + * sysdeps/ieee754/dbl-64/mpa.c: Include . + * sysdeps/ieee754/dbl-64/mpa.h (MAX, MIN): Macros removed. + + * stdio-common/tst-popen.c: Include . + + * resolv/res_send.c (__libc_res_nsend): Only define TMPBUF #if DEBUG. + + * sysdeps/pthread/aio_misc.c (handle_fildes_io): Remove noreturn + attribute. Return NULL instead of calling pthread_exit at the end. + +2004-08-11 Roland McGrath + + * iconvdata/testdata/ISO-2022-JP-3: Regenerated. + +2004-08-10 Alfred M. Szmidt + + * sysdeps/generic/bits/in.h (struct ip_mreq): Remove definition. + +2004-08-10 Jakub Jelinek + + * libio/bits/stdio.h (fread_unlocked): Cast 0 to (size_t). + (fwrite_unlocked): When checking if size * n is <= 8, cast each + argument to size_t individually. Cast n to (void) instead of + (size_t), surround with (), return (size_t) 0 if one of n or size + is 0. [BZ #316] + * stdio-common/Makefile (tests): Add tst-unlockedio. + * stdio-common/tst-unlockedio.c: New test. + +2004-08-09 Roland McGrath + + * manual/install.texi (Supported Configurations): Replace bug-glibc + mention with web URL. + * INSTALL: Regenerated. + * locale/iso-3166.def: Likewise, in comment. + * locale/iso-4217.def: Likewise. + * locale/iso-639.def: Likewise. + * posix/cpio.h: Remove bug reporting comment. + +2004-08-09 Ulrich Drepper + + * libio/bits/stdio.h (fread_unlocked): Add a couple of (size_t) + casts to handle funny calls with floating point argument values + and signed values correctly and without warning. + (fwrite_unlocked): Likewise. [BZ #309] + + * malloc/memusage.c (me): Use creat64, not creat. + * malloc/memusagestat.c: Fix handling of very large sizes. [BZ #285] + Patch by Guy Maor . + + * elf/ldconfig.c (options): Mark parameter option names as + translatable. [BZ #253] Patch by Jakub Bogusz . + + * iconv/gconv_charset.h (strip): Also allow comma which is what is + used to separate options. [BZ #194] + +2004-08-09 Roland McGrath + + * FAQ.in: Refer to web pages instead of bug-glibc. + * FAQ: Regenerated. + + * time/strptime_l.c: #include , `bool' used in last change. + +2004-08-09 Ulrich Drepper + + * time/tzset.c (tzset_internal): If TZ is not set do not compare + old and new tz value since it might be /etc/localtime in both + cases although the file changed. [BZ #154] + Patch by Christian Franke . + + * time/tzfile.c (__tzfile_read): Determine dev/ino of file. + Compare with values of previously opened file. Don't do anything + is they match. + +2004-08-08 Ulrich Drepper + + * elf/dl-load.c (_dl_map_object): If __RTLD_CALLMAP flag is set, + reset loader before the actual loading. + * elf/dl-open.c (dl_open_worker): If file name contains no path + element determine map of caller. Pass caller map in this case to + _dl_map_object. Set __RTLD_CALLMAP in mode. + * include/dlfcn.h (__RTLD_CALLMAP): Define. [BZ #116] + Patch by Greg Wolodkin . + + * misc/syslog.c (openlog_internal): Always try both UDP and TCP. + [BZ #108] Patch mainly by Bjorn Andersson . + + * configure.in: Also recognize i786. [BZ #106] + Patch by . + + * resolv/res_query.c (__libc_res_nsearch): Correctly test whether + name contains any dots. [BZ #95] + + * resolv/res_send.c: Compiling with DEBUG defined works again. + * resolv/gethnamaddr.c (dprintf): Renamed to Dprintf. Adjust all + callers. + + * resolv/tst-leaks.c (TIMEOUT): Define so that if no server is + available the process is not killed. [BZ #41] + + * intl/tst-gettext.c (main): Improve some messages. [BZ #33] + + * time/strptime_l.c (__strptime_internal): Fix handling of %Ey. + [BZ #28] + + * po/sv.po: Update from translation team. + +2004-08-07 Ulrich Drepper + + * inet/netinet/in.h: Add more const to the setipv4soucefilter, + getsourcefilter, and setsourcefilter parameter list. + * sysdeps/generic/setipv4sourcefilter.c: Likewise. + * sysdeps/generic/getsourcefilter.c: Likewise. + * sysdeps/generic/setsourcefilter.c: Likewise. + * sysdeps/unix/sysv/linux/setipv4sourcefilter.c: Likewise. + * sysdeps/unix/sysv/linux/getsourcefilter.c: Likewise. + * sysdeps/unix/sysv/linux/setsourcefilter.c: Likewise. + + * po/tr.po: Update from translation team. + +2004-08-06 Ulrich Drepper + + * iconvdata/jisx0213.h (jisx0213_added_in_2004_p): Fix typo. + Reported by Paolo Bonzini. + +2004-08-06 Jakub Jelinek + + * sysdeps/ia64/dl-machine.h (elf_machine_fixup_plt): Add + always_inline. + * sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_runtime_setup, + elf_machine_fixup_plt, elf_machine_plt_conflict): Likewise. + + * sysdeps/unix/sysv/linux/netatalk/at.h: Include bits/sockaddr.h + before including linux/atalk.h. + + * resolv/res_libc.c: Include atomic.h. + + * intl/finddomain.c (free_mem): Rename to... + (_nl_finddomain_subfreeres): ... this. Add + __libc_freeres_fn_section. + * intl/loadmsgcat.c (_nl_unload_domain): Add + __libc_freeres_fn_section. + * intl/gettextP.h (_nl_unload_domain): Move into #ifdef _LIBC. + Add attribute_hidden. + (_nl_findomain_subfreeres): New prototype. + * iconv/gconv_db.c (free_mem): Call _nl_findomain_subfreeres. + +2004-07-30 Guido Guenther + + * nss/getent.c (passwd_keys): Use strtoul instead of isdigit to + test if the key is numeric or not. + (group_keys): Likewise. + +2004-08-05 Ulrich Drepper + + * inet/netinet/in.h: Define struct ip_msfilter, IP_MSFILTER_SIZE, + struct group_filter, and GROUP_FILTER_SIZE. + * include/sys/socket.h: Declare __getsockopt. + * sysdeps/unix/sysv/linux/setipv4sourcefilter.c: New file. + * sysdeps/unix/sysv/linux/getipv4sourcefilter.c: New file. + * sysdeps/unix/sysv/linux/setsourcefilter.c: New file. + * sysdeps/unix/sysv/linux/getsourcefilter.c: New file. [BZ #211] + + * po/ko.po: Update from translation team. + +2004-08-04 Jakub Jelinek + + * hesiod/hesiod.c (__hesiod_res_get): Use calloc instead of malloc + + memset. + (__hesiod_res_set): Free nsaddrs. + + * include/resolv.h (__res_maybe_init): Add prototype. + * resolv/resolv.h (struct __res_state): Add _u._ext.initstamp field. + * resolv/Versions (libc): Add __res_maybe_init@@GLIBC_PRIVATE. + * resolv/res_libc.c (__res_initstamp, lock): New variables. + (res_init): Increase __res_initstamp. + (__res_maybe_init): New function. + * resolv/res_init.c (__res_vinit): Initialize _u._ext.initstamp. + * hesiod/hesiod.c (__hesiod_res_get): Use __res_maybe_init instead + of RES_INIT check and {res_ninit,__res_ninit,res_init} call. + * sysdeps/posix/getaddrinfo.c (gaih_inet): Likewise. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r, + _nss_dns_gethostbyaddr_r): Likewise. + * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r, + _nss_dns_getnetbyaddr_r): Likewise. + * resolv/gethnamaddr.c (gethostbyname, gethostbyname2, + gethostbyaddr): Likewise. + * resolv/res_data.c (fp_nquery, res_mkquery, res_mkupdate, + res_isourserver, res_sendsigned, res_update, res_search, + res_querydomain): Likewise. + * nss/getXXbyYY_r.c (INTERNAL (REENTRANT_NAME)): Likewise. + * nss/digits_dots.c (__nss_hostname_digits_dots): Likewise. + * nss/getnssent_r.c (__nss_setent, __nss_endent, __nss_getent_r): + Likewise. + +2004-08-05 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Set ai_family for + V4-mapped IPv6 addresses and req->ai_family==AF_INET. + Reported by A. Guru . + + * po/sv.po: Update from translation team. + * po/sk.po: Likewise. + * po/pl.po: Likewise. + +2004-08-04 Jakub Jelinek + Ulrich Drepper + + * wcsmbs/mbsrtowcs_l.c (__mbsrtowcs_l): Don't read more input + characters than necessary. + +2004-08-05 Ulrich Drepper + + * wcsmbs/Makefile (tests): Add tst-mbsrtowcs. + * wcsmbs/tst-mbsrtowcs.c: New file. + + * po/fr.po: Update from translation team. + +2004-08-04 Jakub Jelinek + + * resolv/inet_pton.c (inet_pton4): Disallow octal numbers. Reported + by A. Guru . [BZ #295] + +2004-08-05 Ulrich Drepper + + * po/nl.po: Update from translation team. + + * sysdeps/posix/getaddrinfo.c (gaih_inet): Recognize all the IPv4 + numeric address formats inet_addr knows. + (getaddrinfo): Allow AI_NUMERICSERV flag. + If neither IPv4 nor IPv6 interface is present we cannot make any + decision for AI_ADDRCONFIG. Fail if AI_NUMERICSERV is set and the + string is not just a number. Remove useless freeaddrinfo call. + * resolv/netdb.h (AI_NUMERICSERV): Define. + Based on a patch by a.guru@sympatico.ca. + +2004-08-04 Jakub Jelinek + + * stdlib/strfmon_l.c (__vstrfmon_l): Memset whole info structure + instead of trying to initialize some, but not all, fields one by + one. + * stdio-common/printf_size.c (printf_size): Initialize fb_info + structure with *info instead of trying to initialize some, but not + all, fields from it. + + * nscd/connections.c (handle_request): Check if req->type is in + LASTDBREQ .. LASTREQ range instead of req. + + * locale/programs/linereader.c (lr_create): Initialize + lr->return_widestr to 0. + + * elf/dl-close.c (free_slotinfo): Add __libc_freeres_fn_section. + (free_mem): Call free_slotinfo just once. + + * stdio-common/tst-fmemopen.c (main): Check for MAP_FAILED instead + of NULL. + + * locale/localeinfo.h (_nl_locale_subfreeres): New prototype. + * locale/setlocale.c (free_category): Add __libc_freeres_fn_section. + (free_mem): Rename to _nl_locale_subfreeres. + * iconv/gconv_db.c: Include locale/localeinfo.h. + (free_derivation, free_modules_db): Add __libc_freeres_fn_section. + (free_mem): Call _nl_locale_subfreeres. + * iconv/gconv_dl.c (do_release_all): Add __libc_freeres_fn_section. + +2004-08-04 Roland McGrath + + * Makeconfig ($(common-objpfx)config.status): + Fix typo: $(add_ons) -> $(add-ons). + (Makeconfig-add-on): New variable. When doing $(sysdep-makeconfigs) + include, use black magic to get it set to an add-on's name during the + include of the add-on's Makeconfig. + + * configure.in: Use variable name `libc_add_on' when sourcing add-on + configure fragments, so they can refer to this. + * configure: Regenerated. + +2004-08-04 Roland McGrath + + * posix/tst-waitid.c (test_child): Sleep a second before stopping. + (do_test): Bump sleep to three seconds. + (sigchld, check_sigchld): New functions. + (do_test): Handle SIGCHLD and check for getting the right details. + + * posix/tst-waitid.c (do_test): Kill the child process when bailing + out early on some failure. + [WCONTINUED]: Test WCONTINUED functionality. + +2004-08-03 Ulrich Drepper + + * nscd/connections.c (handle_request): Print more descriptive + message for invalid request types. + +2004-08-02 Jakub Jelinek + + * iconvdata/ibm932.c (BODY): Avoid binary search for ch >= 0xffff. + Always treat high as highest number in range + 1. + * iconvdata/ibm943.c (BODY): Likewise. + +2004-07-31 Bruno Haible + + * iconvdata/JISX0213.TXT: Updated to JISX0213 plane 1 version 2004. + * iconvdata/jisx0213.c (__jisx0213_to_ucs_main, + __jisx0213_to_ucs_pagestart, __jisx0213_from_ucs_level1, + __jisx0213_from_ucs_level2): Regenerated. + * iconvdata/jisx0213.h (jisx0213_added_in_2004_p): New function. + * iconvdata/iso-2022-jp-3.c (JISX0213_1_2000_set): Renamed from + JISX0213_1_set. + (JISX0213_1_2004_set): New enum value. + (BODY for FROM_LOOP): Treat ESC $ ( Q like ESC $ ( O. + (BODY for TO_LOOP): For JISX 0213 plane 1 characters, emit ESC $ ( O + when possible, ESC $ ( Q when needed. + * iconvdata/testdata/EUC-JISX0213: Add the 10 new characters. + * iconvdata/testdata/EUC-JISX0213..UTF8: Update. + * iconvdata/testdata/SHIFT_JISX0213: Add the 10 new characters. + * iconvdata/testdata/SHIFT_JISX0213..UTF8: Update. + * iconvdata/testdata/ISO-2022-JP-3: Add the 10 new JISX0213 characters. + * iconvdata/testdata/ISO-2022-JP-3..UTF8: Update. + +2004-07-22 Bruno Haible + + * iconvdata/gconv-modules (ISO-8859-7): Add alias ISO_8859-7:2003. + +2004-07-29 David S. Miller + + * sysdeps/sparc/sparc64/sparcv9b/memcpy.S (memcpy): Optimize + better for smaller than 256 byte copies. Also, use only one + unrolled loop instead of two for the large copy case. + +2004-07-30 Richard Henderson + + * sysdeps/alpha/divq.S: Save t3 before it gets clobbered. + * sysdeps/alpha/remq.S: Likewise. + * sysdeps/alpha/div.S, sysdeps/alpha/ldiv.S: Rewrite with the + new division algorithms in divl.S and divq.S respectively. + +2004-07-28 GOTO Masanori + + * timezone/asia: Update from tzdata2004b. + * timezone/backward: Likewise. + * timezone/europe: Likewise. + * timezone/iso3166.tab: Likewise. + * timezone/leapseconds: Likewise. + * timezone/northamerica: Likewise. + * timezone/southamerica: Likewise. + * timezone/zone.tab: Likewise. + + * timezone/private.h: Update from tzcode2004b. + * timezone/zic.c: Likewise. + +2004-07-27 Ulrich Drepper + + * nscd/grpcache.c (cache_addgr): If necessary, add entry also + under the name the user provided. + * nscd/pwdcache.c (cache_addpw): Likewise. + +2004-07-26 Roland McGrath + + * sysdeps/posix/waitid.c [WEXITED]: Clear WEXITED bit in OPTIONS for + call to __waitpid. + +2004-07-26 Ulrich Drepper + + * nscd/hstcache.c (cache_addhst): Fix two scenarios which lead to + memory leaks. + + * sysdeps/unix/sysv/linux/ifreq.c (__ifreq): Assign pointer for + new buffer at the right time. + Reported by Jakub Bogusz . + +2004-07-25 Ulrich Drepper + + * inet/Versions [libc, GLIBC_2.3.4]: Add getipv4sourcefilter, + getsourcefilter, setipv4sourcefilter, and setsourcefilter. + * inet/Makefile (routines): Likewise. + * inet/netinet/in.h: Add prototypes for getipv4sourcefilter, + getsourcefilter, setipv4sourcefilter, and setsourcefilter. + * sysdeps/generic/getipv4sourcefilter.c: New file. + * sysdeps/generic/setipv4sourcefilter.c: New file. + * sysdeps/generic/getsourcefilter.c: New file. + * sysdeps/generic/setsourcefilter.c: New file. + +2004-07-17 Steven Munroe + + * sysdeps/powerpc/powerpc64/memcpy.S: Improve instruction scheduling + for POWER4 machines. + +2004-07-21 Jakub Jelinek + + [BZ #274] + * stdlib/strtod_l.c (INTERNAL (__STRTOF)): Fix used >= + BITS_PER_MP_LIMB shifting up. + * stdlib/tst-strtod.c (main): Add new tests. + +2004-07-23 Jakub Jelinek + + [BZ #282] + * libio/iopopen.c (_IO_new_popen): Use _IO_init instead of + _IO_no_init. Remove wd from struct locked_FILE. + (_IO_wproc_jumps): Remove. + Reported by Andrew Josey . + * stdio-common/Makefile (tests): Add tst-popen. + * stdio-common/tst-popen.c: New test. + +2004-07-23 Ulrich Drepper + + * posix/bits/posix1_lim.h: Fix values for _POSIX_CHILD_MAX and + _POSIX_OPEN_MAX. Add _POSIX_HOST_NAME_MAX, _POSIX_SYMLINK_MAX, + _POSIX_SYMLOOP_MAX, and _POSIX_RE_DUP_MAX. + Reported by Andrew Josey. + + * include/features.h: Document _POSIX_C_SOURCE == 200112L. + + * grp/grp.h: Define gid_t if __USE_XOPEN2K is defined. + * pwd/pwd.h: Define uid_t and gid_t if __USE_XOPEN2K is defined. + * io/sys/stat.h: Define dev_t, gid_t, ino_t, mode_t, nlink_t, + off_t, time_t, and uid_t if __USE_XOPEN2K is defined. + * signal/signal.h: Define pid_t if __USE_XOPEN2K is defined. + * posix/unistd.h: Define gid_t, off_t, pid_t, uid_t, and + useconds_t if __USE_XOPEN2K is defined. + * io/utime.h: Define time_t if __USE_XOPEN2K is defined. + * libio/stdio.h: Declare fseeko and ftello if __USE_XOPEN2K is defined. + +2004-07-19 Thorsten Kukuk + + * nis/nss_compat/compat-initgroups.c (getgrent_next_nss): Don't + allocate memory for large temporary variables with alloca. + +2004-07-22 Ulrich Drepper + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Compatibility + code must have version GLIBC_2.0. Patch by Dwayne McConnell. + + * nscd/nscd_getgr_r.c (nscd_getgr_r): Avoid read call with NULL + pointer and zero length. + +2004-07-21 Ulrich Drepper + + * nscd/cache.c (prune_cache): Print correct list when debugging. + +2004-07-21 Jakub Jelinek + + * resolv/res_libc.c (res_init): If RES_INIT is set and + _res.nscount > 0, call __res_nclose and free nsaddrs. + * resolv/Makefile: Add rules to build and run tst-leaks2. + * resolv/tst-leaks2.c: New test. + +2004-07-21 Ulrich Drepper + + * intl/libintl.h: Don't define macros for C++. + Patch by Goto Masanori. + +2004-07-22 GOTO Masanori + + [BZ #276] + * include/arpa/inet.h: Change inet_aton type from in_addr_t to int. + * inet/arpa/inet.h: Likewise. + * resolv/inet_addr.c: Likewise. + +2004-07-21 Alexandre Oliva + + * sysdeps/unix/sysv/linux/mips/mips64/syscalls.list: Add semtimedop. + +2004-07-20 Roland McGrath + + * configure.in (add_ons): Substitute this. Move $add_ons handling + after AC_CANONICAL_HOST and default setting of $machine et al. + Don't set $subdirs from $add_ons. + Instead, source add-on/configure fragments early on. + (base_machine): If it's already set, don't set it based on $machine. + (libc_config_ok): New variable, set to no. If an add-on fragment sets + it to yes, skip the tuple sanity check as if --enable-hacker-mode. + (sysnames): Try appending add-on names after machine as well. + * config.make.in (add-ons): Set from @add_ons@ instead of @subdirs@. + * Makeconfig ($(common-objpfx)config.status): Also depend on configure + files in $(add_ons) dirs. + + * sysdeps/unix/sysv/linux/bits/in.h (struct ip_mreq): Remove + definition, now in netinet/in.h proper. + +2004-07-20 Alexandre Oliva + + * sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h): + Sort by syscalls. Make sure we get headers such as sgidefs.h from + the build tree before just-installed ones. + + * sysdeps/mips/atomicity.h: Use standard names for ABI macros, + include sgidefs.h where appropriate. + * sysdeps/mips/dl-machine.h: Likewise. + * sysdeps/mips/machine-gmon.h: Likewise. + * sysdeps/mips/bits/setjmp.h: Likewise. + * sysdeps/mips/fpu/bits/mathdef.h: Likewise. + * sysdeps/mips/mips64/__longjmp.c: Likewise. + * sysdeps/mips/mips64/setjmp_aux.c: Likewise. + * sysdeps/unix/sysv/linux/mips/kernel_stat.h: Likewise. + * sysdeps/unix/sysv/linux/mips/pread.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pread64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/ptrace.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/mips/pwrite64.c: Likewise. + * sysdeps/unix/sysv/linux/mips/sigaction.c: Likewise. + * sysdeps/unix/sysv/linux/mips/sigcontextinfo.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/sigcontext.h: Likewise. + * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/procfs.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/ptrace.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/tas.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/ucontext.h: Likewise. + * sysdeps/unix/sysv/linux/mips/sys/user.h: Likewise. + * sysdeps/unix/sysv/linux/mips/Makefile ($(objpfx)syscall-%.h): + Likewise. + * sysdeps/unix/sysv/linux/mips/configure.in (asm-unistd.h): + Likewise. + + * sysdeps/mips/dl-machine.h (__dl_runtime_resolve): Update to use + _dl_lookup_symbol_x. + (elf_machine_runtime_link_map): Don't INTUSE _dl_signal_error. + +2004-07-20 Ulrich Drepper + + * inet/netinet/in.h: Define struct ip_mreq and struct + ip_mreq_source. + Define struct group_req and struct group_source_req. + * sysdeps/unix/sysv/linux/bits/in.h: Define IP_UNBLOCK_SOURCE, + IP_BLOCK_SOURCE, IP_ADD_SOURCE_MEMBERSHIP, + IP_DROP_SOURCE_MEMBERSHIP, IP_MSFILTER, MCAST_JOIN_GROUP, + MCAST_BLOCK_SOURCE, MCAST_UNBLOCK_SOURCE, MCAST_LEAVE_GROUP, + MCAST_JOIN_SOURCE_GROUP, MCAST_LEAVE_SOURCE_GROUP, and + MCAST_MSFILTER. + Define MCAST_INCLUDE and MCAST_EXCLUDE. + + * iconvdata/gconv-modules: Add alias for IBM874 [BZ #244]. + +2004-07-19 Jakub Jelinek + + [BZ #258] + * math/libm-test.inc (max_value, min_value): New variables. + (initialize): Initialize them. + (pow_test): Add a couple of new tests. + * sysdeps/i386/fpu/e_powf.S (__ieee754_powf): Don't generate invalid + exception if |y| >= 1U<<31. + * sysdeps/i386/fpu/e_pow.S (__ieee754_pow): Don't generate invalid + exception if |y| >= 1L<<63. + * sysdeps/i386/fpu/e_powl.S (__ieee754_powl): Likewise. + If y*log2(x) overflows to +-inf, return still +inf/+0 instead of NaN. + * sysdeps/x86_64/fpu/e_powl.S (__ieee754_powl): Likewise. + +2004-07-18 Ulrich Drepper + + * nscd/pwdcache.c (cache_addpw): Optimize case of unsuccessful + lookup a bit. + * nscd/grpcache.c (cache_addgr): Likewise. + * nscd/hstcache.c (cache_addhst): Likewise. + +2004-07-10 GOTO Masanori + + * sysdeps/s390/s390-32/elf/start.S: Remove symbol _fp_hw. + * sysdeps/s390/s390-64/elf/start.S: Likewise. + +2004-04-16 Andreas Schwab + + * sysdeps/ia64/bits/atomic.h: Cast first argument of + __sync_bool_compare_and_swap_si correct to void*. + +2004-07-17 Ulrich Drepper + + * iconv/iconv_prog.c (print_known_names): Make machine-readable + output even less cluttered. + +2004-07-16 Steven Munroe + + [BZ #269] + * setjmp/Makefile (tests): Add bug269-setjmp. + * setjmp/bug269-setjmp.c: New file. + * sysdeps/powerpc/powerpc64/__longjmp-common.S [SHARED && !IS_IN_rtld]: + Store R2 from jmpbuf in callers TOC save area. + * sysdeps/powerpc/powerpc64/bsd-_setjmp.S [SHARED && !IS_IN_rtld]: + Store R2 in TOC save area. + * sysdeps/powerpc/powerpc64/setjmp-common.S [SHARED && !IS_IN_rtld]: + Copy TOC save area from previous frame as R2 (TOC) in jmpbuf. + +2004-07-16 Jakub Jelinek + + * locale/newlocale.c: Include bits/libc-lock.h. + (__libc_setlocale_lock): Extern decl. + (__newlocale): Use it. + Reported by Ulrich Weigand . + +2004-07-15 Jakub Jelinek + + * sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Remove + static inline __attribute ((always_inline)). Don't define if + NO_CANCELLATION. + (__libc_fcntl): Use INLINE_SYSCALL directly instead of + __fcntl_nocancel. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c (__fcntl_nocancel): + Remove static inline __attribute ((always_inline)). Don't define + if NO_CANCELLATION. + (__libc_fcntl): Use INLINE_SYSCALL directly instead of + __fcntl_nocancel. + * sysdeps/unix/sysv/linux/i386/fcntl.c (__fcntl_nocancel): Define to + __libc_fcntl if NO_CANCELLATION and __ASSUME_FCNTL64 == 0. + Don't define at all if NO_CANCELLATION and __ASSUME_FCNTL64 > 0. + (__libc_fcntl): Don't define if __fcntl_nocancel is a macro. + + [BZ #262] + * sysdeps/i386/elf/start.S (_start): Use @GOT instead of @GOTOFF + for main. + * elf/Makefile: Add rules to build and run tst-pie1. + * elf/tst-pie1.c: New test. + * elf/tst-piemod1.c: New file. + +2004-07-14 Jakub Jelinek + + [BZ #266] + * manual/string.texi (l64a): Note that the static buffer is 7 bytes + long. Rewrite example code so that it takes into account l64a output + shorter than 6 characters. + Reported by Julian Graham . + +2004-07-14 Kaz Kojima + + * sysdeps/sh/dl-machine.h: Don't reset _dl_starting_up here. + (elf_machine_rela_relative): Remove unused valiable. + +2004-07-12 Paul Eggert + + [BZ #263] + * sysdeps/unix/sysv/linux/getloadavg.c (getloadavg): Don't store + outside the buffer if the read returns 0. __strtod_l can't set + endp to NULL, so remove a test for that case. + +2004-07-12 Roland McGrath + + * manual/signal.texi (Interrupted Primitives): Make clear that + TEMP_FAILURE_RETRY evaluates its expression as long int and compares + it to -1 to define "failure". + +2004-07-10 Ulrich Drepper + + * elf/ldconfig.c: Define PROCINFO_CLASS as static before including + ldsodefs.h. + * sysdeps/generic/ldsodefs.h: Only define PROCINFO_CLASS if it is not + already defined. + * sysdeps/i386/dl-procinfo.c: Define PROCINFO_CALLS only if not + already defined. + + * elf/rtld.c (print_statistics): Mark with noinline attribute. + * sysdeps/i386/dl-machine.h (elf_machine_rel): Mark with always_inline + attribute. + (elf_machine_rel_relative): Likewise. + + * include/string.h: Add libc_hidden_proto for __strtok_r and + __strsep_g. + * sysdeps/generic/strsep.c: Add libc_hidden_def. + * sysdeps/generic/strtok_r.c: Likewise. + * sysdeps/i386/strtok_r.S: Add alias for internal symbol. + * sysdeps/i386/i686/strtok_r.S: Likewise. + * sysdeps/x86_64/strtok_r.S: Likewise. + +2004-07-09 Alexandre Oliva + + * inet/getnetgrent_r.c (internal_setnetgrent): Make it hidden + instead of internal-linkage, such that we can alias to it. + (internal_endnetgrent, internal_getnetgrent_r): Likewise. + +2004-07-09 Ulrich Drepper + + * sysdeps/unix/sysv/linux/fcntl.c (__fcntl_nocancel): Move attribute + to the front for gcc 3.5+. + * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c: Likewise. + * include/fcntl.h: Don't declare __fcntl_nocancel here if + NO_CANCELLATION is defined. + +2004-07-07 Jakub Jelinek + + * elf/dl-fini.c (_dl_fini): Add nloaded variable, load + GL(dl_nloaded) into it while still in critical section. + +2004-07-06 Thorsten Kukuk + + * nss/getent.c (print_group, print_passwd): Use %lu format for + `unsigned long int' values. + + * sysdeps/unix/sysv/linux/i386/fcntl.c (__fcntl_nocancel): Fix syntax + error typos in goto statements. + +2004-07-07 Roland McGrath + + * Makefile (dist-separate): New variable. + (glibc-%.tar rule): Make separate tar files for add-ons listed there. + Depend on their configure files. + (dist-do-separate-dirs): New canned sequence to do that. + (dist-separate-libidn, dist-separate-linuxthreads): New variables. + (dist): Depend on add-on tar files based on $(dist-separate). + (dist-version): New variable, default to $(version). + (tag-for-dist, dist): Use that in place of $(version) in deps. + +2004-07-07 Ulrich Drepper + + * elf/dl-fini.c (_dl_fini): Move the unlock of the ld.so lock + before the loop running the destructors. + +2004-05-18 Andreas Schwab + + * elf/dl-load.c (_dl_map_object_from_fd): Use the end address of + the first segment for mprotect, not l_text_end. + +2004-07-05 Ulrich Drepper + + * elf/dl-profile.c (_dl_start_profile): Compact error handling. + Remove hashfraction variable. Make kcount and kcountsize local + variables. + + * elf/dl-init.c: Don't define and use _dl_starting_up if + HAVE_INLINED_SYSCALLS is defined and the variable is not used. + * elf/dl-support.c: Likewise. + * elf/rtld.c: Likewise. + * elf/dl-misc.c (_dl_debug_vdprintf): Use writev syscall directly + if HAVE_INLINED_SYSCALLS is defined. + * sysdeps/powerpc/powerpc64/dl-machine.h: Don't reset _dl_starting_up + here. + * sysdeps/powerpc/powerpc32/dl-start.S: Likewise. + * sysdeps/unix/sysv/linux/configure.in: Define HAVE_INLINED_SYSCALLS. + * config.h.in: Add entry for HAVE_INLINED_SYSCALLS. + + * sysdeps/posix/profil.c: If compiled for ld.so, omit code which + is needed to stop profiling. + * elf/dl-open.c (dl_open_worker): If a newly opened object is to be + profile make sure it cannot be unloaded. + + * sysdeps/unix/sysv/linux/dl-origin.c: Inline readlink syscall. + + * sysdeps/unix/sysv/linux/fcntl.c: If compiled without cancellation + support, make sure the helper function is inlined. + * sysdeps/unix/sysv/linux/pread.c: Likewise. + * sysdeps/unix/sysv/linux/pwrite.c: Likewise. + * sysdeps/unix/sysv/linux/i386/fcntl.c: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c: Likewise. + +2004-07-05 Jakub Jelinek + + * include/string.h (ffs): Add libc_hidden_builtin_proto. + * sysdeps/rs6000/ffs.c (ffs): Add libc_hidden_builtin_def. + * sysdeps/alpha/alphaev67/ffs.S (ffs): Likewise. + * sysdeps/alpha/ffs.S (ffs): Likewise. + * sysdeps/s390/ffs.c (ffs): Likewise. + * sysdeps/powerpc/ffs.c (ffs): Likewise. + * sysdeps/i386/ffs.c (ffs): Likewise. + * sysdeps/i386/i686/ffs.c (ffs): Likewise. + * sysdeps/m68k/ffs.c (ffs): Likewise. + * sysdeps/generic/ffs.c (ffs): Likewise. + * sysdeps/m88k/ffs.c (ffs): Likewise. + * sysdeps/am29k/ffs.c (ffs): Likewise. + * sysdeps/i960/ffs.c (ffs): Likewise. + * sysdeps/x86_64/ffs.c (ffs): Likewise. + + * Makerules (check-abi): Use diff -p -U 0 instead of diff -pu0. + + * sysdeps/powerpc/novmx-longjmp.c (__libc_longjmp, + __libc_siglongjmp): Remove symbol_version. + * sysdeps/powerpc/longjmp.c (__libc_longjmp, __libc_siglongjmp): + Export @@GLIBC_PRIVATE, not @@GLIBC_2.3.4. + * sysdeps/powerpc/sigjmp.c (__sigjmp_save): Use strong_alias + unconditionally. + * sysdeps/powerpc/novmx-sigjmp.c (__sigjmp_save): Remove. + * sysdeps/powerpc/powerpc32/__longjmp.S (__longjmp): Use + strong_alias instead of default_symbol_version, remove + symbol_version. + * sysdeps/powerpc/powerpc64/__longjmp.S (__longjmp): Likewise. + * sysdeps/powerpc/powerpc32/bsd-setjmp.S (__novmx__setjmp): Change + into strong_alias to __novmxsetjmp. + (__vmx__setjmp): Similarly with __vmxsetjmp. + (__setjmp): Make it strong_alias to __vmx__setjmp, remove + default_symbol_version and symbol_version. + * sysdeps/powerpc/powerpc64/bsd-setjmp.S (__novmx__setjmp): Change + into strong_alias to __novmxsetjmp. + (__vmx__setjmp): Similarly with __vmxsetjmp. + (__setjmp): Make it strong_alias to __vmx__setjmp, remove + default_symbol_version and symbol_version. + + * nscd/nscd_getgr_r.c: Include stdio-common/_itoa.h. + +2004-07-05 Ulrich Drepper + + * elf/rtld.c (dl_main): Mark dyn_temp with attribute_relro. + +2004-07-04 Matthew Reppert + + * sysdeps/unix/sysv/linux/i386/glob64.c (glob64): Use libc_hidden_ver + instead of libc_hidden_def. + +2004-07-01 Roland McGrath + + * aclocal.m4: Add provide for AC_CONFIG_AUX_DIR_DEFAULT. + + * Makeconfig ($(common-objpfx)shlib-versions.v.i): Move top-level + $(..)shlib-versions file to last in deps list. This lets add-ons give + more-specific matches that override defaults in the top-level file. + + * sysdeps/unix/sysv/linux/configure.in: If arch_minimum_kernel was + already set, don't set it or libc_cv_gcc_unwind_find_fde. + * sysdeps/unix/sysv/linux/configure: Regenerated. + +2004-07-01 Martin Schwidefsky + + * sysdeps/s390/fpu/bits/mathinline.h [__LIBC_INTERNAL_MATH_INLINES] + (__ieee754_sqrt): Define as __MATH_INLINE using sqdbr instruction. + (__ieee754_sqrtf): Define as __MATH_INLINE using sqebr instruction. + * sysdeps/s390/fpu/e_sqrt.c: New file. + * sysdeps/s390/fpu/e_sqrtf.c: New file. + * sysdeps/s390/Implies: New file. + * sysdeps/s390/s390-32/Implies: Remove ieee754, move + ieee754/dbl-64 and ieee754/flt-32 to s390/Implies. + * sysdeps/s390/s390-64/Implies: Likewise. + +2004-06-30 Jakub Jelinek + + * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Include tls.h. + * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. + + * sysdeps/unix/sysv/linux/s390/s390-32/clone.S (thread_start): + DO_CALL (exit, 1) instead of branching to _exit. + * sysdeps/unix/sysv/linux/s390/s390-64/clone.S (thread_start): + Likewise. + + * sysdeps/s390/fpu/bits/mathinline.h: New file. + + * include/glob.h (glob64): Add libc_hidden_proto. + * sysdeps/generic/glob64.c (glob64): Add libc_hidden_def. + * sysdeps/gnu/glob64.c (glob64): Likewise. + * sysdeps/unix/sysv/linux/i386/glob64.c (glob64): Likewise. + +2004-06-11 Jakub Jelinek + + * sysdeps/i386/fpu/libm-test-ulps: Update for GCC 3.4. + * sysdeps/s390/fpu/libm-test-ulps: Likewise. + +2004-06-11 Dwayne Grant McConnell + + * sysdeps/powerpc/fpu/s_lround.c: Removed. + * sysdeps/powerpc/fpu/s_lroundf.c: Removed. + * sysdeps/powerpc/powerpc32/fpu/s_ceilf.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_ceil.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_floorf.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_floor.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_lrint.c: Removed. + * sysdeps/powerpc/powerpc32/fpu/s_lrint.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_lroundf.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_lround.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_rintf.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_rint.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_roundf.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_round.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_truncf.S: New file. + * sysdeps/powerpc/powerpc32/fpu/s_trunc.S: New file. + +2004-06-30 Ulrich Drepper + + * include/net/if.h: Handle if_nameindex and if_freenameindex with + libc_proto_hidden. + * sysdeps/unix/sysv/linux/netlinkaccess.h: New file. + * sysdeps/unix/sysv/linux/ifaddrs.c: Export netlink handling functions. + * sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Implement using + netlink if possible. Fall back on ioctl method if necessary. + * sysdeps/unix/sysv/linux/Dist: Add netlinkaccess.h. + + * include/unistd.h: Declare __truncate. + * sysdeps/generic/truncate.c: Also define __truncate. + * sysdeps/mach/hurd/truncate.c: Likewise. + * sysdeps/unix/common/syscalls.list: Likewise. + * sysdeps/unix/sysv/linux/truncate64.c: Use __truncate, not truncate. + +2004-06-29 Ulrich Drepper + + * stdio-common/printf-parsemb.c (__parse_one_specmb): Initialize + info.extra. Patch by Marcus Meissner. + +2004-06-29 Kaz Kojima + + * sysdeps/unix/sysv/linux/sh/sysdep.h (SYSCALL_ERROR_HANDLER): + Fix branch offset for a PLT entry. + +2004-06-20 Jim Meyering + + * malloc/obstack.h (obstack_base): Cast to `void *', to align with + documentation. + +2004-06-28 Ulrich Drepper + + * inet/bug-if1.c (do_test): Simply use 0 as invalid index. + Workaround for [BZ #232]. + + * sysdeps/unix/sysv/linux/if_index.c (if_nameindex): Use extend_alloca. + +2004-06-28 GOTO Masanori + + * iconv/gconv_simple.c: Use get16/put16 for user given buffer + in ucs2/ucs2reverse when unaligned memory access is attempted. + * iconv/tst-iconv5.c: New file. + * iconv/Makefile (tests): Add tst-iconv5. + +2004-06-28 Jakub Jelinek + + * inet/bug-if1.c: Include . + +2004-06-19 Roland McGrath + + * sysdeps/posix/waitid.c (do_waitid) [DO_WAITID]: Define function + under this macro name instead. + [NO_DO_WAITID]: Don't define it at all. + (do_waitid) [WNOWAIT, WEXITED]: If these POSIX.1 waitid flag bits are + defined, then return ENOTSUP for combinations of selection bits other + than WEXITED and WEXITED|WSTOPPED, which this version cannot support. + + * posix/tst-waitid.c: New file. + * posix/Makefile (tests): Add it. + +2004-06-28 Jakub Jelinek + + * sysdeps/unix/alpha/sysdep.h (inline_syscall6): Fix a typo. + + [BZ #231] + * sysdeps/unix/alpha/sysdep.S (__syscall_error): Avoid !samegp + relocation in librt.so. + + [BZ #230] + * sysdeps/alpha/dl-machine.h (_dl_start_user): Use ldah/ldl to load + _dl_skip_args. Patch by Jakub Bogusz . + +2004-06-27 Ulrich Drepper + + * elf/ldconfig.c (add_dir): Take chroot into account. + Based on changes by HJ Lu and Hideki Iwamoto. + + * nscd/connections.c (invalidate_cache): If the host cache has to + be invalidated, re-read resolv.conf. + + * resolv/resolv.h (RES_NOIP6DOTINT): Define. + * resolv/res_init.c (res_setoptions): Handle no-ip6-dotint option. + * resolv/gethnamaddr.c (gethostbyaddr): Don't lookup with .ip6.int + if RES_NOIP6DOTINT flag is set. + * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise. + +2004-06-25 Jakub Jelinek + + * sysdeps/unix/sysv/linux/powerpc/fcntl.c: Move to... + * sysdeps/unix/sysv/linux/powerpc/powerpc32/fcntl.c: ... here. + * sysdeps/unix/sysv/linux/powerpc/lockf64.c: Move to... + * sysdeps/unix/sysv/linux/powerpc/powerpc32/lockf64.c: ... here. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/fcntl.c: New file. + + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (F_GETLK, F_SETLK, + F_SETLKW): Fix values for -m32 -D_FILE_OFFSET_BITS=64. + +2004-06-21 Jakub Jelinek + + [BZ #231] + * sysdeps/unix/alpha/Makefile: New file. + * sysdeps/unix/alpha/rt-sysdep.S: New file. + Reported by Jakub Bogusz . + +2004-06-18 Ulrich Drepper + + * sysdeps/posix/getaddrinfo.c (gaih_inet): For AI_CANONNAME, + determine the canonical name only for the first returned entry. + + * inet/bug-if1.c: New file. + * inet/Makefile (tests): Add bug-if1. + +2004-06-18 Roland McGrath + + * Makerules (compile-mkdep-flags): Add -MT $@. + + * Makefile (dist, tag-for-dist): New targets. + (files-for-dist, tag-of-stem): New variables. + (glibc-%.tar glibc-linuxthreads-%.tar): New pattern rule. + Make tar files using cvs export. + (%.bz2, %.gz, tag-%): New pattern rules. + (distribute): Variable removed. + (+subdir_targets): Remove distinfo targets. + (echo_subdirs, echo-distinfo, parent_echo-distinfo): Targets removed. + (rpm/%): Pattern rule removed. + * rpm/Makefile, rpm/rpmrc, rpm/template: Ancient cruft files removed. + * Rules (subdir_echo-headers, subdir_echo-distinfo, subdir_dist): + Targets removed. + * Makerules (dist, subdir_distinfo): Targets removed. + ($(objpfx)distinfo): Depend on $(distribute). + * Make-dist: File removed. + + * NEWS: Fix a typo. Update bug-reporting instructions. + +2004-06-17 Thorsten Kukuk + + * sysdeps/unix/sysv/linux/sched_setaffinity.c + (__sched_setaffinity_new): Set errno to EINVAL and return -1 if + cpuset is wrongly set. + +2004-06-15 Steven Munroe + + * sysdeps/powerpc/powerpc64/memcpy.S: Improve instruction scheduling + for POWER4 machines. + +2004-06-14 Jakub Jelinek + + [BZ #218] + * sunrpc/pmap_prot2.c (xdr_pmaplist): When freeing, remember pml_next + in a local variable, point rp to that local variable afterwards. + +2004-06-11 Jakub Jelinek + + * sysdeps/ieee754/dbl-64/e_sqrt.c (__ieee754_sqrt): Handle special + cases properly. + +2004-06-17 Ulrich Drepper + + * sysdeps/unix/sysv/linux/if_index.c (if_indextoname): Correct + error value for unknown interface. [BZ #198] + +2004-06-13 Jakub Jelinek + + * sysdeps/i386/bits/string.h (memcpy): Add () around arguments. + (memchr, __memrchr, strlen, strcmp, strncmp, __strchr_g, __strchr_c, + __strchrnul_g, __strchrnul_c, strspn, strcspn, strpbrk): Add memory + the asm uses as its input, either of size __n where __n is known or + 0xfffffff. + (strstr): Add "memory" clobber. + +2004-06-14 Jakub Jelinek + + [BZ #219] + * nss/nsswitch.c (free_mem): Don't try to close a library handle + if the handle is invalid. Patch by David Kimdon . + +2004-06-11 Dmitry V. Levin + + [BZ #217] + * debug/xtrace.sh: Fix typo in error diagnostics. + +2004-06-14 Andreas Schwab + + * stdio-common/psignal.c (psignal): Don't use BUF when asprintf + failed. + +2004-06-15 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Fix pasto + that clobbers r19. Fix pasto that overflowed sigcontext.v_reserve. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Fix pasto + that clobbers r19. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Fix pasto + that clobbers r19. Fix pasto that overflowed sigcontext.v_reserve. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: + Fix setting of sigcontext.v_regs. Fix pasto that clobbers r19. + Fix pasto that overflowed sigcontext.v_reserve. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: + Fix pasto that clobbers r19. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Fix setting + of sigcontext.v_regs. Fix pasto that clobbers r19. Fix pasto that + overflowed sigcontext.v_reserve. + +2004-05-04 H.J. Lu + + [BZ #150] + * sysdeps/generic/strtol_l.c (DEF): Use ".gnu.linkonce.r." + instead of ".gnu.linkonce.ro." as the prefix for linkonce + read-only section name. + +2004-06-14 Richard Henderson + + * sysdeps/alpha/div_libc.h (_ITOFS): Use "sp" not "$sp". + (_ITOFT, _FTOIT, _ITOFT2): Likewise. + +2004-06-08 Jakub Jelinek + + * sysdeps/s390/s390-32/backtrace.c (init): Guard with #ifdef SHARED. + (unwind_backtrace, unwind_getip): Define #ifndef SHARED. + (__backtrace): Don't call init #ifndef SHARED. + * sysdeps/s390/s390-64/backtrace.c (init): Guard with #ifdef SHARED. + (unwind_backtrace, unwind_getip): Define #ifndef SHARED. + (__backtrace): Don't call init #ifndef SHARED. + * sysdeps/ia64/backtrace.c (init): Guard with #ifdef SHARED. + (unwind_backtrace, unwind_getip): Define #ifndef SHARED. + (__backtrace): Don't call init #ifndef SHARED. + +2004-06-11 Roland McGrath + + * sysdeps/arm/strlen.S [__ARMEB__]: Compute correctly for big-endian. + From Krzysztof Halasa . + +2004-06-10 Jakub Jelinek + + * elf/tls-macros.h [__s390x__] (TLS_LD, TLS_GD): Clobber also r14. + +2004-06-08 Jakub Jelinek + + [BZ #199] + * crypt/md5-crypt.c (__md5_crypt): Only update buflen if realloc + succeeds. Reported by Miles Ohlrich . + + * elf/chroot_canon.c (chroot_canon): Avoid segfault if first malloc + fails. Avoid memory leak if realloc fails. + +2004-06-09 Jakub Jelinek + + * sysdeps/generic/setenv.c (setenv): Return -1/EINVAL if name is + NULL, "" or contains '=' character in it. Reported by + Michael T Kerrisk . + * stdlib/tst-environ.c: Include errno.h. + (main): Add tests for these arguments to setenv/unsetenv. + +2004-06-07 Roland McGrath + + * NEWS: Update bug reporting instructions. Fix some typos. + +2004-06-05 Ulrich Drepper + + * stdio-common/_itoa.h: Don't expand _itoa inline for libc. + * stdio-common/_itoa.c: Add _itoa implementation. + + * nscd/nscd_gethst_r.c (__nscd_open_socket): Change implementation + to also send request. Add parameter to allow this. + Change callers. + * nscd/nscd_getgr_r.c: Change __nscd_open_socket caller. + * nscd/nscd_getpw_r.c: Likewise. + * nscd/nscd-client.h: Change __nscd_open_socket prototype. + +2004-06-05 Andreas Jaeger + + * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): + Handle more than 6 args correctly. Based on a patch by Masahide + Washizawa . + +2004-06-04 Ulrich Drepper + + * nscd/nscd_gethst_r.c (nscd_gethst_r): Use __nss_not_use_nscd_hosts + in all places, not __nss_not_use_nscd_group. + Reported by Philippe Gregoire. + +2004-06-03 Ulrich Drepper + + * sysdeps/i386/i486/bits/atomic.h: Optimize a bit. + +2004-05-07 Dmitry V. Levin + + * argp/argp-help.c (__argp_error, __argp_failure): Check result + of __asprintf call and don't use string if it failed. + * stdio-common/psignal.c (psignal): Likewise. + * locale/programs/localedef.c (more_help): Likewise. + * resolv/res_hconf.c (arg_service_list, arg_trimdomain_list, + arg_bool, parse_line): Check result of __asprintf calls and + don't use string if they failed. + * sunrpc/svc_simple.c (registerrpc, universal): Likewise. + * elf/ldconfig.c (parse_conf_include): Check result of __asprintf + call and exit if it failed. + +2004-05-10 Jakub Jelinek + + * sysdeps/posix/sysconf.c (__sysconf) : Return _POSIX_* value instead of 1. + * sysdeps/unix/sysv/linux/sysconf.c (__sysconf) + : Return _POSIX_VERSION instead of 1. + +2004-05-07 Jeroen Dekkers + + * sysdeps/mach/hurd/i386/Makefile (CFLAGS-init-first.c): Add + -momit-leaf-frame-pointer. + + * inet/test-ifaddrs.c (addr_string): Surround AF_PACKET case with + #ifdef AF_PACKET. + + * sysdeps/mach/hurd/getcwd.c + (_hurd_canonicalize_directory_name_intern): Only realloc when + size is <= 0. + + * sysdeps/mach/hurd/mmap.c (__mmap): Fail when addr or offset + isn't page aligned. + + * sysdeps/mach/hurd/spawni.c (EXPAND_DTABLE): Set dtablesize to + new size. + + * sysdeps/mach/hurd/Versions (GLIBC_PRIVATE): Add __libc_read, + __libc_write and __libc_lseek64. + +2004-05-29 Roland McGrath + + * elf/Makefile (shared-only-routines): Add dl-caller. + +2004-05-28 Ulrich Drepper + + * sysdeps/powerpc/configure.in: New file. + +2004-05-28 Steven Munroe + + * sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S: Add .machine + "altivec" to enable VMX instructions. + * sysdeps/powerpc/powerpc32/fpu/setjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc64/__longjmp-common.S: Likewise. + * sysdeps/powerpc/powerpc64/setjmp-common.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/getcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Likewise. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise. + +2004-05-27 Jakub Jelinek + + * sysdeps/i386/fpu/bits/mathinline.h (__expm1_code): Define using + __builtin_expm1l for GCC 3.5+. + (__expl): Define using __builtin_expl for GCC 3.4+. + (exp, expf, expl): Don't define for GCC 3.4+. + (tan, tanf, tanl): Don't define for GCC 3.5+. + (__atan2l): Define using __builtin_atan2l for GCC 3.4+. + (atan2, atan2f, atan2l): Don't define for GCC 3.4+ or !__FAST_MATH__. + (fmod, fmodf, fmodl): Don't define for GCC 3.5+ or !__FAST_MATH__. + (fabsf, fabsl): Only provide if __USE_MISC or __USE_ISOC99. + (sin, sinf, sinl, cos, cosf, cosl, log, logf, logl): Don't define + for GCC 3.4+. + (log10, log10f, log10l, asin, asinf, asinl, acos, acosf, acosl): + Don't define for GCC 3.5+. + (atan, atanf, atanl): Don't define for GCC 3.4+ or !__FAST_MATH__. + (log1p, log1pf, log1pl, logb, logbf, logbl, log2, log2f, log2l): Don't + define for GCC 3.5+. + (drem, dremf, dreml): Don't define for GCC 3.5+ or !__FAST_MATH__. + * sysdeps/sparc/fpu/bits/mathinline.h (sqrt, sqrtf, sqrtl): Don't + define for GCC 3.2+. + +2004-05-27 Jakub Jelinek + + * string/bits/string2.h (__bzero): Define even for GCC 3.0+. + * sysdeps/alpha/stpcpy.S (stpcpy): Add libc_hidden_builtin_def. + * sysdeps/alpha/alphaev67/stpcpy.S (stpcpy): Likewise. + * sysdeps/powerpc/powerpc32/stpcpy.S (stpcpy): Likewise. + * sysdeps/powerpc/powerpc64/stpcpy.S (stpcpy): Likewise. + * sysdeps/sparc/sparc32/stpcpy.S (stpcpy): Likewise. + * sysdeps/sparc/sparc64/stpcpy.S (stpcpy): Likewise. + * sysdeps/i386/stpcpy.S (stpcpy): Likewise. + * sysdeps/i386/i586/stpcpy.S (stpcpy): Likewise. + * sysdeps/generic/stpcpy.c (stpcpy): Likewise. + * sysdeps/x86_64/stpcpy.S (stpcpy): Likewise. + * sysdeps/i386/i586/memcpy.S (memcpy): Remove + libc_hidden_builtin_def if MEMPCPY_P. + * sysdeps/x86_64/memcpy.S (memcpy): Likewise. + * sysdeps/i386/i686/mempcpy.S (mempcpy): Add libc_hidden_builtin_def. + * sysdeps/i386/i586/mempcpy.S (mempcpy): Likewise. + * sysdeps/generic/mempcpy.c (mempcpy): Likewise. + * sysdeps/x86_64/mempcpy.S (mempcpy): Likewise. + +2004-05-26 Roland McGrath + + * sysdeps/generic/bits/in.h + (IMPLINK_IP, IMPLINK_LOWEXPER, IMPLINK_HIGHEXPER): Macros removed. + These are long obsolete in BSD systems where they originated. + * conform/data/netinet/in.h-data: Remove `allow IMPLINK_*' + +2004-05-26 Jakub Jelinek + + * include/string.h (mempcpy, stpcpy): Add libc_hidden_builtin_proto. + * string/bits/string2.h (memset): Disable macro for GCC 3.0+. + (__mempcpy): Use __builtin_mempcpy for GCC 3.4+. + (strchr): For GCC 3.2+, only use __rawmemchr if second argument is + constant '\0' and first argument is not constant. + (__stpcpy): Use __builtin_stpcpy for GCC 3.4+. + (strncpy): Remove #ifdef _USE_STRING_ARCH_mempcpy variant. + For GCC 3.2+ use __builtin_strncpy. + (strncat): For GCC 3.2+ use __builtin_strncat. + (strcmp): For GCC 3.2+ use __builtin_strcmp if both arguments are + constant. + (strcspn, strspn, strpbrk): For GCC 3.2+, use builtin function + if both arguments are constant. + +2004-05-26 Ulrich Drepper + + * nss/nss_files/files-hosts.c: Fix condition for looking up IPv4 + mapped addresses in gethostbyaddr. + +2004-05-25 Ulrich Drepper + + * nss/digits_dots.c (__nss_hostname_digits_dots): Remove typep and + flags parameter, convert afp to simple int parameter. Adjust code. + typep was never != NULL and flags therefore also unused. *afp is + never modified. + * nss/nsswitch.h: Adjust __nss_hostname_digits_dots prototype. + * nss/getXXbyYY.c: Remove HAVE_TYPE handling. Adjust af parameter + handling for __nss_hostname_digits_dots calls. + * nss/getXXbyYY_r.c: Likewise. + + * elf/dl-load.c (_dl_map_object_from_fd): Map DSOs with MAP_DENYWRITE. + +2004-05-25 Steven Munroe + + * sysdeps/powerpc/fpu/Makefile: Make ld.so a dependency of libm.so. + * sysdeps/powerpc/fpu/bits/mathinline.h [__LIBC_INERNAL_MATH_INLINES] + (__ieee754_sqrt): Define as __MATH_INLINE using fsqrt instruction. + (__ieee754_sqrtf): Define as __MATH_INLINE using fsqrts instruction. + * sysdeps/powerpc/fpu/e_sqrt.c (__slow_ieee754_sqrt): Moved + implementation from w_sqrt.c. + * sysdeps/powerpc/fpu/e_sqrtf.c (__slow_ieee754_sqrtf): Moved + implementation from w_sqrtf.c. + * sysdeps/powerpc/fpu/w_sqrt.c (__sqrt): Wrapper implementation + using inline __ieee754_sqrt(). + * sysdeps/powerpc/fpu/w_sqrtf.c (__sqrtf): Wrapper implementation + using inline __ieee754_sqrtf(). + * sysdeps/powerpc/powerpc32/sysdep.h [__ASSEMBLER__]: Include + independent of __ASSEMBLER__. + * sysdeps/powerpc/sysdep.h [__ASSEMBLER__] (PPC_FEATURE_*): Define + PPC_FEATURE_* independent of __ASSEMBLER__. + +2004-05-25 Jakub Jelinek + + * sysdeps/pthread/aio_notify.c: Use <> instead of "" for aio_misc.h + include. + (aio_start_notify_thread): Define if not defined. + (notify_func_wrapper): Use it. + * sysdeps/pthread/aio_misc.c: Use <> instead of "" for aio_misc.h + include. + (aio_create_helper_thread): Define if not defined. + (__aio_create_helper_thread): New function. + (__aio_enqueue_request): Use aio_create_helper_thread. + + * nis/ypclnt.c (ypall_data, ypall_foreach): Remove. + (struct ypresp_all_data): New type. + (__xdr_ypresp_all): Change second argument to + struct ypresp_all_data *. Replace ypall_foreach and + ypall_data with objp->foreach and objp->data. + (yp_all): Remove status variable, add data. Replace + all uses of status with data.status. Initialize data.foreach + and data.data instead of ypall_foreach and ypall_data. + +2004-05-24 Jakub Jelinek + + * elf/dl-lookup.c (add_dependency): Set DF_1_NODELETE bit + in l_flags_1, not in l_flags. + +2004-04-10 Robert Millan + + * sysdeps/unix/sysv/linux/bits/in.h: Cosmetic fixes to get in sync + with sysdeps/generic/bits/in.h. + +2004-05-25 Roland McGrath + + * sysdeps/generic/unwind-dw2-fde-glibc.c: Change copyright terms from + GCC GPL to standard glibc LGPL. + +2004-05-24 Ulrich Drepper + + * manual/string.texi (Copying and Concatenation): Fixed second + concat example. + Reported by Fabian Pietsch . + +2004-05-23 Ulrich Drepper + + * malloc/obstack.c: Don't allow linking with _obstack. + +2004-05-23 Andreas Schwab + + * sysdeps/m68k/m68020/bits/atomic.h: Use "+m" constraint instead + of separate "m" constraints. + +2004-05-15 Chris Demetriou + + * sysdeps/mips/dl-machine.h (ELF_DL_FRAME_SIZE) + (ELF_DL_SAVE_ARG_REGS, ELF_DL_RESTORE_ARG_REGS): For the N32 + and 64 ABIs, save and restore regs $10 and $11 (a6 and a7). + +2004-05-20 Paul Eggert + + * malloc/obstack.c (_obstack) [!defined _LIBC]: Remove; not used. + Add comment explaining why libc still defines it. + +2004-05-19 Paul Eggert + + * malloc/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast, + obstack_alignment_mask, obstack_alloc, obstack_base, + obstack_blank, obstack_blank_fast, obstack_chunk_size, + obstack_copy, obstack_copy0, obstack_finish, obstack_grow, + obstack_grow0, obstack_init, obstack_int_grow, + obstack_int_grow_fast, obstack_make_room, obstack_memory_used, + obstack_next_free, obstack_object_size, obstack_ptr_grow, + obstack_ptr_grow_fast, obstack_room): Remove declarations of + nonexistent functions. + +2004-05-18 Steven Munroe + + * sysdeps/powerpc/powerpc64/sysdep.h [__ASSEMBLER__]: Include + independent of __ASSEMBLER__. + [PIC]: Redundent for powerpc64, removed. + (ENTRY): Generate size and alignment for opd entry. + (EALIGN): Generate size and alignment for opd entry. + (END): Use DOT_LABEL in ASM_SIZE_DIRECTIVE. + (END_GEN_TB): Use DOT_LABEL in ASM_SIZE_DIRECTIVE. + +2004-05-19 Ulrich Drepper + + * misc/regexp.h: Say the functions have been withdrawn. + + * wcsmbs/tst-wcpncpy.c: Add more tests. + +2004-05-18 Roland McGrath + + * sysdeps/generic/unwind.h: Change copyright terms from GCC GPL to + standard glibc LGPL. + * sysdeps/generic/unwind-dw2.c: Likewise. + * sysdeps/generic/unwind-dw2-fde.c: Likewise. + * sysdeps/generic/unwind-dw2-fde.h: Likewise. + * sysdeps/generic/unwind-pe.h: Likewise. + +2004-05-15 Petter Reinholdtsen + + * locale/iso-3166.def: Remove YUGOSLAVIA and insert "SERBIA AND + MONTENEGRO" which have taken over the code 819. Patch from + Danilo Segan. [BZ #40] + +2004-05-15 Jakub Jelinek + + * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h + (SYSCALL_ERROR_HANDLER): Rename __sparc.get_pic.l7 to + __sparc_get_pic_l7. + +2004-05-15 Joseph S. Myers + + * catgets/gencat.c: Update bug reporting instructions. + * csu/version.c: Likewise. + * debug/catchsegv.sh: Likewise. + * debug/pcprofiledump.c: Likewise. + * debug/xtrace.sh: Likewise. + * elf/ldd.bash.in: Likewise. + * iconv/iconv_prog.c: Likewise. + * iconv/iconvconfig.c: Likewise. + * locale/programs/locale.c: Likewise. + * locale/programs/localedef.c: Likewise. + * login/programs/pt_chown.c: Likewise. + * malloc/memusage.sh: Likewise. + * malloc/memusagestat.c: Likewise. + * malloc/mtrace.pl: Likewise. + * manual/crypt.texi: Likewise. + * manual/install.texi: Likewise. + * nss/makedb.c: Likewise. + +2004-05-14 Jakub Jelinek + + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Only + CHECK_STATIC_TLS if sym != NULL. + * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise. + * sysdeps/i386/dl-machine.h (elf_machine_rela): Likewise. + +2004-05-12 Andreas Schwab + + * posix/regex_internal.c (build_wcs_buffer): Also set pstr->mbs + when translating. + +2004-05-13 H.J. Lu + + * Rules (xtests): Depend on tests. + +2004-05-13 Jakub Jelinek + + * libio/genops.c (_IO_default_xsputn): Avoid one overflow per char if + count is negative, yet write_ptr < write_end. + (_IO_default_xsgetn): Avoid one underflow per char if count is + negative, yet read_ptr < read_end. + +2004-05-12 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/bits/termios.h (XTABS): Define XTABS + equal to TAB3. + +2004-05-12 Ulrich Drepper + + * elf/dl-lookup.c (_dl_lookup_symbol_x): Correct _dl_signal_cerror + call. + +2004-05-10 Roland McGrath + + * hurd/hurdlookup.c (__hurd_file_name_split): Return ENOENT for "". + (__hurd_directory_name_split): Likewise. + +2004-05-10 Ulrich Drepper + + * po/fr.po: Update from translation team. + +2004-05-10 Andreas Jaeger + + * sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext): + Correctly compute alignment. + Patch by Michael Matz . + +2004-05-09 Ulrich Drepper + + * sysdeps/generic/sigpause.c: Prevent sigpause prototype. + * sysdeps/posix/sigpause.c: Likewise. + * signal/signal.h: Don't define sigpause macro unless needed. + +2004-05-08 Jakub Jelinek + + * configure.in (libc_cv_libgcc_s_suffix): New check. + (libc_cv_as_needed): Use -lgcc_s$libc_cv_libgcc_s_suffix. + * config.make.in (libgcc_s_suffix): Set. + * Makeconfig (libgcc_eh): Use -lgcc_s$(libgcc_s_suffix). + +2004-05-08 Ulrich Drepper + + * signal/signal.h: Use BSD sigpause only if BSD behavior is preferred. + +2004-04-29 Steven Munroe + + * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (LOADARGS_1, + LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5, LOADARGS_6): + Load argument values into temporary variables. + * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h (LOADARGS_1, + LOADARGS_2, LOADARGS_3, LOADARGS_4, LOADARGS_5, LOADARGS_6): + Likewise. + +2004-05-07 Ulrich Drepper + + * sysdeps/unix/sysv/linux/Makefile: mq_send.c and mq_receive.c + need to be compiled with exceptions. + +2004-05-06 Ulrich Drepper + + * sysdeps/unix/sysv/linux/ifreq.c (__ifreq): Fix memory handling. + * sysdeps/generic/ifreq.c (__ifreq): Fix memory handling. + + * resolv/res_hconf.c (_res_hconf_reorder_addrs): Make clear that + realloc cannot fail. + + * nss/nss_files/files-netgrp.c (EXPAND): Free buffer which cannot + be expanded. + + * nis/nis_table.c: Clean up memory handling. + * nis/nis_subr.c (nis_getnames): Clean up memory handling. + * nis/nis_removemember.c (nis_removemember): Add comment + explaining use of realloc. + + * math/tgmath.h (fabs): Use __TGMATH_UNARY_REAL_IMAG_RET_REAL. + (carg): Likewise. + Patch by Lev S Bishop . + + * math/bug-tgmath1.c (main): Test fabs and carg as well. + +2004-05-06 Richard Henderson + + * elf/elf.h (AT_L1I_CACHESHAPE, AT_L1D_CACHESHAPE, + AT_L2_CACHESHAPE, AT_L3_CACHESHAPE): New. + * sysdeps/unix/sysv/linux/alpha/Versions: Export + __libc_alpha_cache_shape as a private symbol. + * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: New file. + * sysdeps/unix/sysv/linux/alpha/sysconf.c: New file. + +2004-05-06 Richard Henderson + + * sysdeps/alpha/div_libc.h (_ITOFS, _ITOFT, _FTOIT, _ITOFT2): New. + * sysdeps/alpha/divl.S: Use them. + * sysdeps/alpha/divq.S: Likewise. + * sysdeps/alpha/divqu.S: Likewise. + * sysdeps/alpha/reml.S: Likewise. + * sysdeps/alpha/remq.S: Likewise. + * sysdeps/alpha/remqu.S: Likewise. + +2004-05-06 Ulrich Drepper + + * math/tgmath.h (__TGMATH_UNARY_REAL_IMAG_RET_REAL):Define. + (cimag): Use it. + (creal): Likewise. + * math/Makefile (tests): Add bug-tgmath1. + * math/bug-tgmath1.c: New file. + +2004-05-05 Jakub Jelinek + + * sysdeps/alpha/atomicity.h: Remove. + * sysdeps/generic/atomicity.h: Remove. + +2004-05-05 H.J. Lu + + * sysdeps/i386/i486/bits/string.h (strpbrk): Cast return to + char *. + +2004-04-22 David Mosberger + + * sysdeps/unix/sysv/linux/ia64/Makefile (librt-routines): Mention + rt-sysdep. + * sysdeps/unix/sysv/linux/ia64/rt-sysdep.S: New file. + + * sysdeps/ia64/strcat.c: New file. + * sysdeps/ia64/strcat.S: Delete. + +2004-05-04 Jakub Jelinek + + * sysdeps/unix/sysv/linux/ia64/sysdep.S (USE___THREAD): Remove + defined. + +2004-04-23 Jakub Jelinek + + * sysdeps/ia64/fpu/libm_support.h (__libm_error_support): Add + libc_hidden_proto. Define to __GI___libm_error_support for + assembly going into libc.so. + * sysdeps/ia64/fpu/libc_libm_error.c (__libm_error_support): Add + libc_hidden_def. + + * include/libc-symbols.h (HIDDEN_BUILTIN_JUMPTARGET): Define. + * sysdeps/ia64/bcopy.S (bcopy): Use it for jump to memmove. + + * sysdeps/unix/sysv/linux/ia64/sysdep.S (__syscall_error): Access + gprel errno if RTLD_PRIVATE_ERRNO or __thread __libc_errno/errno + if USE___THREAD. + +2004-05-03 Jakub Jelinek + + * sysdeps/unix/bsd/bits/fcntl.h (F_SETOWN, F_GETOWN): Define if + __USE_BSD or __USE_UNIX98. + * sysdeps/unix/bsd/ultrix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. + * sysdeps/unix/bsd/bsd4.4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. + * sysdeps/unix/bsd/sun/sunos4/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/common/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. + * sysdeps/unix/sysv/aix/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. + * sysdeps/unix/sysv/irix4/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. + * sysdeps/unix/sysv/linux/alpha/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/s390/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/cris/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/mips/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/sh/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/i386/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/m68k/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/arm/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h (F_SETOWN, F_GETOWN): + Likewise. + * sysdeps/generic/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. + * sysdeps/mach/hurd/bits/fcntl.h (F_SETOWN, F_GETOWN): Likewise. + * io/sys/stat.h (S_ISSOCK, S_IFSOCK): Likewise. + +2004-05-01 Jakub Jelinek + + * posix/Versions (libc): Remove __libc_wait, __libc_waitpid, + __libc_pause, __libc_nanosleep, __libc_pread, __libc_pread64, + __libc_pwrite64, __waitid and __pselect @@GLIBC_PRIVATE. + * stdlib/Versions (libc): Remove __on_exit@@GLIBC_PRIVATE. + * sysdeps/unix/sysv/linux/Versions (libc): Remove + __libc_sigaction@@GLIBC_PRIVATE. + * sysdeps/unix/sysv/linux/x86_64/Versions (libc): Remove + __modify_ldt@@GLIBC_PRIVATE. + * socket/Versions (libc): Remove __libc_accept, __libc_send, + __libc_recvfrom, __libc_recvmsg, __libc_sendmsg, __libc_recv, + __libc_sendto and __libc_connect @@GLIBC_PRIVATE. + * stdio-common/Versions (libc): Remove + _itoa_upper_digits@@GLIBC_PRIVATE. + * resolv/Versions (libresolv): Remove __ns_samename@@GLIBC_PRIVATE. + * misc/Versions (libc): Remove __libc_fsync, __libc_msync, + __libc_readv and __libc_writev @@GLIBC_PRIVATE. + * termios/Versions (libc): Remove __libc_tcdrain@@GLIBC_PRIVATE. + * io/Versions (libc): Remove __libc_open, __libc_close, __libc_read, + __libc_write, __libc_lseek, __libc_fcntl, __libc_open64 and + __libc_lseek64 @@GLIBC_PRIVATE. + +2004-04-30 Jakub Jelinek + + * elf/dl-load.c (open_verify): Move e_phentsize check after e_type + check. + +2004-04-29 Steven Munroe + + * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_floor.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_llrint.c: Removed. + * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_llrintf.c: Removed. + * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_llround.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_llroundf.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_lround.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_lroundf.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_rint.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_round.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: New file. + * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: New file. + + * math/test-misc.c [LDBL_MANT_DIG == 106](main): Correct LDBL_MAX + mantissa for AIX long double format. + * misc/qefgcvt.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Define for AIX + long double format. + * misc/qefgcvt_r.c [LDBL_MANT_DIG == 106] (NDIGIT_MAX): Likewise. + * stdlib/fpioconst.c [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024] + (_fpioconst_pow10): AIX long double format has same exponent range as + double. + * stdlib/fpioconst.h [!__NO_LONG_DOUBLE_MATH && __LDBL_MAX_EXP__>1024] + (LDBL_MAX_10_EXP_LOG): AIX long double format has same exponent range + as double. + +2004-04-23 Art Haas + + * sysdeps/unix/sysv/linux/kernel-features.h: Add 'defined'. + +2004-04-28 Carlos O'Donell + + * sysdeps/unix/sysv/linux/mq_getattr.c: Include . + * sysdeps/unix/sysv/linux/mq_notify.c: Likewise. + * sysdeps/unix/sysv/linux/mq_open.c: Likewise. + * sysdeps/unix/sysv/linux/mq_receive.c: Likewise. + * sysdeps/unix/sysv/linux/mq_send.c: Likewise. + +2004-04-29 Philip Blundell + + * sysdeps/arm/dl-machine.h (RTLD_START): Avoid unnecessary GOT + entries. + +2004-04-29 Jakub Jelinek + + * manual/resource.texi (sched_setaffinity, sched_getaffinity): Fix + prototypes and description [BZ #131]. + + * string/bits/string2.h (strpbrk): Cast NULL to char * [BZ #130]. + Patch by Ed Catmur . + * string/tst-inlcall.c (main): Add test for strpbrk. + + [BZ #140] + * sysdeps/unix/sysv/linux/sys/sysctl.h: Remove linux/compiler.h + include. + (_LINUX_KERNEL_H, _LINUX_TYPES_H, _LINUX_LIST_H): Only define if not + yet defined, #undef back after including linux/sysctl.h if defined + here. + (__LINUX_COMPILER_H, __user): Define if not yet defined, #undef + back after including linux/sysctl.h if defined here. + + * sysdeps/sparc/sparc64/soft-fp/qp_qtoi.c (_Qp_qtoi): Use %f31 + for single precision register, add it to __asm clobbers [BZ #139]. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoui.c (_Qp_qtoui): Use %f31 + for single precision register, add it to __asm clobbers. + * sysdeps/sparc/sparc64/soft-fp/qp_qtoux.c (_Qp_qtoux): Use fqtox + instead of fqtoi in QP_HANDLE_EXCEPTIONS. + * sysdeps/sparc/sparc64/soft-fp/qp_qtox.c (_Qp_qtox): Likewise. + Reported by M. H. VanLeeuwen . + +2004-04-23 Andreas Schwab + + * sysdeps/unix/sysv/linux/m68k/register-dump.h: Use + __attribute_used__. + +2004-04-22 Philip Blundell + + * sysdeps/arm/dl-machine.h (elf_machine_rela): Don't use INTUSE + when calling _dl_signal_error. + (elf_machine_rel): Likewise. + +2004-04-21 Ulrich Drepper + + * sysdeps/unix/sysv/linux/ia64/setjmp.S: Define _GI___sigsetjmp + and use it internally instead of __sigsetjmp. + * sysdeps/ia64/fpu/s_frexpf.c (frexpf): Use _GI___libm_frexp_4f. + * sysdeps/ia64/fpu/s_frexpl.c (frexpl): Use _GI___libm_frexp_4l. + * sysdeps/ia64/fpu/libm_frexp4.S: Define _GI___libm_frexp_4. + * sysdeps/ia64/fpu/libm_frexp4f.S: Define _GI___libm_frexp_4f. + * sysdeps/ia64/fpu/libm_frexp4l.S: Define _GI___libm_frexp_4l. + * sysdeps/ia64/fpu/s_frexp.c (frexp): Use _GI___libm_frexp_4. + * sysdeps/ia64/fpu/libm_support.h: Declare _GI___libm_frexp_4, + _GI___libm_frexp_4f, _GI___libm_frexp_4l. + * sysdeps/ia64/fpu/bits/mathinline.h: New file. + * sysdeps/unix/sysv/linux/ia64/__start_context.S: Use + HIDDEN_JUMPTARGET for exit call. + * sysdeps/unix/sysv/linux/ia64/clone2.S: Use HIDDEN_JUMPTARGET for + _exit call. + * sysdeps/ia64/bcopy.S: Use HIDDEN_JUMPTARGET for memmove call. + * sysdeps/ia64/strcat.S: Use HIDDEN_JUMPTARGET for strlen and + strcpy calls. + +2004-04-21 Jakub Jelinek + + * posix/tst-chmod.c (do_test): Fix a typo. + + * elf/lateglobal.c (main): Fix error checks. + Patch by Stephen Clarke . + + * manual/ctype.texi (isblank, iswblank): Mark as ISO functions, + mention they have been added in ISO C99. + Reported by Ben Pfaff . + +2004-03-31 H.J. Lu + + * sysdeps/ieee754/ldbl-128/bits/huge_vall.h: Fix typo. + +2004-04-20 Jakub Jelinek + + * sysdeps/unix/sysv/linux/shm_open.c (shm_unlink): Change EPERM into + EACCES. + +2004-04-20 Jakub Jelinek + + * stdio-common/vfscanf.c (_IO_vfscanf): Revert last %% whitespace + handling change. + * stdio-common/tst-sscanf.c (int_tests): Adjust. + + * nis/nss-nis.c: Include stdlib.h. + + * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Shut up a + warning. + * sysdeps/sparc/sparc64/memcmp.S (memcmp): Remove BP_SYM () from + libc_hidden_builtin_def. + +2004-04-20 Jim Meyering + + * misc/error.c (error_tail): Don't leak upon realloc failure. + +2004-04-20 Martin Schwidefsky + + * sysdeps/unix/sysv/linux/dl-execstack.c (_dl_make_stack_executable): + Use RETURN_ADDRESS instead of __builtin_return_address. + +2004-04-19 Ulrich Drepper + + * sysdeps/unix/sysv/linux/mq_unlink.c: Rewrite to produce more + compact code. + +2004-04-20 Jakub Jelinek + + * stdio-common/vfscanf.c (_IO_vfscanf): When skipping whitespace, + do input_error () instead of conv_error () and don't look at errno. + Don't eat any whitespace before %% if skip_space == 0. + * stdio-common/tst-sscanf.c (int_tests): New array. + (main): Run int_tests. + + +See ChangeLog.14 for earlier changes. diff -rNpu glibc-2.3.4/csu/Makefile glibc-2.3.5/csu/Makefile --- glibc-2.3.4/csu/Makefile 2004-08-20 13:12:43.000000000 -0700 +++ glibc-2.3.5/csu/Makefile 2005-02-16 01:34:09.000000000 -0800 @@ -54,11 +54,13 @@ include ../Makeconfig ifeq (yes,$(build-shared)) extra-objs += S$(start-installed-name) install-lib += S$(start-installed-name) +generated += start.os endif ifeq (yes,$(build-bounded)) extra-objs += b$(start-installed-name) install-lib += b$(start-installed-name) +generated += start.ob endif ifneq ($(start-installed-name),$(static-start-installed-name)) diff -rNpu glibc-2.3.4/csu/version.c glibc-2.3.5/csu/version.c --- glibc-2.3.4/csu/version.c 2004-05-17 11:37:11.000000000 -0700 +++ glibc-2.3.5/csu/version.c 2005-02-16 02:29:36.000000000 -0800 @@ -25,7 +25,7 @@ static const char __libc_version[] = VER static const char banner[] = "GNU C Library "RELEASE" release version "VERSION", by Roland McGrath et al.\n\ -Copyright (C) 2004 Free Software Foundation, Inc.\n\ +Copyright (C) 2005 Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\ PARTICULAR PURPOSE.\n\ diff -rNpu glibc-2.3.4/debug/catchsegv.sh glibc-2.3.5/debug/catchsegv.sh --- glibc-2.3.4/debug/catchsegv.sh 2004-10-19 03:34:20.000000000 -0700 +++ glibc-2.3.5/debug/catchsegv.sh 2005-02-16 02:29:39.000000000 -0800 @@ -39,7 +39,7 @@ if test $# -eq 0; then ;; --v | --ve | --ver | --vers | --versi | --versio | --version) echo 'catchsegv (GNU libc) @VERSION@' - echo 'Copyright (C) 2004 Free Software Foundation, Inc. + echo 'Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Ulrich Drepper.' diff -rNpu glibc-2.3.4/debug/xtrace.sh glibc-2.3.5/debug/xtrace.sh --- glibc-2.3.4/debug/xtrace.sh 2004-06-15 13:10:06.000000000 -0700 +++ glibc-2.3.5/debug/xtrace.sh 2005-02-16 02:29:40.000000000 -0800 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1999, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1999, 2001-2004, 2005 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. @@ -64,7 +64,7 @@ do_version() { printf $"Copyright (C) %s Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -" "2004" +" "2005" printf $"Written by %s. " "Ulrich Drepper" exit 0 diff -rNpu glibc-2.3.4/dirent/tst-seekdir.c glibc-2.3.5/dirent/tst-seekdir.c --- glibc-2.3.4/dirent/tst-seekdir.c 2001-08-07 19:48:58.000000000 -0700 +++ glibc-2.3.5/dirent/tst-seekdir.c 2005-02-16 02:43:01.000000000 -0800 @@ -11,8 +11,23 @@ main (int argc, char *argv[]) int i = 0; int result = 0; struct dirent *dp; + long int save0; + long int rewind; dirp = opendir ("."); + if (dirp == NULL) + { + printf ("opendir failed: %m\n"); + return 1; + } + + save0 = telldir (dirp); + if (save0 == -1) + { + printf ("telldir failed: %m\n"); + result = 1; + } + for (dp = readdir (dirp); dp != NULL; dp = readdir (dirp)) { /* save position 3 (after fourth entry) */ @@ -44,6 +59,19 @@ main (int argc, char *argv[]) for (dp = readdir (dirp); dp != NULL; dp = readdir (dirp)) printf ("%s\n", dp->d_name); + /* Check rewinddir */ + rewinddir (dirp); + rewind = telldir (dirp); + if (rewind == -1) + { + printf ("telldir failed: %m\n"); + result = 1; + } + else if (save0 != rewind) + { + printf ("rewinddir didn't reset directory stream\n"); + result = 1; + } closedir (dirp); return result; diff -rNpu glibc-2.3.4/elf/circleload1.c glibc-2.3.5/elf/circleload1.c --- glibc-2.3.4/elf/circleload1.c 2002-07-16 17:31:32.000000000 -0700 +++ glibc-2.3.5/elf/circleload1.c 2005-04-05 19:50:10.000000000 -0700 @@ -27,7 +27,7 @@ check_loaded_objects (const char **loade for (lm = _r_debug.r_map; lm; lm = lm->l_next) { if (lm->l_name && lm->l_name[0]) - printf(" %s, count = %d\n", lm->l_name, (int) lm->l_opencount); + printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount); if (lm->l_type == lt_loaded && lm->l_name) { int match = 0; diff -rNpu glibc-2.3.4/elf/dl-close.c glibc-2.3.5/elf/dl-close.c --- glibc-2.3.4/elf/dl-close.c 2004-10-14 02:20:57.000000000 -0700 +++ glibc-2.3.5/elf/dl-close.c 2005-04-05 19:49:59.000000000 -0700 @@ -102,18 +102,9 @@ void internal_function _dl_close (void *_map) { - struct reldep_list - { - struct link_map **rellist; - unsigned int nrellist; - unsigned int nhandled; - struct reldep_list *next; - bool handled[0]; - } *reldeps = NULL; - struct link_map **list; struct link_map *map = _map; unsigned int i; - unsigned int *new_opencount; + Lmid_t ns = map->l_ns; #ifdef USE_TLS bool any_tls = false; #endif @@ -124,162 +115,134 @@ _dl_close (void *_map) /* Nope. Do nothing. */ return; - if (__builtin_expect (map->l_opencount, 1) == 0) + if (__builtin_expect (map->l_direct_opencount, 1) == 0) GLRO(dl_signal_error) (0, map->l_name, NULL, N_("shared object not open")); /* Acquire the lock. */ __rtld_lock_lock_recursive (GL(dl_load_lock)); /* One less direct use. */ - assert (map->l_direct_opencount > 0); --map->l_direct_opencount; /* Decrement the reference count. */ - if (map->l_opencount > 1 || map->l_type != lt_loaded) + if (map->l_direct_opencount > 1 || map->l_type != lt_loaded) { /* There are still references to this object. Do nothing more. */ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) - GLRO(dl_debug_printf) ("\nclosing file=%s; opencount == %u\n", - map->l_name, map->l_opencount); - - /* Decrement the object's reference counter, not the dependencies'. */ - --map->l_opencount; - - /* If the direct use counter reaches zero we have to decrement - all the dependencies' usage counter. */ - if (map->l_direct_opencount == 0) - for (i = 1; i < map->l_searchlist.r_nlist; ++i) - --map->l_searchlist.r_list[i]->l_opencount; + GLRO(dl_debug_printf) ("\nclosing file=%s; direct_opencount == %u\n", + map->l_name, map->l_direct_opencount); __rtld_lock_unlock_recursive (GL(dl_load_lock)); return; } - list = map->l_initfini; + const unsigned int nloaded = GL(dl_ns)[ns]._ns_nloaded; + char used[nloaded]; + char done[nloaded]; + struct link_map *maps[nloaded]; + + /* Run over the list and assign indeces to the link maps and enter + them into the MAPS array. */ + int idx = 0; + for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next) + { + l->l_idx = idx; + maps[idx] = l; + ++idx; + } + assert (idx == nloaded); - /* Compute the new l_opencount values. */ - i = map->l_searchlist.r_nlist; - if (__builtin_expect (i == 0, 0)) - /* This can happen if we handle relocation dependencies for an - object which wasn't loaded directly. */ - for (i = 1; list[i] != NULL; ++i) - ; + /* Prepare the bitmaps. */ + memset (used, '\0', sizeof (used)); + memset (done, '\0', sizeof (done)); + + /* Keep track of the lowest index link map we have covered already. */ + int done_index = -1; + while (++done_index < nloaded) + { + struct link_map *l = maps[done_index]; - unsigned int nopencount = i; - new_opencount = (unsigned int *) alloca (i * sizeof (unsigned int)); + if (done[done_index]) + /* Already handled. */ + continue; + + /* Check whether this object is still used. */ + if (l->l_type == lt_loaded + && l->l_direct_opencount == 0 + && (l->l_flags_1 & DF_1_NODELETE) == 0 + && !used[done_index]) + continue; + + /* We need this object and we handle it now. */ + done[done_index] = 1; + used[done_index] = 1; + /* Signal the object is still needed. */ + l->l_idx = -1; - for (i = 0; list[i] != NULL; ++i) - { - list[i]->l_idx = i; - new_opencount[i] = list[i]->l_opencount; - } - --new_opencount[0]; - for (i = 1; list[i] != NULL; ++i) - if ((list[i]->l_flags_1 & DF_1_NODELETE) == 0 - /* Decrement counter. */ - && (assert (new_opencount[i] > 0), --new_opencount[i] == 0)) - { - void mark_removed (struct link_map *remmap) - { - /* Test whether this object was also loaded directly. */ - if (remmap->l_searchlist.r_list != NULL - && remmap->l_direct_opencount > 0) - { - /* In this case we have to decrement all the dependencies of - this object. They are all in MAP's dependency list. */ - unsigned int j; - struct link_map **dep_list = remmap->l_searchlist.r_list; - - for (j = 1; j < remmap->l_searchlist.r_nlist; ++j) - if (! (dep_list[j]->l_flags_1 & DF_1_NODELETE) - || ! dep_list[j]->l_init_called) + /* Mark all dependencies as used. */ + if (l->l_initfini != NULL) + { + struct link_map **lp = &l->l_initfini[1]; + while (*lp != NULL) + { + if ((*lp)->l_idx != -1) { - assert (dep_list[j]->l_idx < map->l_searchlist.r_nlist); - assert (new_opencount[dep_list[j]->l_idx] > 0); - if (--new_opencount[dep_list[j]->l_idx] == 0) + assert ((*lp)->l_idx >= 0 && (*lp)->l_idx < nloaded); + + if (!used[(*lp)->l_idx]) { - assert (dep_list[j]->l_type == lt_loaded); - mark_removed (dep_list[j]); + used[(*lp)->l_idx] = 1; + if ((*lp)->l_idx - 1 < done_index) + done_index = (*lp)->l_idx - 1; } } - } - if (remmap->l_reldeps != NULL) + ++lp; + } + } + /* And the same for relocation dependencies. */ + if (l->l_reldeps != NULL) + for (unsigned int j = 0; j < l->l_reldepsact; ++j) + { + struct link_map *jmap = l->l_reldeps[j]; + + if (jmap->l_idx != -1) { - unsigned int j; - for (j = 0; j < remmap->l_reldepsact; ++j) - { - struct link_map *depmap = remmap->l_reldeps[j]; + assert (jmap->l_idx >= 0 && jmap->l_idx < nloaded); - /* Find out whether this object is in our list. */ - if (depmap->l_idx < nopencount - && list[depmap->l_idx] == depmap) - { - /* Yes, it is. If is has a search list, make a - recursive call to handle this. */ - if (depmap->l_searchlist.r_list != NULL) - { - assert (new_opencount[depmap->l_idx] > 0); - if (--new_opencount[depmap->l_idx] == 0) - { - /* This one is now gone, too. */ - assert (depmap->l_type == lt_loaded); - mark_removed (depmap); - } - } - else - { - /* Otherwise we have to handle the dependency - deallocation here. */ - unsigned int k; - for (k = 0; depmap->l_initfini[k] != NULL; ++k) - { - struct link_map *rl = depmap->l_initfini[k]; - - if (rl->l_idx < nopencount - && list[rl->l_idx] == rl) - { - assert (new_opencount[rl->l_idx] > 0); - if (--new_opencount[rl->l_idx] == 0) - { - /* Another module to remove. */ - assert (rl->l_type == lt_loaded); - mark_removed (rl); - } - } - else - { - assert (rl->l_opencount > 0); - if (--rl->l_opencount == 0) - mark_removed (rl); - } - } - } - } + if (!used[jmap->l_idx]) + { + used[jmap->l_idx] = 1; + if (jmap->l_idx - 1 < done_index) + done_index = jmap->l_idx - 1; } } } + } - mark_removed (list[i]); - } - assert (new_opencount[0] == 0); + /* Sort the entries. */ + _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nloaded, used, ns); - /* Call all termination functions at once. */ - for (i = 0; list[i] != NULL; ++i) + bool unload_any = false; + unsigned int first_loaded = ~0; + for (i = 0; i < nloaded; ++i) { - struct link_map *imap = list[i]; - if (new_opencount[i] == 0 && imap->l_type == lt_loaded - && (imap->l_flags_1 & DF_1_NODELETE) == 0) - { - /* When debugging print a message first. */ - if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) - GLRO(dl_debug_printf) ("\ncalling fini: %s [%lu]\n\n", - imap->l_name, imap->l_ns); + struct link_map *imap = maps[i]; + + if (!used[i]) + { + assert (imap->l_type == lt_loaded + && (imap->l_flags_1 & DF_1_NODELETE) == 0); /* Call its termination function. Do not do it for half-cooked objects. */ if (imap->l_init_called) { + /* When debugging print a message first. */ + if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_IMPCALLS, 0)) + GLRO(dl_debug_printf) ("\ncalling fini: %s [%lu]\n\n", + imap->l_name, ns); + if (imap->l_info[DT_FINI_ARRAY] != NULL) { ElfW(Addr) *array = @@ -299,72 +262,60 @@ _dl_close (void *_map) + imap->l_info[DT_FINI]->d_un.d_ptr))) (); } - /* This object must not be used anymore. We must remove the - reference from the scope. */ - unsigned int j; - struct link_map **searchlist = map->l_searchlist.r_list; - unsigned int nsearchlist = map->l_searchlist.r_nlist; + /* This object must not be used anymore. */ + imap->l_removed = 1; -#ifndef NDEBUG - bool found = false; -#endif - for (j = 0; j < nsearchlist; ++j) - if (imap == searchlist[j]) - { - /* This is the object to remove. Copy all the - following ones. */ - while (++j < nsearchlist) - searchlist[j - 1] = searchlist[j]; + /* We indeed have an object to remove. */ + unload_any = true; - searchlist[j - 1] = NULL; - - --map->l_searchlist.r_nlist; - -#ifndef NDEBUG - found = true; -#endif - break; - } - assert (found); + /* Remember where the first dynamically loaded object is. */ + if (i < first_loaded) + first_loaded = i; } - else if (new_opencount[i] != 0 && imap->l_type == lt_loaded - && imap->l_searchlist.r_list == NULL - && imap->l_initfini != NULL) + /* Else used[i]. */ + else if (imap->l_type == lt_loaded) { - /* The object is still used. But the object we are - unloading right now is responsible for loading it. If - the current object does not have it's own scope yet we - have to create one. This has to be done before running - the finalizers. - - To do this count the number of dependencies. */ - unsigned int cnt; - for (cnt = 1; imap->l_initfini[cnt] != NULL; ++cnt) - if (imap->l_initfini[cnt]->l_idx >= i - && imap->l_initfini[cnt]->l_idx < nopencount) - ++new_opencount[imap->l_initfini[cnt]->l_idx]; - else - ++imap->l_initfini[cnt]->l_opencount; - - /* We simply reuse the l_initfini list. */ - imap->l_searchlist.r_list = &imap->l_initfini[cnt + 1]; - imap->l_searchlist.r_nlist = cnt; - - for (cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) - if (imap->l_scope[cnt] == &map->l_searchlist) - { - imap->l_scope[cnt] = &imap->l_searchlist; - break; - } - } + if (imap->l_searchlist.r_list == NULL + && imap->l_initfini != NULL) + { + /* The object is still used. But the object we are + unloading right now is responsible for loading it. If + the current object does not have it's own scope yet we + have to create one. This has to be done before running + the finalizers. + + To do this count the number of dependencies. */ + unsigned int cnt; + for (cnt = 1; imap->l_initfini[cnt] != NULL; ++cnt) + ; + + /* We simply reuse the l_initfini list. */ + imap->l_searchlist.r_list = &imap->l_initfini[cnt + 1]; + imap->l_searchlist.r_nlist = cnt; - /* Store the new l_opencount value. */ - imap->l_opencount = new_opencount[i]; + for (cnt = 0; imap->l_scope[cnt] != NULL; ++cnt) + if (imap->l_scope[cnt] == &map->l_searchlist) + { + imap->l_scope[cnt] = &imap->l_searchlist; + break; + } + } - /* Just a sanity check. */ - assert (imap->l_type == lt_loaded || imap->l_opencount > 0); + /* The loader is gone, so mark the object as not having one. + Note: l_idx == -1 -> object will be removed. */ + if (imap->l_loader != NULL && imap->l_loader->l_idx != -1) + imap->l_loader = NULL; + + /* Remember where the first dynamically loaded object is. */ + if (i < first_loaded) + first_loaded = i; + } } + /* If there are no objects to unload, do nothing further. */ + if (!unload_any) + goto out; + /* Notify the debugger we are about to remove some loaded objects. */ _r_debug.r_state = RT_DELETE; GLRO(dl_debug_state) (); @@ -377,12 +328,12 @@ _dl_close (void *_map) /* Check each element of the search list to see if all references to it are gone. */ - for (i = 0; list[i] != NULL; ++i) + for (i = first_loaded; i < nloaded; ++i) { - struct link_map *imap = list[i]; - if (imap->l_opencount == 0 && imap->l_type == lt_loaded) + struct link_map *imap = maps[i]; + if (!used[i]) { - struct libname_list *lnp; + assert (imap->l_type == lt_loaded); /* That was the last reference, and this was a dlopen-loaded object. We can unmap it. */ @@ -512,39 +463,13 @@ _dl_close (void *_map) if (imap->l_origin != (char *) -1) free ((char *) imap->l_origin); - /* If the object has relocation dependencies save this - information for latter. */ - if (__builtin_expect (imap->l_reldeps != NULL, 0)) - { - struct reldep_list *newrel; - - newrel = (struct reldep_list *) alloca (sizeof (*reldeps) - + (imap->l_reldepsact - * sizeof (bool))); - newrel->rellist = imap->l_reldeps; - newrel->nrellist = imap->l_reldepsact; - newrel->next = reldeps; - - newrel->nhandled = imap->l_reldepsact; - unsigned int j; - for (j = 0; j < imap->l_reldepsact; ++j) - { - /* Find out whether this object is in our list. */ - if (imap->l_reldeps[j]->l_idx < nopencount - && list[imap->l_reldeps[j]->l_idx] == imap->l_reldeps[j]) - /* Yes, it is. */ - newrel->handled[j] = true; - else - newrel->handled[j] = false; - } - - reldeps = newrel; - } + free (imap->l_reldeps); /* This name always is allocated. */ free (imap->l_name); /* Remove the list with all the names of the shared object. */ - lnp = imap->l_libname; + + struct libname_list *lnp = imap->l_libname; do { struct libname_list *this = lnp; @@ -555,8 +480,7 @@ _dl_close (void *_map) while (lnp != NULL); /* Remove the searchlists. */ - if (imap != map) - free (imap->l_initfini); + free (imap->l_initfini); /* Remove the scope array if we allocated it. */ if (imap->l_scope != imap->l_scope_mem) @@ -590,26 +514,8 @@ _dl_close (void *_map) _r_debug.r_state = RT_CONSISTENT; GLRO(dl_debug_state) (); - /* Now we can perhaps also remove the modules for which we had - dependencies because of symbol lookup. */ - while (__builtin_expect (reldeps != NULL, 0)) - { - while (reldeps->nrellist-- > 0) - /* Some of the relocation dependencies might be on the - dependency list of the object we are closing right now. - They were already handled. Do not close them again. */ - if (reldeps->nrellist < reldeps->nhandled - && ! reldeps->handled[reldeps->nrellist]) - _dl_close (reldeps->rellist[reldeps->nrellist]); - - free (reldeps->rellist); - - reldeps = reldeps->next; - } - - free (list); - /* Release the lock. */ + out: __rtld_lock_unlock_recursive (GL(dl_load_lock)); } libc_hidden_def (_dl_close) @@ -687,3 +593,7 @@ libc_freeres_fn (free_mem) } #endif } + +#ifdef SHARED +#include "dl-fini.c" +#endif diff -rNpu glibc-2.3.4/elf/dl-deps.c glibc-2.3.5/elf/dl-deps.c --- glibc-2.3.4/elf/dl-deps.c 2004-10-13 19:01:14.000000000 -0700 +++ glibc-2.3.5/elf/dl-deps.c 2005-04-05 19:50:10.000000000 -0700 @@ -566,8 +566,6 @@ Filters not supported with LD_TRACE_PREL { /* A direct or transitive dependency is also on the list of relocation dependencies. Remove the latter. */ - --map->l_reldeps[i]->l_opencount; - for (j = i + 1; j < map->l_reldepsact; ++j) map->l_reldeps[j - 1] = map->l_reldeps[j]; diff -rNpu glibc-2.3.4/elf/dl-fini.c glibc-2.3.5/elf/dl-fini.c --- glibc-2.3.4/elf/dl-fini.c 2004-10-27 13:24:17.000000000 -0700 +++ glibc-2.3.5/elf/dl-fini.c 2005-04-05 19:49:59.000000000 -0700 @@ -23,10 +23,97 @@ #include +void +internal_function +_dl_sort_fini (struct link_map *l, struct link_map **maps, size_t nmaps, + char *used, Lmid_t ns) +{ + if (ns == LM_ID_BASE) + /* The main executable always comes first. */ + l = l->l_next; + + for (; l != NULL; l = l->l_next) + /* Do not handle ld.so in secondary namespaces and object which + are not removed. */ + if (l == l->l_real && l->l_idx != -1) + { + /* Find the place in the 'maps' array. */ + unsigned int j; + for (j = ns == LM_ID_BASE ? 1 : 0; maps[j] != l; ++j) + assert (j < nmaps); + + /* Find all object for which the current one is a dependency + and move the found object (if necessary) in front. */ + for (unsigned int k = j + 1; k < nmaps; ++k) + { + struct link_map **runp = maps[k]->l_initfini; + if (runp != NULL) + { + while (*runp != NULL) + if (*runp == l) + { + struct link_map *here = maps[k]; + + /* Move it now. */ + memmove (&maps[j] + 1, + &maps[j], (k - j) * sizeof (struct link_map *)); + maps[j] = here; + + if (used != NULL) + { + char here_used = used[k]; + + memmove (&used[j] + 1, + &used[j], (k - j) * sizeof (char)); + used[j] = here_used; + } + + ++j; + + break; + } + else + ++runp; + } + + if (__builtin_expect (maps[k]->l_reldeps != NULL, 0)) + { + unsigned int m = maps[k]->l_reldepsact; + struct link_map **relmaps = maps[k]->l_reldeps; + + while (m-- > 0) + { + if (relmaps[m] == l) + { + struct link_map *here = maps[k]; + + /* Move it now. */ + memmove (&maps[j] + 1, + &maps[j], + (k - j) * sizeof (struct link_map *)); + maps[j] = here; + + if (used != NULL) + { + char here_used = used[k]; + + memmove (&used[j] + 1, + &used[j], (k - j) * sizeof (char)); + used[j] = here_used; + } + + break; + } + } + } + } + } +} + +#if !defined SHARED || defined IS_IN_rtld /* Type of the constructor functions. */ typedef void (*fini_t) (void); - void internal_function _dl_fini (void) @@ -48,16 +135,16 @@ _dl_fini (void) /* We run the destructors of the main namespaces last. As for the other namespaces, we pick run the destructors in them in reverse order of the namespace ID. */ - for (Lmid_t cnt = DL_NNS - 1; cnt >= 0; --cnt) + for (Lmid_t ns = DL_NNS - 1; ns >= 0; --ns) { /* Protect against concurrent loads and unloads. */ __rtld_lock_lock_recursive (GL(dl_load_lock)); - unsigned int nloaded = GL(dl_ns)[cnt]._ns_nloaded; + unsigned int nloaded = GL(dl_ns)[ns]._ns_nloaded; /* XXX Could it be (in static binaries) that there is no object loaded? */ - assert (cnt != LM_ID_BASE || nloaded > 0); + assert (ns != LM_ID_BASE || nloaded > 0); /* Now we can allocate an array to hold all the pointers and copy the pointers in. */ @@ -76,86 +163,27 @@ _dl_fini (void) unsigned int i; struct link_map *l; - for (l = GL(dl_ns)[cnt]._ns_loaded, i = 0; l != NULL; l = l->l_next) + for (l = GL(dl_ns)[ns]._ns_loaded, i = 0; l != NULL; l = l->l_next) /* Do not handle ld.so in secondary namespaces. */ if (l == l->l_real) { assert (i < nloaded); - maps[i++] = l; - - /* Bump l_opencount of all objects so that they are not - dlclose()ed from underneath us. */ - ++l->l_opencount; + maps[i] = l; + l->l_idx = i; + ++i; + + /* Bump l_direct_opencount of all objects so that they are + not dlclose()ed from underneath us. */ + ++l->l_direct_opencount; } - assert (cnt != LM_ID_BASE || i == nloaded); - assert (cnt == LM_ID_BASE || i == nloaded || i == nloaded - 1); + assert (ns != LM_ID_BASE || i == nloaded); + assert (ns == LM_ID_BASE || i == nloaded || i == nloaded - 1); unsigned int nmaps = i; if (nmaps != 0) - { - /* Now we have to do the sorting. */ - l = GL(dl_ns)[cnt]._ns_loaded; - if (cnt == LM_ID_BASE) - /* The main executable always comes first. */ - l = l->l_next; - for (; l != NULL; l = l->l_next) - /* Do not handle ld.so in secondary namespaces. */ - if (l == l->l_real) - { - /* Find the place in the 'maps' array. */ - unsigned int j; - for (j = cnt == LM_ID_BASE ? 1 : 0; maps[j] != l; ++j) - assert (j < nmaps); - - /* Find all object for which the current one is a dependency - and move the found object (if necessary) in front. */ - for (unsigned int k = j + 1; k < nmaps; ++k) - { - struct link_map **runp = maps[k]->l_initfini; - if (runp != NULL) - { - while (*runp != NULL) - if (*runp == l) - { - struct link_map *here = maps[k]; - - /* Move it now. */ - memmove (&maps[j] + 1, - &maps[j], - (k - j) * sizeof (struct link_map *)); - maps[j++] = here; - - break; - } - else - ++runp; - } - - if (__builtin_expect (maps[k]->l_reldeps != NULL, 0)) - { - unsigned int m = maps[k]->l_reldepsact; - struct link_map **relmaps = maps[k]->l_reldeps; - - while (m-- > 0) - { - if (relmaps[m] == l) - { - struct link_map *here = maps[k]; - - /* Move it now. */ - memmove (&maps[j] + 1, - &maps[j], - (k - j) * sizeof (struct link_map *)); - maps[j] = here; - - break; - } - } - } - } - } - } + /* Now we have to do the sorting. */ + _dl_sort_fini (GL(dl_ns)[ns]._ns_loaded, maps, nmaps, NULL, ns); /* We do not rely on the linked list of loaded object anymore from this point on. We have our own list here (maps). The various @@ -191,7 +219,7 @@ _dl_fini (void) 0)) _dl_debug_printf ("\ncalling fini: %s [%lu]\n\n", l->l_name[0] ? l->l_name : rtld_progname, - cnt); + ns); /* First see whether an array is given. */ if (l->l_info[DT_FINI_ARRAY] != NULL) @@ -211,14 +239,17 @@ _dl_fini (void) } /* Correct the previous increment. */ - --l->l_opencount; + --l->l_direct_opencount; } } +#ifdef SHARED if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_STATISTICS, 0)) _dl_debug_printf ("\nruntime linker statistics:\n" " final number of relocations: %lu\n" "final number of relocations from cache: %lu\n", GL(dl_num_relocations), GL(dl_num_cache_relocations)); +#endif } +#endif diff -rNpu glibc-2.3.4/elf/dl-load.c glibc-2.3.5/elf/dl-load.c --- glibc-2.3.4/elf/dl-load.c 2004-12-12 12:49:28.000000000 -0800 +++ glibc-2.3.5/elf/dl-load.c 2005-04-05 19:50:10.000000000 -0700 @@ -1,5 +1,5 @@ /* Map in a shared object's segments from the file. - Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 1995-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 @@ -36,6 +36,7 @@ #include #include #include +#include #include @@ -105,13 +106,13 @@ ELF_PREFERRED_ADDRESS_DATA; int __stack_prot attribute_hidden attribute_relro - = (PROT_READ|PROT_WRITE #if _STACK_GROWS_DOWN && defined PROT_GROWSDOWN - |PROT_GROWSDOWN + = PROT_GROWSDOWN; #elif _STACK_GROWS_UP && defined PROT_GROWSUP - |PROT_GROWSUP + = PROT_GROWSUP; +#else + = 0; #endif - ); /* Type for the buffer we put the ELF header and hopefully the program @@ -840,7 +841,7 @@ _dl_map_object_from_fd (const char *name /* Look again to see if the real name matched another already loaded. */ for (l = GL(dl_ns)[nsid]._ns_loaded; l; l = l->l_next) - if (l->l_ino == st.st_ino && l->l_dev == st.st_dev) + if (l->l_removed == 0 && l->l_ino == st.st_ino && l->l_dev == st.st_dev) { /* The object is already loaded. Just bump its reference count and return it. */ @@ -1327,12 +1328,16 @@ cannot allocate TLS data structures for if (__builtin_expect (__check_caller (RETURN_ADDRESS (0), allow_ldso|allow_libc) == 0, 0)) - __stack_prot |= PROT_EXEC; + __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC; __mprotect ((void *) p, s, PROT_READ); } else #endif - __stack_prot |= PROT_EXEC; + __stack_prot |= PROT_READ|PROT_WRITE|PROT_EXEC; + +#ifdef check_consistency + check_consistency (); +#endif errval = (*GL(dl_make_stack_executable_hook)) (stack_endp); if (errval) @@ -1788,7 +1793,12 @@ open_path (const char *name, size_t name must not be freed using the general free() in libc. */ if (sps->malloced) free (sps->dirs); - sps->dirs = (void *) -1; +#ifdef HAVE_Z_RELRO + /* rtld_search_dirs is attribute_relro, therefore avoid writing + into it. */ + if (sps != &rtld_search_dirs) +#endif + sps->dirs = (void *) -1; } return -1; @@ -1816,7 +1826,8 @@ _dl_map_object (struct link_map *loader, /* If the requested name matches the soname of a loaded object, use that object. Elide this check for names that have not yet been opened. */ - if (__builtin_expect (l->l_faked, 0) != 0) + if (__builtin_expect (l->l_faked, 0) != 0 + || __builtin_expect (l->l_removed, 0) != 0) continue; if (!_dl_name_match_p (name, l)) { diff -rNpu glibc-2.3.4/elf/dl-lookup.c glibc-2.3.5/elf/dl-lookup.c --- glibc-2.3.4/elf/dl-lookup.c 2004-10-13 19:04:37.000000000 -0700 +++ glibc-2.3.5/elf/dl-lookup.c 2005-04-05 19:49:48.000000000 -0700 @@ -91,11 +91,6 @@ add_dependency (struct link_map *undef_m /* Make sure nobody can unload the object while we are at it. */ __rtld_lock_lock_recursive (GL(dl_load_lock)); - /* Don't create cross-reference between modules which are - dynamically loaded by the same dlopen() call. */ - if (undef_map->l_opencount == 0 && map->l_opencount == 0) - goto out; - /* Avoid references to objects which cannot be unloaded anyway. */ if (map->l_type != lt_loaded || (map->l_flags_1 & DF_1_NODELETE) != 0) @@ -107,14 +102,13 @@ add_dependency (struct link_map *undef_m if (undef_map->l_type != lt_loaded || (undef_map->l_flags_1 & DF_1_NODELETE) != 0) { - ++map->l_opencount; map->l_flags_1 |= DF_1_NODELETE; goto out; } /* Determine whether UNDEF_MAP already has a reference to MAP. First look in the normal dependencies. */ - if (undef_map->l_searchlist.r_list != NULL) + if (undef_map->l_initfini != NULL) { list = undef_map->l_initfini; @@ -172,19 +166,6 @@ add_dependency (struct link_map *undef_m if (__builtin_expect (act < undef_map->l_reldepsmax, 1)) undef_map->l_reldeps[undef_map->l_reldepsact++] = map; - if (map->l_searchlist.r_list != NULL) - /* And increment the counter in the referenced object. */ - ++map->l_opencount; - else - /* We have to bump the counts for all dependencies since so far - this object was only a normal or transitive dependency. - Now it might be closed with _dl_close() directly. */ - for (list = map->l_initfini; *list != NULL; ++list) - ++(*list)->l_opencount; - - /* As if it is opened through _dl_open. */ - ++map->l_direct_opencount; - /* Display information if we are debugging. */ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) _dl_debug_printf ("\ diff -rNpu glibc-2.3.4/elf/dl-open.c glibc-2.3.5/elf/dl-open.c --- glibc-2.3.4/elf/dl-open.c 2004-10-28 16:10:43.000000000 -0700 +++ glibc-2.3.5/elf/dl-open.c 2005-04-05 20:41:40.000000000 -0700 @@ -279,23 +279,14 @@ dl_open_worker (void *a) { /* Let the user know about the opencount. */ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) - GLRO(dl_debug_printf) ("opening file=%s [%lu]; opencount=%u\n\n", - new->l_name, new->l_ns, new->l_opencount); + GLRO(dl_debug_printf) ("opening file=%s [%lu]; direct_opencount=%u\n\n", + new->l_name, new->l_ns, new->l_direct_opencount); /* If the user requested the object to be in the global namespace but it is not so far, add it now. */ if ((mode & RTLD_GLOBAL) && new->l_global == 0) (void) add_to_global (new); - if (new->l_direct_opencount == 1) - /* This is the only direct reference. Increment all the - dependencies' reference counter. */ - for (i = 0; i < new->l_searchlist.r_nlist; ++i) - ++new->l_searchlist.r_list[i]->l_opencount; - else - /* Increment just the reference counter of the object. */ - ++new->l_opencount; - return; } @@ -373,136 +364,136 @@ dl_open_worker (void *a) any_tls = false; #endif - /* Increment the open count for all dependencies. If the file is - not loaded as a dependency here add the search list of the newly - loaded object to the scope. */ + /* If the file is not loaded now as a dependency, add the search + list of the newly loaded object to the scope. */ for (i = 0; i < new->l_searchlist.r_nlist; ++i) - if (++new->l_searchlist.r_list[i]->l_opencount > 1 - && new->l_real->l_searchlist.r_list[i]->l_type == lt_loaded) - { - struct link_map *imap = new->l_searchlist.r_list[i]; - struct r_scope_elem **runp = imap->l_scope; - size_t cnt = 0; - - while (*runp != NULL) - { - /* This can happen if imap was just loaded, but during - relocation had l_opencount bumped because of relocation - dependency. Avoid duplicates in l_scope. */ - if (__builtin_expect (*runp == &new->l_searchlist, 0)) - break; - - ++cnt; - ++runp; - } - - if (*runp != NULL) - /* Avoid duplicates. */ - continue; - - if (__builtin_expect (cnt + 1 >= imap->l_scope_max, 0)) - { - /* The 'r_scope' array is too small. Allocate a new one - dynamically. */ - struct r_scope_elem **newp; - size_t new_size = imap->l_scope_max * 2; - - if (imap->l_scope == imap->l_scope_mem) - { - newp = (struct r_scope_elem **) - malloc (new_size * sizeof (struct r_scope_elem *)); - if (newp == NULL) - GLRO(dl_signal_error) (ENOMEM, "dlopen", NULL, - N_("cannot create scope list")); - imap->l_scope = memcpy (newp, imap->l_scope, - cnt * sizeof (imap->l_scope[0])); - } - else - { - newp = (struct r_scope_elem **) - realloc (imap->l_scope, - new_size * sizeof (struct r_scope_elem *)); - if (newp == NULL) - GLRO(dl_signal_error) (ENOMEM, "dlopen", NULL, - N_("cannot create scope list")); - imap->l_scope = newp; - } + { + struct link_map *imap = new->l_searchlist.r_list[i]; + + /* If the initializer has been called already, the object has + not been loaded here and now. */ + if (imap->l_init_called && imap->l_type == lt_loaded) + { + struct r_scope_elem **runp = imap->l_scope; + size_t cnt = 0; - imap->l_scope_max = new_size; - } + while (*runp != NULL) + { + ++cnt; + ++runp; + } - imap->l_scope[cnt++] = &new->l_searchlist; - imap->l_scope[cnt] = NULL; - } + if (*runp != NULL) + /* Avoid duplicates. */ + continue; + + if (__builtin_expect (cnt + 1 >= imap->l_scope_max, 0)) + { + /* The 'r_scope' array is too small. Allocate a new one + dynamically. */ + struct r_scope_elem **newp; + size_t new_size = imap->l_scope_max * 2; + + if (imap->l_scope == imap->l_scope_mem) + { + newp = (struct r_scope_elem **) + malloc (new_size * sizeof (struct r_scope_elem *)); + if (newp == NULL) + GLRO(dl_signal_error) (ENOMEM, "dlopen", NULL, + N_("cannot create scope list")); + imap->l_scope = memcpy (newp, imap->l_scope, + cnt * sizeof (imap->l_scope[0])); + } + else + { + newp = (struct r_scope_elem **) + realloc (imap->l_scope, + new_size * sizeof (struct r_scope_elem *)); + if (newp == NULL) + GLRO(dl_signal_error) (ENOMEM, "dlopen", NULL, + N_("cannot create scope list")); + imap->l_scope = newp; + } + + imap->l_scope_max = new_size; + } + + imap->l_scope[cnt++] = &new->l_searchlist; + imap->l_scope[cnt] = NULL; + } #if USE_TLS - else if (new->l_searchlist.r_list[i]->l_opencount == 1 - /* Only if the module defines thread local data. */ - && __builtin_expect (new->l_searchlist.r_list[i]->l_tls_blocksize - > 0, 0)) - { - /* Now that we know the object is loaded successfully add - modules containing TLS data to the dtv info table. We - might have to increase its size. */ - struct dtv_slotinfo_list *listp; - struct dtv_slotinfo_list *prevp; - size_t idx = new->l_searchlist.r_list[i]->l_tls_modid; - - assert (new->l_searchlist.r_list[i]->l_type == lt_loaded); - - /* Find the place in the dtv slotinfo list. */ - listp = GL(dl_tls_dtv_slotinfo_list); - prevp = NULL; /* Needed to shut up gcc. */ - do - { - /* Does it fit in the array of this list element? */ - if (idx < listp->len) - break; - idx -= listp->len; - prevp = listp; - listp = listp->next; - } - while (listp != NULL); - - if (listp == NULL) - { - /* When we come here it means we have to add a new element - to the slotinfo list. And the new module must be in - the first slot. */ - assert (idx == 0); - - listp = prevp->next = (struct dtv_slotinfo_list *) - malloc (sizeof (struct dtv_slotinfo_list) - + TLS_SLOTINFO_SURPLUS * sizeof (struct dtv_slotinfo)); - if (listp == NULL) - { - /* We ran out of memory. We will simply fail this - call but don't undo anything we did so far. The - application will crash or be terminated anyway very - soon. */ - - /* We have to do this since some entries in the dtv - slotinfo array might already point to this - generation. */ - ++GL(dl_tls_generation); - - GLRO(dl_signal_error) (ENOMEM, "dlopen", NULL, N_("\ -cannot create TLS data structures")); - } - - listp->len = TLS_SLOTINFO_SURPLUS; - listp->next = NULL; - memset (listp->slotinfo, '\0', - TLS_SLOTINFO_SURPLUS * sizeof (struct dtv_slotinfo)); - } - - /* Add the information into the slotinfo data structure. */ - listp->slotinfo[idx].map = new->l_searchlist.r_list[i]; - listp->slotinfo[idx].gen = GL(dl_tls_generation) + 1; + /* Only add TLS memory if this object is loaded now and + therefore is not yet initialized. */ + else if (! imap->l_init_called + /* Only if the module defines thread local data. */ + && __builtin_expect (imap->l_tls_blocksize > 0, 0)) + { + /* Now that we know the object is loaded successfully add + modules containing TLS data to the dtv info table. We + might have to increase its size. */ + struct dtv_slotinfo_list *listp; + struct dtv_slotinfo_list *prevp; + size_t idx = imap->l_tls_modid; + + assert (imap->l_type == lt_loaded); + + /* Find the place in the dtv slotinfo list. */ + listp = GL(dl_tls_dtv_slotinfo_list); + prevp = NULL; /* Needed to shut up gcc. */ + do + { + /* Does it fit in the array of this list element? */ + if (idx < listp->len) + break; + idx -= listp->len; + prevp = listp; + listp = listp->next; + } + while (listp != NULL); - /* We have to bump the generation counter. */ - any_tls = true; - } + if (listp == NULL) + { + /* When we come here it means we have to add a new element + to the slotinfo list. And the new module must be in + the first slot. */ + assert (idx == 0); + + listp = prevp->next = (struct dtv_slotinfo_list *) + malloc (sizeof (struct dtv_slotinfo_list) + + TLS_SLOTINFO_SURPLUS * sizeof (struct dtv_slotinfo)); + if (listp == NULL) + { + /* We ran out of memory. We will simply fail this + call but don't undo anything we did so far. The + application will crash or be terminated anyway very + soon. */ + + /* We have to do this since some entries in the dtv + slotinfo array might already point to this + generation. */ + ++GL(dl_tls_generation); + GLRO(dl_signal_error) (ENOMEM, "dlopen", NULL, N_("\ + cannot create TLS data structures")); + } + + listp->len = TLS_SLOTINFO_SURPLUS; + listp->next = NULL; + memset (listp->slotinfo, '\0', + TLS_SLOTINFO_SURPLUS * sizeof (struct dtv_slotinfo)); + } + + /* Add the information into the slotinfo data structure. */ + listp->slotinfo[idx].map = imap; + listp->slotinfo[idx].gen = GL(dl_tls_generation) + 1; + + /* We have to bump the generation counter. */ + any_tls = true; + } +#endif + } + +#if USE_TLS /* Bump the generation number if necessary. */ if (any_tls) if (__builtin_expect (++GL(dl_tls_generation) == 0, 0)) @@ -532,8 +523,8 @@ cannot create TLS data structures")); /* Let the user know about the opencount. */ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0)) - GLRO(dl_debug_printf) ("opening file=%s [%lu]; opencount=%u\n\n", - new->l_name, new->l_ns, new->l_opencount); + GLRO(dl_debug_printf) ("opening file=%s [%lu]; direct_opencount=%u\n\n", + new->l_name, new->l_ns, new->l_direct_opencount); } @@ -603,14 +594,6 @@ no more namespaces available for dlmopen state if relocation failed, for example. */ if (args.map) { - unsigned int i; - - /* Increment open counters for all objects since this - sometimes has not happened yet. */ - if (args.map->l_searchlist.r_list[0]->l_opencount == 0) - for (i = 0; i < args.map->l_searchlist.r_nlist; ++i) - ++args.map->l_searchlist.r_list[i]->l_opencount; - #ifdef USE_TLS /* Maybe some of the modules which were loaded uses TLS. Since it will be removed in the following _dl_close call diff -rNpu glibc-2.3.4/elf/dl-reloc.c glibc-2.3.5/elf/dl-reloc.c --- glibc-2.3.4/elf/dl-reloc.c 2004-03-06 21:21:01.000000000 -0800 +++ glibc-2.3.5/elf/dl-reloc.c 2005-02-25 17:09:47.000000000 -0800 @@ -114,7 +114,9 @@ _dl_nothread_init_static_tls (struct lin # endif /* Fill in the DTV slot so that a later LD/GD access will find it. */ - THREAD_DTV ()[map->l_tls_modid].pointer = dest; + dtv_t *dtv = THREAD_DTV (); + assert (map->l_tls_modid <= dtv[-1].counter); + dtv[map->l_tls_modid].pointer = dest; /* Initialize the memory. */ memset (__mempcpy (dest, map->l_tls_initimage, map->l_tls_initimage_size), diff -rNpu glibc-2.3.4/elf/do-lookup.h glibc-2.3.5/elf/do-lookup.h --- glibc-2.3.4/elf/do-lookup.h 2004-10-13 19:06:51.000000000 -0700 +++ glibc-2.3.5/elf/do-lookup.h 2005-04-05 19:50:10.000000000 -0700 @@ -52,6 +52,10 @@ do_lookup_x (const char *undef_name, uns if ((type_class & ELF_RTYPE_CLASS_COPY) && map->l_type == lt_executable) continue; + /* Do not look into objects which are going to be removed. */ + if (map->l_removed) + continue; + /* Print some debugging info if wanted. */ if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_SYMBOLS, 0)) _dl_debug_printf ("symbol=%s; lookup in file=%s\n", diff -rNpu glibc-2.3.4/elf/ldconfig.c glibc-2.3.5/elf/ldconfig.c --- glibc-2.3.4/elf/ldconfig.c 2004-08-09 21:04:32.000000000 -0700 +++ glibc-2.3.5/elf/ldconfig.c 2005-02-16 02:29:34.000000000 -0800 @@ -279,7 +279,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Andreas Jaeger"); } diff -rNpu glibc-2.3.4/elf/ldd.bash.in glibc-2.3.5/elf/ldd.bash.in --- glibc-2.3.4/elf/ldd.bash.in 2004-12-08 14:08:47.000000000 -0800 +++ glibc-2.3.5/elf/ldd.bash.in 2005-02-16 02:29:34.000000000 -0800 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1996-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 @@ -39,7 +39,7 @@ while test $# -gt 0; do printf $"Copyright (C) %s Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -" "2004" +" "2005" printf $"Written by %s and %s. " "Roland McGrath" "Ulrich Drepper" exit 0 diff -rNpu glibc-2.3.4/elf/loadtest.c glibc-2.3.5/elf/loadtest.c --- glibc-2.3.4/elf/loadtest.c 2001-09-08 09:21:22.000000000 -0700 +++ glibc-2.3.5/elf/loadtest.c 2005-04-05 19:50:10.000000000 -0700 @@ -73,8 +73,8 @@ static const struct #define OUT \ for (map = _r_debug.r_map; map != NULL; map = map->l_next) \ if (map->l_type == lt_loaded) \ - printf ("name = \"%s\", opencount = %d\n", \ - map->l_name, (int) map->l_opencount); \ + printf ("name = \"%s\", direct_opencount = %d\n", \ + map->l_name, (int) map->l_direct_opencount); \ fflush (stdout) @@ -183,8 +183,8 @@ main (int argc, char *argv[]) for (map = _r_debug.r_map; map != NULL; map = map->l_next) if (map->l_type == lt_loaded) { - printf ("name = \"%s\", opencount = %d\n", - map->l_name, (int) map->l_opencount); + printf ("name = \"%s\", direct_opencount = %d\n", + map->l_name, (int) map->l_direct_opencount); result = 1; } diff -rNpu glibc-2.3.4/elf/Makefile glibc-2.3.5/elf/Makefile --- glibc-2.3.4/elf/Makefile 2004-10-27 13:26:47.000000000 -0700 +++ glibc-2.3.5/elf/Makefile 2005-04-05 19:49:55.000000000 -0700 @@ -72,7 +72,7 @@ distribute := rtld-Rules \ tst-tlsmod1.c tst-tlsmod2.c tst-tlsmod3.c tst-tlsmod4.c \ tst-tlsmod5.c tst-tlsmod6.c tst-tlsmod7.c tst-tlsmod8.c \ tst-tlsmod9.c tst-tlsmod10.c tst-tlsmod11.c \ - tst-tlsmod12.c tst-tls10.h tst-alignmod.c \ + tst-tlsmod12.c tst-tls10.h tst-alignmod.c tst-alignmod2.c \ circlemod1.c circlemod1a.c circlemod2.c circlemod2a.c \ circlemod3.c circlemod3a.c nodlopenmod2.c \ tls-macros.h \ @@ -83,7 +83,10 @@ distribute := rtld-Rules \ tst-array2dep.c tst-piemod1.c \ tst-execstack-mod.c tst-dlmodcount.c \ check-textrel.c dl-sysdep.h test-dlopenrpathmod.c \ - tst-deep1mod1.c tst-deep1mod2.c tst-deep1mod3.c + tst-deep1mod1.c tst-deep1mod2.c tst-deep1mod3.c \ + unload3mod1.c unload3mod2.c unload3mod3.c unload3mod4.c \ + unload4mod1.c unload4mod2.c unload4mod3.c unload4mod4.c \ + order2mod1.c order2mod2.c order2mod3.c order2mod4.c CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables @@ -153,8 +156,9 @@ tests += loadtest restest1 preloadtest l restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \ circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \ tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-align \ - $(tests-execstack-$(have-z-execstack)) tst-dlmodcount \ - tst-dlopenrpath tst-deep1 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 + tst-align2 $(tests-execstack-$(have-z-execstack)) tst-dlmodcount \ + tst-dlopenrpath tst-deep1 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ + unload3 unload4 unload5 tst-global1 order2 # reldep9 test-srcs = tst-pathopt tests-vis-yes = vismain @@ -186,9 +190,13 @@ modules-names = testobj1 testobj2 testob circlemod3 circlemod3a \ reldep8mod1 reldep8mod2 reldep8mod3 \ reldep9mod1 reldep9mod2 reldep9mod3 \ - tst-alignmod $(modules-execstack-$(have-z-execstack)) \ + tst-alignmod tst-alignmod2 \ + $(modules-execstack-$(have-z-execstack)) \ tst-dlopenrpathmod tst-deep1mod1 tst-deep1mod2 tst-deep1mod3 \ - tst-dlmopen1mod + tst-dlmopen1mod \ + unload3mod1 unload3mod2 unload3mod3 unload3mod4 \ + unload4mod1 unload4mod2 unload4mod3 unload4mod4 \ + order2mod1 order2mod2 order2mod3 order2mod4 ifeq (yes,$(have-initfini-array)) modules-names += tst-array2dep endif @@ -420,6 +428,11 @@ $(objpfx)reldep8mod3.so: $(objpfx)reldep $(objpfx)nodel2mod3.so: $(objpfx)nodel2mod1.so $(objpfx)nodel2mod2.so $(objpfx)reldep9mod2.so: $(objpfx)reldep9mod1.so $(objpfx)reldep9mod3.so: $(objpfx)reldep9mod1.so $(objpfx)reldep9mod2.so +$(objpfx)unload3mod1.so: $(objpfx)unload3mod3.so +$(objpfx)unload3mod2.so: $(objpfx)unload3mod3.so +$(objpfx)unload3mod3.so: $(objpfx)unload3mod4.so +$(objpfx)unload4mod1.so: $(objpfx)unload4mod2.so $(objpfx)unload4mod3.so +$(objpfx)unload4mod2.so: $(objpfx)unload4mod4.so $(objpfx)unload4mod3.so LDFLAGS-tst-tlsmod5.so = -nostdlib LDFLAGS-tst-tlsmod6.so = -nostdlib @@ -459,6 +472,8 @@ circlemod3.so-no-z-defs = yes circlemod3a.so-no-z-defs = yes reldep8mod2.so-no-z-defs = yes reldep9mod1.so-no-z-defs = yes +unload3mod4.so-no-z-defs = yes +unload4mod1.so-no-z-defs = yes # filtmod1.so has a special rule $(filter-out $(objpfx)filtmod1.so, $(test-modules)): $(objpfx)%.so: $(objpfx)%.os @@ -668,9 +683,23 @@ $(objpfx)tst-tls14: $(objpfx)tst-tlsmod $(objpfx)tst-tls14.out:$(objpfx)tst-tlsmod14b.so CFLAGS-tst-align.c = $(stack-align-test-flags) +CFLAGS-tst-align2.c = $(stack-align-test-flags) CFLAGS-tst-alignmod.c = $(stack-align-test-flags) +CFLAGS-tst-alignmod2.c = $(stack-align-test-flags) $(objpfx)tst-align: $(libdl) $(objpfx)tst-align.out: $(objpfx)tst-alignmod.so +$(objpfx)tst-align2: $(objpfx)tst-alignmod2.so + +$(objpfx)unload3: $(libdl) +$(objpfx)unload3.out: $(objpfx)unload3mod1.so $(objpfx)unload3mod2.so \ + $(objpfx)unload3mod3.so $(objpfx)unload3mod4.so + +$(objpfx)unload4: $(libdl) +$(objpfx)unload4.out: $(objpfx)unload4mod1.so $(objpfx)unload4mod3.so + +$(objpfx)unload5: $(libdl) +$(objpfx)unload5.out: $(objpfx)unload3mod1.so $(objpfx)unload3mod2.so \ + $(objpfx)unload3mod3.so $(objpfx)unload3mod4.so ifdef libdl $(objpfx)tst-tls9-static: $(common-objpfx)dlfcn/libdl.a @@ -732,6 +761,8 @@ $(objpfx)tst-pie1: $(objpfx)tst-pie1.o $ -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \ -o $@ $(objpfx)tst-pie1.o $(objpfx)tst-piemod1.so \ $(common-objpfx)libc_nonshared.a + +generated += tst-pie1 tst-pie1.out tst-pie1.o endif check-textrel-CFLAGS = -O -Wall -D_XOPEN_SOURCE=600 -D_BSD_SOURCE @@ -773,3 +804,18 @@ $(objpfx)tst-dlmopen2.out: $(objpfx)tst- $(objpfx)tst-dlmopen3: $(libdl) $(objpfx)tst-dlmopen3.out: $(objpfx)tst-dlmopen1mod.so + +$(objpfx)tst-global1: $(libdl) +$(objpfx)tst-global1.out: $(objpfx)testobj6.so $(objpfx)testobj2.so + +$(objpfx)order2: $(libdl) +$(objpfx)order2.out: $(objpfx)order2 $(objpfx)order2mod1.so \ + $(objpfx)order2mod2.so + $(elf-objpfx)$(rtld-installed-name) \ + --library-path $(rpath-link)$(patsubst %,:%,$(sysdep-library-path)) \ + $(objpfx)order2 > $@ + (echo "12345" | cmp $@ -) > /dev/null +$(objpfx)order2mod1.so: $(objpfx)order2mod4.so +$(objpfx)order2mod4.so: $(objpfx)order2mod3.so +$(objpfx)order2mod2.so: $(objpfx)order2mod3.so +order2mod2.so-no-z-defs = yes diff -rNpu glibc-2.3.4/elf/neededtest2.c glibc-2.3.5/elf/neededtest2.c --- glibc-2.3.4/elf/neededtest2.c 2000-10-23 15:39:57.000000000 -0700 +++ glibc-2.3.5/elf/neededtest2.c 2005-04-05 19:50:10.000000000 -0700 @@ -27,7 +27,7 @@ check_loaded_objects (const char **loade for (lm = _r_debug.r_map; lm; lm = lm->l_next) { if (lm->l_name && lm->l_name[0]) - printf(" %s, count = %d\n", lm->l_name, (int) lm->l_opencount); + printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount); if (lm->l_type == lt_loaded && lm->l_name) { int match = 0; diff -rNpu glibc-2.3.4/elf/neededtest3.c glibc-2.3.5/elf/neededtest3.c --- glibc-2.3.4/elf/neededtest3.c 2000-10-24 09:59:29.000000000 -0700 +++ glibc-2.3.5/elf/neededtest3.c 2005-04-05 19:50:10.000000000 -0700 @@ -27,7 +27,7 @@ check_loaded_objects (const char **loade for (lm = _r_debug.r_map; lm; lm = lm->l_next) { if (lm->l_name && lm->l_name[0]) - printf(" %s, count = %d\n", lm->l_name, (int) lm->l_opencount); + printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount); if (lm->l_type == lt_loaded && lm->l_name) { int match = 0; diff -rNpu glibc-2.3.4/elf/neededtest4.c glibc-2.3.5/elf/neededtest4.c --- glibc-2.3.4/elf/neededtest4.c 2000-12-30 22:07:57.000000000 -0800 +++ glibc-2.3.5/elf/neededtest4.c 2005-04-05 19:50:10.000000000 -0700 @@ -27,7 +27,7 @@ check_loaded_objects (const char **loade for (lm = _r_debug.r_map; lm; lm = lm->l_next) { if (lm->l_name && lm->l_name[0]) - printf(" %s, count = %d\n", lm->l_name, (int) lm->l_opencount); + printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount); if (lm->l_type == lt_loaded && lm->l_name) { int match = 0; diff -rNpu glibc-2.3.4/elf/neededtest.c glibc-2.3.5/elf/neededtest.c --- glibc-2.3.4/elf/neededtest.c 2000-10-24 08:25:53.000000000 -0700 +++ glibc-2.3.5/elf/neededtest.c 2005-04-05 19:50:10.000000000 -0700 @@ -27,7 +27,7 @@ check_loaded_objects (const char **loade for (lm = _r_debug.r_map; lm; lm = lm->l_next) { if (lm->l_name && lm->l_name[0]) - printf(" %s, count = %d\n", lm->l_name, (int) lm->l_opencount); + printf(" %s, count = %d\n", lm->l_name, (int) lm->l_direct_opencount); if (lm->l_type == lt_loaded && lm->l_name) { int match = 0; diff -rNpu glibc-2.3.4/elf/order2.c glibc-2.3.5/elf/order2.c --- glibc-2.3.4/elf/order2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/order2.c 2005-04-05 19:51:22.000000000 -0700 @@ -0,0 +1,46 @@ +#include +#include + + +int call_puts; + +static int +do_test (void) +{ + call_puts = 1; + + void *h1 = dlopen ("$ORIGIN/order2mod1.so", RTLD_LAZY | RTLD_GLOBAL); + if (h1 == NULL) + { + puts ("cannot load order2mod1"); + return 1; + } + void *h2 = dlopen ("$ORIGIN/order2mod2.so", RTLD_LAZY); + if (h2 == NULL) + { + puts ("cannot load order2mod2"); + return 1; + } + if (dlclose (h1) != 0) + { + puts ("dlclose order2mod1 failed"); + return 1; + } + if (dlclose (h2) != 0) + { + puts ("dlclose order2mod2 failed"); + return 1; + } + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + +static void +__attribute__ ((destructor)) +fini (void) +{ + if (call_puts) + puts ("5"); +} diff -rNpu glibc-2.3.4/elf/order2mod1.c glibc-2.3.5/elf/order2mod1.c --- glibc-2.3.4/elf/order2mod1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/order2mod1.c 2005-04-05 19:51:22.000000000 -0700 @@ -0,0 +1,8 @@ +#include + +static void +__attribute__ ((destructor)) +fini (void) +{ + putchar ('1'); +} diff -rNpu glibc-2.3.4/elf/order2mod2.c glibc-2.3.5/elf/order2mod2.c --- glibc-2.3.4/elf/order2mod2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/order2mod2.c 2005-04-05 19:51:22.000000000 -0700 @@ -0,0 +1,18 @@ +#include + +extern int foo (void); +extern int bar (void); + +void +__attribute__ ((constructor)) +init (void) +{ + foo () - bar (); +} + +static void +__attribute__ ((destructor)) +fini (void) +{ + putchar ('2'); +} diff -rNpu glibc-2.3.4/elf/order2mod3.c glibc-2.3.5/elf/order2mod3.c --- glibc-2.3.4/elf/order2mod3.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/order2mod3.c 2005-04-05 19:51:22.000000000 -0700 @@ -0,0 +1,14 @@ +#include + +int +bar (void) +{ + return 1; +} + +static void +__attribute__ ((destructor)) +fini (void) +{ + putchar ('4'); +} diff -rNpu glibc-2.3.4/elf/order2mod4.c glibc-2.3.5/elf/order2mod4.c --- glibc-2.3.4/elf/order2mod4.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/order2mod4.c 2005-04-05 19:51:22.000000000 -0700 @@ -0,0 +1,16 @@ +#include + +extern int bar (void); + +int +foo (void) +{ + return 42 + bar (); +} + +static void +__attribute__ ((destructor)) +fini (void) +{ + putchar ('3'); +} diff -rNpu glibc-2.3.4/elf/rtld.c glibc-2.3.5/elf/rtld.c --- glibc-2.3.4/elf/rtld.c 2004-12-08 14:08:47.000000000 -0800 +++ glibc-2.3.5/elf/rtld.c 2005-04-05 19:49:51.000000000 -0700 @@ -270,7 +270,6 @@ _dl_start_final (void *arg, struct dl_st #endif _dl_setup_hash (&GL(dl_rtld_map)); GL(dl_rtld_map).l_real = &GL(dl_rtld_map); - GL(dl_rtld_map).l_opencount = 1; GL(dl_rtld_map).l_map_start = (ElfW(Addr)) _begin; GL(dl_rtld_map).l_map_end = (ElfW(Addr)) _end; GL(dl_rtld_map).l_text_end = (ElfW(Addr)) _etext; @@ -659,14 +658,48 @@ _dl_initial_error_catch_tsd (void) } #endif + +static unsigned int +do_preload (char *fname, struct link_map *main_map, const char *where) +{ + const char *objname; + const char *err_str = NULL; + struct map_args args; + + args.str = fname; + args.loader = main_map; + args.is_preloaded = 1; + args.mode = 0; + + unsigned int old_nloaded = GL(dl_ns)[LM_ID_BASE]._ns_nloaded; + + (void) _dl_catch_error (&objname, &err_str, map_doit, &args); + if (__builtin_expect (err_str != NULL, 0)) + { + _dl_error_printf ("\ +ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n", + fname, where); + /* No need to call free, this is still before + the libc's malloc is used. */ + } + else if (GL(dl_ns)[LM_ID_BASE]._ns_nloaded != old_nloaded) + /* It is no duplicate. */ + return 1; + + /* Nothing loaded. */ + return 0; +} + #if defined SHARED && defined _LIBC_REENTRANT \ && defined __rtld_lock_default_lock_recursive -static void rtld_lock_default_lock_recursive (void *lock) +static void +rtld_lock_default_lock_recursive (void *lock) { __rtld_lock_default_lock_recursive (lock); } -static void rtld_lock_default_unlock_recursive (void *lock) +static void +rtld_lock_default_unlock_recursive (void *lock) { __rtld_lock_default_unlock_recursive (lock); } @@ -687,8 +720,6 @@ dl_main (const ElfW(Phdr) *phdr, { const ElfW(Phdr) *ph; enum mode mode; - struct link_map **preloads; - unsigned int npreloads; struct link_map *main_map; size_t file_size; char *file; @@ -918,8 +949,6 @@ of this helper program; chances are you main_map->l_text_end = 0; /* Perhaps the executable has no PT_LOAD header entries at all. */ main_map->l_map_start = ~0; - /* We opened the file, account for it. */ - ++main_map->l_opencount; /* And it was opened directly. */ ++main_map->l_direct_opencount; @@ -1114,8 +1143,9 @@ of this helper program; chances are you /* We have two ways to specify objects to preload: via environment variable and via the file /etc/ld.so.preload. The latter can also be used when security is enabled. */ - preloads = NULL; - npreloads = 0; + assert (GL(dl_rtld_map).l_next == NULL); + struct link_map **preloads = NULL; + unsigned int npreloads = 0; if (__builtin_expect (preloadlist != NULL, 0)) { @@ -1134,14 +1164,7 @@ of this helper program; chances are you if (p[0] != '\0' && (__builtin_expect (! INTUSE(__libc_enable_secure), 1) || strchr (p, '/') == NULL)) - { - struct link_map *new_map = _dl_map_object (main_map, p, 1, - lt_library, 0, 0, - LM_ID_BASE); - if (++new_map->l_opencount == 1) - /* It is no duplicate. */ - ++npreloads; - } + npreloads += do_preload (p, main_map, "LD_PRELOAD"); HP_TIMING_NOW (stop); HP_TIMING_DIFF (diff, start, stop); @@ -1213,41 +1236,14 @@ of this helper program; chances are you runp = file; while ((p = strsep (&runp, ": \t\n")) != NULL) if (p[0] != '\0') - { - const char *objname; - const char *err_str = NULL; - struct map_args args; - - args.str = p; - args.loader = main_map; - args.is_preloaded = 1; - args.mode = 0; - - (void) _dl_catch_error (&objname, &err_str, map_doit, - &args); - if (__builtin_expect (err_str != NULL, 0)) - { - _dl_error_printf ("\ -ERROR: ld.so: object '%s' from %s cannot be preloaded: ignored.\n", - p, preload_file); - /* No need to call free, this is still before - the libc's malloc is used. */ - } - else if (++args.map->l_opencount == 1) - /* It is no duplicate. */ - ++npreloads; - } + npreloads += do_preload (p, main_map, preload_file); } if (problem != NULL) { char *p = strndupa (problem, file_size - (problem - file)); - struct link_map *new_map = _dl_map_object (main_map, p, 1, - lt_library, 0, 0, - LM_ID_BASE); - if (++new_map->l_opencount == 1) - /* It is no duplicate. */ - ++npreloads; + + npreloads += do_preload (p, main_map, preload_file); } HP_TIMING_NOW (stop); @@ -1259,7 +1255,7 @@ ERROR: ld.so: object '%s' from %s cannot } } - if (__builtin_expect (npreloads, 0) != 0) + if (__builtin_expect (GL(dl_rtld_map).l_next != NULL, 0)) { /* Set up PRELOADS with a vector of the preloaded libraries. */ struct link_map *l; @@ -1304,9 +1300,9 @@ ERROR: ld.so: object '%s' from %s cannot { if (! l->l_addr) l->l_addr = ph->p_vaddr; - else if (ph->p_vaddr + ph->p_memsz >= l->l_map_end) + if (ph->p_vaddr + ph->p_memsz >= l->l_map_end) l->l_map_end = ph->p_vaddr + ph->p_memsz; - else if ((ph->p_flags & PF_X) + if ((ph->p_flags & PF_X) && ph->p_vaddr + ph->p_memsz >= l->l_text_end) l->l_text_end = ph->p_vaddr + ph->p_memsz; } @@ -1356,14 +1352,9 @@ ERROR: ld.so: object '%s' from %s cannot HP_TIMING_DIFF (diff, start, stop); HP_TIMING_ACCUM_NT (load_time, diff); - /* Mark all objects as being in the global scope and set the open - counter. */ + /* Mark all objects as being in the global scope. */ for (i = main_map->l_searchlist.r_nlist; i > 0; ) - { - --i; - main_map->l_searchlist.r_list[i]->l_global = 1; - ++main_map->l_searchlist.r_list[i]->l_opencount; - } + main_map->l_searchlist.r_list[--i]->l_global = 1; #ifndef MAP_ANON /* We are done mapping things, so close the zero-fill descriptor. */ @@ -1373,18 +1364,22 @@ ERROR: ld.so: object '%s' from %s cannot /* Remove _dl_rtld_map from the chain. */ GL(dl_rtld_map).l_prev->l_next = GL(dl_rtld_map).l_next; - if (GL(dl_rtld_map).l_next) + if (GL(dl_rtld_map).l_next != NULL) GL(dl_rtld_map).l_next->l_prev = GL(dl_rtld_map).l_prev; - if (__builtin_expect (GL(dl_rtld_map).l_opencount > 1, 1)) + for (i = 1; i < main_map->l_searchlist.r_nlist; ++i) + if (main_map->l_searchlist.r_list[i] == &GL(dl_rtld_map)) + break; + + bool rtld_multiple_ref = false; + if (__builtin_expect (i < main_map->l_searchlist.r_nlist, 1)) { /* Some DT_NEEDED entry referred to the interpreter object itself, so put it back in the list of visible objects. We insert it into the chain in symbol search order because gdb uses the chain's order as its symbol search order. */ - i = 1; - while (main_map->l_searchlist.r_list[i] != &GL(dl_rtld_map)) - ++i; + rtld_multiple_ref = true; + GL(dl_rtld_map).l_prev = main_map->l_searchlist.r_list[i - 1]; if (__builtin_expect (mode, normal) == normal) { @@ -1618,7 +1613,7 @@ cannot allocate TLS data structures for } else { - /* If LD_WARN is set warn about undefined symbols. */ + /* If LD_WARN is set, warn about undefined symbols. */ if (GLRO(dl_lazy) >= 0 && GLRO(dl_verbose)) { /* We have to do symbol dependency testing. */ @@ -1628,7 +1623,7 @@ cannot allocate TLS data structures for args.lazy = GLRO(dl_lazy); l = main_map; - while (l->l_next) + while (l->l_next != NULL) l = l->l_next; do { @@ -1639,10 +1634,11 @@ cannot allocate TLS data structures for &args); } l = l->l_prev; - } while (l); + } + while (l != NULL); if ((GLRO(dl_debug_mask) & DL_DEBUG_PRELINK) - && GL(dl_rtld_map).l_opencount > 1) + && rtld_multiple_ref) _dl_relocate_object (&GL(dl_rtld_map), main_map->l_scope, 0, 0); } @@ -1912,7 +1908,7 @@ cannot allocate TLS data structures for /* We must prepare the profiling. */ _dl_start_profile (); - if (GL(dl_rtld_map).l_opencount > 1) + if (rtld_multiple_ref) { /* There was an explicit ref to the dynamic linker as a shared lib. Re-relocate ourselves with user-controlled symbol definitions. */ diff -rNpu glibc-2.3.4/elf/sprof.c glibc-2.3.5/elf/sprof.c --- glibc-2.3.4/elf/sprof.c 2004-09-21 19:18:30.000000000 -0700 +++ glibc-2.3.5/elf/sprof.c 2005-02-16 02:29:34.000000000 -0800 @@ -357,7 +357,7 @@ Copyright (C) %s Free Software Foundatio This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ "), - "2004"); + "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -rNpu glibc-2.3.4/elf/testobj2.c glibc-2.3.5/elf/testobj2.c --- glibc-2.3.4/elf/testobj2.c 2000-12-15 08:02:24.000000000 -0800 +++ glibc-2.3.5/elf/testobj2.c 2005-04-05 19:50:16.000000000 -0700 @@ -1,5 +1,6 @@ #include #include +#include #include "testobj.h" @@ -23,3 +24,9 @@ preload (int a) return fp (a) + 10; return 10; } + +void +p (void) +{ + puts ("hello world"); +} diff -rNpu glibc-2.3.4/elf/tst-align2.c glibc-2.3.5/elf/tst-align2.c --- glibc-2.3.4/elf/tst-align2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/tst-align2.c 2005-02-16 03:31:26.000000000 -0800 @@ -0,0 +1,157 @@ +/* Copyright (C) 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2005. + + 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 + +static int res, fds[2], result; +static bool test_destructors; + +extern void in_dso (int *, bool *, int *); + +static void __attribute__ ((constructor)) con (void) +{ + res = TEST_STACK_ALIGN () ? -1 : 1; +} + +static void __attribute__ ((destructor)) des (void) +{ + if (!test_destructors) + return; + + char c = TEST_STACK_ALIGN () ? 'B' : 'A'; + write (fds[1], &c, 1); +} + +static int +do_test (void) +{ + if (!res) + { + puts ("binary's constructor has not been run"); + result = 1; + } + else if (res != 1) + { + puts ("binary's constructor has been run without sufficient alignment"); + result = 1; + } + + if (TEST_STACK_ALIGN ()) + { + puts ("insufficient stack alignment in do_test"); + result = 1; + } + + in_dso (&result, &test_destructors, &fds[1]); + + if (pipe (fds) < 0) + { + printf ("couldn't create pipe: %m\n"); + return 1; + } + + pid_t pid = fork (); + if (pid < 0) + { + printf ("fork failed: %m\n"); + return 1; + } + + if (!pid) + { + close (fds[0]); + test_destructors = true; + exit (0); + } + + close (fds[1]); + + unsigned char c; + ssize_t len; + int des_seen = 0, dso_des_seen = 0; + while ((len = TEMP_FAILURE_RETRY (read (fds[0], &c, 1))) > 0) + { + switch (c) + { + case 'B': + puts ("insufficient alignment in binary's destructor"); + result = 1; + /* FALLTHROUGH */ + case 'A': + des_seen++; + break; + case 'D': + puts ("insufficient alignment in DSO destructor"); + result = 1; + /* FALLTHROUGH */ + case 'C': + dso_des_seen++; + break; + default: + printf ("unexpected character %x read from pipe", c); + result = 1; + break; + } + } + + close (fds[0]); + + if (des_seen != 1) + { + printf ("binary destructor run %d times instead of once\n", des_seen); + result = 1; + } + + if (dso_des_seen != 1) + { + printf ("DSO destructor run %d times instead of once\n", dso_des_seen); + result = 1; + } + + int status; + pid_t termpid; + termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0)); + if (termpid == -1) + { + printf ("waitpid failed: %m\n"); + result = 1; + } + else if (termpid != pid) + { + printf ("waitpid returned %ld != %ld\n", + (long int) termpid, (long int) pid); + result = 1; + } + else if (!WIFEXITED (status) || WEXITSTATUS (status)) + { + puts ("child hasn't exited with exit status 0"); + result = 1; + } + + return result; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/elf/tst-alignmod2.c glibc-2.3.5/elf/tst-alignmod2.c --- glibc-2.3.4/elf/tst-alignmod2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/tst-alignmod2.c 2005-02-16 03:31:26.000000000 -0800 @@ -0,0 +1,60 @@ +/* Copyright (C) 2003, 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2003. + + 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 + +static int res, *fdp; +static bool *test_destructorsp; + +static void __attribute__((constructor)) +con (void) +{ + res = TEST_STACK_ALIGN () ? -1 : 1; +} + +void +in_dso (int *result, bool *test_destructors, int *fd) +{ + if (!res) + { + puts ("constructor has not been run"); + *result = 1; + } + else if (res != 1) + { + puts ("constructor has been run without sufficient alignment"); + *result = 1; + } + + test_destructorsp = test_destructors; + fdp = fd; +} + +static void __attribute__((destructor)) +des (void) +{ + if (!test_destructorsp || !*test_destructorsp) + return; + + char c = TEST_STACK_ALIGN () ? 'D' : 'C'; + write (*fdp, &c, 1); +} diff -rNpu glibc-2.3.4/elf/tst-global1.c glibc-2.3.5/elf/tst-global1.c --- glibc-2.3.4/elf/tst-global1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/tst-global1.c 2005-04-05 18:42:52.000000000 -0700 @@ -0,0 +1,36 @@ +#include +#include + +int +main (void) +{ + void *h1 = dlopen ("$ORIGIN/testobj6.so", RTLD_GLOBAL|RTLD_LAZY); + if (h1 == NULL) + { + puts ("cannot open testobj6"); + return 1; + } + + void *h2 = dlopen ("$ORIGIN/testobj2.so", + RTLD_GLOBAL|RTLD_DEEPBIND|RTLD_LAZY); + if (h2 == NULL) + { + puts ("cannot open testobj2"); + return 1; + } + + dlclose (h1); + + void (*f) (void) = dlsym (h2, "p"); + if (f == NULL) + { + puts ("cannot find p"); + return 1; + } + + f (); + + dlclose (h2); + + return 0; +} diff -rNpu glibc-2.3.4/elf/unload2.c glibc-2.3.5/elf/unload2.c --- glibc-2.3.4/elf/unload2.c 2000-10-20 22:55:09.000000000 -0700 +++ glibc-2.3.5/elf/unload2.c 2005-04-05 19:50:10.000000000 -0700 @@ -9,8 +9,8 @@ #define OUT \ for (map = _r_debug.r_map; map != NULL; map = map->l_next) \ if (map->l_type == lt_loaded) \ - printf ("name = \"%s\", opencount = %d\n", \ - map->l_name, (int) map->l_opencount); \ + printf ("name = \"%s\", direct_opencount = %d\n", \ + map->l_name, (int) map->l_direct_opencount); \ fflush (stdout) int diff -rNpu glibc-2.3.4/elf/unload3.c glibc-2.3.5/elf/unload3.c --- glibc-2.3.4/elf/unload3.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload3.c 2005-04-05 18:42:58.000000000 -0700 @@ -0,0 +1,41 @@ +#include +#include + +int +main (void) +{ + void *g = dlopen ("unload3mod1.so", RTLD_GLOBAL | RTLD_NOW); + void *h = dlopen ("unload3mod2.so", RTLD_GLOBAL | RTLD_NOW); + if (g == NULL || h == NULL) + { + printf ("dlopen unload3mod{1,2}.so failed: %p %p\n", g, h); + return 1; + } + dlclose (h); + dlclose (g); + + g = dlopen ("unload3mod3.so", RTLD_GLOBAL | RTLD_NOW); + h = dlopen ("unload3mod4.so", RTLD_GLOBAL | RTLD_NOW); + if (g == NULL || h == NULL) + { + printf ("dlopen unload3mod{3,4}.so failed: %p %p\n", g, h); + return 1; + } + + int (*fn) (int); + fn = dlsym (h, "bar"); + if (fn == NULL) + { + puts ("dlsym failed"); + return 1; + } + + int val = fn (16); + if (val != 24) + { + printf ("bar returned %d != 24\n", val); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/elf/unload3mod1.c glibc-2.3.5/elf/unload3mod1.c --- glibc-2.3.4/elf/unload3mod1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload3mod1.c 2005-04-05 18:42:58.000000000 -0700 @@ -0,0 +1 @@ +int dummy1; diff -rNpu glibc-2.3.4/elf/unload3mod2.c glibc-2.3.5/elf/unload3mod2.c --- glibc-2.3.4/elf/unload3mod2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload3mod2.c 2005-04-05 18:42:58.000000000 -0700 @@ -0,0 +1 @@ +int dummy2; diff -rNpu glibc-2.3.4/elf/unload3mod3.c glibc-2.3.5/elf/unload3mod3.c --- glibc-2.3.4/elf/unload3mod3.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload3mod3.c 2005-04-05 18:42:58.000000000 -0700 @@ -0,0 +1,8 @@ +#include + +int +foo (int x) +{ + puts ("foo"); + return x * 2; +} diff -rNpu glibc-2.3.4/elf/unload3mod4.c glibc-2.3.5/elf/unload3mod4.c --- glibc-2.3.4/elf/unload3mod4.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload3mod4.c 2005-04-05 19:50:16.000000000 -0700 @@ -0,0 +1,13 @@ +#include + +extern int foo (int x); + +int +bar (int x) +{ + puts ("bar"); + fflush (stdout); + x = foo (x - 4); + puts ("bar after foo"); + return x; +} diff -rNpu glibc-2.3.4/elf/unload4.c glibc-2.3.5/elf/unload4.c --- glibc-2.3.4/elf/unload4.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload4.c 2005-04-05 19:51:35.000000000 -0700 @@ -0,0 +1,48 @@ +#include +#include +#include + +int +main (void) +{ +#ifdef M_PERTURB + mallopt (M_PERTURB, 0xaa); +#endif + + void *h; + int (*fn) (int); + h = dlopen ("unload4mod1.so", RTLD_LAZY); + if (h == NULL) + { + puts ("1st dlopen failed"); + return 1; + } + fn = dlsym (h, "foo"); + if (fn == NULL) + { + puts ("dlsym failed"); + return 1; + } + int n = fn (10); + if (n != 28) + { + printf ("foo (10) returned %d != 28\n", n); + return 1; + } + dlclose (h); + h = dlopen ("unload4mod3.so", RTLD_LAZY); + fn = dlsym (h, "mod3fn2"); + if (fn == NULL) + { + puts ("second dlsym failed"); + return 1; + } + n = fn (10); + if (n != 22) + { + printf ("mod3fn2 (10) returned %d != 22\n", n); + return 1; + } + dlclose (h); + return 0; +} diff -rNpu glibc-2.3.4/elf/unload4mod1.c glibc-2.3.5/elf/unload4mod1.c --- glibc-2.3.4/elf/unload4mod1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload4mod1.c 2005-04-05 19:51:35.000000000 -0700 @@ -0,0 +1,10 @@ +#include + +extern int bar (int); + +int +foo (int x) +{ + puts ("in foo"); + return bar (x / 2) + 2; +} diff -rNpu glibc-2.3.4/elf/unload4mod2.c glibc-2.3.5/elf/unload4mod2.c --- glibc-2.3.4/elf/unload4mod2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload4mod2.c 2005-04-05 19:51:35.000000000 -0700 @@ -0,0 +1,8 @@ +#include + +int +baz (int x) +{ + puts ("in baz"); + return x * 4; +} diff -rNpu glibc-2.3.4/elf/unload4mod3.c glibc-2.3.5/elf/unload4mod3.c --- glibc-2.3.4/elf/unload4mod3.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload4mod3.c 2005-04-05 19:51:35.000000000 -0700 @@ -0,0 +1,16 @@ +#include + +int +__attribute__((noinline)) +mod3fn1 (int x) +{ + puts ("in mod3fn1"); + return x + 6; +} + +int +mod3fn2 (int x) +{ + puts ("in mod3fn2"); + return mod3fn1 (x / 2) * 2; +} diff -rNpu glibc-2.3.4/elf/unload4mod4.c glibc-2.3.5/elf/unload4mod4.c --- glibc-2.3.4/elf/unload4mod4.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload4mod4.c 2005-04-05 19:51:35.000000000 -0700 @@ -0,0 +1,16 @@ +#include +#include + +int +__attribute__((noinline)) +baz (int x) +{ + abort (); +} + +int +bar (int x) +{ + puts ("in bar"); + return baz (x + 1) + 2; +} diff -rNpu glibc-2.3.4/elf/unload5.c glibc-2.3.5/elf/unload5.c --- glibc-2.3.4/elf/unload5.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/elf/unload5.c 2005-04-05 19:51:32.000000000 -0700 @@ -0,0 +1,42 @@ +#include +#include + +int +main (void) +{ + void *g = dlopen ("unload3mod1.so", RTLD_GLOBAL | RTLD_NOW); + void *h = dlopen ("unload3mod2.so", RTLD_GLOBAL | RTLD_NOW); + if (g == NULL || h == NULL) + { + printf ("dlopen unload3mod{1,2}.so failed: %p %p\n", g, h); + return 1; + } + dlopen ("unload3mod4.so", RTLD_GLOBAL | RTLD_NOW); + dlclose (h); + dlclose (g); + + g = dlopen ("unload3mod3.so", RTLD_GLOBAL | RTLD_NOW); + h = dlopen ("unload3mod4.so", RTLD_GLOBAL | RTLD_NOW); + if (g == NULL || h == NULL) + { + printf ("dlopen unload3mod{3,4}.so failed: %p %p\n", g, h); + return 1; + } + + int (*fn) (int); + fn = dlsym (h, "bar"); + if (fn == NULL) + { + puts ("dlsym failed"); + return 1; + } + + int val = fn (16); + if (val != 24) + { + printf ("bar returned %d != 24\n", val); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/elf/unload.c glibc-2.3.5/elf/unload.c --- glibc-2.3.4/elf/unload.c 2000-10-23 15:56:50.000000000 -0700 +++ glibc-2.3.5/elf/unload.c 2005-04-05 19:50:10.000000000 -0700 @@ -12,8 +12,8 @@ #define OUT \ for (map = _r_debug.r_map; map != NULL; map = map->l_next) \ if (map->l_type == lt_loaded) \ - printf ("name = \"%s\", opencount = %d\n", \ - map->l_name, (int) map->l_opencount); \ + printf ("name = \"%s\", direct_opencount = %d\n", \ + map->l_name, (int) map->l_direct_opencount); \ fflush (stdout) typedef struct diff -rNpu glibc-2.3.4/grp/initgroups.c glibc-2.3.5/grp/initgroups.c --- glibc-2.3.4/grp/initgroups.c 2004-10-05 08:36:26.000000000 -0700 +++ glibc-2.3.5/grp/initgroups.c 2005-03-29 15:40:49.000000000 -0800 @@ -1,4 +1,4 @@ -/* Copyright (C) 1989,91,93,1996-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1989,91,93,1996-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 @@ -73,7 +73,9 @@ internal_getgrouplist (const char *user, /* Start is one, because we have the first group as parameter. */ long int start = 1; - (*groupsp)[0] = group; + /* Never store more than the starting *SIZE number of elements. */ + if (*size > 0) + (*groupsp)[0] = group; if (__nss_group_database != NULL) { diff -rNpu glibc-2.3.4/hurd/sigunwind.c glibc-2.3.5/hurd/sigunwind.c --- glibc-2.3.4/hurd/sigunwind.c 2001-07-05 21:54:47.000000000 -0700 +++ glibc-2.3.5/hurd/sigunwind.c 2005-02-16 02:52:49.000000000 -0800 @@ -111,7 +111,7 @@ _hurdsig_longjmp_from_handler (void *dat link = (void *) &scp[1]; assert (! link->resource.next && ! link->resource.prevp); assert (link->thread.next == ss->active_resources); - assert (link->thread.prevp = &ss->active_resources); + assert (link->thread.prevp == &ss->active_resources); if (link->thread.next) link->thread.next->thread.prevp = &link->thread.next; ss->active_resources = link; diff -rNpu glibc-2.3.4/iconv/iconvconfig.c glibc-2.3.5/iconv/iconvconfig.c --- glibc-2.3.4/iconv/iconvconfig.c 2004-12-19 15:23:42.000000000 -0800 +++ glibc-2.3.5/iconv/iconvconfig.c 2005-04-05 17:37:52.000000000 -0700 @@ -397,7 +397,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } @@ -985,11 +985,11 @@ next_prime (uint32_t seed) Offset Length Description 0000 4 Magic header bytes - 0004 4 Offset of string table (stoff) - 0008 4 Offset of name hashing table (hoff) - 000C 4 Hashing table size (hsize) - 0010 4 Offset of module table (moff) - 0014 4 Offset of other conversion module table (ooff) + 0004 2 Offset of string table (stoff) + 0006 2 Offset of name hashing table (hoff) + 0008 2 Hashing table size (hsize) + 000A 2 Offset of module table (moff) + 000C 2 Offset of other conversion module table (ooff) stoff ??? String table @@ -1178,6 +1178,9 @@ write_output (void) } } + /* Clear padding. */ + memset (&header, 0, sizeof (struct gconvcache_header)); + header.magic = GCONVCACHE_MAGIC; iov[0].iov_base = &header; diff -rNpu glibc-2.3.4/iconv/iconv_prog.c glibc-2.3.5/iconv/iconv_prog.c --- glibc-2.3.4/iconv/iconv_prog.c 2004-09-30 01:55:57.000000000 -0700 +++ glibc-2.3.5/iconv/iconv_prog.c 2005-02-16 02:29:39.000000000 -0800 @@ -424,7 +424,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -rNpu glibc-2.3.4/iconv/strtab.c glibc-2.3.5/iconv/strtab.c --- glibc-2.3.4/iconv/strtab.c 2001-09-04 17:12:01.000000000 -0700 +++ glibc-2.3.5/iconv/strtab.c 2005-02-16 02:52:50.000000000 -0800 @@ -326,7 +326,7 @@ strtabfinalize (struct Strtab *st, size_ copylen = 1; copystrings (st->root, &endp, ©len); assert (copylen == st->total + 1); - assert (endp = retval + st->total + 1); + assert (endp == retval + st->total + 1); *size = copylen; return retval; diff -rNpu glibc-2.3.4/include/features.h glibc-2.3.5/include/features.h --- glibc-2.3.4/include/features.h 2004-10-17 21:17:16.000000000 -0700 +++ glibc-2.3.5/include/features.h 2005-02-17 16:08:56.000000000 -0800 @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993,1995-2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993,1995-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 @@ -181,8 +181,8 @@ /* If none of the ANSI/POSIX macros are defined, use POSIX.1 and POSIX.2 (and IEEE Std 1003.1b-1993 unless _XOPEN_SOURCE is defined). */ -#if (!defined __STRICT_ANSI__ && !defined _POSIX_SOURCE && \ - !defined _POSIX_C_SOURCE) +#if ((!defined __STRICT_ANSI__ || (_XOPEN_SOURCE - 0) >= 500) && \ + !defined _POSIX_SOURCE && !defined _POSIX_C_SOURCE) # define _POSIX_SOURCE 1 # if defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 500 # define _POSIX_C_SOURCE 2 diff -rNpu glibc-2.3.4/include/link.h glibc-2.3.5/include/link.h --- glibc-2.3.4/include/link.h 2004-10-13 18:57:54.000000000 -0700 +++ glibc-2.3.5/include/link.h 2005-04-05 19:50:11.000000000 -0700 @@ -177,7 +177,7 @@ struct link_map Elf_Symndx l_nbuckets; const Elf_Symndx *l_buckets, *l_chain; - unsigned int l_opencount; /* Counter for direct and indirect usage. */ + unsigned int l_dummy_opencount; /* Used to be l_opencount, now unused. */ unsigned int l_direct_opencount; /* Reference count for dlopen/dlclose. */ enum /* Where this object came from. */ { @@ -199,6 +199,8 @@ struct link_map should be called on this link map when relocation finishes. */ unsigned int l_used:1; /* Nonzero if the DSO is used. */ + unsigned int l_removed:1; /* Nozero if the object cannot be used anymore + since it is removed. */ /* Array with version names. */ unsigned int l_nversions; struct r_found_version *l_versions; @@ -255,7 +257,7 @@ struct link_map ElfW(Word) l_flags; /* Temporarily used in `dl_close'. */ - unsigned int l_idx; + int l_idx; struct link_map_machine l_mach; diff -rNpu glibc-2.3.4/include/signal.h glibc-2.3.5/include/signal.h --- glibc-2.3.4/include/signal.h 2003-04-29 15:43:22.000000000 -0700 +++ glibc-2.3.5/include/signal.h 2005-02-16 01:20:41.000000000 -0800 @@ -48,6 +48,9 @@ extern int __sigpause (int sig_or_mask, extern int __default_sigpause (int mask); extern int __xpg_sigpause (int sig); +/* Simplified sigemptyset() implementation without the parameter checking. */ +#undef __sigemptyset +#define __sigemptyset(ss) (memset (ss, '\0', sizeof (sigset_t)), 0) /* Allocate real-time signal with highest/lowest available priority. */ diff -rNpu glibc-2.3.4/libio/fmemopen.c glibc-2.3.5/libio/fmemopen.c --- glibc-2.3.4/libio/fmemopen.c 2002-08-24 19:47:57.000000000 -0700 +++ glibc-2.3.5/libio/fmemopen.c 2005-03-01 12:57:17.000000000 -0800 @@ -1,5 +1,5 @@ /* Fmemopen implementation. - Copyright (C) 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Hanno Mueller, kontakt@hanno.de, 2000. @@ -27,8 +27,6 @@ * but couldn't find it in libio. The following snippet of code is an * attempt to implement what glibc's documentation describes. * - * No, it isn't really tested yet. :-) - * * * * I already see some potential problems: @@ -73,6 +71,7 @@ #include #include #include +#include #include #include #include "libioP.h" @@ -166,7 +165,7 @@ fmemopen_seek (void *cookie, _IO_off64_t break; case SEEK_END: - np = c->size - *p; + np = c->maxpos - *p; break; default: @@ -176,9 +175,9 @@ fmemopen_seek (void *cookie, _IO_off64_t if (np < 0 || (size_t) np > c->size) return -1; - c->pos = np; + *p = c->pos = np; - return np; + return 0; } @@ -203,6 +202,13 @@ fmemopen (void *buf, size_t len, const c cookie_io_functions_t iof; fmemopen_cookie_t *c; + if (len == 0) + { + einval: + __set_errno (EINVAL); + return NULL; + } + c = (fmemopen_cookie_t *) malloc (sizeof (fmemopen_cookie_t)); if (c == NULL) return NULL; @@ -220,7 +226,12 @@ fmemopen (void *buf, size_t len, const c c->buffer[0] = '\0'; } else - c->buffer = buf; + { + if ((uintptr_t) len > -(uintptr_t) buf) + goto einval; + + c->buffer = buf; + } c->size = len; diff -rNpu glibc-2.3.4/libio/iofopncook.c glibc-2.3.5/libio/iofopncook.c --- glibc-2.3.4/libio/iofopncook.c 2004-03-10 01:28:25.000000000 -0800 +++ glibc-2.3.5/libio/iofopncook.c 2005-02-16 01:45:20.000000000 -0800 @@ -36,6 +36,8 @@ static _IO_ssize_t _IO_cookie_read (regi static _IO_ssize_t _IO_cookie_write (register _IO_FILE* fp, const void* buf, _IO_ssize_t size); static _IO_off64_t _IO_cookie_seek (_IO_FILE *fp, _IO_off64_t offset, int dir); +static _IO_off64_t _IO_cookie_seekoff (_IO_FILE *fp, _IO_off64_t offset, + int dir, int mode); static int _IO_cookie_close (_IO_FILE* fp); static _IO_ssize_t @@ -94,6 +96,20 @@ _IO_cookie_close (fp) } +static _IO_off64_t +_IO_cookie_seekoff (fp, offset, dir, mode) + _IO_FILE *fp; + _IO_off64_t offset; + int dir; + int mode; +{ + /* We must force the fileops code to always use seek to determine + the position. */ + fp->_offset = _IO_pos_BAD; + return INTUSE(_IO_file_seekoff) (fp, offset, dir, mode); +} + + static const struct _IO_jump_t _IO_cookie_jumps = { JUMP_INIT_DUMMY, JUMP_INIT(finish, INTUSE(_IO_file_finish)), @@ -103,7 +119,7 @@ static const struct _IO_jump_t _IO_cooki JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)), JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)), JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)), - JUMP_INIT(seekoff, INTUSE(_IO_file_seekoff)), + JUMP_INIT(seekoff, _IO_cookie_seekoff), JUMP_INIT(seekpos, _IO_default_seekpos), JUMP_INIT(setbuf, INTUSE(_IO_file_setbuf)), JUMP_INIT(sync, INTUSE(_IO_file_sync)), @@ -223,7 +239,7 @@ static const struct _IO_jump_t _IO_old_c JUMP_INIT(pbackfail, INTUSE(_IO_default_pbackfail)), JUMP_INIT(xsputn, INTUSE(_IO_file_xsputn)), JUMP_INIT(xsgetn, INTUSE(_IO_default_xsgetn)), - JUMP_INIT(seekoff, INTUSE(_IO_file_seekoff)), + JUMP_INIT(seekoff, _IO_cookie_seekoff), JUMP_INIT(seekpos, _IO_default_seekpos), JUMP_INIT(setbuf, INTUSE(_IO_file_setbuf)), JUMP_INIT(sync, INTUSE(_IO_file_sync)), diff -rNpu glibc-2.3.4/locale/programs/locale.c glibc-2.3.5/locale/programs/locale.c --- glibc-2.3.4/locale/programs/locale.c 2004-09-12 22:28:45.000000000 -0700 +++ glibc-2.3.5/locale/programs/locale.c 2005-02-16 02:29:33.000000000 -0800 @@ -277,7 +277,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -rNpu glibc-2.3.4/locale/programs/localedef.c glibc-2.3.5/locale/programs/localedef.c --- glibc-2.3.4/locale/programs/localedef.c 2004-06-01 15:17:06.000000000 -0700 +++ glibc-2.3.5/locale/programs/localedef.c 2005-02-16 02:29:33.000000000 -0800 @@ -389,7 +389,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper"); } diff -rNpu glibc-2.3.4/localedata/ChangeLog glibc-2.3.5/localedata/ChangeLog --- glibc-2.3.4/localedata/ChangeLog 2004-12-29 01:20:08.000000000 -0800 +++ glibc-2.3.5/localedata/ChangeLog 2005-04-05 17:50:57.000000000 -0700 @@ -1,3 +1,8 @@ +2005-03-21 Jakub Jelinek + + [BZ #823] + * charmaps/WINDOWS-31J: Add % before alias keyword. + 2004-12-19 Roland McGrath * gen-unicode-ctype.c (output_tables): Fix email address in output. diff -rNpu glibc-2.3.4/localedata/charmaps/WINDOWS-31J glibc-2.3.5/localedata/charmaps/WINDOWS-31J --- glibc-2.3.4/localedata/charmaps/WINDOWS-31J 2003-08-14 01:48:04.000000000 -0700 +++ glibc-2.3.5/localedata/charmaps/WINDOWS-31J 2005-04-05 17:50:27.000000000 -0700 @@ -8,7 +8,7 @@ % MORIYAMA Masayuki , 2003. % Last changed: 2003-07-18 -alias CP932 +% alias CP932 CHARMAP /x00 NULL diff -rNpu glibc-2.3.4/Makeconfig glibc-2.3.5/Makeconfig --- glibc-2.3.4/Makeconfig 2004-12-15 10:51:47.000000000 -0800 +++ glibc-2.3.5/Makeconfig 2005-02-16 02:50:19.000000000 -0800 @@ -480,32 +480,21 @@ default-rpath = $(libdir) endif ifndef link-extra-libs -ifeq (yes,$(build-shared)) -ifneq ($(common-objpfx),$(objpfx)) -link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),\ - $(wildcard $(common-objpfx)$(lib).so$($(notdir $(lib)).so-version) \ - $(objpfx)$(lib).so$($(notdir $(lib)).so-version))) -else -link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).so$($(notdir $(lib)).so-version)) -endif -else -link-extra-libs = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a) -endif +link-extra-libs = $(LDLIBS-$(@F)) +link-extra-libs-static = $(link-extra-libs) +link-extra-libs-bounded = $(link-extra-libs) endif # The static libraries. ifeq (yes,$(build-static)) link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a -link-extra-libs-static = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a) else ifeq (yes,$(build-shared)) # We can try to link the programs with lib*_pic.a... link-libc-static = $(static-gnulib) $(common-objpfx)libc_pic.a -link-extra-libs-static = $(link-extra-libs) endif endif link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a -link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a) ifndef gnulib ifneq ($(have-cc-with-libunwind),yes) diff -rNpu glibc-2.3.4/Makefile glibc-2.3.5/Makefile --- glibc-2.3.4/Makefile 2004-10-23 13:10:40.000000000 -0700 +++ glibc-2.3.5/Makefile 2005-04-05 19:16:14.000000000 -0700 @@ -1,4 +1,4 @@ -# Copyright (C) 1991-2002, 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 1991-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 @@ -288,7 +288,12 @@ glibc-%.tar $(dist-separate:%=glibc-%-%. $(foreach D,$(dist-separate),\ $D/configure) @rm -fr glibc-$* + $(MAKE) -q `find sysdeps $(addsuffix /sysdeps,$(add-ons)) \ + -name configure` cvs $(CVSOPTS) -Q export -d glibc-$* -r $(tag-of-stem) libc +# Touch all the configure scripts going into the tarball since cvs export +# might have delivered configure.in newer than configure. + find glibc-$* -name configure -print | xargs touch $(dist-do-separate-dirs) tar cf glibc-$*.tar glibc-$* rm -fr glibc-$* diff -rNpu glibc-2.3.4/malloc/arena.c glibc-2.3.5/malloc/arena.c --- glibc-2.3.4/malloc/arena.c 2004-12-10 03:42:08.000000000 -0800 +++ glibc-2.3.5/malloc/arena.c 2005-03-07 14:46:24.000000000 -0800 @@ -1,5 +1,5 @@ /* Malloc implementation for multiple threads without lock contention. - Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Wolfram Gloger , 2001. @@ -18,7 +18,9 @@ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: arena.c,v 1.13 2004/12/10 11:42:08 drepper Exp $ */ +/* $Id: arena.c,v 1.13.2.1 2005/03/07 22:46:24 roland Exp $ */ + +#include /* Compile-time constants. */ @@ -353,8 +355,6 @@ libc_hidden_proto (_dl_open_hook); # endif # if defined SHARED && defined USE_TLS && !USE___THREAD -# include - /* This is called by __pthread_initialize_minimal when it needs to use malloc to set up the TLS state. We cannot do the full work of ptmalloc_init (below) until __pthread_initialize_minimal has finished, diff -rNpu glibc-2.3.4/malloc/malloc.h glibc-2.3.5/malloc/malloc.h --- glibc-2.3.4/malloc/malloc.h 2004-09-07 23:30:32.000000000 -0700 +++ glibc-2.3.5/malloc/malloc.h 2005-02-16 02:16:11.000000000 -0800 @@ -20,12 +20,10 @@ #ifndef _MALLOC_H #define _MALLOC_H 1 -#ifdef _LIBC #include -#endif /* - $Id: malloc.h,v 1.26 2004/09/08 06:30:32 drepper Exp $ + $Id: malloc.h,v 1.26.4.1 2005/02/16 10:16:11 roland Exp $ `ptmalloc2', a malloc implementation for multiple threads without lock contention, by Wolfram Gloger . diff -rNpu glibc-2.3.4/malloc/memusage.sh glibc-2.3.5/malloc/memusage.sh --- glibc-2.3.4/malloc/memusage.sh 2004-05-17 11:37:12.000000000 -0700 +++ glibc-2.3.5/malloc/memusage.sh 2005-02-16 02:29:32.000000000 -0800 @@ -1,5 +1,5 @@ #! @BASH@ -# Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. +# Copyright (C) 1999-2004, 2005 Free Software Foundation, Inc. # This file is part of the GNU C Library. # Contributed by Ulrich Drepper , 1999. @@ -71,7 +71,7 @@ do_version() { printf $"Copyright (C) %s Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -" "2004" +" "2005" printf $"Written by %s. " "Ulrich Drepper" exit 0 diff -rNpu glibc-2.3.4/malloc/mtrace.pl glibc-2.3.5/malloc/mtrace.pl --- glibc-2.3.4/malloc/mtrace.pl 2004-10-04 16:21:41.000000000 -0700 +++ glibc-2.3.5/malloc/mtrace.pl 2005-02-16 02:29:32.000000000 -0800 @@ -45,7 +45,7 @@ arglist: while (@ARGV) { $ARGV[0] eq "--vers" || $ARGV[0] eq "--versi" || $ARGV[0] eq "--versio" || $ARGV[0] eq "--version") { print "mtrace (GNU $PACKAGE) $VERSION\n"; - print "Copyright (C) 2004 Free Software Foundation, Inc.\n"; + print "Copyright (C) 2005 Free Software Foundation, Inc.\n"; print "This is free software; see the source for copying conditions. There is NO\n"; print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; print "Written by Ulrich Drepper \n"; diff -rNpu glibc-2.3.4/math/libm-test.inc glibc-2.3.5/math/libm-test.inc --- glibc-2.3.4/math/libm-test.inc 2004-12-16 22:49:30.000000000 -0800 +++ glibc-2.3.5/math/libm-test.inc 2005-02-16 02:07:17.000000000 -0800 @@ -3795,6 +3795,114 @@ rint_test (void) } static void +rint_test_tonearest (void) +{ + int save_round_mode; + START (rint_tonearest); + + save_round_mode = fegetround(); + + if (!fesetround (FE_TONEAREST)) + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 2.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 0.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -0.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -2.0); + TEST_f_f (rint, -2.0, -2.0); + } + + fesetround(save_round_mode); + + END (rint_tonearest); +} + +static void +rint_test_towardzero (void) +{ + int save_round_mode; + START (rint_towardzero); + + save_round_mode = fegetround(); + + if (!fesetround (FE_TOWARDZERO)) + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 1.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 0.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -0.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -1.0); + TEST_f_f (rint, -2.0, -2.0); + } + + fesetround(save_round_mode); + + END (rint_towardzero); +} + +static void +rint_test_downward (void) +{ + int save_round_mode; + START (rint_downward); + + save_round_mode = fegetround(); + + if (!fesetround (FE_DOWNWARD)) + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 1.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 0.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -1.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -2.0); + TEST_f_f (rint, -2.0, -2.0); + } + + fesetround(save_round_mode); + + END (rint_downward); +} + +static void +rint_test_upward (void) +{ + int save_round_mode; + START (rint_upward); + + save_round_mode = fegetround(); + + if (!fesetround (FE_UPWARD)) + { + TEST_f_f (rint, 2.0, 2.0); + TEST_f_f (rint, 1.5, 2.0); + TEST_f_f (rint, 1.0, 1.0); + TEST_f_f (rint, 0.5, 1.0); + TEST_f_f (rint, 0.0, 0.0); + TEST_f_f (rint, minus_zero, minus_zero); + TEST_f_f (rint, -0.5, -0.0); + TEST_f_f (rint, -1.0, -1.0); + TEST_f_f (rint, -1.5, -1.0); + TEST_f_f (rint, -2.0, -2.0); + } + + fesetround(save_round_mode); + + END (rint_upward); +} + +static void round_test (void) { START (round); @@ -4557,6 +4665,10 @@ main (int argc, char **argv) floor_test (); nearbyint_test (); rint_test (); + rint_test_tonearest (); + rint_test_towardzero (); + rint_test_downward (); + rint_test_upward (); lrint_test (); llrint_test (); round_test (); diff -rNpu glibc-2.3.4/misc/efgcvt_r.c glibc-2.3.5/misc/efgcvt_r.c --- glibc-2.3.4/misc/efgcvt_r.c 2002-08-24 20:56:38.000000000 -0700 +++ glibc-2.3.5/misc/efgcvt_r.c 2005-02-16 00:22:00.000000000 -0800 @@ -31,6 +31,7 @@ # define FUNC_PREFIX # define FLOAT_FMT_FLAG # define FLOAT_NAME_EXT +# define FLOAT_MIN_10_EXP DBL_MIN_10_EXP # if DBL_MANT_DIG == 53 # define NDIGIT_MAX 17 # elif DBL_MANT_DIG == 24 @@ -43,6 +44,17 @@ # error "NDIGIT_MAX must be precomputed" # define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * DBL_MANT_DIG + 1.0))) # endif +# if DBL_MIN_10_EXP == -37 +# define FLOAT_MIN_10_NORM 1.0e-37 +# elif DBL_MIN_10_EXP == -307 +# define FLOAT_MIN_10_NORM 1.0e-307 +# elif DBL_MIN_10_EXP == -4931 +# define FLOAT_MIN_10_NORM 1.0e-4931 +# else +/* libc can't depend on libm. */ +# error "FLOAT_MIN_10_NORM must be precomputed" +# define FLOAT_MIN_10_NORM exp10 (DBL_MIN_10_EXP) +# endif #endif #define APPEND(a, b) APPEND2 (a, b) @@ -171,6 +183,17 @@ APPEND (FUNC_PREFIX, ecvt_r) (value, ndi d = -value; else d = value; + /* For denormalized numbers the d < 1.0 case below won't work, + as f can overflow to +Inf. */ + if (d < FLOAT_MIN_10_NORM) + { + value /= FLOAT_MIN_10_NORM; + if (value < 0.0) + d = -value; + else + d = value; + exponent += FLOAT_MIN_10_EXP; + } if (d < 1.0) { do diff -rNpu glibc-2.3.4/misc/qefgcvt_r.c glibc-2.3.5/misc/qefgcvt_r.c --- glibc-2.3.4/misc/qefgcvt_r.c 2004-05-03 14:03:40.000000000 -0700 +++ glibc-2.3.5/misc/qefgcvt_r.c 2005-02-16 00:22:00.000000000 -0800 @@ -24,6 +24,7 @@ #define FUNC_PREFIX q #define FLOAT_FMT_FLAG "L" #define FLOAT_NAME_EXT l +#define FLOAT_MIN_10_EXP LDBL_MIN_10_EXP #if LDBL_MANT_DIG == 64 # define NDIGIT_MAX 21 #elif LDBL_MANT_DIG == 53 @@ -40,5 +41,16 @@ # error "NDIGIT_MAX must be precomputed" # define NDIGIT_MAX (lrint (ceil (M_LN2 / M_LN10 * LDBL_MANT_DIG + 1.0))) #endif +#if LDBL_MIN_10_EXP == -37 +# define FLOAT_MIN_10_NORM 1.0e-37L +#elif LDBL_MIN_10_EXP == -307 +# define FLOAT_MIN_10_NORM 1.0e-307L +#elif LDBL_MIN_10_EXP == -4931 +# define FLOAT_MIN_10_NORM 1.0e-4931L +#else +/* libc can't depend on libm. */ +# error "FLOAT_MIN_10_NORM must be precomputed" +# define FLOAT_MIN_10_NORM exp10l (LDBL_MIN_10_EXP) +#endif #include "efgcvt_r.c" diff -rNpu glibc-2.3.4/misc/syslog.c glibc-2.3.5/misc/syslog.c --- glibc-2.3.4/misc/syslog.c 2004-11-20 10:58:41.000000000 -0800 +++ glibc-2.3.5/misc/syslog.c 1969-12-31 16:00:00.000000000 -0800 @@ -1,414 +0,0 @@ -/* - * Copyright (c) 1983, 1988, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)syslog.c 8.4 (Berkeley) 3/18/94"; -#endif /* LIBC_SCCS and not lint */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if __STDC__ -#include -#else -#include -#endif - -#include -#define ftell(s) INTUSE(_IO_ftell) (s) - -static int LogType = SOCK_DGRAM; /* type of socket connection */ -static int LogFile = -1; /* fd for log */ -static int connected; /* have done connect */ -static int LogStat; /* status bits, set by openlog() */ -static const char *LogTag; /* string to tag the entry with */ -static int LogFacility = LOG_USER; /* default facility code */ -static int LogMask = 0xff; /* mask of priorities to be logged */ -extern char *__progname; /* Program name, from crt0. */ - -/* Define the lock. */ -__libc_lock_define_initialized (static, syslog_lock) - -static void openlog_internal(const char *, int, int) internal_function; -static void closelog_internal(void); -static void sigpipe_handler (int); - - -struct cleanup_arg -{ - void *buf; - struct sigaction *oldaction; -}; - -static void -cancel_handler (void *ptr) -{ - /* Restore the old signal handler. */ - struct cleanup_arg *clarg = (struct cleanup_arg *) ptr; - - if (clarg != NULL && clarg->oldaction != NULL) - __sigaction (SIGPIPE, clarg->oldaction, NULL); - - /* Free the lock. */ - __libc_lock_unlock (syslog_lock); -} - - -/* - * syslog, vsyslog -- - * print message on log file; output is intended for syslogd(8). - */ -void -#if __STDC__ -syslog(int pri, const char *fmt, ...) -#else -syslog(pri, fmt, va_alist) - int pri; - char *fmt; - va_dcl -#endif -{ - va_list ap; - -#if __STDC__ - va_start(ap, fmt); -#else - va_start(ap); -#endif - vsyslog(pri, fmt, ap); - va_end(ap); -} -libc_hidden_def (syslog) - -void -vsyslog(pri, fmt, ap) - int pri; - register const char *fmt; - va_list ap; -{ - struct tm now_tm; - time_t now; - int fd; - FILE *f; - char *buf = 0; - size_t bufsize = 0; - size_t prioff, msgoff; - struct sigaction action, oldaction; - int sigpipe; - int saved_errno = errno; - char failbuf[3 * sizeof (pid_t) + sizeof "out of memory []"]; - -#define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID - /* Check for invalid bits. */ - if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { - syslog(INTERNALLOG, - "syslog: unknown facility/priority: %x", pri); - pri &= LOG_PRIMASK|LOG_FACMASK; - } - - /* Check priority against setlogmask values. */ - if ((LOG_MASK (LOG_PRI (pri)) & LogMask) == 0) - return; - - /* Set default facility if none specified. */ - if ((pri & LOG_FACMASK) == 0) - pri |= LogFacility; - - /* Build the message in a memory-buffer stream. */ - f = open_memstream (&buf, &bufsize); - if (f == NULL) - { - /* We cannot get a stream. There is not much we can do but - emitting an error messages. */ - char numbuf[3 * sizeof (pid_t)]; - char *nump; - char *endp = __stpcpy (failbuf, "out of memory ["); - pid_t pid = __getpid (); - - nump = numbuf + sizeof (numbuf); - /* The PID can never be zero. */ - do - *--nump = '0' + pid % 10; - while ((pid /= 10) != 0); - - endp = __mempcpy (endp, nump, (numbuf + sizeof (numbuf)) - nump); - *endp++ = ']'; - *endp = '\0'; - buf = failbuf; - bufsize = endp - failbuf; - msgoff = 0; - } - else - { - __fsetlocking (f, FSETLOCKING_BYCALLER); - prioff = fprintf (f, "<%d>", pri); - (void) time (&now); - f->_IO_write_ptr += __strftime_l (f->_IO_write_ptr, - f->_IO_write_end - - f->_IO_write_ptr, - "%h %e %T ", - __localtime_r (&now, &now_tm), - &_nl_C_locobj); - msgoff = ftell (f); - if (LogTag == NULL) - LogTag = __progname; - if (LogTag != NULL) - fputs_unlocked (LogTag, f); - if (LogStat & LOG_PID) - fprintf (f, "[%d]", (int) __getpid ()); - if (LogTag != NULL) - { - putc_unlocked (':', f); - putc_unlocked (' ', f); - } - - /* Restore errno for %m format. */ - __set_errno (saved_errno); - - /* We have the header. Print the user's format into the - buffer. */ - vfprintf (f, fmt, ap); - - /* Close the memory stream; this will finalize the data - into a malloc'd buffer in BUF. */ - fclose (f); - } - - /* Output to stderr if requested. */ - if (LogStat & LOG_PERROR) { - struct iovec iov[2]; - register struct iovec *v = iov; - - v->iov_base = buf + msgoff; - v->iov_len = bufsize - msgoff; - /* Append a newline if necessary. */ - if (buf[bufsize - 1] != '\n') - { - ++v; - v->iov_base = (char *) "\n"; - v->iov_len = 1; - } - - __libc_cleanup_push (free, buf == failbuf ? NULL : buf); - - /* writev is a cancellation point. */ - (void)__writev(STDERR_FILENO, iov, v - iov + 1); - - __libc_cleanup_pop (0); - } - - /* Prepare for multiple users. We have to take care: open and - write are cancellation points. */ - struct cleanup_arg clarg; - clarg.buf = buf; - clarg.oldaction = NULL; - __libc_cleanup_push (cancel_handler, &clarg); - __libc_lock_lock (syslog_lock); - - /* Prepare for a broken connection. */ - memset (&action, 0, sizeof (action)); - action.sa_handler = sigpipe_handler; - sigemptyset (&action.sa_mask); - sigpipe = __sigaction (SIGPIPE, &action, &oldaction); - if (sigpipe == 0) - clarg.oldaction = &oldaction; - - /* Get connected, output the message to the local logger. */ - if (!connected) - openlog_internal(LogTag, LogStat | LOG_NDELAY, 0); - - /* If we have a SOCK_STREAM connection, also send ASCII NUL as - a record terminator. */ - if (LogType == SOCK_STREAM) - ++bufsize; - - if (!connected || __send(LogFile, buf, bufsize, 0) < 0) - { - if (connected) - { - /* Try to reopen the syslog connection. Maybe it went - down. */ - closelog_internal (); - openlog_internal(LogTag, LogStat | LOG_NDELAY, 0); - } - - if (!connected || __send(LogFile, buf, bufsize, 0) < 0) - { - closelog_internal (); /* attempt re-open next time */ - /* - * Output the message to the console; don't worry - * about blocking, if console blocks everything will. - * Make sure the error reported is the one from the - * syslogd failure. - */ - if (LogStat & LOG_CONS && - (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0) - { - dprintf (fd, "%s\r\n", buf + msgoff); - (void)__close(fd); - } - } - } - - if (sigpipe == 0) - __sigaction (SIGPIPE, &oldaction, (struct sigaction *) NULL); - - /* End of critical section. */ - __libc_cleanup_pop (0); - __libc_lock_unlock (syslog_lock); - - if (buf != failbuf) - free (buf); -} -libc_hidden_def (vsyslog) - -static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */ - - -static void -internal_function -openlog_internal(const char *ident, int logstat, int logfac) -{ - if (ident != NULL) - LogTag = ident; - LogStat = logstat; - if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0) - LogFacility = logfac; - - int retry = 0; - while (retry < 2) { - if (LogFile == -1) { - SyslogAddr.sa_family = AF_UNIX; - (void)strncpy(SyslogAddr.sa_data, _PATH_LOG, - sizeof(SyslogAddr.sa_data)); - if (LogStat & LOG_NDELAY) { - if ((LogFile = __socket(AF_UNIX, LogType, 0)) - == -1) - return; - (void)__fcntl(LogFile, F_SETFD, 1); - } - } - if (LogFile != -1 && !connected) - { - int old_errno = errno; - if (__connect(LogFile, &SyslogAddr, sizeof(SyslogAddr)) - == -1) - { - int saved_errno = errno; - int fd = LogFile; - LogFile = -1; - (void)__close(fd); - __set_errno (old_errno); - if (saved_errno == EPROTOTYPE) - { - /* retry with the other type: */ - LogType = (LogType == SOCK_DGRAM - ? SOCK_STREAM : SOCK_DGRAM); - ++retry; - continue; - } - } else - connected = 1; - } - break; - } -} - -void -openlog (const char *ident, int logstat, int logfac) -{ - /* Protect against multiple users and cancellation. */ - __libc_cleanup_push (cancel_handler, NULL); - __libc_lock_lock (syslog_lock); - - openlog_internal (ident, logstat, logfac); - - __libc_cleanup_pop (1); -} - -static void -sigpipe_handler (int signo) -{ - closelog_internal (); -} - -static void -closelog_internal() -{ - if (!connected) - return; - - __close (LogFile); - LogFile = -1; - connected = 0; -} - -void -closelog () -{ - /* Protect against multiple users and cancellation. */ - __libc_cleanup_push (cancel_handler, NULL); - __libc_lock_lock (syslog_lock); - - closelog_internal (); - LogTag = NULL; - LogType = SOCK_DGRAM; /* this is the default */ - - /* Free the lock. */ - __libc_cleanup_pop (1); -} - -/* setlogmask -- set the log mask level */ -int -setlogmask(pmask) - int pmask; -{ - int omask; - - omask = LogMask; - if (pmask != 0) - LogMask = pmask; - return (omask); -} diff -rNpu glibc-2.3.4/misc/tst-efgcvt.c glibc-2.3.5/misc/tst-efgcvt.c --- glibc-2.3.4/misc/tst-efgcvt.c 2001-07-05 21:55:36.000000000 -0700 +++ glibc-2.3.5/misc/tst-efgcvt.c 2005-02-16 00:22:00.000000000 -0800 @@ -20,6 +20,7 @@ # define _GNU_SOURCE 1 #endif +#include #include #include #include @@ -59,6 +60,10 @@ static testcase ecvt_tests[] = { 123.01, -4, 3, "" }, { 126.71, -4, 3, "" }, { 0.0, 4, 1, "0000" }, +#if DBL_MANT_DIG == 53 + { 0x1p-1074, 3, -323, "494" }, + { -0x1p-1074, 3, -323, "494" }, +#endif /* -1.0 is end marker. */ { -1.0, 0, 0, "" } }; diff -rNpu glibc-2.3.4/NEWS glibc-2.3.5/NEWS --- glibc-2.3.4/NEWS 2004-12-19 01:41:20.000000000 -0800 +++ glibc-2.3.5/NEWS 2005-04-05 19:59:17.000000000 -0700 @@ -1,10 +1,21 @@ -GNU C Library NEWS -- history of user-visible changes. 2004-12-19 -Copyright (C) 1992-2002,2003,2004 Free Software Foundation, Inc. +GNU C Library NEWS -- history of user-visible changes. 2005-04-05 +Copyright (C) 1992-2002,2003,2004,2005 Free Software Foundation, Inc. See the end for copying conditions. Please send GNU C library bug reports via using `glibc' in the "product" field. +Version 2.3.5 + +* The following bugs are resolved with this release: + + 284, 592, 602, 626, 633, 640, 650, 661, 671, 681, 693, 700, 710, 719, + 722, 723, 725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, + 737, 738, 739, 740, 741, 742, 743, 744, 745, 765, 767, 768, 769, 776, + 777, 787, 821, 822, 823, 825 + + Visit for the details of each bug. + Version 2.3.4 * Support for RFC 3678. Real implementations exist only for Linux so far. diff -rNpu glibc-2.3.4/nis/ypclnt.c glibc-2.3.5/nis/ypclnt.c --- glibc-2.3.4/nis/ypclnt.c 2004-12-05 15:03:32.000000000 -0800 +++ glibc-2.3.5/nis/ypclnt.c 2005-04-05 17:45:18.000000000 -0700 @@ -1,4 +1,5 @@ -/* Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 1996-2001, 2002, 2003, 2004, 2005 + Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Thorsten Kukuk , 1996. @@ -829,6 +830,11 @@ yperr_string (const int error) static const int8_t yp_2_yperr[] = { #define YP2YPERR(yp, yperr) [YP_##yp - YP_VERS] = YPERR_##yperr + YP2YPERR (TRUE, SUCCESS), + YP2YPERR (NOMORE, NOMORE), + YP2YPERR (FALSE, YPERR), + YP2YPERR (NOMAP, MAP), + YP2YPERR (NODOM, DOMAIN), YP2YPERR (NOKEY, KEY), YP2YPERR (BADOP, YPERR), YP2YPERR (BADDB, BADDB), @@ -839,7 +845,7 @@ static const int8_t yp_2_yperr[] = int ypprot_err (const int code) { - if (code < YP_VERS || code > YP_NOKEY) + if (code < YP_VERS || code > YP_NOMORE) return YPERR_YPERR; return yp_2_yperr[code - YP_VERS]; } diff -rNpu glibc-2.3.4/nptl/alloca_cutoff.c glibc-2.3.5/nptl/alloca_cutoff.c --- glibc-2.3.4/nptl/alloca_cutoff.c 2002-11-26 14:50:01.000000000 -0800 +++ glibc-2.3.5/nptl/alloca_cutoff.c 2005-02-25 17:38:45.000000000 -0800 @@ -3,16 +3,16 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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. */ diff -rNpu glibc-2.3.4/nptl/ChangeLog glibc-2.3.5/nptl/ChangeLog --- glibc-2.3.4/nptl/ChangeLog 2004-12-18 14:51:00.000000000 -0800 +++ glibc-2.3.5/nptl/ChangeLog 2005-03-12 19:53:26.000000000 -0800 @@ -1,3 +1,58 @@ +2005-02-25 Roland McGrath + + * alloca_cutoff.c: Correct license text. + * tst-unload.c: Likewise. + * sysdeps/pthread/allocalim.h: Likewise. + * sysdeps/pthread/pt-initfini.c: Likewise. + * sysdeps/pthread/bits/libc-lock.h: Likewise. + * sysdeps/pthread/bits/sigthread.h: Likewise. + * sysdeps/unix/sysv/linux/bits/local_lim.h: Likewise. + * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise. + +2005-02-07 Richard Henderson + + [BZ #787] + * sysdeps/pthread/pthread.h (__sigsetjmp): Use pointer as first + argument. + +2005-01-26 Jakub Jelinek + + [BZ #737] + * sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S (__new_sem_trywait): + Use direct %gs segment access or, if NO_TLS_DIRECT_SEG_REFS, + at least gotntpoff relocation and addition. + * sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S (sem_timedwait): + Likewise. + * sysdeps/unix/sysv/linux/i386/i486/sem_post.S (__new_sem_post): + Likewise. + * sysdeps/unix/sysv/linux/i386/i486/sem_wait.S (__new_sem_wait): + Likewise. + +2004-12-27 Ulrich Drepper + + [BZ #744] + * init.c (__pthread_initialize_minimal_internal): Use __sigemptyset. + +2004-12-21 Jakub Jelinek + + [BZ #723] + * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of + %esp. + * Makefile (tests): Add tst-align2. + * tst-align2.c: New test. + * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add + -mpreferred-stack-boundary=4. + +2004-12-21 Jakub Jelinek + + [BZ #723] + * sysdeps/i386/tls.h (CALL_THREAD_FCT): Maintain 16 byte alignment of + %esp. + * Makefile (tests): Add tst-align2. + * tst-align2.c: New test. + * sysdeps/i386/Makefile (CFLAGS-tst-align{,2}.c): Add + -mpreferred-stack-boundary=4. + 2004-12-18 Roland McGrath * sysdeps/unix/sysv/linux/powerpc/powerpc64/bits/local_lim.h: diff -rNpu glibc-2.3.4/nptl/init.c glibc-2.3.5/nptl/init.c --- glibc-2.3.4/nptl/init.c 2004-12-09 15:53:39.000000000 -0800 +++ glibc-2.3.5/nptl/init.c 2005-02-16 01:21:38.000000000 -0800 @@ -262,7 +262,7 @@ __pthread_initialize_minimal_internal (v struct sigaction sa; sa.sa_sigaction = sigcancel_handler; sa.sa_flags = SA_SIGINFO; - sigemptyset (&sa.sa_mask); + __sigemptyset (&sa.sa_mask); (void) __libc_sigaction (SIGCANCEL, &sa, NULL); diff -rNpu glibc-2.3.4/nptl/Makefile glibc-2.3.5/nptl/Makefile --- glibc-2.3.4/nptl/Makefile 2004-12-07 12:31:27.000000000 -0800 +++ glibc-2.3.5/nptl/Makefile 2005-02-16 00:45:56.000000000 -0800 @@ -205,7 +205,7 @@ tests = tst-attr1 tst-attr2 tst-attr3 \ tst-sem1 tst-sem2 tst-sem3 tst-sem4 tst-sem5 tst-sem6 tst-sem7 \ tst-sem8 tst-sem9 \ tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \ - tst-align \ + tst-align tst-align2 \ tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \ tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \ tst-raise1 \ diff -rNpu glibc-2.3.4/nptl/sysdeps/i386/Makefile glibc-2.3.5/nptl/sysdeps/i386/Makefile --- glibc-2.3.4/nptl/sysdeps/i386/Makefile 2003-09-17 02:34:55.000000000 -0700 +++ glibc-2.3.5/nptl/sysdeps/i386/Makefile 2005-02-16 00:45:55.000000000 -0800 @@ -22,4 +22,6 @@ endif ifeq ($(subdir),nptl) CFLAGS-pthread_create.c += -mpreferred-stack-boundary=4 +CFLAGS-tst-align.c += -mpreferred-stack-boundary=4 +CFLAGS-tst-align2.c += -mpreferred-stack-boundary=4 endif diff -rNpu glibc-2.3.4/nptl/sysdeps/i386/tls.h glibc-2.3.5/nptl/sysdeps/i386/tls.h --- glibc-2.3.4/nptl/sysdeps/i386/tls.h 2004-03-05 02:17:01.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/i386/tls.h 2005-02-16 00:45:55.000000000 -0800 @@ -397,9 +397,12 @@ union user_desc_init #define CALL_THREAD_FCT(descr) \ ({ void *__res; \ int __ignore1, __ignore2; \ - asm volatile ("pushl %%gs:%P4\n\t" \ + asm volatile ("pushl %%eax\n\t" \ + "pushl %%eax\n\t" \ + "pushl %%eax\n\t" \ + "pushl %%gs:%P4\n\t" \ "call *%%gs:%P3\n\t" \ - "addl $4, %%esp" \ + "addl $16, %%esp" \ : "=a" (__res), "=c" (__ignore1), "=d" (__ignore2) \ : "i" (offsetof (struct pthread, start_routine)), \ "i" (offsetof (struct pthread, arg))); \ diff -rNpu glibc-2.3.4/nptl/sysdeps/pthread/allocalim.h glibc-2.3.5/nptl/sysdeps/pthread/allocalim.h --- glibc-2.3.4/nptl/sysdeps/pthread/allocalim.h 2002-11-26 14:50:35.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/pthread/allocalim.h 2005-02-25 17:38:45.000000000 -0800 @@ -3,16 +3,16 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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. */ diff -rNpu glibc-2.3.4/nptl/sysdeps/pthread/bits/libc-lock.h glibc-2.3.5/nptl/sysdeps/pthread/bits/libc-lock.h --- glibc-2.3.4/nptl/sysdeps/pthread/bits/libc-lock.h 2003-12-10 20:50:49.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/pthread/bits/libc-lock.h 2005-02-25 17:38:44.000000000 -0800 @@ -3,16 +3,16 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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. */ diff -rNpu glibc-2.3.4/nptl/sysdeps/pthread/bits/sigthread.h glibc-2.3.5/nptl/sysdeps/pthread/bits/sigthread.h --- glibc-2.3.4/nptl/sysdeps/pthread/bits/sigthread.h 2002-11-26 14:50:35.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/pthread/bits/sigthread.h 2005-02-25 17:38:44.000000000 -0800 @@ -3,16 +3,16 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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. */ diff -rNpu glibc-2.3.4/nptl/sysdeps/pthread/pthread.h glibc-2.3.5/nptl/sysdeps/pthread/pthread.h --- glibc-2.3.4/nptl/sysdeps/pthread/pthread.h 2004-11-24 14:55:24.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/pthread/pthread.h 2005-03-12 19:53:16.000000000 -0800 @@ -1,4 +1,4 @@ -/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. +/* 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 @@ -661,7 +661,7 @@ extern void __pthread_unwind_next (__pth /* Function used in the macros. */ struct __jmp_buf_tag; -extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROW; +extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __THROW; /* Mutex handling. */ diff -rNpu glibc-2.3.4/nptl/sysdeps/pthread/pt-initfini.c glibc-2.3.5/nptl/sysdeps/pthread/pt-initfini.c --- glibc-2.3.4/nptl/sysdeps/pthread/pt-initfini.c 2002-12-31 00:46:38.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/pthread/pt-initfini.c 2005-02-25 17:38:45.000000000 -0800 @@ -3,11 +3,11 @@ 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 Library General Public + and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - In addition to the permissions in the GNU Library General Public + In addition to the permissions in the GNU Lesser General Public License, the Free Software Foundation gives you unlimited permission to link the compiled version of this file with other programs, and to distribute those programs without any restriction @@ -19,9 +19,9 @@ 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 Library General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ diff -rNpu glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h --- glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h 2004-04-12 19:00:09.000000000 -0700 +++ glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/bits/local_lim.h 2005-02-25 17:38:44.000000000 -0800 @@ -3,16 +3,16 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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. */ diff -rNpu glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h --- glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2004-12-09 16:23:51.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h 2005-02-25 17:38:44.000000000 -0800 @@ -3,16 +3,16 @@ 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 Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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. */ diff -rNpu glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S --- glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S 2003-03-12 17:06:30.000000000 -0800 +++ glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_post.S 2005-02-16 03:07:43.000000000 -0800 @@ -65,9 +65,14 @@ __new_sem_post: #endif addl $_GLOBAL_OFFSET_TABLE_, %ebx #if USE___THREAD - movl %gs:0, %edx - subl errno@gottpoff(%ebx), %edx +# ifdef NO_TLS_DIRECT_SEG_REFS + movl errno@gotntpoff(%ebx), %edx + addl %gs:0, %edx movl $EINVAL, (%edx) +# else + movl errno@gotntpoff(%ebx), %edx + movl $EINVAL, %gs:(%edx) +# endif #else call __errno_location@plt movl $EINVAL, (%eax) diff -rNpu glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S --- glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2004-05-16 22:16:49.000000000 -0700 +++ glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_timedwait.S 2005-02-16 03:07:44.000000000 -0800 @@ -158,9 +158,14 @@ sem_timedwait: #endif addl $_GLOBAL_OFFSET_TABLE_, %ebx #if USE___THREAD - movl %gs:0, %edx - subl errno@gottpoff(%ebx), %edx +# ifdef NO_TLS_DIRECT_SEG_REFS + movl errno@gotntpoff(%ebx), %edx + addl %gs:0, %edx movl %esi, (%edx) +# else + movl errno@gotntpoff(%ebx), %edx + movl %esi, %gs:(%edx) +# endif #else call __errno_location@plt movl %esi, (%eax) diff -rNpu glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S --- glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2003-05-10 13:38:06.000000000 -0700 +++ glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_trywait.S 2005-02-16 03:07:44.000000000 -0800 @@ -55,9 +55,14 @@ __new_sem_trywait: #endif addl $_GLOBAL_OFFSET_TABLE_, %ecx #if USE___THREAD - movl %gs:0, %edx - subl errno@gottpoff(%ecx), %edx +# ifdef NO_TLS_DIRECT_SEG_REFS + movl errno@gotntpoff(%ecx), %edx + addl %gs:0, %edx movl $EAGAIN, (%edx) +# else + movl errno@gotntpoff(%ecx), %edx + movl $EAGAIN, %gs:(%edx) +# endif #else call __errno_location@plt movl $EAGAIN, (%eax) diff -rNpu glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S --- glibc-2.3.4/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2003-07-08 14:06:32.000000000 -0700 +++ glibc-2.3.5/nptl/sysdeps/unix/sysv/linux/i386/i486/sem_wait.S 2005-02-16 03:07:44.000000000 -0800 @@ -102,9 +102,14 @@ __new_sem_wait: #endif addl $_GLOBAL_OFFSET_TABLE_, %ebx #if USE___THREAD - movl %gs:0, %edx - subl errno@gottpoff(%ebx), %edx +# ifdef NO_TLS_DIRECT_SEG_REFS + movl errno@gotntpoff(%ebx), %edx + addl %gs:0, %edx movl %esi, (%edx) +# else + movl errno@gotntpoff(%ebx), %edx + movl %esi, %gs:(%edx) +# endif #else call __errno_location@plt movl %esi, (%eax) diff -rNpu glibc-2.3.4/nptl/tst-align2.c glibc-2.3.5/nptl/tst-align2.c --- glibc-2.3.4/nptl/tst-align2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/nptl/tst-align2.c 2005-02-16 00:45:56.000000000 -0800 @@ -0,0 +1,87 @@ +/* Copyright (C) 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. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static int +f (void *arg) +{ + bool ok = true; + + if (TEST_STACK_ALIGN ()) + ok = false; + + return ok ? 0 : 1; +} + +static int +do_test (void) +{ + bool ok = true; + + puts ("in main"); + + if (TEST_STACK_ALIGN ()) + ok = false; + +#ifdef __ia64__ + extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base, + size_t __child_stack_size, int __flags, + void *__arg, ...); + char st[256 * 1024]; + pid_t p = __clone2 (f, st, sizeof (st), 0, 0); +#else + char st[128 * 1024]; + pid_t p = clone (f, st + sizeof (st), 0, 0); +#endif + if (p == -1) + { + printf("clone failed: %m\n"); + return 1; + } + + int e; + if (waitpid (p, &e, __WCLONE) != p) + { + puts ("waitpid failed"); + kill (p, SIGKILL); + return 1; + } + if (!WIFEXITED (e)) + { + if (WIFSIGNALED (e)) + printf ("died from signal %s\n", strsignal (WTERMSIG (e))); + else + puts ("did not terminate correctly"); + return 1; + } + if (WEXITSTATUS (e) != 0) + ok = false; + + return ok ? 0 : 1; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/nptl/tst-unload.c glibc-2.3.5/nptl/tst-unload.c --- glibc-2.3.4/nptl/tst-unload.c 2004-02-25 10:41:32.000000000 -0800 +++ glibc-2.3.5/nptl/tst-unload.c 2005-02-25 17:38:45.000000000 -0800 @@ -3,16 +3,16 @@ Contributed by Ulrich Drepper , 2000. The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the + 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 - Library General Public License for more details. + Lesser General Public License for more details. - You should have received a copy of the GNU Library General Public + 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. */ diff -rNpu glibc-2.3.4/nscd/aicache.c glibc-2.3.5/nscd/aicache.c --- glibc-2.3.4/nscd/aicache.c 2004-09-20 16:13:30.000000000 -0700 +++ glibc-2.3.5/nscd/aicache.c 2005-02-25 17:24:11.000000000 -0800 @@ -365,7 +365,7 @@ addhstaiX (struct database_dyn *db, int wait. */ assert (fd != -1); - TEMP_FAILURE_RETRY (write (fd, &dataset->resp, total)); + writeall (fd, &dataset->resp, total); } goto out; diff -rNpu glibc-2.3.4/nscd/connections.c glibc-2.3.5/nscd/connections.c --- glibc-2.3.4/nscd/connections.c 2004-10-15 14:12:15.000000000 -0700 +++ glibc-2.3.5/nscd/connections.c 2005-02-25 17:24:11.000000000 -0800 @@ -181,13 +181,28 @@ static int sock; unsigned long int client_queued; +ssize_t +writeall (int fd, const void *buf, size_t len) +{ + size_t n = len; + ssize_t ret; + do + { + ret = TEMP_FAILURE_RETRY (write (fd, buf, n)); + if (ret <= 0) + break; + buf = (const char *) buf + ret; + n -= ret; + } + while (n > 0); + return ret < 0 ? ret : len - n; +} + + /* Initialize database information structures. */ void nscd_init (void) { - struct sockaddr_un sock_addr; - size_t cnt; - /* Secure mode and unprivileged mode are incompatible */ if (server_user != NULL && secure_in_use) { @@ -204,7 +219,7 @@ nscd_init (void) /* No configuration for this value, assume a default. */ nthreads = 2 * lastdb; - for (cnt = 0; cnt < lastdb; ++cnt) + for (size_t cnt = 0; cnt < lastdb; ++cnt) if (dbs[cnt].enabled) { pthread_rwlock_init (&dbs[cnt].lock, NULL); @@ -500,6 +515,7 @@ cannot set socket to close on exec: %s; exit (1); } /* Bind a name to the socket. */ + struct sockaddr_un sock_addr; sock_addr.sun_family = AF_UNIX; strcpy (sock_addr.sun_path, _PATH_NSCDSOCKET); if (bind (sock, (struct sockaddr *) &sock_addr, sizeof (sock_addr)) < 0) @@ -688,7 +704,7 @@ cannot handle old request version %d; cu if (cached != NULL) { /* Hurray it's in the cache. */ - if (TEMP_FAILURE_RETRY (write (fd, cached->data, cached->recsize)) + if (writeall (fd, cached->data, cached->recsize) != cached->recsize && __builtin_expect (debug_level, 0) > 0) { diff -rNpu glibc-2.3.4/nscd/grpcache.c glibc-2.3.5/nscd/grpcache.c --- glibc-2.3.4/nscd/grpcache.c 2004-09-20 16:14:42.000000000 -0700 +++ glibc-2.3.5/nscd/grpcache.c 2005-02-25 17:24:11.000000000 -0800 @@ -292,7 +292,7 @@ cache_addgr (struct database_dyn *db, in unnecessarily let the receiver wait. */ assert (fd != -1); - written = TEMP_FAILURE_RETRY (write (fd, &dataset->resp, total)); + written = writeall (fd, &dataset->resp, total); } /* Add the record to the database. But only if it has not been @@ -429,11 +429,10 @@ addgrbyX (struct database_dyn *db, int f { char *old_buffer = buffer; errno = 0; -#define INCR 1024 if (__builtin_expect (buflen > 32768, 0)) { - buflen += INCR; + buflen *= 2; buffer = (char *) realloc (use_malloc ? buffer : NULL, buflen); if (buffer == NULL) { @@ -454,7 +453,7 @@ addgrbyX (struct database_dyn *db, int f else /* Allocate a new buffer on the stack. If possible combine it with the previously allocated buffer. */ - buffer = (char *) extend_alloca (buffer, buflen, buflen + INCR); + buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen); } #if 0 diff -rNpu glibc-2.3.4/nscd/hstcache.c glibc-2.3.5/nscd/hstcache.c --- glibc-2.3.4/nscd/hstcache.c 2004-09-20 16:14:08.000000000 -0700 +++ glibc-2.3.5/nscd/hstcache.c 2005-02-25 17:24:11.000000000 -0800 @@ -327,7 +327,7 @@ cache_addhst (struct database_dyn *db, i unnecessarily keep the receiver waiting. */ assert (fd != -1); - written = TEMP_FAILURE_RETRY (write (fd, &dataset->resp, total)); + written = writeall (fd, &dataset->resp, total); } /* Add the record to the database. But only if it has not been @@ -453,11 +453,10 @@ addhstbyX (struct database_dyn *db, int { char *old_buffer = buffer; errno = 0; -#define INCR 1024 if (__builtin_expect (buflen > 32768, 0)) { - buflen += INCR; + buflen *= 2; buffer = (char *) realloc (use_malloc ? buffer : NULL, buflen); if (buffer == NULL) { @@ -478,7 +477,7 @@ addhstbyX (struct database_dyn *db, int else /* Allocate a new buffer on the stack. If possible combine it with the previously allocated buffer. */ - buffer = (char *) extend_alloca (buffer, buflen, buflen + INCR); + buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen); } #if 0 diff -rNpu glibc-2.3.4/nscd/initgrcache.c glibc-2.3.5/nscd/initgrcache.c --- glibc-2.3.4/nscd/initgrcache.c 2004-10-05 08:36:25.000000000 -0700 +++ glibc-2.3.5/nscd/initgrcache.c 2005-02-25 17:24:11.000000000 -0800 @@ -343,7 +343,7 @@ addinitgroupsX (struct database_dyn *db, unnecessarily let the receiver wait. */ assert (fd != -1); - written = TEMP_FAILURE_RETRY (write (fd, &dataset->resp, total)); + written = writeall (fd, &dataset->resp, total); } diff -rNpu glibc-2.3.4/nscd/Makefile glibc-2.3.5/nscd/Makefile --- glibc-2.3.4/nscd/Makefile 2004-12-16 14:21:24.000000000 -0800 +++ glibc-2.3.5/nscd/Makefile 2005-02-16 02:50:16.000000000 -0800 @@ -56,6 +56,8 @@ nscd-modules += selinux selinux-LIBS := -lselinux endif +LDLIBS-nscd = $(selinux-LIBS) + distribute := nscd.h nscd-client.h dbg_log.h \ $(addsuffix .c, $(filter-out xmalloc, $(nscd-modules))) \ nscd_nischeck.c nscd.conf nscd.init nscd_proto.h \ @@ -110,7 +112,7 @@ $(objpfx)nscd: $(addprefix $(objpfx),$(n $(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \ $(LDFLAGS) $(LDFLAGS-$(@F)) \ -L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \ - -o $@ $^ $(selinux-LIBS) $(common-objpfx)libc_nonshared.a + -o $@ $^ $(LDLIBS-nscd) $(common-objpfx)libc_nonshared.a endif # This makes sure -DNOT_IN_libc is passed for all these modules. diff -rNpu glibc-2.3.4/nscd/nscd.c glibc-2.3.5/nscd/nscd.c --- glibc-2.3.4/nscd/nscd.c 2004-10-04 09:14:31.000000000 -0700 +++ glibc-2.3.5/nscd/nscd.c 2005-02-16 03:29:42.000000000 -0800 @@ -395,7 +395,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk and Ulrich Drepper"); } @@ -442,6 +442,9 @@ termination_handler (int signum) /* Synchronize memory. */ for (int cnt = 0; cnt < lastdb; ++cnt) { + if (!dbs[cnt].enabled) + continue; + /* Make sure nobody keeps using the database. */ dbs[cnt].head->timestamp = 0; diff -rNpu glibc-2.3.4/nscd/nscd-client.h glibc-2.3.5/nscd/nscd-client.h --- glibc-2.3.4/nscd/nscd-client.h 2004-11-09 23:44:56.000000000 -0800 +++ glibc-2.3.5/nscd/nscd-client.h 2005-02-25 17:24:11.000000000 -0800 @@ -28,6 +28,7 @@ #include #include #include +#include /* Version number of the daemon interface */ @@ -309,4 +310,13 @@ extern const struct datahead *__nscd_cac size_t keylen, const struct mapped_database *mapped); +/* Wrappers around read, readv and write that only read/write less than LEN + bytes on error or EOF. */ +extern ssize_t __readall (int fd, void *buf, size_t len) + attribute_hidden; +extern ssize_t __readvall (int fd, const struct iovec *iov, int iovcnt) + attribute_hidden; +extern ssize_t writeall (int fd, const void *buf, size_t len) + attribute_hidden; + #endif /* nscd.h */ diff -rNpu glibc-2.3.4/nscd/nscd_getai.c glibc-2.3.5/nscd/nscd_getai.c --- glibc-2.3.4/nscd/nscd_getai.c 2004-11-22 10:41:05.000000000 -0800 +++ glibc-2.3.5/nscd/nscd_getai.c 2005-02-25 17:24:11.000000000 -0800 @@ -78,7 +78,7 @@ __nscd_getai (const char *key, struct ns sizeof (ai_resp_mem)); if (sock == -1) { - /* nscd not running or wrong version or hosts caching disabled. */ + /* nscd not running or wrong version. */ __nss_not_use_nscd_hosts = 1; goto out; } @@ -119,8 +119,7 @@ __nscd_getai (const char *key, struct ns if (respdata == NULL) { /* Read the data from the socket. */ - if ((size_t) TEMP_FAILURE_RETRY (__read (sock, resultbuf + 1, - datalen)) == datalen) + if ((size_t) __readall (sock, resultbuf + 1, datalen) == datalen) { retval = 0; *result = resultbuf; @@ -151,6 +150,13 @@ __nscd_getai (const char *key, struct ns } else { + if (__builtin_expect (ai_resp->found == -1, 0)) + { + /* The daemon does not cache this database. */ + __nss_not_use_nscd_hosts = 1; + goto out_close; + } + /* Store the error number. */ *h_errnop = ai_resp->error; diff -rNpu glibc-2.3.4/nscd/nscd_getgr_r.c glibc-2.3.5/nscd/nscd_getgr_r.c --- glibc-2.3.4/nscd/nscd_getgr_r.c 2004-11-09 23:50:46.000000000 -0800 +++ glibc-2.3.5/nscd/nscd_getgr_r.c 2005-02-25 17:24:11.000000000 -0800 @@ -202,7 +202,7 @@ nscd_getgr_r (const char *key, size_t ke total_len = vec[0].iov_len + vec[1].iov_len; /* Get this data. */ - size_t n = TEMP_FAILURE_RETRY (__readv (sock, vec, 2)); + size_t n = __readvall (sock, vec, 2); if (__builtin_expect (n != total_len, 0)) goto out_close; } @@ -232,8 +232,7 @@ nscd_getgr_r (const char *key, size_t ke retval = 0; if (gr_name == NULL) { - size_t n = TEMP_FAILURE_RETRY (__read (sock, resultbuf->gr_mem[0], - total_len)); + size_t n = __readall (sock, resultbuf->gr_mem[0], total_len); if (__builtin_expect (n != total_len, 0)) { /* The `errno' to some value != ERANGE. */ diff -rNpu glibc-2.3.4/nscd/nscd_gethst_r.c glibc-2.3.5/nscd/nscd_gethst_r.c --- glibc-2.3.4/nscd/nscd_gethst_r.c 2004-11-09 23:51:12.000000000 -0800 +++ glibc-2.3.5/nscd/nscd_gethst_r.c 2005-02-25 17:24:11.000000000 -0800 @@ -218,6 +218,7 @@ nscd_gethst_r (const char *key, size_t k ? INADDRSZ : IN6ADDRSZ))) { no_room: + *h_errnop = NETDB_INTERNAL; __set_errno (ERANGE); retval = ERANGE; goto out_close; @@ -298,8 +299,7 @@ nscd_gethst_r (const char *key, size_t k ++n; } - if ((size_t) TEMP_FAILURE_RETRY (__readv (sock, vec, n)) - != total_len) + if ((size_t) __readvall (sock, vec, n) != total_len) goto out_close; } else @@ -328,9 +328,8 @@ nscd_gethst_r (const char *key, size_t k /* And finally read the aliases. */ if (addr_list == NULL) { - if ((size_t) TEMP_FAILURE_RETRY (__read (sock, - resultbuf->h_aliases[0], - total_len)) == total_len) + if ((size_t) __readall (sock, resultbuf->h_aliases[0], total_len) + == total_len) { retval = 0; *result = resultbuf; diff -rNpu glibc-2.3.4/nscd/nscd_getpw_r.c glibc-2.3.5/nscd/nscd_getpw_r.c --- glibc-2.3.4/nscd/nscd_getpw_r.c 2004-11-09 23:49:22.000000000 -0800 +++ glibc-2.3.5/nscd/nscd_getpw_r.c 2005-02-25 17:24:11.000000000 -0800 @@ -172,7 +172,7 @@ nscd_getpw_r (const char *key, size_t ke retval = 0; if (pw_name == NULL) { - ssize_t nbytes = TEMP_FAILURE_RETRY (__read (sock, buffer, total)); + ssize_t nbytes = __readall (sock, buffer, total); if (__builtin_expect (nbytes != total, 0)) { diff -rNpu glibc-2.3.4/nscd/nscd_helper.c glibc-2.3.5/nscd/nscd_helper.c --- glibc-2.3.4/nscd/nscd_helper.c 2004-10-02 12:30:30.000000000 -0700 +++ glibc-2.3.5/nscd/nscd_helper.c 2005-02-25 17:24:11.000000000 -0800 @@ -34,6 +34,64 @@ #include "nscd-client.h" +ssize_t +__readall (int fd, void *buf, size_t len) +{ + size_t n = len; + ssize_t ret; + do + { + ret = TEMP_FAILURE_RETRY (__read (fd, buf, n)); + if (ret <= 0) + break; + buf = (char *) buf + ret; + n -= ret; + } + while (n > 0); + return ret < 0 ? ret : len - n; +} + + +ssize_t +__readvall (int fd, const struct iovec *iov, int iovcnt) +{ + ssize_t ret = TEMP_FAILURE_RETRY (__readv (fd, iov, iovcnt)); + if (ret <= 0) + return ret; + + size_t total = 0; + for (int i = 0; i < iovcnt; ++i) + total += iov[i].iov_len; + + if (ret < total) + { + struct iovec iov_buf[iovcnt]; + ssize_t r = ret; + + struct iovec *iovp = memcpy (iov_buf, iov, iovcnt * sizeof (*iov)); + do + { + while (iovp->iov_len <= r) + { + r -= iovp->iov_len; + --iovcnt; + ++iovp; + } + iovp->iov_base = (char *) iovp->iov_base + r; + iovp->iov_len -= r; + r = TEMP_FAILURE_RETRY (__readv (fd, iovp, iovcnt)); + if (r <= 0) + break; + ret += r; + } + while (ret < total); + if (r < 0) + ret = r; + } + return ret; +} + + static int open_socket (void) { diff -rNpu glibc-2.3.4/nscd/nscd.init glibc-2.3.5/nscd/nscd.init --- glibc-2.3.4/nscd/nscd.init 2004-10-15 14:19:26.000000000 -0700 +++ glibc-2.3.5/nscd/nscd.init 2005-02-16 03:14:30.000000000 -0800 @@ -88,9 +88,9 @@ case "$1" in RETVAL=$? ;; status) - status nscd + status nscd RETVAL=$? - ;; + ;; restart) restart RETVAL=$? @@ -100,9 +100,11 @@ case "$1" in RETVAL=$? ;; reload) - killproc /usr/sbin/nscd -HUP + echo -n $"Reloading $prog: " + killproc /usr/sbin/nscd -HUP RETVAL=$? - ;; + echo + ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" RETVAL=1 diff -rNpu glibc-2.3.4/nscd/nscd_initgroups.c glibc-2.3.5/nscd/nscd_initgroups.c --- glibc-2.3.4/nscd/nscd_initgroups.c 2004-11-09 23:52:02.000000000 -0800 +++ glibc-2.3.5/nscd/nscd_initgroups.c 2005-02-25 17:24:11.000000000 -0800 @@ -75,7 +75,7 @@ __nscd_getgrouplist (const char *user, g sizeof (initgr_resp_mem)); if (sock == -1) { - /* nscd not running or wrong version or hosts caching disabled. */ + /* nscd not running or wrong version. */ __nss_not_use_nscd_group = 1; goto out; } @@ -101,7 +101,7 @@ __nscd_getgrouplist (const char *user, g (initgr_resp->ngrps + 1) * sizeof (gid_t)); if (newp == NULL) /* We cannot increase the buffer size. */ - goto out; + goto out_close; *groupsp = newp; *size = initgr_resp->ngrps + 1; @@ -110,9 +110,8 @@ __nscd_getgrouplist (const char *user, g if (respdata == NULL) { /* Read the data from the socket. */ - if ((size_t) TEMP_FAILURE_RETRY (__read (sock, *groupsp, - initgr_resp->ngrps - * sizeof (gid_t))) + if ((size_t) __readall (sock, *groupsp, initgr_resp->ngrps + * sizeof (gid_t)) == initgr_resp->ngrps * sizeof (gid_t)) retval = initgr_resp->ngrps; } @@ -125,6 +124,13 @@ __nscd_getgrouplist (const char *user, g } else { + if (__builtin_expect (initgr_resp->found == -1, 0)) + { + /* The daemon does not cache this database. */ + __nss_not_use_nscd_group = 1; + goto out_close; + } + /* No group found yet. */ retval = 0; @@ -143,6 +149,7 @@ __nscd_getgrouplist (const char *user, g (*groupsp)[retval++] = group; } + out_close: if (sock != -1) close_not_cancel_no_status (sock); out: diff -rNpu glibc-2.3.4/nscd/nscd_nischeck.c glibc-2.3.5/nscd/nscd_nischeck.c --- glibc-2.3.4/nscd/nscd_nischeck.c 2004-01-01 12:42:00.000000000 -0800 +++ glibc-2.3.5/nscd/nscd_nischeck.c 2005-02-16 02:29:36.000000000 -0800 @@ -91,6 +91,6 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } diff -rNpu glibc-2.3.4/nscd/pwdcache.c glibc-2.3.5/nscd/pwdcache.c --- glibc-2.3.4/nscd/pwdcache.c 2004-09-20 16:12:44.000000000 -0700 +++ glibc-2.3.5/nscd/pwdcache.c 2005-02-25 17:24:11.000000000 -0800 @@ -287,7 +287,7 @@ cache_addpw (struct database_dyn *db, in unnecessarily let the receiver wait. */ assert (fd != -1); - written = TEMP_FAILURE_RETRY (write (fd, &dataset->resp, total)); + written = writeall (fd, &dataset->resp, total); } @@ -425,11 +425,10 @@ addpwbyX (struct database_dyn *db, int f { char *old_buffer = buffer; errno = 0; -#define INCR 1024 if (__builtin_expect (buflen > 32768, 0)) { - buflen += INCR; + buflen *= 2; buffer = (char *) realloc (use_malloc ? buffer : NULL, buflen); if (buffer == NULL) { @@ -450,7 +449,7 @@ addpwbyX (struct database_dyn *db, int f else /* Allocate a new buffer on the stack. If possible combine it with the previously allocated buffer. */ - buffer = (char *) extend_alloca (buffer, buflen, buflen + INCR); + buffer = (char *) extend_alloca (buffer, buflen, 2 * buflen); } #if 0 diff -rNpu glibc-2.3.4/nss/getent.c glibc-2.3.5/nss/getent.c --- glibc-2.3.4/nss/getent.c 2004-10-19 14:10:56.000000000 -0700 +++ glibc-2.3.5/nss/getent.c 2005-02-16 02:29:35.000000000 -0800 @@ -83,7 +83,7 @@ print_version (FILE *stream, struct argp Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stream, gettext ("Written by %s.\n"), "Thorsten Kukuk"); } diff -rNpu glibc-2.3.4/posix/bug-regex19.c glibc-2.3.5/posix/bug-regex19.c --- glibc-2.3.4/posix/bug-regex19.c 2003-12-21 22:46:08.000000000 -0800 +++ glibc-2.3.5/posix/bug-regex19.c 2005-02-16 03:09:23.000000000 -0800 @@ -170,22 +170,22 @@ static struct test_s {ERE, "[^k]\\B[^k]", "kBk", 0, -1}, {ERE, "[^C]\\B[^C]", "CCCABA", 0, 3}, {ERE, "[^C]\\B[^C]", "CBC", 0, -1}, - {ERE, ".(\\b|\\B).", "=~AB", 0, 1}, + {ERE, ".(\\b|\\B).", "=~AB", 0, 0}, {ERE, ".(\\b|\\B).", "A=C", 0, 0}, {ERE, ".(\\b|\\B).", "ABC", 0, 0}, - {ERE, ".(\\b|\\B).", "=~\\!", 0, -1}, - {ERE, "[^k](\\b|\\B)[^k]", "=~AB", 0, 1}, + {ERE, ".(\\b|\\B).", "=~\\!", 0, 0}, + {ERE, "[^k](\\b|\\B)[^k]", "=~AB", 0, 0}, {ERE, "[^k](\\b|\\B)[^k]", "A=C", 0, 0}, {ERE, "[^k](\\b|\\B)[^k]", "ABC", 0, 0}, - {ERE, "[^k](\\b|\\B)[^k]", "=~kBD", 0, 3}, - {ERE, "[^k](\\b|\\B)[^k]", "=~\\!", 0, -1}, - {ERE, "[^k](\\b|\\B)[^k]", "=~kB", 0, -1}, - {ERE, "[^C](\\b|\\B)[^C]", "=~AB", 0, 1}, + {ERE, "[^k](\\b|\\B)[^k]", "=~kBD", 0, 0}, + {ERE, "[^k](\\b|\\B)[^k]", "=~\\!", 0, 0}, + {ERE, "[^k](\\b|\\B)[^k]", "=~kB", 0, 0}, + {ERE, "[^C](\\b|\\B)[^C]", "=~AB", 0, 0}, {ERE, "[^C](\\b|\\B)[^C]", "A=C", 0, 0}, {ERE, "[^C](\\b|\\B)[^C]", "ABC", 0, 0}, - {ERE, "[^C](\\b|\\B)[^C]", "=~CBD", 0, 3}, - {ERE, "[^C](\\b|\\B)[^C]", "=~\\!", 0, -1}, - {ERE, "[^C](\\b|\\B)[^C]", "=~CB", 0, -1}, + {ERE, "[^C](\\b|\\B)[^C]", "=~CBD", 0, 0}, + {ERE, "[^C](\\b|\\B)[^C]", "=~\\!", 0, 0}, + {ERE, "[^C](\\b|\\B)[^C]", "=~CB", 0, 0}, {ERE, "\\b([A]|[!]|.B)", "A=AC", 0, 0}, {ERE, "\\b([A]|[!]|.B)", "=AC", 0, 1}, {ERE, "\\b([A]|[!]|.B)", "!AC", 0, 1}, diff -rNpu glibc-2.3.4/posix/execl.c glibc-2.3.5/posix/execl.c --- glibc-2.3.4/posix/execl.c 2002-08-03 20:30:39.000000000 -0700 +++ glibc-2.3.5/posix/execl.c 2005-02-16 02:56:40.000000000 -0800 @@ -16,10 +16,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include #include #include #include +#include #include #include @@ -33,46 +33,44 @@ int execl (const char *path, const char *arg, ...) { - size_t argv_max = 1024; - const char **argv = alloca (argv_max * sizeof (const char *)); - unsigned int i; +#define INITIAL_ARGV_MAX 1024 + size_t argv_max = INITIAL_ARGV_MAX; + const char *initial_argv[INITIAL_ARGV_MAX]; + const char **argv = initial_argv; va_list args; argv[0] = arg; va_start (args, arg); - i = 0; + unsigned int i = 0; while (argv[i++] != NULL) { if (i == argv_max) { - const char **nptr = alloca ((argv_max *= 2) * sizeof (const char *)); - -#ifndef _STACK_GROWS_UP - if ((char *) nptr + argv_max == (char *) argv) + argv_max *= 2; + const char **nptr = realloc (argv == initial_argv ? NULL : argv, + argv_max * sizeof (const char *)); + if (nptr == NULL) { - /* Stack grows down. */ - argv = (const char **) memcpy (nptr, argv, - i * sizeof (const char *)); - argv_max += i; + if (argv != initial_argv) + free (argv); + return -1; } - else -#endif -#ifndef _STACK_GROWS_DOWN - if ((char *) argv + i == (char *) nptr) - /* Stack grows up. */ - argv_max += i; - else -#endif - /* We have a hole in the stack. */ - argv = (const char **) memcpy (nptr, argv, - i * sizeof (const char *)); + if (argv == initial_argv) + /* We have to copy the already filled-in data ourselves. */ + memcpy (nptr, argv, i * sizeof (const char *)); + + argv = nptr; } argv[i] = va_arg (args, const char *); } va_end (args); - return __execve (path, (char *const *) argv, __environ); + int ret = __execve (path, (char *const *) argv, __environ); + if (argv != initial_argv) + free (argv); + + return ret; } libc_hidden_def (execl) diff -rNpu glibc-2.3.4/posix/execle.c glibc-2.3.5/posix/execle.c --- glibc-2.3.4/posix/execle.c 2002-08-03 20:30:39.000000000 -0700 +++ glibc-2.3.5/posix/execle.c 2005-02-16 02:56:40.000000000 -0800 @@ -16,10 +16,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include #include #include #include +#include #include #include @@ -29,48 +29,45 @@ int execle (const char *path, const char *arg, ...) { - size_t argv_max = 1024; - const char **argv = alloca (argv_max * sizeof (const char *)); - const char *const *envp; - unsigned int i; +#define INITIAL_ARGV_MAX 1024 + size_t argv_max = INITIAL_ARGV_MAX; + const char *initial_argv[INITIAL_ARGV_MAX]; + const char **argv = initial_argv; va_list args; argv[0] = arg; va_start (args, arg); - i = 0; + unsigned int i = 0; while (argv[i++] != NULL) { if (i == argv_max) { - const char **nptr = alloca ((argv_max *= 2) * sizeof (const char *)); - -#ifndef _STACK_GROWS_UP - if ((char *) nptr + argv_max == (char *) argv) + argv_max *= 2; + const char **nptr = realloc (argv == initial_argv ? NULL : argv, + argv_max * sizeof (const char *)); + if (nptr == NULL) { - /* Stack grows down. */ - argv = (const char **) memcpy (nptr, argv, - i * sizeof (const char *)); - argv_max += i; + if (argv != initial_argv) + free (argv); + return -1; } - else -#endif -#ifndef _STACK_GROWS_DOWN - if ((char *) argv + i == (char *) nptr) - /* Stack grows up. */ - argv_max += i; - else -#endif - /* We have a hole in the stack. */ - argv = (const char **) memcpy (nptr, argv, - i * sizeof (const char *)); + if (argv == initial_argv) + /* We have to copy the already filled-in data ourselves. */ + memcpy (nptr, argv, i * sizeof (const char *)); + + argv = nptr; } argv[i] = va_arg (args, const char *); } - envp = va_arg (args, const char *const *); + const char *const *envp = va_arg (args, const char *const *); va_end (args); - return __execve (path, (char *const *) argv, (char *const *) envp); + int ret = __execve (path, (char *const *) argv, (char *const *) envp); + if (argv != initial_argv) + free (argv); + + return ret; } libc_hidden_def (execle) diff -rNpu glibc-2.3.4/posix/execlp.c glibc-2.3.5/posix/execlp.c --- glibc-2.3.4/posix/execlp.c 2002-08-03 20:30:39.000000000 -0700 +++ glibc-2.3.5/posix/execlp.c 2005-02-16 02:56:40.000000000 -0800 @@ -16,10 +16,10 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include #include #include #include +#include #include #include @@ -30,46 +30,44 @@ int execlp (const char *file, const char *arg, ...) { - size_t argv_max = 1024; - const char **argv = alloca (argv_max * sizeof (const char *)); - unsigned int i; +#define INITIAL_ARGV_MAX 1024 + size_t argv_max = INITIAL_ARGV_MAX; + const char *initial_argv[INITIAL_ARGV_MAX]; + const char **argv = initial_argv; va_list args; argv[0] = arg; va_start (args, arg); - i = 0; + unsigned int i = 0; while (argv[i++] != NULL) { if (i == argv_max) { - const char **nptr = alloca ((argv_max *= 2) * sizeof (const char *)); - -#ifndef _STACK_GROWS_UP - if ((char *) nptr + argv_max == (char *) argv) + argv_max *= 2; + const char **nptr = realloc (argv == initial_argv ? NULL : argv, + argv_max * sizeof (const char *)); + if (nptr == NULL) { - /* Stack grows down. */ - argv = (const char **) memcpy (nptr, argv, - i * sizeof (const char *)); - argv_max += i; + if (argv != initial_argv) + free (argv); + return -1; } - else -#endif -#ifndef _STACK_GROWS_DOWN - if ((char *) argv + i == (char *) nptr) - /* Stack grows up. */ - argv_max += i; - else -#endif - /* We have a hole in the stack. */ - argv = (const char **) memcpy (nptr, argv, - i * sizeof (const char *)); + if (argv == initial_argv) + /* We have to copy the already filled-in data ourselves. */ + memcpy (nptr, argv, i * sizeof (const char *)); + + argv = nptr; } argv[i] = va_arg (args, const char *); } va_end (args); - return execvp (file, (char *const *) argv); + int ret = execvp (file, (char *const *) argv); + if (argv != initial_argv) + free (argv); + + return ret; } libc_hidden_def (execlp) diff -rNpu glibc-2.3.4/posix/execvp.c glibc-2.3.5/posix/execvp.c --- glibc-2.3.4/posix/execvp.c 2004-10-21 23:01:25.000000000 -0700 +++ glibc-2.3.5/posix/execvp.c 2005-02-25 17:02:17.000000000 -0800 @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -26,9 +27,9 @@ /* The file is accessible but it is not an executable file. Invoke the shell to interpret it as a script. */ -static void +static char ** internal_function -script_execute (const char *file, char *const argv[]) +allocate_scripts_argv (const char *file, char *const argv[]) { /* Count the arguments. */ int argc = 0; @@ -36,19 +37,19 @@ script_execute (const char *file, char * ; /* Construct an argument list for the shell. */ - { - char *new_argv[argc + 1]; - new_argv[0] = (char *) _PATH_BSHELL; - new_argv[1] = (char *) file; - while (argc > 1) - { - new_argv[argc] = argv[argc - 1]; - --argc; - } - - /* Execute the shell. */ - __execve (new_argv[0], new_argv, __environ); - } + char **new_argv = (char **) malloc ((argc + 1) * sizeof (char *)); + if (new_argv != NULL) + { + new_argv[0] = (char *) _PATH_BSHELL; + new_argv[1] = (char *) file; + while (argc > 1) + { + new_argv[argc] = argv[argc - 1]; + --argc; + } + } + + return new_argv; } @@ -66,42 +67,58 @@ execvp (file, argv) return -1; } + char **script_argv = NULL; + if (strchr (file, '/') != NULL) { /* Don't search when it contains a slash. */ __execve (file, argv, __environ); if (errno == ENOEXEC) - script_execute (file, argv); + { + script_argv = allocate_scripts_argv (file, argv); + if (script_argv != NULL) + { + __execve (script_argv[0], script_argv, __environ); + + free (script_argv); + } + } } else { - int got_eacces = 0; - char *path, *p, *name; - size_t len; - size_t pathlen; - - path = getenv ("PATH"); + char *path = getenv ("PATH"); + bool path_malloc = false; if (path == NULL) { /* There is no `PATH' in the environment. The default search path is the current directory followed by the path `confstr' returns for `_CS_PATH'. */ - len = confstr (_CS_PATH, (char *) NULL, 0); - path = (char *) __alloca (1 + len); + size_t len = confstr (_CS_PATH, (char *) NULL, 0); + path = (char *) malloc (1 + len); + if (path == NULL) + return -1; path[0] = ':'; (void) confstr (_CS_PATH, path + 1, len); + path_malloc = true; } - len = strlen (file) + 1; - pathlen = strlen (path); - name = __alloca (pathlen + len + 1); + size_t len = strlen (file) + 1; + size_t pathlen = strlen (path); + char *name = malloc (pathlen + len + 1); + if (name == NULL) + { + if (path_malloc) + free (path); + return -1; + } /* Copy the file name at the top. */ name = (char *) memcpy (name + pathlen + 1, file, len); /* And add the slash. */ *--name = '/'; - p = path; + bool got_eacces = false; + char *p = path; do { char *startp; @@ -120,7 +137,21 @@ execvp (file, argv) __execve (startp, argv, __environ); if (errno == ENOEXEC) - script_execute (startp, argv); + { + if (script_argv == NULL) + { + script_argv = allocate_scripts_argv (file, argv); + if (script_argv == NULL) + { + /* A possible EACCES error is not as important as + the ENOMEM. */ + got_eacces = false; + break; + } + } + + __execve (script_argv[0], script_argv, __environ); + } switch (errno) { @@ -128,7 +159,7 @@ execvp (file, argv) /* Record the we got a `Permission denied' error. If we end up finding no executable we can use, we want to diagnose that we did find one but were denied access. */ - got_eacces = 1; + got_eacces = true; case ENOENT: case ESTALE: case ENOTDIR: @@ -156,6 +187,11 @@ execvp (file, argv) /* At least one failure was due to permissions, so report that error. */ __set_errno (EACCES); + + free (script_argv); + free (name - pathlen); + if (path_malloc) + free (path); } /* Return the error from the last attempt (probably ENOENT). */ diff -rNpu glibc-2.3.4/posix/getconf.c glibc-2.3.5/posix/getconf.c --- glibc-2.3.4/posix/getconf.c 2004-12-13 13:28:34.000000000 -0800 +++ glibc-2.3.5/posix/getconf.c 2005-02-16 02:29:34.000000000 -0800 @@ -964,7 +964,7 @@ main (int argc, char *argv[]) Copyright (C) %s Free Software Foundation, Inc.\n\ This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ -"), "2004"); +"), "2005"); fprintf (stderr, gettext ("Written by %s.\n"), "Roland McGrath"); return 0; } diff -rNpu glibc-2.3.4/posix/Makefile glibc-2.3.5/posix/Makefile --- glibc-2.3.4/posix/Makefile 2004-11-27 14:46:43.000000000 -0800 +++ glibc-2.3.5/posix/Makefile 2005-02-25 17:02:11.000000000 -0800 @@ -83,7 +83,10 @@ tests := tstgetopt testfnm runtests run tst-nice tst-nanosleep tst-regex2 \ transbug tst-rxspencer tst-pcre tst-boost \ bug-ga1 tst-vfork1 tst-vfork2 tst-waitid \ - tst-getaddrinfo2 bug-glob1 bug-glob2 tst-sysconf + tst-getaddrinfo2 bug-glob1 bug-glob2 tst-sysconf \ + tst-execvp1 tst-execvp2 tst-execlp1 tst-execlp2 \ + tst-execv1 tst-execv2 tst-execl1 tst-execl2 \ + tst-execve1 tst-execve2 tst-execle1 tst-execle2 xtests := bug-ga2 ifeq (yes,$(build-shared)) test-srcs := globtest @@ -139,16 +142,27 @@ CFLAGS-waitid.c = -fexceptions CFLAGS-waitpid.c = -fexceptions -fasynchronous-unwind-tables CFLAGS-getopt.c = -fexceptions CFLAGS-wordexp.c = -fexceptions +CFLAGS-wordexp.os = -fomit-frame-pointer CFLAGS-sysconf.c = -fexceptions -DGETCONF_DIR='"$(libexecdir)/getconf"' CFLAGS-pathconf.c = -fexceptions CFLAGS-fpathconf.c = -fexceptions CFLAGS-spawn.c = -fexceptions +CFLAGS-spawn.os = -fomit-frame-pointer CFLAGS-spawnp.c = -fexceptions +CFLAGS-spawnp.os = -fomit-frame-pointer CFLAGS-spawni.c = -fexceptions +CFLAGS-spawni.os = -fomit-frame-pointer CFLAGS-pause.c = -fexceptions CFLAGS-glob.c = $(uses-callbacks) -fexceptions CFLAGS-glob64.c = $(uses-callbacks) -fexceptions CFLAGS-getconf.c = -DGETCONF_DIR='"$(libexecdir)/getconf"' +CFLAGS-execve.os = -fomit-frame-pointer +CFLAGS-fexecve.os = -fomit-frame-pointer +CFLAGS-execv.os = -fomit-frame-pointer +CFLAGS-execle.os = -fomit-frame-pointer +CFLAGS-execl.os = -fomit-frame-pointer +CFLAGS-execvp.os = -fomit-frame-pointer +CFLAGS-execlp.os = -fomit-frame-pointer tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \ --none random --col --color --colour diff -rNpu glibc-2.3.4/posix/regcomp.c glibc-2.3.5/posix/regcomp.c --- glibc-2.3.4/posix/regcomp.c 2004-12-05 18:56:42.000000000 -0800 +++ glibc-2.3.5/posix/regcomp.c 2005-02-16 03:09:24.000000000 -0800 @@ -1859,7 +1859,7 @@ peek_token (token, input, syntax) if (!(syntax & RE_NO_GNU_OPS)) { token->type = ANCHOR; - token->opr.ctx_type = INSIDE_WORD; + token->opr.ctx_type = NOT_WORD_DELIM; } break; case 'w': @@ -2349,15 +2349,25 @@ parse_expression (regexp, preg, token, s break; case ANCHOR: if ((token->opr.ctx_type - & (WORD_DELIM | INSIDE_WORD | WORD_FIRST | WORD_LAST)) + & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) && dfa->word_ops_used == 0) init_word_char (dfa); - if (token->opr.ctx_type == WORD_DELIM) + if (token->opr.ctx_type == WORD_DELIM + || token->opr.ctx_type == NOT_WORD_DELIM) { bin_tree_t *tree_first, *tree_last; - token->opr.ctx_type = WORD_FIRST; - tree_first = re_dfa_add_tree_node (dfa, NULL, NULL, token); - token->opr.ctx_type = WORD_LAST; + if (token->opr.ctx_type == WORD_DELIM) + { + token->opr.ctx_type = WORD_FIRST; + tree_first = re_dfa_add_tree_node (dfa, NULL, NULL, token); + token->opr.ctx_type = WORD_LAST; + } + else + { + token->opr.ctx_type = INSIDE_WORD; + tree_first = re_dfa_add_tree_node (dfa, NULL, NULL, token); + token->opr.ctx_type = INSIDE_NOTWORD; + } tree_last = re_dfa_add_tree_node (dfa, NULL, NULL, token); token->type = OP_ALT; tree = re_dfa_add_tree_node (dfa, tree_first, tree_last, token); diff -rNpu glibc-2.3.4/posix/regex_internal.h glibc-2.3.5/posix/regex_internal.h --- glibc-2.3.4/posix/regex_internal.h 2004-12-09 20:37:02.000000000 -0800 +++ glibc-2.3.5/posix/regex_internal.h 2005-02-16 03:09:24.000000000 -0800 @@ -143,18 +143,21 @@ static inline void bitset_mask (bitset d #define NEXT_NEWLINE_CONSTRAINT 0x0020 #define PREV_BEGBUF_CONSTRAINT 0x0040 #define NEXT_ENDBUF_CONSTRAINT 0x0080 -#define DUMMY_CONSTRAINT 0x0100 +#define WORD_DELIM_CONSTRAINT 0x0100 +#define NOT_WORD_DELIM_CONSTRAINT 0x0200 typedef enum { INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, + INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, LINE_FIRST = PREV_NEWLINE_CONSTRAINT, LINE_LAST = NEXT_NEWLINE_CONSTRAINT, BUF_FIRST = PREV_BEGBUF_CONSTRAINT, BUF_LAST = NEXT_ENDBUF_CONSTRAINT, - WORD_DELIM = DUMMY_CONSTRAINT + WORD_DELIM = WORD_DELIM_CONSTRAINT, + NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT } re_context_type; typedef struct diff -rNpu glibc-2.3.4/posix/rxspencer/tests glibc-2.3.5/posix/rxspencer/tests --- glibc-2.3.4/posix/rxspencer/tests 2004-11-18 15:56:09.000000000 -0800 +++ glibc-2.3.5/posix/rxspencer/tests 2005-02-16 03:09:25.000000000 -0800 @@ -526,3 +526,12 @@ a((b+|((c)*)))+d - abcd abcd c,c,c,c (((\b))){0} - x @x -,-,- a(((.*)))b((\2)){0}c - abc abc @bc,@bc,@bc,-,- a(((.*)))b((\1)){0}c - axbc axbc x,x,x,-,- + +\b & SaT @aT +\b & aT @aT +a.*\b & abT ab +\b & STSS +\B & abc @bc +\B & aSbTc +\B & SaT @SaT +\B & aSTSb @TSb diff -rNpu glibc-2.3.4/posix/tst-execl1.c glibc-2.3.5/posix/tst-execl1.c --- glibc-2.3.4/posix/tst-execl1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execl1.c 2005-02-25 17:02:10.000000000 -0800 @@ -0,0 +1,22 @@ +#include +#include +#include + +static int +do_test (void) +{ + static const char prog[] = "does-not-exist"; + errno = 0; + execl (prog, prog, NULL); + + if (errno != ENOENT) + { + printf ("errno = %d (%m), expected ENOENT\n", errno); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/posix/tst-execl2.c glibc-2.3.5/posix/tst-execl2.c --- glibc-2.3.4/posix/tst-execl2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execl2.c 2005-02-25 17:02:11.000000000 -0800 @@ -0,0 +1,58 @@ +#include +#include +#include +#include + + +static void prepare (int argc, char *argv[]); +static int do_test (void); +#define PREPARE(argc, argv) prepare (argc, argv) +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + + +static char *copy; + +static void +prepare (int argc, char *argv[]) +{ + char *buf; + int off; + asprintf (&buf, "cp %s %n%s-copy", argv[0], &off, argv[0]); + if (buf == NULL) + { + puts ("asprintf failed"); + exit (1); + } + if (system (buf) != 0) + { + puts ("system failed"); + exit (1); + } + + /* Make it not executable. */ + copy = buf + off; + if (chmod (copy, 0666) != 0) + { + puts ("chmod failed"); + exit (1); + } + + add_temp_file (copy); +} + + +static int +do_test (void) +{ + errno = 0; + execl (copy, copy, NULL); + + if (errno != EACCES) + { + printf ("errno = %d (%m), expected EACCES\n", errno); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/posix/tst-execle1.c glibc-2.3.5/posix/tst-execle1.c --- glibc-2.3.4/posix/tst-execle1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execle1.c 2005-03-29 15:28:06.000000000 -0800 @@ -0,0 +1,23 @@ +#include +#include +#include + +static int +do_test (void) +{ + static const char prog[] = "does-not-exist"; + char *env [] = {"FOO=BAR", NULL}; + errno = 0; + execle (prog, prog, NULL, env); + + if (errno != ENOENT) + { + printf ("errno = %d (%m), expected ENOENT\n", errno); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/posix/tst-execle2.c glibc-2.3.5/posix/tst-execle2.c --- glibc-2.3.4/posix/tst-execle2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execle2.c 2005-03-29 15:28:06.000000000 -0800 @@ -0,0 +1,59 @@ +#include +#include +#include +#include + + +static void prepare (int argc, char *argv[]); +static int do_test (void); +#define PREPARE(argc, argv) prepare (argc, argv) +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + + +static char *copy; + +static void +prepare (int argc, char *argv[]) +{ + char *buf; + int off; + asprintf (&buf, "cp %s %n%s-copy", argv[0], &off, argv[0]); + if (buf == NULL) + { + puts ("asprintf failed"); + exit (1); + } + if (system (buf) != 0) + { + puts ("system failed"); + exit (1); + } + + /* Make it not executable. */ + copy = buf + off; + if (chmod (copy, 0666) != 0) + { + puts ("chmod failed"); + exit (1); + } + + add_temp_file (copy); +} + + +static int +do_test (void) +{ + char *env[] = {"FOO=BAR", NULL}; + errno = 0; + execle (copy, copy, NULL, env); + + if (errno != EACCES) + { + printf ("errno = %d (%m), expected EACCES\n", errno); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/posix/tst-execlp1.c glibc-2.3.5/posix/tst-execlp1.c --- glibc-2.3.4/posix/tst-execlp1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execlp1.c 2005-02-25 17:02:11.000000000 -0800 @@ -0,0 +1,34 @@ +#include +#include +#include +#include + +static int +do_test (void) +{ + char *cwd = get_current_dir_name (); + if (cwd == NULL) + { + puts ("get_current_dir_name failed"); + return 1; + } + + /* Make sure we do not find a binary with the name we are going to + use. */ + setenv ("PATH", cwd, 1); + + static const char prog[] = "does-not-exist"; + errno = 0; + execlp (prog, prog, NULL); + + if (errno != ENOENT) + { + printf ("errno = %d (%m), expected ENOENT\n", errno); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/posix/tst-execlp2.c glibc-2.3.5/posix/tst-execlp2.c --- glibc-2.3.4/posix/tst-execlp2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execlp2.c 2005-02-25 17:02:10.000000000 -0800 @@ -0,0 +1,82 @@ +#include +#include +#undef basename +#include +#include +#include +#include +#include + + +static void prepare (int argc, char *argv[]); +static int do_test (void); +#define PREPARE(argc, argv) prepare (argc, argv) +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + + +static char *copy; + +static void +prepare (int argc, char *argv[]) +{ + char *buf; + int off; + asprintf (&buf, "cp %s %n%s-copy", argv[0], &off, argv[0]); + if (buf == NULL) + { + puts ("asprintf failed"); + exit (1); + } + if (system (buf) != 0) + { + puts ("system failed"); + exit (1); + } + + /* Make it not executable. */ + copy = buf + off; + if (chmod (copy, 0666) != 0) + { + puts ("chmod failed"); + exit (1); + } + + add_temp_file (copy); +} + + +static int +do_test (void) +{ + /* Make sure we do not find a binary with the name we are going to + use. */ + char *bindir = strdupa (copy); + bindir = canonicalize_file_name (dirname (bindir)); + if (bindir == NULL) + { + puts ("canonicalize_file_name failed"); + return 1; + } + char *path; + asprintf (&path, "%s:../libio:../elf", bindir); + if (path == NULL) + { + puts ("asprintf failed"); + return 1; + } + + setenv ("PATH", path, 1); + + char *prog = basename (copy); + errno = 0; + execlp (prog, prog, NULL); + + if (errno != EACCES) + { + printf ("errno = %d (%m), expected EACCES\n", errno); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/posix/tst-execv1.c glibc-2.3.5/posix/tst-execv1.c --- glibc-2.3.4/posix/tst-execv1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execv1.c 2005-02-25 17:02:11.000000000 -0800 @@ -0,0 +1,22 @@ +#include +#include +#include + +static int +do_test (void) +{ + char *argv[] = { (char *) "does-not-exist", NULL }; + errno = 0; + execv (argv[0], argv); + + if (errno != ENOENT) + { + printf ("errno = %d (%m), expected ENOENT\n", errno); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/posix/tst-execv2.c glibc-2.3.5/posix/tst-execv2.c --- glibc-2.3.4/posix/tst-execv2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execv2.c 2005-02-25 17:02:11.000000000 -0800 @@ -0,0 +1,60 @@ +#include +#include +#include +#include + + +static void prepare (int argc, char *argv[]); +static int do_test (void); +#define PREPARE(argc, argv) prepare (argc, argv) +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + + +static char *copy; + +static void +prepare (int argc, char *argv[]) +{ + char *buf; + int off; + asprintf (&buf, "cp %s %n%s-copy", argv[0], &off, argv[0]); + if (buf == NULL) + { + puts ("asprintf failed"); + exit (1); + } + if (system (buf) != 0) + { + puts ("system failed"); + exit (1); + } + + /* Make it not executable. */ + copy = buf + off; + if (chmod (copy, 0666) != 0) + { + puts ("chmod failed"); + exit (1); + } + + add_temp_file (copy); +} + + +static int +do_test (void) +{ + char *argv[] = { copy, NULL }; + + errno = 0; + execv (copy, argv); + + if (errno != EACCES) + { + printf ("errno = %d (%m), expected EACCES\n", errno); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/posix/tst-execve1.c glibc-2.3.5/posix/tst-execve1.c --- glibc-2.3.4/posix/tst-execve1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execve1.c 2005-02-25 17:02:11.000000000 -0800 @@ -0,0 +1,23 @@ +#include +#include +#include + +static int +do_test (void) +{ + char *argv[] = { (char *) "does-not-exist", NULL }; + char *envp[] = { (char *) "FOO=BAR", NULL }; + errno = 0; + execve (argv[0], argv, envp); + + if (errno != ENOENT) + { + printf ("errno = %d (%m), expected ENOENT\n", errno); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/posix/tst-execve2.c glibc-2.3.5/posix/tst-execve2.c --- glibc-2.3.4/posix/tst-execve2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execve2.c 2005-02-25 17:02:10.000000000 -0800 @@ -0,0 +1,61 @@ +#include +#include +#include +#include + + +static void prepare (int argc, char *argv[]); +static int do_test (void); +#define PREPARE(argc, argv) prepare (argc, argv) +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + + +static char *copy; + +static void +prepare (int argc, char *argv[]) +{ + char *buf; + int off; + asprintf (&buf, "cp %s %n%s-copy", argv[0], &off, argv[0]); + if (buf == NULL) + { + puts ("asprintf failed"); + exit (1); + } + if (system (buf) != 0) + { + puts ("system failed"); + exit (1); + } + + /* Make it not executable. */ + copy = buf + off; + if (chmod (copy, 0666) != 0) + { + puts ("chmod failed"); + exit (1); + } + + add_temp_file (copy); +} + + +static int +do_test (void) +{ + char *argv[] = { copy, NULL }; + char *envp[] = { (char *) "FOO=BAR", NULL }; + + errno = 0; + execve (copy, argv, envp); + + if (errno != EACCES) + { + printf ("errno = %d (%m), expected EACCES\n", errno); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/posix/tst-execvp1.c glibc-2.3.5/posix/tst-execvp1.c --- glibc-2.3.4/posix/tst-execvp1.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execvp1.c 2005-02-25 17:02:11.000000000 -0800 @@ -0,0 +1,34 @@ +#include +#include +#include +#include + +static int +do_test (void) +{ + char *cwd = get_current_dir_name (); + if (cwd == NULL) + { + puts ("get_current_dir_name failed"); + return 1; + } + + /* Make sure we do not find a binary with the name we are going to + use. */ + setenv ("PATH", cwd, 1); + + char *argv[] = { (char *) "does-not-exist", NULL }; + errno = 0; + execvp (argv[0], argv); + + if (errno != ENOENT) + { + printf ("errno = %d (%m), expected ENOENT\n", errno); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/posix/tst-execvp2.c glibc-2.3.5/posix/tst-execvp2.c --- glibc-2.3.4/posix/tst-execvp2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/posix/tst-execvp2.c 2005-02-25 17:02:11.000000000 -0800 @@ -0,0 +1,82 @@ +#include +#include +#undef basename +#include +#include +#include +#include +#include + + +static void prepare (int argc, char *argv[]); +static int do_test (void); +#define PREPARE(argc, argv) prepare (argc, argv) +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" + + +static char *copy; + +static void +prepare (int argc, char *argv[]) +{ + char *buf; + int off; + asprintf (&buf, "cp %s %n%s-copy", argv[0], &off, argv[0]); + if (buf == NULL) + { + puts ("asprintf failed"); + exit (1); + } + if (system (buf) != 0) + { + puts ("system failed"); + exit (1); + } + + /* Make it not executable. */ + copy = buf + off; + if (chmod (copy, 0666) != 0) + { + puts ("chmod failed"); + exit (1); + } + + add_temp_file (copy); +} + + +static int +do_test (void) +{ + /* Make sure we do not find a binary with the name we are going to + use. */ + char *bindir = strdupa (copy); + bindir = canonicalize_file_name (dirname (bindir)); + if (bindir == NULL) + { + puts ("canonicalize_file_name failed"); + return 1; + } + char *path; + asprintf (&path, "%s:../libio:../elf", bindir); + if (path == NULL) + { + puts ("asprintf failed"); + return 1; + } + + setenv ("PATH", path, 1); + + char *argv[] = { basename (copy), NULL }; + errno = 0; + execvp (argv[0], argv); + + if (errno != EACCES) + { + printf ("errno = %d (%m), expected EACCES\n", errno); + return 1; + } + + return 0; +} diff -rNpu glibc-2.3.4/posix/tst-rxspencer.c glibc-2.3.5/posix/tst-rxspencer.c --- glibc-2.3.4/posix/tst-rxspencer.c 2003-12-22 17:44:46.000000000 -0800 +++ glibc-2.3.5/posix/tst-rxspencer.c 2005-02-16 03:09:24.000000000 -0800 @@ -127,14 +127,15 @@ mb_frob_string (const char *str, const c } /* Like mb_frob_string, but don't replace anything between - [: and :], [. and .] or [= and =]. */ + [: and :], [. and .] or [= and =] or characters escaped + with a backslash. */ static char * mb_frob_pattern (const char *str, const char *letters) { char *ret, *dst; const char *src; - int in_class = 0; + int in_class = 0, escaped = 0; if (str == NULL) return NULL; @@ -144,7 +145,18 @@ mb_frob_pattern (const char *str, const return NULL; for (src = str, dst = ret; *src; ++src) - if (!in_class && strchr (letters, *src)) + if (*src == '\\') + { + escaped ^= 1; + *dst++ = *src; + } + else if (escaped) + { + escaped = 0; + *dst++ = *src; + continue; + } + else if (!in_class && strchr (letters, *src)) dst = mb_replace (dst, *src); else { diff -rNpu glibc-2.3.4/posix/unistd.h glibc-2.3.5/posix/unistd.h --- glibc-2.3.4/posix/unistd.h 2004-09-17 01:22:17.000000000 -0700 +++ glibc-2.3.5/posix/unistd.h 2005-02-25 16:59:08.000000000 -0800 @@ -728,7 +728,7 @@ extern int ttyslot (void) __THROW; extern int link (__const char *__from, __const char *__to) __THROW __nonnull ((1, 2)); -#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K /* Make a symbolic link to FROM named TO. */ extern int symlink (__const char *__from, __const char *__to) __THROW __nonnull ((1, 2)); @@ -884,6 +884,11 @@ extern void sync (void) __THROW; extern int getpagesize (void) __THROW __attribute__ ((__const__)); +/* Return the maximum number of file descriptors + the current process could possibly have. */ +extern int getdtablesize (void) __THROW; + + /* Truncate FILE to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 extern int truncate (__const char *__file, __off_t __length) @@ -902,6 +907,10 @@ extern int truncate64 (__const char *__f __THROW __nonnull ((1)); # endif +#endif /* Use BSD || X/Open Unix. */ + +#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K + /* Truncate the file FD is open on to LENGTH bytes. */ # ifndef __USE_FILE_OFFSET64 extern int ftruncate (int __fd, __off_t __length) __THROW; @@ -917,12 +926,7 @@ extern int __REDIRECT_NTH (ftruncate, (i extern int ftruncate64 (int __fd, __off64_t __length) __THROW; # endif - -/* Return the maximum number of file descriptors - the current process could possibly have. */ -extern int getdtablesize (void) __THROW; - -#endif /* Use BSD || X/Open Unix. */ +#endif /* Use BSD || X/Open Unix || POSIX 2003. */ #if defined __USE_MISC || defined __USE_XOPEN_EXTENDED diff -rNpu glibc-2.3.4/README glibc-2.3.5/README --- glibc-2.3.4/README 2004-12-19 01:41:20.000000000 -0800 +++ glibc-2.3.5/README 2005-04-05 19:59:17.000000000 -0700 @@ -1,7 +1,10 @@ -This directory contains the version 2.3.4 release of the GNU C Library. +This directory contains the version 2.3.5 release of the GNU C Library. Many bugs have been fixed since the last release. Some bugs surely remain. +Please note that version 2.3.5 cannot be built with GCC 4! +The next release will be compatible with the newer compiler. + As of this release, the GNU C library is known to run on the following configurations: diff -rNpu glibc-2.3.4/README.template glibc-2.3.5/README.template --- glibc-2.3.4/README.template 2004-12-19 01:41:20.000000000 -0800 +++ glibc-2.3.5/README.template 2005-04-05 19:59:17.000000000 -0700 @@ -2,6 +2,9 @@ This directory contains the version VERS Many bugs have been fixed since the last release. Some bugs surely remain. +Please note that version VERSION cannot be built with GCC 4! +The next release will be compatible with the newer compiler. + As of this release, the GNU C library is known to run on the following configurations: diff -rNpu glibc-2.3.4/stdio-common/Makefile glibc-2.3.5/stdio-common/Makefile --- glibc-2.3.4/stdio-common/Makefile 2004-08-10 11:01:29.000000000 -0700 +++ glibc-2.3.5/stdio-common/Makefile 2005-02-16 01:45:11.000000000 -0800 @@ -53,7 +53,7 @@ tests := tstscanf test_rdwr test-popen t scanf11 scanf12 tst-tmpnam tst-cookie tst-obprintf tst-sscanf \ tst-swprintf tst-fseek tst-fmemopen test-vfprintf tst-gets \ tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15 \ - tst-popen tst-unlockedio + tst-popen tst-unlockedio tst-fmemopen2 test-srcs = tst-unbputc tst-printf diff -rNpu glibc-2.3.4/stdio-common/tst-fmemopen2.c glibc-2.3.5/stdio-common/tst-fmemopen2.c --- glibc-2.3.4/stdio-common/tst-fmemopen2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/stdio-common/tst-fmemopen2.c 2005-02-16 01:45:15.000000000 -0800 @@ -0,0 +1,68 @@ +#include +#include +#include +#include + + +static int +do_test (void) +{ + int result = 0; + char buf[100]; + FILE *fp = fmemopen (buf, sizeof (buf), "w"); + if (fp == NULL) + { + puts ("fmemopen failed"); + return 0; + } + static const char str[] = "hello world"; +#define nstr (sizeof (str) - 1) + fputs (str, fp); + off_t o = ftello (fp); + if (o != nstr) + { + printf ("first ftello returned %ld, expected %zu\n", o, nstr); + result = 1; + } + rewind (fp); + o = ftello (fp); + if (o != 0) + { + printf ("second ftello returned %ld, expected %zu\n", o, 0); + result = 1; + } + if (fseeko (fp, 0, SEEK_END) != 0) + { + puts ("fseeko failed"); + return 1; + } + o = ftello (fp); + if (o != nstr) + { + printf ("third ftello returned %ld, expected %zu\n", o, nstr); + result = 1; + } + rewind (fp); + static const char str2[] = "just hello"; +#define nstr2 (sizeof (str2) - 1) + assert (nstr2 < nstr); + fputs (str2, fp); + o = ftello (fp); + if (o != nstr2) + { + printf ("fourth ftello returned %ld, expected %zu\n", o, nstr2); + result = 1; + } + fclose (fp); + static const char str3[] = "just hellod"; + if (strcmp (buf, str3) != 0) + { + printf ("final string is \"%s\", expected \"%s\"\n", + buf, str3); + result = 1; + } + return result; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/stdlib/fmtmsg.c glibc-2.3.5/stdlib/fmtmsg.c --- glibc-2.3.4/stdlib/fmtmsg.c 2003-09-01 22:19:49.000000000 -0700 +++ glibc-2.3.5/stdlib/fmtmsg.c 2005-02-16 02:37:10.000000000 -0800 @@ -316,7 +316,7 @@ internal_addseverity (int severity, cons int result = MM_OK; /* First see if there is already a record for the severity level. */ - for (runp = severity_list, lastp = NULL; runp != NULL; runp = runp-> next) + for (runp = severity_list, lastp = NULL; runp != NULL; runp = runp->next) if (runp->severity == severity) break; else @@ -324,9 +324,6 @@ internal_addseverity (int severity, cons if (runp != NULL) { - /* Release old string. */ - free ((char *) runp->string); - if (string != NULL) /* Change the string. */ runp->string = string; @@ -367,34 +364,17 @@ int addseverity (int severity, const char *string) { int result; - const char *new_string; /* Prevent illegal SEVERITY values. */ if (severity <= MM_INFO) return MM_NOTOK; - if (string == NULL) - /* We want to remove the severity class. */ - new_string = NULL; - else - { - new_string = __strdup (string); - - if (new_string == NULL) - /* Allocation failed or illegal value. */ - return MM_NOTOK; - } - /* Protect the global data. */ __libc_lock_lock (lock); /* Do the real work. */ result = internal_addseverity (severity, string); - if (result != MM_OK) - /* Free the allocated string. */ - free ((char *) new_string); - /* Release the lock. */ __libc_lock_unlock (lock); @@ -411,7 +391,6 @@ libc_freeres_fn (free_mem) { /* This is data we have to release. */ struct severity_info *here = runp; - free ((char *) runp->string); runp = runp->next; free (here); } diff -rNpu glibc-2.3.4/stdlib/Makefile glibc-2.3.5/stdlib/Makefile --- glibc-2.3.4/stdlib/Makefile 2004-02-23 15:28:27.000000000 -0800 +++ glibc-2.3.5/stdlib/Makefile 2005-02-16 03:23:58.000000000 -0800 @@ -61,10 +61,15 @@ distribute := exit.h grouping.h abort-in test-srcs := tst-fmtmsg tests := tst-strtol tst-strtod testmb testrand testsort testdiv \ test-canon test-canon2 tst-strtoll tst-environ \ - tst-xpg-basename tst-random tst-bsearch tst-limits \ - tst-rand48 bug-strtod tst-setcontext test-a64l tst-qsort \ - tst-system testmb2 + tst-xpg-basename tst-random tst-random2 tst-bsearch \ + tst-limits tst-rand48 bug-strtod tst-setcontext \ + test-a64l tst-qsort tst-system testmb2 +include ../Makeconfig + +ifeq ($(build-shared),yes) +tests += tst-putenv +endif # Several mpn functions from GNU MP are used by the strtod function. mpn-routines := inlines add_n addmul_1 cmp divmod_1 divrem udiv_qrnnd \ @@ -75,18 +80,21 @@ routines := $(strip $(routines) $(mpn-ro dbl2mpn ldbl2mpn \ mpn2flt mpn2dbl mpn2ldbl aux += fpioconst mp_clz_tab -distribute := $(distribute) $(mpn-headers) gen-mpn-copy fpioconst.h +distribute := $(distribute) $(mpn-headers) gen-mpn-copy fpioconst.h \ + tst-putenvmod.c + +tests-extras += tst-putenvmod +extra-objs += tst-putenvmod.os -generated += isomac isomac.out +generated += isomac isomac.out tst-putenvmod.so CFLAGS-bsearch.c = $(uses-callbacks) CFLAGS-msort.c = $(uses-callbacks) CFLAGS-qsort.c = $(uses-callbacks) CFLAGS-system.c = -fexceptions +CFLAGS-system.os = -fomit-frame-pointer CFLAGS-fmtmsg.c = -fexceptions -include ../Makeconfig - ifneq (,$(filter %REENTRANT, $(defines))) CFLAGS-strfmon.c = -D_IO_MTSAFE_IO CFLAGS-strfmon_l.c = -D_IO_MTSAFE_IO @@ -124,3 +132,9 @@ $(objpfx)isomac: isomac.c $(objpfx)tst-fmtmsg.out: tst-fmtmsg.sh $(objpfx)tst-fmtmsg $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)stdlib/ + +$(objpfx)tst-putenv: $(objpfx)tst-putenvmod.so + +$(objpfx)tst-putenvmod.so: $(objpfx)tst-putenvmod.os + $(build-module) +CFLAGS-tst-putenvmod.c = -DNOT_IN_libc=1 diff -rNpu glibc-2.3.4/stdlib/random_r.c glibc-2.3.5/stdlib/random_r.c --- glibc-2.3.4/stdlib/random_r.c 2002-07-05 23:35:55.000000000 -0700 +++ glibc-2.3.5/stdlib/random_r.c 2005-02-16 03:23:58.000000000 -0800 @@ -240,10 +240,19 @@ __initstate_r (seed, arg_state, n, buf) int degree; int separation; int32_t *state; + int old_type; + int32_t *old_state; if (buf == NULL) goto fail; + old_type = buf->rand_type; + old_state = buf->state; + if (old_type == TYPE_0) + old_state[-1] = TYPE_0; + else + old_state[-1] = (MAX_TYPES * (buf->rptr - old_state)) + old_type; + if (n >= BREAK_3) type = n < BREAK_4 ? TYPE_3 : TYPE_4; else if (n < BREAK_1) diff -rNpu glibc-2.3.4/stdlib/tst-fmtmsg.c glibc-2.3.5/stdlib/tst-fmtmsg.c --- glibc-2.3.4/stdlib/tst-fmtmsg.c 2000-10-27 16:34:37.000000000 -0700 +++ glibc-2.3.5/stdlib/tst-fmtmsg.c 2005-02-16 02:37:06.000000000 -0800 @@ -1,6 +1,8 @@ #include #include #include +#include +#include #define MM_TEST 10 @@ -12,11 +14,13 @@ main (void) mtrace (); - if (addseverity (MM_TEST, "TEST") != MM_OK) + char TEST[] = "ABCD"; + if (addseverity (MM_TEST, TEST) != MM_OK) { puts ("addseverity failed"); result = 1; } + strcpy (TEST, "TEST"); if (fmtmsg (MM_PRINT, "GLIBC:tst-fmtmsg", MM_HALT, "halt", "should print message for MM_HALT", "GLIBC:tst-fmtmsg:1") @@ -48,5 +52,31 @@ main (void) != MM_OK) result = 1; + if (addseverity (MM_TEST, NULL) != MM_OK) + { + puts ("second addseverity failed"); + result = 1; + } + + if (addseverity (MM_TEST, NULL) != MM_NOTOK) + { + puts ("third addseverity unexpectedly succeeded"); + result = 1; + } + + char *p = strdup ("TEST2"); + if (addseverity (MM_TEST, p) != MM_OK) + { + puts ("fourth addseverity failed"); + result = 1; + } + if (addseverity (MM_TEST, "TEST3") != MM_OK) + { + puts ("fifth addseverity failed"); + result = 1; + } + + free (p); + return result; } diff -rNpu glibc-2.3.4/stdlib/tst-putenv.c glibc-2.3.5/stdlib/tst-putenv.c --- glibc-2.3.4/stdlib/tst-putenv.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/stdlib/tst-putenv.c 2005-02-16 01:40:56.000000000 -0800 @@ -0,0 +1,18 @@ +#include +#include + +static int +do_test (void) +{ + char *p = getenv ("SOMETHING_NOBODY_USES"); + if (p == NULL) + { + puts ("envvar not defined"); + return 1; + } + + return 0; +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff -rNpu glibc-2.3.4/stdlib/tst-putenvmod.c glibc-2.3.5/stdlib/tst-putenvmod.c --- glibc-2.3.4/stdlib/tst-putenvmod.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/stdlib/tst-putenvmod.c 2005-02-16 01:40:56.000000000 -0800 @@ -0,0 +1,17 @@ +#include +#include +#include + +void +__attribute ((constructor)) +init (void) +{ + puts ("init DSO"); + + static char str[] = "SOMETHING_NOBODY_USES=something_else"; + if (putenv (str) != 0) + { + puts ("putenv failed"); + _exit (1); + } +} diff -rNpu glibc-2.3.4/stdlib/tst-random2.c glibc-2.3.5/stdlib/tst-random2.c --- glibc-2.3.4/stdlib/tst-random2.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/stdlib/tst-random2.c 2005-02-16 03:23:58.000000000 -0800 @@ -0,0 +1,59 @@ +/* Test initstate saving the old state. + Copyright (C) 2005 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek , 2005. + + 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 +main (void) +{ + int pass; + int ret = 0; + long int r[2]; + + for (pass = 0; pass < 2; pass++) + { + srandom (0x12344321); + + int j; + for (j = 0; j < 3; ++j) + random (); + if (pass == 1) + { + char state[128]; + char *ostate = initstate (0x34562101, state, 128); + if (setstate (ostate) != state) + { + puts ("setstate (ostate) != state"); + ret = 1; + } + } + + random (); + r[pass] = random (); + } + + if (r[0] != r[1]) + { + printf ("%ld != %ld\n", r[0], r[1]); + ret = 1; + } + return ret; +} diff -rNpu glibc-2.3.4/sunrpc/openchild.c glibc-2.3.5/sunrpc/openchild.c --- glibc-2.3.4/sunrpc/openchild.c 2002-02-25 17:43:56.000000000 -0800 +++ glibc-2.3.5/sunrpc/openchild.c 2005-02-16 02:52:52.000000000 -0800 @@ -81,7 +81,7 @@ _openchild (const char *command, FILE ** for (i = _rpc_dtablesize () - 1; i >= 3; i--) __close (i); fflush (stderr); - execlp (command, command, 0); + execlp (command, command, NULL); perror ("exec"); _exit (~0); diff -rNpu glibc-2.3.4/sunrpc/svc_tcp.c glibc-2.3.5/sunrpc/svc_tcp.c --- glibc-2.3.4/sunrpc/svc_tcp.c 2002-08-05 21:29:36.000000000 -0700 +++ glibc-2.3.5/sunrpc/svc_tcp.c 2005-02-16 02:26:08.000000000 -0800 @@ -165,7 +165,7 @@ svctcp_create (int sock, u_int sendsize, (void) __bind (sock, (struct sockaddr *) &addr, len); } if ((__getsockname (sock, (struct sockaddr *) &addr, &len) != 0) || - (__listen (sock, 2) != 0)) + (__listen (sock, SOMAXCONN) != 0)) { perror (_("svc_tcp.c - cannot getsockname or listen")); if (madesock) diff -rNpu glibc-2.3.4/sunrpc/svc_unix.c glibc-2.3.5/sunrpc/svc_unix.c --- glibc-2.3.4/sunrpc/svc_unix.c 2002-05-14 17:21:01.000000000 -0700 +++ glibc-2.3.5/sunrpc/svc_unix.c 2005-02-16 02:26:09.000000000 -0800 @@ -161,7 +161,7 @@ svcunix_create (int sock, u_int sendsize __bind (sock, (struct sockaddr *) &addr, len); if (__getsockname (sock, (struct sockaddr *) &addr, &len) != 0 - || __listen (sock, 2) != 0) + || __listen (sock, SOMAXCONN) != 0) { perror (_("svc_unix.c - cannot getsockname or listen")); if (madesock) diff -rNpu glibc-2.3.4/sysdeps/generic/dl-tls.c glibc-2.3.5/sysdeps/generic/dl-tls.c --- glibc-2.3.4/sysdeps/generic/dl-tls.c 2004-11-23 14:56:26.000000000 -0800 +++ glibc-2.3.5/sysdeps/generic/dl-tls.c 2005-02-16 02:23:02.000000000 -0800 @@ -65,7 +65,10 @@ _dl_next_tls_modid (void) /* Note that this branch will never be executed during program start since there are no gaps at that time. Therefore it does not matter that the dl_tls_dtv_slotinfo is not allocated - yet when the function is called for the first times. */ + yet when the function is called for the first times. + + NB: the offset +1 is due to the fact that DTV[0] is used + for something else. */ result = GL(dl_tls_static_nelem) + 1; /* If the following would not be true we mustn't have assumed there is a gap. */ @@ -88,11 +91,11 @@ _dl_next_tls_modid (void) } while ((runp = runp->next) != NULL); - if (result >= GL(dl_tls_max_dtv_idx)) + if (result > GL(dl_tls_max_dtv_idx)) { /* The new index must indeed be exactly one higher than the previous high. */ - assert (result == GL(dl_tls_max_dtv_idx)); + assert (result == GL(dl_tls_max_dtv_idx) + 1); /* There is no gap anymore. */ GL(dl_tls_dtv_gaps) = false; @@ -577,7 +580,7 @@ __tls_get_addr (GET_ADDR_ARGS) { size_t cnt; - for (cnt = total = 0 ? 1 : 0; cnt < listp->len; ++cnt) + for (cnt = total == 0 ? 1 : 0; cnt < listp->len; ++cnt) { size_t gen = listp->slotinfo[cnt].gen; struct link_map *map; diff -rNpu glibc-2.3.4/sysdeps/generic/ldsodefs.h glibc-2.3.5/sysdeps/generic/ldsodefs.h --- glibc-2.3.4/sysdeps/generic/ldsodefs.h 2004-11-05 16:24:46.000000000 -0800 +++ glibc-2.3.5/sysdeps/generic/ldsodefs.h 2005-04-05 19:50:21.000000000 -0700 @@ -783,6 +783,11 @@ extern void _dl_init (struct link_map *m initializer functions have completed. */ extern void _dl_fini (void) internal_function; +/* Sort array MAPS according to dependencies of the contained objects. */ +extern void _dl_sort_fini (struct link_map *l, struct link_map **maps, + size_t nmaps, char *used, Lmid_t ns) + internal_function; + /* The dynamic linker calls this function before and having changing any shared object mappings. The `r_state' member of `struct r_debug' says what change is taking place. This function's address is diff -rNpu glibc-2.3.4/sysdeps/generic/libc-start.c glibc-2.3.5/sysdeps/generic/libc-start.c --- glibc-2.3.4/sysdeps/generic/libc-start.c 2004-03-30 17:46:43.000000000 -0800 +++ glibc-2.3.5/sysdeps/generic/libc-start.c 2005-02-16 01:40:56.000000000 -0800 @@ -106,9 +106,9 @@ LIBC_START_MAIN (int (*main) (int, char __libc_multiple_libcs = &_dl_starting_up && !_dl_starting_up; +#ifndef SHARED INIT_ARGV_and_ENVIRON; -#ifndef SHARED /* Store the lowest stack address. This is done in ld.so if this is the code for the DSO. */ __libc_stack_end = stack_end; diff -rNpu glibc-2.3.4/sysdeps/generic/libc-tls.c glibc-2.3.5/sysdeps/generic/libc-tls.c --- glibc-2.3.4/sysdeps/generic/libc-tls.c 2003-01-12 00:52:47.000000000 -0800 +++ glibc-2.3.5/sysdeps/generic/libc-tls.c 2005-02-25 17:09:44.000000000 -0800 @@ -34,8 +34,7 @@ extern ElfW(Phdr) *_dl_phdr; extern size_t _dl_phnum; -/* DTV with just one element plus overhead. */ -static dtv_t static_dtv[3]; +static dtv_t static_dtv[2 + TLS_SLOTINFO_SURPLUS]; static struct @@ -173,7 +172,7 @@ __libc_setup_tls (size_t tcbsize, size_t & ~(max_align - 1)); /* Initialize the dtv. [0] is the length, [1] the generation counter. */ - static_dtv[0].counter = 1; + static_dtv[0].counter = (sizeof (static_dtv) / sizeof (static_dtv[0])) - 2; // static_dtv[1].counter = 0; would be needed if not already done /* Initialize the TLS block. */ diff -rNpu glibc-2.3.4/sysdeps/generic/syslog.c glibc-2.3.5/sysdeps/generic/syslog.c --- glibc-2.3.4/sysdeps/generic/syslog.c 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/sysdeps/generic/syslog.c 2005-02-16 03:00:08.000000000 -0800 @@ -0,0 +1,429 @@ +/* + * Copyright (c) 1983, 1988, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)syslog.c 8.4 (Berkeley) 3/18/94"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#if __STDC__ +#include +#else +#include +#endif + +#include +#define ftell(s) INTUSE(_IO_ftell) (s) + +static int LogType = SOCK_DGRAM; /* type of socket connection */ +static int LogFile = -1; /* fd for log */ +static int connected; /* have done connect */ +static int LogStat; /* status bits, set by openlog() */ +static const char *LogTag; /* string to tag the entry with */ +static int LogFacility = LOG_USER; /* default facility code */ +static int LogMask = 0xff; /* mask of priorities to be logged */ +extern char *__progname; /* Program name, from crt0. */ + +/* Define the lock. */ +__libc_lock_define_initialized (static, syslog_lock) + +static void openlog_internal(const char *, int, int) internal_function; +static void closelog_internal(void); +#ifndef NO_SIGPIPE +static void sigpipe_handler (int); +#endif + +#ifndef send_flags +# define send_flags 0 +#endif + +struct cleanup_arg +{ + void *buf; + struct sigaction *oldaction; +}; + +static void +cancel_handler (void *ptr) +{ +#ifndef NO_SIGPIPE + /* Restore the old signal handler. */ + struct cleanup_arg *clarg = (struct cleanup_arg *) ptr; + + if (clarg != NULL && clarg->oldaction != NULL) + __sigaction (SIGPIPE, clarg->oldaction, NULL); +#endif + + /* Free the lock. */ + __libc_lock_unlock (syslog_lock); +} + + +/* + * syslog, vsyslog -- + * print message on log file; output is intended for syslogd(8). + */ +void +#if __STDC__ +syslog(int pri, const char *fmt, ...) +#else +syslog(pri, fmt, va_alist) + int pri; + char *fmt; + va_dcl +#endif +{ + va_list ap; + +#if __STDC__ + va_start(ap, fmt); +#else + va_start(ap); +#endif + vsyslog(pri, fmt, ap); + va_end(ap); +} +libc_hidden_def (syslog) + +void +vsyslog(pri, fmt, ap) + int pri; + register const char *fmt; + va_list ap; +{ + struct tm now_tm; + time_t now; + int fd; + FILE *f; + char *buf = 0; + size_t bufsize = 0; + size_t prioff, msgoff; +#ifndef NO_SIGPIPE + struct sigaction action, oldaction; + int sigpipe; +#endif + int saved_errno = errno; + char failbuf[3 * sizeof (pid_t) + sizeof "out of memory []"]; + +#define INTERNALLOG LOG_ERR|LOG_CONS|LOG_PERROR|LOG_PID + /* Check for invalid bits. */ + if (pri & ~(LOG_PRIMASK|LOG_FACMASK)) { + syslog(INTERNALLOG, + "syslog: unknown facility/priority: %x", pri); + pri &= LOG_PRIMASK|LOG_FACMASK; + } + + /* Check priority against setlogmask values. */ + if ((LOG_MASK (LOG_PRI (pri)) & LogMask) == 0) + return; + + /* Set default facility if none specified. */ + if ((pri & LOG_FACMASK) == 0) + pri |= LogFacility; + + /* Build the message in a memory-buffer stream. */ + f = open_memstream (&buf, &bufsize); + if (f == NULL) + { + /* We cannot get a stream. There is not much we can do but + emitting an error messages. */ + char numbuf[3 * sizeof (pid_t)]; + char *nump; + char *endp = __stpcpy (failbuf, "out of memory ["); + pid_t pid = __getpid (); + + nump = numbuf + sizeof (numbuf); + /* The PID can never be zero. */ + do + *--nump = '0' + pid % 10; + while ((pid /= 10) != 0); + + endp = __mempcpy (endp, nump, (numbuf + sizeof (numbuf)) - nump); + *endp++ = ']'; + *endp = '\0'; + buf = failbuf; + bufsize = endp - failbuf; + msgoff = 0; + } + else + { + __fsetlocking (f, FSETLOCKING_BYCALLER); + prioff = fprintf (f, "<%d>", pri); + (void) time (&now); + f->_IO_write_ptr += __strftime_l (f->_IO_write_ptr, + f->_IO_write_end + - f->_IO_write_ptr, + "%h %e %T ", + __localtime_r (&now, &now_tm), + &_nl_C_locobj); + msgoff = ftell (f); + if (LogTag == NULL) + LogTag = __progname; + if (LogTag != NULL) + fputs_unlocked (LogTag, f); + if (LogStat & LOG_PID) + fprintf (f, "[%d]", (int) __getpid ()); + if (LogTag != NULL) + { + putc_unlocked (':', f); + putc_unlocked (' ', f); + } + + /* Restore errno for %m format. */ + __set_errno (saved_errno); + + /* We have the header. Print the user's format into the + buffer. */ + vfprintf (f, fmt, ap); + + /* Close the memory stream; this will finalize the data + into a malloc'd buffer in BUF. */ + fclose (f); + } + + /* Output to stderr if requested. */ + if (LogStat & LOG_PERROR) { + struct iovec iov[2]; + register struct iovec *v = iov; + + v->iov_base = buf + msgoff; + v->iov_len = bufsize - msgoff; + /* Append a newline if necessary. */ + if (buf[bufsize - 1] != '\n') + { + ++v; + v->iov_base = (char *) "\n"; + v->iov_len = 1; + } + + __libc_cleanup_push (free, buf == failbuf ? NULL : buf); + + /* writev is a cancellation point. */ + (void)__writev(STDERR_FILENO, iov, v - iov + 1); + + __libc_cleanup_pop (0); + } + + /* Prepare for multiple users. We have to take care: open and + write are cancellation points. */ + struct cleanup_arg clarg; + clarg.buf = buf; + clarg.oldaction = NULL; + __libc_cleanup_push (cancel_handler, &clarg); + __libc_lock_lock (syslog_lock); + +#ifndef NO_SIGPIPE + /* Prepare for a broken connection. */ + memset (&action, 0, sizeof (action)); + action.sa_handler = sigpipe_handler; + sigemptyset (&action.sa_mask); + sigpipe = __sigaction (SIGPIPE, &action, &oldaction); + if (sigpipe == 0) + clarg.oldaction = &oldaction; +#endif + + /* Get connected, output the message to the local logger. */ + if (!connected) + openlog_internal(LogTag, LogStat | LOG_NDELAY, 0); + + /* If we have a SOCK_STREAM connection, also send ASCII NUL as + a record terminator. */ + if (LogType == SOCK_STREAM) + ++bufsize; + + if (!connected || __send(LogFile, buf, bufsize, send_flags) < 0) + { + if (connected) + { + /* Try to reopen the syslog connection. Maybe it went + down. */ + closelog_internal (); + openlog_internal(LogTag, LogStat | LOG_NDELAY, 0); + } + + if (!connected || __send(LogFile, buf, bufsize, send_flags) < 0) + { + closelog_internal (); /* attempt re-open next time */ + /* + * Output the message to the console; don't worry + * about blocking, if console blocks everything will. + * Make sure the error reported is the one from the + * syslogd failure. + */ + if (LogStat & LOG_CONS && + (fd = __open(_PATH_CONSOLE, O_WRONLY|O_NOCTTY, 0)) >= 0) + { + dprintf (fd, "%s\r\n", buf + msgoff); + (void)__close(fd); + } + } + } + +#ifndef NO_SIGPIPE + if (sigpipe == 0) + __sigaction (SIGPIPE, &oldaction, (struct sigaction *) NULL); +#endif + + /* End of critical section. */ + __libc_cleanup_pop (0); + __libc_lock_unlock (syslog_lock); + + if (buf != failbuf) + free (buf); +} +libc_hidden_def (vsyslog) + +static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */ + + +static void +internal_function +openlog_internal(const char *ident, int logstat, int logfac) +{ + if (ident != NULL) + LogTag = ident; + LogStat = logstat; + if (logfac != 0 && (logfac &~ LOG_FACMASK) == 0) + LogFacility = logfac; + + int retry = 0; + while (retry < 2) { + if (LogFile == -1) { + SyslogAddr.sa_family = AF_UNIX; + (void)strncpy(SyslogAddr.sa_data, _PATH_LOG, + sizeof(SyslogAddr.sa_data)); + if (LogStat & LOG_NDELAY) { + if ((LogFile = __socket(AF_UNIX, LogType, 0)) + == -1) + return; + (void)__fcntl(LogFile, F_SETFD, 1); + } + } + if (LogFile != -1 && !connected) + { + int old_errno = errno; + if (__connect(LogFile, &SyslogAddr, sizeof(SyslogAddr)) + == -1) + { + int saved_errno = errno; + int fd = LogFile; + LogFile = -1; + (void)__close(fd); + __set_errno (old_errno); + if (saved_errno == EPROTOTYPE) + { + /* retry with the other type: */ + LogType = (LogType == SOCK_DGRAM + ? SOCK_STREAM : SOCK_DGRAM); + ++retry; + continue; + } + } else + connected = 1; + } + break; + } +} + +void +openlog (const char *ident, int logstat, int logfac) +{ + /* Protect against multiple users and cancellation. */ + __libc_cleanup_push (cancel_handler, NULL); + __libc_lock_lock (syslog_lock); + + openlog_internal (ident, logstat, logfac); + + __libc_cleanup_pop (1); +} + +#ifndef NO_SIGPIPE +static void +sigpipe_handler (int signo) +{ + closelog_internal (); +} +#endif + +static void +closelog_internal() +{ + if (!connected) + return; + + __close (LogFile); + LogFile = -1; + connected = 0; +} + +void +closelog () +{ + /* Protect against multiple users and cancellation. */ + __libc_cleanup_push (cancel_handler, NULL); + __libc_lock_lock (syslog_lock); + + closelog_internal (); + LogTag = NULL; + LogType = SOCK_DGRAM; /* this is the default */ + + /* Free the lock. */ + __libc_cleanup_pop (1); +} + +/* setlogmask -- set the log mask level */ +int +setlogmask(pmask) + int pmask; +{ + int omask; + + omask = LogMask; + if (pmask != 0) + LogMask = pmask; + return (omask); +} diff -rNpu glibc-2.3.4/sysdeps/generic/wordexp.c glibc-2.3.5/sysdeps/generic/wordexp.c --- glibc-2.3.4/sysdeps/generic/wordexp.c 2003-09-17 19:53:11.000000000 -0700 +++ glibc-2.3.5/sysdeps/generic/wordexp.c 2005-02-16 02:56:31.000000000 -0800 @@ -810,7 +810,7 @@ parse_arith (char **word, size_t *word_l /* Function called by child process in exec_comm() */ static void -internal_function +internal_function __attribute__ ((always_inline)) exec_comm_child (char *comm, int *fildes, int showerr, int noexec) { const char *args[4] = { _PATH_BSHELL, "-c", comm, NULL }; @@ -868,13 +868,14 @@ exec_comm (char *comm, char **word, size const char *ifs_white) { int fildes[2]; - int bufsize = 128; +#define bufsize 128 int buflen; int i; int status = 0; size_t maxnewlines = 0; - char *buffer; + char buffer[bufsize]; pid_t pid; + int noexec = 0; /* Don't fork() unless necessary */ if (!comm || !*comm) @@ -884,32 +885,42 @@ exec_comm (char *comm, char **word, size /* Bad */ return WRDE_NOSPACE; + again: if ((pid = __fork ()) < 0) { /* Bad */ - __close (fildes[0]); - __close (fildes[1]); + if (fildes[0] != -1) + __close (fildes[0]); + if (fildes[1] != -1) + __close (fildes[1]); return WRDE_NOSPACE; } if (pid == 0) - exec_comm_child (comm, fildes, flags & WRDE_SHOWERR, 0); + exec_comm_child (comm, fildes, noexec ? 0 : flags & WRDE_SHOWERR, noexec); /* Parent */ + /* If we are just testing the syntax, only wait. */ + if (noexec) + return (TEMP_FAILURE_RETRY (__waitpid (pid, &status, 0)) == pid + && status != 0) ? WRDE_SYNTAX : 0; + __close (fildes[1]); - buffer = __alloca (bufsize); + fildes[1] = -1; if (!pwordexp) /* Quoted - no field splitting */ { while (1) { - if ((buflen = __read (fildes[0], buffer, bufsize)) < 1) + if ((buflen = TEMP_FAILURE_RETRY (__read (fildes[0], buffer, + bufsize))) < 1) { - if (__waitpid (pid, &status, WNOHANG) == 0) + if (TEMP_FAILURE_RETRY (__waitpid (pid, &status, WNOHANG)) == 0) continue; - if ((buflen = __read (fildes[0], buffer, bufsize)) < 1) + if ((buflen = TEMP_FAILURE_RETRY (__read (fildes[0], buffer, + bufsize))) < 1) break; } @@ -933,11 +944,13 @@ exec_comm (char *comm, char **word, size while (1) { - if ((buflen = __read (fildes[0], buffer, bufsize)) < 1) + if ((buflen = TEMP_FAILURE_RETRY (__read (fildes[0], buffer, + bufsize))) < 1) { - if (__waitpid (pid, &status, WNOHANG) == 0) + if (TEMP_FAILURE_RETRY (__waitpid (pid, &status, WNOHANG)) == 0) continue; - if ((buflen = __read (fildes[0], buffer, bufsize)) < 1) + if ((buflen = TEMP_FAILURE_RETRY (__read (fildes[0], buffer, + bufsize))) < 1) break; } @@ -1053,31 +1066,20 @@ exec_comm (char *comm, char **word, size } __close (fildes[0]); + fildes[0] = -1; /* Check for syntax error (re-execute but with "-n" flag) */ if (buflen < 1 && status != 0) { - if ((pid = __fork ()) < 0) - { - /* Bad */ - return WRDE_NOSPACE; - } - - if (pid == 0) - { - fildes[0] = fildes[1] = -1; - exec_comm_child (comm, fildes, 0, 1); - } - - if (__waitpid (pid, &status, 0) == pid && status != 0) - return WRDE_SYNTAX; + noexec = 1; + goto again; } return 0; no_space: __kill (pid, SIGKILL); - __waitpid (pid, NULL, 0); + TEMP_FAILURE_RETRY (__waitpid (pid, NULL, 0)); __close (fildes[0]); return WRDE_NOSPACE; } diff -rNpu glibc-2.3.4/sysdeps/i386/dl-machine.h glibc-2.3.5/sysdeps/i386/dl-machine.h --- glibc-2.3.4/sysdeps/i386/dl-machine.h 2004-09-27 21:54:41.000000000 -0700 +++ glibc-2.3.5/sysdeps/i386/dl-machine.h 2005-02-16 02:58:03.000000000 -0800 @@ -308,11 +308,21 @@ _dl_start_user:\n\ movl _rtld_local@GOTOFF(%ebx), %eax\n\ leal 8(%esp,%edx,4), %esi\n\ leal 4(%esp), %ecx\n\ + movl %esp, %ebp\n\ + # Make sure _dl_init is run with 16 byte aligned stack.\n\ + andl $-16, %esp\n\ + pushl %eax\n\ + pushl %eax\n\ + pushl %ebp\n\ pushl %esi\n\ + # Clear %ebp, so that even constructors have terminated backchain.\n\ + xorl %ebp, %ebp\n\ # Call the function to run the initializers.\n\ call _dl_init_internal@PLT\n\ # Pass our finalizer function to the user in %edx, as per ELF ABI.\n\ leal _dl_fini@GOTOFF(%ebx), %edx\n\ + # Restore %esp _start expects.\n\ + movl (%esp), %esp\n\ # Jump to the user's entry point.\n\ jmp *%edi\n\ .previous\n\ diff -rNpu glibc-2.3.4/sysdeps/i386/Makefile glibc-2.3.5/sysdeps/i386/Makefile --- glibc-2.3.4/sysdeps/i386/Makefile 2004-10-22 14:06:19.000000000 -0700 +++ glibc-2.3.5/sysdeps/i386/Makefile 2005-02-16 03:07:19.000000000 -0800 @@ -61,3 +61,7 @@ CFLAGS-dlopenold.c += -mpreferred-stack- CFLAGS-dlclose.c += -mpreferred-stack-boundary=4 CFLAGS-dlerror.c += -mpreferred-stack-boundary=4 endif + +ifneq (,$(filter -mno-tls-direct-seg-refs,$(CFLAGS))) +defines += -DNO_TLS_DIRECT_SEG_REFS +endif diff -rNpu glibc-2.3.4/sysdeps/i386/tst-stack-align.h glibc-2.3.5/sysdeps/i386/tst-stack-align.h --- glibc-2.3.4/sysdeps/i386/tst-stack-align.h 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/sysdeps/i386/tst-stack-align.h 2005-02-16 00:45:34.000000000 -0800 @@ -0,0 +1,42 @@ +/* Copyright (C) 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. */ + +#include +#include + +typedef struct { int i[4]; } int_al16 __attribute__((aligned (16))); + +#define TEST_STACK_ALIGN() \ + ({ \ + int_al16 _m; \ + double _d = 12.0; \ + long double _ld = 15.0; \ + int _ret = 0; \ + printf ("int_al16: %p %zu\n", &_m, __alignof (int_al16)); \ + if ((((uintptr_t) &_m) & (__alignof (int_al16) - 1)) != 0) \ + _ret = 1; \ + \ + printf ("double: %g %p %zu\n", _d, &_d, __alignof (double)); \ + if ((((uintptr_t) &_d) & (__alignof (double) - 1)) != 0) \ + _ret = 1; \ + \ + printf ("ldouble: %Lg %p %zu\n", _ld, &_ld, __alignof (long double)); \ + if ((((uintptr_t) &_ld) & (__alignof (long double) - 1)) != 0) \ + _ret = 1; \ + _ret; \ + }) diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_acosf.S glibc-2.3.5/sysdeps/ia64/fpu/e_acosf.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_acosf.S 2002-07-05 23:35:58.000000000 -0700 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_acosf.S 2005-04-05 17:30:48.000000000 -0700 @@ -1,10 +1,10 @@ .file "acosf.s" -// Copyright (C) 2000, 2001, Intel Corporation + +// Copyright (c) 2000 - 2003, Intel Corporation // All rights reserved. // -// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, -// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// Contributed 2000 by the Intel Numerics Group, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -20,7 +20,7 @@ // * The name of Intel Corporation may not be used to endorse or promote // products derived from this software without specific prior written // permission. -// + // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -35,19 +35,23 @@ // // Intel Corporation is the author of this code, and requests that all // problem reports or change requests be submitted to it directly at -// http://developer.intel.com/opensource. +// http://www.intel.com/software/products/opensource/libraries/num.htm. // History //============================================================== -// 2/02/00 Initial revision -// 6/28/00 Improved speed -// 6/31/00 Changed register allocation because of some duplicate macros +// 02/02/00 Initial version +// 06/28/00 Improved speed +// 06/31/00 Changed register allocation because of some duplicate macros // moved nan exit bundle up to gain a cycle. -// 8/15/00 Bundle added after call to __libm_error_support to properly +// 08/15/00 Bundle added after call to __libm_error_support to properly // set [the previously overwritten] GR_Parameter_RESULT. -// 8/17/00 Changed predicate register macro-usage to direct predicate +// 08/17/00 Changed predicate register macro-usage to direct predicate // names due to an assembler bug. // 10/17/00 Improved speed of x=0 and x=1 paths, set D flag if x denormal. +// 03/13/01 Corrected sign of imm1 value in dep instruction. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 04/17/03 Moved mutex after label // Description @@ -115,7 +119,6 @@ // answer2 = sign(x) z P(t) if x>0 // = sign(x) z P(t) + pi if x<0 -#include "libm_support.h" // // Assembly macros @@ -222,42 +225,30 @@ acosf_poly_p1a = f90 // Data tables //============================================================== -#ifdef _LIBC -.rodata -#else -.data -#endif +RODATA .align 16 -acosf_coeff_1_table: -ASM_TYPE_DIRECTIVE(acosf_coeff_1_table,@object) +LOCAL_OBJECT_START(acosf_coeff_1_table) data8 0x3FC5555607DCF816 // P1 data8 0x3F9CF81AD9BAB2C6 // P4 data8 0x3FC59E0975074DF3 // P7 data8 0xBFA6F4CC2780AA1D // P6 data8 0x3FC2DD45292E93CB // P9 data8 0x3fe6a09e667f3bcd // sqrt(2)/2 -ASM_SIZE_DIRECTIVE(acosf_coeff_1_table) +LOCAL_OBJECT_END(acosf_coeff_1_table) -acosf_coeff_2_table: -ASM_TYPE_DIRECTIVE(acosf_coeff_2_table,@object) +LOCAL_OBJECT_START(acosf_coeff_2_table) data8 0x3FA6F108E31EFBA6 // P3 data8 0xBFCA31BF175D82A0 // P8 data8 0x3FA30C0337F6418B // P5 data8 0x3FB332C9266CB1F9 // P2 data8 0x3ff921fb54442d18 // pi_by_2 -ASM_SIZE_DIRECTIVE(acosf_coeff_2_table) +LOCAL_OBJECT_END(acosf_coeff_2_table) -.align 32 -.global acosf -ASM_TYPE_DIRECTIVE(acosf,@function) .section .text -.proc acosf -.align 32 - -acosf: +GLOBAL_LIBM_ENTRY(acosf) // Load the addresses of the two tables. // Then, load the coefficients and other constants. @@ -342,7 +333,7 @@ acosf: } { .mfb nop.m 999 -(p8) fma.s f8 = f8,f1,f0 +(p8) fma.s.s0 f8 = f8,f1,f0 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -350,7 +341,7 @@ acosf: { .mfb nop.m 999 fcmp.eq.s1 p6,p0 = acosf_abs_x,f1 -(p10) br.cond.spnt L(ACOSF_ZERO) ;; // Branch if x=0 +(p10) br.cond.spnt ACOSF_ZERO ;; // Branch if x=0 } { .mfi @@ -367,7 +358,7 @@ acosf: { .mfb nop.m 999 fma.s1 acosf_t4 = acosf_t2,acosf_t2,f0 -(p6) br.cond.spnt L(ACOSF_ABS_ONE) ;; // Branch if |x|=1 +(p6) br.cond.spnt ACOSF_ABS_ONE ;; // Branch if |x|=1 } { .mfi @@ -575,41 +566,40 @@ acosf: .pred.rel "mutex",p8,p7 //acosf_pred_GTsqrt2by2,acosf_pred_LEsqrt2by2 { .mfi nop.m 999 -(p8) fma.s f8 = acosf_z,acosf_Pt,acosf_sgn_x_piby2 +(p8) fma.s.s0 f8 = acosf_z,acosf_Pt,acosf_sgn_x_piby2 nop.i 999 } { .mfb nop.m 999 -(p7) fms.s f8 = acosf_const_piby2,f1,acosf_sinf1 +(p7) fms.s.s0 f8 = acosf_const_piby2,f1,acosf_sinf1 br.ret.sptk b0 ;; } -L(ACOSF_ZERO): +ACOSF_ZERO: // Here if x=0 { .mfb nop.m 999 - fma.s f8 = acosf_const_piby2,f1,f0 // acosf(0)=pi/2 + fma.s.s0 f8 = acosf_const_piby2,f1,f0 // acosf(0)=pi/2 br.ret.sptk b0 ;; } -L(ACOSF_ABS_ONE): +ACOSF_ABS_ONE: .pred.rel "mutex",p11,p12 // Here if |x|=1 { .mfi nop.m 999 -(p11) fma.s f8 = acosf_const_piby2,f1,acosf_const_piby2 // acosf(-1)=pi +(p11) fma.s.s0 f8 = acosf_const_piby2,f1,acosf_const_piby2 // acosf(-1)=pi nop.i 999 } { .mfb nop.m 999 -(p12) fma.s f8 = f1,f0,f0 // acosf(1)=0 +(p12) fma.s.s0 f8 = f1,f0,f0 // acosf(1)=0 br.ret.sptk b0 ;; } -.endp acosf -ASM_SIZE_DIRECTIVE(acosf) +GLOBAL_LIBM_END(acosf) // Stack operations when calling error support. @@ -642,8 +632,7 @@ ASM_SIZE_DIRECTIVE(acosf) // restore ar.pfs -.proc __libm_error_region -__libm_error_region: +LOCAL_LIBM_ENTRY(__libm_error_region) .prologue { .mfi add GR_Parameter_Y=-32,sp // Parameter 2 value @@ -699,8 +688,7 @@ __libm_error_region: br.ret.sptk b0 // Return };; -.endp __libm_error_region -ASM_SIZE_DIRECTIVE(__libm_error_region) +LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function .global __libm_error_support# diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_acoshf.S glibc-2.3.5/sysdeps/ia64/fpu/e_acoshf.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_acoshf.S 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_acoshf.S 2005-04-05 17:30:48.000000000 -0700 @@ -0,0 +1,1030 @@ +.file "acoshf.s" + + +// Copyright (c) 2000 - 2003, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// ============================================================== +// History +// ============================================================== +// 03/28/01 Initial version +// 04/19/01 Improved speed of the paths #1,2,3,4,5 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/14/03 Improved performance, set denormal flag for unorms >= 1.0 +// +// API +// ============================================================== +// float acoshf(float) +// +// Overview of operation +// ============================================================== +// +// There are 7 paths: +// 1. x = 1.0 +// Return acoshf(x) = 0.0 +// 2. 1.0 < x < 1.000499725341796875(0x3FF0020C00000000) +// Return acoshf(x) = sqrt(x-1) * Pol4(x), +// where Pol4(x) = (x*C2 + C1)*(x-1) + C0 +// +// 3. 1.000499725341796875(0x3FF0020C00000000) <= x < 2^51 +// Return acoshf(x) = log(x + sqrt(x^2 -1.0)) +// To compute x + sqrt(x^2 -1.0) modified Newton Raphson method is used +// (2 iterations) +// Algorithm description for log function see below. +// +// 4. 2^51 <= x < +INF +// Return acoshf(x) = log(2*x) +// Algorithm description for log function see below. +// +// 5. x = +INF +// Return acoshf(x) = +INF +// +// 6. x = [S,Q]NaN +// Return acoshf(x) = QNaN +// +// 7. x < 1.0 +// It's domain error. Error handler with tag = 137 is called +// +//============================================================== +// Algorithm Description for log(x) function +// Below we are using the fact that inequality x - 1.0 > 2^(-6) is always +// true for this acosh implementation +// +// Consider x = 2^N 1.f1 f2 f3 f4...f63 +// Log(x) = log(frcpa(x) x/frcpa(x)) +// = log(1/frcpa(x)) + log(frcpa(x) x) +// = -log(frcpa(x)) + log(frcpa(x) x) +// +// frcpa(x) = 2^-N frcpa((1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^-N) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 + log(frcpa(1.f1 f2 ... f63)) +// +// Log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + log(1./frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 - log(/frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 + T + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + T + log(C x) +// +// Cx = 1 + r +// +// Log(x) = +Nlog2 + T + log(1+r) +// Log(x) = +Nlog2 + T + Series( r - r^2/2 + r^3/3 - r^4/4 ....) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 +// +// x = f * 2*n where f is 1.f_1f_2f_3....f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 8 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double +// + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f62 +// +// General registers used: +// r14 -> r27, r32 -> r39 +// +// Predicate registers used: +// p6 -> p15 +// +// p6 to filter out case when x = [Q,S]NaN +// p7,p8 to filter out case when x < 1.0 +// +// p10 to select path #1 +// p11 to filter out case when x = +INF +// p12 used in the frcpa +// p13 to select path #4 +// p14,p15 to select path #2 + +// Assembly macros +//============================================================== +log_GR_exp_17_ones = r14 +log_GR_signexp_f8 = r15 +log_table_address2 = r16 +log_GR_exp_16_ones = r17 +log_GR_exp_f8 = r18 +log_GR_true_exp_f8 = r19 +log_GR_significand_f8 = r20 +log_GR_index = r21 +log_GR_comp2 = r22 +acosh_GR_f8 = r23 +log_GR_comp = r24 +acosh_GR_f8_sig = r25 +log_table_address3 = r26 +NR_table_address = r27 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +acosh_GR_tag = r39 + +//============================================================== +log_y = f9 +NR1 = f10 +NR2 = f11 +log_y_rs = f12 +log_y_rs_iter = f13 +log_y_rs_iter1 = f14 +log_NORM_f8 = f15 +log_w = f32 +acosh_comp = f34 +acosh_comp2 = f33 +log_P3 = f35 +log_P2 = f36 +log_P1 = f37 +log2 = f38 +log_C0 = f39 +log_C1 = f40 +log_C2 = f41 +acosh_w_rs = f42 +log_C = f43 +log_arg = f44 +acosh_w_iter1 = f45 +acosh_w_iter2 = f46 +log_int_Nfloat = f47 +log_r = f48 +log_rsq = f49 +log_rp_p4 = f50 +log_rp_p32 = f51 +log_rcube = f52 +log_rp_p10 = f53 +log_rp_p2 = f54 +log_Nfloat = f55 +log_T = f56 +log_r2P_r = f57 +log_T_plus_Nlog2 = f58 +acosh_w_sqrt = f59 +acosh_w_1 = f60 +log_arg_early = f61 +log_y_rs_iter2 = f62 + + +// Data tables +//============================================================== + +RODATA +.align 16 + +LOCAL_OBJECT_START(log_table_1) +data8 0xbfd0001008f39d59 // p3 +data8 0x3fd5556073e0c45a // p2 +data8 0xbfdffffffffaea15 // p1 +data8 0x3FE62E42FEFA39EF // log2 +LOCAL_OBJECT_END(log_table_1) + +LOCAL_OBJECT_START(log_table_2) + +data8 0x3FE0000000000000 // 0.5 +data8 0x4008000000000000 // 3.0 +data8 0xD92CBAD213719F11, 0x00003FF9 // C2 3FF9D92CBAD213719F11 +data8 0x93D38EBF2EC9B073, 0x0000BFFC // C1 BFFC93D38EBF2EC9B073 +data8 0xB504F333F9DA0E32, 0x00003FFF // C0 3FFFB504F333F9DA0E32 +LOCAL_OBJECT_END(log_table_2) + +LOCAL_OBJECT_START(log_table_3) +data8 0x3F60040155D5889E //log(1/frcpa(1+ 0/256) +data8 0x3F78121214586B54 //log(1/frcpa(1+ 1/256) +data8 0x3F841929F96832F0 //log(1/frcpa(1+ 2/256) +data8 0x3F8C317384C75F06 //log(1/frcpa(1+ 3/256) +data8 0x3F91A6B91AC73386 //log(1/frcpa(1+ 4/256) +data8 0x3F95BA9A5D9AC039 //log(1/frcpa(1+ 5/256) +data8 0x3F99D2A8074325F4 //log(1/frcpa(1+ 6/256) +data8 0x3F9D6B2725979802 //log(1/frcpa(1+ 7/256) +data8 0x3FA0C58FA19DFAAA //log(1/frcpa(1+ 8/256) +data8 0x3FA2954C78CBCE1B //log(1/frcpa(1+ 9/256) +data8 0x3FA4A94D2DA96C56 //log(1/frcpa(1+ 10/256) +data8 0x3FA67C94F2D4BB58 //log(1/frcpa(1+ 11/256) +data8 0x3FA85188B630F068 //log(1/frcpa(1+ 12/256) +data8 0x3FAA6B8ABE73AF4C //log(1/frcpa(1+ 13/256) +data8 0x3FAC441E06F72A9E //log(1/frcpa(1+ 14/256) +data8 0x3FAE1E6713606D07 //log(1/frcpa(1+ 15/256) +data8 0x3FAFFA6911AB9301 //log(1/frcpa(1+ 16/256) +data8 0x3FB0EC139C5DA601 //log(1/frcpa(1+ 17/256) +data8 0x3FB1DBD2643D190B //log(1/frcpa(1+ 18/256) +data8 0x3FB2CC7284FE5F1C //log(1/frcpa(1+ 19/256) +data8 0x3FB3BDF5A7D1EE64 //log(1/frcpa(1+ 20/256) +data8 0x3FB4B05D7AA012E0 //log(1/frcpa(1+ 21/256) +data8 0x3FB580DB7CEB5702 //log(1/frcpa(1+ 22/256) +data8 0x3FB674F089365A7A //log(1/frcpa(1+ 23/256) +data8 0x3FB769EF2C6B568D //log(1/frcpa(1+ 24/256) +data8 0x3FB85FD927506A48 //log(1/frcpa(1+ 25/256) +data8 0x3FB9335E5D594989 //log(1/frcpa(1+ 26/256) +data8 0x3FBA2B0220C8E5F5 //log(1/frcpa(1+ 27/256) +data8 0x3FBB0004AC1A86AC //log(1/frcpa(1+ 28/256) +data8 0x3FBBF968769FCA11 //log(1/frcpa(1+ 29/256) +data8 0x3FBCCFEDBFEE13A8 //log(1/frcpa(1+ 30/256) +data8 0x3FBDA727638446A2 //log(1/frcpa(1+ 31/256) +data8 0x3FBEA3257FE10F7A //log(1/frcpa(1+ 32/256) +data8 0x3FBF7BE9FEDBFDE6 //log(1/frcpa(1+ 33/256) +data8 0x3FC02AB352FF25F4 //log(1/frcpa(1+ 34/256) +data8 0x3FC097CE579D204D //log(1/frcpa(1+ 35/256) +data8 0x3FC1178E8227E47C //log(1/frcpa(1+ 36/256) +data8 0x3FC185747DBECF34 //log(1/frcpa(1+ 37/256) +data8 0x3FC1F3B925F25D41 //log(1/frcpa(1+ 38/256) +data8 0x3FC2625D1E6DDF57 //log(1/frcpa(1+ 39/256) +data8 0x3FC2D1610C86813A //log(1/frcpa(1+ 40/256) +data8 0x3FC340C59741142E //log(1/frcpa(1+ 41/256) +data8 0x3FC3B08B6757F2A9 //log(1/frcpa(1+ 42/256) +data8 0x3FC40DFB08378003 //log(1/frcpa(1+ 43/256) +data8 0x3FC47E74E8CA5F7C //log(1/frcpa(1+ 44/256) +data8 0x3FC4EF51F6466DE4 //log(1/frcpa(1+ 45/256) +data8 0x3FC56092E02BA516 //log(1/frcpa(1+ 46/256) +data8 0x3FC5D23857CD74D5 //log(1/frcpa(1+ 47/256) +data8 0x3FC6313A37335D76 //log(1/frcpa(1+ 48/256) +data8 0x3FC6A399DABBD383 //log(1/frcpa(1+ 49/256) +data8 0x3FC70337DD3CE41B //log(1/frcpa(1+ 50/256) +data8 0x3FC77654128F6127 //log(1/frcpa(1+ 51/256) +data8 0x3FC7E9D82A0B022D //log(1/frcpa(1+ 52/256) +data8 0x3FC84A6B759F512F //log(1/frcpa(1+ 53/256) +data8 0x3FC8AB47D5F5A310 //log(1/frcpa(1+ 54/256) +data8 0x3FC91FE49096581B //log(1/frcpa(1+ 55/256) +data8 0x3FC981634011AA75 //log(1/frcpa(1+ 56/256) +data8 0x3FC9F6C407089664 //log(1/frcpa(1+ 57/256) +data8 0x3FCA58E729348F43 //log(1/frcpa(1+ 58/256) +data8 0x3FCABB55C31693AD //log(1/frcpa(1+ 59/256) +data8 0x3FCB1E104919EFD0 //log(1/frcpa(1+ 60/256) +data8 0x3FCB94EE93E367CB //log(1/frcpa(1+ 61/256) +data8 0x3FCBF851C067555F //log(1/frcpa(1+ 62/256) +data8 0x3FCC5C0254BF23A6 //log(1/frcpa(1+ 63/256) +data8 0x3FCCC000C9DB3C52 //log(1/frcpa(1+ 64/256) +data8 0x3FCD244D99C85674 //log(1/frcpa(1+ 65/256) +data8 0x3FCD88E93FB2F450 //log(1/frcpa(1+ 66/256) +data8 0x3FCDEDD437EAEF01 //log(1/frcpa(1+ 67/256) +data8 0x3FCE530EFFE71012 //log(1/frcpa(1+ 68/256) +data8 0x3FCEB89A1648B971 //log(1/frcpa(1+ 69/256) +data8 0x3FCF1E75FADF9BDE //log(1/frcpa(1+ 70/256) +data8 0x3FCF84A32EAD7C35 //log(1/frcpa(1+ 71/256) +data8 0x3FCFEB2233EA07CD //log(1/frcpa(1+ 72/256) +data8 0x3FD028F9C7035C1C //log(1/frcpa(1+ 73/256) +data8 0x3FD05C8BE0D9635A //log(1/frcpa(1+ 74/256) +data8 0x3FD085EB8F8AE797 //log(1/frcpa(1+ 75/256) +data8 0x3FD0B9C8E32D1911 //log(1/frcpa(1+ 76/256) +data8 0x3FD0EDD060B78081 //log(1/frcpa(1+ 77/256) +data8 0x3FD122024CF0063F //log(1/frcpa(1+ 78/256) +data8 0x3FD14BE2927AECD4 //log(1/frcpa(1+ 79/256) +data8 0x3FD180618EF18ADF //log(1/frcpa(1+ 80/256) +data8 0x3FD1B50BBE2FC63B //log(1/frcpa(1+ 81/256) +data8 0x3FD1DF4CC7CF242D //log(1/frcpa(1+ 82/256) +data8 0x3FD214456D0EB8D4 //log(1/frcpa(1+ 83/256) +data8 0x3FD23EC5991EBA49 //log(1/frcpa(1+ 84/256) +data8 0x3FD2740D9F870AFB //log(1/frcpa(1+ 85/256) +data8 0x3FD29ECDABCDFA04 //log(1/frcpa(1+ 86/256) +data8 0x3FD2D46602ADCCEE //log(1/frcpa(1+ 87/256) +data8 0x3FD2FF66B04EA9D4 //log(1/frcpa(1+ 88/256) +data8 0x3FD335504B355A37 //log(1/frcpa(1+ 89/256) +data8 0x3FD360925EC44F5D //log(1/frcpa(1+ 90/256) +data8 0x3FD38BF1C3337E75 //log(1/frcpa(1+ 91/256) +data8 0x3FD3C25277333184 //log(1/frcpa(1+ 92/256) +data8 0x3FD3EDF463C1683E //log(1/frcpa(1+ 93/256) +data8 0x3FD419B423D5E8C7 //log(1/frcpa(1+ 94/256) +data8 0x3FD44591E0539F49 //log(1/frcpa(1+ 95/256) +data8 0x3FD47C9175B6F0AD //log(1/frcpa(1+ 96/256) +data8 0x3FD4A8B341552B09 //log(1/frcpa(1+ 97/256) +data8 0x3FD4D4F3908901A0 //log(1/frcpa(1+ 98/256) +data8 0x3FD501528DA1F968 //log(1/frcpa(1+ 99/256) +data8 0x3FD52DD06347D4F6 //log(1/frcpa(1+ 100/256) +data8 0x3FD55A6D3C7B8A8A //log(1/frcpa(1+ 101/256) +data8 0x3FD5925D2B112A59 //log(1/frcpa(1+ 102/256) +data8 0x3FD5BF406B543DB2 //log(1/frcpa(1+ 103/256) +data8 0x3FD5EC433D5C35AE //log(1/frcpa(1+ 104/256) +data8 0x3FD61965CDB02C1F //log(1/frcpa(1+ 105/256) +data8 0x3FD646A84935B2A2 //log(1/frcpa(1+ 106/256) +data8 0x3FD6740ADD31DE94 //log(1/frcpa(1+ 107/256) +data8 0x3FD6A18DB74A58C5 //log(1/frcpa(1+ 108/256) +data8 0x3FD6CF31058670EC //log(1/frcpa(1+ 109/256) +data8 0x3FD6F180E852F0BA //log(1/frcpa(1+ 110/256) +data8 0x3FD71F5D71B894F0 //log(1/frcpa(1+ 111/256) +data8 0x3FD74D5AEFD66D5C //log(1/frcpa(1+ 112/256) +data8 0x3FD77B79922BD37E //log(1/frcpa(1+ 113/256) +data8 0x3FD7A9B9889F19E2 //log(1/frcpa(1+ 114/256) +data8 0x3FD7D81B037EB6A6 //log(1/frcpa(1+ 115/256) +data8 0x3FD8069E33827231 //log(1/frcpa(1+ 116/256) +data8 0x3FD82996D3EF8BCB //log(1/frcpa(1+ 117/256) +data8 0x3FD85855776DCBFB //log(1/frcpa(1+ 118/256) +data8 0x3FD8873658327CCF //log(1/frcpa(1+ 119/256) +data8 0x3FD8AA75973AB8CF //log(1/frcpa(1+ 120/256) +data8 0x3FD8D992DC8824E5 //log(1/frcpa(1+ 121/256) +data8 0x3FD908D2EA7D9512 //log(1/frcpa(1+ 122/256) +data8 0x3FD92C59E79C0E56 //log(1/frcpa(1+ 123/256) +data8 0x3FD95BD750EE3ED3 //log(1/frcpa(1+ 124/256) +data8 0x3FD98B7811A3EE5B //log(1/frcpa(1+ 125/256) +data8 0x3FD9AF47F33D406C //log(1/frcpa(1+ 126/256) +data8 0x3FD9DF270C1914A8 //log(1/frcpa(1+ 127/256) +data8 0x3FDA0325ED14FDA4 //log(1/frcpa(1+ 128/256) +data8 0x3FDA33440224FA79 //log(1/frcpa(1+ 129/256) +data8 0x3FDA57725E80C383 //log(1/frcpa(1+ 130/256) +data8 0x3FDA87D0165DD199 //log(1/frcpa(1+ 131/256) +data8 0x3FDAAC2E6C03F896 //log(1/frcpa(1+ 132/256) +data8 0x3FDADCCC6FDF6A81 //log(1/frcpa(1+ 133/256) +data8 0x3FDB015B3EB1E790 //log(1/frcpa(1+ 134/256) +data8 0x3FDB323A3A635948 //log(1/frcpa(1+ 135/256) +data8 0x3FDB56FA04462909 //log(1/frcpa(1+ 136/256) +data8 0x3FDB881AA659BC93 //log(1/frcpa(1+ 137/256) +data8 0x3FDBAD0BEF3DB165 //log(1/frcpa(1+ 138/256) +data8 0x3FDBD21297781C2F //log(1/frcpa(1+ 139/256) +data8 0x3FDC039236F08819 //log(1/frcpa(1+ 140/256) +data8 0x3FDC28CB1E4D32FD //log(1/frcpa(1+ 141/256) +data8 0x3FDC4E19B84723C2 //log(1/frcpa(1+ 142/256) +data8 0x3FDC7FF9C74554C9 //log(1/frcpa(1+ 143/256) +data8 0x3FDCA57B64E9DB05 //log(1/frcpa(1+ 144/256) +data8 0x3FDCCB130A5CEBB0 //log(1/frcpa(1+ 145/256) +data8 0x3FDCF0C0D18F326F //log(1/frcpa(1+ 146/256) +data8 0x3FDD232075B5A201 //log(1/frcpa(1+ 147/256) +data8 0x3FDD490246DEFA6B //log(1/frcpa(1+ 148/256) +data8 0x3FDD6EFA918D25CD //log(1/frcpa(1+ 149/256) +data8 0x3FDD9509707AE52F //log(1/frcpa(1+ 150/256) +data8 0x3FDDBB2EFE92C554 //log(1/frcpa(1+ 151/256) +data8 0x3FDDEE2F3445E4AF //log(1/frcpa(1+ 152/256) +data8 0x3FDE148A1A2726CE //log(1/frcpa(1+ 153/256) +data8 0x3FDE3AFC0A49FF40 //log(1/frcpa(1+ 154/256) +data8 0x3FDE6185206D516E //log(1/frcpa(1+ 155/256) +data8 0x3FDE882578823D52 //log(1/frcpa(1+ 156/256) +data8 0x3FDEAEDD2EAC990C //log(1/frcpa(1+ 157/256) +data8 0x3FDED5AC5F436BE3 //log(1/frcpa(1+ 158/256) +data8 0x3FDEFC9326D16AB9 //log(1/frcpa(1+ 159/256) +data8 0x3FDF2391A2157600 //log(1/frcpa(1+ 160/256) +data8 0x3FDF4AA7EE03192D //log(1/frcpa(1+ 161/256) +data8 0x3FDF71D627C30BB0 //log(1/frcpa(1+ 162/256) +data8 0x3FDF991C6CB3B379 //log(1/frcpa(1+ 163/256) +data8 0x3FDFC07ADA69A910 //log(1/frcpa(1+ 164/256) +data8 0x3FDFE7F18EB03D3E //log(1/frcpa(1+ 165/256) +data8 0x3FE007C053C5002E //log(1/frcpa(1+ 166/256) +data8 0x3FE01B942198A5A1 //log(1/frcpa(1+ 167/256) +data8 0x3FE02F74400C64EB //log(1/frcpa(1+ 168/256) +data8 0x3FE04360BE7603AD //log(1/frcpa(1+ 169/256) +data8 0x3FE05759AC47FE34 //log(1/frcpa(1+ 170/256) +data8 0x3FE06B5F1911CF52 //log(1/frcpa(1+ 171/256) +data8 0x3FE078BF0533C568 //log(1/frcpa(1+ 172/256) +data8 0x3FE08CD9687E7B0E //log(1/frcpa(1+ 173/256) +data8 0x3FE0A10074CF9019 //log(1/frcpa(1+ 174/256) +data8 0x3FE0B5343A234477 //log(1/frcpa(1+ 175/256) +data8 0x3FE0C974C89431CE //log(1/frcpa(1+ 176/256) +data8 0x3FE0DDC2305B9886 //log(1/frcpa(1+ 177/256) +data8 0x3FE0EB524BAFC918 //log(1/frcpa(1+ 178/256) +data8 0x3FE0FFB54213A476 //log(1/frcpa(1+ 179/256) +data8 0x3FE114253DA97D9F //log(1/frcpa(1+ 180/256) +data8 0x3FE128A24F1D9AFF //log(1/frcpa(1+ 181/256) +data8 0x3FE1365252BF0865 //log(1/frcpa(1+ 182/256) +data8 0x3FE14AE558B4A92D //log(1/frcpa(1+ 183/256) +data8 0x3FE15F85A19C765B //log(1/frcpa(1+ 184/256) +data8 0x3FE16D4D38C119FA //log(1/frcpa(1+ 185/256) +data8 0x3FE18203C20DD133 //log(1/frcpa(1+ 186/256) +data8 0x3FE196C7BC4B1F3B //log(1/frcpa(1+ 187/256) +data8 0x3FE1A4A738B7A33C //log(1/frcpa(1+ 188/256) +data8 0x3FE1B981C0C9653D //log(1/frcpa(1+ 189/256) +data8 0x3FE1CE69E8BB106B //log(1/frcpa(1+ 190/256) +data8 0x3FE1DC619DE06944 //log(1/frcpa(1+ 191/256) +data8 0x3FE1F160A2AD0DA4 //log(1/frcpa(1+ 192/256) +data8 0x3FE2066D7740737E //log(1/frcpa(1+ 193/256) +data8 0x3FE2147DBA47A394 //log(1/frcpa(1+ 194/256) +data8 0x3FE229A1BC5EBAC3 //log(1/frcpa(1+ 195/256) +data8 0x3FE237C1841A502E //log(1/frcpa(1+ 196/256) +data8 0x3FE24CFCE6F80D9A //log(1/frcpa(1+ 197/256) +data8 0x3FE25B2C55CD5762 //log(1/frcpa(1+ 198/256) +data8 0x3FE2707F4D5F7C41 //log(1/frcpa(1+ 199/256) +data8 0x3FE285E0842CA384 //log(1/frcpa(1+ 200/256) +data8 0x3FE294294708B773 //log(1/frcpa(1+ 201/256) +data8 0x3FE2A9A2670AFF0C //log(1/frcpa(1+ 202/256) +data8 0x3FE2B7FB2C8D1CC1 //log(1/frcpa(1+ 203/256) +data8 0x3FE2C65A6395F5F5 //log(1/frcpa(1+ 204/256) +data8 0x3FE2DBF557B0DF43 //log(1/frcpa(1+ 205/256) +data8 0x3FE2EA64C3F97655 //log(1/frcpa(1+ 206/256) +data8 0x3FE3001823684D73 //log(1/frcpa(1+ 207/256) +data8 0x3FE30E97E9A8B5CD //log(1/frcpa(1+ 208/256) +data8 0x3FE32463EBDD34EA //log(1/frcpa(1+ 209/256) +data8 0x3FE332F4314AD796 //log(1/frcpa(1+ 210/256) +data8 0x3FE348D90E7464D0 //log(1/frcpa(1+ 211/256) +data8 0x3FE35779F8C43D6E //log(1/frcpa(1+ 212/256) +data8 0x3FE36621961A6A99 //log(1/frcpa(1+ 213/256) +data8 0x3FE37C299F3C366A //log(1/frcpa(1+ 214/256) +data8 0x3FE38AE2171976E7 //log(1/frcpa(1+ 215/256) +data8 0x3FE399A157A603E7 //log(1/frcpa(1+ 216/256) +data8 0x3FE3AFCCFE77B9D1 //log(1/frcpa(1+ 217/256) +data8 0x3FE3BE9D503533B5 //log(1/frcpa(1+ 218/256) +data8 0x3FE3CD7480B4A8A3 //log(1/frcpa(1+ 219/256) +data8 0x3FE3E3C43918F76C //log(1/frcpa(1+ 220/256) +data8 0x3FE3F2ACB27ED6C7 //log(1/frcpa(1+ 221/256) +data8 0x3FE4019C2125CA93 //log(1/frcpa(1+ 222/256) +data8 0x3FE4181061389722 //log(1/frcpa(1+ 223/256) +data8 0x3FE42711518DF545 //log(1/frcpa(1+ 224/256) +data8 0x3FE436194E12B6BF //log(1/frcpa(1+ 225/256) +data8 0x3FE445285D68EA69 //log(1/frcpa(1+ 226/256) +data8 0x3FE45BCC464C893A //log(1/frcpa(1+ 227/256) +data8 0x3FE46AED21F117FC //log(1/frcpa(1+ 228/256) +data8 0x3FE47A1527E8A2D3 //log(1/frcpa(1+ 229/256) +data8 0x3FE489445EFFFCCC //log(1/frcpa(1+ 230/256) +data8 0x3FE4A018BCB69835 //log(1/frcpa(1+ 231/256) +data8 0x3FE4AF5A0C9D65D7 //log(1/frcpa(1+ 232/256) +data8 0x3FE4BEA2A5BDBE87 //log(1/frcpa(1+ 233/256) +data8 0x3FE4CDF28F10AC46 //log(1/frcpa(1+ 234/256) +data8 0x3FE4DD49CF994058 //log(1/frcpa(1+ 235/256) +data8 0x3FE4ECA86E64A684 //log(1/frcpa(1+ 236/256) +data8 0x3FE503C43CD8EB68 //log(1/frcpa(1+ 237/256) +data8 0x3FE513356667FC57 //log(1/frcpa(1+ 238/256) +data8 0x3FE522AE0738A3D8 //log(1/frcpa(1+ 239/256) +data8 0x3FE5322E26867857 //log(1/frcpa(1+ 240/256) +data8 0x3FE541B5CB979809 //log(1/frcpa(1+ 241/256) +data8 0x3FE55144FDBCBD62 //log(1/frcpa(1+ 242/256) +data8 0x3FE560DBC45153C7 //log(1/frcpa(1+ 243/256) +data8 0x3FE5707A26BB8C66 //log(1/frcpa(1+ 244/256) +data8 0x3FE587F60ED5B900 //log(1/frcpa(1+ 245/256) +data8 0x3FE597A7977C8F31 //log(1/frcpa(1+ 246/256) +data8 0x3FE5A760D634BB8B //log(1/frcpa(1+ 247/256) +data8 0x3FE5B721D295F10F //log(1/frcpa(1+ 248/256) +data8 0x3FE5C6EA94431EF9 //log(1/frcpa(1+ 249/256) +data8 0x3FE5D6BB22EA86F6 //log(1/frcpa(1+ 250/256) +data8 0x3FE5E6938645D390 //log(1/frcpa(1+ 251/256) +data8 0x3FE5F673C61A2ED2 //log(1/frcpa(1+ 252/256) +data8 0x3FE6065BEA385926 //log(1/frcpa(1+ 253/256) +data8 0x3FE6164BFA7CC06B //log(1/frcpa(1+ 254/256) +data8 0x3FE62643FECF9743 //log(1/frcpa(1+ 255/256) +LOCAL_OBJECT_END(log_table_3) + + +.section .text +GLOBAL_LIBM_ENTRY(acoshf) + +{ .mfi + getf.exp acosh_GR_f8 = f8 + fclass.m p6,p0 = f8, 0xc3 // Test for x = NaN + mov log_GR_comp2 = 0x10032 +} +{ .mfi + addl NR_table_address = @ltoff(log_table_1), gp + fms.s1 log_y = f8, f8, f1 // y = x^2-1 + nop.i 0 +} +;; + +{ .mfi + getf.sig acosh_GR_f8_sig = f8 + fclass.m p11,p0 = f8, 0x21 // Test for x=+inf + mov log_GR_exp_17_ones = 0x1ffff +} +{ .mfi + ld8 NR_table_address = [NR_table_address] + fms.s1 log_w = f8,f1,f1 // w = x - 1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p7,p8 = f8, f1 // Test for x<1.0 + addl log_GR_comp = 0x10020C,r0 // Upper 21 bits of signif of 1.0005 +} +{ .mfb + mov log_GR_exp_16_ones = 0xffff //BIAS +(p6) fma.s.s0 f8 = f8,f1,f0 // quietize nan result if x=nan +(p6) br.ret.spnt b0 // Exit for x=nan +} +;; + +{ .mfb + //get second table address + adds log_table_address2 = 0x20, NR_table_address + fcmp.eq.s1 p10,p0 = f8, f1 // Test for x=+1.0 +(p11) br.ret.spnt b0 // Exit for x=+inf +} +;; + +{ .mfi + ldfpd NR1,NR2 = [log_table_address2],16 + frsqrta.s1 log_y_rs,p0 = log_y // z=1/sqrt(y) + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 log_arg = f8,f1,f8 +(p7) br.cond.spnt ACOSH_LESS_ONE // Branch if path 7, x < 1.0 +} +;; + +{ .mfi + ldfe log_C2 = [log_table_address2],16 +(p8) fcmp.eq.s0 p6,p0 = f8, f0 // Dummy op sets denorm flag if unorm>=1.0 + nop.i 0 +} +{ .mfb +(p8) cmp.le.unc p13,p0 = log_GR_comp2,acosh_GR_f8 + nop.f 0 +(p13) br.cond.spnt LOG_COMMON1 // Branch if path 4, x >= 2^51 +} +;; + +{ .mfi + ldfe log_C1 = [log_table_address2],16 +(p10) fmerge.s f8 = f0, f0 // Return 0 if x=1.0 + shr.u acosh_GR_f8_sig = acosh_GR_f8_sig,43 +} +{ .mib + cmp.eq p14,p0 = log_GR_exp_16_ones,acosh_GR_f8 + nop.i 0 +(p10) br.ret.spnt b0 // Exit for x=1.0 +} +;; + +{ .mfi + ldfe log_C0 = [log_table_address2],16 + frsqrta.s1 acosh_w_rs,p0 = log_w // t=1/sqrt(w) + nop.i 0 +} +{ .mfb +(p14) cmp.lt.unc p15,p0 = acosh_GR_f8_sig,log_GR_comp + nop.f 0 +(p15) br.cond.spnt ACOSH_NEAR_ONE // Branch if path 2, 1.0 < x < 1.0005 +} +;; + +// Here is main path, 1.0005 <= x < 2^51 +/////////////// The first iteration ////////////////////////////////// +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + fma.s1 log_y_rs_iter = log_y_rs,log_y,f0 // y*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P1,log2 = [NR_table_address],16 + fnma.s1 log_y_rs_iter2 = log_y_rs_iter,log_y_rs,NR2 // 3-(y*z)*z + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs,NR1,f0 // 0.5*z + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs_iter2,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + // (0.5*z)*(3-(y*z)*z) + fma.s1 log_arg_early = log_y_rs_iter1,log_y_rs_iter2,f0 + nop.i 0 +} +;; + +/////////////////////////// The second iteration ///////////////////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_arg_early = log_arg_early,log_y,f8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter1,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + frcpa.s1 log_C,p0 = f1,log_arg_early + nop.i 0 +} +;; + +{ .mfi + getf.exp log_GR_signexp_f8 = log_arg_early + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + getf.sig log_GR_significand_f8 = log_arg_early + fma.s1 log_arg = log_y_rs_iter1,log_y_rs,f8 // (0.5*z)*(3-(y*z)*z) + adds log_table_address3 = 0x40, NR_table_address +} +;; + +///////////////////////////////// The end NR iterations ///////////////////// + +{ .mmi + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +;; + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + nop.i 0 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*8 + index + shladd log_table_address3 = log_GR_index,3,log_table_address3 +;; + ldfd log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_P1, log_r, f1 //P1*r + 1.0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(P3*r + P2)*r^2 + P1*r + 1.0 + fma.s1 log_rp_p2 = log_rp_p32, log_rsq, log_rp_p10 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + br.ret.sptk b0 // Exit main path, path 3: 1.0005 <= x < 2^51 +} +;; + +// Here if path 2, 1.0 < x < 1.0005 +ACOSH_NEAR_ONE: +// The first NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter1 = acosh_w_rs,log_w,f0 //t*w + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = f8,log_C2,log_C1 //x*C2 + C1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_rs,NR1,f0 //t*0.5 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter1,acosh_w_rs,NR2 //3-t*t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(3-t*t*w)*t*0.5 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C0 //(x*C2 + C1)*(x-1) + C0 + nop.i 0 +} +;; + +// The second NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_rs = acosh_w_iter2,log_w,f0 //t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter2,acosh_w_rs,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_sqrt = acosh_w_iter2,log_w,f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = acosh_w_1,acosh_w_sqrt,f0 + br.ret.sptk b0 // Exit path 2, 1.0 < x < 1.0005 +} +;; + +// Here if path 4, x >= 2^51 +LOG_COMMON1: +{ .mfi + ldfpd log_P3,log_P2 = [NR_table_address],16 + frcpa.s1 log_C,p0 = f1,log_arg + nop.i 0 +} +;; + +{ .mmi + getf.exp log_GR_signexp_f8 = log_arg + ldfpd log_P1,log2 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mmi + getf.sig log_GR_significand_f8 = log_arg + nop.m 0 + nop.i 0 +} +;; + +{ .mfi + adds log_table_address3 = 0x40, NR_table_address + nop.f 0 + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mmf + nop.m 0 + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + nop.f 0 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*8 + index + shladd log_table_address3 = log_GR_index,3,log_table_address3 +;; + ldfd log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_P1, log_r, f1 //P1*r + 1.0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p2 = log_rp_p32, log_rsq, log_rp_p10 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.s.s0 f8 = log_rp_p2,log_r,log_T_plus_Nlog2 + br.ret.sptk b0 // Exit path 4, x >= 2^51 +} +;; + +// Here if path 7, x < 1.0 +ACOSH_LESS_ONE: +{ .mfi + alloc r32 = ar.pfs,1,3,4,0 + fmerge.s f10 = f8,f8 + nop.i 0 +} +;; + +{ .mfb + mov acosh_GR_tag = 137 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk __libm_error_region +} +;; + +GLOBAL_LIBM_END(acoshf) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfs [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfs [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfs [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfs f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_acoshl.S glibc-2.3.5/sysdeps/ia64/fpu/e_acoshl.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_acoshl.S 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_acoshl.S 2005-04-05 17:30:48.000000000 -0700 @@ -0,0 +1,1716 @@ +.file "acoshl.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +//********************************************************************* +// +// History: +// 10/01/01 Initial version +// 10/10/01 Performance inproved +// 12/11/01 Changed huges_logp to not be global +// 01/02/02 Corrected .restore syntax +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/14/02 Changed mli templates to mlx +// 02/06/03 Reorganized data tables +// 03/31/05 Reformatted delimiters between data tables +// +//********************************************************************* +// +// API +//============================================================== +// long double acoshl(long double); +// +// Overview of operation +//============================================================== +// +// There are 6 paths: +// 1. x = 1 +// Return acoshl(x) = 0; +// +// 2. x < 1 +// Return acoshl(x) = Nan (Domain error, error handler call with tag 135); +// +// 3. x = [S,Q]Nan or +INF +// Return acoshl(x) = x + x; +// +// 4. 'Near 1': 1 < x < 1+1/8 +// Return acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), +// where y = 1, P(y)/Q(y) - rational approximation +// +// 5. 'Huges': x > 0.5*2^64 +// Return acoshl(x) = (logl(2*x-1)); +// +// 6. 'Main path': 1+1/8 < x < 0.5*2^64 +// b_hi + b_lo = x + sqrt(x^2 - 1); +// acoshl(x) = logl_special(b_hi, b_lo); +// +// Algorithm description +//============================================================== +// +// I. Near 1 path algorithm +// ************************************************************** +// The formula is acoshl(x) = sqrtl(2*y)*(1-P(y)/Q(y)), +// where y = 1, P(y)/Q(y) - rational approximation +// +// 1) y = x - 1, y2 = 2 * y +// +// 2) Compute in parallel sqrtl(2*y) and P(y)/Q(y) +// a) sqrtl computation method described below (main path algorithm, item 2)) +// As result we obtain (gg+gl) - multiprecision result +// as pair of double extended values +// b) P(y) and Q(y) calculated without any extra precision manipulations +// c) P/Q division: +// y = frcpa(Q) initial approximation of 1/Q +// z = P*y initial approximation of P/Q +// +// e = 1 - b*y +// e2 = e + e^2 +// e1 = e^2 +// y1 = y + y*e2 = y + y*(e+e^2) +// +// e3 = e + e1^2 +// y2 = y + y1*e3 = y + y*(e+e^2+..+e^6) +// +// r = P - Q*z +// e = 1 - Q*y2 +// xx = z + r*y2 high part of a/b +// +// y3 = y2 + y2*e4 +// r1 = P - Q*xx +// xl = r1*y3 low part of a/b +// +// 3) res = sqrt(2*y) - sqrt(2*y)*(P(y)/Q(y)) = +// = (gg+gl) - (gg + gl)*(xx+xl); +// +// a) hh = gg*xx; hl = gg*xl; lh = gl*xx; ll = gl*xl; +// b) res = ((((gl + ll) + lh) + hl) + hh) + gg; +// (exactly in this order) +// +// II. Main path algorithm +// ( thanks to Peter Markstein for the idea of sqrt(x^2+1) computation! ) +// ********************************************************************** +// +// There are 3 parts of x+sqrt(x^2-1) computation: +// +// 1) m2 = (m2_hi+m2_lo) = x^2-1 obtaining +// ------------------------------------ +// m2_hi = x2_hi - 1, where x2_hi = x * x; +// m2_lo = x2_lo + p1_lo, where +// x2_lo = FMS(x*x-x2_hi), +// p1_lo = (1 + m2_hi) - x2_hi; +// +// 2) g = (g_hi+g_lo) = sqrt(m2) = sqrt(m2_hi+m2_lo) +// ---------------------------------------------- +// r = invsqrt(m2_hi) (8-bit reciprocal square root approximation); +// g = m2_hi * r (first 8 bit-approximation of sqrt); +// +// h = 0.5 * r; +// e = 0.5 - g * h; +// g = g * e + g (second 16 bit-approximation of sqrt); +// +// h = h * e + h; +// e = 0.5 - g * h; +// g = g * e + g (third 32 bit-approximation of sqrt); +// +// h = h * e + h; +// e = 0.5 - g * h; +// g_hi = g * e + g (fourth 64 bit-approximation of sqrt); +// +// Remainder computation: +// h = h * e + h; +// d = (m2_hi - g_hi * g_hi) + m2_lo; +// g_lo = d * h; +// +// 3) b = (b_hi + b_lo) = x + g, where g = (g_hi + g_lo) = sqrt(x^2-1) +// ------------------------------------------------------------------- +// b_hi = (g_hi + x) + gl; +// b_lo = (x - b_hi) + g_hi + gl; +// +// Now we pass b presented as sum b_hi + b_lo to special version +// of logl function which accept a pair of arguments as +// mutiprecision value. +// +// Special log algorithm overview +// ================================ +// Here we use a table lookup method. The basic idea is that in +// order to compute logl(Arg) for an argument Arg in [1,2), +// we construct a value G such that G*Arg is close to 1 and that +// logl(1/G) is obtainable easily from a table of values calculated +// beforehand. Thus +// +// logl(Arg) = logl(1/G) + logl((G*Arg - 1)) +// +// Because |G*Arg - 1| is small, the second term on the right hand +// side can be approximated by a short polynomial. We elaborate +// this method in four steps. +// +// Step 0: Initialization +// +// We need to calculate logl( X+1 ). Obtain N, S_hi such that +// +// X = 2^N * ( S_hi + S_lo ) exactly +// +// where S_hi in [1,2) and S_lo is a correction to S_hi in the sense +// that |S_lo| <= ulp(S_hi). +// +// For the special version of logl: S_lo = b_lo +// !-----------------------------------------------! +// +// Step 1: Argument Reduction +// +// Based on S_hi, obtain G_1, G_2, G_3 from a table and calculate +// +// G := G_1 * G_2 * G_3 +// r := (G * S_hi - 1) + G * S_lo +// +// These G_j's have the property that the product is exactly +// representable and that |r| < 2^(-12) as a result. +// +// Step 2: Approximation +// +// logl(1 + r) is approximated by a short polynomial poly(r). +// +// Step 3: Reconstruction +// +// Finally, logl( X ) = logl( X+1 ) is given by +// +// logl( X ) = logl( 2^N * (S_hi + S_lo) ) +// ~=~ N*logl(2) + logl(1/G) + logl(1 + r) +// ~=~ N*logl(2) + logl(1/G) + poly(r). +// +// For detailed description see logl or log1pl function, regular path. +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f32 -> f95 (64 registers) + +// General registers used: +// r32 -> r67 (36 registers) + +// Predicate registers used: +// p7 -> p11 +// p7 for 'NaNs, Inf' path +// p8 for 'near 1' path +// p9 for 'huges' path +// p10 for x = 1 +// p11 for x < 1 +// +//********************************************************************* +// IEEE Special Conditions: +// +// acoshl(+inf) = +inf +// acoshl(-inf) = QNaN +// acoshl(1) = 0 +// acoshl(x<1) = QNaN +// acoshl(SNaN) = QNaN +// acoshl(QNaN) = QNaN +// + +// Data tables +//============================================================== + +RODATA +.align 64 + +// Near 1 path rational aproximation coefficients +LOCAL_OBJECT_START(Poly_P) +data8 0xB0978143F695D40F, 0x3FF1 // .84205539791447100108478906277453574946e-4 +data8 0xB9800D841A8CAD29, 0x3FF6 // .28305085180397409672905983082168721069e-2 +data8 0xC889F455758C1725, 0x3FF9 // .24479844297887530847660233111267222945e-1 +data8 0x9BE1DFF006F45F12, 0x3FFB // .76114415657565879842941751209926938306e-1 +data8 0x9E34AF4D372861E0, 0x3FFB // .77248925727776366270605984806795850504e-1 +data8 0xF3DC502AEE14C4AE, 0x3FA6 // .3077953476682583606615438814166025592e-26 +LOCAL_OBJECT_END(Poly_P) + +// +LOCAL_OBJECT_START(Poly_Q) +data8 0xF76E3FD3C7680357, 0x3FF1 // .11798413344703621030038719253730708525e-3 +data8 0xD107D2E7273263AE, 0x3FF7 // .63791065024872525660782716786703188820e-2 +data8 0xB609BE5CDE206AEF, 0x3FFB // .88885771950814004376363335821980079985e-1 +data8 0xF7DEACAC28067C8A, 0x3FFD // .48412074662702495416825113623936037072302 +data8 0x8F9BE5890CEC7E38, 0x3FFF // 1.1219450873557867470217771071068369729526 +data8 0xED4F06F3D2BC92D1, 0x3FFE // .92698710873331639524734537734804056798748 +LOCAL_OBJECT_END(Poly_Q) + +// Q coeffs +LOCAL_OBJECT_START(Constants_Q) +data4 0x00000000,0xB1721800,0x00003FFE,0x00000000 +data4 0x4361C4C6,0x82E30865,0x0000BFE2,0x00000000 +data4 0x328833CB,0xCCCCCAF2,0x00003FFC,0x00000000 +data4 0xA9D4BAFB,0x80000077,0x0000BFFD,0x00000000 +data4 0xAAABE3D2,0xAAAAAAAA,0x00003FFD,0x00000000 +data4 0xFFFFDAB7,0xFFFFFFFF,0x0000BFFD,0x00000000 +LOCAL_OBJECT_END(Constants_Q) + +// Z1 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_1) +data4 0x00008000 +data4 0x00007879 +data4 0x000071C8 +data4 0x00006BCB +data4 0x00006667 +data4 0x00006187 +data4 0x00005D18 +data4 0x0000590C +data4 0x00005556 +data4 0x000051EC +data4 0x00004EC5 +data4 0x00004BDB +data4 0x00004925 +data4 0x0000469F +data4 0x00004445 +data4 0x00004211 +LOCAL_OBJECT_END(Constants_Z_1) + +// G1 and H1 - IEEE single and h1 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h1) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F70F0F0,0x3D785196 +data8 0x3DA163A6617D741C +data4 0x3F638E38,0x3DF13843 +data8 0x3E2C55E6CBD3D5BB +data4 0x3F579430,0x3E2FF9A0 +data8 0xBE3EB0BFD86EA5E7 +data4 0x3F4CCCC8,0x3E647FD6 +data8 0x3E2E6A8C86B12760 +data4 0x3F430C30,0x3E8B3AE7 +data8 0x3E47574C5C0739BA +data4 0x3F3A2E88,0x3EA30C68 +data8 0x3E20E30F13E8AF2F +data4 0x3F321640,0x3EB9CEC8 +data8 0xBE42885BF2C630BD +data4 0x3F2AAAA8,0x3ECF9927 +data8 0x3E497F3497E577C6 +data4 0x3F23D708,0x3EE47FC5 +data8 0x3E3E6A6EA6B0A5AB +data4 0x3F1D89D8,0x3EF8947D +data8 0xBDF43E3CD328D9BE +data4 0x3F17B420,0x3F05F3A1 +data8 0x3E4094C30ADB090A +data4 0x3F124920,0x3F0F4303 +data8 0xBE28FBB2FC1FE510 +data4 0x3F0D3DC8,0x3F183EBF +data8 0x3E3A789510FDE3FA +data4 0x3F088888,0x3F20EC80 +data8 0x3E508CE57CC8C98F +data4 0x3F042108,0x3F29516A +data8 0xBE534874A223106C +LOCAL_OBJECT_END(Constants_G_H_h1) + +// Z2 - 16 bit fixed +LOCAL_OBJECT_START(Constants_Z_2) +data4 0x00008000 +data4 0x00007F81 +data4 0x00007F02 +data4 0x00007E85 +data4 0x00007E08 +data4 0x00007D8D +data4 0x00007D12 +data4 0x00007C98 +data4 0x00007C20 +data4 0x00007BA8 +data4 0x00007B31 +data4 0x00007ABB +data4 0x00007A45 +data4 0x000079D1 +data4 0x0000795D +data4 0x000078EB +LOCAL_OBJECT_END(Constants_Z_2) + +// G2 and H2 - IEEE single and h2 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h2) +data4 0x3F800000,0x00000000 +data8 0x0000000000000000 +data4 0x3F7F00F8,0x3B7F875D +data8 0x3DB5A11622C42273 +data4 0x3F7E03F8,0x3BFF015B +data8 0x3DE620CF21F86ED3 +data4 0x3F7D08E0,0x3C3EE393 +data8 0xBDAFA07E484F34ED +data4 0x3F7C0FC0,0x3C7E0586 +data8 0xBDFE07F03860BCF6 +data4 0x3F7B1880,0x3C9E75D2 +data8 0x3DEA370FA78093D6 +data4 0x3F7A2328,0x3CBDC97A +data8 0x3DFF579172A753D0 +data4 0x3F792FB0,0x3CDCFE47 +data8 0x3DFEBE6CA7EF896B +data4 0x3F783E08,0x3CFC15D0 +data8 0x3E0CF156409ECB43 +data4 0x3F774E38,0x3D0D874D +data8 0xBE0B6F97FFEF71DF +data4 0x3F766038,0x3D1CF49B +data8 0xBE0804835D59EEE8 +data4 0x3F757400,0x3D2C531D +data8 0x3E1F91E9A9192A74 +data4 0x3F748988,0x3D3BA322 +data8 0xBE139A06BF72A8CD +data4 0x3F73A0D0,0x3D4AE46F +data8 0x3E1D9202F8FBA6CF +data4 0x3F72B9D0,0x3D5A1756 +data8 0xBE1DCCC4BA796223 +data4 0x3F71D488,0x3D693B9D +data8 0xBE049391B6B7C239 +LOCAL_OBJECT_END(Constants_G_H_h2) + +// G3 and H3 - IEEE single and h3 - IEEE double +LOCAL_OBJECT_START(Constants_G_H_h3) +data4 0x3F7FFC00,0x38800100 +data8 0x3D355595562224CD +data4 0x3F7FF400,0x39400480 +data8 0x3D8200A206136FF6 +data4 0x3F7FEC00,0x39A00640 +data8 0x3DA4D68DE8DE9AF0 +data4 0x3F7FE400,0x39E00C41 +data8 0xBD8B4291B10238DC +data4 0x3F7FDC00,0x3A100A21 +data8 0xBD89CCB83B1952CA +data4 0x3F7FD400,0x3A300F22 +data8 0xBDB107071DC46826 +data4 0x3F7FCC08,0x3A4FF51C +data8 0x3DB6FCB9F43307DB +data4 0x3F7FC408,0x3A6FFC1D +data8 0xBD9B7C4762DC7872 +data4 0x3F7FBC10,0x3A87F20B +data8 0xBDC3725E3F89154A +data4 0x3F7FB410,0x3A97F68B +data8 0xBD93519D62B9D392 +data4 0x3F7FAC18,0x3AA7EB86 +data8 0x3DC184410F21BD9D +data4 0x3F7FA420,0x3AB7E101 +data8 0xBDA64B952245E0A6 +data4 0x3F7F9C20,0x3AC7E701 +data8 0x3DB4B0ECAABB34B8 +data4 0x3F7F9428,0x3AD7DD7B +data8 0x3D9923376DC40A7E +data4 0x3F7F8C30,0x3AE7D474 +data8 0x3DC6E17B4F2083D3 +data4 0x3F7F8438,0x3AF7CBED +data8 0x3DAE314B811D4394 +data4 0x3F7F7C40,0x3B03E1F3 +data8 0xBDD46F21B08F2DB1 +data4 0x3F7F7448,0x3B0BDE2F +data8 0xBDDC30A46D34522B +data4 0x3F7F6C50,0x3B13DAAA +data8 0x3DCB0070B1F473DB +data4 0x3F7F6458,0x3B1BD766 +data8 0xBDD65DDC6AD282FD +data4 0x3F7F5C68,0x3B23CC5C +data8 0xBDCDAB83F153761A +data4 0x3F7F5470,0x3B2BC997 +data8 0xBDDADA40341D0F8F +data4 0x3F7F4C78,0x3B33C711 +data8 0x3DCD1BD7EBC394E8 +data4 0x3F7F4488,0x3B3BBCC6 +data8 0xBDC3532B52E3E695 +data4 0x3F7F3C90,0x3B43BAC0 +data8 0xBDA3961EE846B3DE +data4 0x3F7F34A0,0x3B4BB0F4 +data8 0xBDDADF06785778D4 +data4 0x3F7F2CA8,0x3B53AF6D +data8 0x3DCC3ED1E55CE212 +data4 0x3F7F24B8,0x3B5BA620 +data8 0xBDBA31039E382C15 +data4 0x3F7F1CC8,0x3B639D12 +data8 0x3D635A0B5C5AF197 +data4 0x3F7F14D8,0x3B6B9444 +data8 0xBDDCCB1971D34EFC +data4 0x3F7F0CE0,0x3B7393BC +data8 0x3DC7450252CD7ADA +data4 0x3F7F04F0,0x3B7B8B6D +data8 0xBDB68F177D7F2A42 +LOCAL_OBJECT_END(Constants_G_H_h3) + +// Assembly macros +//============================================================== + +// Floating Point Registers + +FR_Arg = f8 +FR_Res = f8 + + +FR_PP0 = f32 +FR_PP1 = f33 +FR_PP2 = f34 +FR_PP3 = f35 +FR_PP4 = f36 +FR_PP5 = f37 +FR_QQ0 = f38 +FR_QQ1 = f39 +FR_QQ2 = f40 +FR_QQ3 = f41 +FR_QQ4 = f42 +FR_QQ5 = f43 + +FR_Q1 = f44 +FR_Q2 = f45 +FR_Q3 = f46 +FR_Q4 = f47 + +FR_Half = f48 +FR_Two = f49 + +FR_log2_hi = f50 +FR_log2_lo = f51 + + +FR_X2 = f52 +FR_M2 = f53 +FR_M2L = f54 +FR_Rcp = f55 +FR_GG = f56 +FR_HH = f57 +FR_EE = f58 +FR_DD = f59 +FR_GL = f60 +FR_Tmp = f61 + + +FR_XM1 = f62 +FR_2XM1 = f63 +FR_XM12 = f64 + + + + // Special logl registers +FR_XLog_Hi = f65 +FR_XLog_Lo = f66 + +FR_Y_hi = f67 +FR_Y_lo = f68 + +FR_S_hi = f69 +FR_S_lo = f70 + +FR_poly_lo = f71 +FR_poly_hi = f72 + +FR_G = f73 +FR_H = f74 +FR_h = f75 + +FR_G2 = f76 +FR_H2 = f77 +FR_h2 = f78 + +FR_r = f79 +FR_rsq = f80 +FR_rcub = f81 + +FR_float_N = f82 + +FR_G3 = f83 +FR_H3 = f84 +FR_h3 = f85 + +FR_2_to_minus_N = f86 + + + // Near 1 registers +FR_PP = f65 +FR_QQ = f66 + + +FR_PV6 = f69 +FR_PV4 = f70 +FR_PV3 = f71 +FR_PV2 = f72 + +FR_QV6 = f73 +FR_QV4 = f74 +FR_QV3 = f75 +FR_QV2 = f76 + +FR_Y0 = f77 +FR_Q0 = f78 +FR_E0 = f79 +FR_E2 = f80 +FR_E1 = f81 +FR_Y1 = f82 +FR_E3 = f83 +FR_Y2 = f84 +FR_R0 = f85 +FR_E4 = f86 +FR_Y3 = f87 +FR_R1 = f88 +FR_X_Hi = f89 +FR_X_lo = f90 + +FR_HH = f91 +FR_LL = f92 +FR_HL = f93 +FR_LH = f94 + + + + // Error handler registers +FR_Arg_X = f95 +FR_Arg_Y = f0 + + +// General Purpose Registers + + // General prolog registers +GR_PFS = r32 +GR_OneP125 = r33 +GR_TwoP63 = r34 +GR_Arg = r35 +GR_Half = r36 + + // Near 1 path registers +GR_Poly_P = r37 +GR_Poly_Q = r38 + + // Special logl registers +GR_Index1 = r39 +GR_Index2 = r40 +GR_signif = r41 +GR_X_0 = r42 +GR_X_1 = r43 +GR_X_2 = r44 +GR_minus_N = r45 +GR_Z_1 = r46 +GR_Z_2 = r47 +GR_N = r48 +GR_Bias = r49 +GR_M = r50 +GR_Index3 = r51 +GR_exp_2tom80 = r52 +GR_exp_mask = r53 +GR_exp_2tom7 = r54 +GR_ad_ln10 = r55 +GR_ad_tbl_1 = r56 +GR_ad_tbl_2 = r57 +GR_ad_tbl_3 = r58 +GR_ad_q = r59 +GR_ad_z_1 = r60 +GR_ad_z_2 = r61 +GR_ad_z_3 = r62 + +// +// Added for unwind support +// +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 + +GR_Parameter_X = r64 +GR_Parameter_Y = r65 +GR_Parameter_RESULT = r66 +GR_Parameter_TAG = r67 + + + +.section .text +GLOBAL_LIBM_ENTRY(acoshl) + +{ .mfi + alloc GR_PFS = ar.pfs,0,32,4,0 // Local frame allocation + fcmp.lt.s1 p11, p0 = FR_Arg, f1 // if arg is less than 1 + mov GR_Half = 0xfffe // 0.5's exp +} +{ .mfi + addl GR_Poly_Q = @ltoff(Poly_Q), gp // Address of Q-coeff table + fma.s1 FR_X2 = FR_Arg, FR_Arg, f0 // Obtain x^2 + addl GR_Poly_P = @ltoff(Poly_P), gp // Address of P-coeff table +};; + +{ .mfi + getf.d GR_Arg = FR_Arg // get arument as double (int64) + fma.s0 FR_Two = f1, f1, f1 // construct 2.0 + addl GR_ad_z_1 = @ltoff(Constants_Z_1#),gp // logl tables +} +{ .mlx + nop.m 0 + movl GR_TwoP63 = 0x43E8000000000000 // 0.5*2^63 (huge arguments) +};; + +{ .mfi + ld8 GR_Poly_P = [GR_Poly_P] // get actual P-coeff table address + fcmp.eq.s1 p10, p0 = FR_Arg, f1 // if arg == 1 (return 0) + nop.i 0 +} +{ .mlx + ld8 GR_Poly_Q = [GR_Poly_Q] // get actual Q-coeff table address + movl GR_OneP125 = 0x3FF2000000000000 // 1.125 (near 1 path bound) +};; + +{ .mfi + ld8 GR_ad_z_1 = [GR_ad_z_1] // Get pointer to Constants_Z_1 + fclass.m p7,p0 = FR_Arg, 0xe3 // if arg NaN inf + cmp.le p9, p0 = GR_TwoP63, GR_Arg // if arg > 0.5*2^63 ('huges') +} +{ .mfb + cmp.ge p8, p0 = GR_OneP125, GR_Arg // if arg<1.125 -near 1 path + fms.s1 FR_XM1 = FR_Arg, f1, f1 // X0 = X-1 (for near 1 path) +(p11) br.cond.spnt acoshl_lt_pone // error branch (less than 1) +};; + +{ .mmi + setf.exp FR_Half = GR_Half // construct 0.5 +(p9) setf.s FR_XLog_Lo = r0 // Low of logl arg=0 (Huges path) + mov GR_exp_mask = 0x1FFFF // Create exponent mask +};; + +{ .mmf +(p8) ldfe FR_PP5 = [GR_Poly_P],16 // Load P5 +(p8) ldfe FR_QQ5 = [GR_Poly_Q],16 // Load Q5 + fms.s1 FR_M2 = FR_X2, f1, f1 // m2 = x^2 - 1 +};; + +{ .mfi +(p8) ldfe FR_QQ4 = [GR_Poly_Q],16 // Load Q4 + fms.s1 FR_M2L = FR_Arg, FR_Arg, FR_X2 // low part of + // m2 = fma(X*X - m2) + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 +} +{ .mfb +(p8) ldfe FR_PP4 = [GR_Poly_P],16 // Load P4 +(p7) fma.s0 FR_Res = FR_Arg,f1,FR_Arg // r = a + a (Nan, Inf) +(p7) br.ret.spnt b0 // return (Nan, Inf) +};; + +{ .mfi +(p8) ldfe FR_PP3 = [GR_Poly_P],16 // Load P3 + nop.f 0 + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_P +} +{ .mfb +(p8) ldfe FR_QQ3 = [GR_Poly_Q],16 // Load Q3 +(p9) fms.s1 FR_XLog_Hi = FR_Two, FR_Arg, f1 // Hi of log arg = 2*X-1 +(p9) br.cond.spnt huges_logl // special version of log +} +;; + +{ .mfi +(p8) ldfe FR_PP2 = [GR_Poly_P],16 // Load P2 +(p8) fma.s1 FR_2XM1 = FR_Two, FR_XM1, f0 // 2X0 = 2 * X0 + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 +} +{ .mfb +(p8) ldfe FR_QQ2 = [GR_Poly_Q],16 // Load Q2 +(p10) fma.s0 FR_Res = f0,f1,f0 // r = 0 (arg = 1) +(p10) br.ret.spnt b0 // return (arg = 1) +};; + +{ .mmi +(p8) ldfe FR_PP1 = [GR_Poly_P],16 // Load P1 +(p8) ldfe FR_QQ1 = [GR_Poly_Q],16 // Load Q1 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 +} +;; + +{ .mfi +(p8) ldfe FR_PP0 = [GR_Poly_P] // Load P0 + fma.s1 FR_Tmp = f1, f1, FR_M2 // Tmp = 1 + m2 + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 +} +{ .mfb +(p8) ldfe FR_QQ0 = [GR_Poly_Q] + nop.f 0 +(p8) br.cond.spnt near_1 // near 1 path +};; +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + nop.f 0 + mov GR_Bias = 0x0FFFF // Create exponent bias +};; +{ .mfi + nop.m 0 + frsqrta.s1 FR_Rcp, p0 = FR_M2 // Rcp = 1/m2 reciprocal appr. + nop.i 0 +};; + +{ .mfi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + fms.s1 FR_Tmp = FR_X2, f1, FR_Tmp // Tmp = x^2 - Tmp + nop.i 0 +};; + +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 + fma.s1 FR_GG = FR_Rcp, FR_M2, f0 // g = Rcp * m2 + // 8 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_Half, FR_Rcp, f0 // h = 0.5 * Rcp + nop.i 0 +};; +{ .mfi + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_M2L = FR_Tmp, f1, FR_M2L // low part of m2 = Tmp+m2l + nop.i 0 +};; + +{ .mfi + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 16 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +};; +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 32 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g + // 64 bit Newton Raphson iteration + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_M2 // Remainder d = g * g - p2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Hi = FR_Arg, f1, FR_GG // bh = z + gh + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_DD = FR_DD, f1, FR_M2L // add p2l: d = d + p2l + nop.i 0 +};; + +{ .mfi + getf.sig GR_signif = FR_XLog_Hi // Get significand of x+1 + nop.f 0 + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GL = FR_DD, FR_HH, f0 // gl = d * h + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +} +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Hi = FR_DD, FR_HH, FR_XLog_Hi // bh = bh + gl + nop.i 0 +};; + + + +{ .mmi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of signif. +};; + +{ .mmi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + nop.m 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_XLog_Lo = FR_Arg, f1, FR_XLog_Hi // bl = x - bh + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +};; + +// WE CANNOT USE GR_X_1 IN NEXT 3 CYCLES BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// "DEAD" ZONE! + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmerge.se FR_S_hi = f1,FR_XLog_Hi // Form |x+1| + nop.i 0 +};; + + +{ .mmi + getf.exp GR_N = FR_XLog_Hi // Get N = exponent of x+1 + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +};; + +{ .mfi + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + fma.s1 FR_XLog_Lo = FR_XLog_Lo, f1, FR_GG // bl = bl + gg + mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 +} +{ .mfi + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + nop.f 0 + sub GR_N = GR_N, GR_Bias // sub bias from exp +};; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) +};; + +{ .mmi + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + nop.m 0 + nop.i 0 +};; + +{ .mmi + setf.sig FR_float_N = GR_N // Put integer N into rightmost sign + setf.exp FR_2_to_minus_N = GR_minus_N // Form 2^(-N) + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1 * Z_2 +};; + +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// (Just nops added - nothing to do here) + +{ .mfi + nop.m 0 + fma.s1 FR_XLog_Lo = FR_XLog_Lo, f1, FR_GL // bl = bl + gl + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +};; + +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fcvt.xf FR_float_N = FR_float_N + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_S_lo = FR_XLog_Lo, FR_2_to_minus_N, f0 //S_lo=S_lo*2^(-N) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2) * G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2) + H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi=N*log2_hi+H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h=N*log2_lo+h + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_r = FR_G, FR_S_lo, FR_r // r=G*S_lo+(G*S_hi-1) + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo=poly_lo*r+Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo + // Y_lo=poly_hi+poly_lo + nop.i 0 +};; + +{ .mfb + nop.m 0 + fadd.s0 FR_Res = FR_Y_lo,FR_Y_hi // Result=Y_lo+Y_hi + br.ret.sptk b0 // Common exit for 2^-7 < x < inf +};; + + +huges_logl: +{ .mmi + getf.sig GR_signif = FR_XLog_Hi // Get significand of x+1 + mov GR_exp_2tom7 = 0x0fff8 // Exponent of 2^-7 + nop.i 0 +};; + +{ .mfi + add GR_ad_tbl_1 = 0x040, GR_ad_z_1 // Point to Constants_G_H_h1 + nop.f 0 + add GR_ad_q = -0x60, GR_ad_z_1 // Point to Constants_P +} +{ .mfi + add GR_ad_z_2 = 0x140, GR_ad_z_1 // Point to Constants_Z_2 + nop.f 0 + add GR_ad_tbl_2 = 0x180, GR_ad_z_1 // Point to Constants_G_H_h2 +};; + +{ .mfi + add GR_ad_tbl_3 = 0x280, GR_ad_z_1 // Point to Constants_G_H_h3 + nop.f 0 + extr.u GR_Index1 = GR_signif, 59, 4 // Get high 4 bits of signif +};; + +{ .mfi + shladd GR_ad_z_1 = GR_Index1, 2, GR_ad_z_1 // Point to Z_1 + nop.f 0 + extr.u GR_X_0 = GR_signif, 49, 15 // Get high 15 bits of signif. +};; + +{ .mfi + ld4 GR_Z_1 = [GR_ad_z_1] // Load Z_1 + nop.f 0 + mov GR_exp_mask = 0x1FFFF // Create exponent mask +} +{ .mfi + shladd GR_ad_tbl_1 = GR_Index1, 4, GR_ad_tbl_1 // Point to G_1 + nop.f 0 + mov GR_Bias = 0x0FFFF // Create exponent bias +};; + +{ .mfi + ldfps FR_G, FR_H = [GR_ad_tbl_1],8 // Load G_1, H_1 + fmerge.se FR_S_hi = f1,FR_XLog_Hi // Form |x| + nop.i 0 +};; + +{ .mmi + getf.exp GR_N = FR_XLog_Hi // Get N = exponent of x+1 + ldfd FR_h = [GR_ad_tbl_1] // Load h_1 + nop.i 0 +};; + +{ .mfi + ldfe FR_log2_hi = [GR_ad_q],16 // Load log2_hi + nop.f 0 + pmpyshr2.u GR_X_1 = GR_X_0,GR_Z_1,15 // Get bits 30-15 of X_0 * Z_1 +};; + +{ .mmi + ldfe FR_log2_lo = [GR_ad_q],16 // Load log2_lo + sub GR_N = GR_N, GR_Bias + mov GR_exp_2tom80 = 0x0ffaf // Exponent of 2^-80 +};; + +{ .mfi + ldfe FR_Q4 = [GR_ad_q],16 // Load Q4 + nop.f 0 + sub GR_minus_N = GR_Bias, GR_N // Form exponent of 2^(-N) +};; + +{ .mmf + ldfe FR_Q3 = [GR_ad_q],16 // Load Q3 + setf.sig FR_float_N = GR_N // Put integer N into rightmost sign + nop.f 0 +};; + +{ .mmi + ldfe FR_Q2 = [GR_ad_q],16 // Load Q2 + nop.m 0 + extr.u GR_Index2 = GR_X_1, 6, 4 // Extract bits 6-9 of X_1 +};; + +{ .mmi + ldfe FR_Q1 = [GR_ad_q] // Load Q1 + shladd GR_ad_z_2 = GR_Index2, 2, GR_ad_z_2 // Point to Z_2 + nop.i 0 +};; + +{ .mmi + ld4 GR_Z_2 = [GR_ad_z_2] // Load Z_2 + shladd GR_ad_tbl_2 = GR_Index2, 4, GR_ad_tbl_2 // Point to G_2 + nop.i 0 +};; + +{ .mmi + ldfps FR_G2, FR_H2 = [GR_ad_tbl_2],8 // Load G_2, H_2 + nop.m 0 + nop.i 0 +};; + +{ .mmf + ldfd FR_h2 = [GR_ad_tbl_2] // Load h_2 + setf.exp FR_2_to_minus_N = GR_minus_N // Form 2^(-N) + nop.f 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + pmpyshr2.u GR_X_2 = GR_X_1,GR_Z_2,15 // Get bits 30-15 of X_1*Z_2 +};; + +// WE CANNOT USE GR_X_2 IN NEXT 3 CYCLES ("DEAD" ZONE!) +// BECAUSE OF POSSIBLE 10 CLOCKS STALL! +// (Just nops added - nothing to do here) + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + nop.i 0 +};; + +{ .mfi + nop.m 0 + nop.f 0 + extr.u GR_Index3 = GR_X_2, 1, 5 // Extract bits 1-5 of X_2 +};; + +{ .mfi + shladd GR_ad_tbl_3 = GR_Index3, 4, GR_ad_tbl_3 // Point to G_3 + fcvt.xf FR_float_N = FR_float_N + nop.i 0 +};; + +{ .mfi + ldfps FR_G3, FR_H3 = [GR_ad_tbl_3],8 // Load G_3, H_3 + nop.f 0 + nop.i 0 +};; + +{ .mfi + ldfd FR_h3 = [GR_ad_tbl_3] // Load h_3 + fmpy.s1 FR_G = FR_G, FR_G2 // G = G_1 * G_2 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H2 // H = H_1 + H_2 + nop.i 0 +};; + +{ .mmf + nop.m 0 + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h2 // h = h_1 + h_2 +};; + +{ .mfi + nop.m 0 + fmpy.s1 FR_G = FR_G, FR_G3 // G = (G_1 * G_2)*G_3 + nop.i 0 +} +{ .mfi + nop.m 0 + fadd.s1 FR_H = FR_H, FR_H3 // H = (H_1 + H_2)+H_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fadd.s1 FR_h = FR_h, FR_h3 // h = (h_1 + h_2) + h_3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_r = FR_G, FR_S_hi, f1 // r = G * S_hi - 1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_Y_hi = FR_float_N, FR_log2_hi, FR_H // Y_hi=N*log2_hi+H + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_h = FR_float_N, FR_log2_lo, FR_h // h = N*log2_lo+h + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_r, FR_Q4, FR_Q3 // poly_lo = r * Q4 + Q3 + nop.i 0 +} +{ .mfi + nop.m 0 + fmpy.s1 FR_rsq = FR_r, FR_r // rsq = r * r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_r, FR_Q2 // poly_lo=poly_lo*r+Q2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_rcub = FR_rsq, FR_r, f0 // rcub = r^3 + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_hi = FR_Q1, FR_rsq, FR_r // poly_hi = Q1*rsq + r + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_poly_lo = FR_poly_lo, FR_rcub, FR_h//poly_lo=poly_lo*r^3+h + nop.i 0 +};; +{ .mfi + nop.m 0 + fadd.s0 FR_Y_lo = FR_poly_hi, FR_poly_lo // Y_lo=poly_hi+poly_lo + nop.i 0 +};; +{ .mfb + nop.m 0 + fadd.s0 FR_Res = FR_Y_lo,FR_Y_hi // Result=Y_lo+Y_hi + br.ret.sptk b0 // Common exit +};; + + +// NEAR ONE INTERVAL +near_1: +{ .mfi + nop.m 0 + frsqrta.s1 FR_Rcp, p0 = FR_2XM1 // Rcp = 1/x reciprocal appr. &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PV6 = FR_PP5, FR_XM1, FR_PP4 // pv6 = P5*xm1+P4 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV6 = FR_QQ5, FR_XM1, FR_QQ4 // qv6 = Q5*xm1+Q4 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PV4 = FR_PP3, FR_XM1, FR_PP2 // pv4 = P3*xm1+P2 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV4 = FR_QQ3, FR_XM1, FR_QQ2 // qv4 = Q3*xm1+Q2 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_XM12 = FR_XM1, FR_XM1, f0 // xm1^2 = xm1 * xm1 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PV2 = FR_PP1, FR_XM1, FR_PP0 // pv2 = P1*xm1+P0 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV2 = FR_QQ1, FR_XM1, FR_QQ0 // qv2 = Q1*xm1+Q0 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_Rcp, FR_2XM1, f0 // g = Rcp * x &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_Half, FR_Rcp, f0 // h = 0.5 * Rcp &SQRT& + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fma.s1 FR_PV3 = FR_XM12, FR_PV6, FR_PV4//pv3=pv6*xm1^2+pv4 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QV3 = FR_XM12, FR_QV6, FR_QV4//qv3=qv6*xm1^2+qv4 $POLY$ + nop.i 0 +};; + + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_PP = FR_XM12, FR_PV3, FR_PV2 //pp=pv3*xm1^2+pv2 $POLY$ + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_QQ = FR_XM12, FR_QV3, FR_QV2 //qq=qv3*xm1^2+qv2 $POLY$ + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + frcpa.s1 FR_Y0,p0 = f1,FR_QQ // y = frcpa(b) #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g*h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Q0 = FR_PP,FR_Y0,f0 // q = a*y #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_E0 = FR_Y0,FR_QQ,f1 // e = 1 - b*y #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_GG, FR_EE, FR_GG // g = g * e + g &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_E2 = FR_E0,FR_E0,FR_E0 // e2 = e+e^2 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_E1 = FR_E0,FR_E0,f0 // e1 = e^2 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_EE = FR_GG, FR_HH, FR_Half // e = 0.5 - g * h &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_2XM1 // d = x - g * g &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Y1 = FR_Y0,FR_E2,FR_Y0 // y1 = y+y*e2 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_E3 = FR_E1,FR_E1,FR_E0 // e3 = e+e1^2 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GG = FR_DD, FR_HH, FR_GG // g = d * h + g &SQRT& + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_HH, FR_EE, FR_HH // h = h * e + h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Y2 = FR_Y1,FR_E3,FR_Y0 // y2 = y+y1*e3 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_R0 = FR_QQ,FR_Q0,FR_PP // r = a-b*q #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_DD = FR_GG, FR_GG, FR_2XM1 // d = x - g * g &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fnma.s1 FR_E4 = FR_QQ,FR_Y2,f1 // e4 = 1-b*y2 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_X_Hi = FR_R0,FR_Y2,FR_Q0 // x = q+r*y2 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_GL = FR_DD, FR_HH, f0 // gl = d * h &SQRT& + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_Y3 = FR_Y2,FR_E4,FR_Y2 // y3 = y2+y2*e4 #DIV# + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 FR_R1 = FR_QQ,FR_X_Hi,FR_PP // r1 = a-b*x #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_HH = FR_GG, FR_X_Hi, f0 // hh = gg * x_hi + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_LH = FR_GL, FR_X_Hi, f0 // lh = gl * x_hi + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_X_lo = FR_R1,FR_Y3,f0 // x_lo = r1*y3 #DIV# + nop.i 0 +};; + +{ .mfi + nop.m 0 + fma.s1 FR_LL = FR_GL, FR_X_lo, f0 // ll = gl*x_lo + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 FR_HL = FR_GG, FR_X_lo, f0 // hl = gg * x_lo + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_GL, f1, FR_LL // res = gl + ll + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_Res, f1, FR_LH // res = res + lh + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_Res, f1, FR_HL // res = res + hl + nop.i 0 +};; + +{ .mfi + nop.m 0 + fms.s1 FR_Res = FR_Res, f1, FR_HH // res = res + hh + nop.i 0 +};; + +{ .mfb + nop.m 0 + fma.s0 FR_Res = FR_Res, f1, FR_GG // result = res + gg + br.ret.sptk b0 // Exit for near 1 path +};; +// NEAR ONE INTERVAL END + + + + +acoshl_lt_pone: +{ .mfi + nop.m 0 + fmerge.s FR_Arg_X = FR_Arg, FR_Arg + nop.i 0 +};; +{ .mfb + mov GR_Parameter_TAG = 135 + frcpa.s0 FR_Res,p0 = f0,f0 // get QNaN,and raise invalid + br.cond.sptk __libm_error_region // exit if x < 1.0 +};; + +GLOBAL_LIBM_END(acoshl) + + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue +{ .mfi + add GR_Parameter_Y = -32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS = ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp = -64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP = gp // Save gp +};; + +{ .mmi + stfe [GR_Parameter_Y] = FR_Arg_Y,16 // Parameter 2 to stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0,GR_SAVE_B0 + mov GR_SAVE_B0 = b0 // Save b0 +};; + +.body +{ .mib + stfe [GR_Parameter_X] = FR_Arg_X // Parameter 1 to stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfe [GR_Parameter_Y] = FR_Res // Parameter 3 to stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0 = __libm_error_support# // Error handling function +};; + +{ .mmi + nop.m 0 + nop.m 0 + add GR_Parameter_RESULT = 48,sp +};; + +{ .mmi + ldfe f8 = [GR_Parameter_RESULT] // Get return res +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region#) + +.type __libm_error_support#,@function +.global __libm_error_support# + + + + diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_acosh.S glibc-2.3.5/sysdeps/ia64/fpu/e_acosh.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_acosh.S 1969-12-31 16:00:00.000000000 -0800 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_acosh.S 2005-04-05 17:30:48.000000000 -0700 @@ -0,0 +1,1202 @@ +.file "acosh.s" + + +// Copyright (c) 2000 - 2005, Intel Corporation +// All rights reserved. +// +// Contributed 2000 by the Intel Numerics Group, Intel Corporation +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// +// * Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in the +// documentation and/or other materials provided with the distribution. +// +// * The name of Intel Corporation may not be used to endorse or promote +// products derived from this software without specific prior written +// permission. + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Intel Corporation is the author of this code, and requests that all +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. +// +// ============================================================== +// History +// ============================================================== +// 03/23/01 Initial version +// 04/19/01 Improved speed of the paths #1,2,3,4,5 +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align +// 05/14/03 Improved performance, set denormal flag for unorms >= 1.0 +// 03/31/05 Reformatted delimiters between data tables +// +// API +// ============================================================== +// double acosh(double) +// +// Overview of operation +// ============================================================== +// +// There are 7 paths: +// 1. x = 1.0 +// Return acosh(x) = 0.0 +// 2. 1.0 < x < 1.000499725341796875(0x3FF0020C00000000) +// Return acosh(x) = sqrt(x-1) * Pol4(x), where Pol4(x) = +// (((x*C4 + C3)*(x-1) + C2)*(x-1) + C1)*(x-1) + C0 + +// 3. 1.000499725341796875(0x3FF0020C00000000) <= x < 2^63 +// Return acosh(x) = log(x + sqrt(x^2 -1.0)) +// To compute x + sqrt(x^2 -1.0) modified Newton Raphson method is used +// (3 iterations) +// Algorithm description for log function see below. +// +// 4. 2^63 <= x < +INF +// Return acosh(x) = log(2*x) +// Algorithm description for log function see below. +// +// 5. x = +INF +// Return acosh(x) = +INF +// +// 6. x = [S,Q]NaN +// Return acosh(x) = QNaN +// +// 7. x < 1.0 +// It's domain error. Error handler with tag = 136 is called +// +//============================================================== +// Algorithm Description for log(x) function +// Below we are using the fact that inequality x - 1.0 > 2^(-6) is always +// true for this acosh implementation +// +// Consider x = 2^N 1.f1 f2 f3 f4...f63 +// Log(x) = log(frcpa(x) x/frcpa(x)) +// = log(1/frcpa(x)) + log(frcpa(x) x) +// = -log(frcpa(x)) + log(frcpa(x) x) +// +// frcpa(x) = 2^-N frcpa((1.f1 f2 ... f63) +// +// -log(frcpa(x)) = -log(C) +// = -log(2^-N) - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 - log(frcpa(1.f1 f2 ... f63)) +// +// -log(frcpa(x)) = -log(C) +// = +Nlog2 + log(frcpa(1.f1 f2 ... f63)) +// +// Log(x) = log(1/frcpa(x)) + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + log(1./frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 - log(/frcpa(1.f1 f2 ... f63)) + log(frcpa(x) x) +// Log(x) = +Nlog2 + T + log(frcpa(x) x) +// +// Log(x) = +Nlog2 + T + log(C x) +// +// Cx = 1 + r +// +// Log(x) = +Nlog2 + T + log(1+r) +// Log(x) = +Nlog2 + T + Series( r - r^2/2 + r^3/3 - r^4/4 ....) +// +// 1.f1 f2 ... f8 has 256 entries. +// They are 1 + k/2^8, k = 0 ... 255 +// These 256 values are the table entries. +// +// Implementation +//============================================================== +// C = frcpa(x) +// r = C * x - 1 +// +// Form rseries = r + P1*r^2 + P2*r^3 + P3*r^4 + P4*r^5 + P5*r^6 +// +// x = f * 2*n where f is 1.f_1f_2f_3....f_63 +// Nfloat = float(n) where n is the true unbiased exponent +// pre-index = f_1f_2....f_8 +// index = pre_index * 16 +// get the dxt table entry at index + offset = T +// +// result = (T + Nfloat * log(2)) + rseries +// +// The T table is calculated as follows +// Form x_k = 1 + k/2^8 where k goes from 0... 255 +// y_k = frcpa(x_k) +// log(1/y_k) in quad and round to double-extended +// + +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input +// f9 -> f15, f32 -> f65 + +// General registers used: +// r14 -> r27, r32 -> r39 + +// Predicate registers used: +// p6 -> p15 + +// p6 to filter out case when x = [Q,S]NaN +// p7,p8 to filter out case when x < 1.0 +// p10 to select path #1 +// p11 to filter out case when x = +INF +// p12 used in the frcpa +// p13 to select path #4 +// p14,p15 to select path #2 + +// Assembly macros +//============================================================== +log_GR_exp_17_ones = r14 +log_GR_signexp_f8 = r15 +log_table_address2 = r16 +log_GR_exp_16_ones = r17 +log_GR_exp_f8 = r18 +log_GR_true_exp_f8 = r19 +log_GR_significand_f8 = r20 +log_GR_index = r21 +log_GR_comp2 = r22 +acosh_GR_f8 = r23 +log_GR_comp = r24 +acosh_GR_f8_sig = r25 +log_table_address3 = r26 +NR_table_address = r27 + +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_SAVE_PFS = r35 + +GR_Parameter_X = r36 +GR_Parameter_Y = r37 +GR_Parameter_RESULT = r38 +acosh_GR_tag = r39 + +//============================================================== +log_y = f9 +NR1 = f10 +NR2 = f11 +log_y_rs = f12 +log_y_rs_iter = f13 +log_y_rs_iter1 = f14 +log_NORM_f8 = f15 +acosh_comp = f32 +log_w = f34 +log_P5 = f35 +log_P4 = f36 +log_P3 = f37 +log_P2 = f38 +log_P1 = f39 +log_C0 = f40 +log_C1 = f41 +log_C2 = f42 +log2 = f43 +acosh_w_rs = f44 +log_C = f45 +log_arg = f46 +acosh_w_iter1 = f47 +acosh_w_iter2 = f48 +log_int_Nfloat = f49 +log_r = f50 +log_rsq = f51 +log_rp_p4 = f52 +log_rp_p32 = f53 +log_rcube = f54 +log_rp_p10 = f55 +log_rp_p2 = f56 +log_Nfloat = f57 +log_T = f58 +log_r2P_r = f59 +log_T_plus_Nlog2 = f60 +acosh_w_sqrt = f61 +acosh_w_1 = f62 +log_C3 = f63 +log_C4 = f64 +log_arg_early = f65 + + +// Data tables +//============================================================== + +RODATA +.align 16 + +LOCAL_OBJECT_START(log_table_1) +data8 0x3FF0020C49BA5E35 // 1.0005 +data8 0xBFC5555DA7212371 // P5 +data8 0x3FC999A19EEF5826 // P4 +data8 0xBFCFFFFFFFFEF009 // P3 +data8 0x3FD555555554ECB2 // P2 +data8 0xBFE0000000000000 // P1 = -0.5 +// +data8 0xb17217f7d1cf79ac, 0x00003ffe // log2 +LOCAL_OBJECT_END(log_table_1) + +LOCAL_OBJECT_START(log_table_2) +data8 0x3FE0000000000000 // 0.5 +data8 0x4008000000000000 // 3.0 +// +data8 0xAFE8F9203939CCF8, 0x00003FF6 // C4 3FF6AFE8F9203939CCF8 +data8 0xAD46EB6AE752D809, 0x0000BFF8 // C3 BFF8AD46EB6AE752D809 +data8 0xD93923D7F53F3627, 0x00003FF9 // C2 3FF9D93923D7F53F3627 +data8 0xF15BEEEFF7D32D36, 0x0000BFFB // C1 BFFBF15BEEEFF7D32D36 +data8 0xB504F333F9DE6484, 0x00003FFF // C0 3FFFB504F333F9DE6484 +LOCAL_OBJECT_END(log_table_2) + + +LOCAL_OBJECT_START(log_table_3) +data8 0x80200aaeac44ef38 , 0x00003ff6 // log(1/frcpa(1+ 0/2^-8)) +// +data8 0xc09090a2c35aa070 , 0x00003ff7 // log(1/frcpa(1+ 1/2^-8)) +data8 0xa0c94fcb41977c75 , 0x00003ff8 // log(1/frcpa(1+ 2/2^-8)) +data8 0xe18b9c263af83301 , 0x00003ff8 // log(1/frcpa(1+ 3/2^-8)) +data8 0x8d35c8d6399c30ea , 0x00003ff9 // log(1/frcpa(1+ 4/2^-8)) +data8 0xadd4d2ecd601cbb8 , 0x00003ff9 // log(1/frcpa(1+ 5/2^-8)) +// +data8 0xce95403a192f9f01 , 0x00003ff9 // log(1/frcpa(1+ 6/2^-8)) +data8 0xeb59392cbcc01096 , 0x00003ff9 // log(1/frcpa(1+ 7/2^-8)) +data8 0x862c7d0cefd54c5d , 0x00003ffa // log(1/frcpa(1+ 8/2^-8)) +data8 0x94aa63c65e70d499 , 0x00003ffa // log(1/frcpa(1+ 9/2^-8)) +data8 0xa54a696d4b62b382 , 0x00003ffa // log(1/frcpa(1+ 10/2^-8)) +// +data8 0xb3e4a796a5dac208 , 0x00003ffa // log(1/frcpa(1+ 11/2^-8)) +data8 0xc28c45b1878340a9 , 0x00003ffa // log(1/frcpa(1+ 12/2^-8)) +data8 0xd35c55f39d7a6235 , 0x00003ffa // log(1/frcpa(1+ 13/2^-8)) +data8 0xe220f037b954f1f5 , 0x00003ffa // log(1/frcpa(1+ 14/2^-8)) +data8 0xf0f3389b036834f3 , 0x00003ffa // log(1/frcpa(1+ 15/2^-8)) +// +data8 0xffd3488d5c980465 , 0x00003ffa // log(1/frcpa(1+ 16/2^-8)) +data8 0x87609ce2ed300490 , 0x00003ffb // log(1/frcpa(1+ 17/2^-8)) +data8 0x8ede9321e8c85927 , 0x00003ffb // log(1/frcpa(1+ 18/2^-8)) +data8 0x96639427f2f8e2f4 , 0x00003ffb // log(1/frcpa(1+ 19/2^-8)) +data8 0x9defad3e8f73217b , 0x00003ffb // log(1/frcpa(1+ 20/2^-8)) +// +data8 0xa582ebd50097029c , 0x00003ffb // log(1/frcpa(1+ 21/2^-8)) +data8 0xac06dbe75ab80fee , 0x00003ffb // log(1/frcpa(1+ 22/2^-8)) +data8 0xb3a78449b2d3ccca , 0x00003ffb // log(1/frcpa(1+ 23/2^-8)) +data8 0xbb4f79635ab46bb2 , 0x00003ffb // log(1/frcpa(1+ 24/2^-8)) +data8 0xc2fec93a83523f3f , 0x00003ffb // log(1/frcpa(1+ 25/2^-8)) +// +data8 0xc99af2eaca4c4571 , 0x00003ffb // log(1/frcpa(1+ 26/2^-8)) +data8 0xd1581106472fa653 , 0x00003ffb // log(1/frcpa(1+ 27/2^-8)) +data8 0xd8002560d4355f2e , 0x00003ffb // log(1/frcpa(1+ 28/2^-8)) +data8 0xdfcb43b4fe508632 , 0x00003ffb // log(1/frcpa(1+ 29/2^-8)) +data8 0xe67f6dff709d4119 , 0x00003ffb // log(1/frcpa(1+ 30/2^-8)) +// +data8 0xed393b1c22351280 , 0x00003ffb // log(1/frcpa(1+ 31/2^-8)) +data8 0xf5192bff087bcc35 , 0x00003ffb // log(1/frcpa(1+ 32/2^-8)) +data8 0xfbdf4ff6dfef2fa3 , 0x00003ffb // log(1/frcpa(1+ 33/2^-8)) +data8 0x81559a97f92f9cc7 , 0x00003ffc // log(1/frcpa(1+ 34/2^-8)) +data8 0x84be72bce90266e8 , 0x00003ffc // log(1/frcpa(1+ 35/2^-8)) +// +data8 0x88bc74113f23def2 , 0x00003ffc // log(1/frcpa(1+ 36/2^-8)) +data8 0x8c2ba3edf6799d11 , 0x00003ffc // log(1/frcpa(1+ 37/2^-8)) +data8 0x8f9dc92f92ea08b1 , 0x00003ffc // log(1/frcpa(1+ 38/2^-8)) +data8 0x9312e8f36efab5a7 , 0x00003ffc // log(1/frcpa(1+ 39/2^-8)) +data8 0x968b08643409ceb6 , 0x00003ffc // log(1/frcpa(1+ 40/2^-8)) +// +data8 0x9a062cba08a1708c , 0x00003ffc // log(1/frcpa(1+ 41/2^-8)) +data8 0x9d845b3abf95485c , 0x00003ffc // log(1/frcpa(1+ 42/2^-8)) +data8 0xa06fd841bc001bb4 , 0x00003ffc // log(1/frcpa(1+ 43/2^-8)) +data8 0xa3f3a74652fbe0db , 0x00003ffc // log(1/frcpa(1+ 44/2^-8)) +data8 0xa77a8fb2336f20f5 , 0x00003ffc // log(1/frcpa(1+ 45/2^-8)) +// +data8 0xab0497015d28b0a0 , 0x00003ffc // log(1/frcpa(1+ 46/2^-8)) +data8 0xae91c2be6ba6a615 , 0x00003ffc // log(1/frcpa(1+ 47/2^-8)) +data8 0xb189d1b99aebb20b , 0x00003ffc // log(1/frcpa(1+ 48/2^-8)) +data8 0xb51cced5de9c1b2c , 0x00003ffc // log(1/frcpa(1+ 49/2^-8)) +data8 0xb819bee9e720d42f , 0x00003ffc // log(1/frcpa(1+ 50/2^-8)) +// +data8 0xbbb2a0947b093a5d , 0x00003ffc // log(1/frcpa(1+ 51/2^-8)) +data8 0xbf4ec1505811684a , 0x00003ffc // log(1/frcpa(1+ 52/2^-8)) +data8 0xc2535bacfa8975ff , 0x00003ffc // log(1/frcpa(1+ 53/2^-8)) +data8 0xc55a3eafad187eb8 , 0x00003ffc // log(1/frcpa(1+ 54/2^-8)) +data8 0xc8ff2484b2c0da74 , 0x00003ffc // log(1/frcpa(1+ 55/2^-8)) +// +data8 0xcc0b1a008d53ab76 , 0x00003ffc // log(1/frcpa(1+ 56/2^-8)) +data8 0xcfb6203844b3209b , 0x00003ffc // log(1/frcpa(1+ 57/2^-8)) +data8 0xd2c73949a47a19f5 , 0x00003ffc // log(1/frcpa(1+ 58/2^-8)) +data8 0xd5daae18b49d6695 , 0x00003ffc // log(1/frcpa(1+ 59/2^-8)) +data8 0xd8f08248cf7e8019 , 0x00003ffc // log(1/frcpa(1+ 60/2^-8)) +// +data8 0xdca7749f1b3e540e , 0x00003ffc // log(1/frcpa(1+ 61/2^-8)) +data8 0xdfc28e033aaaf7c7 , 0x00003ffc // log(1/frcpa(1+ 62/2^-8)) +data8 0xe2e012a5f91d2f55 , 0x00003ffc // log(1/frcpa(1+ 63/2^-8)) +data8 0xe600064ed9e292a8 , 0x00003ffc // log(1/frcpa(1+ 64/2^-8)) +data8 0xe9226cce42b39f60 , 0x00003ffc // log(1/frcpa(1+ 65/2^-8)) +// +data8 0xec4749fd97a28360 , 0x00003ffc // log(1/frcpa(1+ 66/2^-8)) +data8 0xef6ea1bf57780495 , 0x00003ffc // log(1/frcpa(1+ 67/2^-8)) +data8 0xf29877ff38809091 , 0x00003ffc // log(1/frcpa(1+ 68/2^-8)) +data8 0xf5c4d0b245cb89be , 0x00003ffc // log(1/frcpa(1+ 69/2^-8)) +data8 0xf8f3afd6fcdef3aa , 0x00003ffc // log(1/frcpa(1+ 70/2^-8)) +// +data8 0xfc2519756be1abc7 , 0x00003ffc // log(1/frcpa(1+ 71/2^-8)) +data8 0xff59119f503e6832 , 0x00003ffc // log(1/frcpa(1+ 72/2^-8)) +data8 0x8147ce381ae0e146 , 0x00003ffd // log(1/frcpa(1+ 73/2^-8)) +data8 0x82e45f06cb1ad0f2 , 0x00003ffd // log(1/frcpa(1+ 74/2^-8)) +data8 0x842f5c7c573cbaa2 , 0x00003ffd // log(1/frcpa(1+ 75/2^-8)) +// +data8 0x85ce471968c8893a , 0x00003ffd // log(1/frcpa(1+ 76/2^-8)) +data8 0x876e8305bc04066d , 0x00003ffd // log(1/frcpa(1+ 77/2^-8)) +data8 0x891012678031fbb3 , 0x00003ffd // log(1/frcpa(1+ 78/2^-8)) +data8 0x8a5f1493d766a05f , 0x00003ffd // log(1/frcpa(1+ 79/2^-8)) +data8 0x8c030c778c56fa00 , 0x00003ffd // log(1/frcpa(1+ 80/2^-8)) +// +data8 0x8da85df17e31d9ae , 0x00003ffd // log(1/frcpa(1+ 81/2^-8)) +data8 0x8efa663e7921687e , 0x00003ffd // log(1/frcpa(1+ 82/2^-8)) +data8 0x90a22b6875c6a1f8 , 0x00003ffd // log(1/frcpa(1+ 83/2^-8)) +data8 0x91f62cc8f5d24837 , 0x00003ffd // log(1/frcpa(1+ 84/2^-8)) +data8 0x93a06cfc3857d980 , 0x00003ffd // log(1/frcpa(1+ 85/2^-8)) +// +data8 0x94f66d5e6fd01ced , 0x00003ffd // log(1/frcpa(1+ 86/2^-8)) +data8 0x96a330156e6772f2 , 0x00003ffd // log(1/frcpa(1+ 87/2^-8)) +data8 0x97fb3582754ea25b , 0x00003ffd // log(1/frcpa(1+ 88/2^-8)) +data8 0x99aa8259aad1bbf2 , 0x00003ffd // log(1/frcpa(1+ 89/2^-8)) +data8 0x9b0492f6227ae4a8 , 0x00003ffd // log(1/frcpa(1+ 90/2^-8)) +// +data8 0x9c5f8e199bf3a7a5 , 0x00003ffd // log(1/frcpa(1+ 91/2^-8)) +data8 0x9e1293b9998c1daa , 0x00003ffd // log(1/frcpa(1+ 92/2^-8)) +data8 0x9f6fa31e0b41f308 , 0x00003ffd // log(1/frcpa(1+ 93/2^-8)) +data8 0xa0cda11eaf46390e , 0x00003ffd // log(1/frcpa(1+ 94/2^-8)) +data8 0xa22c8f029cfa45aa , 0x00003ffd // log(1/frcpa(1+ 95/2^-8)) +// +data8 0xa3e48badb7856b34 , 0x00003ffd // log(1/frcpa(1+ 96/2^-8)) +data8 0xa5459a0aa95849f9 , 0x00003ffd // log(1/frcpa(1+ 97/2^-8)) +data8 0xa6a79c84480cfebd , 0x00003ffd // log(1/frcpa(1+ 98/2^-8)) +data8 0xa80a946d0fcb3eb2 , 0x00003ffd // log(1/frcpa(1+ 99/2^-8)) +data8 0xa96e831a3ea7b314 , 0x00003ffd // log(1/frcpa(1+100/2^-8)) +// +data8 0xaad369e3dc544e3b , 0x00003ffd // log(1/frcpa(1+101/2^-8)) +data8 0xac92e9588952c815 , 0x00003ffd // log(1/frcpa(1+102/2^-8)) +data8 0xadfa035aa1ed8fdc , 0x00003ffd // log(1/frcpa(1+103/2^-8)) +data8 0xaf6219eae1ad6e34 , 0x00003ffd // log(1/frcpa(1+104/2^-8)) +data8 0xb0cb2e6d8160f753 , 0x00003ffd // log(1/frcpa(1+105/2^-8)) +// +data8 0xb2354249ad950f72 , 0x00003ffd // log(1/frcpa(1+106/2^-8)) +data8 0xb3a056e98ef4a3b4 , 0x00003ffd // log(1/frcpa(1+107/2^-8)) +data8 0xb50c6dba52c6292a , 0x00003ffd // log(1/frcpa(1+108/2^-8)) +data8 0xb679882c33876165 , 0x00003ffd // log(1/frcpa(1+109/2^-8)) +data8 0xb78c07429785cedc , 0x00003ffd // log(1/frcpa(1+110/2^-8)) +// +data8 0xb8faeb8dc4a77d24 , 0x00003ffd // log(1/frcpa(1+111/2^-8)) +data8 0xba6ad77eb36ae0d6 , 0x00003ffd // log(1/frcpa(1+112/2^-8)) +data8 0xbbdbcc915e9bee50 , 0x00003ffd // log(1/frcpa(1+113/2^-8)) +data8 0xbd4dcc44f8cf12ef , 0x00003ffd // log(1/frcpa(1+114/2^-8)) +data8 0xbec0d81bf5b531fa , 0x00003ffd // log(1/frcpa(1+115/2^-8)) +// +data8 0xc034f19c139186f4 , 0x00003ffd // log(1/frcpa(1+116/2^-8)) +data8 0xc14cb69f7c5e55ab , 0x00003ffd // log(1/frcpa(1+117/2^-8)) +data8 0xc2c2abbb6e5fd56f , 0x00003ffd // log(1/frcpa(1+118/2^-8)) +data8 0xc439b2c193e6771e , 0x00003ffd // log(1/frcpa(1+119/2^-8)) +data8 0xc553acb9d5c67733 , 0x00003ffd // log(1/frcpa(1+120/2^-8)) +// +data8 0xc6cc96e441272441 , 0x00003ffd // log(1/frcpa(1+121/2^-8)) +data8 0xc8469753eca88c30 , 0x00003ffd // log(1/frcpa(1+122/2^-8)) +data8 0xc962cf3ce072b05c , 0x00003ffd // log(1/frcpa(1+123/2^-8)) +data8 0xcadeba8771f694aa , 0x00003ffd // log(1/frcpa(1+124/2^-8)) +data8 0xcc5bc08d1f72da94 , 0x00003ffd // log(1/frcpa(1+125/2^-8)) +// +data8 0xcd7a3f99ea035c29 , 0x00003ffd // log(1/frcpa(1+126/2^-8)) +data8 0xcef93860c8a53c35 , 0x00003ffd // log(1/frcpa(1+127/2^-8)) +data8 0xd0192f68a7ed23df , 0x00003ffd // log(1/frcpa(1+128/2^-8)) +data8 0xd19a201127d3c645 , 0x00003ffd // log(1/frcpa(1+129/2^-8)) +data8 0xd2bb92f4061c172c , 0x00003ffd // log(1/frcpa(1+130/2^-8)) +// +data8 0xd43e80b2ee8cc8fc , 0x00003ffd // log(1/frcpa(1+131/2^-8)) +data8 0xd56173601fc4ade4 , 0x00003ffd // log(1/frcpa(1+132/2^-8)) +data8 0xd6e6637efb54086f , 0x00003ffd // log(1/frcpa(1+133/2^-8)) +data8 0xd80ad9f58f3c8193 , 0x00003ffd // log(1/frcpa(1+134/2^-8)) +data8 0xd991d1d31aca41f8 , 0x00003ffd // log(1/frcpa(1+135/2^-8)) +// +data8 0xdab7d02231484a93 , 0x00003ffd // log(1/frcpa(1+136/2^-8)) +data8 0xdc40d532cde49a54 , 0x00003ffd // log(1/frcpa(1+137/2^-8)) +data8 0xdd685f79ed8b265e , 0x00003ffd // log(1/frcpa(1+138/2^-8)) +data8 0xde9094bbc0e17b1d , 0x00003ffd // log(1/frcpa(1+139/2^-8)) +data8 0xe01c91b78440c425 , 0x00003ffd // log(1/frcpa(1+140/2^-8)) +// +data8 0xe14658f26997e729 , 0x00003ffd // log(1/frcpa(1+141/2^-8)) +data8 0xe270cdc2391e0d23 , 0x00003ffd // log(1/frcpa(1+142/2^-8)) +data8 0xe3ffce3a2aa64922 , 0x00003ffd // log(1/frcpa(1+143/2^-8)) +data8 0xe52bdb274ed82887 , 0x00003ffd // log(1/frcpa(1+144/2^-8)) +data8 0xe6589852e75d7df6 , 0x00003ffd // log(1/frcpa(1+145/2^-8)) +// +data8 0xe786068c79937a7d , 0x00003ffd // log(1/frcpa(1+146/2^-8)) +data8 0xe91903adad100911 , 0x00003ffd // log(1/frcpa(1+147/2^-8)) +data8 0xea481236f7d35bb0 , 0x00003ffd // log(1/frcpa(1+148/2^-8)) +data8 0xeb77d48c692e6b14 , 0x00003ffd // log(1/frcpa(1+149/2^-8)) +data8 0xeca84b83d7297b87 , 0x00003ffd // log(1/frcpa(1+150/2^-8)) +// +data8 0xedd977f4962aa158 , 0x00003ffd // log(1/frcpa(1+151/2^-8)) +data8 0xef7179a22f257754 , 0x00003ffd // log(1/frcpa(1+152/2^-8)) +data8 0xf0a450d139366ca7 , 0x00003ffd // log(1/frcpa(1+153/2^-8)) +data8 0xf1d7e0524ff9ffdb , 0x00003ffd // log(1/frcpa(1+154/2^-8)) +data8 0xf30c29036a8b6cae , 0x00003ffd // log(1/frcpa(1+155/2^-8)) +// +data8 0xf4412bc411ea8d92 , 0x00003ffd // log(1/frcpa(1+156/2^-8)) +data8 0xf576e97564c8619d , 0x00003ffd // log(1/frcpa(1+157/2^-8)) +data8 0xf6ad62fa1b5f172f , 0x00003ffd // log(1/frcpa(1+158/2^-8)) +data8 0xf7e499368b55c542 , 0x00003ffd // log(1/frcpa(1+159/2^-8)) +data8 0xf91c8d10abaffe22 , 0x00003ffd // log(1/frcpa(1+160/2^-8)) +// +data8 0xfa553f7018c966f3 , 0x00003ffd // log(1/frcpa(1+161/2^-8)) +data8 0xfb8eb13e185d802c , 0x00003ffd // log(1/frcpa(1+162/2^-8)) +data8 0xfcc8e3659d9bcbed , 0x00003ffd // log(1/frcpa(1+163/2^-8)) +data8 0xfe03d6d34d487fd2 , 0x00003ffd // log(1/frcpa(1+164/2^-8)) +data8 0xff3f8c7581e9f0ae , 0x00003ffd // log(1/frcpa(1+165/2^-8)) +// +data8 0x803e029e280173ae , 0x00003ffe // log(1/frcpa(1+166/2^-8)) +data8 0x80dca10cc52d0757 , 0x00003ffe // log(1/frcpa(1+167/2^-8)) +data8 0x817ba200632755a1 , 0x00003ffe // log(1/frcpa(1+168/2^-8)) +data8 0x821b05f3b01d6774 , 0x00003ffe // log(1/frcpa(1+169/2^-8)) +data8 0x82bacd623ff19d06 , 0x00003ffe // log(1/frcpa(1+170/2^-8)) +// +data8 0x835af8c88e7a8f47 , 0x00003ffe // log(1/frcpa(1+171/2^-8)) +data8 0x83c5f8299e2b4091 , 0x00003ffe // log(1/frcpa(1+172/2^-8)) +data8 0x8466cb43f3d87300 , 0x00003ffe // log(1/frcpa(1+173/2^-8)) +data8 0x850803a67c80ca4b , 0x00003ffe // log(1/frcpa(1+174/2^-8)) +data8 0x85a9a1d11a23b461 , 0x00003ffe // log(1/frcpa(1+175/2^-8)) +// +data8 0x864ba644a18e6e05 , 0x00003ffe // log(1/frcpa(1+176/2^-8)) +data8 0x86ee1182dcc432f7 , 0x00003ffe // log(1/frcpa(1+177/2^-8)) +data8 0x875a925d7e48c316 , 0x00003ffe // log(1/frcpa(1+178/2^-8)) +data8 0x87fdaa109d23aef7 , 0x00003ffe // log(1/frcpa(1+179/2^-8)) +data8 0x88a129ed4becfaf2 , 0x00003ffe // log(1/frcpa(1+180/2^-8)) +// +data8 0x89451278ecd7f9cf , 0x00003ffe // log(1/frcpa(1+181/2^-8)) +data8 0x89b29295f8432617 , 0x00003ffe // log(1/frcpa(1+182/2^-8)) +data8 0x8a572ac5a5496882 , 0x00003ffe // log(1/frcpa(1+183/2^-8)) +data8 0x8afc2d0ce3b2dadf , 0x00003ffe // log(1/frcpa(1+184/2^-8)) +data8 0x8b6a69c608cfd3af , 0x00003ffe // log(1/frcpa(1+185/2^-8)) +// +data8 0x8c101e106e899a83 , 0x00003ffe // log(1/frcpa(1+186/2^-8)) +data8 0x8cb63de258f9d626 , 0x00003ffe // log(1/frcpa(1+187/2^-8)) +data8 0x8d2539c5bd19e2b1 , 0x00003ffe // log(1/frcpa(1+188/2^-8)) +data8 0x8dcc0e064b29e6f1 , 0x00003ffe // log(1/frcpa(1+189/2^-8)) +data8 0x8e734f45d88357ae , 0x00003ffe // log(1/frcpa(1+190/2^-8)) +// +data8 0x8ee30cef034a20db , 0x00003ffe // log(1/frcpa(1+191/2^-8)) +data8 0x8f8b0515686d1d06 , 0x00003ffe // log(1/frcpa(1+192/2^-8)) +data8 0x90336bba039bf32f , 0x00003ffe // log(1/frcpa(1+193/2^-8)) +data8 0x90a3edd23d1c9d58 , 0x00003ffe // log(1/frcpa(1+194/2^-8)) +data8 0x914d0de2f5d61b32 , 0x00003ffe // log(1/frcpa(1+195/2^-8)) +// +data8 0x91be0c20d28173b5 , 0x00003ffe // log(1/frcpa(1+196/2^-8)) +data8 0x9267e737c06cd34a , 0x00003ffe // log(1/frcpa(1+197/2^-8)) +data8 0x92d962ae6abb1237 , 0x00003ffe // log(1/frcpa(1+198/2^-8)) +data8 0x9383fa6afbe2074c , 0x00003ffe // log(1/frcpa(1+199/2^-8)) +data8 0x942f0421651c1c4e , 0x00003ffe // log(1/frcpa(1+200/2^-8)) +// +data8 0x94a14a3845bb985e , 0x00003ffe // log(1/frcpa(1+201/2^-8)) +data8 0x954d133857f861e7 , 0x00003ffe // log(1/frcpa(1+202/2^-8)) +data8 0x95bfd96468e604c4 , 0x00003ffe // log(1/frcpa(1+203/2^-8)) +data8 0x9632d31cafafa858 , 0x00003ffe // log(1/frcpa(1+204/2^-8)) +data8 0x96dfaabd86fa1647 , 0x00003ffe // log(1/frcpa(1+205/2^-8)) +// +data8 0x9753261fcbb2a594 , 0x00003ffe // log(1/frcpa(1+206/2^-8)) +data8 0x9800c11b426b996d , 0x00003ffe // log(1/frcpa(1+207/2^-8)) +data8 0x9874bf4d45ae663c , 0x00003ffe // log(1/frcpa(1+208/2^-8)) +data8 0x99231f5ee9a74f79 , 0x00003ffe // log(1/frcpa(1+209/2^-8)) +data8 0x9997a18a56bcad28 , 0x00003ffe // log(1/frcpa(1+210/2^-8)) +// +data8 0x9a46c873a3267e79 , 0x00003ffe // log(1/frcpa(1+211/2^-8)) +data8 0x9abbcfc621eb6cb6 , 0x00003ffe // log(1/frcpa(1+212/2^-8)) +data8 0x9b310cb0d354c990 , 0x00003ffe // log(1/frcpa(1+213/2^-8)) +data8 0x9be14cf9e1b3515c , 0x00003ffe // log(1/frcpa(1+214/2^-8)) +data8 0x9c5710b8cbb73a43 , 0x00003ffe // log(1/frcpa(1+215/2^-8)) +// +data8 0x9ccd0abd301f399c , 0x00003ffe // log(1/frcpa(1+216/2^-8)) +data8 0x9d7e67f3bdce8888 , 0x00003ffe // log(1/frcpa(1+217/2^-8)) +data8 0x9df4ea81a99daa01 , 0x00003ffe // log(1/frcpa(1+218/2^-8)) +data8 0x9e6ba405a54514ba , 0x00003ffe // log(1/frcpa(1+219/2^-8)) +data8 0x9f1e21c8c7bb62b3 , 0x00003ffe // log(1/frcpa(1+220/2^-8)) +// +data8 0x9f956593f6b6355c , 0x00003ffe // log(1/frcpa(1+221/2^-8)) +data8 0xa00ce1092e5498c3 , 0x00003ffe // log(1/frcpa(1+222/2^-8)) +data8 0xa0c08309c4b912c1 , 0x00003ffe // log(1/frcpa(1+223/2^-8)) +data8 0xa1388a8c6faa2afa , 0x00003ffe // log(1/frcpa(1+224/2^-8)) +data8 0xa1b0ca7095b5f985 , 0x00003ffe // log(1/frcpa(1+225/2^-8)) +// +data8 0xa22942eb47534a00 , 0x00003ffe // log(1/frcpa(1+226/2^-8)) +data8 0xa2de62326449d0a3 , 0x00003ffe // log(1/frcpa(1+227/2^-8)) +data8 0xa357690f88bfe345 , 0x00003ffe // log(1/frcpa(1+228/2^-8)) +data8 0xa3d0a93f45169a4b , 0x00003ffe // log(1/frcpa(1+229/2^-8)) +data8 0xa44a22f7ffe65f30 , 0x00003ffe // log(1/frcpa(1+230/2^-8)) +// +data8 0xa500c5e5b4c1aa36 , 0x00003ffe // log(1/frcpa(1+231/2^-8)) +data8 0xa57ad064eb2ebbc2 , 0x00003ffe // log(1/frcpa(1+232/2^-8)) +data8 0xa5f5152dedf4384e , 0x00003ffe // log(1/frcpa(1+233/2^-8)) +data8 0xa66f9478856233ec , 0x00003ffe // log(1/frcpa(1+234/2^-8)) +data8 0xa6ea4e7cca02c32e , 0x00003ffe // log(1/frcpa(1+235/2^-8)) +// +data8 0xa765437325341ccf , 0x00003ffe // log(1/frcpa(1+236/2^-8)) +data8 0xa81e21e6c75b4020 , 0x00003ffe // log(1/frcpa(1+237/2^-8)) +data8 0xa899ab333fe2b9ca , 0x00003ffe // log(1/frcpa(1+238/2^-8)) +data8 0xa9157039c51ebe71 , 0x00003ffe // log(1/frcpa(1+239/2^-8)) +data8 0xa991713433c2b999 , 0x00003ffe // log(1/frcpa(1+240/2^-8)) +// +data8 0xaa0dae5cbcc048b3 , 0x00003ffe // log(1/frcpa(1+241/2^-8)) +data8 0xaa8a27ede5eb13ad , 0x00003ffe // log(1/frcpa(1+242/2^-8)) +data8 0xab06de228a9e3499 , 0x00003ffe // log(1/frcpa(1+243/2^-8)) +data8 0xab83d135dc633301 , 0x00003ffe // log(1/frcpa(1+244/2^-8)) +data8 0xac3fb076adc7fe7a , 0x00003ffe // log(1/frcpa(1+245/2^-8)) +// +data8 0xacbd3cbbe47988f1 , 0x00003ffe // log(1/frcpa(1+246/2^-8)) +data8 0xad3b06b1a5dc57c3 , 0x00003ffe // log(1/frcpa(1+247/2^-8)) +data8 0xadb90e94af887717 , 0x00003ffe // log(1/frcpa(1+248/2^-8)) +data8 0xae3754a218f7c816 , 0x00003ffe // log(1/frcpa(1+249/2^-8)) +data8 0xaeb5d9175437afa2 , 0x00003ffe // log(1/frcpa(1+250/2^-8)) +// +data8 0xaf349c322e9c7cee , 0x00003ffe // log(1/frcpa(1+251/2^-8)) +data8 0xafb39e30d1768d1c , 0x00003ffe // log(1/frcpa(1+252/2^-8)) +data8 0xb032df51c2c93116 , 0x00003ffe // log(1/frcpa(1+253/2^-8)) +data8 0xb0b25fd3e6035ad9 , 0x00003ffe // log(1/frcpa(1+254/2^-8)) +data8 0xb1321ff67cba178c , 0x00003ffe // log(1/frcpa(1+255/2^-8)) +LOCAL_OBJECT_END(log_table_3) + + +.section .text +GLOBAL_LIBM_ENTRY(acosh) + +{ .mfi + getf.exp acosh_GR_f8 = f8 + fclass.m p6,p0 = f8, 0xc3 // Test for x = NaN + mov log_GR_comp2 = 0x1003e +} +{ .mfi + addl NR_table_address = @ltoff(log_table_1), gp + fms.s1 log_y = f8, f8, f1 // y = x^2-1 + nop.i 0 +} +;; + +{ .mfi + getf.sig acosh_GR_f8_sig = f8 + fclass.m p11,p0 = f8, 0x21 // Test for x=+inf + mov log_GR_exp_17_ones = 0x1ffff +} +{ .mfi + ld8 NR_table_address = [NR_table_address] + fms.s1 log_w = f8,f1,f1 // w = x - 1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fcmp.lt.s1 p7,p8 = f8, f1 // Test for x<1.0 + addl log_GR_comp = 0x10020C,r0 // Upper 21 bits of signif of 1.0005 +} +{ .mfb + mov log_GR_exp_16_ones = 0xffff //BIAS +(p6) fma.d.s0 f8 = f8,f1,f0 // quietize nan result if x=nan +(p6) br.ret.spnt b0 // Exit for x=nan +} +;; + +{ .mfb + //get second table address + adds log_table_address2 = 0x40, NR_table_address + fcmp.eq.s1 p10,p0 = f8, f1 // Test for x=+1.0 +(p11) br.ret.spnt b0 // Exit for x=+inf +} +;; + +{ .mfi + ldfpd NR1,NR2 = [log_table_address2],16 + frsqrta.s1 log_y_rs,p0 = log_y // z=1/sqrt(y) + nop.i 0 +} +{ .mfb + nop.m 0 + fma.s1 log_arg = f8,f1,f8 +(p7) br.cond.spnt ACOSH_LESS_ONE // Branch if path 7, x < 1.0 +} +;; + +{ .mfi + ldfe log_C4 = [log_table_address2],16 +(p8) fcmp.eq.s0 p6,p0 = f8, f0 // Dummy op sets denorm flag if unorm>=1.0 + nop.i 0 +} +{ .mfb +(p8) cmp.le.unc p13,p0 = log_GR_comp2,acosh_GR_f8 + nop.f 0 +(p13) br.cond.spnt LOG_COMMON1 // Branch if path 4, x >= 2^63 +} +;; + +{ .mfi + ldfe log_C3 = [log_table_address2],16 +(p10) fmerge.s f8 = f0, f0 // Return 0 if x=1.0 + shr.u acosh_GR_f8_sig = acosh_GR_f8_sig,43 +} +{ .mib + cmp.eq p14,p0 = log_GR_exp_16_ones,acosh_GR_f8 + nop.i 0 +(p10) br.ret.spnt b0 // Exit for x=1.0 +} +;; + +{ .mfi + ldfe log_C2 = [log_table_address2],16 + frsqrta.s1 acosh_w_rs,p0 = log_w // t=1/sqrt(w) + nop.i 0 +} +{ .mfb +(p14) cmp.lt.unc p15,p0 = acosh_GR_f8_sig,log_GR_comp + nop.f 0 +(p15) br.cond.spnt ACOSH_NEAR_ONE // Branch if path 2, 1.0 < x < 1.0005 +} +;; + +// Here is main path, 1.0005 <= x < 2^63 +/////////////// The first iteration ////////////////////////////////// +{ .mfi + ldfpd acosh_comp,log_P5 = [NR_table_address],16 + fma.s1 log_y_rs_iter = log_y_rs,log_y,f0 // y*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P4,log_P3 = [NR_table_address],16 + fnma.s1 log_y_rs_iter = log_y_rs_iter,log_y_rs,NR2 // 3-(y*z)*z + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs,NR1,f0 // 0.5*z + nop.i 0 +} +;; + +{ .mfi + ldfpd log_P2,log_P1 = [NR_table_address],16 + //(0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs_iter,f0 + nop.i 0 +} +;; + +/////////////////////////// The second iteration ///////////////////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(0.5*z)*(3-(y*z)*z) + fma.s1 log_y_rs_iter = log_y_rs_iter1,log_y_rs,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + //(0.5*z)*(3-(y*z)*z) + fma.s1 log_arg_early = log_y_rs_iter1,log_y_rs,f0 + nop.i 0 +} +;; + +//////////////////////////////////////// The third iteration ///////////////// +{ .mfi + nop.m 0 + fma.s1 log_y_rs = log_y_rs_iter,log_y,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_arg_early = log_arg_early,log_y,f8 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 log_y_rs = log_y_rs,log_y_rs_iter,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_y_rs_iter1 = log_y_rs_iter1,log_y,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + frcpa.s1 log_C,p0 = f1,log_arg_early + nop.i 0 +} +;; + +{ .mfi + getf.exp log_GR_signexp_f8 = log_arg_early + nop.f 0 + nop.i 0 +} +;; + +{ .mfi + getf.sig log_GR_significand_f8 = log_arg_early + fma.s1 log_arg = log_y_rs_iter1,log_y_rs,f8 // (0.5*z)*(3-(y*z)*z) + adds log_table_address3 = 0x70, NR_table_address +} +;; + +///////////////////////////////// The end NR iterations ///////////////////// +{ .mfi + ldfe log2 = [NR_table_address],16 + nop.f 0 + nop.i 0 +} +;; + +{ .mmi + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +;; + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + nop.i 0 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,4,log_table_address3 +;; + ldfe log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p4 = log_P5, log_r, log_P4 //P5*r + P4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rcube = log_rsq, log_r, f0 //r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_rsq, log_P1, log_r //P1*r^2 + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(P5*r + P4)*r^2 + P3*r + P2 + fma.s1 log_rp_p2 = log_rp_p4, log_rsq, log_rp_p32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +{ .mfi + nop.m 0 + //((P5*r + P4)*r^2 + P3*r + P2)*r^3 + P1*r^2 + r + fma.s1 log_r2P_r = log_rp_p2, log_rcube, log_rp_p10 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + // N*log2 + T + ((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fadd.d.s0 f8 = log_T_plus_Nlog2, log_r2P_r + br.ret.sptk b0 // Exit main path, path 3: 1.0005 <= x < 2^63 +} +;; + +// Here if path 2, 1.0 < x < 1.0005 +ACOSH_NEAR_ONE: +// The first NR iteration +{ .mfi + ldfe log_C1 = [log_table_address2],16 + fma.s1 acosh_w_iter1 = acosh_w_rs,log_w,f0 //t*w + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = f8,log_C4,log_C3 //x*C4 + C3 + nop.i 0 +} +;; + +{ .mfi + ldfe log_C0 = [log_table_address2],16 + fma.s1 acosh_w_iter2 = acosh_w_rs,NR1,f0 //t*0.5 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter1,acosh_w_rs,NR2 //3-t*t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //(3-t*t*w)*t*0.5 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C2 //(x*C4 + C3)*(x-1) + C2 + nop.i 0 +} +;; + +// The second NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_rs = acosh_w_iter2,log_w,f0 //t*w + nop.i 0 +} +{ .mfi + nop.m 0 + //((x*C4 + C3)*(x-1) + C2)*(x-1) + C1 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C1 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter2,acosh_w_rs,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +{ .mfi + nop.m 0 + //(((x*C4 + C3)*(x-1) + C2)*(x-1) + C1)*(x-1) + C0 + fma.s1 acosh_w_1 = acosh_w_1,log_w,log_C0 + nop.i 0 +} +;; + +//The third NR iteration +{ .mfi + nop.m 0 + fma.s1 acosh_w_rs = acosh_w_iter2,log_w,f0 //t*w + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fnma.s1 acosh_w_iter1 = acosh_w_iter2,acosh_w_rs,NR2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,NR1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_iter2 = acosh_w_iter2,acosh_w_iter1,f0 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 acosh_w_sqrt = acosh_w_iter2,log_w,f0 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + fma.d.s0 f8 = acosh_w_1,acosh_w_sqrt,f0 + br.ret.sptk b0 // Exit path 2, 1.0 < x < 1.0005 +} +;; + +// Here if path 4, x >= 2^63 +LOG_COMMON1: +{ .mfi + ldfpd acosh_comp,log_P5 = [NR_table_address],16 + frcpa.s1 log_C,p0 = f1,log_arg + nop.i 0 +} +;; + +{ .mmi + getf.exp log_GR_signexp_f8 = log_arg + ldfpd log_P4,log_P3 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mmi + getf.sig log_GR_significand_f8 = log_arg + ldfpd log_P2,log_P1 = [NR_table_address],16 + nop.i 0 +} +;; + +{ .mfi + adds log_table_address3 = 0x70, NR_table_address + nop.f 0 + //significant bit destruction + and log_GR_exp_f8 = log_GR_signexp_f8, log_GR_exp_17_ones +} +;; + +{ .mmf + ldfe log2 = [NR_table_address],16 + //BIAS subtraction + sub log_GR_true_exp_f8 = log_GR_exp_f8, log_GR_exp_16_ones + fms.s1 log_r = log_C,log_arg,f1 // C = frcpa(x); r = C * x - 1 +} +;; + +{ .mfi + setf.sig log_int_Nfloat = log_GR_true_exp_f8 + nop.f 0 + extr.u log_GR_index = log_GR_significand_f8,55,8 //Extract 8 bits +} +;; + +{ .mmi + //pre-index*16 + index + shladd log_table_address3 = log_GR_index,4,log_table_address3 +;; + ldfe log_T = [log_table_address3] + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rsq = log_r, log_r, f0 //r^2 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p4 = log_P5, log_r, log_P4 //P5*r + P4 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rp_p32 = log_P3, log_r, log_P2 //P3*r + P2 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_rcube = log_rsq, log_r, f0 //r^3 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 log_rp_p10 = log_rsq, log_P1, log_r //P1*r^2 + r + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + //convert N to the floating-point format log_Nfloat + fcvt.xf log_Nfloat = log_int_Nfloat + nop.i 0 +} +{ .mfi + nop.m 0 + //(P5*r + P4)*r^2 + P3*r + P2 + fma.s1 log_rp_p2 = log_rp_p4, log_rsq, log_rp_p32 + nop.i 0 +} +;; + +{ .mfi + nop.m 0 + fma.s1 log_T_plus_Nlog2 = log_Nfloat,log2,log_T //N*log2 + T + nop.i 0 +} +{ .mfi + nop.m 0 + //((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fma.s1 log_r2P_r = log_rp_p2, log_rcube, log_rp_p10 + nop.i 0 +} +;; + +{ .mfb + nop.m 0 + // N*log2 + T + ((P5*r + P4)*r^2 + P3*r + P2)*w^3 + P1*r^2 + r + fadd.d.s0 f8 = log_T_plus_Nlog2, log_r2P_r + br.ret.sptk b0 // Exit path 4, x >= 2^63 +} +;; + +// Here if path 7, x < 1.0 +ACOSH_LESS_ONE: +{ .mfi + alloc r32 = ar.pfs,1,3,4,0 + fmerge.s f10 = f8,f8 + nop.i 0 +} +;; + +{ .mfb + mov acosh_GR_tag = 136 + frcpa.s0 f8,p0 = f0,f0 + br.cond.sptk __libm_error_region +} +;; + +GLOBAL_LIBM_END(acosh) + + +LOCAL_LIBM_ENTRY(__libm_error_region) +.prologue + +{ .mfi + add GR_Parameter_Y=-32,sp // Parameter 2 value + nop.f 0 +.save ar.pfs,GR_SAVE_PFS + mov GR_SAVE_PFS=ar.pfs // Save ar.pfs +} +{ .mfi +.fframe 64 + add sp=-64,sp // Create new stack + nop.f 0 + mov GR_SAVE_GP=gp // Save gp +};; + +{ .mmi + stfd [GR_Parameter_Y] = f1,16 // STORE Parameter 2 on stack + add GR_Parameter_X = 16,sp // Parameter 1 address +.save b0, GR_SAVE_B0 + mov GR_SAVE_B0=b0 // Save b0 +};; + +.body +{ .mib + stfd [GR_Parameter_X] = f10 // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 +} +{ .mib + stfd [GR_Parameter_Y] = f8 // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function +};; + +{ .mmi + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; + +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack +.restore sp + add sp = 64,sp // Restore stack pointer + mov b0 = GR_SAVE_B0 // Restore return address +};; + +{ .mib + mov gp = GR_SAVE_GP // Restore gp + mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs + br.ret.sptk b0 // Return +};; + +LOCAL_LIBM_END(__libm_error_region) + + +.type __libm_error_support#,@function +.global __libm_error_support# diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_acosl.S glibc-2.3.5/sysdeps/ia64/fpu/e_acosl.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_acosl.S 2002-07-05 23:35:58.000000000 -0700 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_acosl.S 2005-04-05 17:30:48.000000000 -0700 @@ -1,10 +1,10 @@ .file "acosl.s" -// Copyright (C) 2000, 2001, Intel Corporation + +// Copyright (c) 2001 - 2003, Intel Corporation // All rights reserved. -// -// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, -// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -20,1027 +20,2470 @@ // * The name of Intel Corporation may not be used to endorse or promote // products derived from this software without specific prior written // permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at -// http://developer.intel.com/opensource. +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 2/02/00 Initial version -// 2/07/00 Modified calculation of acos_corr to correct acosl -// 4/04/00 Unwind support added -// 8/15/00 Bundle added after call to __libm_error_support to properly -// set [the previously overwritten] GR_Parameter_RESULT. -// 12/20/00 Set denormal flag properly. +// 08/28/01 New version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align // // API //============================================================== -// double-extended = acosl (double-extended) -// input floating point f8 -// output floating point f8 +// long double acosl(long double) // -// Registers used +// Overview of operation //============================================================== +// Background // -// predicate registers used: -// p6 -> p12 +// Implementation // -// floating-point registers used: -// f8 has input, then output -// f8 -> f15, f32 ->f99 +// For |s| in [2^{-4}, sqrt(2)/2]: +// Let t= 2^k*1.b1 b2..b6 1, where s= 2^k*1.b1 b2.. b52 +// acos(s)= pi/2-asin(t)-asin(r), where r= s*sqrt(1-t^2)-t*sqrt(1-s^2), i.e. +// r= (s-t)*sqrt(1-t^2)-t*sqrt(1-t^2)*(sqrt((1-s^2)/(1-t^2))-1) +// asin(r)-r evaluated as 9-degree polynomial (c3*r^3+c5*r^5+c7*r^7+c9*r^9) +// The 64-bit significands of sqrt(1-t^2), 1/(1-t^2) are read from the table, +// along with the high and low parts of asin(t) (stored as two double precision +// values) // -// general registers used: -// r32 -> r48 +// |s| in (sqrt(2)/2, sqrt(255/256)): +// Let t= 2^k*1.b1 b2..b6 1, where (1-s^2)*frsqrta(1-s^2)= 2^k*1.b1 b2..b6.. +// acos(|s|)= asin(t)-asin(r) +// acos(-|s|)=pi-asin(t)+asin(r), r= s*t-sqrt(1-s^2)*sqrt(1-t^2) +// To minimize accumulated errors, r is computed as +// r= (t*s)_s-t^2*y*z+z*y*(t^2-1+s^2)_s+z*y*(1-s^2)_s*x+z'*y*(1-s^2)*PS29+ +// +(t*s-(t*s)_s)+z*y*((t^2-1-(t^2-1+s^2)_s)+s^2)+z*y*(1-s^2-(1-s^2)_s)+ +// +ez*z'*y*(1-s^2)*(1-x), +// where y= frsqrta(1-s^2), z= (sqrt(1-t^2))_s (rounded to 24 significant bits) +// z'= sqrt(1-t^2), x= ((1-s^2)*y^2-1)/2 // -// Overview of operation -//============================================================== -// There are three paths -// 1. |x| < 2^-25 ACOS_TINY -// 2. 2^-25 <= |x| < 1/4 ACOS_POLY -// 3. 1/4 <= |x| < 1 ACOS_ATAN +// |s|<2^{-4}: evaluate asin(s) as 17-degree polynomial, return pi/2-asin(s) +// (or simply return pi/2-s, if|s|<2^{-64}) +// +// |s| in [sqrt(255/256), 1): acos(|s|)= asin(sqrt(1-s^2)) +// acos(-|s|)= pi-asin(sqrt(1-s^2)) +// use 17-degree polynomial for asin(sqrt(1-s^2)), +// 9-degree polynomial to evaluate sqrt(1-s^2) +// High order term is (pi)_high-(y*(1-s^2))_high, for s<0, +// or y*(1-s^2)_s, for s>0 +// + -#include "libm_support.h" -// Assembly macros +// Registers used //============================================================== +// f6-f15, f32-f36 +// r2-r3, r23-r23 +// p6, p7, p8, p12 +// -// f8 is input, but acos_V must be put in f8 -// when __libm_atan2_reg is called, f8 must get V -// f9 gets U when __libm_atan2_reg is called - - -// __libm_atan2_reg returns -// f8 = Z_hi -// f10 = Z_lo -// f11 = s_lo - -acos_Z_hi = f8 -acos_Z_lo = f10 -acos_S_lo = f11 - -// When we call __libm_atan2_reg, we must save -// the following: - -acos_corr = f12 -acos_X = f13 -acos_pi_hi = f14 -acos_pi_lo = f15 - -// The rest of the assembly macros - -acos_P79 = f32 -acos_P59 = f33 -acos_P39 = f34 -acos_P19 = f35 - -acos_P810 = f36 -acos_P610 = f37 -acos_P410 = f38 -acos_P210 = f39 - -acos_A1 = f41 -acos_A2 = f42 -acos_A3 = f43 -acos_A4 = f44 -acos_A5 = f45 -acos_A6 = f46 -acos_A7 = f47 -acos_A8 = f48 -acos_A9 = f49 -acos_A10 = f50 - -acos_X2 = f51 -acos_X4 = f52 - -acos_B = f53 -acos_Bb = f54 -acos_A = f55 -acos_Aa = f56 - -acos_1mA = f57 - -acos_W = f58 -acos_Ww = f59 - -acos_y0 = f60 -acos_y1 = f61 -acos_y2 = f62 - -acos_H = f63 -acos_Hh = f64 - -acos_t1 = f65 -acos_t2 = f66 -acos_t3 = f67 -acos_t4 = f68 -acos_t5 = f69 - -acos_Pseries = f70 -acos_NORM_f8 = f71 -acos_ABS_NORM_f8 = f72 - -acos_2 = f73 -acos_P1P2 = f74 -acos_HALF = f75 -acos_U = f76 - -acos_1mB = f77 -acos_V = f78 -acos_S = f79 - -acos_BmUU = f80 -acos_BmUUpb = f81 -acos_2U = f82 -acos_1d2U = f83 - -acos_Dd = f84 - -acos_pi_by_2_hi = f85 -acos_pi_by_2_lo = f86 -acos_xmpi_by_2_lo = f87 -acos_xPmw = f88 - -acos_Uu = f89 -acos_AmVV = f90 -acos_AmVVpa = f91 - -acos_2V = f92 -acos_1d2V = f93 -acos_Vv = f94 - -acos_Vu = f95 -acos_Uv = f96 - -acos_2_Z_hi = f97 -acos_s_lo_Z_lo = f98 -acos_result_lo = f99 - -acos_Z_hi = f8 -acos_Z_lo = f10 -acos_s_lo = f11 - -acos_GR_17_ones = r33 -acos_GR_16_ones = r34 -acos_GR_signexp_f8 = r35 -acos_GR_exp = r36 -acos_GR_true_exp = r37 -acos_GR_fffe = r38 - -GR_SAVE_PFS = r43 -GR_SAVE_B0 = r39 -GR_SAVE_GP = r41 - -// r40 is address of table of coefficients -// r42 - -GR_Parameter_X = r44 -GR_Parameter_Y = r45 -GR_Parameter_RESULT = r46 -GR_Parameter_TAG = r47 - - -// 2^-40: -// A true exponent of -40 is -// : -40 + register_bias -// : -28 + ffff = ffd7 - -// A true exponent of 1 is -// : 1 + register_bias -// : 1 + ffff = 10000 -// Data tables -//============================================================== + GR_SAVE_B0= r33 + GR_SAVE_PFS= r34 + GR_SAVE_GP= r35 // This reg. can safely be used + GR_SAVE_SP= r36 + + GR_Parameter_X= r37 + GR_Parameter_Y= r38 + GR_Parameter_RESULT= r39 + GR_Parameter_TAG= r40 + + FR_X= f10 + FR_Y= f1 + FR_RESULT= f8 + + + +RODATA + +.align 16 + +LOCAL_OBJECT_START(T_table) + +// stores 64-bit significand of 1/(1-t^2), 64-bit significand of sqrt(1-t^2), +// asin(t)_high (double precision), asin(t)_low (double precision) + +data8 0x80828692b71c4391, 0xff7ddcec2d87e879 +data8 0x3fb022bc0ae531a0, 0x3c9f599c7bb42af6 +data8 0x80869f0163d0b082, 0xff79cad2247914d3 +data8 0x3fb062dd26afc320, 0x3ca4eff21bd49c5c +data8 0x808ac7d5a8690705, 0xff75a89ed6b626b9 +data8 0x3fb0a2ff4a1821e0, 0x3cb7e33b58f164cc +data8 0x808f0112ad8ad2e0, 0xff7176517c2cc0cb +data8 0x3fb0e32279319d80, 0x3caee31546582c43 +data8 0x80934abba8a1da0a, 0xff6d33e949b1ed31 +data8 0x3fb12346b8101da0, 0x3cb8bfe463d087cd +data8 0x8097a4d3dbe63d8f, 0xff68e16571015c63 +data8 0x3fb1636c0ac824e0, 0x3c8870a7c5a3556f +data8 0x809c0f5e9662b3dd, 0xff647ec520bca0f0 +data8 0x3fb1a392756ed280, 0x3c964f1a927461ae +data8 0x80a08a5f33fadc66, 0xff600c07846a6830 +data8 0x3fb1e3b9fc19e580, 0x3c69eb3576d56332 +data8 0x80a515d91d71acd4, 0xff5b892bc475affa +data8 0x3fb223e2a2dfbe80, 0x3c6a4e19fd972fb6 +data8 0x80a9b1cfc86ff7cd, 0xff56f631062cf93d +data8 0x3fb2640c6dd76260, 0x3c62041160e0849e +data8 0x80ae5e46b78b0d68, 0xff5253166bc17794 +data8 0x3fb2a43761187c80, 0x3cac61651af678c0 +data8 0x80b31b417a4b756b, 0xff4d9fdb14463dc8 +data8 0x3fb2e46380bb6160, 0x3cb06ef23eeba7a1 +data8 0x80b7e8c3ad33c369, 0xff48dc7e1baf6738 +data8 0x3fb32490d0d910c0, 0x3caa05f480b300d5 +data8 0x80bcc6d0f9c784d6, 0xff4408fe9ad13e37 +data8 0x3fb364bf558b3820, 0x3cb01e7e403aaab9 +data8 0x80c1b56d1692492d, 0xff3f255ba75f5f4e +data8 0x3fb3a4ef12ec3540, 0x3cb4fe8fcdf5f5f1 +data8 0x80c6b49bc72ec446, 0xff3a319453ebd961 +data8 0x3fb3e5200d171880, 0x3caf2dc089b2b7e2 +data8 0x80cbc460dc4e0ae8, 0xff352da7afe64ac6 +data8 0x3fb425524827a720, 0x3cb75a855e7c6053 +data8 0x80d0e4c033bee9c4, 0xff301994c79afb32 +data8 0x3fb46585c83a5e00, 0x3cb3264981c019ab +data8 0x80d615bdb87556db, 0xff2af55aa431f291 +data8 0x3fb4a5ba916c73c0, 0x3c994251d94427b5 +data8 0x80db575d6291fd8a, 0xff25c0f84bae0cb9 +data8 0x3fb4e5f0a7dbdb20, 0x3cbee2fcc4c786cb +data8 0x80e0a9a33769e535, 0xff207c6cc0ec09fd +data8 0x3fb526280fa74620, 0x3c940656e5549b91 +data8 0x80e60c93498e32cd, 0xff1b27b703a19c98 +data8 0x3fb56660ccee2740, 0x3ca7082374d7b2cd +data8 0x80eb8031b8d4052d, 0xff15c2d6105c72f8 +data8 0x3fb5a69ae3d0b520, 0x3c7c4d46e09ac68a +data8 0x80f10482b25c6c8a, 0xff104dc8e0813ed4 +data8 0x3fb5e6d6586fec20, 0x3c9aa84ffd9b4958 +data8 0x80f6998a709c7cfb, 0xff0ac88e6a4ab926 +data8 0x3fb627132eed9140, 0x3cbced2cbbbe7d16 +data8 0x80fc3f4d3b657c44, 0xff053325a0c8a2ec +data8 0x3fb667516b6c34c0, 0x3c6489c5fc68595a +data8 0x8101f5cf67ed2af8, 0xfeff8d8d73dec2bb +data8 0x3fb6a791120f33a0, 0x3cbe12acf159dfad +data8 0x8107bd1558d6291f, 0xfef9d7c4d043df29 +data8 0x3fb6e7d226fabba0, 0x3ca386d099cd0dc7 +data8 0x810d95237e38766a, 0xfef411ca9f80b5f7 +data8 0x3fb72814ae53cc20, 0x3cb9f35731e71dd6 +data8 0x81137dfe55aa0e29, 0xfeee3b9dc7eef009 +data8 0x3fb76858ac403a00, 0x3c74df3dd959141a +data8 0x811977aa6a479f0f, 0xfee8553d2cb8122c +data8 0x3fb7a89e24e6b0e0, 0x3ca6034406ee42bc +data8 0x811f822c54bd5ef8, 0xfee25ea7add46a91 +data8 0x3fb7e8e51c6eb6a0, 0x3cb82f8f78e68ed7 +data8 0x81259d88bb4ffac1, 0xfedc57dc2809fb1d +data8 0x3fb8292d9700ad60, 0x3cbebb73c0e653f9 +data8 0x812bc9c451e5a257, 0xfed640d974eb6068 +data8 0x3fb8697798c5d620, 0x3ca2feee76a9701b +data8 0x813206e3da0f3124, 0xfed0199e6ad6b585 +data8 0x3fb8a9c325e852e0, 0x3cb9e88f2f4d0efe +data8 0x813854ec231172f9, 0xfec9e229dcf4747d +data8 0x3fb8ea1042932a00, 0x3ca5ff40d81f66fd +data8 0x813eb3e209ee858f, 0xfec39a7a9b36538b +data8 0x3fb92a5ef2f247c0, 0x3cb5e3bece4d6b07 +data8 0x814523ca796f56ce, 0xfebd428f72561efe +data8 0x3fb96aaf3b3281a0, 0x3cb7b9e499436d7c +data8 0x814ba4aa6a2d3ff9, 0xfeb6da672bd48fe4 +data8 0x3fb9ab011f819860, 0x3cb9168143cc1a7f +data8 0x81523686e29bbdd7, 0xfeb062008df81f50 +data8 0x3fb9eb54a40e3ac0, 0x3cb6e544197eb1e1 +data8 0x8158d964f7124614, 0xfea9d95a5bcbd65a +data8 0x3fba2ba9cd080800, 0x3ca9a717be8f7446 +data8 0x815f8d49c9d639e4, 0xfea34073551e1ac8 +data8 0x3fba6c009e9f9260, 0x3c741e989a60938a +data8 0x8166523a8b24f626, 0xfe9c974a367f785c +data8 0x3fbaac591d0661a0, 0x3cb2c1290107e57d +data8 0x816d283c793e0114, 0xfe95ddddb94166cb +data8 0x3fbaecb34c6ef600, 0x3c9c7d5fbaec405d +data8 0x81740f54e06d55bd, 0xfe8f142c93750c50 +data8 0x3fbb2d0f310cca00, 0x3cbc09479a9cbcfb +data8 0x817b07891b15cd5e, 0xfe883a3577e9fceb +data8 0x3fbb6d6ccf1455e0, 0x3cb9450bff4ee307 +data8 0x818210de91bba6c8, 0xfe814ff7162cf62f +data8 0x3fbbadcc2abb1180, 0x3c9227fda12a8d24 +data8 0x81892b5abb0f2bf9, 0xfe7a55701a8697b1 +data8 0x3fbbee2d48377700, 0x3cb6fad72acfe356 +data8 0x819057031bf7760e, 0xfe734a9f2dfa1810 +data8 0x3fbc2e902bc10600, 0x3cb4465b588d16ad +data8 0x819793dd479d4fbe, 0xfe6c2f82f643f68b +data8 0x3fbc6ef4d9904580, 0x3c8b9ac54823960d +data8 0x819ee1eedf76367a, 0xfe65041a15d8a92c +data8 0x3fbcaf5b55dec6a0, 0x3ca2b8d28a954db2 +data8 0x81a6413d934f7a66, 0xfe5dc8632be3477f +data8 0x3fbcefc3a4e727a0, 0x3c9380da83713ab4 +data8 0x81adb1cf21597d4b, 0xfe567c5cd44431d5 +data8 0x3fbd302dcae51600, 0x3ca995b83421756a +data8 0x81b533a9563310b8, 0xfe4f2005a78fb50f +data8 0x3fbd7099cc155180, 0x3caefa2f7a817d5f +data8 0x81bcc6d20cf4f373, 0xfe47b35c3b0caaeb +data8 0x3fbdb107acb5ae80, 0x3cb455fc372dd026 +data8 0x81c46b4f2f3d6e68, 0xfe40365f20b316d6 +data8 0x3fbdf177710518c0, 0x3cbee3dcc5b01434 +data8 0x81cc2126b53c1144, 0xfe38a90ce72abf36 +data8 0x3fbe31e91d439620, 0x3cb3e131c950aebd +data8 0x81d3e85ea5bd8ee2, 0xfe310b6419c9c33a +data8 0x3fbe725cb5b24900, 0x3c01d3fac6029027 +data8 0x81dbc0fd1637b9c1, 0xfe295d6340932d15 +data8 0x3fbeb2d23e937300, 0x3c6304cc44aeedd1 +data8 0x81e3ab082ad5a0a4, 0xfe219f08e03580b3 +data8 0x3fbef349bc2a77e0, 0x3cac1d2d6abe9c72 +data8 0x81eba6861683cb97, 0xfe19d0537a0946e2 +data8 0x3fbf33c332bbe020, 0x3ca0909dba4e96ca +data8 0x81f3b37d1afc9979, 0xfe11f1418c0f94e2 +data8 0x3fbf743ea68d5b60, 0x3c937fc12a2a779a +data8 0x81fbd1f388d4be45, 0xfe0a01d190f09063 +data8 0x3fbfb4bc1be5c340, 0x3cbf51a504b55813 +data8 0x820401efbf87e248, 0xfe020201fff9efea +data8 0x3fbff53b970d1e80, 0x3ca625444b260078 +data8 0x82106ad2ffdca049, 0xfdf5e3940a49135e +data8 0x3fc02aff52065460, 0x3c9125d113e22a57 +data8 0x8221343d6ea1d3e2, 0xfde581a45429b0a0 +data8 0x3fc06b84f8e03220, 0x3caccf362295894b +data8 0x82324434adbf99c2, 0xfdd4de1a001fb775 +data8 0x3fc0ac0ed1fe7240, 0x3cc22f676096b0af +data8 0x82439aee8d0c7747, 0xfdc3f8e8269d1f03 +data8 0x3fc0ec9cee9e4820, 0x3cca147e2886a628 +data8 0x825538a1d0fcb2f0, 0xfdb2d201a9b1ba66 +data8 0x3fc12d2f6006f0a0, 0x3cc72b36633bc2d4 +data8 0x82671d86345c5cee, 0xfda1695934d723e7 +data8 0x3fc16dc63789de60, 0x3cb11f9c47c7b83f +data8 0x827949d46a121770, 0xfd8fbee13cbbb823 +data8 0x3fc1ae618682e620, 0x3cce1b59020cef8e +data8 0x828bbdc61eeab9ba, 0xfd7dd28bff0c9f34 +data8 0x3fc1ef015e586c40, 0x3cafec043e0225ee +data8 0x829e7995fb6de9e1, 0xfd6ba44b823ee1ca +data8 0x3fc22fa5d07b90c0, 0x3cba905409caf8e3 +data8 0x82b17d7fa5bbc982, 0xfd5934119557883a +data8 0x3fc2704eee685da0, 0x3cb5ef21838a823e +data8 0x82c4c9bfc373d276, 0xfd4681cfcfb2c161 +data8 0x3fc2b0fcc9a5f3e0, 0x3ccc7952c5e0e312 +data8 0x82d85e93fba50136, 0xfd338d7790ca0f41 +data8 0x3fc2f1af73c6ba00, 0x3cbecf5f977d1ca9 +data8 0x82ec3c3af8c76b32, 0xfd2056f9fff97727 +data8 0x3fc33266fe6889a0, 0x3c9d329c022ebdb5 +data8 0x830062f46abf6022, 0xfd0cde480c43b327 +data8 0x3fc373237b34de60, 0x3cc95806d4928adb +data8 0x8314d30108ea35f0, 0xfcf923526c1562b2 +data8 0x3fc3b3e4fbe10520, 0x3cbc299fe7223d54 +data8 0x83298ca29434df97, 0xfce526099d0737ed +data8 0x3fc3f4ab922e4a60, 0x3cb59d8bb8fdbccc +data8 0x833e901bd93c7009, 0xfcd0e65de39f1f7c +data8 0x3fc435774fea2a60, 0x3c9ec18b43340914 +data8 0x8353ddb0b278aad8, 0xfcbc643f4b106055 +data8 0x3fc4764846ee80a0, 0x3cb90402efd87ed6 +data8 0x836975a60a70c52e, 0xfca79f9da4fab13a +data8 0x3fc4b71e8921b860, 0xbc58f23449ed6365 +data8 0x837f5841ddfa7a46, 0xfc92986889284148 +data8 0x3fc4f7fa2876fca0, 0xbc6294812bf43acd +data8 0x839585cb3e839773, 0xfc7d4e8f554ab12f +data8 0x3fc538db36ee6960, 0x3cb910b773d4c578 +data8 0x83abfe8a5466246f, 0xfc67c2012cb6fa68 +data8 0x3fc579c1c6953cc0, 0x3cc5ede909fc47fc +data8 0x83c2c2c861474d91, 0xfc51f2acf82041d5 +data8 0x3fc5baade9860880, 0x3cac63cdfc3588e5 +data8 0x83d9d2cfc2813637, 0xfc3be08165519325 +data8 0x3fc5fb9fb1e8e3a0, 0x3cbf7c8466578c29 +data8 0x83f12eebf397daac, 0xfc258b6ce6e6822f +data8 0x3fc63c9731f39d40, 0x3cb6d2a7ffca3e9e +data8 0x8408d76990b9296e, 0xfc0ef35db402af94 +data8 0x3fc67d947be9eec0, 0x3cb1980da09e6566 +data8 0x8420cc9659487cd7, 0xfbf81841c8082dc4 +data8 0x3fc6be97a21daf00, 0x3cc2ac8330e59aa5 +data8 0x84390ec132759ecb, 0xfbe0fa06e24cc390 +data8 0x3fc6ffa0b6ef05e0, 0x3ccc1a030fee56c4 +data8 0x84519e3a29df811a, 0xfbc9989a85ce0954 +data8 0x3fc740afcccca000, 0x3cc19692a5301ca6 +data8 0x846a7b527842d61b, 0xfbb1f3e9f8e45dc4 +data8 0x3fc781c4f633e2c0, 0x3cc0e98f3868a508 +data8 0x8483a65c8434b5f0, 0xfb9a0be244f4af45 +data8 0x3fc7c2e045b12140, 0x3cb2a8d309754420 +data8 0x849d1fabe4e97dd7, 0xfb81e070362116d1 +data8 0x3fc80401cddfd120, 0x3ca7a44544aa4ce6 +data8 0x84b6e795650817ea, 0xfb6971805af8411e +data8 0x3fc84529a16ac020, 0x3c9e3b709c7d6f94 +data8 0x84d0fe6f0589da92, 0xfb50beff0423a2f5 +data8 0x3fc88657d30c49e0, 0x3cc60d65a7f0a278 +data8 0x84eb649000a73014, 0xfb37c8d84414755c +data8 0x3fc8c78c758e8e80, 0x3cc94b2ee984c2b7 +data8 0x85061a50ccd13781, 0xfb1e8ef7eeaf764b +data8 0x3fc908c79bcba900, 0x3cc8540ae794a2fe +data8 0x8521200b1fb8916e, 0xfb05114998f76a83 +data8 0x3fc94a0958ade6c0, 0x3ca127f49839fa9c +data8 0x853c7619f1618bf6, 0xfaeb4fb898b65d19 +data8 0x3fc98b51bf2ffee0, 0x3c8c9ba7a803909a +data8 0x85581cd97f45e274, 0xfad14a3004259931 +data8 0x3fc9cca0e25d4ac0, 0x3cba458e91d3bf54 +data8 0x857414a74f8446b4, 0xfab7009ab1945a54 +data8 0x3fca0df6d551fe80, 0x3cc78ea1d329d2b2 +data8 0x85905de2341dea46, 0xfa9c72e3370d2fbc +data8 0x3fca4f53ab3b6200, 0x3ccf60dca86d57ef +data8 0x85acf8ea4e423ff8, 0xfa81a0f3e9fa0ee9 +data8 0x3fca90b777580aa0, 0x3ca4c4e2ec8a867e +data8 0x85c9e62111a92e7d, 0xfa668ab6dec711b1 +data8 0x3fcad2224cf814e0, 0x3c303de5980d071c +data8 0x85e725e947fbee97, 0xfa4b3015e883dbfe +data8 0x3fcb13943f7d5f80, 0x3cc29d4eefa5cb1e +data8 0x8604b8a7144cd054, 0xfa2f90fa9883a543 +data8 0x3fcb550d625bc6a0, 0x3c9e01a746152daf +data8 0x86229ebff69e2415, 0xfa13ad4e3dfbe1c1 +data8 0x3fcb968dc9195ea0, 0x3ccc091bd73ae518 +data8 0x8640d89acf78858c, 0xf9f784f9e5a1877b +data8 0x3fcbd815874eb160, 0x3cb5f4b89875e187 +data8 0x865f669fe390c7f5, 0xf9db17e65944eacf +data8 0x3fcc19a4b0a6f9c0, 0x3cc5c0bc2b0bbf14 +data8 0x867e4938df7dc45f, 0xf9be65fc1f6c2e6e +data8 0x3fcc5b3b58e061e0, 0x3cc1ca70df8f57e7 +data8 0x869d80d0db7e4c0c, 0xf9a16f237aec427a +data8 0x3fcc9cd993cc4040, 0x3cbae93acc85eccf +data8 0x86bd0dd45f4f8265, 0xf98433446a806e70 +data8 0x3fccde7f754f5660, 0x3cb22f70e64568d0 +data8 0x86dcf0b16613e37a, 0xf966b246a8606170 +data8 0x3fcd202d11620fa0, 0x3c962030e5d4c849 +data8 0x86fd29d7624b3d5d, 0xf948ec11a9d4c45b +data8 0x3fcd61e27c10c0a0, 0x3cc7083c91d59217 +data8 0x871db9b741dbe44a, 0xf92ae08c9eca4941 +data8 0x3fcda39fc97be7c0, 0x3cc9258579e57211 +data8 0x873ea0c3722d6af2, 0xf90c8f9e71633363 +data8 0x3fcde5650dd86d60, 0x3ca4755a9ea582a9 +data8 0x875fdf6fe45529e8, 0xf8edf92dc5875319 +data8 0x3fce27325d6fe520, 0x3cbc1e2b6c1954f9 +data8 0x878176321154e2bc, 0xf8cf1d20f87270b8 +data8 0x3fce6907cca0d060, 0x3cb6ca4804750830 +data8 0x87a36580fe6bccf5, 0xf8affb5e20412199 +data8 0x3fceaae56fdee040, 0x3cad6b310d6fd46c +data8 0x87c5add5417a5cb9, 0xf89093cb0b7c0233 +data8 0x3fceeccb5bb33900, 0x3cc16e99cedadb20 +data8 0x87e84fa9057914ca, 0xf870e64d40a15036 +data8 0x3fcf2eb9a4bcb600, 0x3cc75ee47c8b09e9 +data8 0x880b4b780f02b709, 0xf850f2c9fdacdf78 +data8 0x3fcf70b05fb02e20, 0x3cad6350d379f41a +data8 0x882ea1bfc0f228ac, 0xf830b926379e6465 +data8 0x3fcfb2afa158b8a0, 0x3cce0ccd9f829985 +data8 0x885252ff21146108, 0xf810394699fe0e8e +data8 0x3fcff4b77e97f3e0, 0x3c9b30faa7a4c703 +data8 0x88765fb6dceebbb3, 0xf7ef730f865f6df0 +data8 0x3fd01b6406332540, 0x3cdc5772c9e0b9bd +data8 0x88ad1f69be2cc730, 0xf7bdc59bc9cfbd97 +data8 0x3fd04cf8ad203480, 0x3caeef44fe21a74a +data8 0x88f763f70ae2245e, 0xf77a91c868a9c54e +data8 0x3fd08f23ce0162a0, 0x3cd6290ab3fe5889 +data8 0x89431fc7bc0c2910, 0xf73642973c91298e +data8 0x3fd0d1610f0c1ec0, 0x3cc67401a01f08cf +data8 0x8990573407c7738e, 0xf6f0d71d1d7a2dd6 +data8 0x3fd113b0c65d88c0, 0x3cc7aa4020fe546f +data8 0x89df0eb108594653, 0xf6aa4e6a05cfdef2 +data8 0x3fd156134ada6fe0, 0x3cc87369da09600c +data8 0x8a2f4ad16e0ed78a, 0xf662a78900c35249 +data8 0x3fd19888f43427a0, 0x3cc62b220f38e49c +data8 0x8a811046373e0819, 0xf619e180181d97cc +data8 0x3fd1db121aed7720, 0x3ca3ede7490b52f4 +data8 0x8ad463df6ea0fa2c, 0xf5cffb504190f9a2 +data8 0x3fd21daf185fa360, 0x3caafad98c1d6c1b +data8 0x8b294a8cf0488daf, 0xf584f3f54b8604e6 +data8 0x3fd2606046bf95a0, 0x3cdb2d704eeb08fa +data8 0x8b7fc95f35647757, 0xf538ca65c960b582 +data8 0x3fd2a32601231ec0, 0x3cc661619fa2f126 +data8 0x8bd7e588272276f8, 0xf4eb7d92ff39fccb +data8 0x3fd2e600a3865760, 0x3c8a2a36a99aca4a +data8 0x8c31a45bf8e9255e, 0xf49d0c68cd09b689 +data8 0x3fd328f08ad12000, 0x3cb9efaf1d7ab552 +data8 0x8c8d0b520a35eb18, 0xf44d75cd993cfad2 +data8 0x3fd36bf614dcc040, 0x3ccacbb590bef70d +data8 0x8cea2005d068f23d, 0xf3fcb8a23ab4942b +data8 0x3fd3af11a079a6c0, 0x3cd9775872cf037d +data8 0x8d48e837c8cd5027, 0xf3aad3c1e2273908 +data8 0x3fd3f2438d754b40, 0x3ca03304f667109a +data8 0x8da969ce732f3ac7, 0xf357c60202e2fd7e +data8 0x3fd4358c3ca032e0, 0x3caecf2504ff1a9d +data8 0x8e0baad75555e361, 0xf3038e323ae9463a +data8 0x3fd478ec0fd419c0, 0x3cc64bdc3d703971 +data8 0x8e6fb18807ba877e, 0xf2ae2b1c3a6057f7 +data8 0x3fd4bc6369fa40e0, 0x3cbb7122ec245cf2 +data8 0x8ed5843f4bda74d5, 0xf2579b83aa556f0c +data8 0x3fd4fff2af11e2c0, 0x3c9cfa2dc792d394 +data8 0x8f3d29862c861fef, 0xf1ffde2612ca1909 +data8 0x3fd5439a4436d000, 0x3cc38d46d310526b +data8 0x8fa6a81128940b2d, 0xf1a6f1bac0075669 +data8 0x3fd5875a8fa83520, 0x3cd8bf59b8153f8a +data8 0x901206c1686317a6, 0xf14cd4f2a730d480 +data8 0x3fd5cb33f8cf8ac0, 0x3c9502b5c4d0e431 +data8 0x907f4ca5fe9cf739, 0xf0f186784a125726 +data8 0x3fd60f26e847b120, 0x3cc8a1a5e0acaa33 +data8 0x90ee80fd34aeda5e, 0xf09504ef9a212f18 +data8 0x3fd65333c7e43aa0, 0x3cae5b029cb1f26e +data8 0x915fab35e37421c6, 0xf0374ef5daab5c45 +data8 0x3fd6975b02b8e360, 0x3cd5aa1c280c45e6 +data8 0x91d2d2f0d894d73c, 0xefd86321822dbb51 +data8 0x3fd6db9d05213b20, 0x3cbecf2c093ccd8b +data8 0x9248000249200009, 0xef7840021aca5a72 +data8 0x3fd71ffa3cc87fc0, 0x3cb8d273f08d00d9 +data8 0x92bf3a7351f081d2, 0xef16e42021d7cbd5 +data8 0x3fd7647318b1ad20, 0x3cbce099d79cdc46 +data8 0x93388a8386725713, 0xeeb44dfce6820283 +data8 0x3fd7a908093fc1e0, 0x3ccb033ec17a30d9 +data8 0x93b3f8aa8e653812, 0xee507c126774fa45 +data8 0x3fd7edb9803e3c20, 0x3cc10aedb48671eb +data8 0x94318d99d341ade4, 0xedeb6cd32f891afb +data8 0x3fd83287f0e9cf80, 0x3c994c0c1505cd2a +data8 0x94b1523e3dedc630, 0xed851eaa3168f43c +data8 0x3fd87773cff956e0, 0x3cda3b7bce6a6b16 +data8 0x95334fc20577563f, 0xed1d8ffaa2279669 +data8 0x3fd8bc7d93a70440, 0x3cd4922edc792ce2 +data8 0x95b78f8e8f92f274, 0xecb4bf1fd2be72da +data8 0x3fd901a5b3b9cf40, 0x3cd3fea1b00f9d0d +data8 0x963e1b4e63a87c3f, 0xec4aaa6d08694cc1 +data8 0x3fd946eca98f2700, 0x3cdba4032d968ff1 +data8 0x96c6fcef314074fc, 0xebdf502d53d65fea +data8 0x3fd98c52f024e800, 0x3cbe7be1ab8c95c9 +data8 0x97523ea3eab028b2, 0xeb72aea36720793e +data8 0x3fd9d1d904239860, 0x3cd72d08a6a22b70 +data8 0x97dfeae6f4ee4a9a, 0xeb04c4096a884e94 +data8 0x3fda177f63e8ef00, 0x3cd818c3c1ebfac7 +data8 0x98700c7c6d85d119, 0xea958e90cfe1efd7 +data8 0x3fda5d468f92a540, 0x3cdf45fbfaa080fe +data8 0x9902ae7487a9caa1, 0xea250c6224aab21a +data8 0x3fdaa32f090998e0, 0x3cd715a9353cede4 +data8 0x9997dc2e017a9550, 0xe9b33b9ce2bb7638 +data8 0x3fdae939540d3f00, 0x3cc545c014943439 +data8 0x9a2fa158b29b649b, 0xe9401a573f8aa706 +data8 0x3fdb2f65f63f6c60, 0x3cd4a63c2f2ca8e2 +data8 0x9aca09f835466186, 0xe8cba69df9f0bf35 +data8 0x3fdb75b5773075e0, 0x3cda310ce1b217ec +data8 0x9b672266ab1e0136, 0xe855de74266193d4 +data8 0x3fdbbc28606babc0, 0x3cdc84b75cca6c44 +data8 0x9c06f7579f0b7bd5, 0xe7debfd2f98c060b +data8 0x3fdc02bf3d843420, 0x3cd225d967ffb922 +data8 0x9ca995db058cabdc, 0xe76648a991511c6e +data8 0x3fdc497a9c224780, 0x3cde08101c5b825b +data8 0x9d4f0b605ce71e88, 0xe6ec76dcbc02d9a7 +data8 0x3fdc905b0c10d420, 0x3cb1abbaa3edf120 +data8 0x9df765b9eecad5e6, 0xe6714846bdda7318 +data8 0x3fdcd7611f4b8a00, 0x3cbf6217ae80aadf +data8 0x9ea2b320350540fe, 0xe5f4bab71494cd6b +data8 0x3fdd1e8d6a0d56c0, 0x3cb726e048cc235c +data8 0x9f51023562fc5676, 0xe576cbf239235ecb +data8 0x3fdd65e082df5260, 0x3cd9e66872bd5250 +data8 0xa002620915c2a2f6, 0xe4f779b15f5ec5a7 +data8 0x3fddad5b02a82420, 0x3c89743b0b57534b +data8 0xa0b6e21c2caf9992, 0xe476c1a233a7873e +data8 0x3fddf4fd84bbe160, 0x3cbf7adea9ee3338 +data8 0xa16e9264cc83a6b2, 0xe3f4a16696608191 +data8 0x3fde3cc8a6ec6ee0, 0x3cce46f5a51f49c6 +data8 0xa22983528f3d8d49, 0xe3711694552da8a8 +data8 0x3fde84bd099a6600, 0x3cdc78f6490a2d31 +data8 0xa2e7c5d2e2e69460, 0xe2ec1eb4e1e0a5fb +data8 0x3fdeccdb4fc685c0, 0x3cdd3aedb56a4825 +data8 0xa3a96b5599bd2532, 0xe265b74506fbe1c9 +data8 0x3fdf15241f23b3e0, 0x3cd440f3c6d65f65 +data8 0xa46e85d1ae49d7de, 0xe1ddddb499b3606f +data8 0x3fdf5d98202994a0, 0x3cd6c44bd3fb745a +data8 0xa53727ca3e11b99e, 0xe1548f662951b00d +data8 0x3fdfa637fe27bf60, 0x3ca8ad1cd33054dd +data8 0xa6036453bdc20186, 0xe0c9c9aeabe5e481 +data8 0x3fdfef0467599580, 0x3cc0f1ac0685d78a +data8 0xa6d34f1969dda338, 0xe03d89d5281e4f81 +data8 0x3fe01bff067d6220, 0x3cc0731e8a9ef057 +data8 0xa7a6fc62f7246ff3, 0xdfafcd125c323f54 +data8 0x3fe04092d1ae3b40, 0x3ccabda24b59906d +data8 0xa87e811a861df9b9, 0xdf20909061bb9760 +data8 0x3fe0653df0fd9fc0, 0x3ce94c8dcc722278 +data8 0xa959f2d2dd687200, 0xde8fd16a4e5f88bd +data8 0x3fe08a00c1cae320, 0x3ce6b888bb60a274 +data8 0xaa3967cdeea58bda, 0xddfd8cabd1240d22 +data8 0x3fe0aedba3221c00, 0x3ced5941cd486e46 +data8 0xab904fd587263c84, 0xdd1f4472e1cf64ed +data8 0x3fe0e651e85229c0, 0x3cdb6701042299b1 +data8 0xad686d44dd5a74bb, 0xdbf173e1f6b46e92 +data8 0x3fe1309cbf4cdb20, 0x3cbf1be7bb3f0ec5 +data8 0xaf524e15640ebee4, 0xdabd54896f1029f6 +data8 0x3fe17b4ee1641300, 0x3ce81dd055b792f1 +data8 0xb14eca24ef7db3fa, 0xd982cb9ae2f47e41 +data8 0x3fe1c66b9ffd6660, 0x3cd98ea31eb5ddc7 +data8 0xb35ec807669920ce, 0xd841bd1b8291d0b6 +data8 0x3fe211f66db3a5a0, 0x3ca480c35a27b4a2 +data8 0xb5833e4755e04dd1, 0xd6fa0bd3150b6930 +data8 0x3fe25df2e05b6c40, 0x3ca4bc324287a351 +data8 0xb7bd34c8000b7bd3, 0xd5ab9939a7d23aa1 +data8 0x3fe2aa64b32f7780, 0x3cba67314933077c +data8 0xba0dc64d126cc135, 0xd4564563ce924481 +data8 0x3fe2f74fc9289ac0, 0x3cec1a1dc0efc5ec +data8 0xbc76222cbbfa74a6, 0xd2f9eeed501125a8 +data8 0x3fe344b82f859ac0, 0x3ceeef218de413ac +data8 0xbef78e31985291a9, 0xd19672e2182f78be +data8 0x3fe392a22087b7e0, 0x3cd2619ba201204c +data8 0xc19368b2b0629572, 0xd02baca5427e436a +data8 0x3fe3e11206694520, 0x3cb5d0b3143fe689 +data8 0xc44b2ae8c6733e51, 0xceb975d60b6eae5d +data8 0x3fe4300c7e945020, 0x3cbd367143da6582 +data8 0xc7206b894212dfef, 0xcd3fa6326ff0ac9a +data8 0x3fe47f965d201d60, 0x3ce797c7a4ec1d63 +data8 0xca14e1b0622de526, 0xcbbe13773c3c5338 +data8 0x3fe4cfb4b09d1a20, 0x3cedfadb5347143c +data8 0xcd2a6825eae65f82, 0xca34913d425a5ae9 +data8 0x3fe5206cc637e000, 0x3ce2798b38e54193 +data8 0xd06301095e1351ee, 0xc8a2f0d3679c08c0 +data8 0x3fe571c42e3d0be0, 0x3ccd7cb9c6c2ca68 +data8 0xd3c0d9f50057adda, 0xc70901152d59d16b +data8 0x3fe5c3c0c108f940, 0x3ceb6c13563180ab +data8 0xd74650a98cc14789, 0xc5668e3d4cbf8828 +data8 0x3fe61668a46ffa80, 0x3caa9092e9e3c0e5 +data8 0xdaf5f8579dcc8f8f, 0xc3bb61b3eed42d02 +data8 0x3fe669c251ad69e0, 0x3cccf896ef3b4fee +data8 0xded29f9f9a6171b4, 0xc20741d7f8e8e8af +data8 0x3fe6bdd49bea05c0, 0x3cdc6b29937c575d +data8 0xe2df5765854ccdb0, 0xc049f1c2d1b8014b +data8 0x3fe712a6b76c6e80, 0x3ce1ddc6f2922321 +data8 0xe71f7a9b94fcb4c3, 0xbe833105ec291e91 +data8 0x3fe76840418978a0, 0x3ccda46e85432c3d +data8 0xeb96b72d3374b91e, 0xbcb2bb61493b28b3 +data8 0x3fe7bea9496d5a40, 0x3ce37b42ec6e17d3 +data8 0xf049183c3f53c39b, 0xbad848720223d3a8 +data8 0x3fe815ea59dab0a0, 0x3cb03ad41bfc415b +data8 0xf53b11ec7f415f15, 0xb8f38b57c53c9c48 +data8 0x3fe86e0c84010760, 0x3cc03bfcfb17fe1f +data8 0xfa718f05adbf2c33, 0xb70432500286b185 +data8 0x3fe8c7196b9225c0, 0x3ced99fcc6866ba9 +data8 0xfff200c3f5489608, 0xb509e6454dca33cc +data8 0x3fe9211b54441080, 0x3cb789cb53515688 +// The following table entries are not used +//data8 0x82e138a0fac48700, 0xb3044a513a8e6132 +//data8 0x3fe97c1d30f5b7c0, 0x3ce1eb765612d1d0 +//data8 0x85f4cc7fc670d021, 0xb0f2fb2ea6cbbc88 +//data8 0x3fe9d82ab4b5fde0, 0x3ced3fe6f27e8039 +//data8 0x89377c1387d5b908, 0xaed58e9a09014d5c +//data8 0x3fea355065f87fa0, 0x3cbef481d25f5b58 +//data8 0x8cad7a2c98dec333, 0xacab929ce114d451 +//data8 0x3fea939bb451e2a0, 0x3c8e92b4fbf4560f +//data8 0x905b7dfc99583025, 0xaa748cc0dbbbc0ec +//data8 0x3feaf31b11270220, 0x3cdced8c61bd7bd5 +//data8 0x9446d8191f80dd42, 0xa82ff92687235baf +//data8 0x3feb53de0bcffc20, 0x3cbe1722fb47509e +//data8 0x98758ba086e4000a, 0xa5dd497a9c184f58 +//data8 0x3febb5f571cb0560, 0x3ce0c7774329a613 +//data8 0x9cee6c7bf18e4e24, 0xa37be3c3cd1de51b +//data8 0x3fec197373bc7be0, 0x3ce08ebdb55c3177 +//data8 0xa1b944000a1b9440, 0xa10b2101b4f27e03 +//data8 0x3fec7e6bd023da60, 0x3ce5fc5fd4995959 +//data8 0xa6defd8ba04d3e38, 0x9e8a4b93cad088ec +//data8 0x3fece4f404e29b20, 0x3cea3413401132b5 +//data8 0xac69dd408a10c62d, 0x9bf89d5d17ddae8c +//data8 0x3fed4d2388f63600, 0x3cd5a7fb0d1d4276 +//data8 0xb265c39cbd80f97a, 0x99553d969fec7beb +//data8 0x3fedb714101e0a00, 0x3cdbda21f01193f2 +//data8 0xb8e081a16ae4ae73, 0x969f3e3ed2a0516c +//data8 0x3fee22e1da97bb00, 0x3ce7231177f85f71 +//data8 0xbfea427678945732, 0x93d5990f9ee787af +//data8 0x3fee90ac13b18220, 0x3ce3c8a5453363a5 +//data8 0xc79611399b8c90c5, 0x90f72bde80febc31 +//data8 0x3fef009542b712e0, 0x3ce218fd79e8cb56 +//data8 0xcffa8425040624d7, 0x8e02b4418574ebed +//data8 0x3fef72c3d2c57520, 0x3cd32a717f82203f +//data8 0xd93299cddcf9cf23, 0x8af6ca48e9c44024 +//data8 0x3fefe762b77744c0, 0x3ce53478a6bbcf94 +//data8 0xe35eda760af69ad9, 0x87d1da0d7f45678b +//data8 0x3ff02f511b223c00, 0x3ced6e11782c28fc +//data8 0xeea6d733421da0a6, 0x84921bbe64ae029a +//data8 0x3ff06c5c6f8ce9c0, 0x3ce71fc71c1ffc02 +//data8 0xfb3b2c73fc6195cc, 0x813589ba3a5651b6 +//data8 0x3ff0aaf2613700a0, 0x3cf2a72d2fd94ef3 +//data8 0x84ac1fcec4203245, 0xfb73a828893df19e +//data8 0x3ff0eb367c3fd600, 0x3cf8054c158610de +//data8 0x8ca50621110c60e6, 0xf438a14c158d867c +//data8 0x3ff12d51caa6b580, 0x3ce6bce9748739b6 +//data8 0x95b8c2062d6f8161, 0xecb3ccdd37b369da +//data8 0x3ff1717418520340, 0x3ca5c2732533177c +//data8 0xa0262917caab4ad1, 0xe4dde4ddc81fd119 +//data8 0x3ff1b7d59dd40ba0, 0x3cc4c7c98e870ff5 +//data8 0xac402c688b72f3f4, 0xdcae469be46d4c8d +//data8 0x3ff200b93cc5a540, 0x3c8dd6dc1bfe865a +//data8 0xba76968b9eabd9ab, 0xd41a8f3df1115f7f +//data8 0x3ff24c6f8f6affa0, 0x3cf1acb6d2a7eff7 +//data8 0xcb63c87c23a71dc5, 0xcb161074c17f54ec +//data8 0x3ff29b5b338b7c80, 0x3ce9b5845f6ec746 +//data8 0xdfe323b8653af367, 0xc19107d99ab27e42 +//data8 0x3ff2edf6fac7f5a0, 0x3cf77f961925fa02 +//data8 0xf93746caaba3e1f1, 0xb777744a9df03bff +//data8 0x3ff344df237486c0, 0x3cf6ddf5f6ddda43 +//data8 0x8ca77052f6c340f0, 0xacaf476f13806648 +//data8 0x3ff3a0dfa4bb4ae0, 0x3cfee01bbd761bff +//data8 0xa1a48604a81d5c62, 0xa11575d30c0aae50 +//data8 0x3ff4030b73c55360, 0x3cf1cf0e0324d37c +//data8 0xbe45074b05579024, 0x9478e362a07dd287 +//data8 0x3ff46ce4c738c4e0, 0x3ce3179555367d12 +//data8 0xe7a08b5693d214ec, 0x8690e3575b8a7c3b +//data8 0x3ff4e0a887c40a80, 0x3cfbd5d46bfefe69 +//data8 0x94503d69396d91c7, 0xedd2ce885ff04028 +//data8 0x3ff561ebd9c18cc0, 0x3cf331bd176b233b +//data8 0xced1d96c5bb209e6, 0xc965278083808702 +//data8 0x3ff5f71d7ff42c80, 0x3ce3301cc0b5a48c +//data8 0xabac2cee0fc24e20, 0x9c4eb1136094cbbd +//data8 0x3ff6ae4c63222720, 0x3cf5ff46874ee51e +//data8 0x8040201008040201, 0xb4d7ac4d9acb1bf4 +//data8 0x3ff7b7d33b928c40, 0x3cfacdee584023bb +LOCAL_OBJECT_END(T_table) + -#ifdef _LIBC -.rodata -#else -.data -#endif .align 16 -acos_coefficients: -ASM_TYPE_DIRECTIVE(acos_coefficients,@object) -data8 0xc90fdaa22168c234, 0x00003FFF // pi_by_2_hi -data8 0xc4c6628b80dc1cd1, 0x00003FBF // pi_by_2_lo -data8 0xc90fdaa22168c234, 0x00004000 // pi_hi -data8 0xc4c6628b80dc1cd1, 0x00003FC0 // pi_lo - -data8 0xBB08911F2013961E, 0x00003FF8 // A10 -data8 0x981F1095A23A87D3, 0x00003FF8 // A9 -data8 0xBDF09C6C4177BCC6, 0x00003FF8 // A8 -data8 0xE4C3A60B049ACCEA, 0x00003FF8 // A7 -data8 0x8E2789F4E8A8F1AD, 0x00003FF9 // A6 -data8 0xB745D09B2B0E850B, 0x00003FF9 // A5 -data8 0xF8E38E3BC4C50920, 0x00003FF9 // A4 -data8 0xB6DB6DB6D89FCD81, 0x00003FFA // A3 -data8 0x99999999999AF376, 0x00003FFB // A2 -data8 0xAAAAAAAAAAAAAA71, 0x00003FFC // A1 -ASM_SIZE_DIRECTIVE(acos_coefficients) - - -.align 32 -.global acosl# -ASM_TYPE_DIRECTIVE(acosl#,@function) +LOCAL_OBJECT_START(poly_coeffs) + // C_3 +data8 0xaaaaaaaaaaaaaaab, 0x0000000000003ffc + // C_5 +data8 0x999999999999999a, 0x0000000000003ffb + // C_7, C_9 +data8 0x3fa6db6db6db6db7, 0x3f9f1c71c71c71c8 + // pi/2 (low, high) +data8 0x3C91A62633145C07, 0x3FF921FB54442D18 + // C_11, C_13 +data8 0x3f96e8ba2e8ba2e9, 0x3f91c4ec4ec4ec4e + // C_15, C_17 +data8 0x3f8c99999999999a, 0x3f87a87878787223 + // pi (low, high) +data8 0x3CA1A62633145C07, 0x400921FB54442D18 +LOCAL_OBJECT_END(poly_coeffs) + + +R_DBL_S = r21 +R_EXP0 = r22 +R_EXP = r15 +R_SGNMASK = r23 +R_TMP = r24 +R_TMP2 = r25 +R_INDEX = r26 +R_TMP3 = r27 +R_TMP03 = r27 +R_TMP4 = r28 +R_TMP5 = r23 +R_TMP6 = r22 +R_TMP7 = r21 +R_T = r29 +R_BIAS = r20 + +F_T = f6 +F_1S2 = f7 +F_1S2_S = f9 +F_INV_1T2 = f10 +F_SQRT_1T2 = f11 +F_S2T2 = f12 +F_X = f13 +F_D = f14 +F_2M64 = f15 + +F_CS2 = f32 +F_CS3 = f33 +F_CS4 = f34 +F_CS5 = f35 +F_CS6 = f36 +F_CS7 = f37 +F_CS8 = f38 +F_CS9 = f39 +F_S23 = f40 +F_S45 = f41 +F_S67 = f42 +F_S89 = f43 +F_S25 = f44 +F_S69 = f45 +F_S29 = f46 +F_X2 = f47 +F_X4 = f48 +F_TSQRT = f49 +F_DTX = f50 +F_R = f51 +F_R2 = f52 +F_R3 = f53 +F_R4 = f54 + +F_C3 = f55 +F_C5 = f56 +F_C7 = f57 +F_C9 = f58 +F_P79 = f59 +F_P35 = f60 +F_P39 = f61 + +F_ATHI = f62 +F_ATLO = f63 + +F_T1 = f64 +F_Y = f65 +F_Y2 = f66 +F_ANDMASK = f67 +F_ORMASK = f68 +F_S = f69 +F_05 = f70 +F_SQRT_1S2 = f71 +F_DS = f72 +F_Z = f73 +F_1T2 = f74 +F_DZ = f75 +F_ZE = f76 +F_YZ = f77 +F_Y1S2 = f78 +F_Y1S2X = f79 +F_1X = f80 +F_ST = f81 +F_1T2_ST = f82 +F_TSS = f83 +F_Y1S2X2 = f84 +F_DZ_TERM = f85 +F_DTS = f86 +F_DS2X = f87 +F_T2 = f88 +F_ZY1S2S = f89 +F_Y1S2_1X = f90 +F_TS = f91 +F_PI2_LO = f92 +F_PI2_HI = f93 +F_S19 = f94 +F_INV1T2_2 = f95 +F_CORR = f96 +F_DZ0 = f97 + +F_C11 = f98 +F_C13 = f99 +F_C15 = f100 +F_C17 = f101 +F_P1113 = f102 +F_P1517 = f103 +F_P1117 = f104 +F_P317 = f105 +F_R8 = f106 +F_HI = f107 +F_1S2_HI = f108 +F_DS2 = f109 +F_Y2_2 = f110 +//F_S2 = f111 +//F_S_DS2 = f112 +F_S_1S2S = f113 +F_XL = f114 +F_2M128 = f115 +F_1AS = f116 +F_AS = f117 + + .section .text -.proc acosl# -.align 32 +GLOBAL_LIBM_ENTRY(acosl) + +{.mfi + // get exponent, mantissa (rounded to double precision) of s + getf.d R_DBL_S = f8 + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // r2 = pointer to T_table + addl r2 = @ltoff(T_table), gp +} +{.mfi + // sign mask + mov R_SGNMASK = 0x20000 + nop.f 0 + // bias-63-1 + mov R_TMP03 = 0xffff-64;; +} -acosl: -// After normalizing f8, get its true exponent -{ .mfi - alloc r32 = ar.pfs,1,11,4,0 -(p0) fnorm.s1 acos_NORM_f8 = f8 -(p0) mov acos_GR_17_ones = 0x1ffff +{.mfi + // get exponent of s + getf.exp R_EXP = f8 + nop.f 0 + // R_TMP4 = 2^45 + shl R_TMP4 = R_SGNMASK, 45-17 } -{ .mmi -(p0) mov acos_GR_16_ones = 0xffff -(p0) addl r40 = @ltoff(acos_coefficients), gp - nop.i 999 +{.mlx + // load bias-4 + mov R_TMP = 0xffff-4 + // load RU(sqrt(2)/2) to integer register (in double format, shifted left by 1) + movl R_TMP2 = 0x7fcd413cccfe779a;; } -;; -// Set denormal flag on denormal input with fcmp -{ .mfi - ld8 r40 = [r40] - fcmp.eq p6,p0 = f8,f0 - nop.i 999 + +{.mfi + // load 2^{-64} in FP register + setf.exp F_2M64 = R_TMP03 + nop.f 0 + // index = (0x7-exponent)|b1 b2.. b6 + extr.u R_INDEX = R_DBL_S, 46, 9 } -;; +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 x.. x + or R_T = R_DBL_S, R_TMP4 + nop.f 0 + // R_TMP4 = 2^45-1 + sub R_TMP4 = R_TMP4, r0, 1;; +} -// Load the constants pi_by_2 and pi. -// Each is stored as hi and lo values -// Also load the coefficients for ACOS_POLY -{ .mmi -(p0) ldfe acos_pi_by_2_hi = [r40],16 ;; -(p0) ldfe acos_pi_by_2_lo = [r40],16 - nop.i 999 ;; +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 0.. 0 + andcm R_T = R_T, R_TMP4 + nop.f 0 + // eliminate sign from R_DBL_S (shift left by 1) + shl R_TMP3 = R_DBL_S, 1 } -{ .mmi -(p0) ldfe acos_pi_hi = [r40],16 ;; -(p0) ldfe acos_pi_lo = [r40],16 - nop.i 999 ;; +{.mfi + // R_BIAS = 3*2^6 + mov R_BIAS = 0xc0 + nop.f 0 + // eliminate sign from R_EXP + andcm R_EXP0 = R_EXP, R_SGNMASK;; } -{ .mmi -(p0) ldfe acos_A10 = [r40],16 ;; -(p0) ldfe acos_A9 = [r40],16 - nop.i 999 ;; + + +{.mfi + // load start address for T_table + ld8 r2 = [r2] + nop.f 0 + // p8 = 1 if |s|> = sqrt(2)/2 + cmp.geu p8, p0 = R_TMP3, R_TMP2 } -// Take the absolute value of f8 -{ .mmf - nop.m 999 -(p0) getf.exp acos_GR_signexp_f8 = acos_NORM_f8 -(p0) fmerge.s acos_ABS_NORM_f8 = f0, acos_NORM_f8 +{.mlx + // p7 = 1 if |s|<2^{-4} (exponent of s = sqrt(2)/2, take alternate path + (p8) br.cond.sptk LARGE_S } -// case 1: |x| < 2^-25 ==> p6 ACOS_TINY -// case 2: 2^-25 <= |x| < 2^-2 ==> p8 ACOS_POLY -// case 3: 2^-2 <= |x| < 1 ==> p9 ACOS_ATAN -// case 4: 1 <= |x| ==> p11 ACOS_ERROR_RETURN -// Admittedly |x| = 1 is not an error but this is where that case is -// handled. +{.mlx + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + // sqrt coefficient cs9 = 55*13/128 + movl R_TMP = 0x40b2c000;; +} -{ .mii -(p0) ldfe acos_A7 = [r40],16 -(p0) sub acos_GR_true_exp = acos_GR_exp, acos_GR_16_ones ;; -(p0) cmp.ge.unc p6, p7 = -26, acos_GR_true_exp ;; + +{.mfi + // sqrt coefficient cs8 = -33*13/128 + setf.s F_CS8 = R_TMP2 + nop.f 0 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5 } -{ .mii -(p0) ldfe acos_A6 = [r40],16 -(p7) cmp.ge.unc p8, p9 = -3, acos_GR_true_exp ;; -(p9) cmp.ge.unc p10, p11 = -1, acos_GR_true_exp +{.mfi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + mov R_TMP4 = 0xffff - 1 + nop.f 0 + // sqrt coefficient cs6 = -21/16 + mov R_TMP6 = 0xbfa8;; } -{ .mmi -(p0) ldfe acos_A5 = [r40],16 ;; -(p0) ldfe acos_A4 = [r40],16 - nop.i 999 ;; + +{.mlx + // table index + add r2 = r2, R_INDEX + // sqrt coefficient cs7 = 33/16 + movl R_TMP2 = 0x40040000;; } -{ .mmi -(p0) ldfe acos_A3 = [r40],16 ;; -(p0) ldfe acos_A2 = [r40],16 - nop.i 999 ;; + +{.mmi + // load cs9 = 55*13/128 + setf.s F_CS9 = R_TMP + // sqrt coefficient cs5 = 7/8 + mov R_TMP3 = 0x3f60 + // sqrt coefficient cs6 = 21/16 + shl R_TMP6 = R_TMP6, 16;; } -// ACOS_ERROR_RETURN ==> p11 is true -// case 4: |x| >= 1 -{ .mib -(p0) ldfe acos_A1 = [r40],16 - nop.i 999 -(p11) br.spnt L(ACOS_ERROR_RETURN) ;; + +{.mmi + // load significand of 1/(1-t^2) + ldf8 F_INV_1T2 = [r2], 8 + // sqrt coefficient cs7 = 33/16 + setf.s F_CS7 = R_TMP2 + // sqrt coefficient cs4 = -5/8 + mov R_TMP5 = 0xbf20;; } -// ACOS_TINY ==> p6 is true -// case 1: |x| < 2^-25 -{ .mfi - nop.m 999 -(p6) fms.s1 acos_xmpi_by_2_lo = acos_NORM_f8,f1, acos_pi_by_2_lo - nop.i 999 ;; + +{.mmi + // load significand of sqrt(1-t^2) + ldf8 F_SQRT_1T2 = [r2], 8 + // sqrt coefficient cs6 = 21/16 + setf.s F_CS6 = R_TMP6 + // sqrt coefficient cs5 = 7/8 + shl R_TMP3 = R_TMP3, 16;; } -{ .mfb - nop.m 999 -(p6) fms.s0 f8 = acos_pi_by_2_hi,f1, acos_xmpi_by_2_lo -(p6) br.ret.spnt b0 ;; + +{.mmi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + setf.exp F_CS3 = R_TMP4 + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // sqrt coefficient cs4 = -5/8 + shl R_TMP5 = R_TMP5, 16;; } +{.mfi + // sqrt coefficient cs5 = 7/8 + setf.s F_CS5 = R_TMP3 + // d = s-t + fms.s1 F_D = f8, f1, F_T + // set p6 = 1 if s<0, p11 = 1 if s> = 0 + cmp.ge p6, p11 = R_EXP, R_DBL_S +} -// ACOS_POLY ==> p8 is true -// case 2: 2^-25 <= |x| < 2^-2 -{ .mfi - nop.m 999 -(p8) fms.s1 acos_W = acos_pi_by_2_hi, f1, acos_NORM_f8 - nop.i 999 ;; +{.mfi + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // s+t + fma.s1 F_S2T2 = f8, f1, F_T + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_X2 = f8,f8, f0 - nop.i 999 ;; + +{.mfi + // sqrt coefficient cs4 = -5/8 + setf.s F_CS4 = R_TMP5 + // s^2-t^2 + fma.s1 F_S2T2 = F_S2T2, F_D, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fms.s1 acos_Ww = acos_pi_by_2_hi, f1, acos_W - nop.i 999 ;; + +{.mfi + // load C3 + ldfe F_C3 = [r3], 16 + // 0.5/(1-t^2) = 2^{-64}*(2^63/(1-t^2)) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_X4 = acos_X2,acos_X2, f0 - nop.i 999 ;; +{.mfi + // load C_5 + ldfe F_C5 = [r3], 16 + // set correct exponent for sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fms.s1 acos_Ww = acos_Ww, f1, acos_NORM_f8 - nop.i 999 ;; + +{.mfi + // load C_7, C_9 + ldfpd F_C7, F_C9 = [r3], 16 + // x = -(s^2-t^2)/(1-t^2)/2 + fnma.s1 F_X = F_INV_1T2, F_S2T2, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P810 = acos_X4, acos_A10, acos_A8 - nop.i 999 + +{.mmf + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // load pi/2 + ldfpd F_PI2_LO, F_PI2_HI = [r3] + // t*sqrt(1-t^2) + fma.s1 F_TSQRT = F_T, F_SQRT_1T2, f0;; } -// acos_P79 = X4*A9 + A7 -// acos_P810 = X4*A10 + A8 -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P79 = acos_X4, acos_A9, acos_A7 - nop.i 999 ;; + +{.mfi + nop.m 0 + // cs9*x+cs8 + fma.s1 F_S89 = F_CS9, F_X, F_CS8 + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_Ww = acos_Ww, f1, acos_pi_by_2_lo - nop.i 999 ;; +{.mfi + nop.m 0 + // cs7*x+cs6 + fma.s1 F_S67 = F_CS7, F_X, F_CS6 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P610 = acos_X4, acos_P810, acos_A6 - nop.i 999 +{.mfi + nop.m 0 + // cs5*x+cs4 + fma.s1 F_S45 = F_CS5, F_X, F_CS4 + nop.i 0 } +{.mfi + nop.m 0 + // x*x + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} -// acos_P59 = X4*(X4*A9 + A7) + A5 -// acos_P610 = X4*(X4*A10 + A8) + A6 -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P59 = acos_X4, acos_P79, acos_A5 - nop.i 999 ;; + +{.mfi + nop.m 0 + // (s-t)-t*x + fnma.s1 F_DTX = F_T, F_X, F_D + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P410 = acos_X4, acos_P610, acos_A4 - nop.i 999 +{.mfi + nop.m 0 + // cs3*x+cs2 (cs2 = -0.5 = -cs3) + fms.s1 F_S23 = F_CS3, F_X, F_CS3 + nop.i 0;; } -// acos_P39 = X4*(X4*(X4*A9 + A7) + A5) + A3 -// acos_P410 = X4*(X4*(X4*A10 + A8) + A6) + A4 -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P39 = acos_X4, acos_P59, acos_A3 - nop.i 999 ;; +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_low + (p6) fnma.s1 F_ATLO = F_ATLO, f1, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P210 = acos_X4, acos_P410, acos_A2 - nop.i 999 +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_high + (p6) fnma.s1 F_ATHI = F_ATHI, f1, f0 + nop.i 0;; } -// acos_P19 = X4*(X4*(X4*(X4*A9 + A7) + A5) + A3) + A1 = P1 -// acos_P210 = X4*(X4*(X4*(X4*A10 + A8) + A6) + A4) + A2 = P2 -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P19 = acos_X4, acos_P39, acos_A1 - nop.i 999 ;; + +{.mfi + nop.m 0 + // cs9*x^3+cs8*x^2+cs7*x+cs6 + fma.s1 F_S69 = F_S89, F_X2, F_S67 + nop.i 0 } -// acos_P1P2 = Xsq*P2 + P1 -// acos_P1P2 = Xsq*(Xsq*P2 + P1) -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P1P2 = acos_X2, acos_P210, acos_P19 - nop.i 999 ;; +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 acos_P1P2 = acos_X2, acos_P1P2, f0 - nop.i 999 ;; + +{.mfi + nop.m 0 + // t*sqrt(1-t^2)*x^2 + fma.s1 F_TSQRT = F_TSQRT, F_X2, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fms.s1 acos_xPmw = acos_NORM_f8, acos_P1P2, acos_Ww - nop.i 999 ;; +{.mfi + nop.m 0 + // cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S25 = F_S45, F_X2, F_S23 + nop.i 0;; } -{ .mfb - nop.m 999 -(p8) fms.s0 f8 = acos_W, f1, acos_xPmw -(p8) br.ret.spnt b0 ;; + +{.mfi + nop.m 0 + // ((s-t)-t*x)*sqrt(1-t^2) + fma.s1 F_DTX = F_DTX, F_SQRT_1T2, f0 + nop.i 0;; } +{.mfi + nop.m 0 + // (pi/2)_high - asin(t)_high + fnma.s1 F_ATHI = F_ATHI, f1, F_PI2_HI + nop.i 0 +} -// ACOS_ATAN -// case 3: 2^-2 <= |x| < 1 -// case 3: 2^-2 <= |x| < 1 ==> p9 ACOS_ATAN +{.mfi + nop.m 0 + // asin(t)_low - (pi/2)_low + fnma.s1 F_ATLO = F_PI2_LO, f1, F_ATLO + nop.i 0;; +} -// Step 1.1: Get A,B and a,b -// A + a = 1- |X| -// B + b = 1+ |X| -// Note also that we will use acos_corr (f13) -// and acos_W -// Step 2 -// Call __libm_atan2_reg +{.mfi + nop.m 0 + // PS29 = cs9*x^7+..+cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S29 = F_S69, F_X4, F_S25 + nop.i 0;; +} -{ .mfi -(p0) mov acos_GR_fffe = 0xfffe -(p0) fma.s1 acos_B = f1,f1, acos_ABS_NORM_f8 -(p0) mov GR_SAVE_B0 = b0 ;; + +{.mfi + nop.m 0 + // R = ((s-t)-t*x)*sqrt(1-t^2)-t*sqrt(1-t^2)*x^2*PS29 + fnma.s1 F_R = F_S29, F_TSQRT, F_DTX + nop.i 0;; } -{ .mmf -(p0) mov GR_SAVE_GP = gp - nop.m 999 -(p0) fms.s1 acos_A = f1,f1, acos_ABS_NORM_f8 + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; } -{ .mfi -(p0) setf.exp acos_HALF = acos_GR_fffe - nop.f 999 - nop.i 999 ;; + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fms.s1 acos_1mB = f1,f1, acos_B - nop.i 999 ;; +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; } -// We want atan2(V,U) -// so put V in f8 and U in f9 -// but save X in acos_X +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; +} -{ .mfi - nop.m 999 -(p0) fmerge.se acos_X = f8, f8 - nop.i 999 ;; +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; } -// Step 1.2: -///////////////////////// -// Get U = sqrt(B) -///////////////////////// -{ .mfi - nop.m 999 -(p0) frsqrta.s1 acos_y0,p8 = acos_B - nop.i 999 + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fms.s1 acos_1mA = f1,f1, acos_A - nop.i 999 ;; + +{.mfi + nop.m 0 + // asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_Bb = acos_1mB,f1, acos_ABS_NORM_f8 - nop.i 999 ;; + +{.mfi + nop.m 0 + // R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, f1, F_R + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_Hh = acos_HALF, acos_B, f0 - nop.i 999 ;; + +{.mfb + nop.m 0 + // result = (pi/2)-asin(t)_high+R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fnma.s0 f8 = F_P39, f1, F_ATHI + // return + br.ret.sptk b0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_t1 = acos_y0, acos_y0, f0 - nop.i 999 + + + +LARGE_S: + +{.mfi + // bias-1 + mov R_TMP3 = 0xffff - 1 + // y ~ 1/sqrt(1-s^2) + frsqrta.s1 F_Y, p7 = F_1S2 + // c9 = 55*13*17/128 + mov R_TMP4 = 0x10af7b } -{ .mfi - nop.m 999 -(p0) fms.s1 acos_Aa = acos_1mA,f1, acos_ABS_NORM_f8 - nop.i 999 ;; +{.mlx + // c8 = -33*13*15/128 + mov R_TMP5 = 0x184923 + movl R_TMP2 = 0xff00000000000000;; } -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_t2 = acos_t1, acos_Hh, acos_HALF - nop.i 999 ;; +{.mfi + // set p6 = 1 if s<0, p11 = 1 if s>0 + cmp.ge p6, p11 = R_EXP, R_DBL_S + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // set p9 = 1 + cmp.eq p9, p0 = r0, r0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_y1 = acos_t2, acos_y0, acos_y0 - nop.i 999 + +{.mfi + // load 0.5 + setf.exp F_05 = R_TMP3 + // (1-s^2) rounded to single precision + fnma.s.s1 F_1S2_S = f8, f8, f1 + // c9 = 55*13*17/128 + shl R_TMP4 = R_TMP4, 10 } +{.mlx + // AND mask for getting t ~ sqrt(1-s^2) + setf.sig F_ANDMASK = R_TMP2 + // OR mask + movl R_TMP2 = 0x0100000000000000;; +} -// Step 1.2: -///////////////////////// -// Get V = sqrt(A) -///////////////////////// -{ .mfi - nop.m 999 -(p0) frsqrta.s1 acos_y0,p8 = acos_A - nop.i 999 ;; +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // 1-|s| + (p6) fma.s1 F_1AS = f8, f1, f1 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_t3 = acos_y1, acos_Hh, f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // 1-|s| + (p11) fnma.s1 F_1AS = f8, f1, f1 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_t1 = acos_y0, acos_y0, f0 - nop.i 999 ;; + +{.mfi + // c9 = 55*13*17/128 + setf.s F_CS9 = R_TMP4 + // |s| + (p6) fnma.s1 F_AS = f8, f1, f0 + // c8 = -33*13*15/128 + shl R_TMP5 = R_TMP5, 11 } -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_t4 = acos_t3, acos_y1, acos_HALF - nop.i 999 ;; +{.mfi + // c7 = 33*13/16 + mov R_TMP4 = 0x41d68 + // |s| + (p11) fma.s1 F_AS = f8, f1, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_y2 = acos_t4, acos_y1, acos_y1 - nop.i 999 ;; + +{.mfi + setf.sig F_ORMASK = R_TMP2 + // y^2 + fma.s1 F_Y2 = F_Y, F_Y, f0 + // c7 = 33*13/16 + shl R_TMP4 = R_TMP4, 12 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_S = acos_B, acos_y2, f0 - nop.i 999 +{.mfi + // c6 = -33*7/16 + mov R_TMP6 = 0xc1670 + // y' ~ sqrt(1-s^2) + fma.s1 F_T1 = F_Y, F_1S2, f0 + // c5 = 63/8 + mov R_TMP7 = 0x40fc;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_H = acos_y2, acos_HALF, f0 - nop.i 999 ;; + +{.mlx + // load c8 = -33*13*15/128 + setf.s F_CS8 = R_TMP5 + // c4 = -35/8 + movl R_TMP5 = 0xc08c0000;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_t5 = acos_Hh, acos_y2, f0 - nop.i 999 +{.mfi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // 1-s-(1-s^2)_s + fnma.s1 F_DS = F_1S2_S, f1, F_1AS + // p9 = 0 if p7 = 1 (p9 = 1 for special cases only) + (p7) cmp.ne p9, p0 = r0, r0 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_Hh = acos_HALF, acos_A, f0 - nop.i 999 ;; +{.mlx + // load c7 = 33*13/16 + setf.s F_CS7 = R_TMP4 + // c3 = 5/2 + movl R_TMP4 = 0x40200000;; } -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_Dd = acos_S, acos_S, acos_B - nop.i 999 ;; + +{.mlx + // load c4 = -35/8 + setf.s F_CS4 = R_TMP5 + // c2 = -3/2 + movl R_TMP5 = 0xbfc00000;; } -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_t2 = acos_t1, acos_Hh, acos_HALF - nop.i 999 ;; + +{.mfi + // load c3 = 5/2 + setf.s F_CS3 = R_TMP4 + // x = (1-s^2)_s*y^2-1 + fms.s1 F_X = F_1S2_S, F_Y2, f1 + // c6 = -33*7/16 + shl R_TMP6 = R_TMP6, 12 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_U = acos_Dd, acos_H, acos_S - nop.i 999 ;; +{.mfi + nop.m 0 + // y^2/2 + fma.s1 F_Y2_2 = F_Y2, F_05, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_y1 = acos_t2, acos_y0, acos_y0 - nop.i 999 ;; + +{.mfi + // load c6 = -33*7/16 + setf.s F_CS6 = R_TMP6 + // eliminate lower bits from y' + fand F_T = F_T1, F_ANDMASK + // c5 = 63/8 + shl R_TMP7 = R_TMP7, 16 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_2U = acos_U, f1, acos_U - nop.i 999 ;; + +{.mfb + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // 1-(1-s^2)_s-s^2 + fma.s1 F_DS = F_AS, F_1AS, F_DS + // p9 = 1 if s is a special input (NaN, or |s|> = 1) + (p9) br.cond.spnt acosl_SPECIAL_CASES;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_t3 = acos_y1, acos_Hh, f0 - nop.i 999 +{.mmf + // get exponent, significand of y' (in single prec.) + getf.s R_TMP = F_T1 + // load c3 = -3/2 + setf.s F_CS2 = R_TMP5 + // y*(1-s^2) + fma.s1 F_Y1S2 = F_Y, F_1S2, f0;; } -// Step 1.3: -// sqrt(A + a) = V + v -// sqrt(B + b) = U + u -///////////////////////// -// Get u -///////////////////////// +{.mfi + nop.m 0 + // if s<0, set s = -s + (p6) fnma.s1 f8 = f8, f1, f0 + nop.i 0;; +} -// acos_BmUU = B - UU -// acos_BmUUpb = (B - UU) + b -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_BmUU = acos_U, acos_U, acos_B - nop.i 999 ;; +{.mfi + // load c5 = 63/8 + setf.s F_CS5 = R_TMP7 + // x = (1-s^2)_s*y^2-1+(1-(1-s^2)_s-s^2)*y^2 + fma.s1 F_X = F_DS, F_Y2, F_X + // for t = 2^k*1.b1 b2.., get 7-k|b1.. b6 + extr.u R_INDEX = R_TMP, 17, 9;; } -{ .mfi - nop.m 999 -(p0) fmerge.se f9 = acos_U, acos_U - nop.i 999 ;; + +{.mmi + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + nop.m 0 + // get exponent of y + shr.u R_TMP2 = R_TMP, 23;; } -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_t4 = acos_t3, acos_y1, acos_HALF - nop.i 999 ;; +{.mmi + // load C3 + ldfe F_C3 = [r3], 16 + // set p8 = 1 if y'<2^{-4} + cmp.gt p8, p0 = 0x7b, R_TMP2 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5;; } -// acos_1d2U = frcpa(2U) -{ .mfi - nop.m 999 -(p0) frcpa.s1 acos_1d2U,p9 = f1, acos_2U - nop.i 999 + +{.mfb + // get table index for sqrt(1-t^2) + add r2 = r2, R_INDEX + // get t = 2^k*1.b1 b2.. b7 1 + for F_T = F_T, F_ORMASK + (p8) br.cond.spnt VERY_LARGE_INPUT;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_BmUUpb = acos_BmUU, f1, acos_Bb - nop.i 999 ;; + + +{.mmf + // load C5 + ldfe F_C5 = [r3], 16 + // load 1/(1-t^2) + ldfp8 F_INV_1T2, F_SQRT_1T2 = [r2], 16 + // x = ((1-s^2)*y^2-1)/2 + fma.s1 F_X = F_X, F_05, f0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_y2 = acos_t4, acos_y1, acos_y1 - nop.i 999 ;; + + +{.mmf + nop.m 0 + // C7, C9 + ldfpd F_C7, F_C9 = [r3], 16 + // set correct exponent for t + fmerge.se F_T = F_T1, F_T;; } -{ .mfi - nop.m 999 -// acos_Uu = ((B - UU) + b) * frcpa(2U) -(p0) fma.s1 acos_Uu = acos_BmUUpb, acos_1d2U, f0 - nop.i 999 ;; + + +{.mfi + // get address for loading pi + add r3 = 48, r3 + // c9*x+c8 + fma.s1 F_S89 = F_X, F_CS9, F_CS8 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_S = acos_A, acos_y2, f0 - nop.i 999 +{.mfi + nop.m 0 + // x^2 + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_H = acos_y2, acos_HALF, f0 - nop.i 999 ;; + +{.mfi + // pi (low, high) + ldfpd F_PI2_LO, F_PI2_HI = [r3] + // y*(1-s^2)*x + fma.s1 F_Y1S2X = F_Y1S2, F_X, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_t5 = acos_Hh, acos_y2, f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // c7*x+c6 + fma.s1 F_S67 = F_X, F_CS7, F_CS6 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_Dd = acos_S, acos_S, acos_A - nop.i 999 ;; + +{.mfi + nop.m 0 + // 1-x + fnma.s1 F_1X = F_X, f1, f1 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_V = acos_Dd, acos_H, acos_S - nop.i 999 ;; +{.mfi + nop.m 0 + // c3*x+c2 + fma.s1 F_S23 = F_X, F_CS3, F_CS2 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_2V = acos_V, f1, acos_V - nop.i 999 + +{.mfi + nop.m 0 + // 1-t^2 + fnma.s1 F_1T2 = F_T, F_T, f1 + nop.i 0 } -// Step 3 -///////////////////////// -// Calculate the correction, acos_corr -///////////////////////// -// acos_corr = U*v - (V*u) +{.mfi + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // c5*x+c4 + fma.s1 F_S45 = F_X, F_CS5, F_CS4 + nop.i 0;; +} -{ .mfi - nop.m 999 -(p0) fma.s1 acos_Vu = acos_V,acos_Uu, f0 - nop.i 999 ;; + + +{.mfi + nop.m 0 + // t*s + fma.s1 F_TS = F_T, f8, f0 + nop.i 0 } -///////////////////////// -// Get v -///////////////////////// -// acos_AmVV = A - VV -// acos_AmVVpa = (A - VV) + a +{.mfi + nop.m 0 + // 0.5/(1-t^2) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; +} -{ .mfi - nop.m 999 -(p0) fnma.s1 acos_AmVV = acos_V, acos_V, acos_A - nop.i 999 ;; +{.mfi + nop.m 0 + // z~sqrt(1-t^2), rounded to 24 significant bits + fma.s.s1 F_Z = F_SQRT_1T2, F_2M64, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fmerge.se f8 = acos_V, acos_V - nop.i 999 ;; +{.mfi + nop.m 0 + // sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_AmVVpa = acos_AmVV, f1, acos_Aa - nop.i 999 ;; + +{.mfi + nop.m 0 + // y*(1-s^2)*x^2 + fma.s1 F_Y1S2X2 = F_Y1S2, F_X2, f0 + nop.i 0 } -// acos_1d2V = frcpa(2V) -{ .mfi - nop.m 999 -(p0) frcpa.s1 acos_1d2V,p9 = f1, acos_2V - nop.i 999 ;; +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; } -// acos_Vv = ((A - VV) + a) * frcpa(2V) -{ .mfi - nop.m 999 -(p0) fma.s1 acos_Vv = acos_AmVVpa, acos_1d2V, f0 - nop.i 999 ;; + +{.mfi + nop.m 0 + // s*t rounded to 24 significant bits + fma.s.s1 F_TSS = F_T, f8, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_Uv = acos_U,acos_Vv, f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // c9*x^3+..+c6 + fma.s1 F_S69 = F_X2, F_S89, F_S67 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // ST = (t^2-1+s^2) rounded to 24 significant bits + fms.s.s1 F_ST = f8, f8, F_1T2 + nop.i 0 } +{.mfi + nop.m 0 + // c5*x^3+..+c2 + fma.s1 F_S25 = F_X2, F_S45, F_S23 + nop.i 0;; +} -.endp acosl# -ASM_SIZE_DIRECTIVE(acosl#) +{.mfi + nop.m 0 + // 0.25/(1-t^2) + fma.s1 F_INV1T2_2 = F_05, F_INV_1T2, f0 + nop.i 0 +} -.proc __libm_callout -__libm_callout: -.prologue -{ .mfi - nop.m 0 - nop.f 0 -.save ar.pfs,GR_SAVE_PFS - mov GR_SAVE_PFS=ar.pfs +{.mfi + nop.m 0 + // t*s-sqrt(1-t^2)*(1-s^2)*y + fnma.s1 F_TS = F_Y1S2, F_SQRT_1T2, F_TS + nop.i 0;; } -;; -{ .mfi - mov GR_SAVE_GP=gp - nop.f 0 -.save b0, GR_SAVE_B0 - mov GR_SAVE_B0=b0 + +{.mfi + nop.m 0 + // z*0.5/(1-t^2) + fma.s1 F_ZE = F_INV_1T2, F_SQRT_1T2, f0 + nop.i 0 } -.body -{ .mfb - nop.m 999 -(p0) fms.s1 acos_corr = acos_Uv,f1, acos_Vu -(p0) br.call.sptk.many b0=__libm_atan2_reg# ;; +{.mfi + nop.m 0 + // z^2+t^2-1 + fms.s1 F_DZ0 = F_Z, F_Z, F_1T2 + nop.i 0;; } -// p6 ==> X is negative -// p7 ==> x is positive -// We know that |X| >= 1/4 +{.mfi + nop.m 0 + // (1-s^2-(1-s^2)_s)*x + fma.s1 F_DS2X = F_X, F_DS, f0 + nop.i 0;; +} -{ .mfi -(p0) mov gp = GR_SAVE_GP -(p0) fcmp.lt.unc p6,p7 = acos_X , f0 -(p0) mov b0 = GR_SAVE_B0 ;; + +{.mfi + nop.m 0 + // t*s-(t*s)_s + fms.s1 F_DTS = F_T, f8, F_TSS + nop.i 0 } -// acos_2_Z_hi = 2 * acos_Z_hi -// acos_s_lo_Z_lo = s_lo * Z_lo +{.mfi + nop.m 0 + // c9*x^7+..+c2 + fma.s1 F_S29 = F_X4, F_S69, F_S25 + nop.i 0;; +} -{ .mfi - nop.m 999 -(p0) fma.s1 acos_2_Z_hi = acos_Z_hi, f1, acos_Z_hi -(p0) mov ar.pfs = GR_SAVE_PFS + +{.mfi + nop.m 0 + // y*z + fma.s1 F_YZ = F_Z, F_Y, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fma.s1 acos_s_lo_Z_lo = acos_s_lo, acos_Z_lo, f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // t^2 + fma.s1 F_T2 = F_T, F_T, f0 + nop.i 0;; } -// 2 is a constant needed later -{ .mfi - nop.m 999 -(p0) fma.s1 acos_2 = f1,f1,f1 - nop.i 999 ;; + +{.mfi + nop.m 0 + // 1-t^2+ST + fma.s1 F_1T2_ST = F_ST, f1, F_1T2 + nop.i 0;; } -// X >= 1/4 -// acos_result_lo = 2(s_lo * Z_lo) - corr -// f8 = (2*Z_hi) + (2(s_lo * Z_lo) - corr) -{ .mfi - nop.m 999 -(p7) fma.s1 acos_result_lo = acos_s_lo_Z_lo, acos_2, acos_corr - nop.i 999 ;; +{.mfi + nop.m 0 + // y*(1-s^2)(1-x) + fma.s1 F_Y1S2_1X = F_Y1S2, F_1X, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p7) fma.s0 f8 = acos_2_Z_hi, f1, acos_result_lo - nop.i 999 +{.mfi + nop.m 0 + // dz ~ sqrt(1-t^2)-z + fma.s1 F_DZ = F_DZ0, F_ZE, f0 + nop.i 0;; } -// acos_result_lo = (pi_lo - corr) -// acos_result_lo = (pi_lo - corr) + acos_Ww -{ .mfi - nop.m 999 -(p6) fms.s1 acos_result_lo = acos_pi_lo, f1, acos_corr - nop.i 999 ;; + +{.mfi + nop.m 0 + // -1+correction for sqrt(1-t^2)-z + fnma.s1 F_CORR = F_INV1T2_2, F_DZ0, f0 + nop.i 0;; } -// X <= -1/4 -// acos_W = pi_hi - 2 * Z_hi -{ .mfi - nop.m 999 -(p6) fnma.s1 acos_W = acos_2, acos_Z_hi, acos_pi_hi - nop.i 999 ;; + +{.mfi + nop.m 0 + // (PS29*x^2+x)*y*(1-s^2) + fma.s1 F_S19 = F_Y1S2X2, F_S29, F_Y1S2X + nop.i 0;; } -// acos_Ww = pi_hi - W -// acos_Ww = (pi_hi - W) + (2 * Z_hi) -{ .mfi - nop.m 999 -(p6) fms.s1 acos_Ww = acos_pi_hi, f1, acos_W - nop.i 999 ;; +{.mfi + nop.m 0 + // z*y*(1-s^2)_s + fma.s1 F_ZY1S2S = F_YZ, F_1S2_S, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p6) fms.s1 acos_Ww = acos_Ww, f1, acos_2_Z_hi - nop.i 999 ;; +{.mfi + nop.m 0 + // s^2-(1-t^2+ST) + fms.s1 F_1T2_ST = f8, f8, F_1T2_ST + nop.i 0;; } -{ .mfi - nop.m 999 -(p6) fma.s1 acos_result_lo = acos_result_lo, f1, acos_Ww - nop.i 999 ;; + +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x + fma.s1 F_DTS = F_YZ, F_DS2X, F_DTS + nop.i 0 } -// acos_Z_lo = ((pi_lo - corr) + acos_Ww) - 2 * (s_lo * Z_lo) -{ .mfi - nop.m 999 -(p6) fnma.s1 acos_Z_lo = acos_s_lo_Z_lo, acos_2, acos_result_lo - nop.i 999 ;; +{.mfi + nop.m 0 + // dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ, F_Y1S2_1X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R = t*s-sqrt(1-t^2)*(1-s^2)*y+sqrt(1-t^2)*(1-s^2)*y*PS19 + // (used for polynomial evaluation) + fma.s1 F_R = F_S19, F_SQRT_1T2, F_TS + nop.i 0;; } -{ .mfb - nop.m 999 -(p6) fma.s0 f8 = acos_W, f1, acos_Z_lo -(p0) br.ret.sptk b0 ;; + +{.mfi + nop.m 0 + // (PS29*x^2)*y*(1-s^2) + fma.s1 F_S29 = F_Y1S2X2, F_S29, f0 + nop.i 0 } -.endp __libm_callout -ASM_SIZE_DIRECTIVE(__libm_callout) -.proc SPECIAL -SPECIAL: -L(ACOS_NAN): -{ .mfb - nop.m 999 -(p0) fma.s0 f8 = f8,f1,f0 -(p0) br.ret.sptk b0 ;; +{.mfi + nop.m 0 + // apply correction to dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, F_CORR, F_DZ_TERM + nop.i 0;; } -L(ACOS_ERROR_RETURN): -// Save ar.pfs, b0, and gp; restore on exit -// qnan snan inf norm unorm 0 -+ -// 1 1 0 0 0 0 11 = 0xc3 +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} -// Coming in as X = +- 1 -// What should we return? -// If X is 1, return (sign of X)pi/2 +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x+dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, f1, F_DTS + nop.i 0;; +} -{ .mfi - nop.m 999 -(p0) fcmp.eq.unc p6,p7 = acos_ABS_NORM_f8,f1 - nop.i 999 ;; +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 } -{ .mfi - nop.m 999 -(p6) fcmp.lt.unc p8,p9 = f8,f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s0 f8 = acos_pi_hi, f1, acos_pi_lo - nop.i 999 +{.mfi + nop.m 0 + // asin(t)_low-(pi)_low (if s<0) + (p6) fms.s1 F_ATLO = F_ATLO, f1, F_PI2_LO + nop.i 0 } -{ .mfb - nop.m 999 -(p9) fmerge.s f8 = f8,f0 -(p6) br.ret.spnt b0 ;; +{.mfi + nop.m 0 + // R^4 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; } -// If X is a NAN, leave -{ .mfi - nop.m 999 -(p0) fclass.m.unc p12,p0 = f8, 0xc3 - nop.i 999 ;; +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; } -{ .mfb - nop.m 999 -(p12) fma.s0 f8 = f8,f1,f0 -(p12) br.ret.spnt b0 ;; + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z + fnma.s1 F_TSS = F_T2, F_YZ, F_TSS + nop.i 0 } -{ .mfi -(p0) mov GR_Parameter_TAG = 57 -(p0) frcpa f10, p6 = f0, f0 -nop.i 999 -};; +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + fma.s1 F_DZ_TERM = F_YZ, F_1T2_ST, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (pi)_hi-asin(t)_hi (if s<0) + (p6) fms.s1 F_ATHI = F_PI2_HI, f1, F_ATHI + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} -.endp SPECIAL -ASM_SIZE_DIRECTIVE(SPECIAL) -.proc __libm_error_region -__libm_error_region: +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST)+ + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + fma.s1 F_DZ_TERM = F_SQRT_1T2, F_S29, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_TSS = F_YZ, F_ST, F_TSS + nop.i 0 +} + +{.mfi + nop.m 0 + // -asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fms.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_P39, f1, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_ZY1S2S, F_X, F_DZ_TERM + nop.i 0;; +} + + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + + // + (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_DZ_TERM = F_TSS, f1, F_DZ_TERM + nop.i 0;; +} + + +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // result: add high part of table value + // s>0 in this case + (p11) fnma.s0 f8 = F_DZ_TERM, f1, F_ATHI + nop.i 0 +} + +{.mfb + nop.m 0 + // result: add high part of pi-table value + // if s<0 + (p6) fma.s0 f8 = F_DZ_TERM, f1, F_ATHI + br.ret.sptk b0;; +} + + + + + + +SMALL_S: + + // use 15-term polynomial approximation + +{.mmi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp;; + // load start address for coefficients + ld8 r3 = [r3] + mov R_TMP = 0x3fbf;; +} + + +{.mmi + add r2 = 64, r3 + ldfe F_C3 = [r3], 16 + // p7 = 1 if |s|<2^{-64} (exponent of s0, set F_PI2_LO=0 + (p11) fma.s1 F_PI2_HI = f0, f0, f0;; +} + +{.mfi + nop.m 0 + (p11) fma.s1 F_PI2_LO = f0, f0, f0 + nop.i 0;; +} + +{.mfi + // adjust address for C_11 + add r3 = 16, r3 + // c9*x+c8 + fma.s1 F_S89 = F_X, F_CS9, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^2 + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)*x + fma.s1 F_Y1S2X = F_Y1S2, F_X, f0 + nop.i 0 +} + +{.mfi + // C11, C13 + ldfpd F_C11, F_C13 = [r3], 16 + // c7*x+c6 + fma.s1 F_S67 = F_X, F_CS7, F_CS6 + nop.i 0;; +} + + +{.mfi + // C15, C17 + ldfpd F_C15, F_C17 = [r3], 16 + // c3*x+c2 + fma.s1 F_S23 = F_X, F_CS3, F_CS2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c5*x+c4 + fma.s1 F_S45 = F_X, F_CS5, F_CS4 + nop.i 0;; +} + + + + +{.mfi + nop.m 0 + // y*(1-s^2)*x^2 + fma.s1 F_Y1S2X2 = F_Y1S2, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c9*x^3+..+c6 + fma.s1 F_S69 = F_X2, F_S89, F_S67 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c5*x^3+..+c2 + fma.s1 F_S25 = F_X2, F_S45, F_S23 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // (pi)_high-y*(1-s^2)_s + fnma.s1 F_HI = F_Y, F_1S2_S, F_PI2_HI + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c9*x^7+..+c2 + fma.s1 F_S29 = F_X4, F_S69, F_S25 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // -(y*(1-s^2)_s)_high + fms.s1 F_1S2_HI = F_HI, f1, F_PI2_HI + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (PS29*x^2+x)*y*(1-s^2) + fma.s1 F_S19 = F_Y1S2X2, F_S29, F_Y1S2X + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)_s-(y*(1-s^2))_high + fma.s1 F_DS2 = F_Y, F_1S2_S, F_1S2_HI + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // R ~ sqrt(1-s^2) + // (used for polynomial evaluation) + fnma.s1 F_R = F_S19, f1, F_Y1S2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)-(y*(1-s^2))_high + fma.s1 F_DS2 = F_Y, F_DS, F_DS2 + nop.i 0 +} + +{.mfi + nop.m 0 + // (pi)_low+(PS29*x^2)*y*(1-s^2) + fma.s1 F_S29 = F_Y1S2X2, F_S29, F_PI2_LO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if s<0 + // (pi)_low+(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)-(y*(1-s^2))_high) + fms.s1 F_S29 = F_S29, f1, F_DS2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // R^4 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c11+c13*R^2 + fma.s1 F_P1113 = F_C13, F_R2, F_C11 + nop.i 0 +} + +{.mfi + nop.m 0 + // c15+c17*R^2 + fma.s1 F_P1517 = F_C17, F_R2, F_C15 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (pi)_low+(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)-(y*(1-s^2))_high)+y*(1-s^2)*x + fma.s1 F_S29 = F_Y1S2, F_X, F_S29 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c11+c13*R^2+c15*R^4+c17*R^6 + fma.s1 F_P1117 = F_P1517, F_R4, F_P1113 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // R^8 + fma.s1 F_R8 = F_R4, F_R4, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6+..+c17*R^14 + fma.s1 F_P317 = F_P1117, F_R8, F_P39 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (pi)_low-(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)- + // -(y*(1-s^2))_high)+y*(1-s^2)*x - P3, 17 + fnma.s1 F_S29 = F_P317, F_R3, F_S29 + nop.i 0;; +} + +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // Result (if s<0): + // (pi)_low-(PS29*x^2)*y*(1-s^2)-(y*(1-s^2)- + // -(y*(1-s^2))_high)+y*(1-s^2)*x - P3, 17 + // +(pi)_high-(y*(1-s^2))_high + (p6) fma.s0 f8 = F_S29, f1, F_HI + nop.i 0 +} + +{.mfb + nop.m 0 + // Result (if s>0): + // (PS29*x^2)*y*(1-s^2)- + // -y*(1-s^2)*x + P3, 17 + // +(y*(1-s^2)) + (p11) fms.s0 f8 = F_Y, F_1S2_S, F_S29 + br.ret.sptk b0;; +} + + + + + + +acosl_SPECIAL_CASES: + +{.mfi + alloc r32 = ar.pfs, 1, 4, 4, 0 + // check if the input is a NaN, or unsupported format + // (i.e. not infinity or normal/denormal) + fclass.nm p7, p8 = f8, 0x3f + // pointer to pi/2 + add r3 = 96, r3;; +} + + +{.mfi + // load pi/2 + ldfpd F_PI2_HI, F_PI2_LO = [r3] + // get |s| + fmerge.s F_S = f0, f8 + nop.i 0 +} + +{.mfb + nop.m 0 + // if NaN, quietize it, and return + (p7) fma.s0 f8 = f8, f1, f0 + (p7) br.ret.spnt b0;; +} + + +{.mfi + nop.m 0 + // |s| = 1 ? + fcmp.eq.s0 p9, p10 = F_S, f1 + nop.i 0 +} + +{.mfi + nop.m 0 + // load FR_X + fma.s1 FR_X = f8, f1, f0 + // load error tag + mov GR_Parameter_TAG = 57;; +} + + +{.mfi + nop.m 0 + // if s = 1, result is 0 + (p9) fma.s0 f8 = f0, f0, f0 + // set p6=0 for |s|>1 + (p10) cmp.ne p6, p0 = r0, r0;; +} + + +{.mfb + nop.m 0 + // if s = -1, result is pi + (p6) fma.s0 f8 = F_PI2_HI, f1, F_PI2_LO + // return if |s| = 1 + (p9) br.ret.sptk b0;; +} + + +{.mfi + nop.m 0 + // get Infinity + frcpa.s1 FR_RESULT, p0 = f1, f0 + nop.i 0;; +} + + +{.mfb + nop.m 0 + // return QNaN indefinite (0*Infinity) + fma.s0 FR_RESULT = f0, FR_RESULT, f0 + nop.b 0;; +} + + +GLOBAL_LIBM_END(acosl) + + +LOCAL_LIBM_ENTRY(__libm_error_region) .prologue // (1) { .mfi @@ -1068,12 +2511,12 @@ __libm_error_region: .body // (3) { .mib - stfe [GR_Parameter_X] = f8 // Store Parameter 1 on stack + stfe [GR_Parameter_X] = FR_X // Store Parameter 1 on stack add GR_Parameter_RESULT = 0,GR_Parameter_Y nop.b 0 // Parameter 3 address } { .mib - stfe [GR_Parameter_Y] = f10 // Store Parameter 3 on stack + stfe [GR_Parameter_Y] = FR_RESULT // Store Parameter 3 on stack add GR_Parameter_Y = -16,GR_Parameter_Y br.call.sptk b0=__libm_error_support# // Call error handling function };; @@ -1097,11 +2540,13 @@ __libm_error_region: br.ret.sptk b0 // Return };; -.endp __libm_error_region -ASM_SIZE_DIRECTIVE(__libm_error_region) +LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function .global __libm_error_support# -.type __libm_atan2_reg#,@function -.global __libm_atan2_reg# + + + + + diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_acos.S glibc-2.3.5/sysdeps/ia64/fpu/e_acos.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_acos.S 2002-07-05 23:35:58.000000000 -0700 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_acos.S 2005-04-05 17:30:48.000000000 -0700 @@ -1,10 +1,10 @@ .file "acos.s" -// Copyright (C) 2000, 2001, Intel Corporation + +// Copyright (c) 2000 - 2003 Intel Corporation // All rights reserved. // -// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, -// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// Contributed 2000 by the Intel Numerics Group, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -20,9 +20,7 @@ // * The name of Intel Corporation may not be used to endorse or promote // products derived from this software without specific prior written // permission. -// -// WARRANTY DISCLAIMER -// + // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -37,838 +35,801 @@ // // Intel Corporation is the author of this code, and requests that all // problem reports or change requests be submitted to it directly at -// http://developer.intel.com/opensource. +// http://www.intel.com/software/products/opensource/libraries/num.htm. // History //============================================================== -// 2/02/00 Initial version -// 8/17/00 New and much faster algorithm. -// 8/30/00 Avoided bank conflicts on loads, shortened |x|=1 and x=0 paths, +// 02/02/00 Initial version +// 08/17/00 New and much faster algorithm. +// 08/30/00 Avoided bank conflicts on loads, shortened |x|=1 and x=0 paths, // fixed mfb split issue stalls. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 08/02/02 New and much faster algorithm II +// 02/06/03 Reordered header: .section, .global, .proc, .align // Description //========================================= -// The acos function computes the principle value of the arc sine of x. +// The acos function computes the principal value of the arc cosine of x. +// acos(0) returns Pi/2, acos(1) returns 0, acos(-1) returns Pi. // A doman error occurs for arguments not in the range [-1,+1]. +// +// The acos function returns the arc cosine in the range [0, Pi] radians. +// +// There are 8 paths: +// 1. x = +/-0.0 +// Return acos(x) = Pi/2 + x +// +// 2. 0.0 < |x| < 0.625 +// Return acos(x) = Pi/2 - x - x^3 *PolA(x^2) +// where PolA(x^2) = A3 + A5*x^2 + A7*x^4 +...+ A35*x^32 +// +// 3. 0.625 <=|x| < 1.0 +// Return acos(x) = Pi/2 - asin(x) = +// = Pi/2 - sign(x) * ( Pi/2 - sqrt(R) * PolB(R)) +// Where R = 1 - |x|, +// PolB(R) = B0 + B1*R + B2*R^2 +...+B12*R^12 +// +// sqrt(R) is approximated using the following sequence: +// y0 = (1 + eps)/sqrt(R) - initial approximation by frsqrta, +// |eps| < 2^(-8) +// Then 3 iterations are used to refine the result: +// H0 = 0.5*y0 +// S0 = R*y0 +// +// d0 = 0.5 - H0*S0 +// H1 = H0 + d0*H0 +// S1 = S0 + d0*S0 +// +// d1 = 0.5 - H1*S1 +// H2 = H1 + d0*H1 +// S2 = S1 + d0*S1 +// +// d2 = 0.5 - H2*S2 +// S3 = S3 + d2*S3 +// +// S3 approximates sqrt(R) with enough accuracy for this algorithm +// +// So, the result should be reconstracted as follows: +// acos(x) = Pi/2 - sign(x) * (Pi/2 - S3*PolB(R)) +// +// But for optimization purposes the reconstruction step is slightly +// changed: +// acos(x) = Cpi + sign(x)*PolB(R)*S2 - sign(x)*d2*S2*PolB(R) +// where Cpi = 0 if x > 0 and Cpi = Pi if x < 0 +// +// 4. |x| = 1.0 +// Return acos(1.0) = 0.0, acos(-1.0) = Pi +// +// 5. 1.0 < |x| <= +INF +// A doman error occurs for arguments not in the range [-1,+1] +// +// 6. x = [S,Q]NaN +// Return acos(x) = QNaN +// +// 7. x is denormal +// Return acos(x) = Pi/2 - x, +// +// 8. x is unnormal +// Normalize input in f8 and return to the very beginning of the function +// +// Registers used +//============================================================== +// Floating Point registers used: +// f8, input, output +// f6, f7, f9 -> f15, f32 -> f64 -// The acos function returns the arc cosine in the range [0, +pi] radians. -// acos(1) returns +0, acos(-1) returns pi, acos(0) returns pi/2. -// acos(x) returns a Nan and raises the invalid exception for |x| >1 +// General registers used: +// r3, r21 -> r31, r32 -> r38 -// The acos function is just like asin except that pi/2 is added at the end. +// Predicate registers used: +// p0, p6 -> p14 // // Assembly macros //========================================= - -#include "libm_support.h" - -// predicate registers -//acos_pred_LEsqrt2by2 = p7 -//acos_pred_GTsqrt2by2 = p8 - -// integer registers -ASIN_Addr1 = r33 -ASIN_Addr2 = r34 -ASIN_FFFE = r35 - -GR_SAVE_B0 = r36 -GR_SAVE_PFS = r37 -GR_SAVE_GP = r38 - -GR_Parameter_X = r39 -GR_Parameter_Y = r40 -GR_Parameter_RESULT = r41 -GR_Parameter_Tag = r42 - -// floating point registers -acos_coeff_P1 = f32 -acos_coeff_P2 = f33 -acos_coeff_P3 = f34 -acos_coeff_P4 = f35 - -acos_coeff_P5 = f36 -acos_coeff_P6 = f37 -acos_coeff_P7 = f38 -acos_coeff_P8 = f39 -acos_coeff_P9 = f40 - -acos_coeff_P10 = f41 -acos_coeff_P11 = f42 -acos_coeff_P12 = f43 -acos_coeff_P13 = f44 -acos_coeff_P14 = f45 - -acos_coeff_P15 = f46 -acos_coeff_P16 = f47 -acos_coeff_P17 = f48 -acos_coeff_P18 = f49 -acos_coeff_P19 = f50 - -acos_coeff_P20 = f51 -acos_coeff_P21 = f52 -acos_const_sqrt2by2 = f53 -acos_const_piby2 = f54 -acos_abs_x = f55 - -acos_tx = f56 -acos_tx2 = f57 -acos_tx3 = f58 -acos_tx4 = f59 -acos_tx8 = f60 - -acos_tx11 = f61 -acos_1poly_p8 = f62 -acos_1poly_p19 = f63 -acos_1poly_p4 = f64 -acos_1poly_p15 = f65 - -acos_1poly_p6 = f66 -acos_1poly_p17 = f67 -acos_1poly_p0 = f68 -acos_1poly_p11 = f69 -acos_1poly_p2 = f70 - -acos_1poly_p13 = f71 -acos_series_tx = f72 -acos_t = f73 -acos_t2 = f74 -acos_t3 = f75 - -acos_t4 = f76 -acos_t8 = f77 -acos_t11 = f78 -acos_poly_p8 = f79 -acos_poly_p19 = f80 - -acos_poly_p4 = f81 -acos_poly_p15 = f82 -acos_poly_p6 = f83 -acos_poly_p17 = f84 -acos_poly_p0 = f85 - -acos_poly_p11 = f86 -acos_poly_p2 = f87 -acos_poly_p13 = f88 -acos_series_t = f89 -acos_1by2 = f90 - -acos_3by2 = f91 -acos_5by2 = f92 -acos_11by4 = f93 -acos_35by8 = f94 -acos_63by8 = f95 - -acos_231by16 = f96 -acos_y0 = f97 -acos_H0 = f98 -acos_S0 = f99 -acos_d = f100 - -acos_l1 = f101 -acos_d2 = f102 -acos_T0 = f103 -acos_d1 = f104 -acos_e0 = f105 - -acos_l2 = f106 -acos_d3 = f107 -acos_T3 = f108 -acos_S1 = f109 -acos_e1 = f110 - -acos_z = f111 -answer2 = f112 -acos_sgn_x = f113 -acos_429by16 = f114 -acos_18by4 = f115 - -acos_3by4 = f116 -acos_l3 = f117 -acos_T6 = f118 -acos_const_add = f119 +// integer registers used +// scratch +rTblAddr = r3 + +rPiBy2Ptr = r21 +rTmpPtr3 = r22 +rDenoBound = r23 +rOne = r24 +rAbsXBits = r25 +rHalf = r26 +r0625 = r27 +rSign = r28 +rXBits = r29 +rTmpPtr2 = r30 +rTmpPtr1 = r31 + +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +// scratch +fXSqr = f6 +fXCube = f7 +fXQuadr = f9 +f1pX = f10 +f1mX = f11 +f1pXRcp = f12 +f1mXRcp = f13 +fH = f14 +fS = f15 +// stacked +fA3 = f32 +fB1 = f32 +fA5 = f33 +fB2 = f33 +fA7 = f34 +fPiBy2 = f34 +fA9 = f35 +fA11 = f36 +fB10 = f35 +fB11 = f36 +fA13 = f37 +fA15 = f38 +fB4 = f37 +fB5 = f38 +fA17 = f39 +fA19 = f40 +fB6 = f39 +fB7 = f40 +fA21 = f41 +fA23 = f42 +fB3 = f41 +fB8 = f42 +fA25 = f43 +fA27 = f44 +fB9 = f43 +fB12 = f44 +fA29 = f45 +fA31 = f46 +fA33 = f47 +fA35 = f48 +fBaseP = f49 +fB0 = f50 +fSignedS = f51 +fD = f52 +fHalf = f53 +fR = f54 +fCloseTo1Pol = f55 +fSignX = f56 +fDenoBound = f57 +fNormX = f58 +fX8 = f59 +fRSqr = f60 +fRQuadr = f61 +fR8 = f62 +fX16 = f63 +fCpi = f64 // Data tables //============================================================== - -#ifdef _LIBC -.rodata -#else -.data -#endif - +RODATA .align 16 +LOCAL_OBJECT_START(acos_base_range_table) +// Ai: Polynomial coefficients for the acos(x), |x| < .625000 +// Bi: Polynomial coefficients for the acos(x), |x| > .625000 +data8 0xBFDAAB56C01AE468 //A29 +data8 0x3FE1C470B76A5B2B //A31 +data8 0xBFDC5FF82A0C4205 //A33 +data8 0x3FC71FD88BFE93F0 //A35 +data8 0xB504F333F9DE6487, 0x00003FFF //B0 +data8 0xAAAAAAAAAAAAFC18, 0x00003FFC //A3 +data8 0x3F9F1C71BC4A7823 //A9 +data8 0x3F96E8BBAAB216B2 //A11 +data8 0x3F91C4CA1F9F8A98 //A13 +data8 0x3F8C9DDCEDEBE7A6 //A15 +data8 0x3F877784442B1516 //A17 +data8 0x3F859C0491802BA2 //A19 +data8 0x9999999998C88B8F, 0x00003FFB //A5 +data8 0x3F6BD7A9A660BF5E //A21 +data8 0x3F9FC1659340419D //A23 +data8 0xB6DB6DB798149BDF, 0x00003FFA //A7 +data8 0xBFB3EF18964D3ED3 //A25 +data8 0x3FCD285315542CF2 //A27 +data8 0xF15BEEEFF7D2966A, 0x00003FFB //B1 +data8 0x3EF0DDA376D10FB3 //B10 +data8 0xBEB83CAFE05EBAC9 //B11 +data8 0x3F65FFB67B513644 //B4 +data8 0x3F5032FBB86A4501 //B5 +data8 0x3F392162276C7CBA //B6 +data8 0x3F2435949FD98BDF //B7 +data8 0xD93923D7FA08341C, 0x00003FF9 //B2 +data8 0x3F802995B6D90BDB //B3 +data8 0x3F10DF86B341A63F //B8 +data8 0xC90FDAA22168C235, 0x00003FFF // Pi/2 +data8 0x3EFA3EBD6B0ECB9D //B9 +data8 0x3EDE18BA080E9098 //B12 +LOCAL_OBJECT_END(acos_base_range_table) -acos_coeff_1_table: -ASM_TYPE_DIRECTIVE(acos_coeff_1_table,@object) -data8 0xE4E7E0A423A21249 , 0x00003FF8 //P7 -data8 0xC2F7EE0200FCE2A5 , 0x0000C003 //P18 -data8 0xB745D7F6C65C20E0 , 0x00003FF9 //P5 -data8 0xF75E381A323D4D94 , 0x0000C002 //P16 -data8 0x8959C2629C1024C0 , 0x0000C002 //P20 -data8 0xAFF68E7D241292C5 , 0x00003FF8 //P9 -data8 0xB6DB6DB7260AC30D , 0x00003FFA //P3 -data8 0xD0417CE2B41CB7BF , 0x0000C000 //P14 -data8 0x81D570FEA724E3E4 , 0x0000BFFD //P12 -data8 0xAAAAAAAAAAAAC277 , 0x00003FFC //P1 -data8 0xF534912FF3E7B76F , 0x00003FFF //P21 -data8 0xc90fdaa22168c235 , 0x00003fff // pi/2 -data8 0x0000000000000000 , 0x00000000 // pad to avoid bank conflicts -ASM_SIZE_DIRECTIVE(acos_coeff_1_table) - - -acos_coeff_2_table: -ASM_TYPE_DIRECTIVE(acos_coeff_2_table,@object) -data8 0x8E26AF5F29B39A2A , 0x00003FF9 //P6 -data8 0xB4F118A4B1015470 , 0x00004003 //P17 -data8 0xF8E38E10C25990E0 , 0x00003FF9 //P4 -data8 0x80F50489AEF1CAC6 , 0x00004002 //P15 -data8 0x92728015172CFE1C , 0x00004003 //P19 -data8 0xBBC3D831D4595971 , 0x00003FF8 //P8 -data8 0x999999999952A5C3 , 0x00003FFB //P2 -data8 0x855576BE6F0975EC , 0x00003FFF //P13 -data8 0xF12420E778077D89 , 0x00003FFA //P11 -data8 0xB6590FF4D23DE003 , 0x00003FF3 //P10 -data8 0xb504f333f9de6484 , 0x00003ffe // sqrt(2)/2 -ASM_SIZE_DIRECTIVE(acos_coeff_2_table) +.section .text +GLOBAL_LIBM_ENTRY(acos) +acos_unnormal_back: +{ .mfi + getf.d rXBits = f8 // grab bits of input value + // set p12 = 1 if x is a NaN, denormal, or zero + fclass.m p12, p0 = f8, 0xcf + adds rSign = 1, r0 +} +{ .mfi + addl rTblAddr = @ltoff(acos_base_range_table),gp + // 1 - x = 1 - |x| for positive x + fms.s1 f1mX = f1, f1, f8 + addl rHalf = 0xFFFE, r0 // exponent of 1/2 +} +;; +{ .mfi + addl r0625 = 0x3FE4, r0 // high 16 bits of 0.625 + // set p8 = 1 if x < 0 + fcmp.lt.s1 p8, p9 = f8, f0 + shl rSign = rSign, 63 // sign bit +} +{ .mfi + // point to the beginning of the table + ld8 rTblAddr = [rTblAddr] + // 1 + x = 1 - |x| for negative x + fma.s1 f1pX = f1, f1, f8 + adds rOne = 0x3FF, r0 +} +;; +{ .mfi + andcm rAbsXBits = rXBits, rSign // bits of |x| + fmerge.s fSignX = f8, f1 // signum(x) + shl r0625 = r0625, 48 // bits of DP representation of 0.625 +} +{ .mfb + setf.exp fHalf = rHalf // load A2 to FP reg + fma.s1 fXSqr = f8, f8, f0 // x^2 + // branch on special path if x is a NaN, denormal, or zero +(p12) br.cond.spnt acos_special +} +;; +{ .mfi + adds rPiBy2Ptr = 272, rTblAddr + nop.f 0 + shl rOne = rOne, 52 // bits of 1.0 +} +{ .mfi + adds rTmpPtr1 = 16, rTblAddr + nop.f 0 + // set p6 = 1 if |x| < 0.625 + cmp.lt p6, p7 = rAbsXBits, r0625 +} +;; +{ .mfi + ldfpd fA29, fA31 = [rTblAddr] // A29, fA31 + // 1 - x = 1 - |x| for positive x +(p9) fms.s1 fR = f1, f1, f8 + // point to coefficient of "near 1" polynomial +(p7) adds rTmpPtr2 = 176, rTblAddr +} +{ .mfi + ldfpd fA33, fA35 = [rTmpPtr1], 16 // A33, fA35 + // 1 + x = 1 - |x| for negative x +(p8) fma.s1 fR = f1, f1, f8 +(p6) adds rTmpPtr2 = 48, rTblAddr +} +;; +{ .mfi + ldfe fB0 = [rTmpPtr1], 16 // B0 + nop.f 0 + nop.i 0 +} +{ .mib + adds rTmpPtr3 = 16, rTmpPtr2 + // set p10 = 1 if |x| = 1.0 + cmp.eq p10, p0 = rAbsXBits, rOne + // branch on special path for |x| = 1.0 +(p10) br.cond.spnt acos_abs_1 +} +;; +{ .mfi + ldfe fA3 = [rTmpPtr2], 48 // A3 or B1 + nop.f 0 + adds rTmpPtr1 = 64, rTmpPtr3 +} +{ .mib + ldfpd fA9, fA11 = [rTmpPtr3], 16 // A9, A11 or B10, B11 + // set p11 = 1 if |x| > 1.0 + cmp.gt p11, p0 = rAbsXBits, rOne + // branch on special path for |x| > 1.0 +(p11) br.cond.spnt acos_abs_gt_1 +} +;; +{ .mfi + ldfpd fA17, fA19 = [rTmpPtr2], 16 // A17, A19 or B6, B7 + // initial approximation of 1 / sqrt(1 - x) + frsqrta.s1 f1mXRcp, p0 = f1mX + nop.i 0 +} +{ .mfi + ldfpd fA13, fA15 = [rTmpPtr3] // A13, A15 or B4, B5 + fma.s1 fXCube = fXSqr, f8, f0 // x^3 + nop.i 0 +} +;; +{ .mfi + ldfe fA5 = [rTmpPtr2], 48 // A5 or B2 + // initial approximation of 1 / sqrt(1 + x) + frsqrta.s1 f1pXRcp, p0 = f1pX + nop.i 0 +} +{ .mfi + ldfpd fA21, fA23 = [rTmpPtr1], 16 // A21, A23 or B3, B8 + fma.s1 fXQuadr = fXSqr, fXSqr, f0 // x^4 + nop.i 0 +} +;; +{ .mfi + ldfe fA7 = [rTmpPtr1] // A7 or Pi/2 + fma.s1 fRSqr = fR, fR, f0 // R^2 + nop.i 0 +} +{ .mfb + ldfpd fA25, fA27 = [rTmpPtr2] // A25, A27 or B9, B12 + nop.f 0 +(p6) br.cond.spnt acos_base_range; +} +;; + +{ .mfi + nop.m 0 +(p9) fma.s1 fH = fHalf, f1mXRcp, f0 // H0 for x > 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p9) fma.s1 fS = f1mX, f1mXRcp, f0 // S0 for x > 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p8) fma.s1 fH = fHalf, f1pXRcp, f0 // H0 for x < 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fS = f1pX, f1pXRcp, f0 // S0 for x > 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fRQuadr = fRSqr, fRSqr, f0 // R^4 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB11 = fB11, fR, fB10 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB1 = fB1, fR, fB0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB5 = fB5, fR, fB4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB7 = fB7, fR, fB6 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB3 = fB3, fR, fB2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d0 = 1/2 - H0*S0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fR8 = fRQuadr, fRQuadr, f0 // R^4 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB9 = fB9, fR, fB8 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fB12 = fB12, fRSqr, fB11 + nop.i 0 +} +{.mfi + nop.m 0 + fma.s1 fB7 = fB7, fRSqr, fB5 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fma.s1 fB3 = fB3, fRSqr, fB1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fH = fH, fD, fH // H1 = H0 + H0*d0 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS, fD, fS // S1 = S0 + S0*d0 + nop.i 0 +} +;; +{.mfi + nop.m 0 +(p9) fma.s1 fCpi = f1, f0, f0 // Cpi = 0 if x > 0 + nop.i 0 +} +{ .mfi + nop.m 0 +(p8) fma.s1 fCpi = fPiBy2, f1, fPiBy2 // Cpi = Pi if x < 0 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fB12 = fB12, fRSqr, fB9 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fB7 = fB7, fRQuadr, fB3 + nop.i 0 +} +;; +{.mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d1 = 1/2 - H1*S1 + nop.i 0 +} +{ .mfi + nop.m 0 + fnma.s1 fSignedS = fSignX, fS, f0 // -signum(x)*S1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fCloseTo1Pol = fB12, fR8, fB7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fH = fH, fD, fH // H2 = H1 + H1*d1 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fS = fS, fD, fS // S2 = S1 + S1*d1 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // -signum(x)* S2 = -signum(x)*(S1 + S1*d1) + fma.s1 fSignedS = fSignedS, fD, fSignedS + nop.i 0 +} +;; +{.mfi + nop.m 0 + fnma.s1 fD = fH, fS, fHalf // d2 = 1/2 - H2*S2 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + // Cpi + signum(x)*PolB*S2 + fnma.s1 fCpi = fSignedS, fCloseTo1Pol, fCpi + nop.i 0 +} +{ .mfi + nop.m 0 + // signum(x)*PolB * S2 + fnma.s1 fCloseTo1Pol = fSignedS, fCloseTo1Pol, f0 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for 0.625 <= |x| < 1 + fma.d.s0 f8 = fCloseTo1Pol, fD, fCpi + // exit here for 0.625 <= |x| < 1 + br.ret.sptk b0 +} +;; +// here if |x| < 0.625 .align 32 -.global acos -ASM_TYPE_DIRECTIVE(acos,@function) +acos_base_range: +{ .mfi + ldfe fCpi = [rPiBy2Ptr] // Pi/2 + fma.s1 fA33 = fA33, fXSqr, fA31 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA15 = fA15, fXSqr, fA13 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA29 = fA29, fXSqr, fA27 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fXSqr, fA23 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA21 = fA21, fXSqr, fA19 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fXSqr, fA7 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA5 = fA5, fXSqr, fA3 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fXQuadr, fA33 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fXQuadr, fA15 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fX8 = fXQuadr, fXQuadr, f0 // x^8 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA25 = fA25, fXQuadr, fA21 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA9 = fA9, fXQuadr, fA5 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fms.s1 fCpi = fCpi, f1, f8 // Pi/2 - x + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fXQuadr, fA29 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fXSqr, fA11 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fX16 = fX8, fX8, f0 // x^16 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fA35 = fA35, fX8, fA25 + nop.i 0 +} +{ .mfi + nop.m 0 + fma.s1 fA17 = fA17, fX8, fA9 + nop.i 0 +} +;; +{ .mfi + nop.m 0 + fma.s1 fBaseP = fA35, fX16, fA17 + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for |x| < 0.625 + fnma.d.s0 f8 = fBaseP, fXCube, fCpi + // exit here for |x| < 0.625 path + br.ret.sptk b0 +} +;; -.section .text -.proc acos +// here if |x| = 1 +// acos(1) = 0 +// acos(-1) = Pi .align 32 +acos_abs_1: +{ .mfi + ldfe fPiBy2 = [rPiBy2Ptr] // Pi/2 + nop.f 0 + nop.i 0 +} +;; +.pred.rel "mutex", p8, p9 +{ .mfi + nop.m 0 + // result for x = 1.0 +(p9) fma.d.s0 f8 = f1, f0, f0 // 0.0 + nop.i 0 +} +{.mfb + nop.m 0 + // result for x = -1.0 +(p8) fma.d.s0 f8 = fPiBy2, f1, fPiBy2 // Pi + // exit here for |x| = 1.0 + br.ret.sptk b0 +} +;; +// here if x is a NaN, denormal, or zero +.align 32 +acos_special: +{ .mfi + // point to Pi/2 + adds rPiBy2Ptr = 272, rTblAddr + // set p12 = 1 if x is a NaN + fclass.m p12, p0 = f8, 0xc3 + nop.i 0 +} +{ .mlx + nop.m 0 + // smallest positive DP normalized number + movl rDenoBound = 0x0010000000000000 +} +;; +{ .mfi + ldfe fPiBy2 = [rPiBy2Ptr] // Pi/2 + // set p13 = 1 if x = 0.0 + fclass.m p13, p0 = f8, 0x07 + nop.i 0 +} +{ .mfi + nop.m 0 + fnorm.s1 fNormX = f8 + nop.i 0 +} +;; +{ .mfb + // load smallest normal to FP reg + setf.d fDenoBound = rDenoBound + // answer if x is a NaN +(p12) fma.d.s0 f8 = f8,f1,f0 + // exit here if x is a NaN +(p12) br.ret.spnt b0 +} +;; +{ .mfi + nop.m 0 + // absolute value of normalized x + fmerge.s fNormX = f1, fNormX + nop.i 0 +} +;; +{ .mfb + nop.m 0 + // final result for x = 0 +(p13) fma.d.s0 f8 = fPiBy2, f1, f8 + // exit here if x = 0.0 +(p13) br.ret.spnt b0 +} +;; +// if we still here then x is denormal or unnormal +{ .mfi + nop.m 0 + // set p14 = 1 if normalized x is greater than or + // equal to the smallest denormalized value + // So, if p14 is set to 1 it means that we deal with + // unnormal rather than with "true" denormal + fcmp.ge.s1 p14, p0 = fNormX, fDenoBound + nop.i 0 +} +;; +{ .mfi + nop.m 0 +(p14) fcmp.eq.s0 p6, p0 = f8, f0 // Set D flag if x unnormal + nop.i 0 +} +{ .mfb + nop.m 0 + // normalize unnormal input +(p14) fnorm.s1 f8 = f8 + // return to the main path +(p14) br.cond.sptk acos_unnormal_back +} +;; +// if we still here it means that input is "true" denormal +{ .mfb + nop.m 0 + // final result if x is denormal + fms.d.s0 f8 = fPiBy2, f1, f8 // Pi/2 - x + // exit here if x is denormal + br.ret.sptk b0 +} +;; -acos: - -{ .mfi - alloc r32 = ar.pfs,1,6,4,0 - fma.s1 acos_tx = f8,f8,f0 - addl ASIN_Addr2 = @ltoff(acos_coeff_2_table),gp -} -{ .mfi - mov ASIN_FFFE = 0xFFFE - fnma.s1 acos_t = f8,f8,f1 - addl ASIN_Addr1 = @ltoff(acos_coeff_1_table),gp -} -;; - - -{ .mfi - setf.exp acos_1by2 = ASIN_FFFE - fmerge.s acos_abs_x = f1,f8 - nop.i 999 ;; -} - - -{ .mmf - ld8 ASIN_Addr1 = [ASIN_Addr1] - ld8 ASIN_Addr2 = [ASIN_Addr2] - fmerge.s acos_sgn_x = f8,f1 -} -;; - - -{ .mfi - nop.m 999 - fcmp.lt.s1 p11,p12 = f8, f0 - nop.i 999 ;; -} - - -{ .mfi - ldfe acos_coeff_P7 = [ASIN_Addr1],16 - fma.s1 acos_tx2 = acos_tx,acos_tx,f0 - nop.i 999 -} -{ .mfi - ldfe acos_coeff_P6 = [ASIN_Addr2],16 - fma.s1 acos_t2 = acos_t,acos_t,f0 - nop.i 999;; -} - - -{ .mmf - ldfe acos_coeff_P18 = [ASIN_Addr1],16 - ldfe acos_coeff_P17 = [ASIN_Addr2],16 - fclass.m.unc p8,p0 = f8, 0xc3 //@qnan |@snan -} -;; - - -{ .mmf - ldfe acos_coeff_P5 = [ASIN_Addr1],16 - ldfe acos_coeff_P4 = [ASIN_Addr2],16 - frsqrta.s1 acos_y0,p0 = acos_t -} -;; - - -{ .mfi - ldfe acos_coeff_P16 = [ASIN_Addr1],16 - fcmp.gt.s1 p9,p0 = acos_abs_x,f1 - nop.i 999 -} -{ .mfb - ldfe acos_coeff_P15 = [ASIN_Addr2],16 -(p8) fma.d f8 = f8,f1,f0 -(p8) br.ret.spnt b0 -} -;; - - -{ .mmf - ldfe acos_coeff_P20 = [ASIN_Addr1],16 - ldfe acos_coeff_P19 = [ASIN_Addr2],16 - fclass.m.unc p10,p0 = f8, 0x07 //@zero -} -;; - - -{ .mfi - ldfe acos_coeff_P9 = [ASIN_Addr1],16 - fma.s1 acos_t4 = acos_t2,acos_t2,f0 -(p9) mov GR_Parameter_Tag = 58 -} -{ .mfi - ldfe acos_coeff_P8 = [ASIN_Addr2],16 - fma.s1 acos_3by2 = acos_1by2,f1,f1 - nop.i 999;; -} - - -{ .mfi - ldfe acos_coeff_P2 = [ASIN_Addr2],16 - fma.s1 acos_tx4 = acos_tx2,acos_tx2,f0 - nop.i 999 -} -{ .mfb - ldfe acos_coeff_P3 = [ASIN_Addr1],16 - fma.s1 acos_t3 = acos_t,acos_t2,f0 -(p9) br.cond.spnt __libm_error_region -} -;; - - -{ .mfi - ldfe acos_coeff_P13 = [ASIN_Addr2],16 - fma.s1 acos_H0 = acos_y0,acos_1by2,f0 - nop.i 999 -} -{ .mfi - ldfe acos_coeff_P14 = [ASIN_Addr1],16 - fma.s1 acos_S0 = acos_y0,acos_t,f0 - nop.i 999;; -} - - -{ .mfi - ldfe acos_coeff_P11 = [ASIN_Addr2],16 - fcmp.eq.s1 p6,p0 = acos_abs_x, f1 - nop.i 999 -} -{ .mfi - ldfe acos_coeff_P12 = [ASIN_Addr1],16 - fma.s1 acos_tx3 = acos_tx,acos_tx2,f0 - nop.i 999 -} -;; - - -{ .mfi - ldfe acos_coeff_P10 = [ASIN_Addr2],16 - fma.s1 acos_1poly_p6 = acos_tx,acos_coeff_P7,acos_coeff_P6 - nop.i 999 -} -{ .mfi - ldfe acos_coeff_P1 = [ASIN_Addr1],16 - fma.s1 acos_poly_p6 = acos_t,acos_coeff_P7,acos_coeff_P6 - nop.i 999;; -} - - -{ .mfi - ldfe acos_const_sqrt2by2 = [ASIN_Addr2],16 - fma.s1 acos_5by2 = acos_3by2,f1,f1 - nop.i 999 -} -{ .mfi - ldfe acos_coeff_P21 = [ASIN_Addr1],16 - fma.s1 acos_11by4 = acos_3by2,acos_3by2,acos_1by2 - nop.i 999;; -} - - -{ .mfi - ldfe acos_const_piby2 = [ASIN_Addr1],16 - fma.s1 acos_poly_p17 = acos_t,acos_coeff_P18,acos_coeff_P17 - nop.i 999 -} -{ .mfb - nop.m 999 - fma.s1 acos_3by4 = acos_3by2,acos_1by2,f0 -(p10) br.cond.spnt L(ACOS_ZERO) // Branch to short path if x=0 -} -;; - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p15 = acos_t,acos_coeff_P16,acos_coeff_P15 - nop.i 999 -} -{ .mfb - nop.m 999 - fnma.s1 acos_d = acos_S0,acos_H0,acos_1by2 -(p6) br.cond.spnt L(ACOS_ABS_ONE) // Branch to short path if |x|=1 -} -;; - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p19 = acos_t,acos_coeff_P20,acos_coeff_P19 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p4 = acos_t,acos_coeff_P5,acos_coeff_P4 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p17 = acos_tx,acos_coeff_P18,acos_coeff_P17 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p8 = acos_t,acos_coeff_P9,acos_coeff_P8 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fms.s1 acos_35by8 = acos_5by2,acos_11by4,acos_5by2 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_63by8 = acos_5by2,acos_11by4,f1 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p13 = acos_t,acos_coeff_P14,acos_coeff_P13 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_18by4 = acos_3by2,acos_5by2,acos_3by4 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_l1 = acos_5by2,acos_d,acos_3by2 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_d2 = acos_d,acos_d,f0 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p15 = acos_t2,acos_poly_p17,acos_poly_p15 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_T0 = acos_d,acos_S0,f0 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p19 = acos_t2,acos_coeff_P21,acos_poly_p19 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p4 = acos_t2,acos_poly_p6,acos_poly_p4 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_d1 = acos_35by8,acos_d,f0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_231by16 = acos_3by2,acos_35by8,acos_63by8 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p2 = acos_t,acos_coeff_P3,acos_coeff_P2 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p8 = acos_t2,acos_coeff_P10,acos_poly_p8 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p11 = acos_t,acos_coeff_P12,acos_coeff_P11 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_e0 = acos_d2,acos_l1,acos_d - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p15 = acos_tx,acos_coeff_P16,acos_coeff_P15 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p0 = acos_t,acos_coeff_P1,f1 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p19 = acos_tx,acos_coeff_P20,acos_coeff_P19 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p4 = acos_tx,acos_coeff_P5,acos_coeff_P4 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p8 = acos_tx,acos_coeff_P9,acos_coeff_P8 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_l2 = acos_231by16,acos_d,acos_63by8 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_d3 = acos_d2,acos_d,f0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_T3 = acos_d2,acos_T0,f0 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_429by16 = acos_18by4,acos_11by4,acos_231by16 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_S1 = acos_e0,acos_S0,acos_S0 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p4 = acos_t4,acos_poly_p8,acos_poly_p4 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p15 = acos_t4,acos_poly_p19,acos_poly_p15 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p0 = acos_t2,acos_poly_p2,acos_poly_p0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p11 = acos_t2,acos_poly_p13,acos_poly_p11 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_t8 = acos_t4,acos_t4,f0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_e1 = acos_d2,acos_l2,acos_d1 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p4 = acos_tx2,acos_1poly_p6,acos_1poly_p4 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p15 = acos_tx2,acos_1poly_p17,acos_1poly_p15 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p8 = acos_tx2,acos_coeff_P10,acos_1poly_p8 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p19 = acos_tx2,acos_coeff_P21,acos_1poly_p19 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p2 = acos_tx,acos_coeff_P3,acos_coeff_P2 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p13 = acos_tx,acos_coeff_P14,acos_coeff_P13 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p0 = acos_tx,acos_coeff_P1,f1 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p11 = acos_tx,acos_coeff_P12,acos_coeff_P11 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_l3 = acos_429by16,acos_d,f0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_z = acos_e1,acos_T3,acos_S1 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_poly_p11 = acos_t4,acos_poly_p15,acos_poly_p11 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_T6 = acos_T3,acos_d3,f0 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_t11 = acos_t8,acos_t3,f0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_poly_p0 = acos_t4,acos_poly_p4,acos_poly_p0 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p4 = acos_tx4,acos_1poly_p8,acos_1poly_p4 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p15 = acos_tx4,acos_1poly_p19,acos_1poly_p15 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p0 = acos_tx2,acos_1poly_p2,acos_1poly_p0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p11 = acos_tx2,acos_1poly_p13,acos_1poly_p11 - nop.i 999;; -} - - -{ .mfi - nop.m 999 -// fcmp.le.s1 acos_pred_LEsqrt2by2,acos_pred_GTsqrt2by2 = acos_abs_x,acos_const_sqrt2by2 - fcmp.le.s1 p7,p8 = acos_abs_x,acos_const_sqrt2by2 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_tx8 = acos_tx4,acos_tx4,f0 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_z = acos_l3,acos_T6,acos_z - nop.i 999;; -} - -{ .mfi - nop.m 999 - fma.s1 acos_series_t = acos_t11,acos_poly_p11,acos_poly_p0 - nop.i 999 -} -{ .mfi - nop.m 999 -(p11) fma.s1 acos_const_add = acos_const_piby2, f1, acos_const_piby2 - nop.i 999 -} -;; - -{ .mfi - nop.m 999 -(p12) fma.s1 acos_const_add = f1,f0,f0 - nop.i 999 -} -;; - -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p0 = acos_tx4,acos_1poly_p4,acos_1poly_p0 - nop.i 999 -} -{ .mfi - nop.m 999 - fma.s1 acos_1poly_p11 = acos_tx4,acos_1poly_p15,acos_1poly_p11 - nop.i 999;; -} - - -{ .mfi - nop.m 999 - fma.s1 acos_tx11 = acos_tx8,acos_tx3,f0 - nop.i 999;; -} - -{ .mfi - nop.m 999 -//(acos_pred_GTsqrt2by2) fnma.s1 answer2 = acos_z,acos_series_t,acos_const_piby2 -(p8) fnma.s1 answer2 = acos_z,acos_series_t,f0 - nop.i 999;; -} - -{ .mfi - nop.m 999 - fma.s1 acos_series_tx = acos_tx11,acos_1poly_p11,acos_1poly_p0 - nop.i 999;; -} - -{ .mfi - nop.m 999 -//(acos_pred_GTsqrt2by2) fnma.d f8 = acos_sgn_x,answer2,acos_const_piby2 -(p8) fnma.d f8 = acos_sgn_x,answer2,acos_const_add - nop.i 999;; -} - -{ .mfb - nop.m 999 -//(acos_pred_LEsqrt2by2) fnma.d f8 = f8,acos_series_tx,acos_const_piby2 -(p7) fnma.d f8 = f8,acos_series_tx,acos_const_piby2 - br.ret.sptk b0 ;; -} - - -L(ACOS_ZERO): -// Here if x=0 -{ .mfb - nop.m 999 - fma.d f8 = acos_const_piby2,f1,f0 - br.ret.sptk b0 ;; -} - - -L(ACOS_ABS_ONE): -.pred.rel "mutex",p11,p12 -// Here if |x|=1 -{ .mfi - nop.m 999 -(p11) fma.d f8 = acos_const_piby2,f1,acos_const_piby2 // acos(-1)=pi - nop.i 999 -} -{ .mfb - nop.m 999 -(p12) fma.d f8 = f1,f0,f0 // acos(1)=0 - br.ret.sptk b0 ;; -} +// here if |x| > 1.0 +// error handler should be called +.align 32 +acos_abs_gt_1: +{ .mfi + alloc r32 = ar.pfs, 0, 3, 4, 0 // get some registers + fmerge.s FR_X = f8,f8 + nop.i 0 +} +{ .mfb + mov GR_Parameter_TAG = 58 // error code + frcpa.s0 FR_RESULT, p0 = f0,f0 + // call error handler routine + br.cond.sptk __libm_error_region +} +;; +GLOBAL_LIBM_END(acos) -.endp acos -ASM_SIZE_DIRECTIVE(acos) -.proc __libm_error_region -__libm_error_region: +LOCAL_LIBM_ENTRY(__libm_error_region) .prologue { .mfi add GR_Parameter_Y=-32,sp // Parameter 2 value - nop.f 999 + nop.f 0 .save ar.pfs,GR_SAVE_PFS mov GR_SAVE_PFS=ar.pfs // Save ar.pfs } @@ -879,28 +840,29 @@ __libm_error_region: mov GR_SAVE_GP=gp // Save gp };; { .mmi - stfs [GR_Parameter_Y] = f1,16 // Store Parameter 2 on stack + stfd [GR_Parameter_Y] = FR_Y,16 // STORE Parameter 2 on stack add GR_Parameter_X = 16,sp // Parameter 1 address .save b0, GR_SAVE_B0 mov GR_SAVE_B0=b0 // Save b0 };; - .body - frcpa.s0 f9,p0 = f0,f0 -;; - { .mib - stfd [GR_Parameter_X] = f8 // Store Parameter 1 on stack - add GR_Parameter_RESULT = 0,GR_Parameter_Y - nop.b 0 // Parameter 3 address + stfd [GR_Parameter_X] = FR_X // STORE Parameter 1 on stack + add GR_Parameter_RESULT = 0,GR_Parameter_Y // Parameter 3 address + nop.b 0 } { .mib - stfd [GR_Parameter_Y] = f9,-16 // Store Parameter 3 on stack - adds r32 = 48,sp - br.call.sptk b0=__libm_error_support# // Call error handling function + stfd [GR_Parameter_Y] = FR_RESULT // STORE Parameter 3 on stack + add GR_Parameter_Y = -16,GR_Parameter_Y + br.call.sptk b0=__libm_error_support# // Call error handling function };; { .mmi - ldfd f8 = [r32] // Get return result off stack + add GR_Parameter_RESULT = 48,sp + nop.m 0 + nop.i 0 +};; +{ .mmi + ldfd f8 = [GR_Parameter_RESULT] // Get return result off stack .restore sp add sp = 64,sp // Restore stack pointer mov b0 = GR_SAVE_B0 // Restore return address @@ -909,11 +871,8 @@ __libm_error_region: mov gp = GR_SAVE_GP // Restore gp mov ar.pfs = GR_SAVE_PFS // Restore ar.pfs br.ret.sptk b0 // Return - };; -.endp __libm_error_region -ASM_SIZE_DIRECTIVE(__libm_error_region) - -.type __libm_error_support,@function -.global __libm_error_support +LOCAL_LIBM_END(__libm_error_region) +.type __libm_error_support#,@function +.global __libm_error_support# diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_asinf.S glibc-2.3.5/sysdeps/ia64/fpu/e_asinf.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_asinf.S 2002-07-05 23:35:58.000000000 -0700 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_asinf.S 2005-04-05 17:30:49.000000000 -0700 @@ -1,10 +1,10 @@ .file "asinf.s" -// Copyright (C) 2000, 2001, Intel Corporation + +// Copyright (c) 2000 - 2003, Intel Corporation // All rights reserved. // -// Contributed 2/02/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, -// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// Contributed 2000 by the Intel Numerics Group, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -20,7 +20,7 @@ // * The name of Intel Corporation may not be used to endorse or promote // products derived from this software without specific prior written // permission. -// + // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR @@ -35,21 +35,25 @@ // // Intel Corporation is the author of this code, and requests that all // problem reports or change requests be submitted to it directly at -// http://developer.intel.com/opensource. +// http://www.intel.com/software/products/opensource/libraries/num.htm. // History //============================================================== -// 2/02/00 Initial revision -// 6/28/00 Improved speed -// 6/31/00 Changed register allocation because of some duplicate macros +// 02/02/00 Initial version +// 06/28/00 Improved speed +// 06/31/00 Changed register allocation because of some duplicate macros // moved nan exit bundle up to gain a cycle. -// 8/08/00 Improved speed by avoiding SIR flush. -// 8/15/00 Bundle added after call to __libm_error_support to properly +// 08/08/00 Improved speed by avoiding SIR flush. +// 08/15/00 Bundle added after call to __libm_error_support to properly // set [the previously overwritten] GR_Parameter_RESULT. -// 8/17/00 Changed predicate register macro-usage to direct predicate +// 08/17/00 Changed predicate register macro-usage to direct predicate // names due to an assembler bug. // 10/17/00 Improved speed of x=0 and x=1 paths, set D flag if x denormal. +// 03/13/01 Corrected sign of imm1 value in dep instruction. +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align + // Description //========================================= // The asinf function computes the arc sine of x in the range [-pi,+pi]. @@ -119,7 +123,6 @@ // answer2 = - sign(x) z P(t) + (sign(x) pi/2) // -#include "libm_support.h" // Assembly macros //========================================= @@ -225,42 +228,30 @@ asinf_poly_p1a = f90 // Data tables //============================================================== -#ifdef _LIBC -.rodata -#else -.data -#endif +RODATA .align 16 -asinf_coeff_1_table: -ASM_TYPE_DIRECTIVE(asinf_coeff_1_table,@object) +LOCAL_OBJECT_START(asinf_coeff_1_table) data8 0x3FC5555607DCF816 // P1 data8 0x3F9CF81AD9BAB2C6 // P4 data8 0x3FC59E0975074DF3 // P7 data8 0xBFA6F4CC2780AA1D // P6 data8 0x3FC2DD45292E93CB // P9 data8 0x3fe6a09e667f3bcd // sqrt(2)/2 -ASM_SIZE_DIRECTIVE(asinf_coeff_1_table) +LOCAL_OBJECT_END(asinf_coeff_1_table) -asinf_coeff_2_table: -ASM_TYPE_DIRECTIVE(asinf_coeff_2_table,@object) +LOCAL_OBJECT_START(asinf_coeff_2_table) data8 0x3FA6F108E31EFBA6 // P3 data8 0xBFCA31BF175D82A0 // P8 data8 0x3FA30C0337F6418B // P5 data8 0x3FB332C9266CB1F9 // P2 data8 0x3ff921fb54442d18 // pi_by_2 -ASM_SIZE_DIRECTIVE(asinf_coeff_2_table) +LOCAL_OBJECT_END(asinf_coeff_2_table) -.align 32 -.global asinf - .section .text -.proc asinf -.align 32 - -asinf: +GLOBAL_LIBM_ENTRY(asinf) // Load the addresses of the two tables. // Then, load the coefficients and other constants. @@ -345,7 +336,7 @@ asinf: } { .mfb nop.m 999 -(p8) fma.s f8 = f8,f1,f0 +(p8) fma.s.s0 f8 = f8,f1,f0 (p8) br.ret.spnt b0 ;; // Exit if x=nan } @@ -370,7 +361,7 @@ asinf: { .mfb nop.m 999 fma.s1 asinf_t4 = asinf_t2,asinf_t2,f0 -(p6) br.cond.spnt L(ASINF_ABS_ONE) ;; // Branch if |x|=1 +(p6) br.cond.spnt ASINF_ABS_ONE ;; // Branch if |x|=1 } { .mfi @@ -572,27 +563,26 @@ asinf: .pred.rel "mutex",p8,p7 //asinf_pred_GTsqrt2by2,asinf_pred_LEsqrt2by2 { .mfi nop.m 999 -(p8) fnma.s f8 = asinf_z,asinf_Pt,asinf_sgn_x_piby2 +(p8) fnma.s.s0 f8 = asinf_z,asinf_Pt,asinf_sgn_x_piby2 nop.i 999 } { .mfb nop.m 999 -(p7) fma.s f8 = asinf_x11,asinf_poly_Bx,asinf_poly_Ax +(p7) fma.s.s0 f8 = asinf_x11,asinf_poly_Bx,asinf_poly_Ax br.ret.sptk b0 ;; } -L(ASINF_ABS_ONE): +ASINF_ABS_ONE: // Here for short exit if |x|=1 { .mfb nop.m 999 - fma.s f8 = asinf_sgn_x,asinf_const_piby2,f0 + fma.s.s0 f8 = asinf_sgn_x,asinf_const_piby2,f0 br.ret.sptk b0 } ;; -.endp asinf -ASM_SIZE_DIRECTIVE(asinf) +GLOBAL_LIBM_END(asinf) // Stack operations when calling error support. // (1) (2) @@ -623,8 +613,7 @@ ASM_SIZE_DIRECTIVE(asinf) // restore gp // restore ar.pfs -.proc __libm_error_region -__libm_error_region: +LOCAL_LIBM_ENTRY(__libm_error_region) .prologue { .mfi add GR_Parameter_Y=-32,sp // Parameter 2 value @@ -680,8 +669,7 @@ __libm_error_region: br.ret.sptk b0 // Return };; -.endp __libm_error_region -ASM_SIZE_DIRECTIVE(__libm_error_region) +LOCAL_LIBM_END(__libm_error_region) .type __libm_error_support#,@function .global __libm_error_support# diff -rNpu glibc-2.3.4/sysdeps/ia64/fpu/e_asinl.S glibc-2.3.5/sysdeps/ia64/fpu/e_asinl.S --- glibc-2.3.4/sysdeps/ia64/fpu/e_asinl.S 2002-07-05 23:35:58.000000000 -0700 +++ glibc-2.3.5/sysdeps/ia64/fpu/e_asinl.S 2005-04-05 17:30:49.000000000 -0700 @@ -1,10 +1,10 @@ .file "asinl.s" -// Copyright (C) 2000, 2001, Intel Corporation + +// Copyright (c) 2001 - 2003, Intel Corporation // All rights reserved. -// -// Contributed 2/2/2000 by John Harrison, Ted Kubaska, Bob Norin, Shane Story, -// and Ping Tak Peter Tang of the Computational Software Lab, Intel Corporation. +// +// Contributed 2001 by the Intel Numerics Group, Intel Corporation // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -20,720 +20,2449 @@ // * The name of Intel Corporation may not be used to endorse or promote // products derived from this software without specific prior written // permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING -// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// +// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// // Intel Corporation is the author of this code, and requests that all -// problem reports or change requests be submitted to it directly at -// http://developer.intel.com/opensource. +// problem reports or change requests be submitted to it directly at +// http://www.intel.com/software/products/opensource/libraries/num.htm. // // History //============================================================== -// 2/02/00 Initial version -// 4/04/00 Unwind support added -// 8/15/00 Bundle added after call to __libm_error_support to properly -// set [the previously overwritten] GR_Parameter_RESULT. +// 08/28/01 New version +// 05/20/02 Cleaned up namespace and sf0 syntax +// 02/06/03 Reordered header: .section, .global, .proc, .align // // API //============================================================== -// long double = asinl(long double) -// input floating point f8 -// output floating point f8 +// long double asinl(long double) // -// Registers used +// Overview of operation //============================================================== +// Background // -// predicate registers used: -// p6 -> p12 +// Implementation // -// floating-point registers used: -// f8 has input, then output -// f32 -> f87, f8 -> f13, f32 -> f87 +// For |s| in [2^{-4}, sqrt(2)/2]: +// Let t= 2^k*1.b1 b2..b6 1, where s= 2^k*1.b1 b2.. b52 +// asin(s)= asin(t)+asin(r), where r= s*sqrt(1-t^2)-t*sqrt(1-s^2), i.e. +// r= (s-t)*sqrt(1-t^2)-t*sqrt(1-t^2)*(sqrt((1-s^2)/(1-t^2))-1) +// asin(r)-r evaluated as 9-degree polynomial (c3*r^3+c5*r^5+c7*r^7+c9*r^9) +// The 64-bit significands of sqrt(1-t^2), 1/(1-t^2) are read from the table, +// along with the high and low parts of asin(t) (stored as two double precision +// values) // -// general registers used: -// r32 -> r47 +// |s| in (sqrt(2)/2, sqrt(255/256)): +// Let t= 2^k*1.b1 b2..b6 1, where (1-s^2)*frsqrta(1-s^2)= 2^k*1.b1 b2..b6.. +// asin(|s|)= pi/2-asin(t)+asin(r), r= s*t-sqrt(1-s^2)*sqrt(1-t^2) +// To minimize accumulated errors, r is computed as +// r= (t*s)_s-t^2*y*z+z*y*(t^2-1+s^2)_s+z*y*(1-s^2)_s*x+z'*y*(1-s^2)*PS29+ +// +(t*s-(t*s)_s)+z*y*((t^2-1-(t^2-1+s^2)_s)+s^2)+z*y*(1-s^2-(1-s^2)_s)+ +// +ez*z'*y*(1-s^2)*(1-x), +// where y= frsqrta(1-s^2), z= (sqrt(1-t^2))_s (rounded to 24 significant bits) +// z'= sqrt(1-t^2), x= ((1-s^2)*y^2-1)/2 // -// Overview of operation +// |s|<2^{-4}: evaluate as 17-degree polynomial +// (or simply return s, if|s|<2^{-64}) +// +// |s| in [sqrt(255/256), 1): asin(|s|)= pi/2-asin(sqrt(1-s^2)) +// use 17-degree polynomial for asin(sqrt(1-s^2)), +// 9-degree polynomial to evaluate sqrt(1-s^2) +// High order term is (pi/2)_high-(y*(1-s^2))_high +// + + + +// Registers used //============================================================== -// There are three paths -// 1. |x| < 2^-40 ASIN_TINY -// 2. 2^-40 <= |x| < 1/4 ASIN_POLY -// 3. 1/4 <= |x| < 1 ASIN_ATAN +// f6-f15, f32-f36 +// r2-r3, r23-r23 +// p6, p7, p8, p12 +// + + + GR_SAVE_B0= r33 + GR_SAVE_PFS= r34 + GR_SAVE_GP= r35 // This reg. can safely be used + GR_SAVE_SP= r36 + + GR_Parameter_X= r37 + GR_Parameter_Y= r38 + GR_Parameter_RESULT= r39 + GR_Parameter_TAG= r40 + + FR_X= f10 + FR_Y= f1 + FR_RESULT= f8 + + + +RODATA + +.align 16 + + + +LOCAL_OBJECT_START(T_table) + +// stores 64-bit significand of 1/(1-t^2), 64-bit significand of sqrt(1-t^2), +// asin(t)_high (double precision), asin(t)_low (double precision) + +data8 0x80828692b71c4391, 0xff7ddcec2d87e879 +data8 0x3fb022bc0ae531a0, 0x3c9f599c7bb42af6 +data8 0x80869f0163d0b082, 0xff79cad2247914d3 +data8 0x3fb062dd26afc320, 0x3ca4eff21bd49c5c +data8 0x808ac7d5a8690705, 0xff75a89ed6b626b9 +data8 0x3fb0a2ff4a1821e0, 0x3cb7e33b58f164cc +data8 0x808f0112ad8ad2e0, 0xff7176517c2cc0cb +data8 0x3fb0e32279319d80, 0x3caee31546582c43 +data8 0x80934abba8a1da0a, 0xff6d33e949b1ed31 +data8 0x3fb12346b8101da0, 0x3cb8bfe463d087cd +data8 0x8097a4d3dbe63d8f, 0xff68e16571015c63 +data8 0x3fb1636c0ac824e0, 0x3c8870a7c5a3556f +data8 0x809c0f5e9662b3dd, 0xff647ec520bca0f0 +data8 0x3fb1a392756ed280, 0x3c964f1a927461ae +data8 0x80a08a5f33fadc66, 0xff600c07846a6830 +data8 0x3fb1e3b9fc19e580, 0x3c69eb3576d56332 +data8 0x80a515d91d71acd4, 0xff5b892bc475affa +data8 0x3fb223e2a2dfbe80, 0x3c6a4e19fd972fb6 +data8 0x80a9b1cfc86ff7cd, 0xff56f631062cf93d +data8 0x3fb2640c6dd76260, 0x3c62041160e0849e +data8 0x80ae5e46b78b0d68, 0xff5253166bc17794 +data8 0x3fb2a43761187c80, 0x3cac61651af678c0 +data8 0x80b31b417a4b756b, 0xff4d9fdb14463dc8 +data8 0x3fb2e46380bb6160, 0x3cb06ef23eeba7a1 +data8 0x80b7e8c3ad33c369, 0xff48dc7e1baf6738 +data8 0x3fb32490d0d910c0, 0x3caa05f480b300d5 +data8 0x80bcc6d0f9c784d6, 0xff4408fe9ad13e37 +data8 0x3fb364bf558b3820, 0x3cb01e7e403aaab9 +data8 0x80c1b56d1692492d, 0xff3f255ba75f5f4e +data8 0x3fb3a4ef12ec3540, 0x3cb4fe8fcdf5f5f1 +data8 0x80c6b49bc72ec446, 0xff3a319453ebd961 +data8 0x3fb3e5200d171880, 0x3caf2dc089b2b7e2 +data8 0x80cbc460dc4e0ae8, 0xff352da7afe64ac6 +data8 0x3fb425524827a720, 0x3cb75a855e7c6053 +data8 0x80d0e4c033bee9c4, 0xff301994c79afb32 +data8 0x3fb46585c83a5e00, 0x3cb3264981c019ab +data8 0x80d615bdb87556db, 0xff2af55aa431f291 +data8 0x3fb4a5ba916c73c0, 0x3c994251d94427b5 +data8 0x80db575d6291fd8a, 0xff25c0f84bae0cb9 +data8 0x3fb4e5f0a7dbdb20, 0x3cbee2fcc4c786cb +data8 0x80e0a9a33769e535, 0xff207c6cc0ec09fd +data8 0x3fb526280fa74620, 0x3c940656e5549b91 +data8 0x80e60c93498e32cd, 0xff1b27b703a19c98 +data8 0x3fb56660ccee2740, 0x3ca7082374d7b2cd +data8 0x80eb8031b8d4052d, 0xff15c2d6105c72f8 +data8 0x3fb5a69ae3d0b520, 0x3c7c4d46e09ac68a +data8 0x80f10482b25c6c8a, 0xff104dc8e0813ed4 +data8 0x3fb5e6d6586fec20, 0x3c9aa84ffd9b4958 +data8 0x80f6998a709c7cfb, 0xff0ac88e6a4ab926 +data8 0x3fb627132eed9140, 0x3cbced2cbbbe7d16 +data8 0x80fc3f4d3b657c44, 0xff053325a0c8a2ec +data8 0x3fb667516b6c34c0, 0x3c6489c5fc68595a +data8 0x8101f5cf67ed2af8, 0xfeff8d8d73dec2bb +data8 0x3fb6a791120f33a0, 0x3cbe12acf159dfad +data8 0x8107bd1558d6291f, 0xfef9d7c4d043df29 +data8 0x3fb6e7d226fabba0, 0x3ca386d099cd0dc7 +data8 0x810d95237e38766a, 0xfef411ca9f80b5f7 +data8 0x3fb72814ae53cc20, 0x3cb9f35731e71dd6 +data8 0x81137dfe55aa0e29, 0xfeee3b9dc7eef009 +data8 0x3fb76858ac403a00, 0x3c74df3dd959141a +data8 0x811977aa6a479f0f, 0xfee8553d2cb8122c +data8 0x3fb7a89e24e6b0e0, 0x3ca6034406ee42bc +data8 0x811f822c54bd5ef8, 0xfee25ea7add46a91 +data8 0x3fb7e8e51c6eb6a0, 0x3cb82f8f78e68ed7 +data8 0x81259d88bb4ffac1, 0xfedc57dc2809fb1d +data8 0x3fb8292d9700ad60, 0x3cbebb73c0e653f9 +data8 0x812bc9c451e5a257, 0xfed640d974eb6068 +data8 0x3fb8697798c5d620, 0x3ca2feee76a9701b +data8 0x813206e3da0f3124, 0xfed0199e6ad6b585 +data8 0x3fb8a9c325e852e0, 0x3cb9e88f2f4d0efe +data8 0x813854ec231172f9, 0xfec9e229dcf4747d +data8 0x3fb8ea1042932a00, 0x3ca5ff40d81f66fd +data8 0x813eb3e209ee858f, 0xfec39a7a9b36538b +data8 0x3fb92a5ef2f247c0, 0x3cb5e3bece4d6b07 +data8 0x814523ca796f56ce, 0xfebd428f72561efe +data8 0x3fb96aaf3b3281a0, 0x3cb7b9e499436d7c +data8 0x814ba4aa6a2d3ff9, 0xfeb6da672bd48fe4 +data8 0x3fb9ab011f819860, 0x3cb9168143cc1a7f +data8 0x81523686e29bbdd7, 0xfeb062008df81f50 +data8 0x3fb9eb54a40e3ac0, 0x3cb6e544197eb1e1 +data8 0x8158d964f7124614, 0xfea9d95a5bcbd65a +data8 0x3fba2ba9cd080800, 0x3ca9a717be8f7446 +data8 0x815f8d49c9d639e4, 0xfea34073551e1ac8 +data8 0x3fba6c009e9f9260, 0x3c741e989a60938a +data8 0x8166523a8b24f626, 0xfe9c974a367f785c +data8 0x3fbaac591d0661a0, 0x3cb2c1290107e57d +data8 0x816d283c793e0114, 0xfe95ddddb94166cb +data8 0x3fbaecb34c6ef600, 0x3c9c7d5fbaec405d +data8 0x81740f54e06d55bd, 0xfe8f142c93750c50 +data8 0x3fbb2d0f310cca00, 0x3cbc09479a9cbcfb +data8 0x817b07891b15cd5e, 0xfe883a3577e9fceb +data8 0x3fbb6d6ccf1455e0, 0x3cb9450bff4ee307 +data8 0x818210de91bba6c8, 0xfe814ff7162cf62f +data8 0x3fbbadcc2abb1180, 0x3c9227fda12a8d24 +data8 0x81892b5abb0f2bf9, 0xfe7a55701a8697b1 +data8 0x3fbbee2d48377700, 0x3cb6fad72acfe356 +data8 0x819057031bf7760e, 0xfe734a9f2dfa1810 +data8 0x3fbc2e902bc10600, 0x3cb4465b588d16ad +data8 0x819793dd479d4fbe, 0xfe6c2f82f643f68b +data8 0x3fbc6ef4d9904580, 0x3c8b9ac54823960d +data8 0x819ee1eedf76367a, 0xfe65041a15d8a92c +data8 0x3fbcaf5b55dec6a0, 0x3ca2b8d28a954db2 +data8 0x81a6413d934f7a66, 0xfe5dc8632be3477f +data8 0x3fbcefc3a4e727a0, 0x3c9380da83713ab4 +data8 0x81adb1cf21597d4b, 0xfe567c5cd44431d5 +data8 0x3fbd302dcae51600, 0x3ca995b83421756a +data8 0x81b533a9563310b8, 0xfe4f2005a78fb50f +data8 0x3fbd7099cc155180, 0x3caefa2f7a817d5f +data8 0x81bcc6d20cf4f373, 0xfe47b35c3b0caaeb +data8 0x3fbdb107acb5ae80, 0x3cb455fc372dd026 +data8 0x81c46b4f2f3d6e68, 0xfe40365f20b316d6 +data8 0x3fbdf177710518c0, 0x3cbee3dcc5b01434 +data8 0x81cc2126b53c1144, 0xfe38a90ce72abf36 +data8 0x3fbe31e91d439620, 0x3cb3e131c950aebd +data8 0x81d3e85ea5bd8ee2, 0xfe310b6419c9c33a +data8 0x3fbe725cb5b24900, 0x3c01d3fac6029027 +data8 0x81dbc0fd1637b9c1, 0xfe295d6340932d15 +data8 0x3fbeb2d23e937300, 0x3c6304cc44aeedd1 +data8 0x81e3ab082ad5a0a4, 0xfe219f08e03580b3 +data8 0x3fbef349bc2a77e0, 0x3cac1d2d6abe9c72 +data8 0x81eba6861683cb97, 0xfe19d0537a0946e2 +data8 0x3fbf33c332bbe020, 0x3ca0909dba4e96ca +data8 0x81f3b37d1afc9979, 0xfe11f1418c0f94e2 +data8 0x3fbf743ea68d5b60, 0x3c937fc12a2a779a +data8 0x81fbd1f388d4be45, 0xfe0a01d190f09063 +data8 0x3fbfb4bc1be5c340, 0x3cbf51a504b55813 +data8 0x820401efbf87e248, 0xfe020201fff9efea +data8 0x3fbff53b970d1e80, 0x3ca625444b260078 +data8 0x82106ad2ffdca049, 0xfdf5e3940a49135e +data8 0x3fc02aff52065460, 0x3c9125d113e22a57 +data8 0x8221343d6ea1d3e2, 0xfde581a45429b0a0 +data8 0x3fc06b84f8e03220, 0x3caccf362295894b +data8 0x82324434adbf99c2, 0xfdd4de1a001fb775 +data8 0x3fc0ac0ed1fe7240, 0x3cc22f676096b0af +data8 0x82439aee8d0c7747, 0xfdc3f8e8269d1f03 +data8 0x3fc0ec9cee9e4820, 0x3cca147e2886a628 +data8 0x825538a1d0fcb2f0, 0xfdb2d201a9b1ba66 +data8 0x3fc12d2f6006f0a0, 0x3cc72b36633bc2d4 +data8 0x82671d86345c5cee, 0xfda1695934d723e7 +data8 0x3fc16dc63789de60, 0x3cb11f9c47c7b83f +data8 0x827949d46a121770, 0xfd8fbee13cbbb823 +data8 0x3fc1ae618682e620, 0x3cce1b59020cef8e +data8 0x828bbdc61eeab9ba, 0xfd7dd28bff0c9f34 +data8 0x3fc1ef015e586c40, 0x3cafec043e0225ee +data8 0x829e7995fb6de9e1, 0xfd6ba44b823ee1ca +data8 0x3fc22fa5d07b90c0, 0x3cba905409caf8e3 +data8 0x82b17d7fa5bbc982, 0xfd5934119557883a +data8 0x3fc2704eee685da0, 0x3cb5ef21838a823e +data8 0x82c4c9bfc373d276, 0xfd4681cfcfb2c161 +data8 0x3fc2b0fcc9a5f3e0, 0x3ccc7952c5e0e312 +data8 0x82d85e93fba50136, 0xfd338d7790ca0f41 +data8 0x3fc2f1af73c6ba00, 0x3cbecf5f977d1ca9 +data8 0x82ec3c3af8c76b32, 0xfd2056f9fff97727 +data8 0x3fc33266fe6889a0, 0x3c9d329c022ebdb5 +data8 0x830062f46abf6022, 0xfd0cde480c43b327 +data8 0x3fc373237b34de60, 0x3cc95806d4928adb +data8 0x8314d30108ea35f0, 0xfcf923526c1562b2 +data8 0x3fc3b3e4fbe10520, 0x3cbc299fe7223d54 +data8 0x83298ca29434df97, 0xfce526099d0737ed +data8 0x3fc3f4ab922e4a60, 0x3cb59d8bb8fdbccc +data8 0x833e901bd93c7009, 0xfcd0e65de39f1f7c +data8 0x3fc435774fea2a60, 0x3c9ec18b43340914 +data8 0x8353ddb0b278aad8, 0xfcbc643f4b106055 +data8 0x3fc4764846ee80a0, 0x3cb90402efd87ed6 +data8 0x836975a60a70c52e, 0xfca79f9da4fab13a +data8 0x3fc4b71e8921b860, 0xbc58f23449ed6365 +data8 0x837f5841ddfa7a46, 0xfc92986889284148 +data8 0x3fc4f7fa2876fca0, 0xbc6294812bf43acd +data8 0x839585cb3e839773, 0xfc7d4e8f554ab12f +data8 0x3fc538db36ee6960, 0x3cb910b773d4c578 +data8 0x83abfe8a5466246f, 0xfc67c2012cb6fa68 +data8 0x3fc579c1c6953cc0, 0x3cc5ede909fc47fc +data8 0x83c2c2c861474d91, 0xfc51f2acf82041d5 +data8 0x3fc5baade9860880, 0x3cac63cdfc3588e5 +data8 0x83d9d2cfc2813637, 0xfc3be08165519325 +data8 0x3fc5fb9fb1e8e3a0, 0x3cbf7c8466578c29 +data8 0x83f12eebf397daac, 0xfc258b6ce6e6822f +data8 0x3fc63c9731f39d40, 0x3cb6d2a7ffca3e9e +data8 0x8408d76990b9296e, 0xfc0ef35db402af94 +data8 0x3fc67d947be9eec0, 0x3cb1980da09e6566 +data8 0x8420cc9659487cd7, 0xfbf81841c8082dc4 +data8 0x3fc6be97a21daf00, 0x3cc2ac8330e59aa5 +data8 0x84390ec132759ecb, 0xfbe0fa06e24cc390 +data8 0x3fc6ffa0b6ef05e0, 0x3ccc1a030fee56c4 +data8 0x84519e3a29df811a, 0xfbc9989a85ce0954 +data8 0x3fc740afcccca000, 0x3cc19692a5301ca6 +data8 0x846a7b527842d61b, 0xfbb1f3e9f8e45dc4 +data8 0x3fc781c4f633e2c0, 0x3cc0e98f3868a508 +data8 0x8483a65c8434b5f0, 0xfb9a0be244f4af45 +data8 0x3fc7c2e045b12140, 0x3cb2a8d309754420 +data8 0x849d1fabe4e97dd7, 0xfb81e070362116d1 +data8 0x3fc80401cddfd120, 0x3ca7a44544aa4ce6 +data8 0x84b6e795650817ea, 0xfb6971805af8411e +data8 0x3fc84529a16ac020, 0x3c9e3b709c7d6f94 +data8 0x84d0fe6f0589da92, 0xfb50beff0423a2f5 +data8 0x3fc88657d30c49e0, 0x3cc60d65a7f0a278 +data8 0x84eb649000a73014, 0xfb37c8d84414755c +data8 0x3fc8c78c758e8e80, 0x3cc94b2ee984c2b7 +data8 0x85061a50ccd13781, 0xfb1e8ef7eeaf764b +data8 0x3fc908c79bcba900, 0x3cc8540ae794a2fe +data8 0x8521200b1fb8916e, 0xfb05114998f76a83 +data8 0x3fc94a0958ade6c0, 0x3ca127f49839fa9c +data8 0x853c7619f1618bf6, 0xfaeb4fb898b65d19 +data8 0x3fc98b51bf2ffee0, 0x3c8c9ba7a803909a +data8 0x85581cd97f45e274, 0xfad14a3004259931 +data8 0x3fc9cca0e25d4ac0, 0x3cba458e91d3bf54 +data8 0x857414a74f8446b4, 0xfab7009ab1945a54 +data8 0x3fca0df6d551fe80, 0x3cc78ea1d329d2b2 +data8 0x85905de2341dea46, 0xfa9c72e3370d2fbc +data8 0x3fca4f53ab3b6200, 0x3ccf60dca86d57ef +data8 0x85acf8ea4e423ff8, 0xfa81a0f3e9fa0ee9 +data8 0x3fca90b777580aa0, 0x3ca4c4e2ec8a867e +data8 0x85c9e62111a92e7d, 0xfa668ab6dec711b1 +data8 0x3fcad2224cf814e0, 0x3c303de5980d071c +data8 0x85e725e947fbee97, 0xfa4b3015e883dbfe +data8 0x3fcb13943f7d5f80, 0x3cc29d4eefa5cb1e +data8 0x8604b8a7144cd054, 0xfa2f90fa9883a543 +data8 0x3fcb550d625bc6a0, 0x3c9e01a746152daf +data8 0x86229ebff69e2415, 0xfa13ad4e3dfbe1c1 +data8 0x3fcb968dc9195ea0, 0x3ccc091bd73ae518 +data8 0x8640d89acf78858c, 0xf9f784f9e5a1877b +data8 0x3fcbd815874eb160, 0x3cb5f4b89875e187 +data8 0x865f669fe390c7f5, 0xf9db17e65944eacf +data8 0x3fcc19a4b0a6f9c0, 0x3cc5c0bc2b0bbf14 +data8 0x867e4938df7dc45f, 0xf9be65fc1f6c2e6e +data8 0x3fcc5b3b58e061e0, 0x3cc1ca70df8f57e7 +data8 0x869d80d0db7e4c0c, 0xf9a16f237aec427a +data8 0x3fcc9cd993cc4040, 0x3cbae93acc85eccf +data8 0x86bd0dd45f4f8265, 0xf98433446a806e70 +data8 0x3fccde7f754f5660, 0x3cb22f70e64568d0 +data8 0x86dcf0b16613e37a, 0xf966b246a8606170 +data8 0x3fcd202d11620fa0, 0x3c962030e5d4c849 +data8 0x86fd29d7624b3d5d, 0xf948ec11a9d4c45b +data8 0x3fcd61e27c10c0a0, 0x3cc7083c91d59217 +data8 0x871db9b741dbe44a, 0xf92ae08c9eca4941 +data8 0x3fcda39fc97be7c0, 0x3cc9258579e57211 +data8 0x873ea0c3722d6af2, 0xf90c8f9e71633363 +data8 0x3fcde5650dd86d60, 0x3ca4755a9ea582a9 +data8 0x875fdf6fe45529e8, 0xf8edf92dc5875319 +data8 0x3fce27325d6fe520, 0x3cbc1e2b6c1954f9 +data8 0x878176321154e2bc, 0xf8cf1d20f87270b8 +data8 0x3fce6907cca0d060, 0x3cb6ca4804750830 +data8 0x87a36580fe6bccf5, 0xf8affb5e20412199 +data8 0x3fceaae56fdee040, 0x3cad6b310d6fd46c +data8 0x87c5add5417a5cb9, 0xf89093cb0b7c0233 +data8 0x3fceeccb5bb33900, 0x3cc16e99cedadb20 +data8 0x87e84fa9057914ca, 0xf870e64d40a15036 +data8 0x3fcf2eb9a4bcb600, 0x3cc75ee47c8b09e9 +data8 0x880b4b780f02b709, 0xf850f2c9fdacdf78 +data8 0x3fcf70b05fb02e20, 0x3cad6350d379f41a +data8 0x882ea1bfc0f228ac, 0xf830b926379e6465 +data8 0x3fcfb2afa158b8a0, 0x3cce0ccd9f829985 +data8 0x885252ff21146108, 0xf810394699fe0e8e +data8 0x3fcff4b77e97f3e0, 0x3c9b30faa7a4c703 +data8 0x88765fb6dceebbb3, 0xf7ef730f865f6df0 +data8 0x3fd01b6406332540, 0x3cdc5772c9e0b9bd +data8 0x88ad1f69be2cc730, 0xf7bdc59bc9cfbd97 +data8 0x3fd04cf8ad203480, 0x3caeef44fe21a74a +data8 0x88f763f70ae2245e, 0xf77a91c868a9c54e +data8 0x3fd08f23ce0162a0, 0x3cd6290ab3fe5889 +data8 0x89431fc7bc0c2910, 0xf73642973c91298e +data8 0x3fd0d1610f0c1ec0, 0x3cc67401a01f08cf +data8 0x8990573407c7738e, 0xf6f0d71d1d7a2dd6 +data8 0x3fd113b0c65d88c0, 0x3cc7aa4020fe546f +data8 0x89df0eb108594653, 0xf6aa4e6a05cfdef2 +data8 0x3fd156134ada6fe0, 0x3cc87369da09600c +data8 0x8a2f4ad16e0ed78a, 0xf662a78900c35249 +data8 0x3fd19888f43427a0, 0x3cc62b220f38e49c +data8 0x8a811046373e0819, 0xf619e180181d97cc +data8 0x3fd1db121aed7720, 0x3ca3ede7490b52f4 +data8 0x8ad463df6ea0fa2c, 0xf5cffb504190f9a2 +data8 0x3fd21daf185fa360, 0x3caafad98c1d6c1b +data8 0x8b294a8cf0488daf, 0xf584f3f54b8604e6 +data8 0x3fd2606046bf95a0, 0x3cdb2d704eeb08fa +data8 0x8b7fc95f35647757, 0xf538ca65c960b582 +data8 0x3fd2a32601231ec0, 0x3cc661619fa2f126 +data8 0x8bd7e588272276f8, 0xf4eb7d92ff39fccb +data8 0x3fd2e600a3865760, 0x3c8a2a36a99aca4a +data8 0x8c31a45bf8e9255e, 0xf49d0c68cd09b689 +data8 0x3fd328f08ad12000, 0x3cb9efaf1d7ab552 +data8 0x8c8d0b520a35eb18, 0xf44d75cd993cfad2 +data8 0x3fd36bf614dcc040, 0x3ccacbb590bef70d +data8 0x8cea2005d068f23d, 0xf3fcb8a23ab4942b +data8 0x3fd3af11a079a6c0, 0x3cd9775872cf037d +data8 0x8d48e837c8cd5027, 0xf3aad3c1e2273908 +data8 0x3fd3f2438d754b40, 0x3ca03304f667109a +data8 0x8da969ce732f3ac7, 0xf357c60202e2fd7e +data8 0x3fd4358c3ca032e0, 0x3caecf2504ff1a9d +data8 0x8e0baad75555e361, 0xf3038e323ae9463a +data8 0x3fd478ec0fd419c0, 0x3cc64bdc3d703971 +data8 0x8e6fb18807ba877e, 0xf2ae2b1c3a6057f7 +data8 0x3fd4bc6369fa40e0, 0x3cbb7122ec245cf2 +data8 0x8ed5843f4bda74d5, 0xf2579b83aa556f0c +data8 0x3fd4fff2af11e2c0, 0x3c9cfa2dc792d394 +data8 0x8f3d29862c861fef, 0xf1ffde2612ca1909 +data8 0x3fd5439a4436d000, 0x3cc38d46d310526b +data8 0x8fa6a81128940b2d, 0xf1a6f1bac0075669 +data8 0x3fd5875a8fa83520, 0x3cd8bf59b8153f8a +data8 0x901206c1686317a6, 0xf14cd4f2a730d480 +data8 0x3fd5cb33f8cf8ac0, 0x3c9502b5c4d0e431 +data8 0x907f4ca5fe9cf739, 0xf0f186784a125726 +data8 0x3fd60f26e847b120, 0x3cc8a1a5e0acaa33 +data8 0x90ee80fd34aeda5e, 0xf09504ef9a212f18 +data8 0x3fd65333c7e43aa0, 0x3cae5b029cb1f26e +data8 0x915fab35e37421c6, 0xf0374ef5daab5c45 +data8 0x3fd6975b02b8e360, 0x3cd5aa1c280c45e6 +data8 0x91d2d2f0d894d73c, 0xefd86321822dbb51 +data8 0x3fd6db9d05213b20, 0x3cbecf2c093ccd8b +data8 0x9248000249200009, 0xef7840021aca5a72 +data8 0x3fd71ffa3cc87fc0, 0x3cb8d273f08d00d9 +data8 0x92bf3a7351f081d2, 0xef16e42021d7cbd5 +data8 0x3fd7647318b1ad20, 0x3cbce099d79cdc46 +data8 0x93388a8386725713, 0xeeb44dfce6820283 +data8 0x3fd7a908093fc1e0, 0x3ccb033ec17a30d9 +data8 0x93b3f8aa8e653812, 0xee507c126774fa45 +data8 0x3fd7edb9803e3c20, 0x3cc10aedb48671eb +data8 0x94318d99d341ade4, 0xedeb6cd32f891afb +data8 0x3fd83287f0e9cf80, 0x3c994c0c1505cd2a +data8 0x94b1523e3dedc630, 0xed851eaa3168f43c +data8 0x3fd87773cff956e0, 0x3cda3b7bce6a6b16 +data8 0x95334fc20577563f, 0xed1d8ffaa2279669 +data8 0x3fd8bc7d93a70440, 0x3cd4922edc792ce2 +data8 0x95b78f8e8f92f274, 0xecb4bf1fd2be72da +data8 0x3fd901a5b3b9cf40, 0x3cd3fea1b00f9d0d +data8 0x963e1b4e63a87c3f, 0xec4aaa6d08694cc1 +data8 0x3fd946eca98f2700, 0x3cdba4032d968ff1 +data8 0x96c6fcef314074fc, 0xebdf502d53d65fea +data8 0x3fd98c52f024e800, 0x3cbe7be1ab8c95c9 +data8 0x97523ea3eab028b2, 0xeb72aea36720793e +data8 0x3fd9d1d904239860, 0x3cd72d08a6a22b70 +data8 0x97dfeae6f4ee4a9a, 0xeb04c4096a884e94 +data8 0x3fda177f63e8ef00, 0x3cd818c3c1ebfac7 +data8 0x98700c7c6d85d119, 0xea958e90cfe1efd7 +data8 0x3fda5d468f92a540, 0x3cdf45fbfaa080fe +data8 0x9902ae7487a9caa1, 0xea250c6224aab21a +data8 0x3fdaa32f090998e0, 0x3cd715a9353cede4 +data8 0x9997dc2e017a9550, 0xe9b33b9ce2bb7638 +data8 0x3fdae939540d3f00, 0x3cc545c014943439 +data8 0x9a2fa158b29b649b, 0xe9401a573f8aa706 +data8 0x3fdb2f65f63f6c60, 0x3cd4a63c2f2ca8e2 +data8 0x9aca09f835466186, 0xe8cba69df9f0bf35 +data8 0x3fdb75b5773075e0, 0x3cda310ce1b217ec +data8 0x9b672266ab1e0136, 0xe855de74266193d4 +data8 0x3fdbbc28606babc0, 0x3cdc84b75cca6c44 +data8 0x9c06f7579f0b7bd5, 0xe7debfd2f98c060b +data8 0x3fdc02bf3d843420, 0x3cd225d967ffb922 +data8 0x9ca995db058cabdc, 0xe76648a991511c6e +data8 0x3fdc497a9c224780, 0x3cde08101c5b825b +data8 0x9d4f0b605ce71e88, 0xe6ec76dcbc02d9a7 +data8 0x3fdc905b0c10d420, 0x3cb1abbaa3edf120 +data8 0x9df765b9eecad5e6, 0xe6714846bdda7318 +data8 0x3fdcd7611f4b8a00, 0x3cbf6217ae80aadf +data8 0x9ea2b320350540fe, 0xe5f4bab71494cd6b +data8 0x3fdd1e8d6a0d56c0, 0x3cb726e048cc235c +data8 0x9f51023562fc5676, 0xe576cbf239235ecb +data8 0x3fdd65e082df5260, 0x3cd9e66872bd5250 +data8 0xa002620915c2a2f6, 0xe4f779b15f5ec5a7 +data8 0x3fddad5b02a82420, 0x3c89743b0b57534b +data8 0xa0b6e21c2caf9992, 0xe476c1a233a7873e +data8 0x3fddf4fd84bbe160, 0x3cbf7adea9ee3338 +data8 0xa16e9264cc83a6b2, 0xe3f4a16696608191 +data8 0x3fde3cc8a6ec6ee0, 0x3cce46f5a51f49c6 +data8 0xa22983528f3d8d49, 0xe3711694552da8a8 +data8 0x3fde84bd099a6600, 0x3cdc78f6490a2d31 +data8 0xa2e7c5d2e2e69460, 0xe2ec1eb4e1e0a5fb +data8 0x3fdeccdb4fc685c0, 0x3cdd3aedb56a4825 +data8 0xa3a96b5599bd2532, 0xe265b74506fbe1c9 +data8 0x3fdf15241f23b3e0, 0x3cd440f3c6d65f65 +data8 0xa46e85d1ae49d7de, 0xe1ddddb499b3606f +data8 0x3fdf5d98202994a0, 0x3cd6c44bd3fb745a +data8 0xa53727ca3e11b99e, 0xe1548f662951b00d +data8 0x3fdfa637fe27bf60, 0x3ca8ad1cd33054dd +data8 0xa6036453bdc20186, 0xe0c9c9aeabe5e481 +data8 0x3fdfef0467599580, 0x3cc0f1ac0685d78a +data8 0xa6d34f1969dda338, 0xe03d89d5281e4f81 +data8 0x3fe01bff067d6220, 0x3cc0731e8a9ef057 +data8 0xa7a6fc62f7246ff3, 0xdfafcd125c323f54 +data8 0x3fe04092d1ae3b40, 0x3ccabda24b59906d +data8 0xa87e811a861df9b9, 0xdf20909061bb9760 +data8 0x3fe0653df0fd9fc0, 0x3ce94c8dcc722278 +data8 0xa959f2d2dd687200, 0xde8fd16a4e5f88bd +data8 0x3fe08a00c1cae320, 0x3ce6b888bb60a274 +data8 0xaa3967cdeea58bda, 0xddfd8cabd1240d22 +data8 0x3fe0aedba3221c00, 0x3ced5941cd486e46 +data8 0xab904fd587263c84, 0xdd1f4472e1cf64ed +data8 0x3fe0e651e85229c0, 0x3cdb6701042299b1 +data8 0xad686d44dd5a74bb, 0xdbf173e1f6b46e92 +data8 0x3fe1309cbf4cdb20, 0x3cbf1be7bb3f0ec5 +data8 0xaf524e15640ebee4, 0xdabd54896f1029f6 +data8 0x3fe17b4ee1641300, 0x3ce81dd055b792f1 +data8 0xb14eca24ef7db3fa, 0xd982cb9ae2f47e41 +data8 0x3fe1c66b9ffd6660, 0x3cd98ea31eb5ddc7 +data8 0xb35ec807669920ce, 0xd841bd1b8291d0b6 +data8 0x3fe211f66db3a5a0, 0x3ca480c35a27b4a2 +data8 0xb5833e4755e04dd1, 0xd6fa0bd3150b6930 +data8 0x3fe25df2e05b6c40, 0x3ca4bc324287a351 +data8 0xb7bd34c8000b7bd3, 0xd5ab9939a7d23aa1 +data8 0x3fe2aa64b32f7780, 0x3cba67314933077c +data8 0xba0dc64d126cc135, 0xd4564563ce924481 +data8 0x3fe2f74fc9289ac0, 0x3cec1a1dc0efc5ec +data8 0xbc76222cbbfa74a6, 0xd2f9eeed501125a8 +data8 0x3fe344b82f859ac0, 0x3ceeef218de413ac +data8 0xbef78e31985291a9, 0xd19672e2182f78be +data8 0x3fe392a22087b7e0, 0x3cd2619ba201204c +data8 0xc19368b2b0629572, 0xd02baca5427e436a +data8 0x3fe3e11206694520, 0x3cb5d0b3143fe689 +data8 0xc44b2ae8c6733e51, 0xceb975d60b6eae5d +data8 0x3fe4300c7e945020, 0x3cbd367143da6582 +data8 0xc7206b894212dfef, 0xcd3fa6326ff0ac9a +data8 0x3fe47f965d201d60, 0x3ce797c7a4ec1d63 +data8 0xca14e1b0622de526, 0xcbbe13773c3c5338 +data8 0x3fe4cfb4b09d1a20, 0x3cedfadb5347143c +data8 0xcd2a6825eae65f82, 0xca34913d425a5ae9 +data8 0x3fe5206cc637e000, 0x3ce2798b38e54193 +data8 0xd06301095e1351ee, 0xc8a2f0d3679c08c0 +data8 0x3fe571c42e3d0be0, 0x3ccd7cb9c6c2ca68 +data8 0xd3c0d9f50057adda, 0xc70901152d59d16b +data8 0x3fe5c3c0c108f940, 0x3ceb6c13563180ab +data8 0xd74650a98cc14789, 0xc5668e3d4cbf8828 +data8 0x3fe61668a46ffa80, 0x3caa9092e9e3c0e5 +data8 0xdaf5f8579dcc8f8f, 0xc3bb61b3eed42d02 +data8 0x3fe669c251ad69e0, 0x3cccf896ef3b4fee +data8 0xded29f9f9a6171b4, 0xc20741d7f8e8e8af +data8 0x3fe6bdd49bea05c0, 0x3cdc6b29937c575d +data8 0xe2df5765854ccdb0, 0xc049f1c2d1b8014b +data8 0x3fe712a6b76c6e80, 0x3ce1ddc6f2922321 +data8 0xe71f7a9b94fcb4c3, 0xbe833105ec291e91 +data8 0x3fe76840418978a0, 0x3ccda46e85432c3d +data8 0xeb96b72d3374b91e, 0xbcb2bb61493b28b3 +data8 0x3fe7bea9496d5a40, 0x3ce37b42ec6e17d3 +data8 0xf049183c3f53c39b, 0xbad848720223d3a8 +data8 0x3fe815ea59dab0a0, 0x3cb03ad41bfc415b +data8 0xf53b11ec7f415f15, 0xb8f38b57c53c9c48 +data8 0x3fe86e0c84010760, 0x3cc03bfcfb17fe1f +data8 0xfa718f05adbf2c33, 0xb70432500286b185 +data8 0x3fe8c7196b9225c0, 0x3ced99fcc6866ba9 +data8 0xfff200c3f5489608, 0xb509e6454dca33cc +data8 0x3fe9211b54441080, 0x3cb789cb53515688 +// The following table entries are not used +//data8 0x82e138a0fac48700, 0xb3044a513a8e6132 +//data8 0x3fe97c1d30f5b7c0, 0x3ce1eb765612d1d0 +//data8 0x85f4cc7fc670d021, 0xb0f2fb2ea6cbbc88 +//data8 0x3fe9d82ab4b5fde0, 0x3ced3fe6f27e8039 +//data8 0x89377c1387d5b908, 0xaed58e9a09014d5c +//data8 0x3fea355065f87fa0, 0x3cbef481d25f5b58 +//data8 0x8cad7a2c98dec333, 0xacab929ce114d451 +//data8 0x3fea939bb451e2a0, 0x3c8e92b4fbf4560f +//data8 0x905b7dfc99583025, 0xaa748cc0dbbbc0ec +//data8 0x3feaf31b11270220, 0x3cdced8c61bd7bd5 +//data8 0x9446d8191f80dd42, 0xa82ff92687235baf +//data8 0x3feb53de0bcffc20, 0x3cbe1722fb47509e +//data8 0x98758ba086e4000a, 0xa5dd497a9c184f58 +//data8 0x3febb5f571cb0560, 0x3ce0c7774329a613 +//data8 0x9cee6c7bf18e4e24, 0xa37be3c3cd1de51b +//data8 0x3fec197373bc7be0, 0x3ce08ebdb55c3177 +//data8 0xa1b944000a1b9440, 0xa10b2101b4f27e03 +//data8 0x3fec7e6bd023da60, 0x3ce5fc5fd4995959 +//data8 0xa6defd8ba04d3e38, 0x9e8a4b93cad088ec +//data8 0x3fece4f404e29b20, 0x3cea3413401132b5 +//data8 0xac69dd408a10c62d, 0x9bf89d5d17ddae8c +//data8 0x3fed4d2388f63600, 0x3cd5a7fb0d1d4276 +//data8 0xb265c39cbd80f97a, 0x99553d969fec7beb +//data8 0x3fedb714101e0a00, 0x3cdbda21f01193f2 +//data8 0xb8e081a16ae4ae73, 0x969f3e3ed2a0516c +//data8 0x3fee22e1da97bb00, 0x3ce7231177f85f71 +//data8 0xbfea427678945732, 0x93d5990f9ee787af +//data8 0x3fee90ac13b18220, 0x3ce3c8a5453363a5 +//data8 0xc79611399b8c90c5, 0x90f72bde80febc31 +//data8 0x3fef009542b712e0, 0x3ce218fd79e8cb56 +//data8 0xcffa8425040624d7, 0x8e02b4418574ebed +//data8 0x3fef72c3d2c57520, 0x3cd32a717f82203f +//data8 0xd93299cddcf9cf23, 0x8af6ca48e9c44024 +//data8 0x3fefe762b77744c0, 0x3ce53478a6bbcf94 +//data8 0xe35eda760af69ad9, 0x87d1da0d7f45678b +//data8 0x3ff02f511b223c00, 0x3ced6e11782c28fc +//data8 0xeea6d733421da0a6, 0x84921bbe64ae029a +//data8 0x3ff06c5c6f8ce9c0, 0x3ce71fc71c1ffc02 +//data8 0xfb3b2c73fc6195cc, 0x813589ba3a5651b6 +//data8 0x3ff0aaf2613700a0, 0x3cf2a72d2fd94ef3 +//data8 0x84ac1fcec4203245, 0xfb73a828893df19e +//data8 0x3ff0eb367c3fd600, 0x3cf8054c158610de +//data8 0x8ca50621110c60e6, 0xf438a14c158d867c +//data8 0x3ff12d51caa6b580, 0x3ce6bce9748739b6 +//data8 0x95b8c2062d6f8161, 0xecb3ccdd37b369da +//data8 0x3ff1717418520340, 0x3ca5c2732533177c +//data8 0xa0262917caab4ad1, 0xe4dde4ddc81fd119 +//data8 0x3ff1b7d59dd40ba0, 0x3cc4c7c98e870ff5 +//data8 0xac402c688b72f3f4, 0xdcae469be46d4c8d +//data8 0x3ff200b93cc5a540, 0x3c8dd6dc1bfe865a +//data8 0xba76968b9eabd9ab, 0xd41a8f3df1115f7f +//data8 0x3ff24c6f8f6affa0, 0x3cf1acb6d2a7eff7 +//data8 0xcb63c87c23a71dc5, 0xcb161074c17f54ec +//data8 0x3ff29b5b338b7c80, 0x3ce9b5845f6ec746 +//data8 0xdfe323b8653af367, 0xc19107d99ab27e42 +//data8 0x3ff2edf6fac7f5a0, 0x3cf77f961925fa02 +//data8 0xf93746caaba3e1f1, 0xb777744a9df03bff +//data8 0x3ff344df237486c0, 0x3cf6ddf5f6ddda43 +//data8 0x8ca77052f6c340f0, 0xacaf476f13806648 +//data8 0x3ff3a0dfa4bb4ae0, 0x3cfee01bbd761bff +//data8 0xa1a48604a81d5c62, 0xa11575d30c0aae50 +//data8 0x3ff4030b73c55360, 0x3cf1cf0e0324d37c +//data8 0xbe45074b05579024, 0x9478e362a07dd287 +//data8 0x3ff46ce4c738c4e0, 0x3ce3179555367d12 +//data8 0xe7a08b5693d214ec, 0x8690e3575b8a7c3b +//data8 0x3ff4e0a887c40a80, 0x3cfbd5d46bfefe69 +//data8 0x94503d69396d91c7, 0xedd2ce885ff04028 +//data8 0x3ff561ebd9c18cc0, 0x3cf331bd176b233b +//data8 0xced1d96c5bb209e6, 0xc965278083808702 +//data8 0x3ff5f71d7ff42c80, 0x3ce3301cc0b5a48c +//data8 0xabac2cee0fc24e20, 0x9c4eb1136094cbbd +//data8 0x3ff6ae4c63222720, 0x3cf5ff46874ee51e +//data8 0x8040201008040201, 0xb4d7ac4d9acb1bf4 +//data8 0x3ff7b7d33b928c40, 0x3cfacdee584023bb +LOCAL_OBJECT_END(T_table) + + + +.align 16 + +LOCAL_OBJECT_START(poly_coeffs) + // C_3 +data8 0xaaaaaaaaaaaaaaab, 0x0000000000003ffc + // C_5 +data8 0x999999999999999a, 0x0000000000003ffb + // C_7, C_9 +data8 0x3fa6db6db6db6db7, 0x3f9f1c71c71c71c8 + // pi/2 (low, high) +data8 0x3C91A62633145C07, 0x3FF921FB54442D18 + // C_11, C_13 +data8 0x3f96e8ba2e8ba2e9, 0x3f91c4ec4ec4ec4e + // C_15, C_17 +data8 0x3f8c99999999999a, 0x3f87a87878787223 +LOCAL_OBJECT_END(poly_coeffs) + + +R_DBL_S = r21 +R_EXP0 = r22 +R_EXP = r15 +R_SGNMASK = r23 +R_TMP = r24 +R_TMP2 = r25 +R_INDEX = r26 +R_TMP3 = r27 +R_TMP03 = r27 +R_TMP4 = r28 +R_TMP5 = r23 +R_TMP6 = r22 +R_TMP7 = r21 +R_T = r29 +R_BIAS = r20 + +F_T = f6 +F_1S2 = f7 +F_1S2_S = f9 +F_INV_1T2 = f10 +F_SQRT_1T2 = f11 +F_S2T2 = f12 +F_X = f13 +F_D = f14 +F_2M64 = f15 + +F_CS2 = f32 +F_CS3 = f33 +F_CS4 = f34 +F_CS5 = f35 +F_CS6 = f36 +F_CS7 = f37 +F_CS8 = f38 +F_CS9 = f39 +F_S23 = f40 +F_S45 = f41 +F_S67 = f42 +F_S89 = f43 +F_S25 = f44 +F_S69 = f45 +F_S29 = f46 +F_X2 = f47 +F_X4 = f48 +F_TSQRT = f49 +F_DTX = f50 +F_R = f51 +F_R2 = f52 +F_R3 = f53 +F_R4 = f54 + +F_C3 = f55 +F_C5 = f56 +F_C7 = f57 +F_C9 = f58 +F_P79 = f59 +F_P35 = f60 +F_P39 = f61 + +F_ATHI = f62 +F_ATLO = f63 + +F_T1 = f64 +F_Y = f65 +F_Y2 = f66 +F_ANDMASK = f67 +F_ORMASK = f68 +F_S = f69 +F_05 = f70 +F_SQRT_1S2 = f71 +F_DS = f72 +F_Z = f73 +F_1T2 = f74 +F_DZ = f75 +F_ZE = f76 +F_YZ = f77 +F_Y1S2 = f78 +F_Y1S2X = f79 +F_1X = f80 +F_ST = f81 +F_1T2_ST = f82 +F_TSS = f83 +F_Y1S2X2 = f84 +F_DZ_TERM = f85 +F_DTS = f86 +F_DS2X = f87 +F_T2 = f88 +F_ZY1S2S = f89 +F_Y1S2_1X = f90 +F_TS = f91 +F_PI2_LO = f92 +F_PI2_HI = f93 +F_S19 = f94 +F_INV1T2_2 = f95 +F_CORR = f96 +F_DZ0 = f97 + +F_C11 = f98 +F_C13 = f99 +F_C15 = f100 +F_C17 = f101 +F_P1113 = f102 +F_P1517 = f103 +F_P1117 = f104 +F_P317 = f105 +F_R8 = f106 +F_HI = f107 +F_1S2_HI = f108 +F_DS2 = f109 +F_Y2_2 = f110 +F_S2 = f111 +F_S_DS2 = f112 +F_S_1S2S = f113 +F_XL = f114 +F_2M128 = f115 + + +.section .text +GLOBAL_LIBM_ENTRY(asinl) + +{.mfi + // get exponent, mantissa (rounded to double precision) of s + getf.d R_DBL_S = f8 + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // r2 = pointer to T_table + addl r2 = @ltoff(T_table), gp +} + +{.mfi + // sign mask + mov R_SGNMASK = 0x20000 + nop.f 0 + // bias-63-1 + mov R_TMP03 = 0xffff-64;; +} + + +{.mfi + // get exponent of s + getf.exp R_EXP = f8 + nop.f 0 + // R_TMP4 = 2^45 + shl R_TMP4 = R_SGNMASK, 45-17 +} + +{.mlx + // load bias-4 + mov R_TMP = 0xffff-4 + // load RU(sqrt(2)/2) to integer register (in double format, shifted left by 1) + movl R_TMP2 = 0x7fcd413cccfe779a;; +} + + +{.mfi + // load 2^{-64} in FP register + setf.exp F_2M64 = R_TMP03 + nop.f 0 + // index = (0x7-exponent)|b1 b2.. b6 + extr.u R_INDEX = R_DBL_S, 46, 9 +} + +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 x.. x + or R_T = R_DBL_S, R_TMP4 + nop.f 0 + // R_TMP4 = 2^45-1 + sub R_TMP4 = R_TMP4, r0, 1;; +} + + +{.mfi + // get t = sign|exponent|b1 b2.. b6 1 0.. 0 + andcm R_T = R_T, R_TMP4 + nop.f 0 + // eliminate sign from R_DBL_S (shift left by 1) + shl R_TMP3 = R_DBL_S, 1 +} + +{.mfi + // R_BIAS = 3*2^6 + mov R_BIAS = 0xc0 + nop.f 0 + // eliminate sign from R_EXP + andcm R_EXP0 = R_EXP, R_SGNMASK;; +} + + + +{.mfi + // load start address for T_table + ld8 r2 = [r2] + nop.f 0 + // p8 = 1 if |s|> = sqrt(2)/2 + cmp.geu p8, p0 = R_TMP3, R_TMP2 +} + +{.mlx + // p7 = 1 if |s|<2^{-4} (exponent of s = sqrt(2)/2, take alternate path + (p8) br.cond.sptk LARGE_S +} + +{.mlx + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + // sqrt coefficient cs9 = 55*13/128 + movl R_TMP = 0x40b2c000;; +} + + +{.mfi + // sqrt coefficient cs8 = -33*13/128 + setf.s F_CS8 = R_TMP2 + nop.f 0 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5 +} + +{.mfi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + mov R_TMP4 = 0xffff - 1 + nop.f 0 + // sqrt coefficient cs6 = -21/16 + mov R_TMP6 = 0xbfa8;; +} + + +{.mlx + // table index + add r2 = r2, R_INDEX + // sqrt coefficient cs7 = 33/16 + movl R_TMP2 = 0x40040000;; +} + + +{.mmi + // load cs9 = 55*13/128 + setf.s F_CS9 = R_TMP + // sqrt coefficient cs5 = 7/8 + mov R_TMP3 = 0x3f60 + // sqrt coefficient cs6 = 21/16 + shl R_TMP6 = R_TMP6, 16;; +} + + +{.mmi + // load significand of 1/(1-t^2) + ldf8 F_INV_1T2 = [r2], 8 + // sqrt coefficient cs7 = 33/16 + setf.s F_CS7 = R_TMP2 + // sqrt coefficient cs4 = -5/8 + mov R_TMP5 = 0xbf20;; +} + + +{.mmi + // load significand of sqrt(1-t^2) + ldf8 F_SQRT_1T2 = [r2], 8 + // sqrt coefficient cs6 = 21/16 + setf.s F_CS6 = R_TMP6 + // sqrt coefficient cs5 = 7/8 + shl R_TMP3 = R_TMP3, 16;; +} + + +{.mmi + // sqrt coefficient cs3 = 0.5 (set exponent = bias-1) + setf.exp F_CS3 = R_TMP4 + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // sqrt coefficient cs4 = -5/8 + shl R_TMP5 = R_TMP5, 16;; +} + + +{.mfi + // sqrt coefficient cs5 = 7/8 + setf.s F_CS5 = R_TMP3 + // d = s-t + fms.s1 F_D = f8, f1, F_T + // set p6 = 1 if s<0, p11 = 1 if s> = 0 + cmp.ge p6, p11 = R_EXP, R_DBL_S +} + +{.mfi + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // s+t + fma.s1 F_S2T2 = f8, f1, F_T + nop.i 0;; +} + + +{.mfi + // sqrt coefficient cs4 = -5/8 + setf.s F_CS4 = R_TMP5 + // s^2-t^2 + fma.s1 F_S2T2 = F_S2T2, F_D, f0 + nop.i 0;; +} + + +{.mfi + // load C3 + ldfe F_C3 = [r3], 16 + // 0.5/(1-t^2) = 2^{-64}*(2^63/(1-t^2)) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; +} + +{.mfi + // load C_5 + ldfe F_C5 = [r3], 16 + // set correct exponent for sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; +} + + +{.mfi + // load C_7, C_9 + ldfpd F_C7, F_C9 = [r3] + // x = -(s^2-t^2)/(1-t^2)/2 + fnma.s1 F_X = F_INV_1T2, F_S2T2, f0 + nop.i 0;; +} + + +{.mfi + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // t*sqrt(1-t^2) + fma.s1 F_TSQRT = F_T, F_SQRT_1T2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // cs9*x+cs8 + fma.s1 F_S89 = F_CS9, F_X, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // cs7*x+cs6 + fma.s1 F_S67 = F_CS7, F_X, F_CS6 + nop.i 0;; +} + +{.mfi + nop.m 0 + // cs5*x+cs4 + fma.s1 F_S45 = F_CS5, F_X, F_CS4 + nop.i 0 +} + +{.mfi + nop.m 0 + // x*x + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // (s-t)-t*x + fnma.s1 F_DTX = F_T, F_X, F_D + nop.i 0 +} + +{.mfi + nop.m 0 + // cs3*x+cs2 (cs2 = -0.5 = -cs3) + fms.s1 F_S23 = F_CS3, F_X, F_CS3 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // cs9*x^3+cs8*x^2+cs7*x+cs6 + fma.s1 F_S69 = F_S89, F_X2, F_S67 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // t*sqrt(1-t^2)*x^2 + fma.s1 F_TSQRT = F_TSQRT, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S25 = F_S45, F_X2, F_S23 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // ((s-t)-t*x)*sqrt(1-t^2) + fma.s1 F_DTX = F_DTX, F_SQRT_1T2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_low + (p6) fnma.s1 F_ATLO = F_ATLO, f1, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // PS29 = cs9*x^7+..+cs5*x^3+cs4*x^2+cs3*x+cs2 + fma.s1 F_S29 = F_S69, F_X4, F_S25 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if sign is negative, negate table values: asin(t)_high + (p6) fnma.s1 F_ATHI = F_ATHI, f1, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // R = ((s-t)-t*x)*sqrt(1-t^2)-t*sqrt(1-t^2)*x^2*PS29 + fnma.s1 F_R = F_S29, F_TSQRT, F_DTX + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; +} + + +{.mfi + nop.m 0 + // R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_P39 = F_P39, f1, F_R + nop.i 0;; +} + + +{.mfb + nop.m 0 + // result = asin(t)_high+R+asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s0 f8 = F_ATHI, f1, F_P39 + // return + br.ret.sptk b0;; +} + + + + +LARGE_S: + +{.mfi + // bias-1 + mov R_TMP3 = 0xffff - 1 + // y ~ 1/sqrt(1-s^2) + frsqrta.s1 F_Y, p7 = F_1S2 + // c9 = 55*13*17/128 + mov R_TMP4 = 0x10af7b +} + +{.mlx + // c8 = -33*13*15/128 + mov R_TMP5 = 0x184923 + movl R_TMP2 = 0xff00000000000000;; +} + +{.mfi + // set p6 = 1 if s<0, p11 = 1 if s>0 + cmp.ge p6, p11 = R_EXP, R_DBL_S + // 1-s^2 + fnma.s1 F_1S2 = f8, f8, f1 + // set p9 = 1 + cmp.eq p9, p0 = r0, r0;; +} + + +{.mfi + // load 0.5 + setf.exp F_05 = R_TMP3 + // (1-s^2) rounded to single precision + fnma.s.s1 F_1S2_S = f8, f8, f1 + // c9 = 55*13*17/128 + shl R_TMP4 = R_TMP4, 10 +} + +{.mlx + // AND mask for getting t ~ sqrt(1-s^2) + setf.sig F_ANDMASK = R_TMP2 + // OR mask + movl R_TMP2 = 0x0100000000000000;; +} + + +{.mfi + nop.m 0 + // (s^2)_s + fma.s.s1 F_S2 = f8, f8, f0 + nop.i 0;; +} + + +{.mmi + // c9 = 55*13*17/128 + setf.s F_CS9 = R_TMP4 + // c7 = 33*13/16 + mov R_TMP4 = 0x41d68 + // c8 = -33*13*15/128 + shl R_TMP5 = R_TMP5, 11;; +} + + +{.mfi + setf.sig F_ORMASK = R_TMP2 + // y^2 + fma.s1 F_Y2 = F_Y, F_Y, f0 + // c7 = 33*13/16 + shl R_TMP4 = R_TMP4, 12 +} + +{.mfi + // c6 = -33*7/16 + mov R_TMP6 = 0xc1670 + // y' ~ sqrt(1-s^2) + fma.s1 F_T1 = F_Y, F_1S2, f0 + // c5 = 63/8 + mov R_TMP7 = 0x40fc;; +} + + +{.mlx + // load c8 = -33*13*15/128 + setf.s F_CS8 = R_TMP5 + // c4 = -35/8 + movl R_TMP5 = 0xc08c0000;; +} + +{.mfi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp + // 1-(1-s^2)_s + fnma.s1 F_DS = F_1S2_S, f1, f1 + // p9 = 0 if p7 = 1 (p9 = 1 for special cases only) + (p7) cmp.ne p9, p0 = r0, r0 +} + +{.mlx + // load c7 = 33*13/16 + setf.s F_CS7 = R_TMP4 + // c3 = 5/2 + movl R_TMP4 = 0x40200000;; +} + + +{.mfi + nop.m 0 + // 1-(s^2)_s + fnma.s1 F_S_1S2S = F_S2, f1, f1 + nop.i 0 +} + +{.mlx + // load c4 = -35/8 + setf.s F_CS4 = R_TMP5 + // c2 = -3/2 + movl R_TMP5 = 0xbfc00000;; +} + + +{.mfi + // load c3 = 5/2 + setf.s F_CS3 = R_TMP4 + // x = (1-s^2)_s*y^2-1 + fms.s1 F_X = F_1S2_S, F_Y2, f1 + // c6 = -33*7/16 + shl R_TMP6 = R_TMP6, 12 +} + +{.mfi + nop.m 0 + // y^2/2 + fma.s1 F_Y2_2 = F_Y2, F_05, f0 + nop.i 0;; +} + + +{.mfi + // load c6 = -33*7/16 + setf.s F_CS6 = R_TMP6 + // eliminate lower bits from y' + fand F_T = F_T1, F_ANDMASK + // c5 = 63/8 + shl R_TMP7 = R_TMP7, 16 +} + +{.mfb + // r3 = load start address to polynomial coefficients + ld8 r3 = [r3] + // 1-(1-s^2)_s-s^2 + fnma.s1 F_DS = f8, f8, F_DS + // p9 = 1 if s is a special input (NaN, or |s|> = 1) + (p9) br.cond.spnt ASINL_SPECIAL_CASES;; +} + +{.mmf + // get exponent, significand of y' (in single prec.) + getf.s R_TMP = F_T1 + // load c3 = -3/2 + setf.s F_CS2 = R_TMP5 + // y*(1-s^2) + fma.s1 F_Y1S2 = F_Y, F_1S2, f0;; +} + + +{.mfi + nop.m 0 + // x' = (y^2/2)*(1-(s^2)_s)-0.5 + fms.s1 F_XL = F_Y2_2, F_S_1S2S, F_05 + nop.i 0 +} + +{.mfi + nop.m 0 + // s^2-(s^2)_s + fms.s1 F_S_DS2 = f8, f8, F_S2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // if s<0, set s = -s + (p6) fnma.s1 f8 = f8, f1, f0 + nop.i 0;; +} + +{.mfi + // load c5 = 63/8 + setf.s F_CS5 = R_TMP7 + // x = (1-s^2)_s*y^2-1+(1-(1-s^2)_s-s^2)*y^2 + fma.s1 F_X = F_DS, F_Y2, F_X + // for t = 2^k*1.b1 b2.., get 7-k|b1.. b6 + extr.u R_INDEX = R_TMP, 17, 9;; +} + + +{.mmi + // index = (4-exponent)|b1 b2.. b6 + sub R_INDEX = R_INDEX, R_BIAS + nop.m 0 + // get exponent of y + shr.u R_TMP2 = R_TMP, 23;; +} + +{.mmi + // load C3 + ldfe F_C3 = [r3], 16 + // set p8 = 1 if y'<2^{-4} + cmp.gt p8, p0 = 0x7b, R_TMP2 + // shift R_INDEX by 5 + shl R_INDEX = R_INDEX, 5;; +} + + +{.mfb + // get table index for sqrt(1-t^2) + add r2 = r2, R_INDEX + // get t = 2^k*1.b1 b2.. b7 1 + for F_T = F_T, F_ORMASK + (p8) br.cond.spnt VERY_LARGE_INPUT;; +} + + + +{.mmf + // load C5 + ldfe F_C5 = [r3], 16 + // load 1/(1-t^2) + ldfp8 F_INV_1T2, F_SQRT_1T2 = [r2], 16 + // x = ((1-s^2)*y^2-1)/2 + fma.s1 F_X = F_X, F_05, f0;; +} + + + +{.mmf + nop.m 0 + // C7, C9 + ldfpd F_C7, F_C9 = [r3], 16 + // set correct exponent for t + fmerge.se F_T = F_T1, F_T;; +} + + + +{.mfi + // pi/2 (low, high) + ldfpd F_PI2_LO, F_PI2_HI = [r3] + // c9*x+c8 + fma.s1 F_S89 = F_X, F_CS9, F_CS8 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^2 + fma.s1 F_X2 = F_X, F_X, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)*x + fma.s1 F_Y1S2X = F_Y1S2, F_X, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // c7*x+c6 + fma.s1 F_S67 = F_X, F_CS7, F_CS6 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-x + fnma.s1 F_1X = F_X, f1, f1 + nop.i 0 +} + +{.mfi + nop.m 0 + // c3*x+c2 + fma.s1 F_S23 = F_X, F_CS3, F_CS2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 1-t^2 + fnma.s1 F_1T2 = F_T, F_T, f1 + nop.i 0 +} + +{.mfi + // load asin(t)_high, asin(t)_low + ldfpd F_ATHI, F_ATLO = [r2] + // c5*x+c4 + fma.s1 F_S45 = F_X, F_CS5, F_CS4 + nop.i 0;; +} + + + +{.mfi + nop.m 0 + // t*s + fma.s1 F_TS = F_T, f8, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // 0.5/(1-t^2) + fma.s1 F_INV_1T2 = F_INV_1T2, F_2M64, f0 + nop.i 0;; +} + +{.mfi + nop.m 0 + // z~sqrt(1-t^2), rounded to 24 significant bits + fma.s.s1 F_Z = F_SQRT_1T2, F_2M64, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // sqrt(1-t^2) + fma.s1 F_SQRT_1T2 = F_SQRT_1T2, F_2M64, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)*x^2 + fma.s1 F_Y1S2X2 = F_Y1S2, F_X2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // x^4 + fma.s1 F_X4 = F_X2, F_X2, f0 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // s*t rounded to 24 significant bits + fma.s.s1 F_TSS = F_T, f8, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // c9*x^3+..+c6 + fma.s1 F_S69 = F_X2, F_S89, F_S67 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // ST = (t^2-1+s^2) rounded to 24 significant bits + fms.s.s1 F_ST = f8, f8, F_1T2 + nop.i 0 +} + +{.mfi + nop.m 0 + // c5*x^3+..+c2 + fma.s1 F_S25 = F_X2, F_S45, F_S23 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // 0.25/(1-t^2) + fma.s1 F_INV1T2_2 = F_05, F_INV_1T2, f0 + nop.i 0 +} + +{.mfi + nop.m 0 + // t*s-sqrt(1-t^2)*(1-s^2)*y + fnma.s1 F_TS = F_Y1S2, F_SQRT_1T2, F_TS + nop.i 0;; +} + + +{.mfi + nop.m 0 + // z*0.5/(1-t^2) + fma.s1 F_ZE = F_INV_1T2, F_SQRT_1T2, f0 + nop.i 0 +} -#include "libm_support.h" +{.mfi + nop.m 0 + // z^2+t^2-1 + fms.s1 F_DZ0 = F_Z, F_Z, F_1T2 + nop.i 0;; +} -// Assembly macros -//============================================================== -FR_RESULT = f10 -FR_X = f8 -FR_Y = f1 -asin_P79 = f32 -asin_P59 = f33 -asin_P39 = f34 -asin_P19 = f35 - -asin_P810 = f36 -asin_P610 = f37 -asin_P410 = f38 -asin_P210 = f39 - -asin_A1 = f41 -asin_A2 = f42 -asin_A3 = f43 -asin_A4 = f44 -asin_A5 = f45 -asin_A6 = f46 -asin_A7 = f47 -asin_A8 = f48 -asin_A9 = f49 -asin_A10 = f50 - -asin_X2 = f51 -asin_X4 = f52 - -asin_B = f53 -asin_Bb = f54 -asin_C = f55 -asin_Cc = f56 -asin_D = f57 - -asin_W = f58 -asin_Ww = f59 - -asin_y0 = f60 -asin_y1 = f61 -asin_y2 = f62 - -asin_H = f63 -asin_Hh = f64 - -asin_t1 = f65 -asin_t2 = f66 -asin_t3 = f67 -asin_t4 = f68 -asin_t5 = f69 - -asin_Pseries = f70 -asin_NORM_f8 = f71 -asin_ABS_NORM_f8 = f72 - -asin_2m100 = f73 -asin_P1P2 = f74 -asin_HALF = f75 -asin_1mD = f76 - -asin_1mB = f77 -asin_1mBmC = f78 -asin_S = f79 - -asin_BmWW = f80 -asin_BmWWpb = f81 -asin_2W = f82 -asin_1d2W = f83 -asin_Dd = f84 - -asin_XWw = f85 -asin_low = f86 - -asin_pi_by_2 = f87 -asin_pi_by_2_lo = f88 - -asin_GR_17_ones = r33 -asin_GR_16_ones = r34 -asin_GR_signexp_f8 = r35 -asin_GR_exp = r36 -asin_GR_true_exp = r37 -asin_GR_ff9b = r38 - -GR_SAVE_B0 = r39 -GR_SAVE_SP = r40 -GR_SAVE_PFS = r33 -// r33 can be used safely. -// r40 is address of table of coefficients -// Later it is used to save sp across calls -GR_SAVE_GP = r41 -asin_GR_fffe = r42 -asin_GR_retval = r43 - -GR_Parameter_X = r44 -GR_Parameter_Y = r45 -GR_Parameter_RESULT = r46 -GR_Parameter_TAG = r47 - - -// 2^-40: -// A true exponent of -40 is -// : -40 + register_bias -// : -28 + ffff = ffd7 - -// A true exponent of -100 is -// : -100 + register_bias -// : -64 + ffff = ff9b -// Data tables -//============================================================== +{.mfi + nop.m 0 + // (1-s^2-(1-s^2)_s)*x + fma.s1 F_DS2X = F_X, F_DS, f0 + nop.i 0;; +} -#ifdef _LIBC -.rodata -#else -.data -#endif -.align 16 +{.mfi + nop.m 0 + // t*s-(t*s)_s + fms.s1 F_DTS = F_T, f8, F_TSS + nop.i 0 +} -asin_coefficients: -ASM_TYPE_DIRECTIVE(asin_coefficients,@object) -data8 0xBB08911F2013961E, 0x00003FF8 // A10 -data8 0x981F1095A23A87D3, 0x00003FF8 // A9 -data8 0xBDF09C6C4177BCC6, 0x00003FF8 // A8 -data8 0xE4C3A60B049ACCEA, 0x00003FF8 // A7 -data8 0x8E2789F4E8A8F1AD, 0x00003FF9 // A6 -data8 0xB745D09B2B0E850B, 0x00003FF9 // A5 -data8 0xF8E38E3BC4C50920, 0x00003FF9 // A4 -data8 0xB6DB6DB6D89FCD81, 0x00003FFA // A3 -data8 0x99999999999AF376, 0x00003FFB // A2 -data8 0xAAAAAAAAAAAAAA71, 0x00003FFC // A1 - -data8 0xc90fdaa22168c234, 0x00003FFF // pi_by_2_hi -data8 0xc4c6628b80dc1cd1, 0x00003FBF // pi_by_2_lo -ASM_SIZE_DIRECTIVE(asin_coefficients) +{.mfi + nop.m 0 + // c9*x^7+..+c2 + fma.s1 F_S29 = F_X4, F_S69, F_S25 + nop.i 0;; +} -.align 32 -.global asinl# -.section .text -.proc asinl# -.align 32 +{.mfi + nop.m 0 + // y*z + fma.s1 F_YZ = F_Z, F_Y, f0 + nop.i 0 +} +{.mfi + nop.m 0 + // t^2 + fma.s1 F_T2 = F_T, F_T, f0 + nop.i 0;; +} -asinl: -{ .mfi - alloc r32 = ar.pfs,1,11,4,0 -(p0) fnorm asin_NORM_f8 = f8 -(p0) mov asin_GR_17_ones = 0x1ffff +{.mfi + nop.m 0 + // 1-t^2+ST + fma.s1 F_1T2_ST = F_ST, f1, F_1T2 + nop.i 0;; +} + + +{.mfi + nop.m 0 + // y*(1-s^2)(1-x) + fma.s1 F_Y1S2_1X = F_Y1S2, F_1X, f0 + nop.i 0 } -{ .mii -(p0) mov asin_GR_16_ones = 0xffff -(p0) mov asin_GR_ff9b = 0xff9b ;; - nop.i 999 +{.mfi + nop.m 0 + // dz ~ sqrt(1-t^2)-z + fma.s1 F_DZ = F_DZ0, F_ZE, f0 + nop.i 0;; } -{ .mmi -(p0) setf.exp asin_2m100 = asin_GR_ff9b -(p0) addl r40 = @ltoff(asin_coefficients), gp - nop.i 999 +{.mfi + nop.m 0 + // -1+correction for sqrt(1-t^2)-z + fnma.s1 F_CORR = F_INV1T2_2, F_DZ0, f0 + nop.i 0;; } -;; -{ .mmi - ld8 r40 = [r40] - nop.m 999 - nop.i 999 + +{.mfi + nop.m 0 + // (PS29*x^2+x)*y*(1-s^2) + fma.s1 F_S19 = F_Y1S2X2, F_S29, F_Y1S2X + nop.i 0;; } -;; +{.mfi + nop.m 0 + // z*y*(1-s^2)_s + fma.s1 F_ZY1S2S = F_YZ, F_1S2_S, f0 + nop.i 0 +} -// Load the constants +{.mfi + nop.m 0 + // s^2-(1-t^2+ST) + fms.s1 F_1T2_ST = f8, f8, F_1T2_ST + nop.i 0;; +} -{ .mmi -(p0) ldfe asin_A10 = [r40],16 ;; -(p0) ldfe asin_A9 = [r40],16 - nop.i 999 ;; + +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x + fma.s1 F_DTS = F_YZ, F_DS2X, F_DTS + nop.i 0 } -{ .mmi -(p0) ldfe asin_A8 = [r40],16 ;; -(p0) ldfe asin_A7 = [r40],16 - nop.i 999 ;; +{.mfi + nop.m 0 + // dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ, F_Y1S2_1X, f0 + nop.i 0;; } -{ .mmi -(p0) ldfe asin_A6 = [r40],16 ;; -(p0) getf.exp asin_GR_signexp_f8 = asin_NORM_f8 - nop.i 999 + +{.mfi + nop.m 0 + // R = t*s-sqrt(1-t^2)*(1-s^2)*y+sqrt(1-t^2)*(1-s^2)*y*PS19 + // (used for polynomial evaluation) + fma.s1 F_R = F_S19, F_SQRT_1T2, F_TS + nop.i 0;; } -{ .mmi -(p0) ldfe asin_A5 = [r40],16 ;; -(p0) ldfe asin_A4 = [r40],16 - nop.i 999 ;; + +{.mfi + nop.m 0 + // (PS29*x^2)*y*(1-s^2) + fma.s1 F_S29 = F_Y1S2X2, F_S29, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p0) fmerge.s asin_ABS_NORM_f8 = f0, asin_NORM_f8 -(p0) and asin_GR_exp = asin_GR_signexp_f8, asin_GR_17_ones ;; -} - -// case 1: |x| < 2^-40 ==> p6 (includes x = +-0) -// case 2: 2^-40 <= |x| < 2^-2 ==> p8 -// case 3: 2^-2 <= |x| < 1 ==> p9 -// case 4: 1 <= |x| ==> p11 -// In case 4, we pick up the special case x = +-1 and return +-pi/2 - -{ .mii -(p0) ldfe asin_A3 = [r40],16 -(p0) sub asin_GR_true_exp = asin_GR_exp, asin_GR_16_ones ;; -(p0) cmp.ge.unc p6, p7 = -41, asin_GR_true_exp ;; -} - -{ .mii -(p0) ldfe asin_A2 = [r40],16 -(p7) cmp.ge.unc p8, p9 = -3, asin_GR_true_exp ;; -(p9) cmp.ge.unc p10, p11 = -1, asin_GR_true_exp +{.mfi + nop.m 0 + // apply correction to dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, F_CORR, F_DZ_TERM + nop.i 0;; } -{ .mmi -(p0) ldfe asin_A1 = [r40],16 ;; -(p0) ldfe asin_pi_by_2 = [r40],16 - nop.i 999 + +{.mfi + nop.m 0 + // R^2 + fma.s1 F_R2 = F_R, F_R, f0 + nop.i 0;; } -// case 4: |x| >= 1 -{ .mib - nop.m 999 - nop.i 999 -(p11) br.spnt L(ASIN_ERROR_RETURN) ;; + +{.mfi + nop.m 0 + // (t*s-(t*s)_s)+z*y*(1-s^2-(1-s^2)_s)*x+dz*y*(1-s^2)*(1-x) + fma.s1 F_DZ_TERM = F_DZ_TERM, f1, F_DTS + nop.i 0;; } -// case 1: |x| < 2^-40 -{ .mfb - nop.m 999 -(p6) fma.s0 f8 = asin_2m100,f8,f8 -(p6) br.ret.spnt b0 ;; + +{.mfi + nop.m 0 + // c7+c9*R^2 + fma.s1 F_P79 = F_C9, F_R2, F_C7 + nop.i 0 } +{.mfi + nop.m 0 + // c3+c5*R^2 + fma.s1 F_P35 = F_C5, F_R2, F_C3 + nop.i 0;; +} -// case 2: 2^-40 <= |x| < 2^-2 ==> p8 -{ .mfi - nop.m 999 -(p8) fma.s1 asin_X2 = f8,f8, f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // asin(t)_low-(pi/2)_low + fms.s1 F_ATLO = F_ATLO, f1, F_PI2_LO + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_X4 = asin_X2,asin_X2, f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // R^4 + fma.s1 F_R4 = F_R2, F_R2, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P810 = asin_X4, asin_A10, asin_A8 - nop.i 999 +{.mfi + nop.m 0 + // R^3 + fma.s1 F_R3 = F_R2, F_R, f0 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P79 = asin_X4, asin_A9, asin_A7 - nop.i 999 ;; + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z + fnma.s1 F_TSS = F_T2, F_YZ, F_TSS + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P610 = asin_X4, asin_P810, asin_A6 - nop.i 999 +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + fma.s1 F_DZ_TERM = F_YZ, F_1T2_ST, F_DZ_TERM + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P59 = asin_X4, asin_P79, asin_A5 - nop.i 999 ;; + +{.mfi + nop.m 0 + // (pi/2)_hi-asin(t)_hi + fms.s1 F_ATHI = F_PI2_HI, f1, F_ATHI + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P410 = asin_X4, asin_P610, asin_A4 - nop.i 999 +{.mfi + nop.m 0 + // c3+c5*R^2+c7*R^4+c9*R^6 + fma.s1 F_P39 = F_P79, F_R4, F_P35 + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P39 = asin_X4, asin_P59, asin_A3 - nop.i 999 ;; + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST)+ + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + fma.s1 F_DZ_TERM = F_SQRT_1T2, F_S29, F_DZ_TERM + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P210 = asin_X4, asin_P410, asin_A2 - nop.i 999 + +{.mfi + nop.m 0 + // (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_TSS = F_YZ, F_ST, F_TSS + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P19 = asin_X4, asin_P39, asin_A1 - nop.i 999 ;; +{.mfi + nop.m 0 + // -asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fms.s1 F_P39 = F_P39, F_R3, F_ATLO + nop.i 0;; } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P1P2 = asin_X2, asin_P210, asin_P19 - nop.i 999 ;; + +{.mfi + nop.m 0 + // if s<0, change sign of F_ATHI + (p6) fnma.s1 F_ATHI = F_ATHI, f1, f0 + nop.i 0 } -{ .mfi - nop.m 999 -(p8) fma.s1 asin_P1P2 = asin_X2, asin_P1P2, f0 - nop.i 999 ;; +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_P39, f1, F_DZ_TERM + nop.i 0;; } -{ .mfb - nop.m 999 -(p8) fma.s0 f8 = asin_NORM_f8, asin_P1P2, asin_NORM_f8 -(p8) br.ret.spnt b0 ;; + +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + fma.s1 F_DZ_TERM = F_ZY1S2S, F_X, F_DZ_TERM + nop.i 0;; } -// case 3: 2^-2 <= |x| < 1 -// 1- X*X is computed as B + b -// Step 1.1: Get B and b -// atan2 will return -// f8 = Z_hi -// f10 = Z_lo -// f11 = s_lo +{.mfi + nop.m 0 + // d(ts)+z*y*d(1-s^2)*x+dz*y*(1-s^2)*(1-x)+z*y*(s^2-1+t^2-ST) + + // + sqrt(1-t^2)*y*(1-s^2)*x^2*PS29 + z*y*(1-s^2)_s*x + + // - asin(t)_low+R^3*(c3+c5*R^2+c7*R^4+c9*R^6) + + // + (t*s)_s-t^2*y*z+z*y*ST + fma.s1 F_DZ_TERM = F_TSS, f1, F_DZ_TERM + nop.i 0;; +} -{ .mfi -(p0) mov asin_GR_fffe = 0xfffe -(p0) fmerge.se f8 = asin_ABS_NORM_f8, asin_ABS_NORM_f8 -nop.i 0 -};; +.pred.rel "mutex", p6, p11 +{.mfi + nop.m 0 + // result: add high part of pi/2-table value + // s>0 in this case + (p11) fma.s0 f8 = F_DZ_TERM, f1, F_ATHI + nop.i 0 +} -{ .mmf -nop.m 0 -(p0) setf.exp asin_HALF = asin_GR_fffe -(p0) fmerge.se f12 = asin_NORM_f8, asin_NORM_f8 ;; +{.mfb + nop.m 0 + // result: add high part of pi/2-table value + // if s<0 + (p6) fnma.s0 f8 = F_DZ_TERM, f1, F_ATHI + br.ret.sptk b0;; } -{ .mfi - nop.m 999 -(p0) fcmp.lt.unc.s1 p6,p7 = asin_ABS_NORM_f8, asin_HALF - nop.i 999 ;; + + + + +SMALL_S: + + // use 15-term polynomial approximation + +{.mmi + // r3 = pointer to polynomial coefficients + addl r3 = @ltoff(poly_coeffs), gp;; + // load start address for coefficients + ld8 r3 = [r3] + mov R_TMP = 0x3fbf;; } -{ .mfi - nop.m 999 -(p7) fma.s1 asin_D = f1,f1,asin_ABS_NORM_f8 - nop.i 999 + +{.mmi + add r2 = 64, r3 + ldfe F_C3 = [r3], 16 + // p7 = 1 if |s|<2^{-64} (exponent of s f15, f32 -> f63 + +// General registers used: +// r3, r21 -> r31, r32 -> r38 -#include "libm_support.h" +// Predicate registers used: +// p0, p6 -> p14 // // Assembly macros //========================================= - - -// predicate registers -//asin_pred_LEsqrt2by2 = p7 -//asin_pred_GTsqrt2by2 = p8 - -// integer registers -ASIN_Addr1 = r33 -ASIN_Addr2 = r34 -ASIN_FFFE = r35 -ASIN_lnorm_sig = r36 -ASIN_snorm_exp = r37 - -GR_SAVE_B0 = r36 -GR_SAVE_PFS = r37 -GR_SAVE_GP = r38 - -GR_Parameter_X = r39 -GR_Parameter_Y = r40 -GR_Parameter_RESULT = r41 -GR_Parameter_Tag = r42 - -// floating point registers -asin_coeff_P1 = f32 -asin_coeff_P2 = f33 -asin_coeff_P3 = f34 -asin_coeff_P4 = f35 - -asin_coeff_P5 = f36 -asin_coeff_P6 = f37 -asin_coeff_P7 = f38 -asin_coeff_P8 = f39 -asin_coeff_P9 = f40 - -asin_coeff_P10 = f41 -asin_coeff_P11 = f42 -asin_coeff_P12 = f43 -asin_coeff_P13 = f44 -asin_coeff_P14 = f45 - -asin_coeff_P15 = f46 -asin_coeff_P16 = f47 -asin_coeff_P17 = f48 -asin_coeff_P18 = f49 -asin_coeff_P19 = f50 - -asin_coeff_P20 = f51 -asin_coeff_P21 = f52 -asin_const_sqrt2by2 = f53 -asin_const_piby2 = f54 -asin_abs_x = f55 - -asin_tx = f56 -asin_tx2 = f57 -asin_tx3 = f58 -asin_tx4 = f59 -asin_tx8 = f60 - -asin_tx11 = f61 -asin_1poly_p8 = f62 -asin_1poly_p19 = f63 -asin_1poly_p4 = f64 -asin_1poly_p15 = f65 - -asin_1poly_p6 = f66 -asin_1poly_p17 = f67 -asin_1poly_p0 = f68 -asin_1poly_p11 = f69 -asin_1poly_p2 = f70 - -asin_1poly_p13 = f71 -asin_series_tx = f72 -asin_t = f73 -asin_t2 = f74 -asin_t3 = f75 - -asin_t4 = f76 -asin_t8 = f77 -asin_t11 = f78 -asin_poly_p8 = f79 -asin_poly_p19 = f80 - -asin_poly_p4 = f81 -asin_poly_p15 = f82 -asin_poly_p6 = f83 -asin_poly_p17 = f84 -asin_poly_p0 = f85 - -asin_poly_p11 = f86 -asin_poly_p2 = f87 -asin_poly_p13 = f88 -asin_series_t = f89 -asin_1by2 = f90 - -asin_3by2 = f91 -asin_5by2 = f92 -asin_11by4 = f93 -asin_35by8 = f94 -asin_63by8 = f95 - -asin_231by16 = f96 -asin_y0 = f97 -asin_H0 = f98 -asin_S0 = f99 -asin_d = f100 - -asin_l1 = f101 -asin_d2 = f102 -asin_T0 = f103 -asin_d1 = f104 -asin_e0 = f105 - -asin_l2 = f106 -asin_d3 = f107 -asin_T3 = f108 -asin_S1 = f109 -asin_e1 = f110 - -asin_z = f111 -answer2 = f112 -asin_sgn_x = f113 -asin_429by16 = f114 -asin_18by4 = f115 - -asin_3by4 = f116 -asin_l3 = f117 -asin_T6 = f118 -asin_eps_exp = f119 -asin_eps_sig = f120 -asin_eps = f120 - +// integer registers used +// scratch +rTblAddr = r3 + +rPiBy2Ptr = r21 +rTmpPtr3 = r22 +rDenoBound = r23 +rOne = r24 +rAbsXBits = r25 +rHalf = r26 +r0625 = r27 +rSign = r28 +rXBits = r29 +rTmpPtr2 = r30 +rTmpPtr1 = r31 + +// stacked +GR_SAVE_PFS = r32 +GR_SAVE_B0 = r33 +GR_SAVE_GP = r34 +GR_Parameter_X = r35 +GR_Parameter_Y = r36 +GR_Parameter_RESULT = r37 +GR_Parameter_TAG = r38 + +// floating point registers used +FR_X = f10 +FR_Y = f1 +FR_RESULT = f8 + + +// scratch +fXSqr = f6 +fXCube = f7 +fXQuadr = f9 +f1pX = f10 +f1mX = f11 +f1pXRcp = f12 +f1mXRcp = f13 +fH = f14 +fS = f15 +// stacked +fA3 = f32 +fB1 = f32 +fA5 = f33 +fB2 = f33 +fA7 = f34 +fPiBy2 = f34 +fA9