summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-04-23 17:09:56 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2012-04-23 17:09:56 +0200
commit8c4bee1627d43df025433b0648903025d80715ec (patch)
treece4eedfbb9187c21d2a15412b2004376d2faee8c
parente9a96459ce093cc0b2dff3c25ba2a5dfc3609df5 (diff)
parent14d9e2b1fd8298da6cd388d421553d6ee8159ef7 (diff)
Merge remote-tracking branch 'refs/remotes/origin/top-bases/tschwinge/Roger_Whittaker' into refs/top-bases/tschwinge/Roger_Whittaker
-rw-r--r--ChangeLog1816
-rw-r--r--ChangeLog.0ea698ae7817329603d0afea7904a909bd59eac65
-rw-r--r--ChangeLog.228c019e6336d6da448715a1c5fcca9771827f617
-rw-r--r--ChangeLog.302cadd343d26cfa9b043c213c2a38de259464d87
-rw-r--r--ChangeLog.81c0c9648d8bdaafde6e8e407dce90c21aa115e94
-rw-r--r--ChangeLog.9078ce930afda8bbcba6fe860a13ca62abcf27425
-rw-r--r--ChangeLog.d2c736f809690dd69f1cade53a61b99e401bb0e34
-rw-r--r--FAQ11
-rw-r--r--FAQ.in11
-rw-r--r--Makefile.in9
-rw-r--r--NEWS38
-rw-r--r--README5
-rw-r--r--Versions.def1
-rw-r--r--bits/byteswap.h21
-rw-r--r--bits/ioctl-types.h4
-rw-r--r--config.h.in3
-rw-r--r--config.make.in1
-rwxr-xr-xconfigure12
-rw-r--r--configure.in11
-rw-r--r--csu/init-first.c6
-rw-r--r--ctype/Versions3
-rw-r--r--ctype/ctype-info.c15
-rw-r--r--ctype/ctype.h40
-rw-r--r--elf/chroot_canon.c7
-rw-r--r--elf/dl-addr.c4
-rw-r--r--elf/dl-deps.c17
-rw-r--r--elf/dl-fini.c14
-rw-r--r--elf/dl-iteratephdr.c4
-rw-r--r--elf/dl-lookup.c4
-rw-r--r--elf/do-rel.h89
-rw-r--r--elf/dynamic-link.h33
-rw-r--r--elf/pldd-xx.c1
-rw-r--r--elf/sprof.c7
-rw-r--r--elf/tst-auditmod4b.c2
-rw-r--r--elf/tst-auditmod6b.c2
-rw-r--r--elf/tst-auditmod6c.c2
-rw-r--r--elf/tst-auditmod7b.c2
-rw-r--r--grp/initgroups.c12
-rw-r--r--hesiod/hesiod.c4
-rw-r--r--iconv/gconv.h5
-rw-r--r--iconv/gconv_conf.c2
-rw-r--r--iconvdata/Makefile2
-rw-r--r--iconvdata/cp1258.c3
-rw-r--r--iconvdata/tcvn5712-1.c9
-rw-r--r--iconvdata/unicode.c8
-rw-r--r--iconvdata/utf-16.c57
-rw-r--r--iconvdata/utf-32.c21
-rw-r--r--include/alloca.h10
-rw-r--r--include/ctype.h20
-rw-r--r--include/features.h2
-rw-r--r--include/ifaddrs.h5
-rw-r--r--include/math.h4
-rw-r--r--include/unistd.h2
-rw-r--r--inet/Makefile6
-rw-r--r--inet/check_pf.c18
-rw-r--r--inet/getnameinfo.c11
-rw-r--r--inet/getnetgrent_r.c6
-rw-r--r--inet/netinet/in.h72
-rw-r--r--inet/rcmd.c12
-rw-r--r--inet/ruserpass.c2
-rw-r--r--inet/tst-checks.c173
-rw-r--r--intl/localealias.c6
-rw-r--r--intl/plural.c1989
-rw-r--r--libidn/ChangeLog4
-rw-r--r--libidn/idna.c7
-rw-r--r--libio/Versions2
-rw-r--r--libio/genops.c4
-rw-r--r--libio/iofwide.c11
-rw-r--r--libio/stdio.h18
-rw-r--r--libio/wfileops.c25
-rw-r--r--locale/findlocale.c3
-rw-r--r--locale/iso-639.def1
-rw-r--r--locale/loadarchive.c7
-rw-r--r--locale/loadlocale.c6
-rw-r--r--locale/programs/locarchive.c74
-rw-r--r--locale/weight.h11
-rw-r--r--locale/weightwc.h9
-rw-r--r--localedata/ChangeLog87
-rw-r--r--localedata/Makefile12
-rw-r--r--localedata/SUPPORTED7
-rw-r--r--localedata/locales/bho_IN164
-rw-r--r--localedata/locales/brx_IN185
-rw-r--r--localedata/locales/de_AT54
-rw-r--r--localedata/locales/es_BO57
-rw-r--r--localedata/locales/es_CL57
-rw-r--r--localedata/locales/es_CO57
-rw-r--r--localedata/locales/es_CR53
-rw-r--r--localedata/locales/es_CU122
-rw-r--r--localedata/locales/es_DO57
-rw-r--r--localedata/locales/es_EC57
-rw-r--r--localedata/locales/es_ES54
-rw-r--r--localedata/locales/es_GT7
-rw-r--r--localedata/locales/es_HN57
-rw-r--r--localedata/locales/es_MX57
-rw-r--r--localedata/locales/es_NI7
-rw-r--r--localedata/locales/es_PA57
-rw-r--r--localedata/locales/es_PE57
-rw-r--r--localedata/locales/es_PR57
-rw-r--r--localedata/locales/es_PY57
-rw-r--r--localedata/locales/es_SV7
-rw-r--r--localedata/locales/es_UY57
-rw-r--r--localedata/locales/es_VE57
-rw-r--r--localedata/locales/fi_FI100
-rw-r--r--localedata/locales/fr_BE2
-rw-r--r--localedata/locales/fr_CA57
-rw-r--r--localedata/locales/fr_CH54
-rw-r--r--localedata/locales/fr_LU54
-rw-r--r--localedata/locales/nl_BE2
-rw-r--r--localedata/locales/si_LK62
-rw-r--r--localedata/locales/sv_SE4
-rw-r--r--localedata/locales/ta_LK85
-rw-r--r--localedata/locales/unm_US150
-rw-r--r--localedata/locales/wal_ET59
-rw-r--r--localedata/tst-setlocale2.c76
-rw-r--r--malloc/arena.c65
-rw-r--r--malloc/malloc.c8
-rw-r--r--malloc/mcheck.h4
-rw-r--r--malloc/mtrace.c8
-rw-r--r--manual/resource.texi2
-rw-r--r--manual/stdio.texi59
-rw-r--r--manual/string.texi8
-rw-r--r--math/Makefile10
-rw-r--r--math/Versions30
-rw-r--r--math/bits/math-finite.h329
-rw-r--r--math/bits/mathcalls.h5
-rw-r--r--math/complex.h5
-rw-r--r--math/divtc3.c16
-rw-r--r--math/e_acoshl.c1
-rw-r--r--math/e_acosl.c1
-rw-r--r--math/e_asinl.c1
-rw-r--r--math/e_atan2l.c1
-rw-r--r--math/e_atanhl.c1
-rw-r--r--math/e_coshl.c1
-rw-r--r--math/e_exp10.c3
-rw-r--r--math/e_exp10f.c3
-rw-r--r--math/e_exp10l.c3
-rw-r--r--math/e_exp2l.c1
-rw-r--r--math/e_expl.c1
-rw-r--r--math/e_fmodl.c1
-rw-r--r--math/e_gammal_r.c1
-rw-r--r--math/e_hypotl.c1
-rw-r--r--math/e_j0l.c2
-rw-r--r--math/e_j1l.c2
-rw-r--r--math/e_jnl.c2
-rw-r--r--math/e_lgammal_r.c1
-rw-r--r--math/e_log10l.c1
-rw-r--r--math/e_log2l.c1
-rw-r--r--math/e_logl.c1
-rw-r--r--math/e_powl.c1
-rw-r--r--math/e_scalb.c112
-rw-r--r--math/e_scalbf.c109
-rw-r--r--math/e_scalbl.c114
-rw-r--r--math/e_sinhl.c1
-rw-r--r--math/e_sqrtl.c1
-rw-r--r--math/libm-test.inc5
-rw-r--r--math/math.h32
-rw-r--r--math/math_private.h50
-rw-r--r--math/multc3.c17
-rw-r--r--math/s_cacosh.c14
-rw-r--r--math/s_cacoshf.c28
-rw-r--r--math/s_cacoshl.c15
-rw-r--r--math/s_casin.c5
-rw-r--r--math/s_casinf.c5
-rw-r--r--math/s_casinh.c3
-rw-r--r--math/s_casinhf.c3
-rw-r--r--math/s_casinhl.c3
-rw-r--r--math/s_casinl.c5
-rw-r--r--math/s_catan.c7
-rw-r--r--math/s_catanf.c7
-rw-r--r--math/s_catanh.c15
-rw-r--r--math/s_catanhf.c15
-rw-r--r--math/s_catanhl.c15
-rw-r--r--math/s_catanl.c7
-rw-r--r--math/s_ccos.c51
-rw-r--r--math/s_ccosf.c51
-rw-r--r--math/s_ccosh.c24
-rw-r--r--math/s_ccoshf.c24
-rw-r--r--math/s_ccoshl.c26
-rw-r--r--math/s_ccosl.c51
-rw-r--r--math/s_cexp.c17
-rw-r--r--math/s_cexpf.c17
-rw-r--r--math/s_cexpl.c17
-rw-r--r--math/s_clog.c7
-rw-r--r--math/s_clog10.c7
-rw-r--r--math/s_clog10f.c7
-rw-r--r--math/s_clog10l.c7
-rw-r--r--math/s_clogf.c6
-rw-r--r--math/s_clogl.c7
-rw-r--r--math/s_csin.c12
-rw-r--r--math/s_csinf.c12
-rw-r--r--math/s_csinh.c26
-rw-r--r--math/s_csinhf.c26
-rw-r--r--math/s_csinhl.c26
-rw-r--r--math/s_csinl.c12
-rw-r--r--math/s_csqrt.c9
-rw-r--r--math/s_csqrtf.c9
-rw-r--r--math/s_csqrtl.c9
-rw-r--r--math/s_ctan.c10
-rw-r--r--math/s_ctanf.c11
-rw-r--r--math/s_ctanh.c11
-rw-r--r--math/s_ctanhf.c11
-rw-r--r--math/s_ctanhl.c11
-rw-r--r--math/s_ctanl.c10
-rw-r--r--math/s_nan.c1
-rw-r--r--math/s_nanf.c1
-rw-r--r--math/s_nanl.c1
-rw-r--r--math/w_acos.c62
-rw-r--r--math/w_acosf.c64
-rw-r--r--math/w_acosh.c59
-rw-r--r--math/w_acoshf.c62
-rw-r--r--math/w_acoshl.c61
-rw-r--r--math/w_acosl.c64
-rw-r--r--math/w_asin.c61
-rw-r--r--math/w_asinf.c65
-rw-r--r--math/w_asinl.c65
-rw-r--r--math/w_atan2.c53
-rw-r--r--math/w_atan2f.c54
-rw-r--r--math/w_atan2l.c55
-rw-r--r--math/w_atanh.c64
-rw-r--r--math/w_atanhf.c67
-rw-r--r--math/w_atanhl.c66
-rw-r--r--math/w_cosh.c31
-rw-r--r--math/w_coshf.c35
-rw-r--r--math/w_coshl.c30
-rw-r--r--math/w_exp10.c58
-rw-r--r--math/w_exp10f.c61
-rw-r--r--math/w_exp10l.c59
-rw-r--r--math/w_exp2.c26
-rw-r--r--math/w_exp2f.c26
-rw-r--r--math/w_exp2l.c20
-rw-r--r--math/w_fmod.c61
-rw-r--r--math/w_fmodf.c62
-rw-r--r--math/w_fmodl.c63
-rw-r--r--math/w_hypot.c29
-rw-r--r--math/w_hypotf.c31
-rw-r--r--math/w_hypotl.c26
-rw-r--r--math/w_j0.c104
-rw-r--r--math/w_j0f.c110
-rw-r--r--math/w_j0l.c108
-rw-r--r--math/w_j1.c105
-rw-r--r--math/w_j1f.c110
-rw-r--r--math/w_j1l.c108
-rw-r--r--math/w_jn.c127
-rw-r--r--math/w_jnf.c109
-rw-r--r--math/w_lgamma.c43
-rw-r--r--math/w_lgamma_r.c35
-rw-r--r--math/w_lgammaf.c45
-rw-r--r--math/w_lgammaf_r.c43
-rw-r--r--math/w_lgammal.c43
-rw-r--r--math/w_lgammal_r.c36
-rw-r--r--math/w_log.c69
-rw-r--r--math/w_log10.c72
-rw-r--r--math/w_log10f.c75
-rw-r--r--math/w_log10l.c74
-rw-r--r--math/w_log2.c49
-rw-r--r--math/w_log2f.c53
-rw-r--r--math/w_log2l.c51
-rw-r--r--math/w_logf.c72
-rw-r--r--math/w_logl.c71
-rw-r--r--math/w_pow.c111
-rw-r--r--math/w_powf.c122
-rw-r--r--math/w_powl.c115
-rw-r--r--math/w_remainder.c60
-rw-r--r--math/w_remainderf.c62
-rw-r--r--math/w_remainderl.c63
-rw-r--r--math/w_scalb.c94
-rw-r--r--math/w_scalbf.c97
-rw-r--r--math/w_scalbl.c96
-rw-r--r--math/w_sinh.c29
-rw-r--r--math/w_sinhf.c34
-rw-r--r--math/w_sinhl.c29
-rw-r--r--math/w_sqrt.c58
-rw-r--r--math/w_sqrtf.c60
-rw-r--r--math/w_sqrtl.c60
-rw-r--r--math/w_tgamma.c26
-rw-r--r--math/w_tgammaf.c34
-rw-r--r--math/w_tgammal.c28
-rw-r--r--misc/bits/select2.h3
-rw-r--r--misc/getpass.c4
-rw-r--r--misc/getttyent.c2
-rw-r--r--misc/getusershell.c2
-rw-r--r--misc/mntent_r.c6
-rw-r--r--misc/sys/cdefs.h24
-rw-r--r--nis/nis_file.c6
-rw-r--r--nis/nis_findserv.c6
-rw-r--r--nis/nis_table.c36
-rw-r--r--nis/nss-default.c5
-rw-r--r--nptl/ChangeLog71
-rw-r--r--nptl/Versions2
-rw-r--r--nptl/allocatestack.c16
-rw-r--r--nptl/nptl-init.c12
-rw-r--r--nptl/pthreadP.h1
-rw-r--r--nptl/pthread_create.c11
-rw-r--r--nptl/pthread_getattr_np.c6
-rw-r--r--nptl/semaphore.h6
-rw-r--r--nptl/sysdeps/i386/tls.h1
-rw-r--r--nptl/sysdeps/pthread/gai_misc.h6
-rw-r--r--nptl/sysdeps/pthread/pthread.h38
-rw-r--r--nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S80
-rw-r--r--nptl/sysdeps/unix/sysv/linux/mq_notify.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/pthread_getname.c11
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_routines.c4
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S6
-rw-r--r--nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S76
-rw-r--r--nptl/tst-cancel7.c4
-rw-r--r--nptl/tst-mutex6.c5
-rw-r--r--nptl/tst-mutex9.c4
-rw-r--r--nptl/tst-mutexpi6.c6
-rw-r--r--nscd/Makefile2
-rw-r--r--nscd/aicache.c7
-rw-r--r--nscd/connections.c119
-rw-r--r--nscd/netgroupcache.c4
-rw-r--r--nscd/nscd-client.h18
-rw-r--r--nscd/nscd.c8
-rw-r--r--nscd/nscd_gethst_r.c23
-rw-r--r--nscd/nscd_helper.c10
-rw-r--r--nscd/nscd_proto.h2
-rw-r--r--nss/db-Makefile2
-rw-r--r--nss/getent.c7
-rw-r--r--nss/makedb.c2
-rw-r--r--nss/nss_files/files-XXX.c2
-rw-r--r--nss/nss_files/files-alias.c4
-rw-r--r--nss/nss_files/files-initgroups.c4
-rw-r--r--nss/nss_files/files-key.c2
-rw-r--r--nss/nss_files/files-netgrp.c4
-rw-r--r--nss/nsswitch.c2
-rw-r--r--po/es.po10291
-rw-r--r--po/it.po1778
-rw-r--r--po/ja.po398
-rw-r--r--posix/fnmatch_loop.c4
-rw-r--r--posix/regcomp.c9
-rw-r--r--posix/regex_internal.c8
-rw-r--r--posix/regex_internal.h5
-rw-r--r--posix/regexec.c2
-rw-r--r--posix/sys/wait.h6
-rw-r--r--posix/tst-rfc3484-2.c6
-rw-r--r--posix/tst-rfc3484-3.c6
-rw-r--r--posix/tst-rfc3484.c6
-rw-r--r--posix/unistd.h2
-rw-r--r--resolv/getaddrinfo_a.c6
-rw-r--r--resolv/gethnamaddr.c6
-rw-r--r--resolv/res_hconf.c2
-rw-r--r--resolv/res_init.c2
-rw-r--r--resolv/res_query.c2
-rwxr-xr-xscripts/check-local-headers.sh2
-rwxr-xr-xscripts/list-sources.sh18
-rw-r--r--setjmp/bits/setjmp2.h22
-rw-r--r--setjmp/setjmp.h14
-rw-r--r--stdio-common/vfprintf.c13
-rw-r--r--stdlib/strtod_l.c2
-rw-r--r--stdlib/ucontext.h8
-rw-r--r--string/Makefile2
-rw-r--r--string/memrchr.c11
-rw-r--r--string/stratcliff.c35
-rw-r--r--string/strcoll_l.c6
-rw-r--r--string/strnlen.c13
-rw-r--r--string/strxfrm_l.c2
-rw-r--r--string/test-memcmp.c51
-rw-r--r--string/test-rawmemchr.c189
-rw-r--r--string/test-strchr.c166
-rw-r--r--string/test-strchrnul.c2
-rw-r--r--string/test-strcmp.c112
-rw-r--r--string/test-strcpy.c110
-rw-r--r--string/test-string.h3
-rw-r--r--string/test-strlen.c85
-rw-r--r--string/test-strrchr.c132
-rw-r--r--sunrpc/clnt_tcp.c15
-rw-r--r--sunrpc/clnt_udp.c3
-rw-r--r--sunrpc/clnt_unix.c16
-rw-r--r--sunrpc/rpc_prot.c2
-rw-r--r--sysdeps/generic/dl-hash.h53
-rw-r--r--sysdeps/generic/dwarf2.h9
-rw-r--r--sysdeps/generic/sysdep.h119
-rw-r--r--sysdeps/i386/bits/byteswap.h20
-rw-r--r--sysdeps/i386/configure23
-rw-r--r--sysdeps/i386/configure.in11
-rw-r--r--sysdeps/i386/fpu/bits/fenv.h50
-rw-r--r--sysdeps/i386/fpu/e_acos.S1
-rw-r--r--sysdeps/i386/fpu/e_acosf.S1
-rw-r--r--sysdeps/i386/fpu/e_acosh.S7
-rw-r--r--sysdeps/i386/fpu/e_acoshf.S7
-rw-r--r--sysdeps/i386/fpu/e_acoshl.S7
-rw-r--r--sysdeps/i386/fpu/e_acosl.c1
-rw-r--r--sysdeps/i386/fpu/e_asin.S1
-rw-r--r--sysdeps/i386/fpu/e_asinf.S1
-rw-r--r--sysdeps/i386/fpu/e_atan2.S1
-rw-r--r--sysdeps/i386/fpu/e_atan2f.S1
-rw-r--r--sysdeps/i386/fpu/e_atan2l.c1
-rw-r--r--sysdeps/i386/fpu/e_atanh.S3
-rw-r--r--sysdeps/i386/fpu/e_atanhf.S3
-rw-r--r--sysdeps/i386/fpu/e_atanhl.S3
-rw-r--r--sysdeps/i386/fpu/e_exp.S17
-rw-r--r--sysdeps/i386/fpu/e_exp10.S1
-rw-r--r--sysdeps/i386/fpu/e_exp10f.S3
-rw-r--r--sysdeps/i386/fpu/e_exp10l.S3
-rw-r--r--sysdeps/i386/fpu/e_exp2.S1
-rw-r--r--sysdeps/i386/fpu/e_exp2f.S1
-rw-r--r--sysdeps/i386/fpu/e_exp2l.S1
-rw-r--r--sysdeps/i386/fpu/e_expf.S17
-rw-r--r--sysdeps/i386/fpu/e_expl.c3
-rw-r--r--sysdeps/i386/fpu/e_fmod.S3
-rw-r--r--sysdeps/i386/fpu/e_fmodf.S3
-rw-r--r--sysdeps/i386/fpu/e_fmodl.c1
-rw-r--r--sysdeps/i386/fpu/e_hypot.S5
-rw-r--r--sysdeps/i386/fpu/e_hypotf.S5
-rw-r--r--sysdeps/i386/fpu/e_log.S29
-rw-r--r--sysdeps/i386/fpu/e_log10.S11
-rw-r--r--sysdeps/i386/fpu/e_log10f.S11
-rw-r--r--sysdeps/i386/fpu/e_log10l.S11
-rw-r--r--sysdeps/i386/fpu/e_log2.S9
-rw-r--r--sysdeps/i386/fpu/e_log2f.S9
-rw-r--r--sysdeps/i386/fpu/e_log2l.S9
-rw-r--r--sysdeps/i386/fpu/e_logf.S29
-rw-r--r--sysdeps/i386/fpu/e_logl.S29
-rw-r--r--sysdeps/i386/fpu/e_pow.S39
-rw-r--r--sysdeps/i386/fpu/e_powf.S39
-rw-r--r--sysdeps/i386/fpu/e_powl.S39
-rw-r--r--sysdeps/i386/fpu/e_remainder.S3
-rw-r--r--sysdeps/i386/fpu/e_remainderf.S3
-rw-r--r--sysdeps/i386/fpu/e_remainderl.S3
-rw-r--r--sysdeps/i386/fpu/e_scalb.S12
-rw-r--r--sysdeps/i386/fpu/e_scalbf.S12
-rw-r--r--sysdeps/i386/fpu/e_scalbl.S12
-rw-r--r--sysdeps/i386/fpu/e_sqrt.S3
-rw-r--r--sysdeps/i386/fpu/e_sqrtf.S3
-rw-r--r--sysdeps/i386/fpu/e_sqrtl.c2
-rw-r--r--sysdeps/i386/fpu/fgetexcptflg.c22
-rw-r--r--sysdeps/i386/fpu/math_private.h7
-rw-r--r--sysdeps/i386/i686/fpu/e_log.S29
-rw-r--r--sysdeps/i386/i686/fpu/e_logf.S30
-rw-r--r--sysdeps/i386/i686/fpu/e_logl.S81
-rw-r--r--sysdeps/i386/i686/multiarch/Makefile15
-rw-r--r--sysdeps/i386/i686/multiarch/locale-defines.sym11
-rw-r--r--sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S497
-rw-r--r--sysdeps/i386/i686/multiarch/memchr-sse2.S706
-rw-r--r--sysdeps/i386/i686/multiarch/memchr.S99
-rw-r--r--sysdeps/i386/i686/multiarch/memcmp-sse4.S396
-rw-r--r--sysdeps/i386/i686/multiarch/memcmp-ssse3.S565
-rw-r--r--sysdeps/i386/i686/multiarch/memcpy-ssse3.S927
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr-c.c7
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S418
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr-sse2.S725
-rw-r--r--sysdeps/i386/i686/multiarch/memrchr.S79
-rw-r--r--sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S3
-rw-r--r--sysdeps/i386/i686/multiarch/rawmemchr-sse2.S3
-rw-r--r--sysdeps/i386/i686/multiarch/rawmemchr.S99
-rw-r--r--sysdeps/i386/i686/multiarch/rtld-strnlen.c1
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp-c.c12
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp.S68
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp_l-c.c11
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp_l-sse4.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp_l-ssse3.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strcasecmp_l.S5
-rw-r--r--sysdeps/i386/i686/multiarch/strcmp-sse4.S562
-rw-r--r--sysdeps/i386/i686/multiarch/strcmp-ssse3.S1108
-rw-r--r--sysdeps/i386/i686/multiarch/strcmp.S28
-rw-r--r--sysdeps/i386/i686/multiarch/strcpy-ssse3.S1261
-rw-r--r--sysdeps/i386/i686/multiarch/strlen-sse2.S440
-rw-r--r--sysdeps/i386/i686/multiarch/strncase-c.c8
-rw-r--r--sysdeps/i386/i686/multiarch/strncase.S68
-rw-r--r--sysdeps/i386/i686/multiarch/strncase_l-c.c11
-rw-r--r--sysdeps/i386/i686/multiarch/strncase_l-sse4.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strncase_l-ssse3.S2
-rw-r--r--sysdeps/i386/i686/multiarch/strncase_l.S5
-rw-r--r--sysdeps/i386/i686/multiarch/strnlen-c.c8
-rw-r--r--sysdeps/i386/i686/multiarch/strnlen-sse2.S3
-rw-r--r--sysdeps/i386/i686/multiarch/strnlen.S56
-rw-r--r--sysdeps/i386/i686/multiarch/wcschr-c.c8
-rw-r--r--sysdeps/i386/i686/multiarch/wcschr-sse2.S220
-rw-r--r--sysdeps/i386/i686/multiarch/wcschr.S54
-rw-r--r--sysdeps/i386/i686/multiarch/wcscmp-c.c8
-rw-r--r--sysdeps/i386/i686/multiarch/wcscmp-sse2.S148
-rw-r--r--sysdeps/i386/i686/multiarch/wcscpy-c.c5
-rw-r--r--sysdeps/i386/i686/multiarch/wcscpy-ssse3.S601
-rw-r--r--sysdeps/i386/i686/multiarch/wcscpy.S46
-rw-r--r--sysdeps/i386/i686/multiarch/wcslen-c.c9
-rw-r--r--sysdeps/i386/i686/multiarch/wcslen-sse2.S194
-rw-r--r--sysdeps/i386/i686/multiarch/wcslen.S56
-rw-r--r--sysdeps/i386/i686/multiarch/wcsrchr-c.c5
-rw-r--r--sysdeps/i386/i686/multiarch/wcsrchr-sse2.S355
-rw-r--r--sysdeps/i386/i686/multiarch/wcsrchr.S54
-rw-r--r--sysdeps/i386/i686/multiarch/wmemcmp-c.c9
-rw-r--r--sysdeps/i386/i686/multiarch/wmemcmp-sse4.S4
-rw-r--r--sysdeps/i386/i686/multiarch/wmemcmp-ssse3.S4
-rw-r--r--sysdeps/i386/i686/multiarch/wmemcmp.S59
-rw-r--r--sysdeps/i386/init-first.c6
-rw-r--r--sysdeps/ia64/bits/byteswap.h35
-rw-r--r--sysdeps/ia64/fpu/bits/math-finite.h25
-rw-r--r--sysdeps/ieee754/dbl-64/branred.c10
-rw-r--r--sysdeps/ieee754/dbl-64/dla.h107
-rw-r--r--sysdeps/ieee754/dbl-64/doasin.c17
-rw-r--r--sysdeps/ieee754/dbl-64/dosincos.c61
-rw-r--r--sysdeps/ieee754/dbl-64/e_acosh.c31
-rw-r--r--sysdeps/ieee754/dbl-64/e_asin.c46
-rw-r--r--sysdeps/ieee754/dbl-64/e_atan2.c412
-rw-r--r--sysdeps/ieee754/dbl-64/e_atanh.c125
-rw-r--r--sysdeps/ieee754/dbl-64/e_cosh.c64
-rw-r--r--sysdeps/ieee754/dbl-64/e_exp.c17
-rw-r--r--sysdeps/ieee754/dbl-64/e_exp2.c48
-rw-r--r--sysdeps/ieee754/dbl-64/e_fmod.c50
-rw-r--r--sysdeps/ieee754/dbl-64/e_gamma_r.c10
-rw-r--r--sysdeps/ieee754/dbl-64/e_hypot.c25
-rw-r--r--sysdeps/ieee754/dbl-64/e_j0.c215
-rw-r--r--sysdeps/ieee754/dbl-64/e_j1.c255
-rw-r--r--sysdeps/ieee754/dbl-64/e_jn.c82
-rw-r--r--sysdeps/ieee754/dbl-64/e_lgamma_r.c85
-rw-r--r--sysdeps/ieee754/dbl-64/e_log.c41
-rw-r--r--sysdeps/ieee754/dbl-64/e_log10.c42
-rw-r--r--sysdeps/ieee754/dbl-64/e_log2.c34
-rw-r--r--sysdeps/ieee754/dbl-64/e_pow.c42
-rw-r--r--sysdeps/ieee754/dbl-64/e_rem_pio2.c99
-rw-r--r--sysdeps/ieee754/dbl-64/e_remainder.c11
-rw-r--r--sysdeps/ieee754/dbl-64/e_sinh.c36
-rw-r--r--sysdeps/ieee754/dbl-64/e_sqrt.c5
-rw-r--r--sysdeps/ieee754/dbl-64/halfulp.c31
-rw-r--r--sysdeps/ieee754/dbl-64/mpa.c113
-rw-r--r--sysdeps/ieee754/dbl-64/mpa.h25
-rw-r--r--sysdeps/ieee754/dbl-64/mpatan.c29
-rw-r--r--sysdeps/ieee754/dbl-64/mpatan.h73
-rw-r--r--sysdeps/ieee754/dbl-64/mpatan2.c15
-rw-r--r--sysdeps/ieee754/dbl-64/mpexp.c43
-rw-r--r--sysdeps/ieee754/dbl-64/mpexp.h70
-rw-r--r--sysdeps/ieee754/dbl-64/mpsqrt.c35
-rw-r--r--sysdeps/ieee754/dbl-64/mpsqrt.h29
-rw-r--r--sysdeps/ieee754/dbl-64/mptan.c11
-rw-r--r--sysdeps/ieee754/dbl-64/s_asinh.c40
-rw-r--r--sysdeps/ieee754/dbl-64/s_atan.c133
-rw-r--r--sysdeps/ieee754/dbl-64/s_ceil.c54
-rw-r--r--sysdeps/ieee754/dbl-64/s_expm1.c78
-rw-r--r--sysdeps/ieee754/dbl-64/s_finite.c1
-rw-r--r--sysdeps/ieee754/dbl-64/s_floor.c43
-rw-r--r--sysdeps/ieee754/dbl-64/s_fma.c22
-rw-r--r--sysdeps/ieee754/dbl-64/s_fmaf.c10
-rw-r--r--sysdeps/ieee754/dbl-64/s_isinf_ns.c20
-rw-r--r--sysdeps/ieee754/dbl-64/s_isnan.c1
-rw-r--r--sysdeps/ieee754/dbl-64/s_log1p.c52
-rw-r--r--sysdeps/ieee754/dbl-64/s_rint.c26
-rw-r--r--sysdeps/ieee754/dbl-64/s_round.c43
-rw-r--r--sysdeps/ieee754/dbl-64/s_sin.c276
-rw-r--r--sysdeps/ieee754/dbl-64/s_tan.c73
-rw-r--r--sysdeps/ieee754/dbl-64/sincos32.c50
-rw-r--r--sysdeps/ieee754/dbl-64/sincostab.c (renamed from sysdeps/ieee754/dbl-64/sincos.tbl)9
-rw-r--r--sysdeps/ieee754/dbl-64/slowexp.c12
-rw-r--r--sysdeps/ieee754/dbl-64/slowpow.c12
-rw-r--r--sysdeps/ieee754/dbl-64/w_exp.c79
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c82
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c104
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c32
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c1
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c79
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c67
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_isinf_ns.c20
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c1
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c28
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c112
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c17
-rw-r--r--sysdeps/ieee754/dbl-64/wordsize-64/s_round.c24
-rw-r--r--sysdeps/ieee754/flt-32/e_acosf.c21
-rw-r--r--sysdeps/ieee754/flt-32/e_acoshf.c15
-rw-r--r--sysdeps/ieee754/flt-32/e_asinf.c9
-rw-r--r--sysdeps/ieee754/flt-32/e_atan2f.c27
-rw-r--r--sysdeps/ieee754/flt-32/e_atanhf.c115
-rw-r--r--sysdeps/ieee754/flt-32/e_coshf.c43
-rw-r--r--sysdeps/ieee754/flt-32/e_exp2f.c14
-rw-r--r--sysdeps/ieee754/flt-32/e_expf.c21
-rw-r--r--sysdeps/ieee754/flt-32/e_fmodf.c33
-rw-r--r--sysdeps/ieee754/flt-32/e_gammaf_r.c10
-rw-r--r--sysdeps/ieee754/flt-32/e_hypotf.c21
-rw-r--r--sysdeps/ieee754/flt-32/e_j0f.c203
-rw-r--r--sysdeps/ieee754/flt-32/e_j1f.c239
-rw-r--r--sysdeps/ieee754/flt-32/e_jnf.c53
-rw-r--r--sysdeps/ieee754/flt-32/e_lgammaf_r.c70
-rw-r--r--sysdeps/ieee754/flt-32/e_log10f.c42
-rw-r--r--sysdeps/ieee754/flt-32/e_log2f.c26
-rw-r--r--sysdeps/ieee754/flt-32/e_logf.c32
-rw-r--r--sysdeps/ieee754/flt-32/e_powf.c46
-rw-r--r--sysdeps/ieee754/flt-32/e_remainderf.c21
-rw-r--r--sysdeps/ieee754/flt-32/e_sinhf.c25
-rw-r--r--sysdeps/ieee754/flt-32/e_sqrtf.c39
-rw-r--r--sysdeps/ieee754/flt-32/s_asinhf.c40
-rw-r--r--sysdeps/ieee754/flt-32/s_ceilf.c39
-rw-r--r--sysdeps/ieee754/flt-32/s_expm1f.c52
-rw-r--r--sysdeps/ieee754/flt-32/s_finitef.c1
-rw-r--r--sysdeps/ieee754/flt-32/s_floorf.c40
-rw-r--r--sysdeps/ieee754/flt-32/s_isinf_nsf.c20
-rw-r--r--sysdeps/ieee754/flt-32/s_isnanf.c3
-rw-r--r--sysdeps/ieee754/flt-32/s_log1pf.c42
-rw-r--r--sysdeps/ieee754/flt-32/s_nearbyintf.c28
-rw-r--r--sysdeps/ieee754/flt-32/s_rintf.c28
-rw-r--r--sysdeps/ieee754/flt-32/s_roundf.c24
-rw-r--r--sysdeps/ieee754/flt-32/w_expf.c90
-rw-r--r--sysdeps/ieee754/k_standard.c331
-rw-r--r--sysdeps/ieee754/ldbl-128/e_acoshl.c15
-rw-r--r--sysdeps/ieee754/ldbl-128/e_acosl.c21
-rw-r--r--sysdeps/ieee754/ldbl-128/e_asinl.c7
-rw-r--r--sysdeps/ieee754/ldbl-128/e_atan2l.c25
-rw-r--r--sysdeps/ieee754/ldbl-128/e_atanhl.c23
-rw-r--r--sysdeps/ieee754/ldbl-128/e_coshl.c16
-rw-r--r--sysdeps/ieee754/ldbl-128/e_expl.c5
-rw-r--r--sysdeps/ieee754/ldbl-128/e_fmodl.c41
-rw-r--r--sysdeps/ieee754/ldbl-128/e_gammal_r.c5
-rw-r--r--sysdeps/ieee754/ldbl-128/e_hypotl.c21
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j0l.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/e_j1l.c2
-rw-r--r--sysdeps/ieee754/ldbl-128/e_jnl.c24
-rw-r--r--sysdeps/ieee754/ldbl-128/e_lgammal_r.c12
-rw-r--r--sysdeps/ieee754/ldbl-128/e_log10l.c6
-rw-r--r--sysdeps/ieee754/ldbl-128/e_log2l.c3
-rw-r--r--sysdeps/ieee754/ldbl-128/e_logl.c5
-rw-r--r--sysdeps/ieee754/ldbl-128/e_powl.c11
-rw-r--r--sysdeps/ieee754/ldbl-128/e_remainderl.c25
-rw-r--r--sysdeps/ieee754/ldbl-128/e_sinhl.c16
-rw-r--r--sysdeps/ieee754/ldbl-128/s_isinf_nsl.c19
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_acoshl.c19
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_acosl.c7
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_asinl.c7
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_atan2l.c23
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_atanhl.c25
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_coshl.c27
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_expl.c3
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_fmodl.c31
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c5
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_hypotl.c21
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_jnl.c2
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_log10l.c4
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_log2l.c1
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_logl.c3
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_powl.c11
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_remainderl.c19
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_sinhl.c23
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c5
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_atanl.c1
-rw-r--r--sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c16
-rw-r--r--sysdeps/ieee754/ldbl-96/e_acoshl.c21
-rw-r--r--sysdeps/ieee754/ldbl-96/e_asinl.c7
-rw-r--r--sysdeps/ieee754/ldbl-96/e_atan2l.c29
-rw-r--r--sysdeps/ieee754/ldbl-96/e_atanhl.c28
-rw-r--r--sysdeps/ieee754/ldbl-96/e_coshl.c46
-rw-r--r--sysdeps/ieee754/ldbl-96/e_gammal_r.c13
-rw-r--r--sysdeps/ieee754/ldbl-96/e_hypotl.c21
-rw-r--r--sysdeps/ieee754/ldbl-96/e_j0l.c155
-rw-r--r--sysdeps/ieee754/ldbl-96/e_j1l.c160
-rw-r--r--sysdeps/ieee754/ldbl-96/e_jnl.c41
-rw-r--r--sysdeps/ieee754/ldbl-96/e_lgammal_r.c30
-rw-r--r--sysdeps/ieee754/ldbl-96/e_remainderl.c23
-rw-r--r--sysdeps/ieee754/ldbl-96/e_sinhl.c21
-rw-r--r--sysdeps/ieee754/ldbl-96/s_asinhl.c22
-rw-r--r--sysdeps/ieee754/ldbl-96/s_isinf_nsl.c18
-rw-r--r--sysdeps/ieee754/ldbl-96/s_roundl.c55
-rw-r--r--sysdeps/ieee754/ldbl-96/w_expl.c89
-rw-r--r--sysdeps/mach/hurd/i386/init-first.c7
-rw-r--r--sysdeps/mach/hurd/malloc-machine.h9
-rw-r--r--sysdeps/mach/hurd/mmap.c46
-rw-r--r--sysdeps/mach/hurd/powerpc/init-first.c6
-rw-r--r--sysdeps/mach/hurd/socket.c6
-rw-r--r--sysdeps/posix/getaddrinfo.c12
-rw-r--r--sysdeps/powerpc/Makefile2
-rw-r--r--sysdeps/powerpc/fpu/e_hypot.c3
-rw-r--r--sysdeps/powerpc/fpu/e_hypotf.c1
-rw-r--r--sysdeps/powerpc/fpu/e_sqrt.c22
-rw-r--r--sysdeps/powerpc/fpu/e_sqrtf.c21
-rw-r--r--sysdeps/powerpc/fpu/math_private.h137
-rw-r--r--sysdeps/powerpc/locale-defines.sym5
-rw-r--r--sysdeps/powerpc/powerpc32/a2/memcpy.S10
-rw-r--r--sysdeps/powerpc/powerpc32/dl-start.S10
-rw-r--r--sysdeps/powerpc/powerpc32/elf/start.S14
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S10
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_ceil.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_ceilf.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_floor.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_floorf.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_lround.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S80
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S70
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_rint.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_rintf.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_round.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_roundf.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_trunc.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/s_truncf.S9
-rw-r--r--sysdeps/powerpc/powerpc32/fpu/setjmp-common.S9
-rw-r--r--sysdeps/powerpc/powerpc32/memset.S10
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S9
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S8
-rw-r--r--sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S8
-rw-r--r--sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S8
-rw-r--r--sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S8
-rw-r--r--sysdeps/powerpc/powerpc32/power7/Makefile4
-rw-r--r--sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S9
-rw-r--r--sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S9
-rw-r--r--sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S9
-rw-r--r--sysdeps/powerpc/powerpc32/power7/strcasecmp.S132
-rw-r--r--sysdeps/powerpc/powerpc32/power7/strcasecmp_l.S5
-rw-r--r--sysdeps/powerpc/powerpc32/sysdep.h10
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/e_sqrt.c4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c4
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S68
-rw-r--r--sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S59
-rw-r--r--sysdeps/powerpc/powerpc64/power7/Makefile5
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strcasecmp.S125
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strcasecmp_l.S5
-rw-r--r--sysdeps/s390/bits/byteswap.h112
-rw-r--r--sysdeps/s390/fpu/e_sqrt.c5
-rw-r--r--sysdeps/s390/fpu/e_sqrtf.c5
-rw-r--r--sysdeps/s390/fpu/e_sqrtl.c5
-rw-r--r--sysdeps/s390/fpu/libm-test-ulps50
-rw-r--r--sysdeps/sh/backtrace.c1
-rw-r--r--sysdeps/sh/init-first.c6
-rw-r--r--sysdeps/sparc/sparc32/e_sqrt.c3
-rw-r--r--sysdeps/sparc/sparc64/fpu/e_sqrtl.c3
-rw-r--r--sysdeps/unix/clock_gettime.c2
-rw-r--r--sysdeps/unix/sysv/linux/Makefile68
-rw-r--r--sysdeps/unix/sysv/linux/Versions3
-rw-r--r--sysdeps/unix/sysv/linux/bits/uio.h27
-rw-r--r--sysdeps/unix/sysv/linux/check_pf.c179
-rw-r--r--sysdeps/unix/sysv/linux/clock_gettime.c18
-rw-r--r--sysdeps/unix/sysv/linux/futimes.c6
-rw-r--r--sysdeps/unix/sysv/linux/getsysstats.c2
-rw-r--r--sysdeps/unix/sysv/linux/init-first.c7
-rw-r--r--sysdeps/unix/sysv/linux/internal_statvfs.c8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/Makefile7
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S9
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S9
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S9
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S9
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S16
-rw-r--r--sysdeps/unix/sysv/linux/readonly-area.c4
-rw-r--r--sysdeps/unix/sysv/linux/s390/Makefile7
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/atomic.h50
-rw-r--r--sysdeps/unix/sysv/linux/sparc/Makefile6
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sys/epoll.h6
-rw-r--r--sysdeps/unix/sysv/linux/sys/epoll.h6
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/Makefile7
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/clock_gettime.c8
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/sys/epoll.h6
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/time.c9
-rw-r--r--sysdeps/x86_64/bits/byteswap.h18
-rw-r--r--sysdeps/x86_64/dl-machine.h12
-rw-r--r--sysdeps/x86_64/fpu/bits/fenv.h40
-rw-r--r--sysdeps/x86_64/fpu/bits/mathinline.h101
-rw-r--r--sysdeps/x86_64/fpu/dla.h17
-rw-r--r--sysdeps/x86_64/fpu/e_exp2l.S1
-rw-r--r--sysdeps/x86_64/fpu/e_fmodl.S1
-rw-r--r--sysdeps/x86_64/fpu/e_log10l.S27
-rw-r--r--sysdeps/x86_64/fpu/e_log2l.S25
-rw-r--r--sysdeps/x86_64/fpu/e_logl.S27
-rw-r--r--sysdeps/x86_64/fpu/e_powl.S34
-rw-r--r--sysdeps/x86_64/fpu/e_remainderl.S1
-rw-r--r--sysdeps/x86_64/fpu/e_scalbl.S8
-rw-r--r--sysdeps/x86_64/fpu/e_sqrt.c6
-rw-r--r--sysdeps/x86_64/fpu/e_sqrtf.c6
-rw-r--r--sysdeps/x86_64/fpu/feupdateenv.c4
-rw-r--r--sysdeps/x86_64/fpu/fraiseexcpt.c5
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps16
-rw-r--r--sysdeps/x86_64/fpu/math_private.h303
-rw-r--r--sysdeps/x86_64/fpu/multiarch/Makefile54
-rw-r--r--sysdeps/x86_64/fpu/multiarch/brandred-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/doasin-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/dosincos-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_asin-fma4.c11
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_asin.c23
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_atan2-avx.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c10
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_atan2.c24
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_exp-avx.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_exp.c24
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log-avx.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log-fma4.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_log.c25
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_pow-fma4.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/e_pow.c15
-rw-r--r--sysdeps/x86_64/fpu/multiarch/halfulp-fma4.c4
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpa-avx.c12
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpa-fma4.c12
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c10
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpexp-avx.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mplog-avx.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mplog-fma4.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/mptan-fma4.c7
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan-avx.c8
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_atan.c21
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceil-c.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceil.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceilf-c.c2
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_ceilf.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floor-c.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floor.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floorf-c.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_floorf.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fma.c (renamed from sysdeps/x86_64/multiarch/s_fma.c)22
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_fmaf.c (renamed from sysdeps/x86_64/multiarch/s_fmaf.c)22
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyint.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyintf-c.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rint-c.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rint.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rintf-c.c3
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_rintf.S40
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin-avx.c5
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c12
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_sin.c31
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan-avx.c6
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/s_tan.c21
-rw-r--r--sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c15
-rw-r--r--sysdeps/x86_64/fpu/multiarch/slowexp-avx.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c9
-rw-r--r--sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c11
-rw-r--r--sysdeps/x86_64/fpu/s_scalbln.c2
-rw-r--r--sysdeps/x86_64/fpu/s_scalbn.c9
-rw-r--r--sysdeps/x86_64/memrchr.S3
-rw-r--r--sysdeps/x86_64/multiarch/Makefile9
-rw-r--r--sysdeps/x86_64/multiarch/init-arch.c13
-rw-r--r--sysdeps/x86_64/multiarch/init-arch.h34
-rw-r--r--sysdeps/x86_64/multiarch/memcmp-sse4.S192
-rw-r--r--sysdeps/x86_64/multiarch/memcmp-ssse3.S1997
-rw-r--r--sysdeps/x86_64/multiarch/memcmp.S19
-rw-r--r--sysdeps/x86_64/multiarch/rawmemchr.S7
-rw-r--r--sysdeps/x86_64/multiarch/strcat-ssse3.S2
-rw-r--r--sysdeps/x86_64/multiarch/strcmp-sse42.S1791
-rw-r--r--sysdeps/x86_64/multiarch/strcmp.S1828
-rw-r--r--sysdeps/x86_64/multiarch/strcpy-ssse3.S767
-rw-r--r--sysdeps/x86_64/multiarch/strlen-no-bsf.S313
-rw-r--r--sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S686
-rw-r--r--sysdeps/x86_64/multiarch/strlen.S2
-rw-r--r--sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S3
-rw-r--r--sysdeps/x86_64/multiarch/strnlen.S55
-rw-r--r--sysdeps/x86_64/multiarch/strstr.c46
-rw-r--r--sysdeps/x86_64/multiarch/wcscpy-c.c5
-rw-r--r--sysdeps/x86_64/multiarch/wcscpy-ssse3.S553
-rw-r--r--sysdeps/x86_64/multiarch/wcscpy.S43
-rw-r--r--sysdeps/x86_64/multiarch/wmemcmp-c.c9
-rw-r--r--sysdeps/x86_64/multiarch/wmemcmp-sse4.S4
-rw-r--r--sysdeps/x86_64/multiarch/wmemcmp-ssse3.S4
-rw-r--r--sysdeps/x86_64/multiarch/wmemcmp.S47
-rw-r--r--sysdeps/x86_64/strcmp.S6
-rw-r--r--sysdeps/x86_64/wcschr.S155
-rw-r--r--sysdeps/x86_64/wcscmp.S99
-rw-r--r--sysdeps/x86_64/wcslen.S239
-rw-r--r--sysdeps/x86_64/wcsrchr.S283
-rw-r--r--time/getdate.c6
-rw-r--r--time/tst-mktime2.c2
-rw-r--r--time/tzfile.c59
-rw-r--r--version.h4
-rw-r--r--wcsmbs/Makefile2
-rw-r--r--wcsmbs/test-wcschr.c2
-rw-r--r--wcsmbs/test-wcscpy.c2
-rw-r--r--wcsmbs/test-wcslen.c2
-rw-r--r--wcsmbs/test-wcsrchr.c2
-rw-r--r--wcsmbs/wcschr.c5
-rw-r--r--wcsmbs/wcscmp.c12
-rw-r--r--wcsmbs/wcslen.c9
-rw-r--r--wcsmbs/wmemcmp.c53
860 files changed, 37857 insertions, 20524 deletions
diff --git a/ChangeLog b/ChangeLog
index db3a61bb08..7a534b4732 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,1821 @@
+2011-12-30 Jakub Jelinek <jakub@redhat.com>
+
+ * posix/regex_internal.c (re_string_fetch_byte_case): Remove
+ pure attribute.
+
+2011-12-23 Ulrich Drepper <drepper@gmail.com>
+
+ * version.h (RELEASE): Bump for 2.15 release.
+ * include/features.h (__GLIBC_MINOR__): Bump to 15.
+
+ * sysdeps/x86_64/dl-machine.h: Fix typos in comments.
+ Patch by Marek Polacek <mpolacek@redhat.com>.
+
+ * bits/byteswap.h: Protect long long constants with __extension__.
+ * sysdeps/i386/bits/byteswap.h: Likewise.
+ * sysdeps/ia64/bits/byteswap.h: Likewise.
+ * sysdeps/s390/bits/byteswap.h: Likewise.
+ * sysdeps/x86_64/bits/byteswap.h: Likewise.
+
+2011-12-23 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ [BZ #13540]
+ * sysdeps/x86_64/multiarch/strcpy-ssse3.S: Fix overrun in
+ destination buffer.
+ * sysdeps/x86_64/multiarch/wcscpy-ssse3.S: Likewise.
+
+2011-12-23 Marek Polacek <polacek@redhat.com>
+
+ * elf/dl-addr.c (determine_info): Add inline keyword.
+ * elf/tst-auditmod4b.c (check_avx): Likewise.
+ * elf/tst-auditmod6b.c (check_avx): Likewise.
+ * elf/tst-auditmod6c.c (check_avx): Likewise.
+ * elf/tst-auditmod7b.c (check_avx): Likewise.
+
+2011-12-23 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/i386/fpu/bits/fenv.h (feraiseexcept): Also enable for
+ !__SSE_MATH__.
+
+2011-12-23 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ [BZ #13540]
+ * sysdeps/i386/i686/multiarch/wcscpy-ssse3.S: Fix wrong copying
+ processing for last bytes.
+
+2011-08-06 Bruno Haible <bruno@clisp.org>
+
+ [BZ #13061]
+ * iconvdata/cp1258.c (comp_table_data): Combine U+00A8 U+0301 to
+ U+0385, not to U+1FEE.
+
+ [BZ #13062]
+ * iconvdata/tcvn5712-1.c (comp_table_data): Remove useless and wrong
+ entry for U+00A5 U+0301.
+
+2011-12-22 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13166]
+ * inet/getnameinfo.c (getnameinfo): Return EAI_OVERFLOW if the
+ buffer for the output is too small.
+
+ * sysdeps/i386/fpu/bits/fenv.h [__SSE_MATH__]: Add feraiseexcept
+ optimization.
+
+ [BZ #13185]
+ * sysdeps/i386/fpu/fgetexcptflg.c (__fegetexceptflag): Also return
+ SSE flags if possible.
+
+2011-12-22 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ [BZ #13540]
+ * sysdeps/i386/i686/multiarch/strcpy-ssse3.S: Fix wrong copying
+ processing for last bytes.
+
+2011-12-22 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/Makefile (syscall-list-variants)
+ (syscall-list-default-options, syscall-list-default-condition)
+ (syscall-list-includes): Define.
+ ($(objpfx)syscall-%.h $(objpfx)syscall-%.d): Support arbitrary
+ list of ABIs and options and #if conditions for each ABI. Do not
+ handle common syscalls between ABIs specially.
+ * sysdeps/unix/sysv/linux/powerpc/Makefile (64bit-predefine):
+ Remove.
+ (syscall-list-variants, syscall-list-32bit-options)
+ (syscall-list-32bit-condition, syscall-list-64bit-options)
+ (syscall-list-64bit-condition): Define.
+ * sysdeps/unix/sysv/linux/s390/Makefile (64bit-predefine): Remove.
+ (syscall-list-variants, syscall-list-32bit-options)
+ (syscall-list-32bit-condition, syscall-list-64bit-options)
+ (syscall-list-64bit-condition): Define.
+ * sysdeps/unix/sysv/linux/sparc/Makefile (64bit-predefine):
+ Remove.
+ (syscall-list-variants, syscall-list-32bit-options)
+ (syscall-list-32bit-condition, syscall-list-64bit-options)
+ (syscall-list-64bit-condition): Define.
+ * sysdeps/unix/sysv/linux/x86_64/Makefile (64bit-predefine):
+ Remove.
+ (syscall-list-variants, syscall-list-32bit-options)
+ (syscall-list-32bit-condition, syscall-list-64bit-options)
+ (syscall-list-64bit-condition): Define.
+
+2011-12-22 Ulrich Drepper <drepper@gmail.com>
+
+ * locale/iso-639.def: Add brx entry.
+
+ [BZ #13328]
+ * malloc/mtrace.c (tr_freehook): Avoid unnecessary unlock/lock.
+ Proposed by Mariusz_Cukr <marcukr@op.pl>.
+
+ * sysdeps/x86_64/fpu/bits/fenv.h: Use __REDIRECT_NTH for
+ __feraiseexcept_renamed.
+
+2011-12-21 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13538]
+ * sysdeps/unix/sysv/linux/sys/epoll.h: Initialize EPOLLONESHOT and
+ EPOLLET with unsigned values.
+ * sysdeps/unix/sysv/linux/x86_64/sys/epoll.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sys/epoll.h: Likewise.
+
+ * math/s_cacosh.c: Use Kahan's formula if the subtraction could lead
+ to large cancellation.
+ * math/s_cacoshf.c: Likewise.
+ * math/s_cacoshl.c: Likewise.
+
+2011-11-18 Richard B. Kreckel <kreckel@ginac.de>
+
+ [BZ #13305]
+ [BZ #12786]
+ * math/s_cacosh.c: Fix rare miscomputation in cacosh().
+ * math/s_cacoshf.c: Likewise.
+ * math/s_cacoshl.c: Likewise.
+
+2011-12-21 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13439]
+ * iconv/gconv.h: Define __GCONV_SWAP.
+ * iconvdata/unicode.c: The swap bit must be stored in __flags.
+ * iconvdata/utf-16.c: Likewise.
+ * iconvdata/utf-32.c: Likewise.
+
+2011-12-21 Andreas Schwab <schwab@linux-m68k.org>
+
+ [BZ #13524]
+ * stdlib/strtod_l.c (____STRTOF_INTERNAL): Clear lowest limb of
+ numerator after shifting it by one limb.
+
+2011-12-19 Rafael Ãvila de Espíndola <rafael.espindola@gmail.com>
+
+ * sysdeps/x86_64/fpu/bits/fenv.h (feraiseexcept): Define it only
+ under [__USE_EXTERN_INLINES].
+
+2011-12-17 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13446]
+ * stdio-common/vfprintf.c (vfprintf): Fix extension of specs array.
+
+2011-11-22 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * sysdeps/powerpc/Makefile: Added locale-defines.sym generation.
+ * sysdeps/powerpc/locale-defines.sym: Locale definitions for strcasecmp
+ optimized code.
+ * sysdeps/powerpc/powerpc32/power7/Makefile: New file.
+ * sysdeps/powerpc/powerpc32/power7/strcasecmp.S: New file.
+ * sysdeps/powerpc/powerpc32/power7/strcasecmp_l.S: New file.
+ * sysdeps/powerpc/powerpc64/power7/Makefile: Added unroll-loop option
+ for strncasecmp/strncasecmp_l compilation.
+ * sysdeps/powerpc/powerpc64/power7/strcasecmp.S: New file.
+ * sysdeps/powerpc/powerpc64/power7/strcasecmp_l.S: New file.
+
+2011-12-08 Marek Polacek <mpolacek@redhat.com>
+
+ [BZ #13484]
+ * math/bits/math-finite.h: Use __REDIRECT_NTH and __NTH instead
+ of __asm__.
+
+2011-12-17 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13506]
+ * time/tzfile.c (__tzfile_read): Check values from file header.
+
+2011-11-21 Will Schmidt <will_schmidt@vnet.ibm.com>
+
+ * powerpc/powerpc32/sysdep.h: Define SETUP_GOT_ACCESS() macro.
+ * powerpc/powerpc32/a2/memcpy.S: Use SETUP_GOT_ACCESS() macro.
+ * powerpc/powerpc32/dl-start.S: Likewise.
+ * powerpc/powerpc32/elf/start.S: Likewise.
+ * powerpc/powerpc32/fpu/__longjmp-common.S: Likewise.
+ * powerpc/powerpc32/fpu/s_ceil.S: Likewise.
+ * powerpc/powerpc32/fpu/s_ceilf.S: Likewise.
+ * powerpc/powerpc32/fpu/s_floor.S: Likewise.
+ * powerpc/powerpc32/fpu/s_floorf.S: Likewise.
+ * powerpc/powerpc32/fpu/s_lround.S: Likewise.
+ * powerpc/powerpc32/fpu/s_rint.S: Likewise.
+ * powerpc/powerpc32/fpu/s_rintf.S: Likewise.
+ * powerpc/powerpc32/fpu/s_round.S: Likewise.
+ * powerpc/powerpc32/fpu/s_roundf.S: Likewise.
+ * powerpc/powerpc32/fpu/s_trunc.S: Likewise.
+ * powerpc/powerpc32/fpu/s_truncf.S: Likewise.
+ * powerpc/powerpc32/fpu/setjmp-common.S: Likewise.
+ * powerpc/powerpc32/memset.S: Likewise.
+ * powerpc/powerpc32/power4/fpu/s_llround.S: Likewise.
+ * powerpc/powerpc32/power4/fpu/w_sqrt.S: Likewise.
+ * powerpc/powerpc32/power4/fpu/w_sqrtf.S: Likewise.
+ * powerpc/powerpc32/power5/fpu/w_sqrt.S: Likewise.
+ * powerpc/powerpc32/power5/fpu/w_sqrtf.S: Likewise.
+ * powerpc/powerpc32/power7/fpu/s_finite.S: Likewise.
+ * powerpc/powerpc32/power7/fpu/s_isinf.S: Likewise.
+ * powerpc/powerpc32/power7/fpu/s_isnan.S: Likewise.
+ * unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S: Likewise.
+ * unix/sysv/linux/powerpc/powerpc32/brk.S: Likewise.
+ * unix/sysv/linux/powerpc/powerpc32/getcontext-common.S: Likewise.
+ * unix/sysv/linux/powerpc/powerpc32/setcontext-common.S: Likewise.
+ * unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S: Likewise.
+
+2011-11-18 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * math/libm-test.inc: Added more nearbyint tests.
+ * sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S: New file.
+ * sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S: New file.
+ * sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S: New file.
+ * sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S: New file.
+
+2011-11-21 Ross Lagerwall <rosslagerwall@gmail.com>
+
+ * resolv/res_init.c (__res_vinit): Open /etc/resolv.conf with
+ FD_CLOEXEC.
+
+2011-11-14 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/x86_64/multiarch/Makefile [subdir=wcsmbs] (sysdep_routines):
+ Add wcscpy-ssse3 wcscpy-c.
+ * sysdeps/x86_64/multiarch/wcscpy-ssse3.S: New file.
+ * sysdeps/x86_64/multiarch/wcscpy-c.c: New file.
+ * sysdeps/x86_64/multiarch/wcscpy.S: New file.
+ * sysdeps/x86_64/wcschr.S: New file.
+ * sysdeps/x86_64/wcsrchr.S: New file.
+ * string/test-strcmp.c: Remove checking of wcscmp function for
+ wrong alignments.
+ * sysdeps/i386/i686/multiarch/Makefile [subdir=wcsmbs]
+ (sysdep_routines): Add wcscpy-ssse3 wcscpy-c wcschr-sse2 wcschr-c
+ wcsrchr-sse2 wcsrchr-c.
+ * sysdeps/i386/i686/multiarch/wcschr.S: New file.
+ * sysdeps/i386/i686/multiarch/wcschr-c.c: New file.
+ * sysdeps/i386/i686/multiarch/wcschr-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/wcsrchr.S: New file.
+ * sysdeps/i386/i686/multiarch/wcsrchr-c.c: New file.
+ * sysdeps/i386/i686/multiarch/wcsrchr-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/wcscpy.S: New file.
+ * sysdeps/i386/i686/multiarch/wcscpy-c.c: New file.
+ * sysdeps/i386/i686/multiarch/wcscpy-ssse3.S: New file.
+ * wcsmbc/wcschr.c (WCSCHR): New macro.
+
+2011-11-17 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * wcsmbs/Makefile (strop-tests): Add wcsrchr wcscpy.
+ * wcsmbs/test-wcsrchr.c: New file.
+ * string/test-strrchr.c: Add wcsrchr support.
+ (WIDE): New macro.
+ * wcsmbs/test-wcscpy.c: New file.
+ * string/test-strcpy.c: Add wcscpy support.
+ (WIDE): New macro.
+
+2011-12-10 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/generic/dl-hash.h (_dl_elf_hash): Lift one operation out of
+ the inner loop.
+
+2011-12-06 Andreas Schwab <schwab@linux-m68k.org>
+
+ [BZ #13472]
+ * sysdeps/powerpc/fpu/e_hypot.c (twoM600): Correct value.
+
+2011-12-04 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/generic/dl-hash.h (_dl_elf_hash): Fix attribute.
+ Minor optimizations.
+
+ * sunrpc/clnt_unix.c (clntunix_control): Fix aliasing issues.
+ * sunrpc/clnt_tcp.c (clnttcp_control): Likewise.
+ * sunrpc/clnt_udp.c (clntudp_call): Likewise.
+
+2011-12-03 Ulrich Drepper <drepper@gmail.com>
+
+ * inet/netinet/in.h: Provide versions of IN6_IS_ADDR_UNSPECIFIED,
+ IN6_IS_ADDR_LOOPBACK, IN6_IS_ADDR_LINKLOCAL, IN6_IS_ADDR_SITELOCAL,
+ IN6_IS_ADDR_V4MAPPED, IN6_IS_ADDR_V4COMPAT, and IN6_ARE_ADDR_EQUAL
+ for gcc to avoid warnings.
+ * inet/Makefile (tests): Add tst-checks.
+ * inet/tst-checks.c: New file.
+
+ * sysdeps/generic/dl-hash.h (_dl_elf_hash): Add attribute to avoid
+ warning.
+
+ * sysdeps/x86_64/multiarch/wmemcmp-c.c: Provide prototype for
+ __wmemcmp_sse2.
+
+ * sysdeps/x86_64/fpu/s_scalbln.c: Removed.
+ * sysdeps/x86_64/fpu/s_scalbn.c: Removed.
+
+ * malloc/mcheck.h: Fix use of incorrect encoding in comment.
+
+2011-12-02 Ulrich Drepper <drepper@gmail.com>
+
+ * nis/nis_findserv.c (__nis_findfastest_with_timeout): Avoid aliasing
+ problem.
+
+ * nscd/aicache.c (addhstaiX): Avoid unused variable warning.
+
+2011-11-29 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/sh/bits/atomic.h (rNOSP): Define
+ conditional on GCC version.
+ (__arch_compare_and_exchange_val_8_acq)
+ (__arch_compare_and_exchange_val_16_acq)
+ (__arch_compare_and_exchange_val_32_acq, atomic_exchange_and_add)
+ (atomic_add, atomic_add_negative, atomic_add_zero, atomic_bit_set)
+ (atomic_bit_test_set): Use rNOSP instead of "r" constraints.
+
+2011-12-02 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/sh/backtrace.c: New file.
+
+2011-12-02 Andreas Schwab <schwab@redhat.com>
+
+ * misc/bits/select2.h (__FD_ELT): Mark as extension. Add
+ parenthesis.
+
+2011-12-01 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/unix/sysv/linux/futimes.c: Truncate time values when
+ falling back to utime.
+
+2011-11-30 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/s390/fpu/libm-test-ulps: Relax cpow (2 + 3 i, 4 + 0 i)
+ expectations for float.
+
+2011-11-29 Andreas Schwab <schwab@redhat.com>
+
+ * locale/weight.h (findidx): Add parameter len.
+ * locale/weightwc.h (findidx): Likewise.
+ * posix/fnmatch_loop.c (FCT): Adjust caller.
+ * posix/regcomp.c (build_equiv_class): Likewise.
+ * posix/regex_internal.h (re_string_elem_size_at): Likewise.
+ * posix/regexec.c (check_node_accept_bytes): Likewise.
+ * string/strcoll_l.c (STRCOLL): Likewise.
+ * string/strxfrm_l.c (STRXFRM): Likewise.
+
+2011-11-17 Ulrich Drepper <drepper@gmail.com>
+
+ * Makefile.in: Remove CVSOPT handling.
+ * configure.in: Remove use of AC_REVISION.
+ * iconvdata/Makefile (distribute): No need to filter out CVS.
+ * scripts/list-sources.sh: Remove CVS, subversion and monotone
+ handling.
+
+2011-11-16 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/i386/i686/multiarch/strcmp-ssse3.S
+ [USE_AS_STRCASECMP_L]: Fix argument offsets for non-PIC.
+ [USE_AS_STRNCASECMP_L]: Likewise.
+ (__strcasecmp_ssse3, __strncasecmp_ssse3): Handle
+ NO_TLS_DIRECT_SEG_REFS.
+ * sysdeps/i386/i686/multiarch/strcmp-sse4.S [USE_AS_STRCASECMP_L]:
+ Fix argument offsets for non-PIC.
+ [USE_AS_STRNCASECMP_L]: Likewise.
+ (__strcasecmp_sse4_2, __strncasecmp_sse4_2): Handle
+ NO_TLS_DIRECT_SEG_REFS.
+
+2011-11-15 Ulrich Drepper <drepper@gmail.com>
+
+ * locale/loadarchive.c (_nl_load_locale_from_archive): Open files with
+ O_CLOEXEC.
+ * locale/loadlocale.c (_nl_load_locale): Likewise.
+
+2011-11-15 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/unix/sysv/linux/clock_gettime.c (SYSDEP_GETTIME_CPU)
+ [__ASSUME_POSIX_CPU_TIMERS > 0]: Assign to retval and break.
+ * sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
+ (SYSCALL_GETTIME): Set errno on error.
+
+ * sysdeps/unix/sysv/linux/check_pf.c (make_request): Properly
+ count references to noai6ai_cached.
+
+2011-11-15 Ulrich Drepper <drepper@gmail.com>
+
+ * time/getdate.c (__getdate_r): Set FD_CLOEXEC for given file.
+
+ * sysdeps/unix/sysv/linux/readonly-area.c (__readonly_area): Set
+ FD_CLOEXEC for /proc/self/maps.
+
+ * sysdeps/unix/sysv/linux/getsysstats.c (phys_pages_info): Set
+ FD_CLOEXEC for /proc/meminfo.
+
+ * sysdeps/posix/getaddrinfo.c (gaiconf_init): Set FD_CLOEXEC for
+ gai.conf.
+
+ * resolv/res_query.c (res_hostalias): Don't allow cancellation and set
+ FD_CLOEXEC for given file.
+
+ * resolv/res_hconf.c (do_init): Set FD_CLOEXEC for host.conf.
+
+ * resolv/gethnamaddr.c (_sethtent): Don't allow cancellation and set
+ FD_CLOEXEC for /etc/hosts.
+ (_gethtent): Likewise.
+
+ * nss/nsswitch.c (nss_parse_file): Set FD_CLOEXEC.
+
+ * nss/nss_files/files-netgrp.c (_nss_files_setnetgrent): Don't allow
+ cancellation and set FD_CLOEXEC for /etc/netgroup.
+
+ * nss/nss_files/files-key.c (search): Don't allow cancellation when
+ reading /etc/publickey.
+
+ * nss/nss_files/files-initgroups.c (_nss_files_initgroups_dyn): Don't
+ allow cancellation when reading /etc/group.
+
+ * nss/nss_files/files-alias.c (internal_setent): Don't allow
+ cancellation.
+ (get_next_alias): Likewise for included file. Also set FD_CLOEXEC.
+
+ * nss/nss_files/files-XXX.c (internal_setent): Don't allow cancellation
+ when using data file.
+
+ * nis/nss-default.c (init): Set FD_CLOEXEC for /etc/default/nss.
+
+ * nis/nis_file.c (read_nis_obj): Set FD_CLOEXEC.
+ (write_nis_obj): Use "c" and "e" in fopen.
+
+ * misc/mntent_r.c (__setmntent): Also append e to fopen format.
+
+ * misc/getusershell.c (initshells): Set FD_CLOEXEC for /etc/shells.
+
+ * misc/getttyent.c (setttyent): Set FD_CLOEXEC.
+
+ * misc/getpass.c (getpass): Set FD_CLOEXEC for /dev/tty.
+
+ * intl/localealias.c (read_alias_file): Set FD_CLOEXEC for
+ locale.alias.
+
+ * inet/ruserpass.c (ruserpass): Set FD_CLOEXEC for .netrc.
+
+ * inet/rcmd.c (iruserfopen): Set FD_CLOEXEC for hosts.equiv.
+
+ * iconv/gconv_conf.c (read_conf_file): Set FD_CLOEXEC for config file.
+
+ * hesiod/hesiod.c (parse_config_file): Prevent cancellation in config
+ file parsing and set FD_CLOEXEC.
+
+2011-11-14 Ulrich Drepper <drepper@gmail.com>
+
+ * time/tzfile.c (__tzfile_read): Use "e" in fopen call.
+
+2011-11-14 Andreas Schwab <schwab@redhat.com>
+
+ * malloc/arena.c (arena_get2): Don't call reused_arena when
+ _int_new_arena failed.
+
+2011-11-14 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/i386/i686/multiarch/Makefile [subdir=string]
+ (sysdep_routines): Add strcasecmp_l-sse4 and strncase_l-sse4.
+ * sysdeps/i386/i686/multiarch/strcasecmp.S: Re-enable SSE4.2 code.
+ * sysdeps/i386/i686/multiarch/strcmp.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strncase.S: Likewise.
+ * sysdeps/i386/i686/multiarch/strcmp-sse4.S: Change to allow reuse
+ to compile strcasecmp and strncasecmp.
+ * sysdeps/i386/i686/multiarch/strcasecmp_l-sse4.S: New file.
+ * sysdeps/i386/i686/multiarch/strncase_l-sse4.S: New file.
+
+ * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Use L macro consistently.
+
+2011-11-13 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/i386/i686/multiarch/Makefile [subdir=string]: Add
+ locale-defines.sym to gen-as-const-headers.
+ (sysdep_routines): Add strcasecmp_l-c, strcasecmp-c,
+ strcasecmp_l-ssse3, strncase_l-c, strncase-c, and strncase_l-ssse3.
+ * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Change to allow reuse
+ to compile strcasecmp and strncasecmp.
+ * sysdeps/i386/i686/multiarch/strcmp.S: Allow to use for
+ strcasecmp_l and strncasecmp_l.
+ * sysdeps/i386/i686/multiarch/locale-defines.sym: New file.
+ * sysdeps/i386/i686/multiarch/strcasecmp-c.c: New file.
+ * sysdeps/i386/i686/multiarch/strcasecmp.S: New file.
+ * sysdeps/i386/i686/multiarch/strcasecmp_l-c.c: New file.
+ * sysdeps/i386/i686/multiarch/strcasecmp_l-ssse3.S: New file.
+ * sysdeps/i386/i686/multiarch/strcasecmp_l.S: New file.
+ * sysdeps/i386/i686/multiarch/strncase-c.c: New file.
+ * sysdeps/i386/i686/multiarch/strncase.S: New file.
+ * sysdeps/i386/i686/multiarch/strncase_l-c.c: New file.
+ * sysdeps/i386/i686/multiarch/strncase_l-ssse3.S: New file.
+ * sysdeps/i386/i686/multiarch/strncase_l.S: New file.
+
+2011-11-12 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/unix/clock_gettime.c (clock_gettime): No need to assign
+ result of SYSDEP_GETTIME_CPU to retval.
+ * sysdeps/unix/sysv/linux/clock_gettime.c (SYSDEP_GETTIME_CPU): Add
+ parameter list to macro. Remove trailing semicolon. Adjust users.
+
+ * resolv/getaddrinfo_a.c (getaddrinfo_a): Avoid warning about unused
+ variable.
+
+ * sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l): Avoid storing
+ mantissa words.
+ * sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Likewise.
+
+ * sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Avoid warning
+ from unused variable.
+
+ * sysdeps/generic/sysdep.h: Clean up, pretty print, use dwarf2.h for
+ DWARF definitions.
+ * sysdeps/generic/dwarf2.h: Don't define enums when using the file
+ for assembling.
+
+ * elf/dl-iteratephdr.c [!SHARED] (__dl_iterate_phdr): Don't iterate
+ over namespaces.
+
+ * sunrpc/rpc_prot.c (rejected): Fix case value.
+
+ * sysdeps/unix/sysv/linux/internal_statvfs.c (INTERNAL_STATVFS): Use
+ unsigned long long int to avoid warnings in shift.
+
+ * posix/regex_internal.c (re_string_reconstruct): Actually use result
+ of use of trans.
+ * posix/regex_internal.h (re_string_wchar_at): Remove temporary
+ variable tmp.
+
+ * sysdeps/i386/i686/multiarch/wcscmp-c.c: Avoid warning.
+ * sysdeps/i386/i686/multiarch/wcslen-c.c: Likewise.
+ * sysdeps/i386/i686/multiarch/wmemcmp-c.c: Likewise.
+
+ * nis/nis_table.c (nis_list): Use variable of correct type for
+ result of __follow_path call.
+
+2011-11-07 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * sysdeps/powerpc/fpu/math_private.h: Using inline assembly version
+ of math functions ceil, trunc, floor, round, and sqrt, when
+ avaliable on the platform.
+ * sysdeps/powerpc/fpu/e_sqrt.c: Undefine __ieee754_sqrt to avoid
+ name clash.
+ * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
+ * sysdeps/powerpc/powerpc64/fpu/e_sqrt.c: Likewise.
+ * sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c: Likewise.
+
+2011-10-30 Marek Polacek <mpolacek@redhat.com>
+
+ * libio/wfileops.c (_IO_wfile_underflow_mmap): Remove unused variable.
+ * sysdeps/ieee754/dbl-64/mpsqrt.c (__mpsqrt): Likewise.
+
+2011-11-11 Roland McGrath <roland@hack.frob.com>
+
+ * include/unistd.h: Fix __readlink return type.
+ Reported by Chris Metcalf <cmetcalf@tilera.com>.
+
+2011-11-11 Ulrich Drepper <drepper@gmail.com>
+
+ * stdlib/ucontext.h: Undo last change for makecontext.
+
+2011-11-11 Andreas Schwab <schwab@redhat.com>
+
+ * nss/db-Makefile ($(VAR_DB)/group.db): Fix typo in awk script.
+
+ * misc/sys/cdefs.h (__REDIRECT_NTHNL): Define.
+ * setjmp/setjmp.h: Mark functions as non-leaf.
+ * setjmp/bits/setjmp2.h: Likewise.
+ * stdlib/ucontext.h: Likewise.
+
+2011-11-10 Andreas Schwab <schwab@redhat.com>
+
+ * malloc/arena.c (_int_new_arena): Don't increment narenas.
+ (reused_arena): Don't check arena limit.
+ (arena_get2): Atomically check arena limit.
+
+2011-11-08 Ulrich Drepper <drepper@gmail.com>
+
+ * locale/findlocale.c (_nl_find_locale): Use __strcasecmp_l.
+ * intl/localealias.c (strcasecmp): Define using __strcasecmp_l.
+
+ * sysdeps/i386/i686/multiarch/strcmp-ssse3.S: Remove unnecessary
+ instructions.
+
+2011-11-07 Andreas Schwab <schwab@redhat.com>
+
+ * libio/genops.c (_IO_flush_all_lockp): Only register cleanup
+ handler when locking.
+
+ * nss/nss_files/files-initgroups.c (_nss_files_initgroups_dyn):
+ Fix size of allocated buffer.
+
+2011-11-04 Andreas Schwab <schwab@redhat.com>
+
+ [BZ #10103]
+ * math/math.h [__NO_LONG_DOUBLE_MATH && !_LIBC]: Provide
+ declarations for long double functions.
+ * math/complex.h [__NO_LONG_DOUBLE_MATH && !_LIBC]: Likewise.
+
+ * elf/sprof.c (load_shobj): Fix off-by-one when reading link name.
+
+2011-11-03 Andreas Schwab <schwab@redhat.com>
+
+ * nscd/nscd.c (main): Don't start AVC thread until credentials are
+ installed.
+
+ * nss/makedb.c (set_file_creation_context): Do nothing if SELinux
+ is disabled.
+
+2011-11-02 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * bits/ioctl-types.h (_IOT_sgttyb): Set number of chars to 4.
+
+2011-11-01 Andreas Schwab <schwab@linux-m68k.org>
+
+ * include/alloca.h (stackinfo_alloca_round): Define.
+ (extend_alloca): Use it.
+ [_STACK_GROWS_UP]: Correct check for adjacent allocation.
+ * elf/dl-deps.c (_dl_map_object_deps): Don't round alloca size
+ here.
+
+ * scripts/check-local-headers.sh: Ignore libaudit.h.
+
+ * nscd/Makefile (extra-objs): Make recursively expanded.
+
+2011-11-01 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/strcmp.S: Fix test for non-ASCII locales.
+ * sysdeps/x86_64/multiarch/strcmp-sse42.S: Likewise.
+
+ * posix/tst-rfc3484.c: Add missing __free_in6ai dummy function.
+ * posix/tst-rfc3484-2.c: Likewise.
+ * posix/tst-rfc3484-3.c: Likewise.
+
+ * sysdeps/unix/sysv/linux/bits/uio.h: Declare process_vm_readv and
+ process_vm_writev.
+ * sysdeps/unix/sysv/linux/syscalls.list: Add process_vm_readv and
+ process_vm_writev.
+ * sysdeps/unix/sysv/linux/Versions: Export process_vm_readv and
+ process_vm_writev from libc using GLIBC_2.15 version.
+
+ * nscd/connections.c: Use kernel headers instead of <netlink/netlink.h>.
+
+2011-10-31 Paul Pluzhnikov <ppluzhnikov@google.com>
+
+ * elf/dl-deps.c (_dl_map_object_deps): Reuse alloca space to reduce
+ stack usage.
+
+2011-10-31 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13367]
+ * nss/getent.c (initgroups_keys): Show error message in case no group
+ names are given.
+
+ * include/ifaddrs.h: Declare __free_in6ai and __bump_nl_timestamp.
+ * inet/check_pf.c: Provide dummy versions of __free_in6ai and
+ __bump_nl_timestamp.
+ * nscd/connections (nscd_init): When host database is served open
+ netlink socket and request notification about configuration changes.
+ (main_loop_poll): Track netlink file descriptor and bump timestamp
+ in case data becomes available.
+ (main_loop_epoll): Likewise.
+ * nscd/nscd-client.h (DB_VERSION): Bump to 2.
+ (database_pers_head): Add extra_data fileds.
+ Declare __nscd_get_mapping and __nscd_get_nl_timestamp.
+ * nscd/nscd_gethst_r.c (__nscd_get_nl_timestamp): New function.
+ * nscd/nscd_helper.c (__nscd_get_mapping): Renamed from get_mapping.
+ Adjust caller.
+ * sysdeps/posix/getaddrinfo.c (getaddrinfo): Don't call free on
+ in6ai data, call __free_in6ai.
+ * sysdeps/unix/sysv/linux/Makefile [subdir=nscd] (sysdep-CFLAGS):
+ Add -DHAVE_NETLINK.
+ * sysdeps/unix/sysv/linux/check_pf.c: Major rewrite. Cache the
+ interface information. Reuse previous data if netlink timestamp
+ is not changed.
+ (__bump_nl_timestamp): New function.
+ (__free_in6ai): New function.
+
+2011-10-30 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/unix/sysv/linux/check_pf.c (make_request): Don't call
+ close_not_cancel_no_status here.
+ (__check_pf): Reorganize code a bit to not call close twice if OOM.
+
+2011-10-29 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13276]
+ * malloc/malloc.c (munmap_chunk): Don't use assertion to check munmap
+ return value.
+
+ * posix/sys/wait.h: Mark wait3 and wait4 with __THROWNL.
+ * libio/stdio.h: Mark sprintf, vsprintf snprintf, vsnprintf, vasprintf,
+ asprintf, __asprintf, obstack_printf, obstack_vprintf with __THROWNL.
+
+2011-07-03 Andreas Jaeger <aj@suse.de>
+
+ [BZ #10709]
+ * sysdeps/ieee754/dbl-64/s_sin.c (__sin): Fix incorrect rounding
+ of sin. Patch suggested by Paul Zimmermann <zimmerma+gcc@loria.fr>.
+ * math/libm-test.inc (sin_test): Add test case.
+
+2011-10-29 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13337]
+ * elf/sprof.c (load_shobj): Correctly NUL-terminate link name.
+ Patch by Thomas Jarosch <thomas.jarosch@intra2net.com>.
+
+ * elf/chroot_canon.c (chroot_canon): Cleanups.
+
+ * elf/dl-lookup.c (_dl_setup_hash): Avoid warning.
+
+ [BZ #13335]
+ * elf/chroot_canon.c (chroot_canon): Fix readlink call.
+ Patch by Thomas Jarosch <thomas.jarosch@intra2net.com>.
+
+ * string/test-strchr.c: Make usable for strchrnul testing.
+ * string/test-strchrnul.c: New file.
+ * string/Makefile (strop-tests): Add strchrnul.
+
+ * po/it.po: Update from translation team.
+ * po/es.po: Likewise.
+
+2011-10-28 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/multiarch/strstr.c (__m128i_strloadu_tolower): Take
+ the three constants needed as parameters. Drop the others.
+ (strcasestr_sse42): Load uclow, uchigh, and lcqword and pass to
+ __m128i_strloadu_tolower.
+ Create and initialize variable zero and use it in all the places
+ where _mm_setzero_si128 was used.
+
+ * sysdeps/x86_64/fpu/multiarch/Makefile: Don't build brandred-avx.c,
+ doasin-avx.c, dosincos-avx.c, e_asin-avx.c, mpatan-avx.c,
+ mpatan2-avx.c, mpsqrt-avx.c, mptan-avx.c, sincos32-avx.c.
+ * sysdeps/x86_64/fpu/multiarch/e_asin.c: There are no _avx variants
+ anymore.
+ * sysdeps/x86_64/fpu/multiarch/e_atan2-avx.c: Don't redirect __mpatan2.
+ * sysdeps/x86_64/fpu/multiarch/s_atan-avx.c: Don't redirect __mpatan.
+ * sysdeps/x86_64/fpu/multiarch/s_sin-avx.c: Don't redirect __branred,
+ __docos, __dubsin, __mpcos, __mpcos1, __mpsin, __mpsin1.
+ * sysdeps/x86_64/fpu/multiarch/s_tan-avx.c: Don't redirect __branred,
+ __mpranred, __mptan.
+ * sysdeps/x86_64/fpu/multiarch/brandred-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/doasin-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/dosincos-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/e_asin-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/mpatan-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/mpatan2-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/mpsqrt-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/mptan-avx.c: Removed.
+ * sysdeps/x86_64/fpu/multiarch/sincos32-avx.c: Removed.
+
+2011-10-28 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/i386/i686/multiarch/strnlen-c.c (libc_hidden_def): Only
+ redefine if SHARED.
+ * sysdeps/i386/i686/multiarch/wcscmp-c.c (libc_hidden_def): Likewise.
+
+ * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Move
+ wide char related routines to wcsmbs subdir.
+
+2011-10-27 Andreas Schwab <schwab@redhat.com>
+
+ [BZ #13344]
+ * misc/sys/cdefs.h (__THROWNL): Define.
+ * posix/unistd.h: Use __THREADNL instead of __THREAD
+ for memory synchronization functions.
+
+2011-10-26 Roland McGrath <roland@hack.frob.com>
+
+ [BZ #13349]
+ * libio/Versions (GLIBC_2.0): Remove open_obstack_stream, which
+ doesn't exist.
+ * manual/stdio.texi (Obstack Streams): Node removed.
+
+2011-10-26 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/ieee754/flt-32/e_j0f.c: Fix use of math_force_eval.
+ * sysdeps/ieee754/dbl-64/s_round.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_roundf.c: Likewise.
+
+ * math/math_private.h (math_force_eval): Allow non-addressable
+ arguments.
+ * sysdeps/i386/fpu/math_private.h (math_force_eval): Likewise.
+
+2011-10-25 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/ieee754/dbl-64/e_rem_pio2.c: Comment everything out, the
+ file is not needed.
+
+ * sysdeps/x86_64/fpu/multiarch/e_asin.c: Support AVX variants.
+ * sysdeps/x86_64/fpu/multiarch/e_atan2.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/e_exp.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/e_log.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_atan.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_sin.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_tan.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/Makefile: Fix some CFLAGS-* variables.
+ Add AVX variants.
+ * sysdeps/x86_64/fpu/multiarch/brandred-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/doasin-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/dosincos-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_asin-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_atan2-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_exp-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_log-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpa-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpatan-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpatan2-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpexp-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mplog-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpsqrt-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mptan-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_atan-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_sin-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_tan-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/sincos32-avx.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/slowexp-avx.c: New file.
+
+ * sysdeps/x86_64/multiarch/init-arch.h: Make bit_* macros available
+ all the time. Define bit_AVX. Define HAS_* macros using bit_* macros.
+
+ * sysdeps/x86_64/multiarch/strcmp-sse42.S: Move common code to earlier
+ place. Use VEX encoding when compiling for AVX.
+
+2011-10-25 Andreas Schwab <schwab@redhat.com>
+
+ * wcsmbs/wcscmp.c (WCSCMP): Compare as wchar_t, not wint_t.
+ * wcsmbs/wmemcmp.c (WMEMCMP): Likewise.
+
+ * string/test-strchr.c (do_test): Don't generate NUL bytes.
+
+2011-10-25 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/ieee754/dbl-64/e_atanh.c: Use math_force_eval instead of a
+ useless if() expression.
+ * sysdeps/ieee754/dbl-64/e_j0.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_ceil.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_expm1.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_floor.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_log1p.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_round.c: Likewise.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Likewise.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c: Likewise.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_round.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_atanhf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_j0f.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_ceilf.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_expm1f.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_floorf.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_log1pf.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_roundf.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_atanhl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_j0l.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/s_roundl.c: Likewise.
+
+ * sysdeps/x86_64/fpu/math_private.h: Use VEX encoding when possible.
+
+2011-10-25 Andreas Schwab <schwab@redhat.com>
+
+ * elf/dl-deps.c (_dl_map_object_deps): Remove always true
+ condition.
+ * elf/dl-fini.c (_dl_sort_fini): Likewise.
+
+2011-10-25 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/ieee754/dbl-64/branred.c: Move FMA4 code into separate
+ .text section. Avoid duplicate constants.
+ * sysdeps/ieee754/dbl-64/doasin.c: Likewise.
+ * sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_asin.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
+ * sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/mpa.c: Likewise.
+ * sysdeps/ieee754/dbl-64/mpa.h: Likewise.
+ * sysdeps/ieee754/dbl-64/mpatan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/mpatan.h: Likewise.
+ * sysdeps/ieee754/dbl-64/mpatan2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/mpexp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/mpexp.h: Likewise.
+ * sysdeps/ieee754/dbl-64/mpsqrt.c: Likewise.
+ * sysdeps/ieee754/dbl-64/mpsqrt.h: Likewise.
+ * sysdeps/ieee754/dbl-64/mptan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_sin.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/sincos32.c: Likewise.
+ * sysdeps/ieee754/dbl-64/slowexp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/slowpow.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/brandred-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/doasin-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/dosincos-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/e_asin-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/e_log-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/e_pow-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/halfulp-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/mpa-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/mplog-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/mptan-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c: Likewise.
+
+2011-10-24 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/dla.h: Move to ...
+ * sysdeps/x86_64/fpu/dla.h: ...here.
+ (DLA_FMS): Some compilers fail to inline __builtin_fma in some
+ situations. Use __builtin_fma only for gcc 4.6 and up.
+
+ * config.make.in: Add have-mfma4 entry.
+ * configure.in: Substitute libc_cv_cc_fma4.
+ * math/Makefile (dbl-only-routines): Add sincostab.
+ * sysdeps/ieee754/dbl-64/dosincos.c: Don't include sincos.tbl.
+ Use __sincostab not sincos.
+ * sysdeps/ieee754/dbl-64/e_asin.c: Don't define aliases when function
+ name is a macro.
+ * sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise. Define singArctan2
+ using __copysign.
+ * sysdeps/ieee754/dbl-64/mpa.c: Don't export __acr. Don't define
+ __cr and __cpymn. Define __cpy unless NO___CPY is defined. Define
+ norm, denorm, and __mp_dbl unless NO___MP_DBL is defined.
+ * sysdeps/ieee754/dbl-64/mpa.h: Don't declare __acr, __cr, __cpymn,
+ and __inv.
+ * sysdeps/ieee754/dbl-64/mpsqrt.c: Make fastiroot static.
+ * sysdeps/ieee754/dbl-64/s_atan.c: Define __signArctan using
+ __copysign.
+ * sysdeps/ieee754/dbl-64/s_sin.c: Use __sincostab not sincos. Don't
+ define aliases when function name is a macro.
+ * sysdeps/ieee754/dbl-64/sincostab.c: Renamed from
+ sysdeps/ieee754/dbl-64/sincos.tbl.
+ * sysdeps/x86_64/fpu/multiarch/Makefile: Add entries to build
+ fma4-enabled routines.
+ * sysdeps/x86_64/fpu/multiarch/brandred-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/doasin-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/dosincos-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_asin-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_asin.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_atan2.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_exp.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_log-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_log.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_pow-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/e_pow.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/halfulp-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpa-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mplog-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/mptan-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_atan.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_sin.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_tan.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c: New file.
+
+ * sysdeps/ieee754/dbl-64/doasin.c: Adjust for DLA_FMA -> DLA_FMS
+ rename.
+ * sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
+ * sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
+ * sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_atan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
+
+2011-10-24 Andreas Schwab <schwab@redhat.com>
+
+ * wcsmbs/wcslen.c: Don't define WCSLEN, reverse logic.
+
+2011-10-23 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c: New file.
+
+ * sysdeps/ieee754/dbl-64/e_fmod.c (__ieee754_fmod): Add some branch
+ prediction.
+ * sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c: New file.
+
+ * string/strnlen.c: Don't define STRNLEN, reverse logic.
+ Remove unused variable magic_bits.
+ * sysdeps/i386/i686/multiarch/rtld-strnlen.c: New file.
+
+ * string/strnlen.c: Define and use STRNLEN macro.
+ * sysdeps/i386/i686/multiarch/Makefile [string] (sysdep_routines):
+ Add strnlen-sse2, strnlen-c, wcslen-sse2, and wcslen-c.
+ * sysdeps/i386/i686/multiarch/strlen-sse2.S: Add support for strnlen.
+ * wcsmbs/wcslen.c: Define and use WCSLEN.
+ * sysdeps/i386/i686/multiarch/strnlen-c.c: New file.
+ * sysdeps/i386/i686/multiarch/strnlen-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/strnlen.S: New file.
+ * sysdeps/i386/i686/multiarch/wcslen-c.c: New file.
+ * sysdeps/i386/i686/multiarch/wcslen-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/wcslen.S: New file.
+ Patch by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>.
+
+2011-10-20 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/x86_64/multiarch/Makefile (sysdep_routines): Add
+ strnlen-sse2-no-bsf.
+ Rename strlen-no-bsf to strlen-sse2-no-bsf.
+ * sysdeps/x86_64/multiarch/strlen-no-bsf.S: Rename to
+ * sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S:
+ Add strnlen support.
+ (USE_AS_STRNLEN): New macro.
+ * sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S: New file.
+ * sysdeps/x86_64/multiarch/strcat-ssse3.S: Update.
+ Rename strlen-no-bsf.S to strlen-sse2-no-bsf.S
+ * sysdeps/x86_64/wcslen.S: New file.
+
+2011-10-20 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
+
+ * sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Update.
+ XMM-moves are used for copying on small sizes.
+
+2011-10-19 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * wcsmbs/Makefile (strop-tests): Add wcschr.
+ * wcsmbs/test-wcschr.c: New file.
+ * string/test-strchr.c: Update.
+ Add wcschr support.
+ (WIDE): New macro.
+
+2011-10-18 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * wcsmbs/Makefile (strop-tests): Add wcslen.
+ * wcsmbs/test-wcslen.c: New file.
+ * string/test-strlen.c: Update.
+ Add wcslen support.
+ (WIDE): New macro.
+
+2011-10-23 Ulrich Drepper <drepper@gmail.com>
+
+ * po/it.po: Update from translation team.
+
+2011-09-22 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/x86_64/wcscmp.S: Update.
+ Fix wrong comparison semantics.
+ wcscmp shall use signed comparison not unsigned.
+ Don't use substraction to avoid overflow bug.
+ * sysdeps/i386/i686/multiarch/wcscmp-sse2.S: Likewise.
+ * wcsmbc/wcscmp.c: Likewise.
+ * string/test-strcmp.c: Likewise.
+ Add new tests to check cases with negative values.
+
+2011-10-23 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/ieee754/dbl-64/dla.h: Move DLA_FMA definition to...
+ * sysdeps/x86_64/dla.h: ...here. New file.
+ * sysdeps/ieee754/dbl-64/doasin.c: Use <dla.h> not "dla.h".
+ * sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise.
+ * sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_atan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
+
+2011-10-23 Andreas Schwab <schwab@linux-m68k.org>
+
+ * sysdeps/ieee754/ldbl-128ibm/e_jnl.c: Add __jnl_finite and
+ __ynl_finite aliases.
+
+2011-10-22 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/fpu/libm-test-ulps: Update.
+
+ * sysdeps/ieee754/dbl-64/dla.h: When compiling with FMA4 support
+ define DLA_FMA.
+ [DLA_FMA] (EMULV): Use DLA_FMA.
+ [DLA_FMA] (MUL12): Use EMULV.
+ * sysdeps/ieee754/dbl-64/doasin.c [DLA_FMA]: Don't define variables
+ that are not needed.
+ * sysdeps/ieee754/dbl-64/dosincos.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
+ * sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_atan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_tan.c: Likewise.
+
+2011-10-22 Andreas Schwab <schwab@linux-m68k.org>
+
+ * math/s_nan.c: Undef __nan.
+ * math/s_nanf.c: Undef __nanf.
+ * math/s_nanl.c: Undef __nanl.
+ * sysdeps/ieee754/ldbl-128ibm/s_atanl.c: Include <math.h> before
+ "math_private.h".
+
+2011-10-22 Ulrich Drepper <drepper@gmail.com>
+
+ * math/s_catan.c: Add branch predictions.
+ * math/s_catanf.c: Likewise.
+ * math/s_catanh.c: Likewise.
+ * math/s_catanhf.c: Likewise.
+ * math/s_catanhl.c: Likewise.
+ * math/s_catanl.c: Likewise.
+ * math/s_cexp.c: Likewise.
+ * math/s_cexpf.c: Likewise.
+ * math/s_cexpl.c: Likewise.
+ * math/s_clog.c: Likewise.
+ * math/s_clog10.c: Likewise.
+ * math/s_clog10f.c: Likewise.
+ * math/s_clog10l.c: Likewise.
+ * math/s_clogf.c: Likewise.
+ * math/s_clogl.c: Likewise.
+ * math/s_csqrt.c: Likewise.
+ * math/s_csqrtf.c: Likewise.
+ * math/s_csqrtl.c: Likewise.
+ * math/s_ctanf.c: Likewise.
+ * math/s_ctanh.c: Likewise.
+ * math/s_ctanhf.c: Likewise.
+ * math/s_ctanhl.c: Likewise.
+ * math/s_ctanl.c: Likewise.
+
+ * math/math_private.h: Define __nan, __nanf, __nanl.
+ * math/s_cacosh.c: Include <math_private.h>.
+ * math/s_cacoshl.c: Likewise.
+ * math/s_casinh.c: Likewise.
+ * math/s_casinhf.c: Likewise.
+ * math/s_casinhl.c: Likewise.
+ * math/s_ccos.c: Rely entire on ccosh.
+ * math/s_ccosf.c: Rely entire on ccoshf.
+ * math/s_ccosl.c: Rely entirely on ccoshl.
+ * math/s_ccosh.c: Add branch predicion helpers. Add branch prediction.
+ Remove tests for FE_INVALID.
+ * math/s_ccoshf.c: Likewise.
+ * math/s_ccoshl.c: Likewise.
+ * math/s_csin.c: Likewise.
+ * math/s_csinf.c: Likewise.
+ * math/s_csinh.c Likewise.
+ * math/s_csinhf.c: Likewise.
+ * math/s_csinhl.c: Likewise.
+ * math/s_csinl.c: Likewise.
+ * math/s_ctan.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_acosh.c: Use __ieee754_sqrt.
+ * sysdeps/ieee754/flt-32/e_acoshf.c: Use __ieee754_sqrtf.
+ * sysdeps/ieee754/ldbl-96/e_acoshl.c: Use __ieee754_sqrtl.
+
+2011-10-21 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/multiarch/init-arch.c (__init_cpu_features): Fix
+ compilation problems.
+
+ * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Add a few more
+ __builtin_expect.
+
+2011-10-20 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/i386/configure.in: Test for -mfma4 option.
+ * config.h.in: Add HAVE_FMA4_SUPPORT entry.
+ * sysdeps/x86_64/multiarch/init-arch.h: Define HAS_FMA4 and
+ COMMON_CPUID_INDEX_80000001.
+ * sysdeps/x86_64/multiarch/init-arch.c: Read 80000001 leaf for AMD.
+ * sysdeps/x86_64/fpu/multiarch/s_fma.c: Test for FMA4 support and
+ use it if FMA3 is not supported.
+ * sysdeps/x86_64/fpu/multiarch/s_fmaf.c: Likewise.
+
+ * sysdeps/x86_64/multiarch/s_fma.c: Moved to ../fpu/multiarch.
+ * sysdeps/x86_64/multiarch/s_fmaf.c: Likewise.
+
+2011-10-20 Andreas Schwab <schwab@redhat.com>
+
+ [BZ #12892]
+ * elf/dl-fini.c (_dl_sort_fini): Ignore relocation dependency if
+ it would create a cycle with a link time dependency.
+
+2011-10-19 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/x86_64/multiarch/rawmemchr.S: Small optimization to safe an
+ instruction.
+ * string/Makefile (strop-tests): Add rawmemchr.
+ * string/test-rawmemchr.c: New file.
+
+ * sysdeps/x86_64/multiarch/init-arch.h: Define bit_AVX and index_AVX.
+ * sysdeps/x86_64/multiarch/strcmp-sse42.S: New file. Split out from...
+ * sysdeps/x86_64/multiarch/strcmp.S: ...here. Include strcmp-sse42.S
+ when compiling str{,n}casecmp and when AVX is available. Hook up
+ new optimized code in initializers.
+
+2011-10-19 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/x86_64/fpu/math_private.h (libc_feupdateenv): Use
+ __feraiseexcept instead of feraiseexcept.
+
+2011-10-18 Ulrich Drepper <drepper@gmail.com>
+
+ * math/math_private.h: Define defaults for libc_fetestexcept and
+ libc_feupdateenv.
+ * sysdeps/ieee754/dbl-64/s_fma.c: Use libc_fe* interfaces.
+ * sysdeps/ieee754/dbl-64/s_fmaf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_exp2f.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_expf.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_nearbyintf.c: Likewise.
+ * sysdeps/x86_64/fpu/math_private.h: Define special versions of
+ libc_fetestexcept and libc_feupdateenv.
+
+ * math/math_private.h: Define defaults for libc_feholdexcept_setround,
+ libc_feholdexcept_setroundf, libc_feholdexcept_setroundl.
+ * sysdeps/ieee754/dbl-64/e_exp2.c: Use libc_feholdexcept_setround.
+ * sysdeps/x86_64/fpu/math_private.h: Define special version of
+ libc_feholdexcept_setround.
+
+ * sysdeps/x86_64/fpu/multiarch/Makefile [math] (libm-sysdep-routines):
+ Add s_nearbyint-c and s_nearbyintf-c.
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Define nearbyint and
+ nearbyintf inlines.
+ * sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_nearbyint.S: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_nearbyintf-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S: New file.
+
+ * math/math_private.h: Define defaults for libc_fegetround,
+ libc_fegetroundf, libc_fegetroundl, libc_fesetround, libc_fesetroundf,
+ libc_fesetroundl, libc_feholdexcept, libc_feholdexceptf,
+ libc_feholdexceptl, libc_fesetenv, libc_fesetenvf, libc_fesetenvl.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c: Use
+ libc_feholdexcept, libc_fesetround, libc_fesetenv instead of the
+ standard functions.
+ * sysdeps/ieee754/dbl-64/e_exp2.c: Likewise.
+ Remove comments and hacks for old compiler versions.
+ * sysdeps/x86_64/fpu/math_private.h: Define special versions of
+ libc_fegetround, libc_fesetround, libc_feholdexcept, and
+ libc_feholdexceptl.
+
+2011-10-18 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/x86_64/fpu/bits/fenv.h: Add C linkage markers.
+ (__feraiseexcept_renamed): Add __NTH.
+ (feraiseexcept): Add __NTH. Rename local variables to fix
+ namespace violations.
+
+2011-10-17 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/ieee754/dbl-64/e_exp2.c (__ieee754_exp2): Small optimization.
+
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c: New file.
+
+ * sysdeps/x86_64/fpu/math_private.h: Relax asm requirements for
+ recently added interfaces.
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Likewise.
+
+ * sysdeps/x86_64/fpu/math_private.h: Add some parenthesis to be safe
+ about macro parameter expansion.
+
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Don't define inlines if
+ __NO_MATH_INLINES is defined. Cleanups.
+
+ * sysdeps/x86_64/fpu/math_private.h: Define __rint, __rintf, __floor,
+ and __floorf is target has SSE4.1.
+ * sysdeps/x86_64/fpu/multiarch/s_floor-c.c: Undef first.
+ * sysdeps/x86_64/fpu/multiarch/s_floorf-c.: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_rint-c.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/s_rintf-c.c: Likewise.
+
+ * sysdeps/x86_64/fpu/bits/mathinline.h (floor): Use correct function
+ name.
+ (floorf): Likewise.
+
+ * nscd/netgroupcache.c (addgetnetgrentX): Fix #ifdef nesting.
+
+2011-10-17 Andreas Schwab <schwab@redhat.com>
+
+ * misc/sys/cdefs.h: Fix last change.
+
+ * grp/initgroups.c (internal_getgrouplist): Fix initgroups
+ database lookup.
+
+2011-10-16 Ulrich Drepper <drepper@gmail.com>
+
+ * misc/sys/cdefs.h: Use leaf function attribute in __THROW.
+
+ * sysdeps/ieee754/dbl-64/s_ceil.c: Avoid alias renamed.
+ * sysdeps/ieee754/dbl-64/s_floor.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_rint.c: Likewise.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c: Likewise.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c: Likewise.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_ceilf.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_floorf.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_rintf.c: Likewise.
+ * sysdeps/x86_64/fpu/multiarch/Makefile: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_ceil-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_ceil.S: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_ceilf-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_ceilf.S: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_floor-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_floor.S: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_floorf-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_floorf.S: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_rint-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_rint.S: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_rintf-c.c: New file.
+ * sysdeps/x86_64/fpu/multiarch/s_rintf.S: New file.
+
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Add inlines for rint, rintf,
+ ceil, ceilf, floor, floorf.
+
+ * elf/do-rel.h (elf_dynamic_do_Rel): Work around linker problem.
+ Perform IRELATIVE relocations last.
+
+ * elf/do-rel.h: Add another parameter nrelative, replacing the
+ local variable with the same name. Change name of the function
+ to end in Rel or Rela (uppercase).
+ * elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Add new element
+ nrelative to ranges. Only nonzero for DT_REL/DT_RELA. Pass to the
+ elf_dynamic_do_##reloc function.
+
+2011-10-15 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/i386/i686/fpu/e_log.S: No need for the fyl2xp1 use, fyl2x
+ is sufficient, at least on modern CPUs.
+
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c: New file.
+
+ * sysdeps/ieee754/dbl-64/e_cosh.c: Cleanup.
+ * sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c: New file.
+
+ * math/Versions [libm] (GLIBC_2.15): Add __exp_finite, __expf_finite,
+ __expl_finite.
+ * math/bits/math-finite.h: Add entries for exp.
+ * math/e_expl.c: Add __*_finite alias.
+ * sysdeps/i386/fpu/e_exp.S: Likewise.
+ * sysdeps/i386/fpu/e_expf.S: Likewise.
+ * sysdeps/i386/fpu/e_expl.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_exp.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_expf.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_expl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_expl.c: Likewise.
+ * sysdeps/ieee754/dbl-64/w_exp.c: Complete rewrite.
+ * sysdeps/ieee754/flt-32/w_expf.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/w_expl.c: Likewise.
+
+ * sysdeps/i386/i686/fpu/e_logf.S: No need for the fyl2xp1 use, fyl2x
+ is sufficient, at least on modern CPUs.
+
+ * ctype/ctype-info.c (__ctype_init): Define.
+ * include/ctype.h (__ctype_init): Declare.
+ (__ctype_b_loc): The variable is always initialized.
+ (__ctype_toupper_loc): Likewise.
+ (__ctype_tolower_loc): Likewise.
+ * ctype/Versions: Export __ctype_init for GLIBC_PRIVATE.
+ * sysdeps/unix/sysv/linux/init-first.c (_init): Call __ctype_init.
+
+2011-10-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * wcsmbs/wmemcmp.c (WMEMCMP): Define.
+
+ * configure.in: Also look in $cxxmachine/include for C++ system
+ headers.
+
+2011-09-27 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/x86_64/multiarch/Makefile: (sysdep_routines): Add
+ memcmp-ssse3 wmemcmp-sse4 wmemcmp-ssse3 wmemcmp-c
+ * sysdeps/x86_64/multiarch/memcmp-ssse3: New file.
+ * sysdeps/x86_64/multiarch/memcmp.S: Update. Add __memcmp_ssse3.
+ * sysdeps/x86_64/multiarch/memcmp-sse4.S: Update.
+ (USE_AS_WMEMCMP): New macro.
+ Fixing indents.
+ * sysdeps/x86_64/multiarch/wmemcmp.S: New file.
+ * sysdeps/x86_64/multiarch/wmemcmp-ssse3.S: New file.
+ * sysdeps/x86_64/multiarch/wmemcmp-sse4.S: New file.
+ * sysdeps/x86_64/multiarch/wmemcmp-c.S: New file.
+ * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
+ wmemcmp-ssse3 wmemcmp-sse4 wmemcmp-c
+ * sysdeps/i386/i686/multiarch/wmemcmp.S: New file.
+ * sysdeps/i386/i686/multiarch/wmemcmp-c.c: New file.
+ * sysdeps/i386/i686/multiarch/wmemcmp-ssse3.S: New file.
+ * sysdeps/i386/i686/multiarch/wmemcmp-sse4.S: New file.
+ * sysdeps/i386/i686/multiarch/memcmp-sse4.S: Update.
+ (USE_AS_WMEMCMP): New macro.
+ * sysdeps/i386/i686/multiarch/memcmp-ssse3: Likewise.
+ * sysdeps/string/test-memcmp.c: Update.
+ Fix simple_wmemcmp.
+ Add new tests.
+ * wcsmbs/wmemcmp.c: Update.
+ (WMEMCMP): New macro.
+ Fix overflow bug.
+
+2011-10-12 Andreas Jaeger <aj@suse.de>
+
+ [BZ #13268]
+ * math/bits/mathcalls.h: Mark argument 2 of modf as non-null.
+
+2011-10-15 Ulrich Drepper <drepper@gmail.com>
+
+ * libio/iofwide.c (do_length): Avoid warning.
+
+ * ctype/ctype.h (__isctype_f): Add missing __THROW.
+
+2011-10-14 Ulrich Drepper <drepper@gmail.com>
+
+ * elf/pldd-xx.c (find_maps): Remove leftover debug message.
+
+ * sysdeps/i386/fpu/e_log.S: Add real definition of __log_finite.
+ * sysdeps/i386/fpu/e_logf.S: Add real definition of __logf_finite.
+ * sysdeps/i386/fpu/e_logl.S: Add real definition of __logl_finite.
+ * sysdeps/i386/i686/fpu/e_log.S: New file.
+ * sysdeps/i386/i686/fpu/e_logf.S: New file.
+ * sysdeps/i386/i686/fpu/e_logl.S: New file.
+
+ * ctype/ctype.h: Add support for inlined isXXX functions when
+ compiling C++ code.
+
+2011-10-14 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/s390/fpu/libm-test-ulps: Adjust ULPs for jn tests.
+
+ * sysdeps/x86_64/fpu/fraiseexcpt.c: Fix last change.
+
+2011-10-13 Roland McGrath <roland@hack.frob.com>
+
+ [BZ #13291]
+ * manual/string.texi (String/Array Comparison): Typo fix in strverscmp.
+
+2011-10-13 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/x86_64/fpu/fraiseexcpt.c: Add __feraiseexcept alias.
+ * sysdeps/x86_64/fpu/feupdateenv.c: Use __feraiseexcept instead of
+ feraiseexcept.
+
+ * sysdeps/x86_64/memrchr.S: Check for zero size.
+
+ * string/stratcliff.c: Add memrchr tests.
+
+2011-10-12 Liubov Dmitrieva <liubov.dmitrieva@gmail.com>
+
+ * sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
+ memchr-sse2 memchr-sse2-bsf memrchr-sse2 memrchr-sse2-bsf memrchr-c
+ rawmemchr-sse2 rawmemchr-sse2-bsf.
+ * sysdeps/i386/i686/multiarch/memchr.S: New file.
+ * sysdeps/i386/i686/multiarch/memchr-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S: New file.
+ * sysdeps/i386/i686/multiarch/memrchr.S: New file.
+ * sysdeps/i386/i686/multiarch/memrchr-c.c: New file.
+ * sysdeps/i386/i686/multiarch/memrchr-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S: New file.
+ * sysdeps/i386/i686/multiarch/rawmemchr.S: New file.
+ * sysdeps/i386/i686/multiarch/rawmemchr-sse2.S: New file.
+ * sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S: New file.
+ * string/memrchr.c (MEMRCHR): New macro.
+
+2011-10-12 Ulrich Drepper <drepper@gmail.com>
+
+ Add integration with gcc's -ffinite-math-only and optimize wrapper
+ functions in libm.
+ * Versions.def: Define GLIBC_2.15 version for libm.
+ * math/Makefile (headers): Add bits/math-finite.h.
+ * math/bits/math-finite.h: New file.
+ * sysdeps/ia64/fpu/bits/math-finite.h: New file.
+ * math/Versions [libm] (GLIBC_2.15): Export __*_finite symbols.
+ * math/e_acoshl.c: Add __*_finite alias.
+ * math/e_acosl.c: Likewise.
+ * math/e_asinl.c: Likewise.
+ * math/e_atan2l.c: Likewise.
+ * math/e_atanhl.c: Likewise.
+ * math/e_coshl.c: Likewise.
+ * math/e_exp10.c: Likewise.
+ * math/e_exp10f.c: Likewise.
+ * math/e_exp10l.c: Likewise.
+ * math/e_exp2l.c: Likewise.
+ * math/e_fmodl.c: Likewise.
+ * math/e_gammal_r.c: Likewise.
+ * math/e_hypotl.c: Likewise.
+ * math/e_j0l.c: Likewise.
+ * math/e_j1l.c: Likewise.
+ * math/e_jnl.c: Likewise.
+ * math/e_lgammal_r.c: Likewise.
+ * math/e_log10l.c: Likewise.
+ * math/e_log2l.c: Likewise.
+ * math/e_logl.c: Likewise.
+ * math/e_powl.c: Likewise.
+ * math/e_sinhl.c: Likewise.
+ * math/e_sqrtl.c: Likewise.
+ * math/e_scalb.c: Completely rewritten and optimized.
+ * math/e_scalbf.c: Likewise.
+ * math/e_scalbl.c: Likewise.
+ * math/w_acos.c: Likewise.
+ * math/w_acosf.c: Likewise.
+ * math/w_acosl.c: Likewise.
+ * math/w_acosh.c: Likewise.
+ * math/w_acoshf.c: Likewise.
+ * math/w_acoshl.c: Likewise.
+ * math/w_asin.c: Likewise.
+ * math/w_asinf.c: Likewise.
+ * math/w_asinl.c: Likewise.
+ * math/w_atan2.c: Likewise.
+ * math/w_atan2f.c: Likewise.
+ * math/w_atan2l.c: Likewise.
+ * math/w_atanh.c: Likewise.
+ * math/w_atanhf.c: Likewise.
+ * math/w_atanhl.c: Likewise.
+ * math/w_exp10.c: Likewise.
+ * math/w_exp10f.c: Likewise.
+ * math/w_exp10l.c: Likewise.
+ * math/w_fmod.c: Likewise.
+ * math/w_fmodf.c: Likewise.
+ * math/w_fmodl.c: Likewise.
+ * math/w_j0.c: Likewise.
+ * math/w_j0f.c: Likewise.
+ * math/w_j0l.c: Likewise.
+ * math/w_j1.c: Likewise.
+ * math/w_j1f.c: Likewise.
+ * math/w_j1l.c: Likewise.
+ * math/w_jn.c: Likewise.
+ * math/w_jnf.c: Likewise.
+ * math/w_log.c: Likewise.
+ * math/w_logf.c: Likewise.
+ * math/w_logl.c: Likewise.
+ * math/w_log10.c: Likewise.
+ * math/w_log10f.c: Likewise.
+ * math/w_log10l.c: Likewise.
+ * math/w_log2.c: Likewise.
+ * math/w_log2f.c: Likewise.
+ * math/w_log2l.c: Likewise.
+ * math/w_pow.c: Likewise.
+ * math/w_powf.c: Likewise.
+ * math/w_powl.c: Likewise.
+ * math/w_remainder.c: Likewise.
+ * math/w_remainderf.c: Likewise.
+ * math/w_remainderl.c: Likewise.
+ * math/w_scalb.c: Likewise.
+ * math/w_scalbf.c: Likewise.
+ * math/w_scalbl.c: Likewise.
+ * math/w_sqrt.c: Likewise.
+ * math/w_sqrtf.c: Likewise.
+ * math/w_sqrtl.c: Likewise.
+ * math/math.h: Define __MATH_DECLARE_LDOUBLE if long double functions
+ are declared. Include <bits/math-finite.h> if -ffinite-math-only is
+ used.
+ * math/math_private.h: Declare __kernel_standard_f.
+ * math/w_cosh.c: Remove cruft and optimize a bit.
+ * math/w_coshf.c: Likewise.
+ * math/w_coshl.c: Likewise.
+ * math/w_exp2.c: Likewise.
+ * math/w_exp2f.c: Likewise.
+ * math/w_exp2l.c: Likewise.
+ * math/w_hypot.c: Likewise.
+ * math/w_hypotf.c: Likewise.
+ * math/w_hypotl.c: Likewise.
+ * math/w_lgamma.c: Likewise.
+ * math/w_lgamma_r.c: Likewise.
+ * math/w_lgammaf.c: Likewise.
+ * math/w_lgammaf_r.c: Likewise.
+ * math/w_lgammal.c: Likewise.
+ * math/w_lgammal_r.c: Likewise.
+ * math/w_sinh.c: Likewise.
+ * math/w_sinhf.c: Likewise.
+ * math/w_sinhl.c: Likewise.
+ * math/w_tgamma.c: Likewise.
+ * math/w_tgammaf.c: Likewise.
+ * math/w_tgammal.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_atanh.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_atanhf.c: Likewise.
+ * sysdeps/i386/fpu/e_acos.S: Add __*_finite alias.
+ Minor optimizations. Pretty printing. Remove cruft.
+ * sysdeps/i386/fpu/e_acosf.S: Likewise.
+ * sysdeps/i386/fpu/e_acosh.S: Likewise.
+ * sysdeps/i386/fpu/e_acoshf.S: Likewise.
+ * sysdeps/i386/fpu/e_acoshl.S: Likewise.
+ * sysdeps/i386/fpu/e_acosl.c: Likewise.
+ * sysdeps/i386/fpu/e_asin.S: Likewise.
+ * sysdeps/i386/fpu/e_asinf.S: Likewise.
+ * sysdeps/i386/fpu/e_atan2.S: Likewise.
+ * sysdeps/i386/fpu/e_atan2f.S: Likewise.
+ * sysdeps/i386/fpu/e_atan2l.c: Likewise.
+ * sysdeps/i386/fpu/e_atanh.S: Likewise.
+ * sysdeps/i386/fpu/e_atanhf.S: Likewise.
+ * sysdeps/i386/fpu/e_atanhl.S: Likewise.
+ * sysdeps/i386/fpu/e_exp10.S: Likewise.
+ * sysdeps/i386/fpu/e_exp10f.S: Likewise.
+ * sysdeps/i386/fpu/e_exp10l.S: Likewise.
+ * sysdeps/i386/fpu/e_exp2.S: Likewise.
+ * sysdeps/i386/fpu/e_exp2f.S: Likewise.
+ * sysdeps/i386/fpu/e_exp2l.S: Likewise.
+ * sysdeps/i386/fpu/e_fmod.S: Likewise.
+ * sysdeps/i386/fpu/e_fmodf.S: Likewise.
+ * sysdeps/i386/fpu/e_fmodl.c: Likewise.
+ * sysdeps/i386/fpu/e_hypot.S: Likewise.
+ * sysdeps/i386/fpu/e_hypotf.S: Likewise.
+ * sysdeps/i386/fpu/e_log.S: Likewise.
+ * sysdeps/i386/fpu/e_log10.S: Likewise.
+ * sysdeps/i386/fpu/e_log10f.S: Likewise.
+ * sysdeps/i386/fpu/e_log10l.S: Likewise.
+ * sysdeps/i386/fpu/e_log2.S: Likewise.
+ * sysdeps/i386/fpu/e_log2f.S: Likewise.
+ * sysdeps/i386/fpu/e_log2l.S: Likewise.
+ * sysdeps/i386/fpu/e_logf.S: Likewise.
+ * sysdeps/i386/fpu/e_logl.S: Likewise.
+ * sysdeps/i386/fpu/e_pow.S: Likewise.
+ * sysdeps/i386/fpu/e_powf.S: Likewise.
+ * sysdeps/i386/fpu/e_powl.S: Likewise.
+ * sysdeps/i386/fpu/e_remainder.S: Likewise.
+ * sysdeps/i386/fpu/e_remainderf.S: Likewise.
+ * sysdeps/i386/fpu/e_remainderl.S: Likewise.
+ * sysdeps/i386/fpu/e_scalb.S: Likewise.
+ * sysdeps/i386/fpu/e_scalbf.S: Likewise.
+ * sysdeps/i386/fpu/e_scalbl.S: Likewise.
+ * sysdeps/i386/fpu/e_sqrt.S: Likewise.
+ * sysdeps/i386/fpu/e_sqrtf.S: Likewise.
+ * sysdeps/i386/fpu/e_sqrtl.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_acosh.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_asin.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_atan2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_cosh.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_exp2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_fmod.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_gamma_r.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_hypot.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_j0.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_j1.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_jn.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_lgamma_r.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log10.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_log2.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_pow.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_remainder.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_sinh.c: Likewise.
+ * sysdeps/ieee754/dbl-64/e_sqrt.c: Likewise.
+ * sysdeps/ieee754/dbl-64/halfulp.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_asinh.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_acosf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_acoshf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_asinf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_atan2f.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_coshf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_exp2f.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_fmodf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_gammaf_r.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_hypotf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_j0f.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_j1f.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_jnf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_lgammaf_r.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_log10f.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_log2f.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_logf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_powf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_remainderf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_sinhf.c: Likewise.
+ * sysdeps/ieee754/flt-32/e_sqrtf.c: Likewise.
+ * sysdeps/ieee754/flt-32/s_asinhf.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_acoshl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_acosl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_asinl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_atan2l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_atanhl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_coshl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_fmodl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_gammal_r.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_hypotl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_j0l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_j1l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_jnl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_lgammal_r.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_log10l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_log2l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_logl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_powl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_remainderl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128/e_sinhl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_acoshl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_acosl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_asinl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_atan2l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_atanhl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_coshl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_fmodl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_hypotl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_log10l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_log2l.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_logl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_powl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_remainderl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_sinhl.c: Likewise.
+ * sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_acoshl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_asinl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_atan2l.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_atanhl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_coshl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_gammal_r.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_hypotl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_j0l.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_j1l.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_jnl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_lgammal_r.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_remainderl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/e_sinhl.c: Likewise.
+ * sysdeps/ieee754/ldbl-96/s_asinhl.c: Likewise.
+ * sysdeps/powerpc/fpu/e_hypot.c: Likewise.
+ * sysdeps/powerpc/fpu/e_hypotf.c: Likewise.
+ * sysdeps/powerpc/fpu/e_sqrt.c: Likewise.
+ * sysdeps/powerpc/fpu/e_sqrtf.c: Likewise.
+ * sysdeps/powerpc/powerpc64/fpu/e_sqrt.c: Likewise.
+ * sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c: Likewise.
+ * sysdeps/s390/fpu/e_sqrt.c: Likewise.
+ * sysdeps/s390/fpu/e_sqrtf.c: Likewise.
+ * sysdeps/s390/fpu/e_sqrtl.c: Likewise.
+ * sysdeps/sparc/sparc32/e_sqrt.c: Likewise.
+ * sysdeps/sparc/sparc64/fpu/e_sqrtl.c: Likewise.
+ * sysdeps/x86_64/fpu/e_exp2l.S: Likewise.
+ * sysdeps/x86_64/fpu/e_fmodl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_log10l.S: Likewise.
+ * sysdeps/x86_64/fpu/e_log2l.S: Likewise.
+ * sysdeps/x86_64/fpu/e_logl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_powl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_remainderl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_scalbl.S: Likewise.
+ * sysdeps/x86_64/fpu/e_sqrt.c: Likewise. Fix parameter order
+ * sysdeps/x86_64/fpu/e_sqrtf.c: Likewise.
+ * sysdeps/x86_64/fpu/math_private.h (__isnan): Cast d parameter.
+ (__isnanf): Likewise.
+ (__isinf_ns): Likewise.
+ (__isinf_nsf): Likewise.
+ (__finite): Likewise.
+ (__finitef): Likewise.
+ (__ieee754_sqrt): Define as macro.
+ (__ieee754_sqrtf): Define as macro.
+ (__ieee754_sqrtl): Define as macro.
+ * sysdeps/x86_64/fpu/bits/fenv.h (feraiseexcept): Add partially
+ inlined copy.
+ * sysdeps/x86_64/fpu/bits/mathinline.h: Make use of
+ __FINITE_MATH_ONLY__ consistent.
+ * sysdeps/ieee754/k_standard.c (__kernel_standard_f): New function.
+
+2011-10-10 Andreas Schwab <schwab@linux-m68k.org>
+
+ * inet/getnetgrent_r.c (nscd_getnetgrent): Use __rawmemchr instead
+ of rawmemchr.
+
+ * sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c: New file.
+
+2011-10-09 Ulrich Drepper <drepper@gmail.com>
+
+ * po/ja.po: Update from translation team.
+
+2011-10-08 Roland McGrath <roland@hack.frob.com>
+
+ * locale/programs/locarchive.c (prepare_address_space): New function.
+ (create_archive, enlarge_archive, open_archive): Use it.
+
+ * sysdeps/unix/sysv/linux/x86_64/time.c: Move #include <dl-vdso.h>
+ inside [SHARED], where it is used.
+
+ * nscd/nscd_proto.h: Declare __nscd_setnetgrent.
+
+ * nss/getent.c (netgroup_keys): Remove unused variable.
+ * sysdeps/ieee754/flt-32/s_isinf_nsf.c: Likewise.
+
2011-10-08 Ulrich Drepper <drepper@gmail.com>
+ * include/math.h: Declare __isinf_ns, __isinf_nsf, __isinf_nsl.
+ * sysdeps/ieee754/dbl-64/s_isinf_ns.c: New file.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_isinf_ns.c: New file.
+ * sysdeps/ieee754/flt-32/s_isinf_nsf.c: New file.
+ * sysdeps/ieee754/ldbl-128/s_isinf_nsl.c: New file.
+ * sysdeps/ieee754/ldbl-96/s_isinf_nsl.c: New file.
+ * math/Makefile (libm-calls): Add s_isinf_ns.
+ * math/divtc3.c: Use __isinf_nsl instead of isinf.
+ * math/multc3.c: Likewise.
+ * math/s_casin.c: Likewise.
+ * math/s_casinf.c: Likewise.
+ * math/s_casinl.c: Likewise.
+ * math/s_ccos.c: Likewise.
+ * math/s_ccosf.c: Likewise.
+ * math/s_ccosl.c: Likewise.
+ * math/s_ctan.c: Likewise.
+ * math/s_ctanf.c: Likewise.
+ * math/s_ctanh.c: Likewise.
+ * math/s_ctanhf.c: Likewise.
+ * math/s_ctanhl.c: Likewise.
+ * math/s_ctanl.c: Likewise.
+ * math/w_fmod.c: Likewise.
+ * math/w_fmodf.c: Likewise.
+ * math/w_fmodl.c: Likewise.
+ * math/w_remainder.c: Likewise.
+ * math/w_remainderf.c: Likewise.
+ * math/w_remainderl.c: Likewise.
+ * sysdeps/ieee754/dbl-64/s_finite.c: Undefine __finite.
+ * sysdeps/ieee754/dbl-64/s_isnan.c: Undefine __isnan.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c: Undefine __finite.
+ * sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c: Undefine __nan.
+ * sysdeps/ieee754/flt-32/s_finitef.c: Undefine __finitef.
+ * sysdeps/ieee754/flt-32/s_isnanf.c: Undefine __nan.
+ * sysdeps/x86_64/fpu/math_private.h: Add optimized versions of __isnsn,
+ __isnanf, __isinf_ns, __isinf_nsf, __finite, and __finitef.
+
* stdio-common/printf_fp.c: Use the fact that isinf returns the sign
of the number.
* stdio-common/printf_fphex.c: Likewise.
diff --git a/ChangeLog.0ea698ae7817329603d0afea7904a909bd59eac6 b/ChangeLog.0ea698ae7817329603d0afea7904a909bd59eac6
new file mode 100644
index 0000000000..1a22ce6f7c
--- /dev/null
+++ b/ChangeLog.0ea698ae7817329603d0afea7904a909bd59eac6
@@ -0,0 +1,5 @@
+2011-12-26 Samuel Thibault <samuel.thibault@ens-lyon.org>
+
+ * sysdeps/mach/hurd/mmap.c (__mmap): When MAPADDR is nonzero, try
+ __vm_allocate and __vm_map with ANYWHERE set to 0 first, and try with
+ ANYWHERE set to 1 only on KERN_NO_SPACE error.
diff --git a/ChangeLog.228c019e6336d6da448715a1c5fcca9771827f61 b/ChangeLog.228c019e6336d6da448715a1c5fcca9771827f61
new file mode 100644
index 0000000000..037ba80bd6
--- /dev/null
+++ b/ChangeLog.228c019e6336d6da448715a1c5fcca9771827f61
@@ -0,0 +1,7 @@
+2012-04-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ * csu/init-first.c (__libc_init_first): Call __ctype_init.
+ * sysdeps/i386/init-first.c (init): Likewise.
+ * sysdeps/mach/hurd/i386/init-first.c (posixland_init): Likewise.
+ * sysdeps/mach/hurd/powerpc/init-first.c (posixland_init): Likewise.
+ * sysdeps/sh/init-first.c (init): Likewise.
diff --git a/ChangeLog.302cadd343d26cfa9b043c213c2a38de259464d8 b/ChangeLog.302cadd343d26cfa9b043c213c2a38de259464d8
new file mode 100644
index 0000000000..2a987be56d
--- /dev/null
+++ b/ChangeLog.302cadd343d26cfa9b043c213c2a38de259464d8
@@ -0,0 +1,7 @@
+2012-04-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ * string/test-memcmp.c [! WIDE]: #include <limits.h> for CHAR_MIN,
+ CHAR_MAX.
+ * string/test-strcmp.c [! WIDE]: Likewise.
+ * time/tst-mktime2.c: Likewise for INT_MAX.
+ * string/test-string.h: #include <sys/param.h> for MIN.
diff --git a/ChangeLog.81c0c9648d8bdaafde6e8e407dce90c21aa115e9 b/ChangeLog.81c0c9648d8bdaafde6e8e407dce90c21aa115e9
new file mode 100644
index 0000000000..1b1aeded0b
--- /dev/null
+++ b/ChangeLog.81c0c9648d8bdaafde6e8e407dce90c21aa115e9
@@ -0,0 +1,4 @@
+2012-01-22 Pino Toscano <toscano.pino@tiscali.it>
+
+ * sysdeps/mach/hurd/socket.c (__socket): Return EAFNOSUPPORT instead
+ of the non-standard EPFNOSUPPORT.
diff --git a/ChangeLog.9078ce930afda8bbcba6fe860a13ca62abcf2742 b/ChangeLog.9078ce930afda8bbcba6fe860a13ca62abcf2742
new file mode 100644
index 0000000000..4aa7aa91dd
--- /dev/null
+++ b/ChangeLog.9078ce930afda8bbcba6fe860a13ca62abcf2742
@@ -0,0 +1,5 @@
+2012-02-17 Thomas Schwinge <thomas@schwinge.name>
+
+ [BZ #4822]
+ * sysdeps/mach/hurd/malloc-machine.h: #include <sys/mman.h>.
+ (madvise): Cast every argument to void on its own.
diff --git a/ChangeLog.d2c736f809690dd69f1cade53a61b99e401bb0e3 b/ChangeLog.d2c736f809690dd69f1cade53a61b99e401bb0e3
new file mode 100644
index 0000000000..f99caa58ae
--- /dev/null
+++ b/ChangeLog.d2c736f809690dd69f1cade53a61b99e401bb0e3
@@ -0,0 +1,4 @@
+2012-02-15 Roland McGrath <roland@hack.frob.com>
+
+ [BZ #4822]
+ * sysdeps/mach/hurd/malloc-machine.h (madvise): New macro.
diff --git a/FAQ b/FAQ
index 54f422a09e..bd5849e9b2 100644
--- a/FAQ
+++ b/FAQ
@@ -605,10 +605,10 @@ builtins (__builtin_*).
Without optimizations enabled GNU CC will not inline functions. The
early startup of the dynamic loader will make function calls via an
-unrelocated PLT and crash.
+unrelocated PLT and crash.
Without auditing the dynamic linker code it would be difficult to remove
-this requirement.
+this requirement.
Another reason is that nested functions must be inlined in many cases to
avoid executable stacks.
@@ -1204,7 +1204,7 @@ solutions:
{AJ} You might get the following errors when upgrading to glibc 2.1:
In file included from /usr/include/stdio.h:57,
- from ...
+ from ...
/usr/include/libio.h:335: parse error before `_IO_seekoff'
/usr/include/libio.h:335: parse error before `_G_off64_t'
/usr/include/libio.h:336: parse error before `_IO_seekpos'
@@ -1278,10 +1278,7 @@ and gives more details for some topics.
2.33. The makefiles want to do a CVS commit.
-{UD} Only if you are not specifying the --without-cvs flag at configure
-time. This is what you always have to use if you are checking sources
-directly out of the public CVS repository or you have your own private
-repository.
+{} Removed. Does not apply anymore.
2.34. When compiling C++ programs, I get a compilation error in streambuf.h.
diff --git a/FAQ.in b/FAQ.in
index 0eb6bac154..af61599a70 100644
--- a/FAQ.in
+++ b/FAQ.in
@@ -400,10 +400,10 @@ builtins (__builtin_*).
Without optimizations enabled GNU CC will not inline functions. The
early startup of the dynamic loader will make function calls via an
-unrelocated PLT and crash.
+unrelocated PLT and crash.
Without auditing the dynamic linker code it would be difficult to remove
-this requirement.
+this requirement.
Another reason is that nested functions must be inlined in many cases to
avoid executable stacks.
@@ -971,7 +971,7 @@ solutions:
{AJ} You might get the following errors when upgrading to glibc 2.1:
In file included from /usr/include/stdio.h:57,
- from ...
+ from ...
/usr/include/libio.h:335: parse error before `_IO_seekoff'
/usr/include/libio.h:335: parse error before `_G_off64_t'
/usr/include/libio.h:336: parse error before `_IO_seekpos'
@@ -1041,10 +1041,7 @@ and gives more details for some topics.
?? The makefiles want to do a CVS commit.
-{UD} Only if you are not specifying the --without-cvs flag at configure
-time. This is what you always have to use if you are checking sources
-directly out of the public CVS repository or you have your own private
-repository.
+{} Removed. Does not apply anymore.
?? When compiling C++ programs, I get a compilation error in streambuf.h.
diff --git a/Makefile.in b/Makefile.in
index 1c1e2c1df1..1f5dc1cd72 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -3,14 +3,9 @@ srcdir = @srcdir@
# Uncomment the line below if you want to do parallel build.
# PARALLELMFLAGS = -j 4
-# This option is for those who modify the sources and keep them in a
-# CVS repository. Sometimes it is necessary to pass options to the cvs
-# program (not the command), like -z9 or -x.
-# CVSOPTS = -z9
-
all .DEFAULT:
- $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@
+ $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
install:
LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL; \
- $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" CVSOPTS="$(CVSOPTS)" -C $(srcdir) objdir=`pwd` $@
+ $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@
diff --git a/NEWS b/NEWS
index 6bdacf0fd6..55dba1bb79 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2011-10-8
+GNU C Library NEWS -- history of user-visible changes. 2011-12-23
Copyright (C) 1992-2009, 2010, 2011 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -9,9 +9,13 @@ Version 2.15
* The following bugs are resolved with this release:
- 6779, 6783, 9696, 11589, 12403, 12847, 12868, 12852, 12874, 12885, 12907,
- 12922, 12935, 13007, 13021, 13067, 13068, 13090, 13092, 13114, 13118,
- 13123, 13134, 13138, 13150, 13179, 13192
+ 6779, 6783, 9696, 10103, 10709, 11589, 12403, 12786, 12840, 12847, 12868,
+ 12852, 12874, 12885, 12892, 12906, 12907, 12922, 12935, 12962, 13007,
+ 13021, 13061, 13062, 13067, 13068, 13085, 13088, 13090, 13092, 13096,
+ 13114, 13118, 13123, 13134, 13138, 13147, 13150, 13166, 13179, 13185,
+ 13189, 13192, 13268, 13276, 13282, 13291, 13305, 13328, 13335, 13337,
+ 13344, 13358, 13367, 13413, 13416, 13423, 13439, 13446, 13472, 13484,
+ 13506, 13515, 13523, 13524, 13538, 13540
* New program pldd to list loaded object of a process
Implemented by Ulrich Drepper.
@@ -26,14 +30,15 @@ Version 2.15
* Improved strcpy, strncpy, stpcpy, stpncpy for SSE2 and SSSE3 on x86-64.
Contributed by HJ Lu.
-* Optimized strcat and strncat on x86-64 and optimized wcscmp on x86-32 and
- x86-64.
+* Optimized strcat, strncat on x86-64 and optimized wcscmp, wcslen, strnlen
+ on x86-32 and x86-64.
Contributed by Liubov Dmitrieva.
* Optimized strchr and strrchr for SSE on x86-32.
Contributed by Liubov Dmitrieva.
-* Optimized memchr, memrchr, rawmemchr for x86-64.
+* Optimized memchr, memrchr, rawmemchr, memcmp, wmemcmp, wcschr, wcscpy
+ for x86-64 and x86-32.
Contributed by Liubov Dmitrieva.
* New interfaces: scandirat, scandirat64
@@ -44,6 +49,25 @@ Version 2.15
* nscd now also caches the netgroup database.
Implemented by Ulrich Drepper.
+
+* Integrate libm with gcc's -ffinite-math-only option.
+ Implemented by Ulrich Drepper.
+
+* Lots of generic, 64-bit, and x86-64-specific performance optimizations
+ to math functions. Implemented by Ulrich Drepper.
+
+* Optimized strcasecmp and strncasecmp for AVX on x86-64.
+ Implemented by Ulrich Drepper.
+
+* New Linux interfaces: process_vm_readv, process_vm_writev
+
+* Optimized strcasecmp and strncasecmp for SSSE3 and SSE4.2 on x86-32.
+ Implemented by Ulrich Drepper.
+
+* Optimized nearbyint and strcasecmp for PPC.
+ Implemented by Adhemerval Zanella.
+
+* New locales: bho_IN, unm_US, es_CU, ta_LK
Version 2.14
diff --git a/README b/README
index 7c27e3652a..728e7d7da8 100644
--- a/README
+++ b/README
@@ -94,4 +94,7 @@ This web page gives detailed information on how to report bugs properly.
The GNU C Library is free software. See the file COPYING.LIB for copying
conditions, and LICENSES for notices about a few contributions that require
-these additional notices to be distributed.
+these additional notices to be distributed. License copyright years may be
+listed using range notation, e.g., 2000-2011, indicating that every year in
+the range, inclusive, is a copyrightable year that would otherwise be listed
+individually.
diff --git a/Versions.def b/Versions.def
index 4aa379f247..6b05e5ba5d 100644
--- a/Versions.def
+++ b/Versions.def
@@ -54,6 +54,7 @@ libm {
GLIBC_2.2.3
GLIBC_2.3.4
GLIBC_2.4
+ GLIBC_2.15
}
libnsl {
GLIBC_2.0
diff --git a/bits/byteswap.h b/bits/byteswap.h
index 45cb9471e3..6df2f28c02 100644
--- a/bits/byteswap.h
+++ b/bits/byteswap.h
@@ -1,5 +1,6 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997,1998,2000-2002,2005,2008 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000-2002,2005,2008,2011
+ 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
@@ -60,20 +61,20 @@ __bswap_32 (unsigned int __bsx)
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
# define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ull) >> 56) \
- | (((x) & 0x00ff000000000000ull) >> 40) \
- | (((x) & 0x0000ff0000000000ull) >> 24) \
- | (((x) & 0x000000ff00000000ull) >> 8) \
- | (((x) & 0x00000000ff000000ull) << 8) \
- | (((x) & 0x0000000000ff0000ull) << 24) \
- | (((x) & 0x000000000000ff00ull) << 40) \
- | (((x) & 0x00000000000000ffull) << 56))
+ (__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56)))
# define __bswap_64(x) \
(__extension__ \
({ union { __extension__ unsigned long long int __ll; \
unsigned int __l[2]; } __w, __r; \
- if (__builtin_constant_p (x)) \
+ if (__builtin_constant_p (x)) \
__r.__ll = __bswap_constant_64 (x); \
else \
{ \
diff --git a/bits/ioctl-types.h b/bits/ioctl-types.h
index 58b78a6af3..661887f95b 100644
--- a/bits/ioctl-types.h
+++ b/bits/ioctl-types.h
@@ -1,5 +1,5 @@
/* Structure types for pre-termios terminal ioctls. Generic Unix version.
- Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ Copyright (C) 1996,1997,2011 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
@@ -64,7 +64,7 @@ struct sgttyb
};
#define _IOT_sgttyb /* Hurd ioctl type field. */ \
- _IOT (_IOTS (char), 6, _IOTS (short int), 1, 0, 0)
+ _IOT (_IOTS (char), 4, _IOTS (short int), 1, 0, 0)
#if defined TIOCGWINSZ || defined TIOCSWINSZ
/* Type of ARG for TIOCGWINSZ and TIOCSWINSZ requests. */
diff --git a/config.h.in b/config.h.in
index 7b5095691d..7db663025a 100644
--- a/config.h.in
+++ b/config.h.in
@@ -118,6 +118,9 @@
/* Define if gcc supports AVX. */
#undef HAVE_AVX_SUPPORT
+/* Define if gcc supports FMA4. */
+#undef HAVE_FMA4_SUPPORT
+
/* Define if the compiler's exception support is based on libunwind. */
#undef HAVE_CC_WITH_LIBUNWIND
diff --git a/config.make.in b/config.make.in
index 2181d05ce3..d2baf6d3a9 100644
--- a/config.make.in
+++ b/config.make.in
@@ -59,6 +59,7 @@ have-cpp-asm-debuginfo = @libc_cv_cpp_asm_debuginfo@
enable-check-abi = @enable_check_abi@
have-forced-unwind = @libc_cv_forced_unwind@
have-fpie = @libc_cv_fpie@
+have-mfma4 = @libc_cv_cc_fma4@
gnu89-inline-CFLAGS = @gnu89_inline@
have-ssp = @libc_cv_ssp@
have-selinux = @have_selinux@
diff --git a/configure b/configure
index a6cd40a9a5..53c6a18998 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,4 @@
#! /bin/sh
-# From configure.in CVSid.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.68 for GNU C Library (see version.h).
#
@@ -588,6 +587,7 @@ elf
ldd_rewrite_script
use_ldconfig
libc_cv_as_i686
+libc_cv_cc_fma4
libc_cv_cc_novzeroupper
libc_cv_cc_avx
libc_cv_cc_sse4
@@ -5308,11 +5308,16 @@ if test -n "$sysheaders"; then
SYSINCLUDES="$SYSINCLUDES \
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
if test -n "$CXX"; then
+ CXX_SYSINCLUDES=
cxxversion=`$CXX -dumpversion 2>&5` &&
cxxmachine=`$CXX -dumpmachine 2>&5` &&
- cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
- CXX_SYSINCLUDES="-isystem $cxxheaders \
+ for d in include "$cxxmachine/include"; do
+ i=../../../../$d/c++/$cxxversion
+ cxxheaders=`$CXX -print-file-name="$i"` &&
+ test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
+ CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+ done
fi
fi
@@ -7612,6 +7617,7 @@ fi
+
if test $elf = yes; then
$as_echo "#define HAVE_ELF 1" >>confdefs.h
diff --git a/configure.in b/configure.in
index 552b91bea8..ed54b56fbb 100644
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,4 @@
dnl Process this file with autoconf to produce a configure script.
-AC_REVISION([$CVSid$])
AC_PREREQ(2.53)dnl dnl Minimum Autoconf version required.
AC_INIT([GNU C Library], [(see version.h)], [http://sourceware.org/bugzilla/], [glibc])
AC_CONFIG_SRCDIR([include/features.h])
@@ -1067,11 +1066,16 @@ if test -n "$sysheaders"; then
SYSINCLUDES="$SYSINCLUDES \
-isystem `echo $sysheaders | sed 's/:/ -isystem /g'`"
if test -n "$CXX"; then
+ CXX_SYSINCLUDES=
cxxversion=`$CXX -dumpversion 2>&AS_MESSAGE_LOG_FD` &&
cxxmachine=`$CXX -dumpmachine 2>&AS_MESSAGE_LOG_FD` &&
- cxxheaders=`$CXX -print-file-name=../../../../include/c++/`"$cxxversion" &&
- CXX_SYSINCLUDES="-isystem $cxxheaders \
+ for d in include "$cxxmachine/include"; do
+ i=../../../../$d/c++/$cxxversion
+ cxxheaders=`$CXX -print-file-name="$i"` &&
+ test "x$cxxheaders" != x && test "x$i" != "x$cxxheaders" &&
+ CXX_SYSINCLUDES="$CXX_SYSINCLUDES -isystem $cxxheaders \
-isystem $cxxheaders/$cxxmachine -isystem $cxxheaders/backward"
+ done
fi
fi
AC_SUBST(SYSINCLUDES)
@@ -2345,6 +2349,7 @@ AC_SUBST(libc_cv_cpp_asm_debuginfo)
AC_SUBST(libc_cv_cc_sse4)
AC_SUBST(libc_cv_cc_avx)
AC_SUBST(libc_cv_cc_novzeroupper)
+AC_SUBST(libc_cv_cc_fma4)
AC_SUBST(libc_cv_as_i686)
AC_SUBST(use_ldconfig)
diff --git a/csu/init-first.c b/csu/init-first.c
index fa21274c73..59fd477579 100644
--- a/csu/init-first.c
+++ b/csu/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. Stub version.
- Copyright (C) 1995, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <ctype.h>
#include <unistd.h>
#include <sys/types.h>
@@ -56,4 +57,7 @@ void __libc_init_first
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
#endif
+
+ /* Initialize ctype data. */
+ __ctype_init ();
}
diff --git a/ctype/Versions b/ctype/Versions
index 8cf0338b39..84f1e2c7cb 100644
--- a/ctype/Versions
+++ b/ctype/Versions
@@ -21,4 +21,7 @@ libc {
# functions used by optimized macros in ctype.h
__ctype_b_loc; __ctype_tolower_loc; __ctype_toupper_loc;
}
+ GLIBC_PRIVATE {
+ __ctype_init;
+ }
}
diff --git a/ctype/ctype-info.c b/ctype/ctype-info.c
index 03b67d179f..b64e7439a8 100644
--- a/ctype/ctype-info.c
+++ b/ctype/ctype-info.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,95,96,97,99,2000, 2002, 2008
+/* Copyright (C) 1991,92,95,96,97,99,2000, 2002, 2008, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -26,6 +26,19 @@ __libc_tsd_define (, const int32_t *, CTYPE_TOLOWER)
__libc_tsd_define (, const int32_t *, CTYPE_TOUPPER)
+void
+__ctype_init (void)
+{
+ const uint16_t **bp = __libc_tsd_address (const uint16_t *, CTYPE_B);
+ *bp = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128;
+ const int32_t **up = __libc_tsd_address (const int32_t *, CTYPE_TOUPPER);
+ *up = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128);
+ const int32_t **lp = __libc_tsd_address (const int32_t *, CTYPE_TOLOWER);
+ *lp = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128);
+}
+libc_hidden_def (__ctype_init)
+
+
#include <shlib-compat.h>
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
diff --git a/ctype/ctype.h b/ctype/ctype.h
index e859c4a624..1f3052abff 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -1,5 +1,5 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008,2009
- Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008,2009,2011
+ 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
@@ -85,8 +85,18 @@ extern __const __int32_t **__ctype_tolower_loc (void)
extern __const __int32_t **__ctype_toupper_loc (void)
__THROW __attribute__ ((__const));
-#define __isctype(c, type) \
+
+#ifndef __cplusplus
+# define __isctype(c, type) \
((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
+#elif defined __USE_EXTERN_INLINES
+# define __isctype_f(type) \
+ __extern_inline int \
+ is##type (int __c) __THROW \
+ { \
+ return (*__ctype_b_loc ())[(int) (__c)] & (unsigned short int) _IS##type; \
+ }
+#endif
#define __isascii(c) (((c) & ~0x7f) == 0) /* If C is a 7 bit value. */
#define __toascii(c) ((c) & 0x7f) /* Mask off high bits. */
@@ -169,7 +179,23 @@ __exctype (_tolower);
__res = (a)[(int) (c)]; \
__res; }))
-#if !defined __NO_CTYPE && !defined __cplusplus
+#if !defined __NO_CTYPE
+# ifdef __isctype_f
+__isctype_f (alnum)
+__isctype_f (alpha)
+__isctype_f (cntrl)
+__isctype_f (digit)
+__isctype_f (lower)
+__isctype_f (graph)
+__isctype_f (print)
+__isctype_f (punct)
+__isctype_f (space)
+__isctype_f (upper)
+__isctype_f (xdigit)
+# ifdef __USE_ISOC99
+__isctype_f (blank)
+# endif
+# elif defined __isctype
# define isalnum(c) __isctype((c), _ISalnum)
# define isalpha(c) __isctype((c), _ISalpha)
# define iscntrl(c) __isctype((c), _IScntrl)
@@ -181,9 +207,9 @@ __exctype (_tolower);
# define isspace(c) __isctype((c), _ISspace)
# define isupper(c) __isctype((c), _ISupper)
# define isxdigit(c) __isctype((c), _ISxdigit)
-
-# ifdef __USE_ISOC99
-# define isblank(c) __isctype((c), _ISblank)
+# ifdef __USE_ISOC99
+# define isblank(c) __isctype((c), _ISblank)
+# endif
# endif
# ifdef __USE_EXTERN_INLINES
diff --git a/elf/chroot_canon.c b/elf/chroot_canon.c
index 54a6a4cc96..f8f3370493 100644
--- a/elf/chroot_canon.c
+++ b/elf/chroot_canon.c
@@ -1,5 +1,5 @@
/* Return the canonical absolute name of a given file inside chroot.
- Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010
+ Copyright (C) 1996,1997,1998,1999,2000,2001,2004,2005,2010,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -70,7 +70,6 @@ chroot_canon (const char *chroot, const char *name)
for (start = end = name; *start; start = end)
{
struct stat64 st;
- int n;
/* Skip sequence of multiple path-separators. */
while (*start == '/')
@@ -135,7 +134,7 @@ chroot_canon (const char *chroot, const char *name)
goto error;
}
- n = readlink (rpath, buf, PATH_MAX);
+ ssize_t n = readlink (rpath, buf, PATH_MAX - 1);
if (n < 0)
{
if (*end == '\0')
@@ -148,7 +147,7 @@ chroot_canon (const char *chroot, const char *name)
extra_buf = alloca (PATH_MAX);
len = strlen (end);
- if ((long int) (n + len) >= PATH_MAX)
+ if (len >= PATH_MAX - n)
{
__set_errno (ENAMETOOLONG);
goto error;
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 2b53a5ed09..788225635e 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -1,5 +1,5 @@
/* Locate the shared object symbol nearest a given address.
- Copyright (C) 1996-2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1996-2007, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
#include <ldsodefs.h>
-static void
+static inline void
__attribute ((always_inline))
determine_info (const ElfW(Addr) addr, struct link_map *match, Dl_info *info,
struct link_map **mapp, const ElfW(Sym) **symbolp)
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 7fa4d691c3..565a339331 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -188,6 +188,10 @@ _dl_map_object_deps (struct link_map *map,
/* Pointer to last unique object. */
tail = &known[nlist - 1];
+ /* No alloca'd space yet. */
+ struct link_map **needed_space = NULL;
+ size_t needed_space_bytes = 0;
+
/* Process each element of the search list, loading each of its
auxiliary objects and immediate dependencies. Auxiliary objects
will be added in the list before the object itself and
@@ -216,8 +220,15 @@ _dl_map_object_deps (struct link_map *map,
dependencies of this object. */
if (l->l_searchlist.r_list == NULL && l->l_initfini == NULL
&& l != map && l->l_ldnum > 0)
- needed = (struct link_map **) alloca (l->l_ldnum
- * sizeof (struct link_map *));
+ {
+ size_t new_size = l->l_ldnum * sizeof (struct link_map *);
+
+ if (new_size > needed_space_bytes)
+ needed_space
+ = extend_alloca (needed_space, needed_space_bytes, new_size);
+
+ needed = needed_space;
+ }
if (l->l_info[DT_NEEDED] || l->l_info[AUXTAG] || l->l_info[FILTERTAG])
{
@@ -627,7 +638,7 @@ Filters not supported with LD_TRACE_PRELINKING"));
while (1)
{
/* Keep track of which object we looked at this round. */
- seen[i] += seen[i] < 2;
+ ++seen[i];
struct link_map *thisp = l_initfini[i];
/* Find the last object in the list for which the current one is
diff --git a/elf/dl-fini.c b/elf/dl-fini.c
index bafc83a92f..9fd913e0b7 100644
--- a/elf/dl-fini.c
+++ b/elf/dl-fini.c
@@ -44,7 +44,7 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
while (1)
{
/* Keep track of which object we looked at this round. */
- seen[i] += seen[i] < 2;
+ ++seen[i];
struct link_map *thisp = maps[i];
/* Do not handle ld.so in secondary namespaces and object which
@@ -100,7 +100,17 @@ _dl_sort_fini (struct link_map **maps, size_t nmaps, char *used, Lmid_t ns)
/* Look through the relocation dependencies of the object. */
while (m-- > 0)
if (__builtin_expect (relmaps[m] == thisp, 0))
- goto move;
+ {
+ /* If a cycle exists with a link time dependency,
+ preserve the latter. */
+ struct link_map **runp = thisp->l_initfini;
+ if (runp != NULL)
+ while (*runp != NULL)
+ if (__builtin_expect (*runp++ == maps[k], 0))
+ goto ignore;
+ goto move;
+ }
+ ignore:;
}
--k;
diff --git a/elf/dl-iteratephdr.c b/elf/dl-iteratephdr.c
index 45107a9b6c..33b56c9627 100644
--- a/elf/dl-iteratephdr.c
+++ b/elf/dl-iteratephdr.c
@@ -44,9 +44,10 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
/* We have to determine the namespace of the caller since this determines
which namespace is reported. */
- const void *caller = RETURN_ADDRESS (0);
size_t nloaded = GL(dl_ns)[0]._ns_nloaded;
Lmid_t ns = 0;
+#ifdef SHARED
+ const void *caller = RETURN_ADDRESS (0);
for (Lmid_t cnt = GL(dl_nns) - 1; cnt > 0; --cnt)
for (struct link_map *l = GL(dl_ns)[cnt]._ns_loaded; l; l = l->l_next)
{
@@ -59,6 +60,7 @@ __dl_iterate_phdr (int (*callback) (struct dl_phdr_info *info,
|| _dl_addr_inside_object (l, (ElfW(Addr)) caller)))
ns = cnt;
}
+#endif
for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
{
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index affb53f30e..e655d14dd4 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -860,7 +860,6 @@ internal_function
_dl_setup_hash (struct link_map *map)
{
Elf_Symndx *hash;
- Elf_Symndx nchain;
if (__builtin_expect (map->l_info[DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM
+ DT_THISPROCNUM + DT_VERSIONTAGNUM
@@ -892,7 +891,8 @@ _dl_setup_hash (struct link_map *map)
hash = (void *) D_PTR (map, l_info[DT_HASH]);
map->l_nbuckets = *hash++;
- nchain = *hash++;
+ /* Skip nchain. */
+ hash++;
map->l_buckets = hash;
hash += map->l_nbuckets;
map->l_chain = hash;
diff --git a/elf/do-rel.h b/elf/do-rel.h
index 6187b9ed7a..3f8e7eb8c9 100644
--- a/elf/do-rel.h
+++ b/elf/do-rel.h
@@ -21,13 +21,10 @@
`elf_dynamic_do_rel' and `elf_dynamic_do_rela'. */
#ifdef DO_RELA
-# define elf_dynamic_do_rel elf_dynamic_do_rela
-# define RELCOUNT_IDX VERSYMIDX (DT_RELACOUNT)
+# define elf_dynamic_do_Rel elf_dynamic_do_Rela
# define Rel Rela
# define elf_machine_rel elf_machine_rela
# define elf_machine_rel_relative elf_machine_rela_relative
-#else
-# define RELCOUNT_IDX VERSYMIDX (DT_RELCOUNT)
#endif
#ifndef DO_ELF_MACHINE_REL_RELATIVE
@@ -50,13 +47,18 @@
than fully resolved now. */
auto inline void __attribute__ ((always_inline))
-elf_dynamic_do_rel (struct link_map *map,
+elf_dynamic_do_Rel (struct link_map *map,
ElfW(Addr) reladdr, ElfW(Addr) relsize,
+ __typeof (((ElfW(Dyn) *) 0)->d_un.d_val) nrelative,
int lazy, int skip_ifunc)
{
const ElfW(Rel) *r = (const void *) reladdr;
const ElfW(Rel) *end = (const void *) (reladdr + relsize);
ElfW(Addr) l_addr = map->l_addr;
+# if defined ELF_MACHINE_IRELATIVE && !defined RTLD_BOOTSTRAP
+ const ElfW(Rel) *r2 = NULL;
+ const ElfW(Rel) *end2 = NULL;
+# endif
#if (!defined DO_RELA || !defined ELF_MACHINE_PLT_REL) && !defined RTLD_BOOTSTRAP
/* We never bind lazily during ld.so bootstrap. Unfortunately gcc is
@@ -66,17 +68,31 @@ elf_dynamic_do_rel (struct link_map *map,
{
/* Doing lazy PLT relocations; they need very little info. */
for (; r < end; ++r)
- elf_machine_lazy_rel (map, l_addr, r, skip_ifunc);
+# ifdef ELF_MACHINE_IRELATIVE
+ if (ELFW(R_TYPE) (r->r_info) == ELF_MACHINE_IRELATIVE)
+ {
+ if (r2 == NULL)
+ r2 = r;
+ end2 = r;
+ }
+ else
+# endif
+ elf_machine_lazy_rel (map, l_addr, r, skip_ifunc);
+
+# ifdef ELF_MACHINE_IRELATIVE
+ if (r2 != NULL)
+ for (; r2 <= end2; ++r2)
+ if (ELFW(R_TYPE) (r2->r_info) == ELF_MACHINE_IRELATIVE)
+ elf_machine_lazy_rel (map, l_addr, r2, skip_ifunc);
+# endif
}
else
#endif
{
const ElfW(Sym) *const symtab =
(const void *) D_PTR (map, l_info[DT_SYMTAB]);
- ElfW(Word) nrelative = (map->l_info[RELCOUNT_IDX] == NULL
- ? 0 : map->l_info[RELCOUNT_IDX]->d_un.d_val);
const ElfW(Rel) *relative = r;
- r = r + MIN (nrelative, relsize / sizeof (ElfW(Rel)));
+ r += nrelative;
#ifndef RTLD_BOOTSTRAP
/* This is defined in rtld.c, but nowhere in the static libc.a; make
@@ -116,24 +132,69 @@ elf_dynamic_do_rel (struct link_map *map,
for (; r < end; ++r)
{
+#if defined ELF_MACHINE_IRELATIVE && !defined RTLD_BOOTSTRAP
+ if (ELFW(R_TYPE) (r->r_info) == ELF_MACHINE_IRELATIVE)
+ {
+ if (r2 == NULL)
+ r2 = r;
+ end2 = r;
+ continue;
+ }
+#endif
+
ElfW(Half) ndx = version[ELFW(R_SYM) (r->r_info)] & 0x7fff;
elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)],
&map->l_versions[ndx],
(void *) (l_addr + r->r_offset), skip_ifunc);
}
+
+#if defined ELF_MACHINE_IRELATIVE && !defined RTLD_BOOTSTRAP
+ if (r2 != NULL)
+ for (; r2 <= end2; ++r2)
+ if (ELFW(R_TYPE) (r2->r_info) == ELF_MACHINE_IRELATIVE)
+ {
+ ElfW(Half) ndx
+ = version[ELFW(R_SYM) (r2->r_info)] & 0x7fff;
+ elf_machine_rel (map, r2,
+ &symtab[ELFW(R_SYM) (r2->r_info)],
+ &map->l_versions[ndx],
+ (void *) (l_addr + r2->r_offset),
+ skip_ifunc);
+ }
+#endif
}
#ifndef RTLD_BOOTSTRAP
else
- for (; r < end; ++r)
- elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL,
- (void *) (l_addr + r->r_offset), skip_ifunc);
+ {
+ for (; r < end; ++r)
+# ifdef ELF_MACHINE_IRELATIVE
+ if (ELFW(R_TYPE) (r->r_info) == ELF_MACHINE_IRELATIVE)
+ {
+ if (r2 == NULL)
+ r2 = r;
+ end2 = r;
+ }
+ else
+# endif
+ elf_machine_rel (map, r, &symtab[ELFW(R_SYM) (r->r_info)], NULL,
+ (void *) (l_addr + r->r_offset), skip_ifunc);
+
+# ifdef ELF_MACHINE_IRELATIVE
+ if (r2 != NULL)
+ for (; r2 <= end2; ++r2)
+ if (ELFW(R_TYPE) (r2->r_info) == ELF_MACHINE_IRELATIVE)
+ elf_machine_rel (map, r2, &symtab[ELFW(R_SYM) (r2->r_info)],
+ NULL, (void *) (l_addr + r2->r_offset),
+ skip_ifunc);
+# endif
+ }
#endif
}
}
-#undef elf_dynamic_do_rel
+#undef elf_dynamic_do_Rel
#undef Rel
#undef elf_machine_rel
#undef elf_machine_rel_relative
#undef DO_ELF_MACHINE_REL_RELATIVE
-#undef RELCOUNT_IDX
+#undef DO_RELA
diff --git a/elf/dynamic-link.h b/elf/dynamic-link.h
index 2bdab45464..9cdbee1e34 100644
--- a/elf/dynamic-link.h
+++ b/elf/dynamic-link.h
@@ -258,17 +258,24 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
# ifdef ELF_MACHINE_PLTREL_OVERLAP
# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, skip_ifunc, test_rel) \
do { \
- struct { ElfW(Addr) start, size; int lazy; } ranges[3]; \
+ struct { ElfW(Addr) start, size; \
+ __typeof (((ElfW(Dyn) *) 0)->d_un.d_val) nrelative; int lazy; } \
+ ranges[3]; \
int ranges_index; \
\
ranges[0].lazy = ranges[2].lazy = 0; \
ranges[1].lazy = 1; \
ranges[0].size = ranges[1].size = ranges[2].size = 0; \
+ ranges[0].nrelative = ranges[1].nrelative = ranges[2].nrelative = 0; \
\
if ((map)->l_info[DT_##RELOC]) \
{ \
ranges[0].start = D_PTR ((map), l_info[DT_##RELOC]); \
ranges[0].size = (map)->l_info[DT_##RELOC##SZ]->d_un.d_val; \
+ if (map->l_info[VERSYMIDX (DT_##RELOC##COUNT)] != NULL) \
+ ranges[0].nrelative \
+ = MIN (map->l_info[VERSYMIDX (DT_##RELOC##COUNT)]->d_un.d_val, \
+ ranges[0].size / sizeof (ElfW(reloc))); \
} \
\
if ((do_lazy) \
@@ -286,21 +293,25 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
elf_dynamic_do_##reloc ((map), \
ranges[ranges_index].start, \
ranges[ranges_index].size, \
+ ranges[ranges_index].nrelative, \
ranges[ranges_index].lazy, \
skip_ifunc); \
} while (0)
# else
# define _ELF_DYNAMIC_DO_RELOC(RELOC, reloc, map, do_lazy, skip_ifunc, test_rel) \
do { \
- struct { ElfW(Addr) start, size; int lazy; } ranges[2]; \
- ranges[0].lazy = 0; \
- ranges[0].size = ranges[1].size = 0; \
- ranges[0].start = 0; \
+ struct { ElfW(Addr) start, size; \
+ __typeof (((ElfW(Dyn) *) 0)->d_un.d_val) nrelative; int lazy; } \
+ ranges[2] = { { 0, 0, 0, 0 }, { 0, 0, 0, 0 } }; \
\
if ((map)->l_info[DT_##RELOC]) \
{ \
ranges[0].start = D_PTR ((map), l_info[DT_##RELOC]); \
ranges[0].size = (map)->l_info[DT_##RELOC##SZ]->d_un.d_val; \
+ if (map->l_info[VERSYMIDX (DT_##RELOC##COUNT)] != NULL) \
+ ranges[0].nrelative \
+ = MIN (map->l_info[VERSYMIDX (DT_##RELOC##COUNT)]->d_un.d_val, \
+ ranges[0].size / sizeof (ElfW(reloc))); \
} \
if ((map)->l_info[DT_PLTREL] \
&& (!test_rel || (map)->l_info[DT_PLTREL]->d_un.d_val == DT_##RELOC)) \
@@ -312,7 +323,8 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
/* This test does not only detect whether the relocation \
sections are in the right order, it also checks whether \
there is a DT_REL/DT_RELA section. */ \
- || ranges[0].start + ranges[0].size != start)) \
+ || __builtin_expect (ranges[0].start + ranges[0].size \
+ != start, 0))) \
{ \
ranges[1].start = start; \
ranges[1].size = (map)->l_info[DT_PLTRELSZ]->d_un.d_val; \
@@ -327,8 +339,8 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
} \
\
if (ELF_DURING_STARTUP) \
- elf_dynamic_do_##reloc ((map), ranges[0].start, ranges[0].size, 0, \
- skip_ifunc); \
+ elf_dynamic_do_##reloc ((map), ranges[0].start, ranges[0].size, \
+ ranges[0].nrelative, 0, skip_ifunc); \
else \
{ \
int ranges_index; \
@@ -336,6 +348,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
elf_dynamic_do_##reloc ((map), \
ranges[ranges_index].start, \
ranges[ranges_index].size, \
+ ranges[ranges_index].nrelative, \
ranges[ranges_index].lazy, \
skip_ifunc); \
} \
@@ -351,7 +364,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
# if ! ELF_MACHINE_NO_REL
# include "do-rel.h"
# define ELF_DYNAMIC_DO_REL(map, lazy, skip_ifunc) \
- _ELF_DYNAMIC_DO_RELOC (REL, rel, map, lazy, skip_ifunc, _ELF_CHECK_REL)
+ _ELF_DYNAMIC_DO_RELOC (REL, Rel, map, lazy, skip_ifunc, _ELF_CHECK_REL)
# else
# define ELF_DYNAMIC_DO_REL(map, lazy, skip_ifunc) /* Nothing to do. */
# endif
@@ -360,7 +373,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp)
# define DO_RELA
# include "do-rel.h"
# define ELF_DYNAMIC_DO_RELA(map, lazy, skip_ifunc) \
- _ELF_DYNAMIC_DO_RELOC (RELA, rela, map, lazy, skip_ifunc, _ELF_CHECK_REL)
+ _ELF_DYNAMIC_DO_RELOC (RELA, Rela, map, lazy, skip_ifunc, _ELF_CHECK_REL)
# else
# define ELF_DYNAMIC_DO_RELA(map, lazy, skip_ifunc) /* Nothing to do. */
# endif
diff --git a/elf/pldd-xx.c b/elf/pldd-xx.c
index 8ecd468dd1..1e84ec211b 100644
--- a/elf/pldd-xx.c
+++ b/elf/pldd-xx.c
@@ -101,7 +101,6 @@ E(find_maps) (pid_t pid, void *auxv, size_t auxv_size)
default:
break;
}
- printf("progam header at offset %lu\n", (unsigned long)phdr);
if (phdr == 0 || phnum == 0 || phent == 0)
error (EXIT_FAILURE, 0, gettext ("cannot find program header of process"));
diff --git a/elf/sprof.c b/elf/sprof.c
index dbe217b083..c90c22c265 100644
--- a/elf/sprof.c
+++ b/elf/sprof.c
@@ -596,10 +596,11 @@ load_shobj (const char *name)
static const char procpath[] = "/proc/self/fd/%d";
char origprocname[sizeof (procpath) + sizeof (int) * 3];
snprintf (origprocname, sizeof (origprocname), procpath, fd);
- char *origlink = (char *) alloca (PATH_MAX + 1);
- origlink[PATH_MAX] = '\0';
- if (readlink (origprocname, origlink, PATH_MAX) == -1)
+ char *origlink = (char *) alloca (PATH_MAX);
+ ssize_t n = readlink (origprocname, origlink, PATH_MAX - 1);
+ if (n == -1)
goto no_debuginfo;
+ origlink[n] = '\0';
/* Try to find the actual file. There are three places:
1. the same directory the DSO is in
diff --git a/elf/tst-auditmod4b.c b/elf/tst-auditmod4b.c
index a6d3c6a6c5..761d97ce9d 100644
--- a/elf/tst-auditmod4b.c
+++ b/elf/tst-auditmod4b.c
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
static int avx = -1;
-static int
+static inline int
__attribute ((always_inline))
check_avx (void)
{
diff --git a/elf/tst-auditmod6b.c b/elf/tst-auditmod6b.c
index f756b50227..a7a60b9927 100644
--- a/elf/tst-auditmod6b.c
+++ b/elf/tst-auditmod6b.c
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
static int avx = -1;
-static int
+static inline int
__attribute ((always_inline))
check_avx (void)
{
diff --git a/elf/tst-auditmod6c.c b/elf/tst-auditmod6c.c
index 49cbf05492..e0b5ac2319 100644
--- a/elf/tst-auditmod6c.c
+++ b/elf/tst-auditmod6c.c
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
static int avx = -1;
-static int
+static inline int
__attribute ((always_inline))
check_avx (void)
{
diff --git a/elf/tst-auditmod7b.c b/elf/tst-auditmod7b.c
index eb237586fe..a27d38540e 100644
--- a/elf/tst-auditmod7b.c
+++ b/elf/tst-auditmod7b.c
@@ -108,7 +108,7 @@ la_symbind64 (Elf64_Sym *sym, unsigned int ndx, uintptr_t *refcook,
static int avx = -1;
-static int
+static inline int
__attribute ((always_inline))
check_avx (void)
{
diff --git a/grp/initgroups.c b/grp/initgroups.c
index 48119ff7f2..c63bba1388 100644
--- a/grp/initgroups.c
+++ b/grp/initgroups.c
@@ -82,9 +82,8 @@ internal_getgrouplist (const char *user, gid_t group, long int *size,
if (__nss_initgroups_database == NULL)
{
- no_more = __nss_database_lookup ("initgroups", NULL, "",
- &__nss_initgroups_database);
- if (no_more == 0 && __nss_initgroups_database == NULL)
+ if (__nss_database_lookup ("initgroups", NULL, "",
+ &__nss_initgroups_database) < 0)
{
if (__nss_group_database == NULL)
no_more = __nss_database_lookup ("group", NULL, "compat files",
@@ -92,11 +91,8 @@ internal_getgrouplist (const char *user, gid_t group, long int *size,
__nss_initgroups_database = __nss_group_database;
}
- else if (__nss_initgroups_database != NULL)
- {
- assert (no_more == 0);
- use_initgroups_entry = true;
- }
+ else
+ use_initgroups_entry = true;
}
else
/* __nss_initgroups_database might have been set through
diff --git a/hesiod/hesiod.c b/hesiod/hesiod.c
index b3706b506b..a3f22e5c88 100644
--- a/hesiod/hesiod.c
+++ b/hesiod/hesiod.c
@@ -278,7 +278,7 @@ parse_config_file(struct hesiod_p *ctx, const char *filename) {
/*
* Now open and parse the file...
*/
- if (!(fp = fopen(filename, "r")))
+ if (!(fp = fopen(filename, "rce")))
return (-1);
while (fgets(buf, sizeof(buf), fp) != NULL) {
@@ -482,7 +482,7 @@ __hesiod_res_get(void *context) {
void
__hesiod_res_set(void *context, struct __res_state *res,
- void (*free_res)(void *)) {
+ void (*free_res)(void *)) {
struct hesiod_p *ctx = context;
if (ctx->res && ctx->free_res) {
diff --git a/iconv/gconv.h b/iconv/gconv.h
index 2946335e5e..bc6d381aa0 100644
--- a/iconv/gconv.h
+++ b/iconv/gconv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-1999, 2000-2002, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 1997-1999, 2000-2002, 2007, 2011 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
@@ -56,7 +56,8 @@ enum
enum
{
__GCONV_IS_LAST = 0x0001,
- __GCONV_IGNORE_ERRORS = 0x0002
+ __GCONV_IGNORE_ERRORS = 0x0002,
+ __GCONV_SWAP = 0x0004
};
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
index b28cb3c9ab..7b7c340e99 100644
--- a/iconv/gconv_conf.c
+++ b/iconv/gconv_conf.c
@@ -364,7 +364,7 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
{
/* Note the file is opened with cancellation in the I/O functions
disabled. */
- FILE *fp = fopen (filename, "rc");
+ FILE *fp = fopen (filename, "rce");
char *line = NULL;
size_t line_len = 0;
static int modcounter;
diff --git a/iconvdata/Makefile b/iconvdata/Makefile
index 94f860ab9b..18606603d6 100644
--- a/iconvdata/Makefile
+++ b/iconvdata/Makefile
@@ -130,7 +130,7 @@ LDFLAGS-libJISX0213.so = $(LDFLAGS-soname-fname)
distribute := gconv-modules extra-module.mk gap.awk gaptab.awk gconv.map \
gen-8bit.sh gen-8bit-gap.sh gen-8bit-gap-1.sh \
- TESTS $(filter-out testdata/CVS%, $(wildcard testdata/*)) \
+ TESTS $(wildcard testdata/*) \
TESTS2 run-iconv-test.sh tst-tables.sh tst-table.sh \
tst-table-charmap.sh tst-table-from.c tst-table-to.c \
EUC-JP.irreversible ISIRI-3342.irreversible SJIS.irreversible \
diff --git a/iconvdata/cp1258.c b/iconvdata/cp1258.c
index 2b741ba96f..b7d23182eb 100644
--- a/iconvdata/cp1258.c
+++ b/iconvdata/cp1258.c
@@ -197,8 +197,7 @@ static const struct
{ 0x0077, 0x1E83 },
{ 0x0079, 0x00FD },
{ 0x007A, 0x017A },
- /* { 0x00A5, 0x0385 }, Wrong, A5 is Yen sign */
- { 0x00A8, 0x1FEE },
+ { 0x00A8, 0x0385 }, /* prefer U+0385 over U+1FEE */
{ 0x00C2, 0x1EA4 },
{ 0x00C5, 0x01FA },
{ 0x00C6, 0x01FC },
diff --git a/iconvdata/tcvn5712-1.c b/iconvdata/tcvn5712-1.c
index c94dadb2e7..3cfdf468d9 100644
--- a/iconvdata/tcvn5712-1.c
+++ b/iconvdata/tcvn5712-1.c
@@ -1,5 +1,5 @@
/* Conversion to and from TCVN5712-1.
- Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -158,7 +158,7 @@ static const struct
{ 0x01AF, 0x1EEA },
{ 0x01B0, 0x1EEB },
#define COMP_TABLE_IDX_0301 (COMP_TABLE_IDX_0300 + COMP_TABLE_LEN_0300)
-#define COMP_TABLE_LEN_0301 51
+#define COMP_TABLE_LEN_0301 50
{ 0x0041, 0x00C1 },
{ 0x0043, 0x0106 },
{ 0x0045, 0x00C9 },
@@ -193,8 +193,7 @@ static const struct
{ 0x0077, 0x1E83 },
{ 0x0079, 0x00FD },
{ 0x007A, 0x017A },
- { 0x00A5, 0x0385 },
- /*{ 0x00A8, 0x1FEE },*/
+ /*{ 0x00A8, 0x0385 },*//* prefer U+0385 over U+1FEE */
{ 0x00C2, 0x1EA4 },
/*{ 0x00C5, 0x01FA },*/
/*{ 0x00C6, 0x01FC },*/
@@ -492,7 +491,7 @@ static const struct
#include <iconv/loop.c>
-/* Next, define the conversion function from UCS4 to CP1258. */
+/* Next, define the conversion function from UCS4 to TCVN5712-1. */
static const unsigned char from_ucs4[] =
{
diff --git a/iconvdata/unicode.c b/iconvdata/unicode.c
index df452d2a1d..dba4c34d64 100644
--- a/iconvdata/unicode.c
+++ b/iconvdata/unicode.c
@@ -1,5 +1,5 @@
/* Conversion module for Unicode
- Copyright (C) 1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000-2002, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -57,7 +57,7 @@
*inptrp = inptr += 2; \
else if (get16u (inptr) == BOM_OE) \
{ \
- ((struct unicode_data *) step->__data)->swap = 1; \
+ data->__flags |= __GCONV_SWAP; \
*inptrp = inptr += 2; \
} \
} \
@@ -71,7 +71,7 @@
put16u (outbuf, BOM); \
outbuf += 2; \
} \
- swap = ((struct unicode_data *) step->__data)->swap;
+ swap = data->__flags & __GCONV_SWAP;
#define EXTRA_LOOP_ARGS , swap
@@ -86,7 +86,6 @@ enum direction
struct unicode_data
{
enum direction dir;
- int swap;
};
@@ -110,7 +109,6 @@ gconv_init (struct __gconv_step *step)
if (new_data != NULL)
{
new_data->dir = dir;
- new_data->swap = 0;
step->__data = new_data;
if (dir == from_unicode)
diff --git a/iconvdata/utf-16.c b/iconvdata/utf-16.c
index 7f6c760900..e34d23fdf2 100644
--- a/iconvdata/utf-16.c
+++ b/iconvdata/utf-16.c
@@ -1,5 +1,5 @@
/* Conversion module for UTF-16.
- Copyright (C) 1999, 2000-2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000-2002, 2003, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -44,35 +44,42 @@
#define PREPARE_LOOP \
enum direction dir = ((struct utf16_data *) step->__data)->dir; \
enum variant var = ((struct utf16_data *) step->__data)->var; \
- if (__builtin_expect (data->__invocation_counter == 0, 0) && var == UTF_16) \
+ if (__builtin_expect (data->__invocation_counter == 0, 0)) \
{ \
- if (FROM_DIRECTION) \
+ if (var == UTF_16) \
{ \
- /* We have to find out which byte order the file is encoded in. */ \
- if (inptr + 2 > inend) \
- return (inptr == inend \
- ? __GCONV_EMPTY_INPUT : __GCONV_INCOMPLETE_INPUT); \
- \
- if (get16u (inptr) == BOM) \
- /* Simply ignore the BOM character. */ \
- *inptrp = inptr += 2; \
- else if (get16u (inptr) == BOM_OE) \
+ if (FROM_DIRECTION) \
{ \
- ((struct utf16_data *) step->__data)->swap = 1; \
- *inptrp = inptr += 2; \
+ /* We have to find out which byte order the file is \
+ encoded in. */ \
+ if (inptr + 2 > inend) \
+ return (inptr == inend \
+ ? __GCONV_EMPTY_INPUT : __GCONV_INCOMPLETE_INPUT); \
+ \
+ if (get16u (inptr) == BOM) \
+ /* Simply ignore the BOM character. */ \
+ *inptrp = inptr += 2; \
+ else if (get16u (inptr) == BOM_OE) \
+ { \
+ data->__flags |= __GCONV_SWAP; \
+ *inptrp = inptr += 2; \
+ } \
} \
- } \
- else if (!FROM_DIRECTION && !data->__internal_use) \
- { \
- /* Emit the Byte Order Mark. */ \
- if (__builtin_expect (outbuf + 2 > outend, 0)) \
- return __GCONV_FULL_OUTPUT; \
+ else if (!FROM_DIRECTION && !data->__internal_use) \
+ { \
+ /* Emit the Byte Order Mark. */ \
+ if (__builtin_expect (outbuf + 2 > outend, 0)) \
+ return __GCONV_FULL_OUTPUT; \
\
- put16u (outbuf, BOM); \
- outbuf += 2; \
+ put16u (outbuf, BOM); \
+ outbuf += 2; \
+ } \
} \
+ else if ((var == UTF_16LE && BYTE_ORDER == BIG_ENDIAN) \
+ || (var == UTF_16BE && BYTE_ORDER == LITTLE_ENDIAN)) \
+ data->__flags |= __GCONV_SWAP; \
} \
- int swap = ((struct utf16_data *) step->__data)->swap;
+ const int swap = data->__flags & __GCONV_SWAP;
#define EXTRA_LOOP_ARGS , swap
@@ -96,7 +103,6 @@ struct utf16_data
{
enum direction dir;
enum variant var;
- int swap;
};
@@ -151,9 +157,6 @@ gconv_init (struct __gconv_step *step)
{
new_data->dir = dir;
new_data->var = var;
- new_data->swap = ((var == UTF_16LE && BYTE_ORDER == BIG_ENDIAN)
- || (var == UTF_16BE
- && BYTE_ORDER == LITTLE_ENDIAN));
step->__data = new_data;
if (dir == from_utf16)
diff --git a/iconvdata/utf-32.c b/iconvdata/utf-32.c
index cc02651374..27ea3db607 100644
--- a/iconvdata/utf-32.c
+++ b/iconvdata/utf-32.c
@@ -1,5 +1,5 @@
/* Conversion module for UTF-32.
- Copyright (C) 1999, 2000-2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000-2002, 2011 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
@@ -45,7 +45,7 @@
int swap; \
if (FROM_DIRECTION && var == UTF_32) \
{ \
- if (data->__invocation_counter == 0) \
+ if (__builtin_expect (data->__invocation_counter == 0, 0)) \
{ \
/* We have to find out which byte order the file is encoded in. */ \
if (inptr + 4 > inend) \
@@ -57,7 +57,7 @@
*inptrp = inptr += 4; \
else if (get32u (inptr) == BOM_OE) \
{ \
- ((struct utf32_data *) step->__data)->swap = 1; \
+ data->__flags |= __GCONV_SWAP; \
*inptrp = inptr += 4; \
} \
} \
@@ -72,7 +72,11 @@
put32u (outbuf, BOM); \
outbuf += 4; \
} \
- swap = ((struct utf32_data *) step->__data)->swap;
+ else if (__builtin_expect (data->__invocation_counter == 0, 0) \
+ && ((var == UTF_32LE && BYTE_ORDER == BIG_ENDIAN) \
+ || (var == UTF_32BE && BYTE_ORDER == LITTLE_ENDIAN))) \
+ data->__flags |= __GCONV_SWAP; \
+ swap = data->__flags & __GCONV_SWAP;
#define EXTRA_LOOP_ARGS , var, swap
@@ -96,7 +100,6 @@ struct utf32_data
{
enum direction dir;
enum variant var;
- int swap;
};
@@ -151,9 +154,6 @@ gconv_init (struct __gconv_step *step)
{
new_data->dir = dir;
new_data->var = var;
- new_data->swap = ((var == UTF_32LE && BYTE_ORDER == BIG_ENDIAN)
- || (var == UTF_32BE
- && BYTE_ORDER == LITTLE_ENDIAN));
step->__data = new_data;
if (dir == from_utf32)
@@ -216,9 +216,8 @@ gconv_end (struct __gconv_step *data)
} \
\
if (swap) \
- put32 (outptr, bswap_32 (c)); \
- else \
- put32 (outptr, c); \
+ c = bswap_32 (c); \
+ put32 (outptr, c); \
\
outptr += 4; \
inptr += 4; \
diff --git a/include/alloca.h b/include/alloca.h
index 83504135f4..f741d25d54 100644
--- a/include/alloca.h
+++ b/include/alloca.h
@@ -20,9 +20,13 @@ libc_hidden_proto (__libc_alloca_cutoff)
#include <allocalim.h>
+#ifndef stackinfo_alloca_round
+# define stackinfo_alloca_round(l) (((l) + 15) & -16)
+#endif
+
#if _STACK_GROWS_DOWN
# define extend_alloca(buf, len, newlen) \
- (__typeof (buf)) ({ size_t __newlen = (newlen); \
+ (__typeof (buf)) ({ size_t __newlen = stackinfo_alloca_round (newlen); \
char *__newbuf = __alloca (__newlen); \
if (__newbuf + __newlen == (char *) buf) \
len += __newlen; \
@@ -31,10 +35,10 @@ libc_hidden_proto (__libc_alloca_cutoff)
__newbuf; })
#elif _STACK_GROWS_UP
# define extend_alloca(buf, len, newlen) \
- (__typeof (buf)) ({ size_t __newlen = (newlen); \
+ (__typeof (buf)) ({ size_t __newlen = stackinfo_alloca_round (newlen); \
char *__newbuf = __alloca (__newlen); \
char *__buf = (buf); \
- if (__buf + __newlen == __newbuf) \
+ if (__buf + len == __newbuf) \
{ \
len += __newlen; \
__newbuf = __buf; \
diff --git a/include/ctype.h b/include/ctype.h
index f4b782e136..4b5abda375 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -1,5 +1,9 @@
#ifndef _CTYPE_H
+/* Initialize ctype locale data. */
+extern void __ctype_init (void);
+libc_hidden_proto (__ctype_init)
+
extern int __isctype (int __c, int __mask);
# ifndef NOT_IN_libc
@@ -22,31 +26,23 @@ __libc_tsd_define (extern, const uint16_t *, CTYPE_B)
__libc_tsd_define (extern, const int32_t *, CTYPE_TOUPPER)
__libc_tsd_define (extern, const int32_t *, CTYPE_TOLOWER)
+
CTYPE_EXTERN_INLINE const uint16_t ** __attribute__ ((const))
__ctype_b_loc (void)
{
- const uint16_t **tablep = __libc_tsd_address (const uint16_t *, CTYPE_B);
- if (__builtin_expect (*tablep == NULL, 0))
- *tablep = (const uint16_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_CLASS) + 128;
- return tablep;
+ return __libc_tsd_address (const uint16_t *, CTYPE_B);
}
CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
__ctype_toupper_loc (void)
{
- const int32_t **tablep = __libc_tsd_address (const int32_t *, CTYPE_TOUPPER);
- if (__builtin_expect (*tablep == NULL, 0))
- *tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOUPPER) + 128);
- return tablep;
+ return __libc_tsd_address (const int32_t *, CTYPE_TOUPPER);
}
CTYPE_EXTERN_INLINE const int32_t ** __attribute__ ((const))
__ctype_tolower_loc (void)
{
- const int32_t **tablep = __libc_tsd_address (const int32_t *, CTYPE_TOLOWER);
- if (__builtin_expect (*tablep == NULL, 0))
- *tablep = ((int32_t *) _NL_CURRENT (LC_CTYPE, _NL_CTYPE_TOLOWER) + 128);
- return tablep;
+ return __libc_tsd_address (const int32_t *, CTYPE_TOLOWER);
}
# endif /* Not NOT_IN_libc. */
diff --git a/include/features.h b/include/features.h
index 8f888578fc..c7b7972806 100644
--- a/include/features.h
+++ b/include/features.h
@@ -339,7 +339,7 @@
/* Major and minor version number of the GNU C library package. Use
these macros to test for features in specific releases. */
#define __GLIBC__ 2
-#define __GLIBC_MINOR__ 14
+#define __GLIBC_MINOR__ 15
#define __GLIBC_PREREQ(maj, min) \
((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
diff --git a/include/ifaddrs.h b/include/ifaddrs.h
index 50e4c48e82..e1c6cac114 100644
--- a/include/ifaddrs.h
+++ b/include/ifaddrs.h
@@ -21,8 +21,13 @@ struct in6addrinfo
extern void __check_pf (bool *seen_ipv4, bool *seen_ipv6,
struct in6addrinfo **in6ai, size_t *in6ailen)
attribute_hidden;
+extern void __free_in6ai (struct in6addrinfo *in6ai) attribute_hidden;
extern void __check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
attribute_hidden;
+#ifdef IS_IN_nscd
+extern uint32_t __bump_nl_timestamp (void) attribute_hidden;
+#endif
+
#endif /* ifaddrs.h */
diff --git a/include/math.h b/include/math.h
index eb29ef1a56..3934880171 100644
--- a/include/math.h
+++ b/include/math.h
@@ -31,4 +31,8 @@ libm_hidden_proto (__expl)
libm_hidden_proto (__expm1l)
# endif
+extern int __isinf_ns (double);
+extern int __isinf_nsf (float);
+extern int __isinf_nsl (long double);
+
#endif
diff --git a/include/unistd.h b/include/unistd.h
index 5014e2e772..3231943b02 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -117,7 +117,7 @@ extern int __ttyname_r (int __fd, char *__buf, size_t __buflen);
extern int __isatty (int __fd);
extern int __link (__const char *__from, __const char *__to);
extern int __symlink (__const char *__from, __const char *__to);
-extern int __readlink (__const char *__path, char *__buf, size_t __len);
+extern ssize_t __readlink (__const char *__path, char *__buf, size_t __len);
extern int __unlink (__const char *__name);
extern int __gethostname (char *__name, size_t __len);
extern int __profil (unsigned short int *__sample_buffer, size_t __size,
diff --git a/inet/Makefile b/inet/Makefile
index 37985940ae..12d573fa06 100644
--- a/inet/Makefile
+++ b/inet/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1991-2006, 2007, 2009, 2011 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
@@ -53,7 +53,7 @@ aux := check_pf check_native ifreq
tests := htontest test_ifindex tst-ntoa tst-ether_aton tst-network \
tst-gethnm test-ifaddrs bug-if1 test-inet6_opt tst-ether_line \
- tst-getni1 tst-getni2 tst-inet6_rth
+ tst-getni1 tst-getni2 tst-inet6_rth tst-checks
include ../Rules
@@ -97,5 +97,5 @@ endif
ifeq (yes,$(build-static-nss))
otherlibs += $(nssobjdir)/libnss_files.a $(resolvobjdir)/libnss_dns.a \
- $(resolvobjdir)/libresolv.a
+ $(resolvobjdir)/libresolv.a
endif
diff --git a/inet/check_pf.c b/inet/check_pf.c
index b015432659..0fa34ccbbd 100644
--- a/inet/check_pf.c
+++ b/inet/check_pf.c
@@ -1,5 +1,5 @@
/* Determine protocol families for which interfaces exist. Generic version.
- Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2011 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
@@ -54,3 +54,19 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
(void) freeifaddrs (ifa);
}
+
+
+void
+__free_in6ai (struct in6addrinfo *in6ai)
+{
+ /* Nothing to do. */
+}
+
+
+#ifdef IS_IN_nscd
+uint32_t
+__bump_nl_timestamp (void)
+{
+ return 0;
+}
+#endif
diff --git a/inet/getnameinfo.c b/inet/getnameinfo.c
index 6fb6ad6e1d..436604b756 100644
--- a/inet/getnameinfo.c
+++ b/inet/getnameinfo.c
@@ -346,10 +346,11 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
"%u", scopeid);
if (real_hostlen + scopelen + 1 > hostlen)
- /* XXX We should not fail here. Simply enlarge
- the buffer or return with out of memory. */
- return EAI_SYSTEM;
- memcpy (host + real_hostlen, scopebuf, scopelen + 1);
+ /* Signal the buffer is too small. This is
+ what inet_ntop does. */
+ c = NULL;
+ else
+ memcpy (host + real_hostlen, scopebuf, scopelen + 1);
}
}
else
@@ -357,7 +358,7 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
(const void *) &(((const struct sockaddr_in *) sa)->sin_addr),
host, hostlen);
if (c == NULL)
- return EAI_SYSTEM;
+ return EAI_OVERFLOW;
}
ok = 1;
}
diff --git a/inet/getnetgrent_r.c b/inet/getnetgrent_r.c
index 87903877bf..197dd37a5d 100644
--- a/inet/getnetgrent_r.c
+++ b/inet/getnetgrent_r.c
@@ -250,11 +250,11 @@ nscd_getnetgrent (struct __netgrent *datap, char *buffer, size_t buflen,
datap->type = triple_val;
datap->val.triple.host = datap->cursor;
- datap->cursor = (char *) rawmemchr (datap->cursor, '\0') + 1;
+ datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
datap->val.triple.user = datap->cursor;
- datap->cursor = (char *) rawmemchr (datap->cursor, '\0') + 1;
+ datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
datap->val.triple.domain = datap->cursor;
- datap->cursor = (char *) rawmemchr (datap->cursor, '\0') + 1;
+ datap->cursor = (char *) __rawmemchr (datap->cursor, '\0') + 1;
return NSS_STATUS_SUCCESS;
}
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
index 180227af5b..2c2c1847a2 100644
--- a/inet/netinet/in.h
+++ b/inet/netinet/in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008
+/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007, 2008, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -396,44 +396,96 @@ extern uint16_t htons (uint16_t __hostshort)
# endif
#endif
-#define IN6_IS_ADDR_UNSPECIFIED(a) \
+#ifdef __GNUC__
+# define IN6_IS_ADDR_UNSPECIFIED(a) \
+ (__extension__ \
+ ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ __a->s6_addr32[0] == 0 \
+ && __a->s6_addr32[1] == 0 \
+ && __a->s6_addr32[2] == 0 \
+ && __a->s6_addr32[3] == 0; }))
+
+# define IN6_IS_ADDR_LOOPBACK(a) \
+ (__extension__ \
+ ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ __a->s6_addr32[0] == 0 \
+ && __a->s6_addr32[1] == 0 \
+ && __a->s6_addr32[2] == 0 \
+ && __a->s6_addr32[3] == htonl (1); }))
+
+# define IN6_IS_ADDR_LINKLOCAL(a) \
+ (__extension__ \
+ ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ (__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfe800000); }))
+
+# define IN6_IS_ADDR_SITELOCAL(a) \
+ (__extension__ \
+ ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ (__a->s6_addr32[0] & htonl (0xffc00000)) == htonl (0xfec00000); }))
+
+# define IN6_IS_ADDR_V4MAPPED(a) \
+ (__extension__ \
+ ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ __a->s6_addr32[0] == 0 \
+ && __a->s6_addr32[1] == 0 \
+ && __a->s6_addr32[2] == htonl (0xffff); }))
+
+# define IN6_IS_ADDR_V4COMPAT(a) \
+ (__extension__ \
+ ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ __a->s6_addr32[0] == 0 \
+ && __a->s6_addr32[1] == 0 \
+ && __a->s6_addr32[2] == 0 \
+ && ntohl (__a->s6_addr32[3]) > 1; }))
+
+# define IN6_ARE_ADDR_EQUAL(a,b) \
+ (__extension__ \
+ ({ __const struct in6_addr *__a = (__const struct in6_addr *) (a); \
+ __const struct in6_addr *__b = (__const struct in6_addr *) (b); \
+ __a->s6_addr32[0] == __b->s6_addr32[0] \
+ && __a->s6_addr32[1] == __b->s6_addr32[1] \
+ && __a->s6_addr32[2] == __b->s6_addr32[2] \
+ && __a->s6_addr32[3] == __b->s6_addr32[3]; }))
+#else
+# define IN6_IS_ADDR_UNSPECIFIED(a) \
(((__const uint32_t *) (a))[0] == 0 \
&& ((__const uint32_t *) (a))[1] == 0 \
&& ((__const uint32_t *) (a))[2] == 0 \
&& ((__const uint32_t *) (a))[3] == 0)
-#define IN6_IS_ADDR_LOOPBACK(a) \
+# define IN6_IS_ADDR_LOOPBACK(a) \
(((__const uint32_t *) (a))[0] == 0 \
&& ((__const uint32_t *) (a))[1] == 0 \
&& ((__const uint32_t *) (a))[2] == 0 \
&& ((__const uint32_t *) (a))[3] == htonl (1))
-#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff)
-
-#define IN6_IS_ADDR_LINKLOCAL(a) \
+# define IN6_IS_ADDR_LINKLOCAL(a) \
((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
== htonl (0xfe800000))
-#define IN6_IS_ADDR_SITELOCAL(a) \
+# define IN6_IS_ADDR_SITELOCAL(a) \
((((__const uint32_t *) (a))[0] & htonl (0xffc00000)) \
== htonl (0xfec00000))
-#define IN6_IS_ADDR_V4MAPPED(a) \
+# define IN6_IS_ADDR_V4MAPPED(a) \
((((__const uint32_t *) (a))[0] == 0) \
&& (((__const uint32_t *) (a))[1] == 0) \
&& (((__const uint32_t *) (a))[2] == htonl (0xffff)))
-#define IN6_IS_ADDR_V4COMPAT(a) \
+# define IN6_IS_ADDR_V4COMPAT(a) \
((((__const uint32_t *) (a))[0] == 0) \
&& (((__const uint32_t *) (a))[1] == 0) \
&& (((__const uint32_t *) (a))[2] == 0) \
&& (ntohl (((__const uint32_t *) (a))[3]) > 1))
-#define IN6_ARE_ADDR_EQUAL(a,b) \
+# define IN6_ARE_ADDR_EQUAL(a,b) \
((((__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \
&& (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \
&& (((__const uint32_t *) (a))[2] == ((__const uint32_t *) (b))[2]) \
&& (((__const uint32_t *) (a))[3] == ((__const uint32_t *) (b))[3]))
+#endif
+
+#define IN6_IS_ADDR_MULTICAST(a) (((__const uint8_t *) (a))[0] == 0xff)
#if defined __USE_MISC || defined __USE_GNU
/* Bind socket to a privileged IP port. */
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 343e0954db..5e18b12691 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -149,7 +149,7 @@ rcmd_af(ahost, rport, locuser, remuser, cmd, fd2p, af)
__fxprintf(NULL, "rcmd: getaddrinfo: %s\n",
gai_strerror(error));
- return -1;
+ return -1;
}
pfd[0].events = POLLIN;
@@ -488,7 +488,7 @@ iruserfopen (const char *file, uid_t okuser)
cp = _("not regular file");
else
{
- res = fopen (file, "rc");
+ res = fopen (file, "rce");
if (!res)
cp = _("cannot open");
else if (__fxstat64 (_STAT_VER, fileno (res), &st) < 0)
@@ -574,8 +574,8 @@ ruserok2_sa (ra, ralen, superuser, ruser, luser, rhost)
if (hostf != NULL)
{
- isbad = __validuser2_sa (hostf, ra, ralen, luser, ruser, rhost);
- fclose (hostf);
+ isbad = __validuser2_sa (hostf, ra, ralen, luser, ruser, rhost);
+ fclose (hostf);
}
seteuid (uid);
@@ -618,7 +618,7 @@ iruserok_af (raddr, superuser, ruser, luser, af)
case AF_INET6:
ra.ss_family = AF_INET6;
memcpy (&(((struct sockaddr_in6 *)&ra)->sin6_addr), raddr,
- sizeof(struct in6_addr));
+ sizeof(struct in6_addr));
ralen = sizeof(struct sockaddr_in6);
break;
default:
@@ -778,7 +778,7 @@ __validuser2_sa(hostf, ra, ralen, luser, ruser, rhost)
while (__getline (&buf, &bufsize, hostf) > 0) {
buf[bufsize - 1] = '\0'; /* Make sure it's terminated. */
- p = buf;
+ p = buf;
/* Skip empty or comment lines */
if (__isempty (p)) {
diff --git a/inet/ruserpass.c b/inet/ruserpass.c
index e5b2caf4dc..df423ba6ee 100644
--- a/inet/ruserpass.c
+++ b/inet/ruserpass.c
@@ -114,7 +114,7 @@ ruserpass(host, aname, apass)
buf = alloca (strlen (hdir) + 8);
__stpcpy (__stpcpy (buf, hdir), "/.netrc");
- cfile = fopen(buf, "rc");
+ cfile = fopen(buf, "rce");
if (cfile == NULL) {
if (errno != ENOENT)
warn("%s", buf);
diff --git a/inet/tst-checks.c b/inet/tst-checks.c
new file mode 100644
index 0000000000..5d97564cd6
--- /dev/null
+++ b/inet/tst-checks.c
@@ -0,0 +1,173 @@
+#include <stdio.h>
+#include <string.h>
+#include <netinet/in.h>
+
+
+static int
+do_test (void)
+{
+ int result = 0;
+ char buf[16];
+ memset (buf, '\0', 16);
+
+ if (! IN6_IS_ADDR_UNSPECIFIED (buf))
+ {
+ puts ("positive IN6_IS_ADDR_UNSPECIFIED failed");
+ result = 1;
+ }
+ for (size_t i = 0; i < 16; ++i)
+ {
+ buf[i] = 1;
+ if (IN6_IS_ADDR_UNSPECIFIED (buf))
+ {
+ printf ("negative IN6_IS_ADDR_UNSPECIFIED with byte %zu failed\n",
+ i);
+ result = 1;
+ }
+ buf[i] = 0;
+ }
+
+ if (IN6_IS_ADDR_LOOPBACK (buf))
+ {
+ puts ("negative IN6_IS_ADDR_UNSPECIFIED failed");
+ result = 1;
+ }
+ buf[15] = 1;
+ if (! IN6_IS_ADDR_LOOPBACK (buf))
+ {
+ puts ("positive IN6_IS_ADDR_UNSPECIFIED failed");
+ result = 1;
+ }
+ buf[15] = 0;
+
+ buf[0] = 0xfe;
+ buf[1] = 0x80;
+ if (! IN6_IS_ADDR_LINKLOCAL (buf))
+ {
+ puts ("positive IN6_IS_ADDR_LINKLOCAL failed");
+ result = 1;
+ }
+ for (size_t i = 1; i < 16; ++i)
+ {
+ buf[i] ^= 1;
+ if (! IN6_IS_ADDR_LINKLOCAL (buf))
+ {
+ printf ("positive IN6_IS_ADDR_LINKLOCAL byte %zu failed\n", i);
+ result = 1;
+ }
+ buf[i] ^= 1;
+ }
+ buf[0] = 0xff;
+ buf[1] = 0x80;
+ if (IN6_IS_ADDR_LINKLOCAL (buf))
+ {
+ puts ("negative IN6_IS_ADDR_LINKLOCAL failed");
+ result = 1;
+ }
+ buf[0] = 0xfe;
+ buf[1] = 0xc0;
+ if (IN6_IS_ADDR_LINKLOCAL (buf))
+ {
+ puts ("negative IN6_IS_ADDR_LINKLOCAL #2 failed");
+ result = 1;
+ }
+
+ buf[0] = 0xfe;
+ buf[1] = 0xc0;
+ if (! IN6_IS_ADDR_SITELOCAL (buf))
+ {
+ puts ("positive IN6_IS_ADDR_SITELOCAL failed");
+ result = 1;
+ }
+ for (size_t i = 1; i < 16; ++i)
+ {
+ buf[i] ^= 1;
+ if (! IN6_IS_ADDR_SITELOCAL (buf))
+ {
+ printf ("positive IN6_IS_ADDR_SITELOCAL byte %zu failed\n", i);
+ result = 1;
+ }
+ buf[i] ^= 1;
+ }
+ buf[0] = 0xff;
+ buf[1] = 0x80;
+ if (IN6_IS_ADDR_SITELOCAL (buf))
+ {
+ puts ("negative IN6_IS_ADDR_SITELOCAL failed");
+ result = 1;
+ }
+ buf[0] = 0xf8;
+ buf[1] = 0xc0;
+ if (IN6_IS_ADDR_SITELOCAL (buf))
+ {
+ puts ("negative IN6_IS_ADDR_SITELOCAL #2 failed");
+ result = 1;
+ }
+
+ memset (buf, '\0', 16);
+ buf[10] = 0xff;
+ buf[11] = 0xff;
+ if (! IN6_IS_ADDR_V4MAPPED (buf))
+ {
+ puts ("positive IN6_IS_ADDR_V4MAPPED failed");
+ result = 1;
+ }
+ for (size_t i = 12; i < 16; ++i)
+ {
+ buf[i] ^= 1;
+ if (! IN6_IS_ADDR_V4MAPPED (buf))
+ {
+ printf ("positive IN6_IS_ADDR_V4MAPPED byte %zu failed\n", i);
+ result = 1;
+ }
+ buf[i] ^= 1;
+ }
+ for (size_t i = 0; i < 12; ++i)
+ {
+ buf[i] ^= 1;
+ if (IN6_IS_ADDR_V4MAPPED (buf))
+ {
+ printf ("negative IN6_IS_ADDR_V4MAPPED byte %zu failed\n", i);
+ result = 1;
+ }
+ buf[i] ^= 1;
+ }
+
+ memset (buf, '\0', 16);
+ for (size_t i = 12; i < 16; ++i)
+ {
+ buf[i] ^= 2;
+ if (! IN6_IS_ADDR_V4COMPAT (buf))
+ {
+ printf ("positive IN6_IS_ADDR_V4COMPAT byte %zu failed\n", i);
+ result = 1;
+ }
+ buf[i] ^= 2;
+ }
+ for (size_t i = 0; i < 12; ++i)
+ {
+ buf[i] ^= 1;
+ if (IN6_IS_ADDR_V4COMPAT (buf))
+ {
+ printf ("negative IN6_IS_ADDR_V4COMPAT byte %zu failed\n", i);
+ result = 1;
+ }
+ buf[i] ^= 1;
+ }
+ if (IN6_IS_ADDR_V4COMPAT (buf))
+ {
+ puts ("negative IN6_IS_ADDR_V4COMPAT #2 failed");
+ result = 1;
+ }
+ buf[15] = 1;
+ if (IN6_IS_ADDR_V4COMPAT (buf))
+ {
+ puts ("negative IN6_IS_ADDR_V4COMPAT #3 failed");
+ result = 1;
+ }
+
+ return result;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/intl/localealias.c b/intl/localealias.c
index 735107abd3..6cc69c84b5 100644
--- a/intl/localealias.c
+++ b/intl/localealias.c
@@ -1,5 +1,5 @@
/* Handle aliases for locale names.
- Copyright (C) 1995-2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002, 2003, 2005, 2011 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
@@ -64,7 +64,7 @@ char *alloca ();
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
-# define strcasecmp __strcasecmp
+# define strcasecmp(s1, s2) __strcasecmp_l (s1, s2, _nl_C_locobj_ptr)
# ifndef mempcpy
# define mempcpy __mempcpy
@@ -221,7 +221,7 @@ read_alias_file (fname, fname_len)
/* Note the file is opened with cancellation in the I/O functions
disabled. */
- fp = fopen (full_fname, "rc");
+ fp = fopen (full_fname, "rce");
freea (full_fname);
if (fp == NULL)
return 0;
diff --git a/intl/plural.c b/intl/plural.c
index 69c5597bbd..dc89c343d1 100644
--- a/intl/plural.c
+++ b/intl/plural.c
@@ -1,21 +1,80 @@
-/* A Bison parser, made from plural.y
- by GNU bison 1.35. */
-
-#define YYBISON 1 /* Identify Bison output. */
-
-#define yyparse __gettextparse
-#define yylex __gettextlex
-#define yyerror __gettexterror
-#define yylval __gettextlval
-#define yychar __gettextchar
-#define yydebug __gettextdebug
-#define yynerrs __gettextnerrs
-# define EQUOP2 257
-# define CMPOP2 258
-# define ADDOP2 259
-# define MULOP2 260
-# define NUMBER 261
+/* A Bison parser, made by GNU Bison 2.4.3. */
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2009, 2010, 2011 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.4.3"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names. */
+#define yyparse __gettextparse
+#define yylex __gettextlex
+#define yyerror __gettexterror
+#define yylval __gettextlval
+#define yychar __gettextchar
+#define yydebug __gettextdebug
+#define yynerrs __gettextnerrs
+
+
+/* Copy the first part of user declarations. */
+
+/* Line 189 of yacc.c */
#line 1 "plural.y"
/* Expression parsing for plural form selection.
@@ -63,17 +122,71 @@
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
#define YYPARSE_PARAM arg
-#line 49 "plural.y"
-#ifndef YYSTYPE
-typedef union {
+
+/* Line 189 of yacc.c */
+#line 128 "plural.c"
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ EQUOP2 = 258,
+ CMPOP2 = 259,
+ ADDOP2 = 260,
+ MULOP2 = 261,
+ NUMBER = 262
+ };
+#endif
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+{
+
+/* Line 214 of yacc.c */
+#line 50 "plural.y"
+
unsigned long int num;
enum operator op;
struct expression *exp;
-} yystype;
-# define YYSTYPE yystype
+
+
+
+/* Line 214 of yacc.c */
+#line 179 "plural.c"
+} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
#endif
-#line 55 "plural.y"
+
+
+/* Copy the second part of user declarations. */
+
+/* Line 264 of yacc.c */
+#line 56 "plural.y"
/* Prototypes for local functions. */
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
@@ -171,271 +284,200 @@ new_exp_3 (op, bexp, tbranch, fbranch)
return new_exp (3, op, args);
}
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-
-
-#define YYFINAL 27
-#define YYFLAG -32768
-#define YYNTBASE 16
-/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
-#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
-
-/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
-static const char yytranslate[] =
-{
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
- 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
- 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 1, 6, 7, 8,
- 9, 11
-};
-
-#if YYDEBUG
-static const short yyprhs[] =
-{
- 0, 0, 2, 8, 12, 16, 20, 24, 28, 32,
- 35, 37, 39
-};
-static const short yyrhs[] =
-{
- 17, 0, 17, 3, 17, 12, 17, 0, 17, 4,
- 17, 0, 17, 5, 17, 0, 17, 6, 17, 0,
- 17, 7, 17, 0, 17, 8, 17, 0, 17, 9,
- 17, 0, 10, 17, 0, 13, 0, 11, 0, 14,
- 17, 15, 0
-};
+/* Line 264 of yacc.c */
+#line 291 "plural.c"
+#ifdef short
+# undef short
#endif
-#if YYDEBUG
-/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
-static const short yyrline[] =
-{
- 0, 174, 182, 186, 190, 194, 198, 202, 206, 210,
- 214, 218, 223
-};
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
#endif
-
-#if (YYDEBUG) || defined YYERROR_VERBOSE
-
-/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
-static const char *const yytname[] =
-{
- "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
- "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
- "start", "exp", 0
-};
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
#endif
-/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
-static const short yyr1[] =
-{
- 0, 16, 17, 17, 17, 17, 17, 17, 17, 17,
- 17, 17, 17
-};
-
-/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
-static const short yyr2[] =
-{
- 0, 1, 5, 3, 3, 3, 3, 3, 3, 2,
- 1, 1, 3
-};
-
-/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
- doesn't specify something else to do. Zero means the default is an
- error. */
-static const short yydefact[] =
-{
- 0, 0, 11, 10, 0, 1, 9, 0, 0, 0,
- 0, 0, 0, 0, 0, 12, 0, 3, 4, 5,
- 6, 7, 8, 0, 2, 0, 0, 0
-};
-
-static const short yydefgoto[] =
-{
- 25, 5
-};
-
-static const short yypact[] =
-{
- -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9,
- -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16,
- 26, -3,-32768, -9, 34, 21, 53,-32768
-};
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
-static const short yypgoto[] =
-{
- -32768, -1
-};
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
-#define YYLAST 53
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+#ifndef YY_
+# if defined YYENABLE_NLS && YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
-static const short yytable[] =
-{
- 6, 1, 2, 7, 3, 4, 14, 16, 17, 18,
- 19, 20, 21, 22, 8, 9, 10, 11, 12, 13,
- 14, 26, 24, 12, 13, 14, 15, 8, 9, 10,
- 11, 12, 13, 14, 13, 14, 23, 8, 9, 10,
- 11, 12, 13, 14, 10, 11, 12, 13, 14, 11,
- 12, 13, 14, 27
-};
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
-static const short yycheck[] =
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int yyi)
+#else
+static int
+YYID (yyi)
+ int yyi;
+#endif
{
- 1, 10, 11, 4, 13, 14, 9, 8, 9, 10,
- 11, 12, 13, 14, 3, 4, 5, 6, 7, 8,
- 9, 0, 23, 7, 8, 9, 15, 3, 4, 5,
- 6, 7, 8, 9, 8, 9, 12, 3, 4, 5,
- 6, 7, 8, 9, 5, 6, 7, 8, 9, 6,
- 7, 8, 9, 0
-};
-#define YYPURE 1
-
-/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
-#line 3 "/castro/street/H-alpha-linux/share/bison/bison.simple"
-
-/* Skeleton output parser for bison,
-
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
- Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
- This program 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 General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-
-/* As a special exception, when this file is copied by Bison into a
- Bison output file, you may use that output file without restriction.
- This special exception was added by the Free Software Foundation
- in version 1.24 of Bison. */
-
-/* This is the parser code that is written into each bison parser when
- the %semantic_parser declaration is not specified in the grammar.
- It was written by Richard Stallman by simplifying the hairy parser
- used when %semantic_parser is specified. */
-
-/* All symbols defined below should begin with yy or YY, to avoid
- infringing on user name space. This should be done even for local
- variables, as they might otherwise be expanded by user macros.
- There are some unavoidable exceptions within include files to
- define necessary library symbols; they are noted "INFRINGES ON
- USER NAME SPACE" below. */
+ return yyi;
+}
+#endif
-#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
+#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
-# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# else
-# ifndef YYSTACK_USE_ALLOCA
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
# else
-# ifdef __GNUC__
-# define YYSTACK_ALLOC __builtin_alloca
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
- /* Pacify GCC's `empty if-body' warning. */
-# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
# else
-# if defined (__STDC__) || defined (__cplusplus)
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
# endif
-# define YYSTACK_ALLOC malloc
-# define YYSTACK_FREE free
# endif
-#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
-#if (! defined (yyoverflow) \
- && (! defined (__cplusplus) \
- || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- short yyss;
- YYSTYPE yyvs;
-# if YYLSP_NEEDED
- YYLTYPE yyls;
-# endif
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
-# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
-# if YYLSP_NEEDED
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
- + 2 * YYSTACK_GAP_MAX)
-# else
-# define YYSTACK_BYTES(N) \
- ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
- + YYSTACK_GAP_MAX)
-# endif
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
-# if 1 < __GNUC__
+# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
- while (0)
+ while (YYID (0))
# endif
# endif
@@ -444,104 +486,299 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
- yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
- while (0)
+ while (YYID (0))
#endif
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 9
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 54
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 16
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 3
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 13
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 27
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 262
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
+ 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 6, 7,
+ 8, 9, 11
+};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint8 yyprhs[] =
+{
+ 0, 0, 3, 5, 11, 15, 19, 23, 27, 31,
+ 35, 38, 40, 42
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
+{
+ 17, 0, -1, 18, -1, 18, 3, 18, 12, 18,
+ -1, 18, 4, 18, -1, 18, 5, 18, -1, 18,
+ 6, 18, -1, 18, 7, 18, -1, 18, 8, 18,
+ -1, 18, 9, 18, -1, 10, 18, -1, 13, -1,
+ 11, -1, 14, 18, 15, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint8 yyrline[] =
+{
+ 0, 175, 175, 183, 187, 191, 195, 199, 203, 207,
+ 211, 215, 219, 224
+};
#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
+ "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
+ "$accept", "start", "exp", 0
+};
#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 63, 124, 38, 258, 259, 260, 261,
+ 33, 262, 58, 110, 40, 41
+};
# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 16, 17, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 1, 5, 3, 3, 3, 3, 3, 3,
+ 2, 1, 1, 3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 0, 12, 11, 0, 0, 2, 10, 0, 1,
+ 0, 0, 0, 0, 0, 0, 0, 13, 0, 4,
+ 5, 6, 7, 8, 9, 0, 3
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int8 yydefgoto[] =
+{
+ -1, 5, 6
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -10
+static const yytype_int8 yypact[] =
+{
+ -9, -9, -10, -10, -9, 8, 36, -10, 13, -10,
+ -9, -9, -9, -9, -9, -9, -9, -10, 26, 41,
+ 45, 18, -2, 14, -10, -9, 36
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int8 yypgoto[] =
+{
+ -10, -10, -1
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -1
+static const yytype_uint8 yytable[] =
+{
+ 7, 1, 2, 8, 3, 4, 15, 16, 9, 18,
+ 19, 20, 21, 22, 23, 24, 10, 11, 12, 13,
+ 14, 15, 16, 16, 26, 14, 15, 16, 17, 10,
+ 11, 12, 13, 14, 15, 16, 0, 0, 25, 10,
+ 11, 12, 13, 14, 15, 16, 12, 13, 14, 15,
+ 16, 13, 14, 15, 16
+};
+
+static const yytype_int8 yycheck[] =
+{
+ 1, 10, 11, 4, 13, 14, 8, 9, 0, 10,
+ 11, 12, 13, 14, 15, 16, 3, 4, 5, 6,
+ 7, 8, 9, 9, 25, 7, 8, 9, 15, 3,
+ 4, 5, 6, 7, 8, 9, -1, -1, 12, 3,
+ 4, 5, 6, 7, 8, 9, 5, 6, 7, 8,
+ 9, 6, 7, 8, 9
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 10, 11, 13, 14, 17, 18, 18, 18, 0,
+ 3, 4, 5, 6, 7, 8, 9, 15, 18, 18,
+ 18, 18, 18, 18, 18, 12, 18
+};
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
-#define YYEMPTY -2
+#define YYEMPTY (-2)
#define YYEOF 0
+
#define YYACCEPT goto yyacceptlab
-#define YYABORT goto yyabortlab
-#define YYERROR goto yyerrlab1
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
- Once GCC version 2 has supplanted version 1, this can go. */
+ Once GCC version 2 has supplanted version 1, this can go. However,
+ YYFAIL appears to be in use. Nevertheless, it is formally deprecated
+ in Bison 2.4.2's NEWS entry, where a plan to phase it out is
+ discussed. */
+
#define YYFAIL goto yyerrlab
+#if defined YYFAIL
+ /* This is here to suppress warnings from the GCC cpp's
+ -Wunused-macros. Normally we don't worry about that warning, but
+ some users do, and we want to make it easy for users to remove
+ YYFAIL uses, which will produce warnings from Bison 2.5. */
+#endif
+
#define YYRECOVERING() (!!yyerrstatus)
+
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
- yychar1 = YYTRANSLATE (yychar); \
- YYPOPSTACK; \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
goto yybackup; \
} \
else \
- { \
- yyerror ("syntax error: cannot back up"); \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
-while (0)
+while (YYID (0))
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run).
-
- When YYLLOC_DEFAULT is run, CURRENT is set the location of the
- first token. By default, to implement support for ranges, extend
- its range to the last symbol. */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- Current.last_line = Rhs[N].last_line; \
- Current.last_column = Rhs[N].last_column;
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
#endif
-/* YYLEX -- calling `yylex' with the right arguments. */
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
-#if YYPURE
-# if YYLSP_NEEDED
-# ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
-# else
-# define YYLEX yylex (&yylval, &yylloc)
-# endif
-# else /* !YYLSP_NEEDED */
-# ifdef YYLEX_PARAM
-# define YYLEX yylex (&yylval, YYLEX_PARAM)
-# else
-# define YYLEX yylex (&yylval)
-# endif
-# endif /* !YYLSP_NEEDED */
-#else /* !YYPURE */
-# define YYLEX yylex ()
-#endif /* !YYPURE */
+#ifndef YY_LOCATION_PRINT
+# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval)
+#endif
+
/* Enable debugging if requested. */
#if YYDEBUG
@@ -554,14 +791,158 @@ while (0)
do { \
if (yydebug) \
YYFPRINTF Args; \
-} while (0)
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
+#else
+static void
+yy_stack_print (yybottom, yytop)
+ yytype_int16 *yybottom;
+ yytype_int16 *yytop;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; yybottom <= yytop; yybottom++)
+ {
+ int yybot = *yybottom;
+ YYFPRINTF (stderr, " %d", yybot);
+ }
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
+ int yyrule;
+#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ YYFPRINTF (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ YYFPRINTF (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
+
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
@@ -571,59 +952,59 @@ int yydebug;
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
+
-#ifdef YYERROR_VERBOSE
+
+#if YYERROR_VERBOSE
# ifndef yystrlen
-# if defined (__GLIBC__) && defined (_STRING_H)
+# if defined __GLIBC__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
-# if defined (__STDC__) || defined (__cplusplus)
yystrlen (const char *yystr)
-# else
+#else
+static YYSIZE_T
yystrlen (yystr)
- const char *yystr;
-# endif
+ const char *yystr;
+#endif
{
- register const char *yys = yystr;
-
- while (*yys++ != '\0')
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
continue;
-
- return yys - yystr - 1;
+ return yylen;
}
# endif
# endif
# ifndef yystpcpy
-# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
static char *
-# if defined (__STDC__) || defined (__cplusplus)
yystpcpy (char *yydest, const char *yysrc)
-# else
+#else
+static char *
yystpcpy (yydest, yysrc)
- char *yydest;
- const char *yysrc;
-# endif
+ char *yydest;
+ const char *yysrc;
+#endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -632,149 +1013,313 @@ yystpcpy (yydest, yysrc)
}
# endif
# endif
-#endif
-
-#line 315 "/castro/street/H-alpha-linux/share/bison/bison.simple"
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
-/* The user can define YYPARSE_PARAM as the name of an argument to be passed
- into yyparse. The argument should have type void *.
- It should actually point to an object.
- Grammar actions can access the variable by casting it
- to the proper pointer type. */
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
-#ifdef YYPARSE_PARAM
-# if defined (__STDC__) || defined (__cplusplus)
-# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
-# define YYPARSE_PARAM_DECL
-# else
-# define YYPARSE_PARAM_ARG YYPARSE_PARAM
-# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
# endif
-#else /* !YYPARSE_PARAM */
-# define YYPARSE_PARAM_ARG
-# define YYPARSE_PARAM_DECL
-#endif /* !YYPARSE_PARAM */
-
-/* Prevent warning if -Wstrict-prototypes. */
-#ifdef __GNUC__
-# ifdef YYPARSE_PARAM
-int yyparse (void *);
-# else
-int yyparse (void);
+
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
#endif
+{
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
-/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
- variables are global, or local to YYPARSE. */
-
-#define YY_DECL_NON_LSP_VARIABLES \
-/* The lookahead symbol. */ \
-int yychar; \
- \
-/* The semantic value of the lookahead symbol. */ \
-YYSTYPE yylval; \
- \
-/* Number of parse errors so far. */ \
-int yynerrs;
-
-#if YYLSP_NEEDED
-# define YY_DECL_VARIABLES \
-YY_DECL_NON_LSP_VARIABLES \
- \
-/* Location data for the lookahead symbol. */ \
-YYLTYPE yylloc;
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+/* Prevent warnings from -Wmissing-prototypes. */
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
#else
-# define YY_DECL_VARIABLES \
-YY_DECL_NON_LSP_VARIABLES
+int yyparse ();
#endif
+#endif /* ! YYPARSE_PARAM */
-/* If nonreentrant, generate the variables here. */
-#if !YYPURE
-YY_DECL_VARIABLES
-#endif /* !YYPURE */
-int
-yyparse (YYPARSE_PARAM_ARG)
- YYPARSE_PARAM_DECL
-{
- /* If reentrant, generate the variables here. */
-#if YYPURE
- YY_DECL_VARIABLES
-#endif /* !YYPURE */
- register int yystate;
- register int yyn;
- int yyresult;
- /* Number of tokens to shift before error messages enabled. */
- int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
- int yychar1 = 0;
-
- /* Three stacks and their tools:
- `yyss': related to states,
- `yyvs': related to semantic values,
- `yyls': related to locations.
-
- Refer to the stacks thru separate pointers, to allow yyoverflow
- to reallocate them elsewhere. */
-
- /* The state stack. */
- short yyssa[YYINITDEPTH];
- short *yyss = yyssa;
- register short *yyssp;
-
- /* The semantic value stack. */
- YYSTYPE yyvsa[YYINITDEPTH];
- YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
-
-#if YYLSP_NEEDED
- /* The location stack. */
- YYLTYPE yylsa[YYINITDEPTH];
- YYLTYPE *yyls = yylsa;
- YYLTYPE *yylsp;
-#endif
+/*-------------------------.
+| yyparse or yypush_parse. |
+`-------------------------*/
-#if YYLSP_NEEDED
-# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
#else
-# define YYPOPSTACK (yyvsp--, yyssp--)
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+/* The lookahead symbol. */
+int yychar;
+
+/* The semantic value of the lookahead symbol. */
+YYSTYPE yylval;
+
+ /* Number of syntax errors so far. */
+ int yynerrs;
+
+ int yystate;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
- YYSIZE_T yystacksize = YYINITDEPTH;
+ /* The stacks and their tools:
+ `yyss': related to states.
+ `yyvs': related to semantic values.
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs;
+ YYSTYPE *yyvsp;
+
+ YYSIZE_T yystacksize;
+
+ int yyn;
+ int yyresult;
+ /* Lookahead token as an internal (translated) token number. */
+ int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
-#if YYLSP_NEEDED
- YYLTYPE yyloc;
+
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
- /* When reducing, the number of symbols on the RHS of the reduced
- rule. */
- int yylen;
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ yytoken = 0;
+ yyss = yyssa;
+ yyvs = yyvsa;
+ yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
- yychar = YYEMPTY; /* Cause a token to be read. */
+ yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
-
yyssp = yyss;
yyvsp = yyvs;
-#if YYLSP_NEEDED
- yylsp = yyls;
-#endif
+
goto yysetstate;
/*------------------------------------------------------------.
@@ -782,70 +1327,57 @@ yyparse (YYPARSE_PARAM_ARG)
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
- have just been pushed. so pushing a state here evens the stacks.
- */
+ have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
*yyssp = yystate;
- if (yyssp >= yyss + yystacksize - 1)
+ if (yyss + yystacksize - 1 <= yyssp)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
- /* Give user a chance to reallocate the stack. Use copies of
+ /* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
- data in use in that stack, in bytes. */
-# if YYLSP_NEEDED
- YYLTYPE *yyls1 = yyls;
- /* This used to be a conditional around just the two extra args,
- but that might be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
- &yyss1, yysize * sizeof (*yyssp),
- &yyvs1, yysize * sizeof (*yyvsp),
- &yyls1, yysize * sizeof (*yylsp),
- &yystacksize);
- yyls = yyls1;
-# else
- yyoverflow ("parser stack overflow",
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
-# endif
+
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
- if (yystacksize >= YYMAXDEPTH)
- goto yyoverflowlab;
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
yystacksize *= 2;
- if (yystacksize > YYMAXDEPTH)
+ if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
- short *yyss1 = yyss;
+ yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
- YYSTACK_RELOCATE (yyss);
- YYSTACK_RELOCATE (yyvs);
-# if YYLSP_NEEDED
- YYSTACK_RELOCATE (yyls);
-# endif
-# undef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss_alloc, yyss);
+ YYSTACK_RELOCATE (yyvs_alloc, yyvs);
+# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
@@ -854,123 +1386,82 @@ yyparse (YYPARSE_PARAM_ARG)
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
-#if YYLSP_NEEDED
- yylsp = yyls + yysize - 1;
-#endif
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
- if (yyssp >= yyss + yystacksize - 1)
+ if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
- goto yybackup;
+ if (yystate == YYFINAL)
+ YYACCEPT;
+ goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
-/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
-/* yyresume: */
+ /* Do appropriate processing given the current state. Read a
+ lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */
-
yyn = yypact[yystate];
- if (yyn == YYFLAG)
+ if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a lookahead token if don't already have one. */
- /* yychar is either YYEMPTY or YYEOF
- or a valid token in external form. */
-
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
- /* Convert token to internal form (in yychar1) for indexing tables with */
-
- if (yychar <= 0) /* This means end of input. */
+ if (yychar <= YYEOF)
{
- yychar1 = 0;
- yychar = YYEOF; /* Don't call YYLEX any more */
-
+ yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
- yychar1 = YYTRANSLATE (yychar);
-
-#if YYDEBUG
- /* We have to keep this `#if YYDEBUG', since we use variables
- which are defined only if `YYDEBUG' is set. */
- if (yydebug)
- {
- YYFPRINTF (stderr, "Next token is %d (%s",
- yychar, yytname[yychar1]);
- /* Give the individual parser a way to print the precise
- meaning of a token, for further debugging info. */
-# ifdef YYPRINT
- YYPRINT (stderr, yychar, yylval);
-# endif
- YYFPRINTF (stderr, ")\n");
- }
-#endif
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
- yyn += yychar1;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
-
yyn = yytable[yyn];
-
- /* yyn is what to do for this token type in this state.
- Negative => reduce, -yyn is rule number.
- Positive => shift, yyn is new state.
- New state is final state => don't bother to shift,
- just return success.
- 0, or most negative number => error. */
-
- if (yyn < 0)
+ if (yyn <= 0)
{
- if (yyn == YYFLAG)
+ if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
- else if (yyn == 0)
- goto yyerrlab;
-
- if (yyn == YYFINAL)
- YYACCEPT;
-
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %d (%s), ",
- yychar, yytname[yychar1]));
-
- /* Discard the token being shifted unless it is eof. */
- if (yychar != YYEOF)
- yychar = YYEMPTY;
-
- *++yyvsp = yylval;
-#if YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
+ /* Shift the lookahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token. */
+ yychar = YYEMPTY;
+
yystate = yyn;
+ *++yyvsp = yylval;
+
goto yynewstate;
@@ -994,140 +1485,141 @@ yyreduce:
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
- Otherwise, the following line sets YYVAL to the semantic value of
- the lookahead token. This behavior is undocumented and Bison
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
-#if YYLSP_NEEDED
- /* Similarly for the default location. Let the user run additional
- commands if for instance locations are ranges. */
- yyloc = yylsp[1-yylen];
- YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
-#endif
-#if YYDEBUG
- /* We have to keep this `#if YYDEBUG', since we use variables which
- are defined only if `YYDEBUG' is set. */
- if (yydebug)
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
{
- int yyi;
-
- YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
- yyn, yyrline[yyn]);
-
- /* Print the symbols being reduced, and their result. */
- for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
- YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
- YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
- }
-#endif
-
- switch (yyn) {
+ case 2:
-case 1:
-#line 175 "plural.y"
-{
- if (yyvsp[0].exp == NULL)
+/* Line 1464 of yacc.c */
+#line 176 "plural.y"
+ {
+ if ((yyvsp[(1) - (1)].exp) == NULL)
YYABORT;
- ((struct parse_args *) arg)->res = yyvsp[0].exp;
- }
+ ((struct parse_args *) arg)->res = (yyvsp[(1) - (1)].exp);
+ ;}
break;
-case 2:
-#line 183 "plural.y"
-{
- yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
- }
+
+ case 3:
+
+/* Line 1464 of yacc.c */
+#line 184 "plural.y"
+ {
+ (yyval.exp) = new_exp_3 (qmop, (yyvsp[(1) - (5)].exp), (yyvsp[(3) - (5)].exp), (yyvsp[(5) - (5)].exp));
+ ;}
break;
-case 3:
-#line 187 "plural.y"
-{
- yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
- }
+
+ case 4:
+
+/* Line 1464 of yacc.c */
+#line 188 "plural.y"
+ {
+ (yyval.exp) = new_exp_2 (lor, (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
+ ;}
break;
-case 4:
-#line 191 "plural.y"
-{
- yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
- }
+
+ case 5:
+
+/* Line 1464 of yacc.c */
+#line 192 "plural.y"
+ {
+ (yyval.exp) = new_exp_2 (land, (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
+ ;}
break;
-case 5:
-#line 195 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- }
+
+ case 6:
+
+/* Line 1464 of yacc.c */
+#line 196 "plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
+ ;}
break;
-case 6:
-#line 199 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- }
+
+ case 7:
+
+/* Line 1464 of yacc.c */
+#line 200 "plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
+ ;}
break;
-case 7:
-#line 203 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- }
+
+ case 8:
+
+/* Line 1464 of yacc.c */
+#line 204 "plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
+ ;}
break;
-case 8:
-#line 207 "plural.y"
-{
- yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
- }
+
+ case 9:
+
+/* Line 1464 of yacc.c */
+#line 208 "plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[(2) - (3)].op), (yyvsp[(1) - (3)].exp), (yyvsp[(3) - (3)].exp));
+ ;}
break;
-case 9:
-#line 211 "plural.y"
-{
- yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
- }
+
+ case 10:
+
+/* Line 1464 of yacc.c */
+#line 212 "plural.y"
+ {
+ (yyval.exp) = new_exp_1 (lnot, (yyvsp[(2) - (2)].exp));
+ ;}
break;
-case 10:
-#line 215 "plural.y"
-{
- yyval.exp = new_exp_0 (var);
- }
+
+ case 11:
+
+/* Line 1464 of yacc.c */
+#line 216 "plural.y"
+ {
+ (yyval.exp) = new_exp_0 (var);
+ ;}
break;
-case 11:
-#line 219 "plural.y"
-{
- if ((yyval.exp = new_exp_0 (num)) != NULL)
- yyval.exp->val.num = yyvsp[0].num;
- }
+
+ case 12:
+
+/* Line 1464 of yacc.c */
+#line 220 "plural.y"
+ {
+ if (((yyval.exp) = new_exp_0 (num)) != NULL)
+ (yyval.exp)->val.num = (yyvsp[(1) - (1)].num);
+ ;}
break;
-case 12:
-#line 224 "plural.y"
-{
- yyval.exp = yyvsp[-1].exp;
- }
+
+ case 13:
+
+/* Line 1464 of yacc.c */
+#line 225 "plural.y"
+ {
+ (yyval.exp) = (yyvsp[(2) - (3)].exp);
+ ;}
break;
-}
-#line 705 "/castro/street/H-alpha-linux/share/bison/bison.simple"
-
- yyvsp -= yylen;
- yyssp -= yylen;
-#if YYLSP_NEEDED
- yylsp -= yylen;
-#endif
-#if YYDEBUG
- if (yydebug)
- {
- short *yyssp1 = yyss - 1;
- YYFPRINTF (stderr, "state stack now");
- while (yyssp1 != yyssp)
- YYFPRINTF (stderr, " %d", *++yyssp1);
- YYFPRINTF (stderr, "\n");
+/* Line 1464 of yacc.c */
+#line 1614 "plural.c"
+ default: break;
}
-#endif
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
-#if YYLSP_NEEDED
- *++yylsp = yyloc;
-#endif
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
@@ -1135,11 +1627,11 @@ case 12:
yyn = yyr1[yyn];
- yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
- if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
- yystate = yydefgoto[yyn - YYNTBASE];
+ yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
@@ -1152,155 +1644,126 @@ yyerrlab:
if (!yyerrstatus)
{
++yynerrs;
-
-#ifdef YYERROR_VERBOSE
- yyn = yypact[yystate];
-
- if (yyn > YYFLAG && yyn < YYLAST)
- {
- YYSIZE_T yysize = 0;
- char *yymsg;
- int yyx, yycount;
-
- yycount = 0;
- /* Start YYX at -YYN if negative to avoid negative indexes in
- YYCHECK. */
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
- if (yycheck[yyx + yyn] == yyx)
- yysize += yystrlen (yytname[yyx]) + 15, yycount++;
- yysize += yystrlen ("parse error, unexpected ") + 1;
- yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
- {
- char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
- yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
-
- if (yycount < 5)
- {
- yycount = 0;
- for (yyx = yyn < 0 ? -yyn : 0;
- yyx < (int) (sizeof (yytname) / sizeof (char *));
- yyx++)
- if (yycheck[yyx + yyn] == yyx)
- {
- const char *yyq = ! yycount ? ", expecting " : " or ";
- yyp = yystpcpy (yyp, yyq);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yycount++;
- }
- }
- yyerror (yymsg);
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
- }
- else
- yyerror ("parse error; also virtual memory exhausted");
- }
- else
-#endif /* defined (YYERROR_VERBOSE) */
- yyerror ("parse error");
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
}
- goto yyerrlab1;
-/*--------------------------------------------------.
-| yyerrlab1 -- error raised explicitly by an action |
-`--------------------------------------------------*/
-yyerrlab1:
+
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
- /* return failure if at end of input */
- if (yychar == YYEOF)
- YYABORT;
- YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
- yychar, yytname[yychar1]));
- yychar = YYEMPTY;
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
}
/* Else will try to reuse lookahead token after shifting the error
token. */
+ goto yyerrlab1;
- yyerrstatus = 3; /* Each real token shifted decrements this */
-
- goto yyerrhandle;
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
-/*-------------------------------------------------------------------.
-| yyerrdefault -- current state does not do anything special for the |
-| error token. |
-`-------------------------------------------------------------------*/
-yyerrdefault:
-#if 0
- /* This is wrong; only states that explicitly want error tokens
- should shift them. */
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
- /* If its default is to accept any token, ok. Otherwise pop it. */
- yyn = yydefact[yystate];
- if (yyn)
- goto yydefault;
-#endif
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
-/*---------------------------------------------------------------.
-| yyerrpop -- pop the current state because it cannot handle the |
-| error token |
-`---------------------------------------------------------------*/
-yyerrpop:
- if (yyssp == yyss)
- YYABORT;
- yyvsp--;
- yystate = *--yyssp;
-#if YYLSP_NEEDED
- yylsp--;
-#endif
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
-#if YYDEBUG
- if (yydebug)
+ for (;;)
{
- short *yyssp1 = yyss - 1;
- YYFPRINTF (stderr, "Error: state stack now");
- while (yyssp1 != yyssp)
- YYFPRINTF (stderr, " %d", *++yyssp1);
- YYFPRINTF (stderr, "\n");
- }
-#endif
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
-/*--------------.
-| yyerrhandle. |
-`--------------*/
-yyerrhandle:
- yyn = yypact[yystate];
- if (yyn == YYFLAG)
- goto yyerrdefault;
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
- yyn += YYTERROR;
- if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
- goto yyerrdefault;
- yyn = yytable[yyn];
- if (yyn < 0)
- {
- if (yyn == YYFLAG)
- goto yyerrpop;
- yyn = -yyn;
- goto yyreduce;
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
}
- else if (yyn == 0)
- goto yyerrpop;
- if (yyn == YYFINAL)
- YYACCEPT;
+ *++yyvsp = yylval;
- YYDPRINTF ((stderr, "Shifting error token, "));
- *++yyvsp = yylval;
-#if YYLSP_NEEDED
- *++yylsp = yylloc;
-#endif
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
@@ -1320,22 +1783,46 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
-/*---------------------------------------------.
-| yyoverflowab -- parser overflow comes here. |
-`---------------------------------------------*/
-yyoverflowlab:
- yyerror ("parser stack overflow");
+#if !defined(yyoverflow) || YYERROR_VERBOSE
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
+#endif
yyreturn:
+ if (yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
- return yyresult;
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
}
-#line 229 "plural.y"
+
+
+
+/* Line 1684 of yacc.c */
+#line 230 "plural.y"
void
diff --git a/libidn/ChangeLog b/libidn/ChangeLog
index 15efe0e88f..a718a9f2a3 100644
--- a/libidn/ChangeLog
+++ b/libidn/ChangeLog
@@ -1,3 +1,7 @@
+2011-12-03 Ulrich Drepper <drepper@gmail.com>
+
+ * idna.c (idna_to_unicode_4z4z): Remove variable rc.
+
2008-02-10 Jim Meyering <meyering@redhat.com>
* stringprep.c (stringprep, stringprep_profile): Remove useless
diff --git a/libidn/idna.c b/libidn/idna.c
index cf95291596..f93b90368b 100644
--- a/libidn/idna.c
+++ b/libidn/idna.c
@@ -1,5 +1,5 @@
/* idna.c Convert to or from IDN strings.
- * Copyright (C) 2002, 2003, 2004 Simon Josefsson
+ * Copyright (C) 2002, 2003, 2004, 2011 Simon Josefsson
*
* This file is part of GNU Libidn.
*
@@ -614,7 +614,6 @@ idna_to_unicode_4z4z (const uint32_t * input, uint32_t ** output, int flags)
size_t buflen;
uint32_t *out = NULL;
size_t outlen = 0;
- int rc;
*output = NULL;
@@ -630,8 +629,8 @@ idna_to_unicode_4z4z (const uint32_t * input, uint32_t ** output, int flags)
if (!buf)
return IDNA_MALLOC_ERROR;
- rc = idna_to_unicode_44i (start, end - start, buf, &buflen, flags);
- /* don't check rc as per specification! */
+ idna_to_unicode_44i (start, end - start, buf, &buflen, flags);
+ /* don't check return value as per specification! */
if (out)
{
diff --git a/libio/Versions b/libio/Versions
index e7a96daca5..8df89d2150 100644
--- a/libio/Versions
+++ b/libio/Versions
@@ -58,7 +58,7 @@ libc {
gets;
# o*
- open_memstream; open_obstack_stream; obstack_printf; obstack_vprintf;
+ open_memstream; obstack_printf; obstack_vprintf;
# p*
pclose; popen; putc; putc_locked; putc_unlocked; putchar;
diff --git a/libio/genops.c b/libio/genops.c
index 5d21c42404..bb40c34356 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -826,7 +826,7 @@ _IO_flush_all_lockp (int do_lock)
int last_stamp;
#ifdef _IO_MTSAFE_IO
- _IO_cleanup_region_start_noarg (flush_cleanup);
+ __libc_cleanup_region_start (do_lock, flush_cleanup, 0);
if (do_lock)
_IO_lock_lock (list_all_lock);
#endif
@@ -866,7 +866,7 @@ _IO_flush_all_lockp (int do_lock)
#ifdef _IO_MTSAFE_IO
if (do_lock)
_IO_lock_unlock (list_all_lock);
- _IO_cleanup_region_end (0);
+ __libc_cleanup_region_end (0);
#endif
return result;
diff --git a/libio/iofwide.c b/libio/iofwide.c
index a9936687dd..a6ca50f95b 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2003, 2005, 2011 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
@@ -471,7 +471,6 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,
const unsigned char *cp = (const unsigned char *) from_start;
wchar_t to_buf[max];
struct __gconv_step *gs = codecvt->__cd_in.__cd.__steps;
- int status;
size_t dummy;
codecvt->__cd_in.__cd.__data[0].__outbuf = (unsigned char *) to_buf;
@@ -484,10 +483,10 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,
PTR_DEMANGLE (fct);
#endif
- status = DL_CALL_FCT (fct,
- (gs, codecvt->__cd_in.__cd.__data, &cp,
- (const unsigned char *) from_end, NULL,
- &dummy, 0, 0));
+ DL_CALL_FCT (fct,
+ (gs, codecvt->__cd_in.__cd.__data, &cp,
+ (const unsigned char *) from_end, NULL,
+ &dummy, 0, 0));
result = cp - (const unsigned char *) from_start;
#else
diff --git a/libio/stdio.h b/libio/stdio.h
index 59ecdefa66..8e23903c25 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -363,7 +363,7 @@ extern int fprintf (FILE *__restrict __stream,
extern int printf (__const char *__restrict __format, ...);
/* Write formatted output to S. */
extern int sprintf (char *__restrict __s,
- __const char *__restrict __format, ...) __THROW;
+ __const char *__restrict __format, ...) __THROWNL;
/* Write formatted output to S from argument list ARG.
@@ -378,7 +378,7 @@ extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
extern int vprintf (__const char *__restrict __format, _G_va_list __arg);
/* Write formatted output to S from argument list ARG. */
extern int vsprintf (char *__restrict __s, __const char *__restrict __format,
- _G_va_list __arg) __THROW;
+ _G_va_list __arg) __THROWNL;
__END_NAMESPACE_STD
#if defined __USE_BSD || defined __USE_ISOC99 || defined __USE_UNIX98
@@ -386,11 +386,11 @@ __BEGIN_NAMESPACE_C99
/* Maximum chars of output to write in MAXLEN. */
extern int snprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, ...)
- __THROW __attribute__ ((__format__ (__printf__, 3, 4)));
+ __THROWNL __attribute__ ((__format__ (__printf__, 3, 4)));
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
__const char *__restrict __format, _G_va_list __arg)
- __THROW __attribute__ ((__format__ (__printf__, 3, 0)));
+ __THROWNL __attribute__ ((__format__ (__printf__, 3, 0)));
__END_NAMESPACE_C99
#endif
@@ -399,13 +399,13 @@ __END_NAMESPACE_C99
Store the address of the string in *PTR. */
extern int vasprintf (char **__restrict __ptr, __const char *__restrict __f,
_G_va_list __arg)
- __THROW __attribute__ ((__format__ (__printf__, 2, 0))) __wur;
+ __THROWNL __attribute__ ((__format__ (__printf__, 2, 0))) __wur;
extern int __asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
+ __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
extern int asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
+ __THROWNL __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
#endif
#ifdef __USE_XOPEN2K8
@@ -895,11 +895,11 @@ struct obstack; /* See <obstack.h>. */
/* Write formatted output to an obstack. */
extern int obstack_printf (struct obstack *__restrict __obstack,
__const char *__restrict __format, ...)
- __THROW __attribute__ ((__format__ (__printf__, 2, 3)));
+ __THROWNL __attribute__ ((__format__ (__printf__, 2, 3)));
extern int obstack_vprintf (struct obstack *__restrict __obstack,
__const char *__restrict __format,
_G_va_list __args)
- __THROW __attribute__ ((__format__ (__printf__, 2, 0)));
+ __THROWNL __attribute__ ((__format__ (__printf__, 2, 0)));
#endif /* Use GNU. */
diff --git a/libio/wfileops.c b/libio/wfileops.c
index 386b06b79f..8f21168fb7 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -252,7 +252,7 @@ _IO_wfile_underflow (fp)
{
if (naccbuf != 0)
/* There are some bytes in the external buffer but they don't
- convert to anything. */
+ convert to anything. */
__set_errno (EILSEQ);
return WEOF;
}
@@ -340,7 +340,6 @@ static wint_t
_IO_wfile_underflow_mmap (_IO_FILE *fp)
{
struct _IO_codecvt *cd;
- enum __codecvt_result status;
const char *read_stop;
if (__builtin_expect (fp->_flags & _IO_NO_READS, 0))
@@ -379,12 +378,12 @@ _IO_wfile_underflow_mmap (_IO_FILE *fp)
fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;
fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr =
fp->_wide_data->_IO_buf_base;
- status = (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state,
- fp->_IO_read_ptr, fp->_IO_read_end,
- &read_stop,
- fp->_wide_data->_IO_read_ptr,
- fp->_wide_data->_IO_buf_end,
- &fp->_wide_data->_IO_read_end);
+ (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state,
+ fp->_IO_read_ptr, fp->_IO_read_end,
+ &read_stop,
+ fp->_wide_data->_IO_read_ptr,
+ fp->_wide_data->_IO_buf_end,
+ &fp->_wide_data->_IO_read_end);
fp->_IO_read_ptr = (char *) read_stop;
@@ -513,9 +512,9 @@ _IO_wfile_sync (fp)
else
{
/* We have to find out the hard way how much to back off.
- To do this we determine how much input we needed to
- generate the wide characters up to the current reading
- position. */
+ To do this we determine how much input we needed to
+ generate the wide characters up to the current reading
+ position. */
int nread;
fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
@@ -625,8 +624,8 @@ _IO_wfile_seekoff (fp, offset, dir, mode)
case _IO_seek_cur:
/* Adjust for read-ahead (bytes is buffer). To do this we must
- find out which position in the external buffer corresponds to
- the current position in the internal buffer. */
+ find out which position in the external buffer corresponds to
+ the current position in the internal buffer. */
cv = fp->_codecvt;
clen = (*cv->__codecvt_do_encoding) (cv);
diff --git a/locale/findlocale.c b/locale/findlocale.c
index 2fec9a70d5..6c888f00c9 100644
--- a/locale/findlocale.c
+++ b/locale/findlocale.c
@@ -258,7 +258,8 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
}
/* Determine whether the user wants transliteration or not. */
- if (modifier != NULL && __strcasecmp (modifier, "TRANSLIT") == 0)
+ if (modifier != NULL
+ && __strcasecmp_l (modifier, "TRANSLIT", _nl_C_locobj_ptr) == 0)
((struct __locale_data *) locale_file->data)->use_translit = 1;
/* Increment the usage count. */
diff --git a/locale/iso-639.def b/locale/iso-639.def
index f62559439c..17bb9f2ae0 100644
--- a/locale/iso-639.def
+++ b/locale/iso-639.def
@@ -70,6 +70,7 @@ DEFINE_LANGUAGE_CODE3 ("Bikol", bik, bik)
DEFINE_LANGUAGE_CODE3 ("Bini", bin, bin)
DEFINE_LANGUAGE_CODE ("Bislama", bi, bis, bis)
DEFINE_LANGUAGE_CODE3 ("Blin; Bilin", byn, byn)
+DEFINE_LANGUAGE_CODE3 ("Bodo", brx, brx)
DEFINE_LANGUAGE_CODE ("Bosnian", bs, bos, bos)
DEFINE_LANGUAGE_CODE3 ("Braj", bra, bra)
DEFINE_LANGUAGE_CODE ("Breton", br, bre, bre)
diff --git a/locale/loadarchive.c b/locale/loadarchive.c
index 663202e54e..47a6127a52 100644
--- a/locale/loadarchive.c
+++ b/locale/loadarchive.c
@@ -1,5 +1,5 @@
/* Code to load locale data from the locale archive file.
- Copyright (C) 2002, 2003, 2005, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2005, 2010, 2011 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
@@ -203,7 +203,7 @@ _nl_load_locale_from_archive (int category, const char **namep)
archmapped = &headmap;
/* The archive has never been opened. */
- fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
+ fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE|O_CLOEXEC);
if (fd < 0)
/* Cannot open the archive, for whatever reason. */
return NULL;
@@ -394,7 +394,8 @@ _nl_load_locale_from_archive (int category, const char **namep)
if (fd == -1)
{
struct stat64 st;
- fd = open_not_cancel_2 (archfname, O_RDONLY|O_LARGEFILE);
+ fd = open_not_cancel_2 (archfname,
+ O_RDONLY|O_LARGEFILE|O_CLOEXEC);
if (fd == -1)
/* Cannot open the archive, for whatever reason. */
return NULL;
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 61e6f7f0a6..d33a494134 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -1,5 +1,5 @@
/* Functions to read locale data files.
- Copyright (C) 1996-2004, 2005, 2006, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1996-2004, 2005, 2006, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -173,7 +173,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
file->decided = 1;
file->data = NULL;
- fd = open_not_cancel_2 (file->filename, O_RDONLY);
+ fd = open_not_cancel_2 (file->filename, O_RDONLY | O_CLOEXEC);
if (__builtin_expect (fd, 0) < 0)
/* Cannot open the file. */
return;
@@ -201,7 +201,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
_nl_category_names.str + _nl_category_name_idxs[category],
_nl_category_name_sizes[category] + 1);
- fd = open_not_cancel_2 (newp, O_RDONLY);
+ fd = open_not_cancel_2 (newp, O_RDONLY | O_CLOEXEC);
if (__builtin_expect (fd, 0) < 0)
return;
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index 4af9fe10fe..d056fc1d2e 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -74,6 +74,29 @@ static const char *locnames[] =
/* Size of the reserved address space area. */
#define RESERVE_MMAP_SIZE 512 * 1024 * 1024
+/* To prepare for enlargements of the mmaped area reserve some address
+ space. On some machines, being a file mapping rather than an anonymous
+ mapping affects the address selection. So do this mapping from the
+ actual file, even though it's only a dummy to reserve address space. */
+static void *
+prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags)
+{
+ if (total < RESERVE_MMAP_SIZE)
+ {
+ void *p = mmap64 (NULL, RESERVE_MMAP_SIZE, PROT_NONE, MAP_SHARED, fd, 0);
+ if (p != MAP_FAILED)
+ {
+ *reserved = RESERVE_MMAP_SIZE;
+ *xflags = MAP_FIXED;
+ return p;
+ }
+ }
+
+ *reserved = total;
+ *xflags = 0;
+ return NULL;
+}
+
static void
create_archive (const char *archivefname, struct locarhandle *ah)
@@ -81,7 +104,6 @@ create_archive (const char *archivefname, struct locarhandle *ah)
int fd;
char fname[strlen (archivefname) + sizeof (".XXXXXX")];
struct locarhead head;
- void *p;
size_t total;
strcpy (stpcpy (fname, archivefname), ".XXXXXX");
@@ -129,19 +151,9 @@ create_archive (const char *archivefname, struct locarhandle *ah)
error (EXIT_FAILURE, errval, _("cannot resize archive file"));
}
- /* To prepare for enlargements of the mmaped area reserve some
- address space. */
- size_t reserved = RESERVE_MMAP_SIZE;
- int xflags = 0;
- if (total < reserved
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
- -1, 0)) != MAP_FAILED))
- xflags = MAP_FIXED;
- else
- {
- p = NULL;
- reserved = total;
- }
+ size_t reserved;
+ int xflags;
+ void *p = prepare_address_space (fd, total, &reserved, &xflags);
/* Map the header and all the administration data structures. */
p = mmap64 (p, total, PROT_READ | PROT_WRITE, MAP_SHARED | xflags, fd, 0);
@@ -297,7 +309,6 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
int fd;
struct locarhead newhead;
size_t total;
- void *p;
unsigned int cnt, loccnt;
struct namehashent *oldnamehashtab;
struct locarhandle new_ah;
@@ -390,19 +401,9 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
error (EXIT_FAILURE, errval, _("cannot resize archive file"));
}
- /* To prepare for enlargements of the mmaped area reserve some
- address space. */
- size_t reserved = RESERVE_MMAP_SIZE;
- int xflags = 0;
- if (total < reserved
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
- -1, 0)) != MAP_FAILED))
- xflags = MAP_FIXED;
- else
- {
- p = NULL;
- reserved = total;
- }
+ size_t reserved;
+ int xflags;
+ void *p = prepare_address_space (fd, total, &reserved, &xflags);
/* Map the header and all the administration data structures. */
p = mmap64 (p, total, PROT_READ | PROT_WRITE, MAP_SHARED | xflags, fd, 0);
@@ -623,20 +624,9 @@ open_archive (struct locarhandle *ah, bool readonly)
ah->fd = fd;
ah->mmaped = st.st_size;
- /* To prepare for enlargements of the mmaped area reserve some
- address space. */
- size_t reserved = RESERVE_MMAP_SIZE;
- int xflags = 0;
- void *p;
- if (st.st_size < reserved
- && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
- -1, 0)) != MAP_FAILED))
- xflags = MAP_FIXED;
- else
- {
- p = NULL;
- reserved = st.st_size;
- }
+ size_t reserved;
+ int xflags;
+ void *p = prepare_address_space (fd, st.st_size, &reserved, &xflags);
/* Map the entire file. We might need to compare the category data
in the file with the newly added data. */
diff --git a/locale/weight.h b/locale/weight.h
index dc70a00be5..967e176ca6 100644
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2003,2004,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper, <drepper@cygnus.com>.
@@ -20,7 +20,7 @@
/* Find index of weight. */
auto inline int32_t
__attribute ((always_inline))
-findidx (const unsigned char **cpp)
+findidx (const unsigned char **cpp, size_t len)
{
int_fast32_t i = table[*(*cpp)++];
const unsigned char *cp;
@@ -34,6 +34,7 @@ findidx (const unsigned char **cpp)
Search for the correct one. */
cp = &extra[-i];
usrc = *cpp;
+ --len;
while (1)
{
size_t nhere;
@@ -56,7 +57,7 @@ findidx (const unsigned char **cpp)
already. */
size_t cnt;
- for (cnt = 0; cnt < nhere; ++cnt)
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
@@ -79,13 +80,13 @@ findidx (const unsigned char **cpp)
size_t cnt;
size_t offset = 0;
- for (cnt = 0; cnt < nhere; ++cnt)
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
if (cnt != nhere)
{
- if (cp[cnt] > usrc[cnt])
+ if (cnt == len || cp[cnt] > usrc[cnt])
{
/* Cannot be in this range. */
cp += 2 * nhere;
diff --git a/locale/weightwc.h b/locale/weightwc.h
index 9ea1126a24..7862091426 100644
--- a/locale/weightwc.h
+++ b/locale/weightwc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001,2003,2004,2005,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2001,2003,2004,2005,2007,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper, <drepper@cygnus.com>.
@@ -20,7 +20,7 @@
/* Find index of weight. */
auto inline int32_t
__attribute ((always_inline))
-findidx (const wint_t **cpp)
+findidx (const wint_t **cpp, size_t len)
{
wint_t ch = *(*cpp)++;
int32_t i = __collidx_table_lookup ((const char *) table, ch);
@@ -32,6 +32,7 @@ findidx (const wint_t **cpp)
/* Oh well, more than one sequence starting with this byte.
Search for the correct one. */
const int32_t *cp = (const int32_t *) &extra[-i];
+ --len;
while (1)
{
size_t nhere;
@@ -54,7 +55,7 @@ findidx (const wint_t **cpp)
already. */
size_t cnt;
- for (cnt = 0; cnt < nhere; ++cnt)
+ for (cnt = 0; cnt < nhere && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
@@ -75,7 +76,7 @@ findidx (const wint_t **cpp)
size_t cnt;
size_t offset;
- for (cnt = 0; cnt < nhere - 1; ++cnt)
+ for (cnt = 0; cnt < nhere - 1 && cnt < len; ++cnt)
if (cp[cnt] != usrc[cnt])
break;
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index e0e22070fd..bb9c3886e2 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,90 @@
+2011-12-23 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #12840]
+ * locales/sv_SE: Modernize date format.
+
+ [BZ #12906]
+ * SUPPORTED (SUPPORTED-LOCALES): Add wal_ET entry.
+
+ * locales/wal_ET: Remove lang_ab entry.
+
+ [BZ #12962]
+ * locales/fi_FI: Various fixups.
+ Patch by Marko Myllynen <myllynen@redhat.com>.
+
+ [BZ #13085]
+ * locales/ta_LK: New file.
+ * SUPPORTED (SUPPORTED-LOCALES): Add appropriate entry
+
+ * locales/si_LK: Add country_ab2, country_ab3, country_num.
+
+2011-12-22 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13096]
+ * locales/fi_FI: Fix collation reordering rules.
+
+ [BZ #13189]
+ * SUPPORTED (SUPPORTED-LOCALES): Add ur_IN entry.
+
+ [BZ #13282]
+ * locales/brx_IN: New file.
+ * SUPPORTED (SUPPORTED-LOCALES): Add appropriate entry
+
+ [BZ #13413]
+ * locales/nl_BE: Use LC_MONETARY from nl_NL.
+
+ [BZ #13416]
+ * locales/es_CU: New file.
+ * SUPPORTED (SUPPORTED-LOCALES): Add appropriate entry
+
+ [BZ #13423]
+ * locales/unm_US: New file.
+ * SUPPORTED (SUPPORTED-LOCALES): Add appropriate entry
+
+ [BZ #13523]
+ * locales/bho_IN: New file.
+ * SUPPORTED (SUPPORTED-LOCALES): Add appropriate entry
+
+2011-11-17 Ulrich Drepper <drepper@gmail.com>
+
+ * Makefile (charmaps): Not need to filter out any of the VC
+ directories.
+ (locales): Likewise.
+
+2011-11-11 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13147]
+ * locales/de_AT: Use de_DE for LC_NUMERIC.
+ * locales/es_BO: Use es_ES for LC_MESSAGES and LC_NUMERIC.
+ * locales/es_CL: Likewise.
+ * locales/es_CO: Likewise.
+ * locales/es_DO: Likewise.
+ * locales/es_EC: Likewise.
+ * locales/es_GT: Likewise.
+ * locales/es_HN: Likewise.
+ * locales/es_MX: Likewise.
+ * locales/es_NI: Likewise.
+ * locales/es_PA: Likewise.
+ * locales/es_PE: Likewise.
+ * locales/es_PR: Likewise.
+ * locales/es_PY: Likewise.
+ * locales/es_SV: Likewise.
+ * locales/es_UY: Likewise.
+ * locales/es_VE: Likewise.
+ * locales/es_ES: Fix LC_NUMERIC.
+ * locales/es_CR: Use es_ES for LC_MESSAGES.
+ * locales/fr_BE: Actually use grouping in LC_NUMERIC.
+ * locales/fr_CA: Use fr_FR for LC_MESSAGES and LC_NUMERIC.
+ * locales/fr_CH: Use de_CH for LC_NUMERIC.
+ * locales/fr_LU: Use same grouping in LC_NUMERIC as in LC_MONETARY.
+
+2011-10-15 Ulrich Drepper <drepper@gmail.com>
+
+ * Makefile (tests): Add tst-setlocale2:
+ (LOCALES): Add tr_TR.ISO-8859-9;
+ (tst-setlocale2-ENV): Define.
+ * tst-setlocale2.c: New file.
+
2011-07-02 Roland McGrath <roland@hack.frob.com>
* tests-mbwc/tst_funcs.h (TST_DECL_VARS, TST_HEAD_LOCALE):
diff --git a/localedata/Makefile b/localedata/Makefile
index 81c1377420..4c4acd34f9 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -23,13 +23,10 @@ subdir := localedata
all: # Make this the default target; it will be defined in Rules.
# List with all available character set descriptions.
-charmaps := $(filter-out $(addprefix charmaps/, CVS RCS SCCS %~), \
- $(wildcard charmaps/[A-I]*) \
- $(wildcard charmaps/[J-Z]*))
+charmaps := $(wildcard charmaps/[A-I]*) $(wildcard charmaps/[J-Z]*)
# List with all available character set descriptions.
-locales := $(filter-out $(addprefix locales/, CVS RCS SCCS %~), \
- $(wildcard locales/*))
+locales := $(wildcard locales/*)
subdir-dirs = tests-mbwc
@@ -94,7 +91,7 @@ locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \
tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
- tst-strfmon1 tst-sscanf tst-strptime bug-setlocale1
+ tst-strfmon1 tst-sscanf tst-strptime bug-setlocale1 tst-setlocale2
ifeq (yes,$(build-shared))
ifneq (no,$(PERL))
tests: $(objpfx)mtrace-tst-leaks
@@ -137,7 +134,7 @@ LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \
hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 ja_JP.SJIS fr_FR.ISO-8859-1 \
vi_VN.TCVN5712-1 nb_NO.ISO-8859-1 nn_NO.ISO-8859-1 \
tr_TR.UTF-8 cs_CZ.UTF-8 zh_TW.EUC-TW fa_IR.UTF-8 fr_FR.UTF-8 \
- ja_JP.UTF-8 si_LK.UTF-8
+ ja_JP.UTF-8 si_LK.UTF-8 tr_TR.ISO-8859-9
LOCALE_SRCS := $(shell echo "$(LOCALES)"|sed 's/\([^ .]*\)[^ ]*/\1/g')
CHARMAPS := $(shell echo "$(LOCALES)" | \
sed -e 's/[^ .]*[.]\([^ ]*\)/\1/g' -e s/SJIS/SHIFT_JIS/g)
@@ -303,6 +300,7 @@ $(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
bug-setlocale1-ENV = LOCPATH=$(common-objpfx)localedata
bug-setlocale1-ARGS = $(common-objpfx)
+tst-setlocale2-ENV = LOCPATH=$(common-objpfx)localedata
$(objdir)/iconvdata/gconv-modules:
$(MAKE) -C ../iconvdata subdir=iconvdata $@
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
index 2813c921ae..1fd78472c7 100644
--- a/localedata/SUPPORTED
+++ b/localedata/SUPPORTED
@@ -58,6 +58,7 @@ ber_DZ/UTF-8 \
ber_MA/UTF-8 \
bg_BG.UTF-8/UTF-8 \
bg_BG/CP1251 \
+bho_IN/UTF-8 \
bn_BD/UTF-8 \
bn_IN/UTF-8 \
bo_CN/UTF-8 \
@@ -65,6 +66,7 @@ bo_IN/UTF-8 \
br_FR.UTF-8/UTF-8 \
br_FR/ISO-8859-1 \
br_FR@euro/ISO-8859-15 \
+brx_IN/UTF-8 \
bs_BA.UTF-8/UTF-8 \
bs_BA/ISO-8859-2 \
byn_ER/UTF-8 \
@@ -147,6 +149,7 @@ es_CO.UTF-8/UTF-8 \
es_CO/ISO-8859-1 \
es_CR.UTF-8/UTF-8 \
es_CR/ISO-8859-1 \
+es_CU/UTF-8 \
es_DO.UTF-8/UTF-8 \
es_DO/ISO-8859-1 \
es_EC.UTF-8/UTF-8 \
@@ -377,6 +380,7 @@ sv_SE/ISO-8859-1 \
sw_KE/UTF-8 \
sw_TZ/UTF-8 \
ta_IN/UTF-8 \
+ta_LK/UTF-8 \
te_IN/UTF-8 \
tg_TJ.UTF-8/UTF-8 \
tg_TJ/KOI8-T \
@@ -399,6 +403,8 @@ tt_RU@iqtelif/UTF-8 \
ug_CN/UTF-8 \
uk_UA.UTF-8/UTF-8 \
uk_UA/KOI8-U \
+unm_US/UTF-8 \
+ur_IN/UTF-8 \
ur_PK/UTF-8 \
uz_UZ/ISO-8859-1 \
uz_UZ@cyrillic/UTF-8 \
@@ -409,6 +415,7 @@ wa_BE/ISO-8859-1 \
wa_BE@euro/ISO-8859-15 \
wa_BE.UTF-8/UTF-8 \
wae_CH/UTF-8 \
+wal_ET/UTF-8 \
wo_SN/UTF-8 \
xh_ZA.UTF-8/UTF-8 \
xh_ZA/ISO-8859-1 \
diff --git a/localedata/locales/bho_IN b/localedata/locales/bho_IN
new file mode 100644
index 0000000000..b5c926e1a5
--- /dev/null
+++ b/localedata/locales/bho_IN
@@ -0,0 +1,164 @@
+comment_char %
+escape_char /
+% Bhojpuri language locale for India.
+% Contributed by Alok Ranjan <ranjan_aalok@yahoo.com>,
+% Dr.Chandra Mohan <cmkumar1@rediffmail.com>,
+% Rajesh Ranjan <rajeshkajha@yahoo.com> and Pravin Satpute <psatpute@redhat.com>
+
+LC_IDENTIFICATION
+title "Bhojpuri language locale for India"
+source ""
+address ""
+contact ""
+email "bhashaghar@googlegroups.com"
+tel ""
+fax ""
+language "Bhojpuri"
+territory "India"
+revision "0.1"
+date "2011-12-20"
+%
+category "bho_IN:2011";LC_IDENTIFICATION
+category "bho_IN:2011";LC_CTYPE
+category "bho_IN:2011";LC_COLLATE
+category "bho_IN:2011";LC_TIME
+category "bho_IN:2011";LC_NUMERIC
+category "bho_IN:2011";LC_MONETARY
+category "bho_IN:2011";LC_MESSAGES
+category "bho_IN:2011";LC_PAPER
+category "bho_IN:2011";LC_NAME
+category "bho_IN:2011";LC_ADDRESS
+category "bho_IN:2011";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "hi_IN"
+END LC_CTYPE
+
+LC_COLLATE
+copy "hi_IN"
+END LC_COLLATE
+
+LC_MONETARY
+copy "hi_IN"
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "hi_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode/Java
+%
+% Abbreviated weekday names (%a)
+abday "<U0930><U0935><U093F><U0020>";/
+ "<U0938><U094B><U092E><U0020>";/
+ "<U092E><U0902><U0917><U0932><U0020>";/
+ "<U092C><U0941><U0927><U0020>";/
+ "<U0917><U0941><U0930><U0941><U0020>";/
+ "<U0936><U0941><U0915><U094D><U0930><U0020>";/
+ "<U0936><U0928><U093F><U0020>"
+%
+% Full weekday names (%A)
+day "<U0930><U0935><U093F><U0935><U093E><U0930><U0020>";/
+ "<U0938><U094B><U092E><U0935><U093E><U0930><U0020>";/
+ "<U092E><U0902><U0917><U0932><U0935><U093E><U0930><U0020>";/
+ "<U092C><U0941><U0927><U0935><U093E><U0930><U0020>";/
+ "<U0917><U0941><U0930><U0941><U0935><U093E><U0930><U0020>";/
+ "<U0936><U0941><U0915><U094D><U0930><U0935><U093E><U0930><U0020>";/
+ "<U0936><U0928><U093F><U0935><U093E><U0930><U0020>"
+%
+% Abbreviated month names (%b)
+abmon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U0905><U092A><U094D><U0930><U0948><U0932>";/
+ "<U092E><U0908>";"<U091C><U0942><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0908>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U092E><U094D><U092C><U0930>";/
+ "<U0905><U0915><U094D><U091F><U0942><U092C><U0930>";/
+ "<U0928><U0935><U092E><U094D><U092C><U0930>";/
+ "<U0926><U093F><U0938><U092E><U094D><U092C><U0930>"%
+% Full month names (%B)
+mon "<U091C><U0928><U0935><U0930><U0940>";/
+ "<U092B><U0930><U0935><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U091A>";/
+ "<U0905><U092A><U094D><U0930><U0948><U0932>";/
+ "<U092E><U0908>";"<U091C><U0942><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0908>";/
+ "<U0905><U0917><U0938><U094D><U0924>";/
+ "<U0938><U093F><U0924><U092E><U094D><U092C><U0930>";/
+ "<U0905><U0915><U094D><U091F><U0942><U092C><U0930>";/
+ "<U0928><U0935><U092E><U094D><U092C><U0930>";/
+ "<U0926><U093F><U0938><U092E><U094D><U092C><U0930>"%
+%
+% Equivalent of AM PM
+am_pm "<U092A><U0942><U0930><U094D><U0935><U093E><U0939><U094D><U0928>";/
+ "<U0905><U092A><U0930><U093E><U0939><U094D><U0928>"
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
+END LC_TIME
+
+
+LC_MESSAGES
+copy "hi_IN"
+END LC_MESSAGES
+
+
+LC_PAPER
+copy "hi_IN"
+END LC_PAPER
+
+
+LC_NAME
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U0936><U094D><U0930><U0940>"
+name_mrs "<U0936><U094D><U0930><U0940><U092E><U0924><U0940>"
+name_miss "<U0915><U0941><U092E><U093E><U0930><U0940>"
+name_ms "<U0915><U0941><U092E><U093E><U0930>"
+END LC_NAME
+
+
+LC_ADDRESS
+copy "hi_IN"
+END LC_ADDRESS
+
+
+LC_TELEPHONE
+copy "hi_IN"
+END LC_TELEPHONE
+
+
+LC_MEASUREMENT
+copy "hi_IN"
+END LC_MEASUREMENT
diff --git a/localedata/locales/brx_IN b/localedata/locales/brx_IN
new file mode 100644
index 0000000000..0277a8e0a4
--- /dev/null
+++ b/localedata/locales/brx_IN
@@ -0,0 +1,185 @@
+comment_char %
+escape_char /
+% Bodo language locale for India.
+% Contributed by Pravin Satpute <psatpute@redhat.com> and Sanjib Narzary <alayaran@gmail.com>
+% Reference http://www.unicode.org/cldr/trac/browser/trunk/common/main/brx.xml
+
+LC_IDENTIFICATION
+title "Bodo language locale for India"
+source "Red Hat Pune"
+address "Level 1, Tower X, Cybercity, Magarpatta City, Hadapsar, Pune-411013 "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Bodo"
+territory "India"
+revision "1.0"
+date "2011-10-17"
+%
+category "brx_IN:2011";LC_IDENTIFICATION
+category "brx_IN:2011";LC_CTYPE
+category "brx_IN:2011";LC_COLLATE
+category "brx_IN:2011";LC_TIME
+category "brx_IN:2011";LC_NUMERIC
+category "brx_IN:2011";LC_MONETARY
+category "brx_IN:2011";LC_MESSAGES
+category "brx_IN:2011";LC_PAPER
+category "brx_IN:2011";LC_NAME
+category "brx_IN:2011";LC_ADDRESS
+category "brx_IN:2011";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "hi_IN"
+END LC_CTYPE
+
+LC_COLLATE
+copy "hi_IN"
+END LC_COLLATE
+
+LC_MONETARY
+copy "hi_IN"
+END LC_MONETARY
+
+
+LC_NUMERIC
+copy "hi_IN"
+END LC_NUMERIC
+
+
+LC_TIME
+% This is the POSIX Locale definition for the LC_TIME category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% Abbreviated weekday names (%a)
+abday "<U0930><U092C><U093F>";"<U0938><U092E>";/
+ "<U092E><U0902><U0917><U0932>";"<U092C><U0941><U0926>";/
+ "<U092C><U093F><U0938><U0925><U093F>";/
+ "<U0938><U0941><U0916><U0941><U0930>";"<U0938><U0941><U0928><U093F>"
+%
+
+% Full weekday names (%A)
+day "<U0930><U092C><U093F><U092C><U093E><U0930>";/
+ "<U0938><U094B><U092C><U093E><U0930>";/
+ "<U092E><U0902><U0917><U0932><U092C><U093E><U0930>";/
+ "<U092C><U0941><U0926><U092C><U093E><U0930>";/
+ "<U092C><U093F><U0938><U0925><U093F><U092C><U093E><U0930>";/
+ "<U0938><U0941><U0916><U0941><U0930><U092C><U093E><U0930>";/
+ "<U0938><U0941><U0928><U093F><U092C><U093E><U0930>"
+%
+% Abbreviated month names (%b)
+abmon "<U091C><U093E><U0928><U0941><U0935><U093E><U0930><U0940>";/
+ "<U092B><U0947><U092C><U094D><U0930><U0941><U0935><U093E><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U0938>";/
+ "<U090F><U092A><U094D><U0930><U093F><U0932>";/
+ "<U092E><U0947>";/
+ "<U091C><U0941><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0907>";/
+ "<U0906><U0917><U0938><U094D><U0925>";/
+ "<U0938><U0947><U092C><U0925><U0947><U091C><U094D><U092C><U093C><U0930>";/
+ "<U0905><U0916><U0925><U092C><U0930>";/
+ "<U0928><U092C><U0947><U091C><U094D><U092C><U093C><U0930>";/
+ "<U0926><U093F><U0938><U0947><U091C><U094D><U092C><U093C><U0930>"
+%
+
+% Full month names (%B)
+mon "<U091C><U093E><U0928><U0941><U0935><U093E><U0930><U0940>";/
+ "<U092B><U0947><U092C><U094D><U0930><U0941><U0935><U093E><U0930><U0940>";/
+ "<U092E><U093E><U0930><U094D><U0938>";/
+ "<U090F><U092A><U094D><U0930><U093F><U0932>";/
+ "<U092E><U0947>";/
+ "<U091C><U0941><U0928>";/
+ "<U091C><U0941><U0932><U093E><U0907>";/
+ "<U0906><U0917><U0938><U094D><U0925>";/
+ "<U0938><U0947><U092C><U0925><U0947><U091C><U094D><U092C><U093C><U0930>";/
+ "<U0905><U0916><U0925><U092C><U0930>";/
+ "<U0928><U092C><U0947><U091C><U094D><U092C><U093C><U0930>";/
+ "<U0926><U093F><U0938><U0947><U091C><U094D><U092C><U093C><U0930>"
+%
+% Equivalent of AM PM
+
+am_pm "<U092B><U0941><U0902><U002E>";/
+ "<U092C><U0947><U0932><U093E><U0938><U0947><U002E>"
+%
+% Appropriate date and time representation
+% %A %d %b %Y%I:%M:%S %Z
+d_t_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059><U0020><U0025><U0049><U003A><U0025><U004D><U003A>/
+<U0025><U0053><U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation
+% %A %d %b %Y
+d_fmt "<U0025><U0041><U0020><U0025><U0064><U0020><U0025><U0062>/
+<U0020><U0025><U0059>"
+%
+% Appropriate time representation
+% %I:%M:%S %Z
+t_fmt "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0020><U0025><U005A>"
+%
+% Appropriate 12 h time representation (%r)
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053>/
+<U0020><U0025><U0070><U0020><U0025><U005A>"
+%
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
+END LC_TIME
+
+
+LC_MESSAGES
+% This is the POSIX Locale definition for the LC_MESSAGES category
+% generated by IBM Basic CountryPack Transformer.
+% These are generated based on XML base Locale definition file
+% for IBM Class for Unicode.
+%
+% ^(Yes|[yY])
+yesexpr "<U005E><U0028><U0928><U0902><U0917><U094C><U007C><U005B><U0079>/
+<U0059><U005D><U0029>"
+%
+% ^(No|[nN])
+noexpr "<U005E><U0028><U0928><U0919><U093E><U007C><U005B><U006E><U004E>/
+<U005D><U0029>"
+%
+END LC_MESSAGES
+
+
+LC_PAPER
+copy "hi_IN"
+END LC_PAPER
+
+
+LC_NAME
+% This is the ISO_IEC TR14652 Locale definition for the LC_NAME category
+% generated by IBM Basic CountryPack Transformer.
+%
+%
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0066><U0025><U0074>/
+<U0025><U0067>"
+name_gen ""
+name_mr "<U004D><U0072><U002E>"
+name_mrs "<U004D><U0072><U0073><U002E>"
+name_miss "<U004D><U0069><U0073><U0073><U002E>"
+name_ms "<U004D><U0073><U002E>"
+
+END LC_NAME
+
+
+LC_ADDRESS
+copy "hi_IN"
+END LC_ADDRESS
+
+
+LC_TELEPHONE
+copy "hi_IN"
+END LC_TELEPHONE
+
+
+LC_MEASUREMENT
+copy "hi_IN"
+END LC_MEASUREMENT
diff --git a/localedata/locales/de_AT b/localedata/locales/de_AT
index 4e0b7fb158..b3adf907c4 100644
--- a/localedata/locales/de_AT
+++ b/localedata/locales/de_AT
@@ -78,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "de_DE"
END LC_NUMERIC
LC_TIME
abday "<U0053><U006F><U006E>";"<U004D><U006F><U006E>";/
- "<U0044><U0069><U0065>";"<U004D><U0069><U0074>";/
- "<U0044><U006F><U006E>";"<U0046><U0072><U0065>";/
- "<U0053><U0061><U006D>"
+ "<U0044><U0069><U0065>";"<U004D><U0069><U0074>";/
+ "<U0044><U006F><U006E>";"<U0046><U0072><U0065>";/
+ "<U0053><U0061><U006D>"
day "<U0053><U006F><U006E><U006E><U0074><U0061><U0067>";/
- "<U004D><U006F><U006E><U0074><U0061><U0067>";/
- "<U0044><U0069><U0065><U006E><U0073><U0074><U0061><U0067>";/
- "<U004D><U0069><U0074><U0074><U0077><U006F><U0063><U0068>";/
- "<U0044><U006F><U006E><U006E><U0065><U0072><U0073><U0074><U0061><U0067>";/
- "<U0046><U0072><U0065><U0069><U0074><U0061><U0067>";/
- "<U0053><U0061><U006D><U0073><U0074><U0061><U0067>"
+ "<U004D><U006F><U006E><U0074><U0061><U0067>";/
+ "<U0044><U0069><U0065><U006E><U0073><U0074><U0061><U0067>";/
+ "<U004D><U0069><U0074><U0074><U0077><U006F><U0063><U0068>";/
+ "<U0044><U006F><U006E><U006E><U0065><U0072><U0073><U0074><U0061><U0067>";/
+ "<U0046><U0072><U0065><U0069><U0074><U0061><U0067>";/
+ "<U0053><U0061><U006D><U0073><U0074><U0061><U0067>"
abmon "<U004A><U00E4><U006E>";"<U0046><U0065><U0062>";/
- "<U004D><U00E4><U0072>";"<U0041><U0070><U0072>";/
- "<U004D><U0061><U0069>";"<U004A><U0075><U006E>";/
- "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
- "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
- "<U004E><U006F><U0076>";"<U0044><U0065><U007A>"
+ "<U004D><U00E4><U0072>";"<U0041><U0070><U0072>";/
+ "<U004D><U0061><U0069>";"<U004A><U0075><U006E>";/
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
+ "<U0053><U0065><U0070>";"<U004F><U006B><U0074>";/
+ "<U004E><U006F><U0076>";"<U0044><U0065><U007A>"
mon "<U004A><U00E4><U006E><U006E><U0065><U0072>";/
- "<U0046><U0065><U0062><U0065><U0072>";/
- "<U004D><U00E4><U0072><U007A>";/
- "<U0041><U0070><U0072><U0069><U006C>";/
- "<U004D><U0061><U0069>";/
- "<U004A><U0075><U006E><U0069>";/
- "<U004A><U0075><U006C><U0069>";/
- "<U0041><U0075><U0067><U0075><U0073><U0074>";/
- "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
- "<U004F><U006B><U0074><U006F><U0062><U0065><U0072>";/
- "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
- "<U0044><U0065><U007A><U0065><U006D><U0062><U0065><U0072>"
+ "<U0046><U0065><U0062><U0065><U0072>";/
+ "<U004D><U00E4><U0072><U007A>";/
+ "<U0041><U0070><U0072><U0069><U006C>";/
+ "<U004D><U0061><U0069>";/
+ "<U004A><U0075><U006E><U0069>";/
+ "<U004A><U0075><U006C><U0069>";/
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
+ "<U004F><U006B><U0074><U006F><U0062><U0065><U0072>";/
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
+ "<U0044><U0065><U007A><U0065><U006D><U0062><U0065><U0072>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_BO b/localedata/locales/es_BO
index c77bb1d5d5..69643115fe 100644
--- a/localedata/locales/es_BO
+++ b/localedata/locales/es_BO
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_CL b/localedata/locales/es_CL
index ff44fa8c5f..fe5b6d95e2 100644
--- a/localedata/locales/es_CL
+++ b/localedata/locales/es_CL
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_CO b/localedata/locales/es_CO
index 4c1de136be..5db5d6dcfd 100644
--- a/localedata/locales/es_CO
+++ b/localedata/locales/es_CO
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_CR b/localedata/locales/es_CR
index 6cff560624..f998c86246 100644
--- a/localedata/locales/es_CR
+++ b/localedata/locales/es_CR
@@ -47,8 +47,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,34 +78,34 @@ END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0059>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_CU b/localedata/locales/es_CU
new file mode 100644
index 0000000000..67fb5f9a0c
--- /dev/null
+++ b/localedata/locales/es_CU
@@ -0,0 +1,122 @@
+comment_char %
+escape_char /
+%
+% Spanish Language Locale for Cuba
+% Address: San Antonio de los Ba<U00F8>os Highway, Kilometer 1 1/2,
+% University of Informatic Sciences
+% Contact: Rosniel Arian Montanet
+% Email: ramontanet@estudiantes.uci.cu
+% Tel: +45 - 837-2531
+% Fax: +45 - 0000000
+% Language: es
+% Territory: CU
+% Revision: 0.1
+% Date: 2011-10-19
+% Application: general
+% Users: general
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title "Spanish locale for Cuba"
+source ""
+address "San Antonio de los Ba<U00F8>os Highway, Kilometer 1 1/2, University of Informatic Sciences "
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Spanish"
+territory "Cuba"
+revision "0.1"
+date "2011-10-19"
+%
+category "es_CU:2000";LC_IDENTIFICATION
+category "es_CU:2000";LC_CTYPE
+category "es_CU:2000";LC_COLLATE
+category "es_CU:2000";LC_TIME
+category "es_CU:2000";LC_NUMERIC
+category "es_CU:2000";LC_MONETARY
+category "es_CU:2000";LC_MESSAGES
+category "es_CU:2000";LC_PAPER
+category "es_CU:2000";LC_NAME
+category "es_CU:2000";LC_ADDRESS
+category "es_CU:2000";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_COLLATE
+% Copy the template from ISO/IEC 14651
+copy "iso14651_t1"
+END LC_COLLATE
+
+LC_CTYPE
+copy "i18n"
+
+translit_start
+include "translit_combining";""
+translit_end
+END LC_CTYPE
+
+LC_MESSAGES
+copy "es_ES"
+END LC_MESSAGES
+
+LC_MONETARY
+int_curr_symbol "<U0043><U0055><U0050><U0020>"
+currency_symbol "<U0024>"
+mon_decimal_point "<U002C>"
+mon_thousands_sep "<U0020>"
+mon_grouping 3;3
+positive_sign ""
+negative_sign "<U002D>"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 0
+p_sep_by_space 1
+n_cs_precedes 0
+n_sep_by_space 1
+p_sign_posn 1
+n_sign_posn 1
+END LC_MONETARY
+
+LC_NUMERIC
+decimal_point "<U002C>"
+thousands_sep ""
+grouping 0;0
+END LC_NUMERIC
+
+LC_TIME
+copy "es_ES"
+END LC_TIME
+
+LC_PAPER
+height 297
+width 210
+END LC_PAPER
+
+LC_TELEPHONE
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
+<U006C>"
+int_prefix "<U0035><U0033>"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+% FIXME
+measurement 1
+END LC_MEASUREMENT
+
+LC_NAME
+name_fmt "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
+<U0025><U006D><U0025><U0074><U0025><U0066>"
+END LC_NAME
+
+LC_ADDRESS
+postal_fmt "<U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>/
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
+<U004E><U0025><U007A><U0020><U0025><U0054><U0025>/
+<U004E><U0025><U0063><U0025><U004E>"
+country_ab2 "<U0043><U0055>"
+country_ab3 "<U0043><U0055><U0042>"
+country_num 192
+END LC_ADDRESS
diff --git a/localedata/locales/es_DO b/localedata/locales/es_DO
index fcd0f9e5af..7cf54cf3a9 100644
--- a/localedata/locales/es_DO
+++ b/localedata/locales/es_DO
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_EC b/localedata/locales/es_EC
index b8d4c8ff32..480f6ef78e 100644
--- a/localedata/locales/es_EC
+++ b/localedata/locales/es_EC
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_ES b/localedata/locales/es_ES
index fba4125368..fcf90cbdbc 100644
--- a/localedata/locales/es_ES
+++ b/localedata/locales/es_ES
@@ -85,40 +85,40 @@ END LC_MONETARY
LC_NUMERIC
decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+thousands_sep "<U002E>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_GT b/localedata/locales/es_GT
index 455b076c43..49d369f74f 100644
--- a/localedata/locales/es_GT
+++ b/localedata/locales/es_GT
@@ -55,8 +55,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -78,9 +77,7 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_HN b/localedata/locales/es_HN
index 53892b4c5e..a809188463 100644
--- a/localedata/locales/es_HN
+++ b/localedata/locales/es_HN
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_MX b/localedata/locales/es_MX
index 91dac23d8a..7a1cccc96b 100644
--- a/localedata/locales/es_MX
+++ b/localedata/locales/es_MX
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_NI b/localedata/locales/es_NI
index c0c395fe0e..207f2dabf8 100644
--- a/localedata/locales/es_NI
+++ b/localedata/locales/es_NI
@@ -47,8 +47,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -70,9 +69,7 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_PA b/localedata/locales/es_PA
index 10d6d82337..ae5cd3a4fd 100644
--- a/localedata/locales/es_PA
+++ b/localedata/locales/es_PA
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_PE b/localedata/locales/es_PE
index 634c9272d7..da1a64036d 100644
--- a/localedata/locales/es_PE
+++ b/localedata/locales/es_PE
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_PR b/localedata/locales/es_PR
index 546b6c20e9..53496d48c0 100644
--- a/localedata/locales/es_PR
+++ b/localedata/locales/es_PR
@@ -47,8 +47,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -70,41 +69,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_PY b/localedata/locales/es_PY
index 2c31b2f250..ce226bad72 100644
--- a/localedata/locales/es_PY
+++ b/localedata/locales/es_PY
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_SV b/localedata/locales/es_SV
index 3b6be32b1f..d99b6cff62 100644
--- a/localedata/locales/es_SV
+++ b/localedata/locales/es_SV
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,9 +78,7 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002E>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/es_UY b/localedata/locales/es_UY
index 8b7ed0da45..cbb7d5a86f 100644
--- a/localedata/locales/es_UY
+++ b/localedata/locales/es_UY
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/es_VE b/localedata/locales/es_VE
index ca6637a6df..1ec2dff6ad 100644
--- a/localedata/locales/es_VE
+++ b/localedata/locales/es_VE
@@ -56,8 +56,7 @@ copy "es_ES"
END LC_CTYPE
LC_MESSAGES
-yesexpr "<U005E><U005B><U0073><U0053><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "es_ES"
END LC_MESSAGES
LC_MONETARY
@@ -79,41 +78,39 @@ n_sign_posn 1
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "es_ES"
END LC_NUMERIC
LC_TIME
abday "<U0064><U006F><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
- "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
- "<U0073><U00E1><U0062>"
+ "<U006D><U0061><U0072>";"<U006D><U0069><U00E9>";/
+ "<U006A><U0075><U0065>";"<U0076><U0069><U0065>";/
+ "<U0073><U00E1><U0062>"
day "<U0064><U006F><U006D><U0069><U006E><U0067><U006F>";/
- "<U006C><U0075><U006E><U0065><U0073>";/
- "<U006D><U0061><U0072><U0074><U0065><U0073>";/
- "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
- "<U006A><U0075><U0065><U0076><U0065><U0073>";/
- "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
- "<U0073><U00E1><U0062><U0061><U0064><U006F>"
+ "<U006C><U0075><U006E><U0065><U0073>";/
+ "<U006D><U0061><U0072><U0074><U0065><U0073>";/
+ "<U006D><U0069><U00E9><U0072><U0063><U006F><U006C><U0065><U0073>";/
+ "<U006A><U0075><U0065><U0076><U0065><U0073>";/
+ "<U0076><U0069><U0065><U0072><U006E><U0065><U0073>";/
+ "<U0073><U00E1><U0062><U0061><U0064><U006F>"
abmon "<U0065><U006E><U0065>";"<U0066><U0065><U0062>";/
- "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
- "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0062><U0072>";/
+ "<U006D><U0061><U0079>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U006C>";"<U0061><U0067><U006F>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U0069><U0063>"
mon "<U0065><U006E><U0065><U0072><U006F>";/
- "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
- "<U006D><U0061><U0072><U007A><U006F>";/
- "<U0061><U0062><U0072><U0069><U006C>";/
- "<U006D><U0061><U0079><U006F>";/
- "<U006A><U0075><U006E><U0069><U006F>";/
- "<U006A><U0075><U006C><U0069><U006F>";/
- "<U0061><U0067><U006F><U0073><U0074><U006F>";/
- "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U0065><U0062><U0072><U0065><U0072><U006F>";/
+ "<U006D><U0061><U0072><U007A><U006F>";/
+ "<U0061><U0062><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0079><U006F>";/
+ "<U006A><U0075><U006E><U0069><U006F>";/
+ "<U006A><U0075><U006C><U0069><U006F>";/
+ "<U0061><U0067><U006F><U0073><U0074><U006F>";/
+ "<U0073><U0065><U0070><U0074><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U0075><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0069><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U0069><U0063><U0069><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/fi_FI b/localedata/locales/fi_FI
index c3604871f6..f51700c281 100644
--- a/localedata/locales/fi_FI
+++ b/localedata/locales/fi_FI
@@ -1,4 +1,4 @@
-escape_char /
+escape_char /
comment_char %
% Finnish language locale for Finland
@@ -45,10 +45,10 @@ category "fi_FI:2000";LC_NUMERIC
category "fi_FI:2000";LC_MONETARY
category "fi_FI:2000";LC_MESSAGES
category "fi_FI:2000";LC_PAPER
+category "fi_FI:2000";LC_MEASUREMENT
category "fi_FI:2000";LC_NAME
category "fi_FI:2000";LC_ADDRESS
category "fi_FI:2000";LC_TELEPHONE
-
END LC_IDENTIFICATION
LC_COLLATE
@@ -63,64 +63,68 @@ reorder-after <z>
<a-diaerisis>
<o-diaerisis>
-reorder-after <U005A>
+reorder-after <U007A>
<U00E5> <a-ring>;<BAS>;<MIN>;IGNORE
-<U00C5> <a-ring>;<BAS>;<CAP>;IGNORE
<U01FB> <a-ring>;<ACA>;<MIN>;IGNORE
-<U01FA> <a-ring>;<ACA>;<CAP>;IGNORE
<U00E4> <a-diaerisis>;<BAS>;<MIN>;IGNORE
-<U00C4> <a-diaerisis>;<BAS>;<CAP>;IGNORE
<U00E6> <a-diaerisis>;<REU>;<MIN>;IGNORE
-<U00C6> <a-diaerisis>;<REU>;<CAP>;IGNORE
<U01FD> <a-diaerisis>;<U01FD>;<MIN>;IGNORE
-<U01FC> <a-diaerisis>;<U01FD>;<CAP>;IGNORE
<U01E3> <a-diaerisis>;<MAC>;<MIN>;IGNORE
-<U01E2> <a-diaerisis>;<MAC>;<CAP>;IGNORE
<U00F6> <o-diaerisis>;<BAS>;<MIN>;IGNORE
-<U00D6> <o-diaerisis>;<BAS>;<CAP>;IGNORE
<U00F8> <o-diaerisis>;<U00D8>;<MIN>;IGNORE
-<U00D8> <o-diaerisis>;<U00D8>;<CAP>;IGNORE
<U01FF> <o-diaerisis>;<U01FF>;<MIN>;IGNORE
-<U01FE> <o-diaerisis>;<U01FF>;<CAP>;IGNORE
<U00F5> <o-diaerisis>;<TIL>;<MIN>;IGNORE
+reorder-after <U005A>
+<U00C5> <a-ring>;<BAS>;<CAP>;IGNORE
+<U01FA> <a-ring>;<ACA>;<CAP>;IGNORE
+<U00C4> <a-diaerisis>;<BAS>;<CAP>;IGNORE
+<U00C6> <a-diaerisis>;<REU>;<CAP>;IGNORE
+<U01FC> <a-diaerisis>;<U01FD>;<CAP>;IGNORE
+<U01E2> <a-diaerisis>;<MAC>;<CAP>;IGNORE
+<U00D6> <o-diaerisis>;<BAS>;<CAP>;IGNORE
+<U00D8> <o-diaerisis>;<U00D8>;<CAP>;IGNORE
+<U01FE> <o-diaerisis>;<U01FF>;<CAP>;IGNORE
<U00D5> <o-diaerisis>;<TIL>;<CAP>;IGNORE
-reorder-after <U016A>
+reorder-after <U016B>
<U0076> <v>;<U0056>;<BAS>;<MIN>
-<U0056> <v>;<U0056>;<BAS>;<CAP>
<U1E7D> <v>;<U0056>;<TIL>;<MIN>
-<U1E7C> <v>;<U0056>;<TIL>;<CAP>
<U0077> <w>;<U0057>;<BAS>;<MIN>
-<U0057> <w>;<U0057>;<BAS>;<CAP>
<U1E83> <w>;<U0057>;<ACA>;<MIN>
-<U1E82> <w>;<U0057>;<ACA>;<CAP>
<U1E81> <w>;<U0057>;<GRA>;<MIN>
-<U1E80> <w>;<U0057>;<GRA>;<CAP>
<U0175> <w>;<U0057>;<CIR>;<MIN>
-<U0174> <w>;<U0057>;<CIR>;<CAP>
<U1E85> <w>;<U0057>;<REU>;<MIN>
-<U1E84> <w>;<U0057>;<REU>;<CAP>
<U1E87> <w>;<U0057>;<PCT>;<MIN>
+reorder-after <U016A>
+<U0056> <v>;<U0056>;<BAS>;<CAP>
+<U1E7C> <v>;<U0056>;<TIL>;<CAP>
+<U0057> <w>;<U0057>;<BAS>;<CAP>
+<U1E82> <w>;<U0057>;<ACA>;<CAP>
+<U1E80> <w>;<U0057>;<GRA>;<CAP>
+<U0174> <w>;<U0057>;<CIR>;<CAP>
+<U1E84> <w>;<U0057>;<REU>;<CAP>
<U1E86> <w>;<U0057>;<PCT>;<CAP>
reorder-after <U00FF>
<U00FC> <y>;<DTT>;<MIN>;IGNORE
+reorder-after <U0178>
<U00DC> <y>;<DTT>;<CAP>;IGNORE
% Present in iso14651_t1, but these definitions seem to have been
% removed from latest iso14651 tables.
-reorder-after <U0162>
+reorder-after <U0163>
<U00FE> "<t><h>";"<LIG><LIG>";"<MIN><MIN>";IGNORE
+reorder-after <U0162>
<U00DE> "<t><h>";"<LIG><LIG>";"<CAP><CAP>";IGNORE
reorder-after <U0064>
<U00F0> <d>;<PCL>;<MIN>;IGNORE
-<U00D0> <d>;<PCL>;<CAP>;IGNORE
<U0111> <d>;<OBL>;<MIN>;IGNORE
+reorder-after <U0044>
+<U00D0> <d>;<PCL>;<CAP>;IGNORE
<U0110> <d>;<OBL>;<CAP>;IGNORE
reorder-end
-
END LC_COLLATE
LC_CTYPE
@@ -141,12 +145,10 @@ positive_sign ""
negative_sign "<U002D>"
int_frac_digits 2
frac_digits 2
-% int_curr_symbol precedes
-% curr_symbol succeeds
p_cs_precedes 0
-p_sep_by_space 2
+p_sep_by_space 1
n_cs_precedes 0
-n_sep_by_space 2
+n_sep_by_space 1
p_sign_posn 1
n_sign_posn 1
END LC_MONETARY
@@ -168,18 +170,18 @@ day "<U0073><U0075><U006E><U006E><U0075><U006E><U0074><U0061><U0069>";/
"<U0074><U006F><U0072><U0073><U0074><U0061><U0069>";/
"<U0070><U0065><U0072><U006A><U0061><U006E><U0074><U0061><U0069>";/
"<U006C><U0061><U0075><U0061><U006E><U0074><U0061><U0069>"
-abmon "<U0074><U0061><U006D><U006D><U0069><U00A0>";/
- "<U0068><U0065><U006C><U006D><U0069><U00A0>";/
+abmon "<U0074><U0061><U006D><U006D><U0069>";/
+ "<U0068><U0065><U006C><U006D><U0069>";/
"<U006D><U0061><U0061><U006C><U0069><U0073>";/
- "<U0068><U0075><U0068><U0074><U0069><U00A0>";/
- "<U0074><U006F><U0075><U006B><U006F><U00A0>";/
- "<U006B><U0065><U0073><U00E4><U00A0><U00A0>";/
- "<U0068><U0065><U0069><U006E><U00E4><U00A0>";/
- "<U0065><U006C><U006F><U00A0><U00A0><U00A0>";/
- "<U0073><U0079><U0079><U0073><U00A0><U00A0>";/
- "<U006C><U006F><U006B><U0061><U00A0><U00A0>";/
+ "<U0068><U0075><U0068><U0074><U0069>";/
+ "<U0074><U006F><U0075><U006B><U006F>";/
+ "<U006B><U0065><U0073><U00E4>";/
+ "<U0068><U0065><U0069><U006E><U00E4>";/
+ "<U0065><U006C><U006F>";/
+ "<U0073><U0079><U0079><U0073>";/
+ "<U006C><U006F><U006B><U0061>";/
"<U006D><U0061><U0072><U0072><U0061><U0073>";/
- "<U006A><U006F><U0075><U006C><U0075><U00A0>"
+ "<U006A><U006F><U0075><U006C><U0075>"
mon "<U0074><U0061><U006D><U006D><U0069><U006B><U0075><U0075>";/
"<U0068><U0065><U006C><U006D><U0069><U006B><U0075><U0075>";/
"<U006D><U0061><U0061><U006C><U0069><U0073><U006B><U0075><U0075>";/
@@ -202,13 +204,14 @@ t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U002D><U0064><U002E><U0025>/
<U002D><U006D><U002E><U0025><U0059><U0020><U0025><U0048><U002E><U0025>/
<U004D><U002E><U0025><U0053><U0020><U0025><U007A>"
+week 7;19971130;4
first_weekday 2 % Monday
first_workday 2 % Monday
END LC_TIME
LC_MESSAGES
-yesexpr "<U005E><U005B><U004B><U006B><U004A><U006A><U0059><U0079><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U004E><U006E><U0045><U0065><U005D><U002E><U002A>"
+yesexpr "<U005E><U005B><U004B><U006B><U0059><U0079><U005D><U002E><U002A>"
+noexpr "<U005E><U005B><U0045><U0065><U004E><U006E><U005D><U002E><U002A>"
END LC_MESSAGES
LC_PAPER
@@ -217,6 +220,7 @@ width 210
END LC_PAPER
LC_TELEPHONE
+tel_dom_fmt "<U0028><U0025><U0041><U0029><U0020><U0025><U006C>"
tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
<U006C>"
int_prefix "<U0033><U0035><U0038>"
@@ -230,15 +234,25 @@ END LC_MEASUREMENT
LC_NAME
name_fmt "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
<U0025><U006D><U0025><U0074><U0025><U0066>"
+% Finnish equivalents for Mr/Mrs/Miss/Ms are herra/rouva/rouva/neiti
+% but they are practically never used, thus we don't define them here.
END LC_NAME
LC_ADDRESS
-postal_fmt "<U0025><U0066><U0025><U004E><U0025><U0061><U0025><U004E>/
-<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
-<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
-<U004E><U0025><U007A><U0020><U0025><U0054><U0025>/
+postal_fmt "<U0025><U0066><U0025><U004E><U0025><U0064><U0025><U004E>/
+<U0025><U0062><U0025><U004E><U0025><U0061><U0025><U004E><U0025><U0073>/
+<U0020><U0025><U0068><U0025><U0074><U0025><U0065><U0025><U0074><U0025>/
+<U0072><U0025><U004E><U0025><U007A><U0020><U0025><U0054><U0025>/
<U004E><U0025><U0063><U0025><U004E>"
country_ab2 "<U0046><U0049>"
country_ab3 "<U0046><U0049><U004E>"
country_num 246
+country_name "<U0053><U0075><U006F><U006D><U0069>"
+country_post "<U0046><U0049>"
+country_car "<U0046><U0049><U004E>"
+country_isbn 952
+lang_name "<U0073><U0075><U006F><U006D><U0069>"
+lang_ab "<U0066><U0069>"
+lang_term "<U0066><U0069><U006E>"
+lang_lib "<U0066><U0069><U006E>"
END LC_ADDRESS
diff --git a/localedata/locales/fr_BE b/localedata/locales/fr_BE
index f9c911aba5..43beac59c6 100644
--- a/localedata/locales/fr_BE
+++ b/localedata/locales/fr_BE
@@ -79,7 +79,7 @@ END LC_MONETARY
LC_NUMERIC
decimal_point "<U002C>"
thousands_sep "<U002E>"
-grouping 0;0
+grouping 3;3
END LC_NUMERIC
LC_TIME
diff --git a/localedata/locales/fr_CA b/localedata/locales/fr_CA
index 992a4b1333..21eb6701ae 100644
--- a/localedata/locales/fr_CA
+++ b/localedata/locales/fr_CA
@@ -55,8 +55,7 @@ copy "en_CA"
END LC_COLLATE
LC_MESSAGES
-yesexpr "<U005E><U005B><U006F><U004F><U0079><U0059><U005D><U002E><U002A>"
-noexpr "<U005E><U005B><U006E><U004E><U005D><U002E><U002A>"
+copy "fr_FR"
END LC_MESSAGES
LC_MONETARY
@@ -78,41 +77,39 @@ n_sign_posn 0
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep "<U0020>"
-grouping 0;0
+copy "fr_FR"
END LC_NUMERIC
LC_TIME
abday "<U0064><U0069><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
- "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
- "<U0073><U0061><U006D>"
+ "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
+ "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
+ "<U0073><U0061><U006D>"
day "<U0064><U0069><U006D><U0061><U006E><U0063><U0068><U0065>";/
- "<U006C><U0075><U006E><U0064><U0069>";/
- "<U006D><U0061><U0072><U0064><U0069>";/
- "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
- "<U006A><U0065><U0075><U0064><U0069>";/
- "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
- "<U0073><U0061><U006D><U0065><U0064><U0069>"
+ "<U006C><U0075><U006E><U0064><U0069>";/
+ "<U006D><U0061><U0072><U0064><U0069>";/
+ "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
+ "<U006A><U0065><U0075><U0064><U0069>";/
+ "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
+ "<U0073><U0061><U006D><U0065><U0064><U0069>"
abmon "<U006A><U0061><U006E>";"<U0066><U00E9><U0076>";/
- "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
- "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
+ "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
mon "<U006A><U0061><U006E><U0076><U0069><U0065><U0072>";/
- "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
- "<U006D><U0061><U0072><U0073>";/
- "<U0061><U0076><U0072><U0069><U006C>";/
- "<U006D><U0061><U0069>";/
- "<U006A><U0075><U0069><U006E>";/
- "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
- "<U0061><U006F><U00FB><U0074>";/
- "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
+ "<U006D><U0061><U0072><U0073>";/
+ "<U0061><U0076><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0069>";/
+ "<U006A><U0075><U0069><U006E>";/
+ "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
+ "<U0061><U006F><U00FB><U0074>";/
+ "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/fr_CH b/localedata/locales/fr_CH
index 7cb62822b6..5ab6af108d 100644
--- a/localedata/locales/fr_CH
+++ b/localedata/locales/fr_CH
@@ -64,41 +64,39 @@ copy "de_CH"
END LC_MONETARY
LC_NUMERIC
-decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+copy "de_CH"
END LC_NUMERIC
LC_TIME
abday "<U0064><U0069><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
- "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
- "<U0073><U0061><U006D>"
+ "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
+ "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
+ "<U0073><U0061><U006D>"
day "<U0064><U0069><U006D><U0061><U006E><U0063><U0068><U0065>";/
- "<U006C><U0075><U006E><U0064><U0069>";/
- "<U006D><U0061><U0072><U0064><U0069>";/
- "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
- "<U006A><U0065><U0075><U0064><U0069>";/
- "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
- "<U0073><U0061><U006D><U0065><U0064><U0069>"
+ "<U006C><U0075><U006E><U0064><U0069>";/
+ "<U006D><U0061><U0072><U0064><U0069>";/
+ "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
+ "<U006A><U0065><U0075><U0064><U0069>";/
+ "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
+ "<U0073><U0061><U006D><U0065><U0064><U0069>"
abmon "<U006A><U0061><U006E>";"<U0066><U00E9><U0076>";/
- "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
- "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
+ "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
mon "<U006A><U0061><U006E><U0076><U0069><U0065><U0072>";/
- "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
- "<U006D><U0061><U0072><U0073>";/
- "<U0061><U0076><U0072><U0069><U006C>";/
- "<U006D><U0061><U0069>";/
- "<U006A><U0075><U0069><U006E>";/
- "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
- "<U0061><U006F><U00FB><U0074>";/
- "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
+ "<U006D><U0061><U0072><U0073>";/
+ "<U0061><U0076><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0069>";/
+ "<U006A><U0075><U0069><U006E>";/
+ "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
+ "<U0061><U006F><U00FB><U0074>";/
+ "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002E><U0020><U0025><U006D><U002E><U0020><U0025><U0079>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/fr_LU b/localedata/locales/fr_LU
index 80b29b645d..8cb90b3611 100644
--- a/localedata/locales/fr_LU
+++ b/localedata/locales/fr_LU
@@ -78,40 +78,40 @@ END LC_MONETARY
LC_NUMERIC
decimal_point "<U002C>"
-thousands_sep ""
-grouping 0;0
+thousands_sep "<U0020>"
+grouping 3;3
END LC_NUMERIC
LC_TIME
abday "<U0064><U0069><U006D>";"<U006C><U0075><U006E>";/
- "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
- "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
- "<U0073><U0061><U006D>"
+ "<U006D><U0061><U0072>";"<U006D><U0065><U0072>";/
+ "<U006A><U0065><U0075>";"<U0076><U0065><U006E>";/
+ "<U0073><U0061><U006D>"
day "<U0064><U0069><U006D><U0061><U006E><U0063><U0068><U0065>";/
- "<U006C><U0075><U006E><U0064><U0069>";/
- "<U006D><U0061><U0072><U0064><U0069>";/
- "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
- "<U006A><U0065><U0075><U0064><U0069>";/
- "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
- "<U0073><U0061><U006D><U0065><U0064><U0069>"
+ "<U006C><U0075><U006E><U0064><U0069>";/
+ "<U006D><U0061><U0072><U0064><U0069>";/
+ "<U006D><U0065><U0072><U0063><U0072><U0065><U0064><U0069>";/
+ "<U006A><U0065><U0075><U0064><U0069>";/
+ "<U0076><U0065><U006E><U0064><U0072><U0065><U0064><U0069>";/
+ "<U0073><U0061><U006D><U0065><U0064><U0069>"
abmon "<U006A><U0061><U006E>";"<U0066><U00E9><U0076>";/
- "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
- "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
- "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
- "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
- "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
+ "<U006D><U0061><U0072>";"<U0061><U0076><U0072>";/
+ "<U006D><U0061><U0069>";"<U006A><U0075><U006E>";/
+ "<U006A><U0075><U0069>";"<U0061><U006F><U00FB>";/
+ "<U0073><U0065><U0070>";"<U006F><U0063><U0074>";/
+ "<U006E><U006F><U0076>";"<U0064><U00E9><U0063>"
mon "<U006A><U0061><U006E><U0076><U0069><U0065><U0072>";/
- "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
- "<U006D><U0061><U0072><U0073>";/
- "<U0061><U0076><U0072><U0069><U006C>";/
- "<U006D><U0061><U0069>";/
- "<U006A><U0075><U0069><U006E>";/
- "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
- "<U0061><U006F><U00FB><U0074>";/
- "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
- "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
- "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
- "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
+ "<U0066><U00E9><U0076><U0072><U0069><U0065><U0072>";/
+ "<U006D><U0061><U0072><U0073>";/
+ "<U0061><U0076><U0072><U0069><U006C>";/
+ "<U006D><U0061><U0069>";/
+ "<U006A><U0075><U0069><U006E>";/
+ "<U006A><U0075><U0069><U006C><U006C><U0065><U0074>";/
+ "<U0061><U006F><U00FB><U0074>";/
+ "<U0073><U0065><U0070><U0074><U0065><U006D><U0062><U0072><U0065>";/
+ "<U006F><U0063><U0074><U006F><U0062><U0072><U0065>";/
+ "<U006E><U006F><U0076><U0065><U006D><U0062><U0072><U0065>";/
+ "<U0064><U00E9><U0063><U0065><U006D><U0062><U0072><U0065>"
d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
d_fmt "<U0025><U0064><U002E><U0025><U006D><U002E><U0025><U0059>"
t_fmt "<U0025><U0054>"
diff --git a/localedata/locales/nl_BE b/localedata/locales/nl_BE
index 33f3e1cdb8..869eda682e 100644
--- a/localedata/locales/nl_BE
+++ b/localedata/locales/nl_BE
@@ -59,7 +59,7 @@ copy "nl_NL"
END LC_MESSAGES
LC_MONETARY
-copy "fr_BE"
+copy "nl_NL"
END LC_MONETARY
LC_NUMERIC
diff --git a/localedata/locales/si_LK b/localedata/locales/si_LK
index daf618caf0..8d8643f780 100644
--- a/localedata/locales/si_LK
+++ b/localedata/locales/si_LK
@@ -85,46 +85,46 @@ LC_TIME
%
% Abbreviated weekday names (%a)
abday "<U0D89>";"<U0DC3>";/
- "<U0D85>";"<U0DB6>";/
- "<U0DB6><U0DCA><U200D><U0DBB>";"<U0DC3><U0DD2>";/
- "<U0DC3><U0DD9>"
+ "<U0D85>";"<U0DB6>";/
+ "<U0DB6><U0DCA><U200D><U0DBB>";"<U0DC3><U0DD2>";/
+ "<U0DC3><U0DD9>"
%
% Full weekday names (%A)
day "<U0D89><U0DBB><U0DD2><U0DAF><U0DCF>";/
- "<U0DC3><U0DB3><U0DD4><U0DAF><U0DCF>";/
- "<U0D85><U0D9F><U0DC4><U0DBB><U0DD4><U0DC0><U0DCF><U0DAF><U0DCF>";/
- "<U0DB6><U0DAF><U0DCF><U0DAF><U0DCF>";/
- "<U0DB6><U0DCA><U200D><U0DBB><U0DC4><U0DC3><U0DCA><U0DB4><U0DAD><U0DD2><U0DB1><U0DCA><U0DAF><U0DCF>";/
+ "<U0DC3><U0DB3><U0DD4><U0DAF><U0DCF>";/
+ "<U0D85><U0D9F><U0DC4><U0DBB><U0DD4><U0DC0><U0DCF><U0DAF><U0DCF>";/
+ "<U0DB6><U0DAF><U0DCF><U0DAF><U0DCF>";/
+ "<U0DB6><U0DCA><U200D><U0DBB><U0DC4><U0DC3><U0DCA><U0DB4><U0DAD><U0DD2><U0DB1><U0DCA><U0DAF><U0DCF>";/
"<U0DC3><U0DD2><U0D9A><U0DD4><U0DBB><U0DCF><U0DAF><U0DCF>";/
- "<U0DC3><U0DD9><U0DB1><U0DC3><U0DD4><U0DBB><U0DCF><U0DAF><U0DCF>"
+ "<U0DC3><U0DD9><U0DB1><U0DC3><U0DD4><U0DBB><U0DCF><U0DAF><U0DCF>"
%
% Abbreviated month names (%b)
abmon "<U0DA2><U0DB1>";/
- "<U0DB4><U0DD9><U0DB6>";/
- "<U0DB8><U0DCF><U0DBB><U0DCA>";/
- "<U0D85><U0DB4><U0DCA><U200D><U0DBB><U0DD2>";/
- "<U0DB8><U0DD0><U0DBA><U0DD2>";/
- "<U0DA2><U0DD6><U0DB1><U0DD2>";/
- "<U0DA2><U0DD6><U0DBD><U0DD2>";/
- "<U0D85><U0D9C><U0DDD>";/
- "<U0DC3><U0DD0><U0DB4><U0DCA>";/
- "<U0D94><U0D9A><U0DCA>";/
- "<U0DB1><U0DD9><U0DC0><U0DD0>";/
- "<U0DAF><U0DD9><U0DC3><U0DD0>"
+ "<U0DB4><U0DD9><U0DB6>";/
+ "<U0DB8><U0DCF><U0DBB><U0DCA>";/
+ "<U0D85><U0DB4><U0DCA><U200D><U0DBB><U0DD2>";/
+ "<U0DB8><U0DD0><U0DBA><U0DD2>";/
+ "<U0DA2><U0DD6><U0DB1><U0DD2>";/
+ "<U0DA2><U0DD6><U0DBD><U0DD2>";/
+ "<U0D85><U0D9C><U0DDD>";/
+ "<U0DC3><U0DD0><U0DB4><U0DCA>";/
+ "<U0D94><U0D9A><U0DCA>";/
+ "<U0DB1><U0DD9><U0DC0><U0DD0>";/
+ "<U0DAF><U0DD9><U0DC3><U0DD0>"
%
% Full month names (%B)
mon "<U0DA2><U0DB1><U0DC0><U0DCF><U0DBB><U0DD2>";/
"<U0DB4><U0DD9><U0DB6><U0DBB><U0DC0><U0DCF><U0DBB><U0DD2>";/
- "<U0DB8><U0DCF><U0DBB><U0DCA><U0DAD><U0DD4>";/
- "<U0D85><U0DB4><U0DCA><U200D><U0DBB><U0DD2><U0DBA><U0DD9><U0DBD><U0DCA>";/
- "<U0DB8><U0DD0><U0DBA><U0DD2>";/
- "<U0DA2><U0DD6><U0DB1><U0DD2>";/
- "<U0DA2><U0DD6><U0DBD><U0DD2>";/
- "<U0D85><U0D9C><U0DDD><U0DC3><U0DCA><U0DAD><U0DD4>";/
- "<U0DC3><U0DD0><U0DB4><U0DCA><U0DAD><U0DD0><U0DB8><U0DCA><U0DB6><U0DBB><U0DCA>";/
- "<U0D94><U0D9A><U0DCA><U0DAD><U0DDD><U0DB6><U0DBB><U0DCA>";/
- "<U0DB1><U0DDC><U0DC0><U0DD0><U0DB8><U0DCA><U0DB6><U0DBB><U0DCA>";/
- "<U0DAF><U0DD9><U0DC3><U0DD0><U0DB8><U0DCA><U0DB6><U0DBB><U0DCA>"
+ "<U0DB8><U0DCF><U0DBB><U0DCA><U0DAD><U0DD4>";/
+ "<U0D85><U0DB4><U0DCA><U200D><U0DBB><U0DD2><U0DBA><U0DD9><U0DBD><U0DCA>";/
+ "<U0DB8><U0DD0><U0DBA><U0DD2>";/
+ "<U0DA2><U0DD6><U0DB1><U0DD2>";/
+ "<U0DA2><U0DD6><U0DBD><U0DD2>";/
+ "<U0D85><U0D9C><U0DDD><U0DC3><U0DCA><U0DAD><U0DD4>";/
+ "<U0DC3><U0DD0><U0DB4><U0DCA><U0DAD><U0DD0><U0DB8><U0DCA><U0DB6><U0DBB><U0DCA>";/
+ "<U0D94><U0D9A><U0DCA><U0DAD><U0DDD><U0DB6><U0DBB><U0DCA>";/
+ "<U0DB1><U0DDC><U0DC0><U0DD0><U0DB8><U0DCA><U0DB6><U0DBB><U0DCA>";/
+ "<U0DAF><U0DD9><U0DC3><U0DD0><U0DB8><U0DCA><U0DB6><U0DBB><U0DCA>"
%
% Equivalent of AM PM
am_pm "<U0DB4><U0DD9><U002E><U0DC0><U002E>";"<U0DB4><U002E><U0DC0><U002E>"
@@ -196,6 +196,10 @@ LC_ADDRESS
%
postal_fmt "<U0025><U007A><U0025><U0063><U0025><U0054><U0025><U0073><U0025><U0062><U0025><U0065><U0025><U0072>"
+country_ab2 "<U004C><U004B>"
+country_ab3 "<U004C><U004B><U0041>"
+country_num 144
+
END LC_ADDRESS
diff --git a/localedata/locales/sv_SE b/localedata/locales/sv_SE
index f558e24712..2dbc85364c 100644
--- a/localedata/locales/sv_SE
+++ b/localedata/locales/sv_SE
@@ -169,9 +169,9 @@ mon "<U006A><U0061><U006E><U0075><U0061><U0072><U0069>";/
"<U006F><U006B><U0074><U006F><U0062><U0065><U0072>";/
"<U006E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
"<U0064><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
-d_t_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0048><U002E><U0025><U004D><U002E><U0025><U0053>"
+d_t_fmt "<U0025><U0061><U0020><U0025><U0065><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
d_fmt "<U0025><U0059><U002D><U0025><U006D><U002D><U0025><U0064>"
-t_fmt "<U0025><U0048><U002E><U0025><U004D><U002E><U0025><U0053>"
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
am_pm "";""
t_fmt_ampm ""
date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
diff --git a/localedata/locales/ta_LK b/localedata/locales/ta_LK
new file mode 100644
index 0000000000..80b2f69a78
--- /dev/null
+++ b/localedata/locales/ta_LK
@@ -0,0 +1,85 @@
+comment_char %
+escape_char /
+%
+% Tamil language locale for Sri Lanka
+% Language: ta
+% Territory: LK
+% Revision: 1.0
+% Date: 2011,August,11
+% Application: general
+% Users: general
+% Charset: SLS 1326:2008
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title "Tamil language locale for Sri Lanka"
+source "J.Yogaraj"
+address "30/36Q -2/1,Charles Apartments, De Silva Cross Rd,/
+ Kalubowila,Dehiwela,SriLanka."
+contact "94-777-315206"
+email "yogaraj.ubuntu@gmail.com"
+tel "94-112-765773"
+fax ""
+language "Tamil"
+territory "Sri Lanka"
+revision "1.0"
+date "2011,August,11"
+%
+category "ta_LK:2000";LC_IDENTIFICATION
+category "ta_LK:2000";LC_CTYPE
+category "ta_LK:2000";LC_COLLATE
+category "ta_LK:2000";LC_TIME
+category "ta_LK:2000";LC_NUMERIC
+category "ta_LK:2000";LC_MONETARY
+category "ta_LK:2000";LC_MESSAGES
+category "ta_LK:2000";LC_PAPER
+category "ta_LK:2000";LC_NAME
+category "ta_LK:2000";LC_ADDRESS
+category "ta_LK:2000";LC_TELEPHONE
+
+END LC_IDENTIFICATION
+
+LC_COLLATE
+copy "ta_IN"
+END LC_COLLATE
+
+LC_CTYPE
+copy "ta_IN"
+END LC_CTYPE
+
+LC_MESSAGES
+copy "ta_IN"
+END LC_MESSAGES
+
+LC_MONETARY
+copy "ta_IN"
+END LC_MONETARY
+
+LC_NUMERIC
+copy "ta_IN"
+END LC_NUMERIC
+
+LC_TIME
+copy "ta_IN"
+END LC_TIME
+
+LC_PAPER
+copy "si_LK"
+END LC_PAPER
+
+LC_TELEPHONE
+copy "si_LK"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "si_LK"
+END LC_MEASUREMENT
+
+LC_NAME
+copy "ta_IN"
+END LC_NAME
+
+LC_ADDRESS
+copy "si_LK"
+END LC_ADDRESS
diff --git a/localedata/locales/unm_US b/localedata/locales/unm_US
new file mode 100644
index 0000000000..9734e25b3b
--- /dev/null
+++ b/localedata/locales/unm_US
@@ -0,0 +1,150 @@
+comment_char %
+escape_char /
+%
+% Unami Delaware Locale for U.S.A.
+% Language: unm
+% Contact: lugubrili@hotmail.com
+% Territory: US
+% Date: 2011-10-27
+% Application: general
+% Users: general
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_IDENTIFICATION
+title "Unami Delaware locale for the USA"
+source ""
+address ""
+contact ""
+email "bug-glibc-locales@gnu.org"
+tel ""
+fax ""
+language "Unami Delaware"
+territory "USA"
+revision "1.0"
+date "2011-10-27"
+%
+category "unm_US:2011";LC_IDENTIFICATION
+category "unm_US:2011";LC_CTYPE
+category "unm_US:2011";LC_COLLATE
+category "unm_US:2011";LC_TIME
+category "unm_US:2011";LC_NUMERIC
+category "unm_US:2011";LC_MONETARY
+category "unm_US:2011";LC_MESSAGES
+category "unm_US:2011";LC_PAPER
+category "unm_US:2011";LC_NAME
+category "unm_US:2011";LC_ADDRESS
+category "unm_US:2011";LC_TELEPHONE
+category "unm_US:2011";LC_MEASUREMENT
+
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "i18n"
+
+translit_start
+include "translit_combining";""
+translit_end
+END LC_CTYPE
+
+LC_COLLATE
+copy "iso14651_t1"
+END LC_COLLATE
+
+LC_TIME
+% ken, man, tus, lel, tas, pel, sat
+abday "<U006B><U0065><U006E>";"<U006D><U0061><U006E>";/
+ "<U0074><U0075><U0073>";"<U006C><U0065><U006C>";/
+ "<U0074><U0061><U0073>";"<U0070><U0065><U006C>";/
+ "<U0073><U0061><U0074>"
+% kentuwei, manteke, tusteke, lelai, tasteke, pelaiteke, sateteke
+day "<U006B><U0065><U006E><U0074><U0075><U0077><U0065><U0069>";/
+ "<U006D><U0061><U006E><U0074><U0065><U006B><U0065>";/
+ "<U0074><U0075><U0073><U0074><U0065><U006B><U0065>";/
+ "<U006C><U0065><U006C><U0061><U0069>";/
+ "<U0074><U0061><U0073><U0074><U0065><U006B><U0065>";/
+ "<U0070><U0065><U006C><U0061><U0069><U0074><U0065><U006B><U0065>";/
+ "<U0073><U0061><U0074><U0065><U0074><U0065><U006B><U0065>"
+% eni, chk, xam, kwe, tai, nip, lai, win, tah, puk, kun, mux
+abmon "<U0065><U006E><U0069>";"<U0063><U0068><U006B>";/
+ "<U0078><U0061><U006D>";"<U006B><U0077><U0065>";/
+ "<U0074><U0061><U0069>";"<U006E><U0069><U0070>";/
+ "<U006C><U0061><U0069>";"<U0077><U0069><U006E>";/
+ "<U0074><U0061><U0068>";"<U0070><U0075><U006B>";/
+ "<U006B><U0075><U006E>";"<U006D><U0075><U0078>"
+% enikwsi, chkwali, xamokhwite, kwetayoxe, tainipen, kichinipen
+% lainipen, winaminke, kichitahkok, puksit, wini, muxkotae
+mon "<U0065><U006E><U0069><U006B><U0077><U0073><U0069>";/
+ "<U0063><U0068><U006B><U0077><U0061><U006C><U0069>";/
+ "<U0078><U0061><U006D><U006F><U006B><U0068><U0077><U0069><U0074><U0065>";/
+ "<U006B><U0077><U0065><U0074><U0061><U0079><U006F><U0078><U0065>";/
+ "<U0074><U0061><U0069><U006E><U0069><U0070><U0065><U006E>";/
+ "<U006B><U0069><U0063><U0068><U0069><U006E><U0069><U0070><U0065><U006E>";/
+ "<U006C><U0061><U0069><U006E><U0069><U0070><U0065><U006E>";/
+ "<U0077><U0069><U006E><U0061><U006D><U0069><U006E><U006B><U0065>";/
+ "<U006B><U0069><U0063><U0068><U0069><U0074><U0061><U0068><U006B><U006F><U006B>";/
+ "<U0070><U0075><U006B><U0073><U0069><U0074>";/
+ "<U0077><U0069><U006E><U0069>";/
+ "<U006D><U0075><U0078><U006B><U006F><U0074><U0061><U0065>"
+d_t_fmt "<U0025><U0061><U0020><U0025><U0064><U0020><U0025><U0062><U0020><U0025><U0059><U0020><U0025><U0054><U0020><U0025><U005A>"
+d_fmt "<U0025><U0064><U002F><U0025><U006D><U002F><U0025><U0079>"
+t_fmt "<U0025><U0054>"
+am_pm "";""
+t_fmt_ampm ""
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+<U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+<U0025><U005A><U0020><U0025><U0059>"
+week 7;19971130;4
+first_weekday 1
+first_workday 2
+END LC_TIME
+
+LC_NUMERIC
+decimal_point "<U002E>"
+thousands_sep "<U0020>"
+grouping 2;2;2;3
+END LC_NUMERIC
+
+LC_MONETARY
+int_curr_symbol "<U0055><U0053><U0044><U0020>"
+currency_symbol "<U0024>"
+mon_decimal_point "<U002E>"
+mon_thousands_sep "<U0020>"
+mon_grouping 3
+positive_sign ""
+negative_sign "<U002D>"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sep_by_space 0
+n_cs_precedes 1
+n_sep_by_space 0
+p_sign_posn 1
+n_sign_posn 1
+END LC_MONETARY
+
+LC_MESSAGES
+yesexpr "<U005E><U005B><U0079><U0059><U005D><U002E><U002A>"
+noexpr "<U005E><U005B><U006B><U004B><U006D><U004D><U005D><U002E><U002A>"
+END LC_MESSAGES
+
+LC_PAPER
+copy "en_US"
+END LC_PAPER
+
+LC_NAME
+name_fmt "<U0025><U0064><U0025><U0074><U0025><U0067><U0025><U0074>/
+<U0025><U006D><U0025><U0074><U0025><U0066>"
+END LC_NAME
+
+LC_ADDRESS
+copy "en_US"
+END LC_ADDRESS
+
+LC_TELEPHONE
+copy "en_US"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+copy "en_US"
+END LC_MEASUREMENT
diff --git a/localedata/locales/wal_ET b/localedata/locales/wal_ET
index 33953cd60a..7846531f45 100644
--- a/localedata/locales/wal_ET
+++ b/localedata/locales/wal_ET
@@ -110,7 +110,6 @@ country_num 231 % 210 found in at least one ISO 3166 doc
% country_car unknown
% country_isbn unknown, Need ISO 2108
lang_name "<U12C8><U120B><U12ED><U1273><U1271>"
-lang_ab "<U0077><U0061><U006C>"
lang_term "<U0077><U0061><U006C>"
lang_lib "<U0077><U0061><U006C>"
@@ -144,12 +143,12 @@ LC_TIME
% Abbreviated weekday names (%a)
%
abday "<U12C8><U130B> ";/
- "<U1233><U12ED><U1296>";/
- "<U121B><U1246><U1233>";/
- "<U12A0><U1229><U12CB>";/
- "<U1203><U1219><U1233>";/
- "<U12A0><U122D><U1263>";/
- "<U1244><U122B> "
+ "<U1233><U12ED><U1296>";/
+ "<U121B><U1246><U1233>";/
+ "<U12A0><U1229><U12CB>";/
+ "<U1203><U1219><U1233>";/
+ "<U12A0><U122D><U1263>";/
+ "<U1244><U122B> "
%
% Full weekday names (%A)
%
@@ -169,32 +168,32 @@ day "<U12C8><U130B>";/
% Abbreviated month names (%b)
%
abmon "<U1303><U1295><U12E9>";/
- "<U134C><U1265><U1229>";/
- "<U121B><U122D><U127D>";/
- "<U12A4><U1355><U1228>";/
- "<U121C><U12ED><U0020>";/
- "<U1301><U1295><U0020>";/
- "<U1301><U120B><U12ED>";/
- "<U12A6><U1308><U1235>";/
- "<U1234><U1355><U1274>";/
- "<U12A6><U12AD><U1270>";/
- "<U1296><U126C><U121D>";/
- "<U12F2><U1234><U121D>"
+ "<U134C><U1265><U1229>";/
+ "<U121B><U122D><U127D>";/
+ "<U12A4><U1355><U1228>";/
+ "<U121C><U12ED><U0020>";/
+ "<U1301><U1295><U0020>";/
+ "<U1301><U120B><U12ED>";/
+ "<U12A6><U1308><U1235>";/
+ "<U1234><U1355><U1274>";/
+ "<U12A6><U12AD><U1270>";/
+ "<U1296><U126C><U121D>";/
+ "<U12F2><U1234><U121D>"
%
% Full month names (%B)
%
mon "<U1303><U1295><U12E9><U12C8><U122A>";/
- "<U134C><U1265><U1229><U12C8><U122A>";/
- "<U121B><U122D><U127D>";/
- "<U12A4><U1355><U1228><U120D>";/
- "<U121C><U12ED>";/
- "<U1301><U1295>";/
- "<U1301><U120B><U12ED>";/
- "<U12A6><U1308><U1235><U1275>";/
- "<U1234><U1355><U1274><U121D><U1260><U122D>";/
- "<U12A6><U12AD><U1270><U12CD><U1260><U122D>";/
- "<U1296><U126C><U121D><U1260><U122D>";/
- "<U12F2><U1234><U121D><U1260><U122D>"
+ "<U134C><U1265><U1229><U12C8><U122A>";/
+ "<U121B><U122D><U127D>";/
+ "<U12A4><U1355><U1228><U120D>";/
+ "<U121C><U12ED>";/
+ "<U1301><U1295>";/
+ "<U1301><U120B><U12ED>";/
+ "<U12A6><U1308><U1235><U1275>";/
+ "<U1234><U1355><U1274><U121D><U1260><U122D>";/
+ "<U12A6><U12AD><U1270><U12CD><U1260><U122D>";/
+ "<U1296><U126C><U121D><U1260><U122D>";/
+ "<U12F2><U1234><U121D><U1260><U122D>"
%
% Equivalent of AM PM
%
@@ -202,7 +201,7 @@ mon "<U1303><U1295><U12E9><U12C8><U122A>";/
% also <U12A1><U1218><U122D><U1232>
%
am_pm "<U121B><U1208><U12F6>";/
- "<U1243><U121B>"
+ "<U1243><U121B>"
%
% Appropriate date representation (%x)
% "%d/%m/%Y"
diff --git a/localedata/tst-setlocale2.c b/localedata/tst-setlocale2.c
new file mode 100644
index 0000000000..a4eb11fb37
--- /dev/null
+++ b/localedata/tst-setlocale2.c
@@ -0,0 +1,76 @@
+#include <ctype.h>
+#include <locale.h>
+#include <stdio.h>
+#include <wctype.h>
+
+
+static int
+do_test (void)
+{
+ const char *loc = "de_DE.ISO-8859-1";
+ if (setlocale (LC_ALL, loc) == NULL)
+ {
+ printf ("cannot set %s locale\n", loc);
+ return 1;
+ }
+ printf ("selected locale %s\n", loc);
+
+ wint_t win = 0xe4;
+ wint_t wex = 0xc4;
+ wint_t wch = towupper (win);
+ if (wch != wex)
+ {
+ printf ("towupper(%x) = %x, expected %x\n", win, wch, wex);
+ return 1;
+ }
+ wch = toupper (win);
+ if (wch != wex)
+ {
+ printf ("toupper(%x) = %x, expected %x\n", win, wch, wex);
+ return 1;
+ }
+
+ win = 0x69;
+ wex = 0x49;
+ wch = towupper (win);
+ if (wch != wex)
+ {
+ printf ("towupper(%x) = %x, expected %x\n", win, wch, wex);
+ return 1;
+ }
+ wch = toupper (win);
+ if (wch != wex)
+ {
+ printf ("toupper(%x) = %x, expected %x\n", win, wch, wex);
+ return 1;
+ }
+
+ loc = "tr_TR.ISO-8859-9";
+ if (setlocale (LC_ALL, loc) == NULL)
+ {
+ printf ("cannot set %s locale\n", loc);
+ return 1;
+ }
+ printf ("selected locale %s\n", loc);
+
+ win = 0x69;
+ wex = 0x130;
+ wch = towupper (win);
+ if (wch != wex)
+ {
+ printf ("towupper(%x) = %x, expected %x\n", win, wch, wex);
+ return 1;
+ }
+ wch = toupper (win);
+ wex = 0xdd;
+ if (wch != wex)
+ {
+ printf ("toupper(%x) = %x, expected %x\n", win, wch, wex);
+ return 1;
+ }
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/malloc/arena.c b/malloc/arena.c
index 9114fd28e9..cb8548ba3f 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -747,8 +747,6 @@ _int_new_arena(size_t size)
main_arena.next = a;
#ifdef PER_THREAD
- ++narenas;
-
(void)mutex_unlock(&list_lock);
#endif
@@ -786,30 +784,6 @@ get_free_list (void)
static mstate
reused_arena (void)
{
- if (narenas <= mp_.arena_test)
- return NULL;
-
- static int narenas_limit;
- if (narenas_limit == 0)
- {
- if (mp_.arena_max != 0)
- narenas_limit = mp_.arena_max;
- else
- {
- int n = __get_nprocs ();
-
- if (n >= 1)
- narenas_limit = NARENAS_FROM_NCORES (n);
- else
- /* We have no information about the system. Assume two
- cores. */
- narenas_limit = NARENAS_FROM_NCORES (2);
- }
- }
-
- if (narenas < narenas_limit)
- return NULL;
-
mstate result;
static mstate next_to_use;
if (next_to_use == NULL)
@@ -844,10 +818,41 @@ arena_get2(mstate a_tsd, size_t size)
mstate a;
#ifdef PER_THREAD
- if ((a = get_free_list ()) == NULL
- && (a = reused_arena ()) == NULL)
- /* Nothing immediately available, so generate a new arena. */
- a = _int_new_arena(size);
+ static size_t narenas_limit;
+
+ a = get_free_list ();
+ if (a == NULL)
+ {
+ /* Nothing immediately available, so generate a new arena. */
+ if (narenas_limit == 0)
+ {
+ if (mp_.arena_max != 0)
+ narenas_limit = mp_.arena_max;
+ else
+ {
+ int n = __get_nprocs ();
+
+ if (n >= 1)
+ narenas_limit = NARENAS_FROM_NCORES (n);
+ else
+ /* We have no information about the system. Assume two
+ cores. */
+ narenas_limit = NARENAS_FROM_NCORES (2);
+ }
+ }
+ repeat:;
+ size_t n = narenas;
+ if (__builtin_expect (n <= mp_.arena_test || n < narenas_limit, 0))
+ {
+ if (catomic_compare_and_exchange_bool_acq (&narenas, n + 1, n))
+ goto repeat;
+ a = _int_new_arena (size);
+ if (__builtin_expect (a == NULL, 0))
+ catomic_decrement (&narenas);
+ }
+ else
+ a = reused_arena ();
+ }
#else
if(!a_tsd)
a = a_tsd = &main_arena;
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 864c7d908b..8608083adb 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2855,10 +2855,10 @@ munmap_chunk(mchunkptr p)
mp_.n_mmaps--;
mp_.mmapped_mem -= total_size;
- int ret __attribute__ ((unused)) = munmap((char *)block, total_size);
-
- /* munmap returns non-zero on failure */
- assert(ret == 0);
+ /* If munmap failed the process virtual memory address space is in a
+ bad shape. Just leave the block hanging around, the process will
+ terminate shortly anyway since not much can be done. */
+ munmap((char *)block, total_size);
}
#if HAVE_MREMAP
diff --git a/malloc/mcheck.h b/malloc/mcheck.h
index 225f21e1a3..462b944af2 100644
--- a/malloc/mcheck.h
+++ b/malloc/mcheck.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1997,1998,1999,2000,2011 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
@@ -41,7 +41,7 @@ enum mcheck_status
null, the standard function prints on stderr and then calls `abort'. */
extern int mcheck (void (*__abortfunc) (enum mcheck_status)) __THROW;
-/* Similar to `mcheck´ but performs checks for all block whenever one of
+/* Similar to `mcheck' but performs checks for all block whenever one of
the memory handling functions is called. This can be very slow. */
extern int mcheck_pedantic (void (*__abortfunc) (enum mcheck_status)) __THROW;
diff --git a/malloc/mtrace.c b/malloc/mtrace.c
index b55449f1ea..0d0cb35ff3 100644
--- a/malloc/mtrace.c
+++ b/malloc/mtrace.c
@@ -146,10 +146,12 @@ tr_freehook (ptr, caller)
tr_where (caller, info);
/* Be sure to print it first. */
fprintf (mallstream, "- %p\n", ptr);
- __libc_lock_unlock (lock);
if (ptr == mallwatch)
- tr_break ();
- __libc_lock_lock (lock);
+ {
+ __libc_lock_unlock (lock);
+ tr_break ();
+ __libc_lock_lock (lock);
+ }
__free_hook = tr_old_free_hook;
if (tr_old_free_hook != NULL)
(*tr_old_free_hook) (ptr, caller);
diff --git a/manual/resource.texi b/manual/resource.texi
index 05495722f9..8e3155cb02 100644
--- a/manual/resource.texi
+++ b/manual/resource.texi
@@ -1607,7 +1607,7 @@ processors and so the call
@end smallexample
@noindent
-returns the number of processors which are currently inline (i.e.,
+returns the number of processors which are currently online (i.e.,
available).
For these two pieces of information the GNU C library also provides
diff --git a/manual/stdio.texi b/manual/stdio.texi
index 94f9126c94..588c15bf7d 100644
--- a/manual/stdio.texi
+++ b/manual/stdio.texi
@@ -4780,7 +4780,6 @@ provide equivalent functionality.
@menu
* String Streams:: Streams that get data from or put data in
a string or memory buffer.
-* Obstack Streams:: Streams that store data in an obstack.
* Custom Streams:: Defining your own streams with an arbitrary
input data source and/or output data sink.
@end menu
@@ -4884,64 +4883,6 @@ buf = `hello', size = 5
buf = `hello, world', size = 12
@end smallexample
-@c @group Invalid outside @example.
-@node Obstack Streams
-@subsection Obstack Streams
-
-You can open an output stream that puts it data in an obstack.
-@xref{Obstacks}.
-
-@comment stdio.h
-@comment GNU
-@deftypefun {FILE *} open_obstack_stream (struct obstack *@var{obstack})
-This function opens a stream for writing data into the obstack @var{obstack}.
-This starts an object in the obstack and makes it grow as data is
-written (@pxref{Growing Objects}).
-@c @end group Doubly invalid because not nested right.
-
-Calling @code{fflush} on this stream updates the current size of the
-object to match the amount of data that has been written. After a call
-to @code{fflush}, you can examine the object temporarily.
-
-You can move the file position of an obstack stream with @code{fseek} or
-@code{fseeko} (@pxref{File Positioning}). Moving the file position past
-the end of the data written fills the intervening space with zeros.
-
-To make the object permanent, update the obstack with @code{fflush}, and
-then use @code{obstack_finish} to finalize the object and get its address.
-The following write to the stream starts a new object in the obstack,
-and later writes add to that object until you do another @code{fflush}
-and @code{obstack_finish}.
-
-But how do you find out how long the object is? You can get the length
-in bytes by calling @code{obstack_object_size} (@pxref{Status of an
-Obstack}), or you can null-terminate the object like this:
-
-@smallexample
-obstack_1grow (@var{obstack}, 0);
-@end smallexample
-
-Whichever one you do, you must do it @emph{before} calling
-@code{obstack_finish}. (You can do both if you wish.)
-@end deftypefun
-
-Here is a sample function that uses @code{open_obstack_stream}:
-
-@smallexample
-char *
-make_message_string (const char *a, int b)
-@{
- FILE *stream = open_obstack_stream (&message_obstack);
- output_task (stream);
- fprintf (stream, ": ");
- fprintf (stream, a, b);
- fprintf (stream, "\n");
- fclose (stream);
- obstack_1grow (&message_obstack, 0);
- return obstack_finish (&message_obstack);
-@}
-@end smallexample
-
@node Custom Streams
@subsection Programming Your Own Custom Streams
@cindex custom streams
diff --git a/manual/string.texi b/manual/string.texi
index 2fe60395eb..f7d4ebea1d 100644
--- a/manual/string.texi
+++ b/manual/string.texi
@@ -1249,10 +1249,10 @@ strncmp ("hello, world", "hello, stupid world!!!", 5)
@comment GNU
@deftypefun int strverscmp (const char *@var{s1}, const char *@var{s2})
The @code{strverscmp} function compares the string @var{s1} against
-@var{s2}, considering them as holding indices/version numbers. Return
-value follows the same conventions as found in the @code{strverscmp}
-function. In fact, if @var{s1} and @var{s2} contain no digits,
-@code{strverscmp} behaves like @code{strcmp}.
+@var{s2}, considering them as holding indices/version numbers. The
+return value follows the same conventions as found in the
+@code{strcmp} function. In fact, if @var{s1} and @var{s2} contain no
+digits, @code{strverscmp} behaves like @code{strcmp}.
Basically, we compare strings normally (character by character), until
we find a digit in each string - then we enter a special comparison
diff --git a/math/Makefile b/math/Makefile
index 45954e2e87..41340da1bd 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -1,5 +1,4 @@
-# Copyright (C) 1996-2001,2002,2003,2004,2005,2006
-# Free Software Foundation, Inc.
+# Copyright (C) 1996-2006,2011 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -25,7 +24,8 @@ subdir := math
headers := math.h bits/mathcalls.h bits/mathinline.h bits/huge_val.h \
bits/huge_valf.h bits/huge_vall.h bits/inf.h bits/nan.h \
fpu_control.h complex.h bits/cmathcalls.h fenv.h \
- bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h
+ bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \
+ bits/math-finite.h
# Internal header files.
distribute := math_ldbl.h math_private.h machine/asm.h
@@ -60,13 +60,13 @@ libm-calls = e_acos e_acosh e_asin e_atan2 e_atanh e_cosh e_exp e_fmod \
s_catan s_casin s_ccos s_csin s_ctan s_ctanh s_cacos \
s_casinh s_cacosh s_catanh s_csqrt s_cpow s_cproj s_clog10 \
s_fma s_lrint s_llrint s_lround s_llround e_exp10 w_log2 \
- $(calls:s_%=m_%)
+ s_isinf_ns $(calls:s_%=m_%)
include ../Makeconfig
dbl-only-routines := branred doasin dosincos halfulp mpa mpatan2 \
mpatan mpexp mplog mpsqrt mptan sincos32 slowexp \
- slowpow
+ slowpow sincostab
libm-routines = $(strip $(libm-support) $(libm-calls) \
$(patsubst %_rf,%f_r,$(libm-calls:=f)) \
$(long-m-$(long-double-fcts))) \
diff --git a/math/Versions b/math/Versions
index 39c47626f6..09888510b1 100644
--- a/math/Versions
+++ b/math/Versions
@@ -168,4 +168,34 @@ libm {
# puts exp2l in GLIBC_2.1, which will override this entry.
exp2l;
}
+ GLIBC_2.15 {
+ # Optimized -ffinite-math-only entry points
+ __acos_finite; __acosf_finite; __acosl_finite;
+ __acosh_finite; __acoshf_finite; __acoshl_finite;
+ __asin_finite; __asinf_finite; __asinl_finite;
+ __atan2_finite; __atan2f_finite; __atan2l_finite;
+ __atanh_finite; __atanhf_finite; __atanhl_finite;
+ __cosh_finite; __coshf_finite; __coshl_finite;
+ __exp10_finite; __exp10f_finite; __exp10l_finite;
+ __exp2_finite; __exp2f_finite; __exp2l_finite;
+ __fmod_finite; __fmodf_finite; __fmodl_finite;
+ __hypot_finite; __hypotf_finite; __hypotl_finite;
+ __j0_finite; __j0f_finite; __j0l_finite;
+ __y0_finite; __y0f_finite; __y0l_finite;
+ __j1_finite; __j1f_finite; __j1l_finite;
+ __y1_finite; __y1f_finite; __y1l_finite;
+ __jn_finite; __jnf_finite; __jnl_finite;
+ __yn_finite; __ynf_finite; __ynl_finite;
+ __lgamma_r_finite; __lgammaf_r_finite; __lgammal_r_finite;
+ __log_finite; __logf_finite; __logl_finite;
+ __log10_finite; __log10f_finite; __log10l_finite;
+ __log2_finite; __log2f_finite; __log2l_finite;
+ __pow_finite; __powf_finite; __powl_finite;
+ __remainder_finite; __remainderf_finite; __remainderl_finite;
+ __scalb_finite; __scalbf_finite; __scalbl_finite;
+ __sinh_finite; __sinhf_finite; __sinhl_finite;
+ __sqrt_finite; __sqrtf_finite; __sqrtl_finite;
+ __gamma_r_finite; __gammaf_r_finite; __gammal_r_finite;
+ __exp_finite; __expf_finite; __expl_finite;
+ }
}
diff --git a/math/bits/math-finite.h b/math/bits/math-finite.h
new file mode 100644
index 0000000000..dcf427ca81
--- /dev/null
+++ b/math/bits/math-finite.h
@@ -0,0 +1,329 @@
+/* Entry points to finite-math-only compiler runs.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/math-finite.h> directly; include <math.h> instead."
+#endif
+
+/* acos. */
+extern double __REDIRECT_NTH (acos, (double), __acos_finite);
+extern float __REDIRECT_NTH (acosf, (float), __acosf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (acosl, (long double), __acosl_finite);
+#endif
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
+/* acosh. */
+extern double __REDIRECT_NTH (acosh, (double), __acosh_finite);
+extern float __REDIRECT_NTH (acoshf, (float), __acoshf_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (acoshl, (long double), __acoshl_finite);
+# endif
+#endif
+
+/* asin. */
+extern double __REDIRECT_NTH (asin, (double), __asin_finite);
+extern float __REDIRECT_NTH (asinf, (float), __asinf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (asinl, (long double), __asinl_finite);
+#endif
+
+/* atan2. */
+extern double __REDIRECT_NTH (atan2, (double, double), __atan2_finite);
+extern float __REDIRECT_NTH (atan2f, (float, float), __atan2f_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (atan2l, (long double, long double),
+ __atan2l_finite);
+#endif
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
+/* atanh. */
+extern double __REDIRECT_NTH (atanh, (double), __atanh_finite);
+extern float __REDIRECT_NTH (atanhf, (float), __atanhf_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (atanhl, (long double), __atanhl_finite);
+# endif
+#endif
+
+/* cosh. */
+extern double __REDIRECT_NTH (cosh, (double), __cosh_finite);
+extern float __REDIRECT_NTH (coshf, (float), __coshf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (coshl, (long double), __coshl_finite);
+#endif
+
+/* exp. */
+extern double __REDIRECT_NTH (exp, (double), __exp_finite);
+extern float __REDIRECT_NTH (expf, (float), __expf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (expl, (long double), __expl_finite);
+#endif
+
+#ifdef __USE_GNU
+/* exp10. */
+extern double __REDIRECT_NTH (exp10, (double), __exp10_finite);
+extern float __REDIRECT_NTH (exp10f, (float), __exp10f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (exp10l, (long double), __exp10l_finite);
+# endif
+
+/* pow10. */
+extern double __REDIRECT_NTH (pow10, (double), __exp10_finite);
+extern float __REDIRECT_NTH (pow10f, (float), __exp10f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (pow10l, (long double), __exp10l_finite);
+# endif
+#endif
+
+#ifdef __USE_ISOC99
+/* exp2. */
+extern double __REDIRECT_NTH (exp2, (double), __exp2_finite);
+extern float __REDIRECT_NTH (exp2f, (float), __exp2f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (exp2l, (long double), __exp2l_finite);
+# endif
+#endif
+
+/* fmod. */
+extern double __REDIRECT_NTH (fmod, (double, double), __fmod_finite);
+extern float __REDIRECT_NTH (fmodf, (float, float), __fmodf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (fmodl, (long double, long double),
+ __fmodl_finite);
+#endif
+
+#ifdef __USE_ISOC99
+/* hypot. */
+extern double __REDIRECT_NTH (hypot, (double, double), __hypot_finite);
+extern float __REDIRECT_NTH (hypotf, (float, float), __hypotf_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (hypotl, (long double, long double),
+ __hypotl_finite);
+# endif
+#endif
+
+#if defined __USE_MISC || defined __USE_XOPEN
+/* j0. */
+extern double __REDIRECT_NTH (j0, (double), __j0_finite);
+extern float __REDIRECT_NTH (j0f, (float), __j0f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (j0l, (long double), __j0l_finite);
+# endif
+
+/* y0. */
+extern double __REDIRECT_NTH (y0, (double), __y0_finite);
+extern float __REDIRECT_NTH (y0f, (float), __y0f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (y0l, (long double), __y0l_finite);
+# endif
+
+/* j1. */
+extern double __REDIRECT_NTH (j1, (double), __j1_finite);
+extern float __REDIRECT_NTH (j1f, (float), __j1f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (j1l, (long double), __j1l_finite);
+# endif
+
+/* y1. */
+extern double __REDIRECT_NTH (y1, (double), __y1_finite);
+extern float __REDIRECT_NTH (y1f, (float), __y1f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (y1l, (long double), __y1l_finite);
+# endif
+
+/* jn. */
+extern double __REDIRECT_NTH (jn, (int, double), __jn_finite);
+extern float __REDIRECT_NTH (jnf, (int, float), __jnf_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (jnl, (int, long double), __jnl_finite);
+# endif
+
+/* yn. */
+extern double __REDIRECT_NTH (yn, (int, double), __yn_finite);
+extern float __REDIRECT_NTH (ynf, (int, float), __ynf_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (ynl, (int, long double), __ynl_finite);
+# endif
+#endif
+
+#ifdef __USE_MISC
+/* lgamma_r. */
+extern double __REDIRECT_NTH (lgamma_r, (double, int *), __lgamma_r_finite);
+extern float __REDIRECT_NTH (lgammaf_r, (float, int *), __lgammaf_r_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (lgammal_r, (long double, int *),
+ __lgammal_r_finite);
+# endif
+#endif
+
+#if defined __USE_MISC || defined __USE_XOPEN || defined __USE_ISOC99
+/* lgamma. */
+__extern_always_inline double __NTH (lgamma (double __d))
+{
+# ifdef __USE_ISOC99
+ int __local_signgam = 0;
+ return lgamma_r (__d, &__local_signgam);
+# else
+ return lgamma_r (__d, &signgam);
+# endif
+}
+__extern_always_inline float __NTH (lgammaf (float __d))
+{
+# ifdef __USE_ISOC99
+ int __local_signgam = 0;
+ return lgammaf_r (__d, &__local_signgam);
+# else
+ return lgammaf_r (__d, &signgam);
+# endif
+}
+# ifdef __MATH_DECLARE_LDOUBLE
+__extern_always_inline long double __NTH (lgammal (long double __d))
+{
+# ifdef __USE_ISOC99
+ int __local_signgam = 0;
+ return lgammal_r (__d, &__local_signgam);
+# else
+ return lgammal_r (__d, &signgam);
+# endif
+}
+# endif
+#endif
+
+#if defined __USE_MISC || defined __USE_XOPEN
+/* gamma. */
+__extern_always_inline double __NTH (gamma (double __d))
+{
+# ifdef __USE_ISOC99
+ int __local_signgam = 0;
+ return lgamma_r (__d, &__local_signgam);
+# else
+ return lgamma_r (__d, &signgam);
+# endif
+}
+__extern_always_inline float __NTH (gammaf (float __d))
+{
+# ifdef __USE_ISOC99
+ int __local_signgam = 0;
+ return lgammaf_r (__d, &__local_signgam);
+# else
+ return lgammaf_r (__d, &signgam);
+# endif
+}
+# ifdef __MATH_DECLARE_LDOUBLE
+__extern_always_inline long double __NTH (gammal (long double __d))
+{
+# ifdef __USE_ISOC99
+ int __local_signgam = 0;
+ return lgammal_r (__d, &__local_signgam);
+# else
+ return lgammal_r (__d, &signgam);
+# endif
+}
+# endif
+#endif
+
+/* log. */
+extern double __REDIRECT_NTH (log, (double), __log_finite);
+extern float __REDIRECT_NTH (logf, (float), __logf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (logl, (long double), __logl_finite);
+#endif
+
+/* log10. */
+extern double __REDIRECT_NTH (log10, (double), __log10_finite);
+extern float __REDIRECT_NTH (log10f, (float), __log10f_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (log10l, (long double), __log10l_finite);
+#endif
+
+#ifdef __USE_ISOC99
+/* log2. */
+extern double __REDIRECT_NTH (log2, (double), __log2_finite);
+extern float __REDIRECT_NTH (log2f, (float), __log2f_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (log2l, (long double), __log2l_finite);
+# endif
+#endif
+
+/* pow. */
+extern double __REDIRECT_NTH (pow, (double, double), __pow_finite);
+extern float __REDIRECT_NTH (powf, (float, float), __powf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (powl, (long double, long double),
+ __powl_finite);
+#endif
+
+/* remainder. */
+extern double __REDIRECT_NTH (remainder, (double, double), __remainder_finite);
+extern float __REDIRECT_NTH (remainderf, (float, float), __remainderf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (remainderl, (long double, long double),
+ __remainderl_finite);
+#endif
+
+#if defined __USE_MISC || defined __USE_XOPEN_EXTENDED
+/* scalb. */
+extern double __REDIRECT_NTH (scalb, (double, double), __scalb_finite);
+extern float __REDIRECT_NTH (scalbf, (float, float), __scalbf_finite);
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (scalbl, (long double, long double),
+ __scalbl_finite);
+# endif
+#endif
+
+/* sinh. */
+extern double __REDIRECT_NTH (sinh, (double), __sinh_finite);
+extern float __REDIRECT_NTH (sinhf, (float), __sinhf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (sinhl, (long double), __sinhl_finite);
+#endif
+
+/* sqrt. */
+extern double __REDIRECT_NTH (sqrt, (double), __sqrt_finite);
+extern float __REDIRECT_NTH (sqrtf, (float), __sqrtf_finite);
+#ifdef __MATH_DECLARE_LDOUBLE
+extern long double __REDIRECT_NTH (sqrtl, (long double), __sqrtl_finite);
+#endif
+
+#ifdef __USE_ISOC99
+/* tgamma. */
+extern double __gamma_r_finite (double, int *);
+__extern_always_inline double __NTH (tgamma (double __d))
+{
+ int __local_signgam = 0;
+ double __res = __gamma_r_finite (__d, &__local_signgam);
+ return __local_signgam < 0 ? -__res : __res;
+}
+extern float __gammaf_r_finite (float, int *);
+__extern_always_inline float __NTH (tgammaf (float __d))
+{
+ int __local_signgam = 0;
+ float __res = __gammaf_r_finite (__d, &__local_signgam);
+ return __local_signgam < 0 ? -__res : __res;
+}
+# ifdef __MATH_DECLARE_LDOUBLE
+extern long double __gammal_r_finite (long double, int *);
+__extern_always_inline long double __NTH (tgammal (long double __d))
+{
+ int __local_signgam = 0;
+ long double __res = __gammal_r_finite (__d, &__local_signgam);
+ return __local_signgam < 0 ? -__res : __res;
+}
+# endif
+#endif
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index 64da6276f6..4f22abf74f 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -1,5 +1,5 @@
/* Prototype declarations for math functions; helper file for <math.h>.
- Copyright (C) 1996-2002, 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1996-2002, 2003, 2006, 2011 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
@@ -113,7 +113,8 @@ __MATHCALL (log,, (_Mdouble_ __x));
__MATHCALL (log10,, (_Mdouble_ __x));
/* Break VALUE into integral and fractional parts. */
-__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr));
+__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr))
+ __attribute__ ((__nonnull__ (2)));
_Mdouble_END_NAMESPACE
#ifdef __USE_GNU
diff --git a/math/complex.h b/math/complex.h
index 751aaf763f..cc6006e760 100644
--- a/math/complex.h
+++ b/math/complex.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2006, 2011 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
@@ -85,7 +85,8 @@ __BEGIN_DECLS
/* And the long double versions. It is non-critical to define them
here unconditionally since `long double' is required in ISO C99. */
#if (__STDC__ - 0 || __GNUC__ - 0) \
- && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
+ && (!(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \
+ || defined __LDBL_COMPAT)
# ifdef __LDBL_COMPAT
# undef __MATHDECL_1
# define __MATHDECL_1(type, function, args) \
diff --git a/math/divtc3.c b/math/divtc3.c
index d974ae6454..72bca66d4d 100644
--- a/math/divtc3.c
+++ b/math/divtc3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@redhat.com>, 2005.
@@ -55,17 +55,19 @@ __divtc3 (long double a, long double b, long double c, long double d)
x = __copysignl (INFINITY, c) * a;
y = __copysignl (INFINITY, c) * b;
}
- else if ((isinf (a) || isinf (b)) && isfinite (c) && isfinite (d))
+ else if ((__isinf_nsl (a) || __isinf_nsl (b))
+ && isfinite (c) && isfinite (d))
{
- a = __copysignl (isinf (a) ? 1 : 0, a);
- b = __copysignl (isinf (b) ? 1 : 0, b);
+ a = __copysignl (__isinf_nsl (a) ? 1 : 0, a);
+ b = __copysignl (__isinf_nsl (b) ? 1 : 0, b);
x = INFINITY * (a * c + b * d);
y = INFINITY * (b * c - a * d);
}
- else if ((isinf (c) || isinf (d)) && isfinite (a) && isfinite (b))
+ else if ((__isinf_nsl (c) || __isinf_nsl (d))
+ && isfinite (a) && isfinite (b))
{
- c = __copysignl (isinf (c) ? 1 : 0, c);
- d = __copysignl (isinf (d) ? 1 : 0, d);
+ c = __copysignl (__isinf_nsl (c) ? 1 : 0, c);
+ d = __copysignl (__isinf_nsl (d) ? 1 : 0, d);
x = 0.0 * (a * c + b * d);
y = 0.0 * (b * c - a * d);
}
diff --git a/math/e_acoshl.c b/math/e_acoshl.c
index 2c2fbe8eb4..490fd10fd7 100644
--- a/math/e_acoshl.c
+++ b/math/e_acoshl.c
@@ -9,6 +9,7 @@ __ieee754_acoshl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_acoshl, __acoshl_finite)
stub_warning (acoshl)
#include <stub-tag.h>
diff --git a/math/e_acosl.c b/math/e_acosl.c
index d844d885b8..55d9ab0f68 100644
--- a/math/e_acosl.c
+++ b/math/e_acosl.c
@@ -9,6 +9,7 @@ __ieee754_acosl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_acosl, __acosl_finite)
stub_warning (acosl)
#include <stub-tag.h>
diff --git a/math/e_asinl.c b/math/e_asinl.c
index 3b26f030ef..8e6c47e702 100644
--- a/math/e_asinl.c
+++ b/math/e_asinl.c
@@ -9,6 +9,7 @@ __ieee754_asinl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_asinl, __asinl_finite)
stub_warning (asinl)
#include <stub-tag.h>
diff --git a/math/e_atan2l.c b/math/e_atan2l.c
index 0caed8a32f..8ca37622fc 100644
--- a/math/e_atan2l.c
+++ b/math/e_atan2l.c
@@ -9,6 +9,7 @@ __ieee754_atan2l (long double x, long double y)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_atan2l, __atan2l_finite)
stub_warning (atan2l)
#include <stub-tag.h>
diff --git a/math/e_atanhl.c b/math/e_atanhl.c
index 625d42db31..26c52e7936 100644
--- a/math/e_atanhl.c
+++ b/math/e_atanhl.c
@@ -9,6 +9,7 @@ __ieee754_atanhl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_atanhl, __atanhl_finite)
stub_warning (__ieee754_atanhl)
#include <stub-tag.h>
diff --git a/math/e_coshl.c b/math/e_coshl.c
index 0da319b785..92bfd7a188 100644
--- a/math/e_coshl.c
+++ b/math/e_coshl.c
@@ -9,6 +9,7 @@ __ieee754_coshl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_coshl, __coshl_finite)
stub_warning (__ieee754_coshl)
#include <stub-tag.h>
diff --git a/math/e_exp10.c b/math/e_exp10.c
index 231ceb2c24..ce14ea5f1b 100644
--- a/math/e_exp10.c
+++ b/math/e_exp10.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -28,3 +28,4 @@ __ieee754_exp10 (double arg)
replaced sometime (soon?). */
return __ieee754_exp (M_LN10 * arg);
}
+strong_alias (__ieee754_exp10, __exp10_finite)
diff --git a/math/e_exp10f.c b/math/e_exp10f.c
index 642ed838bd..68e9723b88 100644
--- a/math/e_exp10f.c
+++ b/math/e_exp10f.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -28,3 +28,4 @@ __ieee754_exp10f (float arg)
replaced sometime (soon?). */
return __ieee754_expf (M_LN10 * arg);
}
+strong_alias (__ieee754_exp10f, __exp10f_finite)
diff --git a/math/e_exp10l.c b/math/e_exp10l.c
index cbc1897e4c..6bd859fde5 100644
--- a/math/e_exp10l.c
+++ b/math/e_exp10l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -28,3 +28,4 @@ __ieee754_exp10l (long double arg)
replaced sometime (soon?). */
return __ieee754_expl (M_LN10l * arg);
}
+strong_alias (__ieee754_exp10l, __exp10l_finite)
diff --git a/math/e_exp2l.c b/math/e_exp2l.c
index d6d01550e2..e7e493933a 100644
--- a/math/e_exp2l.c
+++ b/math/e_exp2l.c
@@ -8,3 +8,4 @@ __ieee754_exp2l (long double x)
replaced sometime (soon?). */
return __ieee754_expl (M_LN2l * x);
}
+strong_alias (__ieee754_exp2l, __exp2l_finite)
diff --git a/math/e_expl.c b/math/e_expl.c
index f9467c38ab..5ba6eb5847 100644
--- a/math/e_expl.c
+++ b/math/e_expl.c
@@ -9,6 +9,7 @@ __ieee754_expl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_expl, __expl_finite)
stub_warning (expl)
#include <stub-tag.h>
diff --git a/math/e_fmodl.c b/math/e_fmodl.c
index 380da24e41..dbd361ebc9 100644
--- a/math/e_fmodl.c
+++ b/math/e_fmodl.c
@@ -9,6 +9,7 @@ __ieee754_fmodl (long double x, long double y)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_fmodl, __fmodl_finite)
stub_warning (fmodl)
#include <stub-tag.h>
diff --git a/math/e_gammal_r.c b/math/e_gammal_r.c
index 1c45c8421b..c0ae70426a 100644
--- a/math/e_gammal_r.c
+++ b/math/e_gammal_r.c
@@ -10,6 +10,7 @@ __ieee754_gammal_r (long double x, int *signgamp)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_gammal_r, __gammal_r_finite)
stub_warning (__ieee754_gammal_r)
#include <stub-tag.h>
diff --git a/math/e_hypotl.c b/math/e_hypotl.c
index 07df22eb36..73bad62775 100644
--- a/math/e_hypotl.c
+++ b/math/e_hypotl.c
@@ -9,6 +9,7 @@ __ieee754_hypotl (long double x, long double y)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_hypotl, __hypotl_finite)
stub_warning (__ieee754_hypotl)
#include <stub-tag.h>
diff --git a/math/e_j0l.c b/math/e_j0l.c
index 7a167c277c..eb01ba67c7 100644
--- a/math/e_j0l.c
+++ b/math/e_j0l.c
@@ -10,6 +10,7 @@ __ieee754_j0l (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_j0l, __j0l_finite)
stub_warning (j0l)
@@ -20,6 +21,7 @@ __ieee754_y0l (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_y0l, __y0l_finite)
stub_warning (y0l)
#include <stub-tag.h>
diff --git a/math/e_j1l.c b/math/e_j1l.c
index 625e886851..7701f49ff9 100644
--- a/math/e_j1l.c
+++ b/math/e_j1l.c
@@ -10,6 +10,7 @@ __ieee754_j1l (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_j1l, __j1l_finite)
stub_warning (j1l)
@@ -20,6 +21,7 @@ __ieee754_y1l (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_y1l, __y1l_finite)
stub_warning (y1l)
#include <stub-tag.h>
diff --git a/math/e_jnl.c b/math/e_jnl.c
index a04c9fe51e..059b1db6bc 100644
--- a/math/e_jnl.c
+++ b/math/e_jnl.c
@@ -10,6 +10,7 @@ __ieee754_jnl (int n, long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_jnl, __jnl_finite)
stub_warning (jnl)
@@ -20,6 +21,7 @@ __ieee754_ynl (int n, long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_ynl, __ynl_finite)
stub_warning (ynl)
#include <stub-tag.h>
diff --git a/math/e_lgammal_r.c b/math/e_lgammal_r.c
index f46f7073a5..92e7700e2e 100644
--- a/math/e_lgammal_r.c
+++ b/math/e_lgammal_r.c
@@ -11,6 +11,7 @@ __ieee754_lgammal_r (long double x, int *signgamp)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_lgammal_r, __lgammal_r_finite)
stub_warning (lgammal)
stub_warning (lgammal_r)
diff --git a/math/e_log10l.c b/math/e_log10l.c
index 5bc264b32c..2c7ff72c2c 100644
--- a/math/e_log10l.c
+++ b/math/e_log10l.c
@@ -9,6 +9,7 @@ __ieee754_log10l (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_log10l, __log10l_finite)
stub_warning (log10l)
#include <stub-tag.h>
diff --git a/math/e_log2l.c b/math/e_log2l.c
index 681904bfbb..95929c3606 100644
--- a/math/e_log2l.c
+++ b/math/e_log2l.c
@@ -9,6 +9,7 @@ __ieee754_log2l (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_log2l, __log2l_finite)
stub_warning (log2l)
#include <stub-tag.h>
diff --git a/math/e_logl.c b/math/e_logl.c
index 9ba9cfc799..95608ab553 100644
--- a/math/e_logl.c
+++ b/math/e_logl.c
@@ -9,6 +9,7 @@ __ieee754_logl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_logl, __logl_finite)
stub_warning (logl)
#include <stub-tag.h>
diff --git a/math/e_powl.c b/math/e_powl.c
index afc2248b6b..ab79b1a4b7 100644
--- a/math/e_powl.c
+++ b/math/e_powl.c
@@ -9,6 +9,7 @@ __ieee754_powl (long double x, long double y)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_powl, __powl_finite)
stub_warning (powl)
#include <stub-tag.h>
diff --git a/math/e_scalb.c b/math/e_scalb.c
index f2c207ac8b..3b81dd5653 100644
--- a/math/e_scalb.c
+++ b/math/e_scalb.c
@@ -1,71 +1,59 @@
-/* @(#)e_scalb.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_scalb.c,v 1.6 1995/05/10 20:46:09 jtc Exp $";
-#endif
+ 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.
-/*
- * __ieee754_scalb(x, fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef _SCALB_INT
-#ifdef __STDC__
- double __ieee754_scalb(double x, int fn)
-#else
- double __ieee754_scalb(x,fn)
- double x; int fn;
-#endif
-#else
-#ifdef __STDC__
- double __ieee754_scalb(double x, double fn)
-#else
- double __ieee754_scalb(x,fn)
- double x, fn;
-#endif
-#endif
+
+static double
+__attribute__ ((noinline))
+invalid_fn (double x, double fn)
{
-#ifdef _SCALB_INT
- return __scalbn(x,fn);
-#else
- if (__isnan(x)||__isnan(fn)) return x*fn;
- if (!__finite(fn)) {
- if(fn>0.0) return x*fn;
- else if (x == 0)
- return x;
- else if (!__finite (x))
- {
-# ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-# endif
- return __nan ("");
- }
- else return x/(-fn);
- }
- if (__rint(fn)!=fn)
- {
-# ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-# endif
- return __nan ("");
- }
- if ( fn > 65000.0) return __scalbn(x, 65000);
- if (-fn > 65000.0) return __scalbn(x,-65000);
- return __scalbn(x,(int)fn);
-#endif
+ if (__rint (fn) != fn)
+ {
+ feraiseexcept (FE_INVALID);
+ return __nan ("");
+ }
+ else if (fn > 65000.0)
+ return __scalbn (x, 65000);
+ else
+ return __scalbn (x,-65000);
+}
+
+
+double
+__ieee754_scalb (double x, double fn)
+{
+ if (__builtin_expect (__isnan (x), 0))
+ return x * fn;
+ if (__builtin_expect (!__finite (fn), 0))
+ {
+ if (__isnan (fn) || fn > 0.0)
+ return x * fn;
+ if (x == 0.0)
+ return x;
+ return x / -fn;
+ }
+ if (__builtin_expect ((double) (int) fn != fn, 0))
+ return invalid_fn (x, fn);
+
+ return __scalbn (x, (int) fn);
}
+strong_alias (__ieee754_scalb, __scalb_finite)
diff --git a/math/e_scalbf.c b/math/e_scalbf.c
index 3caa535b12..61847d9a56 100644
--- a/math/e_scalbf.c
+++ b/math/e_scalbf.c
@@ -1,68 +1,59 @@
-/* e_scalbf.c -- float version of e_scalb.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_scalbf.c,v 1.3 1995/05/10 20:46:12 jtc Exp $";
-#endif
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef _SCALB_INT
-#ifdef __STDC__
- float __ieee754_scalbf(float x, int fn)
-#else
- float __ieee754_scalbf(x,fn)
- float x; int fn;
-#endif
-#else
-#ifdef __STDC__
- float __ieee754_scalbf(float x, float fn)
-#else
- float __ieee754_scalbf(x,fn)
- float x, fn;
-#endif
-#endif
+
+static float
+__attribute__ ((noinline))
+invalid_fn (float x, float fn)
{
-#ifdef _SCALB_INT
- return __scalbnf(x,fn);
-#else
- if (__isnanf(x)||__isnanf(fn)) return x*fn;
- if (!__finitef(fn)) {
- if(fn>(float)0.0) return x*fn;
- else if (x == 0)
- return x;
- else if (!__finitef (x))
- {
-# ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-# endif
- return __nanf ("");
- }
- else return x/(-fn);
- }
- if (__rintf(fn)!=fn)
- {
-# ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-# endif
- return __nanf ("");
- }
- if ( fn > (float)65000.0) return __scalbnf(x, 65000);
- if (-fn > (float)65000.0) return __scalbnf(x,-65000);
- return __scalbnf(x,(int)fn);
-#endif
+ if (__rintf (fn) != fn)
+ {
+ feraiseexcept (FE_INVALID);
+ return __nan ("");
+ }
+ else if (fn > 65000.0f)
+ return __scalbnf (x, 65000);
+ else
+ return __scalbnf (x,-65000);
+}
+
+
+float
+__ieee754_scalbf (float x, float fn)
+{
+ if (__builtin_expect (__isnanf (x), 0))
+ return x * fn;
+ if (__builtin_expect (!__finitef (fn), 0))
+ {
+ if (__isnanf (fn) || fn > 0.0f)
+ return x * fn;
+ if (x == 0.0f)
+ return x;
+ return x / -fn;
+ }
+ if (__builtin_expect ((float) (int) fn != fn, 0))
+ return invalid_fn (x, fn);
+
+ return __scalbnf (x, (int) fn);
}
+strong_alias (__ieee754_scalbf, __scalbf_finite)
diff --git a/math/e_scalbl.c b/math/e_scalbl.c
index ad3595c0c5..6b36b71229 100644
--- a/math/e_scalbl.c
+++ b/math/e_scalbl.c
@@ -1,75 +1,59 @@
-/* e_scalbl.c -- long double version of s_scalb.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * __ieee754_scalbl(x, fn) is provide for
- * passing various standard test suite. One
- * should use scalbnl() instead.
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef _SCALB_INT
-#ifdef __STDC__
- long double __ieee754_scalbl(long double x, int fn)
-#else
- long double __ieee754_scalbl(x,fn)
- long double x; int fn;
-#endif
-#else
-#ifdef __STDC__
- long double __ieee754_scalbl(long double x, long double fn)
-#else
- long double __ieee754_scalbl(x,fn)
- long double x, fn;
-#endif
-#endif
+
+static long double
+__attribute__ ((noinline))
+invalid_fn (long double x, long double fn)
+{
+ if (__rintl (fn) != fn)
+ {
+ feraiseexcept (FE_INVALID);
+ return __nan ("");
+ }
+ else if (fn > 65000.0L)
+ return __scalbnl (x, 65000);
+ else
+ return __scalbnl (x,-65000);
+}
+
+
+long double
+__ieee754_scalbl (long double x, long double fn)
{
-#ifdef _SCALB_INT
- return __scalbnl(x,fn);
-#else
- if (__isnanl(x)||__isnanl(fn)) return x*fn;
- if (!__finitel(fn)) {
- if(fn>0.0) return x*fn;
- else if (x == 0)
- return x;
- else if (!__finitel (x))
- {
-# ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-# endif
- return __nanl ("");
- }
- else return x/(-fn);
- }
- if (__rintl(fn)!=fn)
- {
-# ifdef FE_INVALID
- feraiseexcept (FE_INVALID);
-# endif
- return __nanl ("");
- }
- if ( fn > 65000.0) return __scalbnl(x, 65000);
- if (-fn > 65000.0) return __scalbnl(x,-65000);
- return __scalbnl(x,(int)fn);
-#endif
+ if (__builtin_expect (__isnanl (x), 0))
+ return x * fn;
+ if (__builtin_expect (!__finitel (fn), 0))
+ {
+ if (__isnanl (fn) || fn > 0.0L)
+ return x * fn;
+ if (x == 0.0L)
+ return x;
+ return x / -fn;
+ }
+ if (__builtin_expect ((long double) (int) fn != fn, 0))
+ return invalid_fn (x, fn);
+
+ return __scalbnl (x, (int) fn);
}
+strong_alias (__ieee754_scalbl, __scalbl_finite)
diff --git a/math/e_sinhl.c b/math/e_sinhl.c
index 4cec79cb2d..fc756c9eba 100644
--- a/math/e_sinhl.c
+++ b/math/e_sinhl.c
@@ -9,6 +9,7 @@ __ieee754_sinhl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_sinhl, __sinhl_finite)
stub_warning (__ieee754_sinhl)
#include <stub-tag.h>
diff --git a/math/e_sqrtl.c b/math/e_sqrtl.c
index 7680bdb145..af9c2b51bf 100644
--- a/math/e_sqrtl.c
+++ b/math/e_sqrtl.c
@@ -9,6 +9,7 @@ __ieee754_sqrtl (long double x)
__set_errno (ENOSYS);
return 0.0;
}
+strong_alias (__ieee754_sqrtl, __sqrtl_finite)
stub_warning (sqrtl)
#include <stub-tag.h>
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 96da7cde6b..2843997062 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -4618,6 +4618,10 @@ nearbyint_test (void)
TEST_f_f (nearbyint, minus_infty, minus_infty);
TEST_f_f (nearbyint, nan_value, nan_value);
+ /* Subnormal values */
+ TEST_f_f (nearbyint, -8.98847e+307, -8.98847e+307);
+ TEST_f_f (nearbyint, -4.45015e-308, minus_zero);
+
/* Default rounding mode is round to nearest. */
TEST_f_f (nearbyint, 0.5, 0.0);
TEST_f_f (nearbyint, 1.5, 2.0);
@@ -5642,6 +5646,7 @@ sin_test (void)
#ifdef TEST_DOUBLE
TEST_f_f (sin, 0.80190127184058835, 0.71867942238767868);
+ TEST_f_f (sin, 2.522464e-1, 2.4957989804940911e-1);
#endif
END (sin);
diff --git a/math/math.h b/math/math.h
index aeb54d9ed8..a849a03da0 100644
--- a/math/math.h
+++ b/math/math.h
@@ -1,5 +1,5 @@
/* Declarations for math functions.
- Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006, 2009
+ Copyright (C) 1991-1993, 1995-1999, 2001, 2002, 2004, 2006, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -64,10 +64,10 @@ __BEGIN_DECLS
#define __MATHDECL_1(type, function,suffix, args) \
extern type __MATH_PRECNAME(function,suffix) args __THROW
-#define _Mdouble_ double
+#define _Mdouble_ double
#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
-# define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
-# define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD
+#define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STD
+#define _Mdouble_END_NAMESPACE __END_NAMESPACE_STD
#include <bits/mathcalls.h>
#undef _Mdouble_
#undef _Mdouble_BEGIN_NAMESPACE
@@ -83,7 +83,7 @@ __BEGIN_DECLS
# ifndef _Mfloat_
# define _Mfloat_ float
# endif
-# define _Mdouble_ _Mfloat_
+# define _Mdouble_ _Mfloat_
# ifdef __STDC__
# define __MATH_PRECNAME(name,r) name##f##r
# else
@@ -98,7 +98,8 @@ __BEGIN_DECLS
# undef __MATH_PRECNAME
# if (__STDC__ - 0 || __GNUC__ - 0) \
- && (!defined __NO_LONG_DOUBLE_MATH || defined __LDBL_COMPAT)
+ && (!(defined __NO_LONG_DOUBLE_MATH && defined _LIBC) \
+ || defined __LDBL_COMPAT)
# ifdef __LDBL_COMPAT
# ifdef __USE_ISOC99
@@ -116,9 +117,6 @@ extern long double __REDIRECT_NTH (nexttowardl,
# endif
# endif
-/* Include the file of declarations again, this time using `long double'
- instead of `double' and appending l to each function name. */
-
# undef __MATHDECL_1
# define __MATHDECL_2(type, function,suffix, args, alias) \
extern type __REDIRECT_NTH(__MATH_PRECNAME(function,suffix), \
@@ -127,10 +125,13 @@ extern long double __REDIRECT_NTH (nexttowardl,
__MATHDECL_2(type, function,suffix, args, __CONCAT(function,suffix))
# endif
+/* Include the file of declarations again, this time using `long double'
+ instead of `double' and appending l to each function name. */
+
# ifndef _Mlong_double_
# define _Mlong_double_ long double
# endif
-# define _Mdouble_ _Mlong_double_
+# define _Mdouble_ _Mlong_double_
# ifdef __STDC__
# define __MATH_PRECNAME(name,r) name##l##r
# else
@@ -138,10 +139,11 @@ extern long double __REDIRECT_NTH (nexttowardl,
# endif
# define _Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99
# define _Mdouble_END_NAMESPACE __END_NAMESPACE_C99
+# define __MATH_DECLARE_LDOUBLE 1
# include <bits/mathcalls.h>
# undef _Mdouble_
-# undef _Mdouble_BEGIN_NAMESPACE
-# undef _Mdouble_END_NAMESPACE
+# undef _Mdouble_BEGIN_NAMESPACE
+# undef _Mdouble_END_NAMESPACE
# undef __MATH_PRECNAME
# endif /* __STDC__ || __GNUC__ */
@@ -416,6 +418,12 @@ extern int matherr (struct exception *__exc);
# include <bits/mathinline.h>
#endif
+/* Define special entry points to use when the compiler got told to
+ only expect finite results. */
+#if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0
+# include <bits/math-finite.h>
+#endif
+
#ifdef __USE_ISOC99
/* If we've still got undefined comparison macros, provide defaults. */
diff --git a/math/math_private.h b/math/math_private.h
index e5ca61f0b8..04c112fd60 100644
--- a/math/math_private.h
+++ b/math/math_private.h
@@ -202,6 +202,7 @@ extern double __ieee754_scalb (double,double);
/* fdlibm kernel function */
extern double __kernel_standard (double,double,int);
+extern float __kernel_standard_f (float,float,int);
extern double __kernel_sin (double,double,int);
extern double __kernel_cos (double,double);
extern double __kernel_tan (double,double,int);
@@ -353,8 +354,53 @@ extern void __docos (double __x, double __dx, double __v[]);
#ifndef math_opt_barrier
#define math_opt_barrier(x) \
-({ __typeof (x) __x = x; __asm ("" : "+m" (__x)); __x; })
-#define math_force_eval(x) __asm __volatile ("" : : "m" (x))
+({ __typeof (x) __x = (x); __asm ("" : "+m" (__x)); __x; })
+#define math_force_eval(x) \
+({ __typeof (x) __x = (x); __asm __volatile ("" : : "m" (__x)); })
#endif
+
+/* The standards only specify one variant of the fenv.h interfaces.
+ But at least for some architectures we can be more efficient if we
+ know what operations are going to be performed. Therefore we
+ define additional interfaces. By default they refer to the normal
+ interfaces. */
+#define libc_fegetround() fegetround ()
+#define libc_fegetroundf() fegetround ()
+#define libc_fegetroundl() fegetround ()
+
+#define libc_fesetround(r) (void) fesetround (r)
+#define libc_fesetroundf(r) (void) fesetround (r)
+#define libc_fesetroundl(r) (void) fesetround (r)
+
+#define libc_feholdexcept(e) (void) feholdexcept (e)
+#define libc_feholdexceptf(e) (void) feholdexcept (e)
+#define libc_feholdexceptl(e) (void) feholdexcept (e)
+
+#define libc_feholdexcept_setround(e, r) \
+ do { feholdexcept (e); fesetround (r); } while (0)
+#define libc_feholdexcept_setroundf(e, r) \
+ do { feholdexcept (e); fesetround (r); } while (0)
+#define libc_feholdexcept_setroundl(e, r) \
+ do { feholdexcept (e); fesetround (r); } while (0)
+
+#define libc_fetestexcept(e) fetestexcept (e)
+#define libc_fetestexceptf(e) fetestexcept (e)
+#define libc_fetestexceptl(e) fetestexcept (e)
+
+#define libc_fesetenv(e) (void) fesetenv (e)
+#define libc_fesetenvf(e) (void) fesetenv (e)
+#define libc_fesetenvl(e) (void) fesetenv (e)
+
+#define libc_feupdateenv(e) (void) feupdateenv (e)
+#define libc_feupdateenvf(e) (void) feupdateenv (e)
+#define libc_feupdateenvl(e) (void) feupdateenv (e)
+
+#define __nan(str) \
+ (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
+#define __nanf(str) \
+ (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
+#define __nanl(str) \
+ (__builtin_constant_p (str) && str[0] == '\0' ? NAN : __nan (str))
+
#endif /* _MATH_PRIVATE_H_ */
diff --git a/math/multc3.c b/math/multc3.c
index 6369f48f24..351dccf807 100644
--- a/math/multc3.c
+++ b/math/multc3.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2005, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Richard Henderson <rth@redhat.com>, 2005.
@@ -39,28 +39,29 @@ __multc3 (long double a, long double b, long double c, long double d)
{
/* Recover infinities that computed as NaN + iNaN. */
bool recalc = 0;
- if (isinf (a) || isinf (b))
+ if (__isinf_nsl (a) || __isinf_nsl (b))
{
/* z is infinite. "Box" the infinity and change NaNs in
the other factor to 0. */
- a = __copysignl (isinf (a) ? 1 : 0, a);
- b = __copysignl (isinf (b) ? 1 : 0, b);
+ a = __copysignl (__isinf_nsl (a) ? 1 : 0, a);
+ b = __copysignl (__isinf_nsl (b) ? 1 : 0, b);
if (isnan (c)) c = __copysignl (0, c);
if (isnan (d)) d = __copysignl (0, d);
recalc = 1;
}
- if (isinf (c) || isinf (d))
+ if (__isinf_nsl (c) || __isinf_nsl (d))
{
/* w is infinite. "Box" the infinity and change NaNs in
the other factor to 0. */
- c = __copysignl (isinf (c) ? 1 : 0, c);
- d = __copysignl (isinf (d) ? 1 : 0, d);
+ c = __copysignl (__isinf_nsl (c) ? 1 : 0, c);
+ d = __copysignl (__isinf_nsl (d) ? 1 : 0, d);
if (isnan (a)) a = __copysignl (0, a);
if (isnan (b)) b = __copysignl (0, b);
recalc = 1;
}
if (!recalc
- && (isinf (ac) || isinf (bd) || isinf (ad) || isinf (bc)))
+ && (__isinf_nsl (ac) || __isinf_nsl (bd)
+ || __isinf_nsl (ad) || __isinf_nsl (bc)))
{
/* Recover infinities from overflow by changing NaNs to 0. */
if (isnan (a)) a = __copysignl (0, a);
diff --git a/math/s_cacosh.c b/math/s_cacosh.c
index ada7ca5af6..cb01ca87c5 100644
--- a/math/s_cacosh.c
+++ b/math/s_cacosh.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole cosine for double value.
- Copyright (C) 1997, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ double
@@ -64,6 +65,11 @@ __cacosh (__complex__ double x)
__real__ res = 0.0;
__imag__ res = __copysign (M_PI_2, __imag__ x);
}
+ /* The factor 16 is just a guess. */
+ else if (16.0 * fabs (__imag__ x) < fabs (__real__ x))
+ /* Kahan's formula which avoid cancellation through subtraction in
+ some cases. */
+ res = 2.0 * __clog (__csqrt ((x + 1.0) / 2.0) + __csqrt ((x - 1.0) / 2.0));
else
{
__complex__ double y;
@@ -73,17 +79,13 @@ __cacosh (__complex__ double x)
y = __csqrt (y);
- if (__real__ x < 0.0)
+ if (signbit (__real__ x))
y = -y;
__real__ y += __real__ x;
__imag__ y += __imag__ x;
res = __clog (y);
-
- /* We have to use the positive branch. */
- if (__real__ res < 0.0)
- res = -res;
}
return res;
diff --git a/math/s_cacoshf.c b/math/s_cacoshf.c
index 0d6bd75dd7..fe046929e8 100644
--- a/math/s_cacoshf.c
+++ b/math/s_cacoshf.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole cosine for float value.
- Copyright (C) 1997, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -65,9 +65,14 @@ __cacoshf (__complex__ float x)
__real__ res = 0.0;
__imag__ res = __copysignf (M_PI_2, __imag__ x);
}
+ /* The factor 16 is just a guess. */
+ else if (16.0 * fabsf (__imag__ x) < fabsf (__real__ x))
+ /* Kahan's formula which avoid cancellation through subtraction in
+ some cases. */
+ res = 2.0 * __clogf (__csqrtf ((x + 1.0) / 2.0)
+ + __csqrtf ((x - 1.0) / 2.0));
else
{
-#if 1
__complex__ float y;
__real__ y = (__real__ x - __imag__ x) * (__real__ x + __imag__ x) - 1.0;
@@ -75,30 +80,13 @@ __cacoshf (__complex__ float x)
y = __csqrtf (y);
- if (__real__ x < 0.0)
+ if (signbit (__real__ x))
y = -y;
__real__ y += __real__ x;
__imag__ y += __imag__ x;
res = __clogf (y);
-#else
- float re2 = __real__ x * __real__ x;
- float im2 = __imag__ x * __imag__ x;
- float sq = re2 - im2 - 1.0;
- float ro = __ieee754_sqrtf (sq * sq + 4 * re2 * im2);
- float a = __ieee754_sqrtf ((sq + ro) / 2.0);
- float b = __ieee754_sqrtf ((-sq + ro) / 2.0);
-
- __real__ res = 0.5 * __ieee754_logf (re2 + __real__ x * 2 * a
- + im2 + __imag__ x * 2 * b
- + ro);
- __imag__ res = __ieee754_atan2f (__imag__ x + b, __real__ x + a);
-#endif
-
- /* We have to use the positive branch. */
- if (__real__ res < 0.0)
- res = -res;
}
return res;
diff --git a/math/s_cacoshl.c b/math/s_cacoshl.c
index da23c8d8aa..84c2715d22 100644
--- a/math/s_cacoshl.c
+++ b/math/s_cacoshl.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole cosine for long double value.
- Copyright (C) 1997, 1998, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ long double
@@ -64,6 +65,12 @@ __cacoshl (__complex__ long double x)
__real__ res = 0.0;
__imag__ res = __copysignl (M_PI_2l, __imag__ x);
}
+ /* The factor 16 is just a guess. */
+ else if (16.0L * fabsl (__imag__ x) < fabsl (__real__ x))
+ /* Kahan's formula which avoid cancellation through subtraction in
+ some cases. */
+ res = 2.0L * __clogl (__csqrtl ((x + 1.0L) / 2.0L)
+ + __csqrtl ((x - 1.0L) / 2.0L));
else
{
__complex__ long double y;
@@ -73,17 +80,13 @@ __cacoshl (__complex__ long double x)
y = __csqrtl (y);
- if (__real__ x < 0.0)
+ if (signbit (__real__ x))
y = -y;
__real__ y += __real__ x;
__imag__ y += __imag__ x;
res = __clogl (y);
-
- /* We have to use the positive branch. */
- if (__real__ res < 0.0)
- res = -res;
}
return res;
diff --git a/math/s_casin.c b/math/s_casin.c
index 2d5b06cf78..02a215ab50 100644
--- a/math/s_casin.c
+++ b/math/s_casin.c
@@ -1,5 +1,5 @@
/* Return arc sine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ double
@@ -33,7 +34,7 @@ __casin (__complex__ double x)
{
res = x;
}
- else if (__isinf (__real__ x) || __isinf (__imag__ x))
+ else if (__isinf_ns (__real__ x) || __isinf_ns (__imag__ x))
{
__real__ res = __nan ("");
__imag__ res = __copysign (HUGE_VAL, __imag__ x);
diff --git a/math/s_casinf.c b/math/s_casinf.c
index 5278dbbf78..56c618fcf1 100644
--- a/math/s_casinf.c
+++ b/math/s_casinf.c
@@ -1,5 +1,5 @@
/* Return arc sine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ float
@@ -33,7 +34,7 @@ __casinf (__complex__ float x)
{
res = x;
}
- else if (__isinff (__real__ x) || __isinff (__imag__ x))
+ else if (__isinf_nsf (__real__ x) || __isinf_nsf (__imag__ x))
{
__real__ res = __nanf ("");
__imag__ res = __copysignf (HUGE_VALF, __imag__ x);
diff --git a/math/s_casinh.c b/math/s_casinh.c
index a574add70e..db340ac1b1 100644
--- a/math/s_casinh.c
+++ b/math/s_casinh.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole sine for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ double
diff --git a/math/s_casinhf.c b/math/s_casinhf.c
index 7037ab937c..f545d8e2ee 100644
--- a/math/s_casinhf.c
+++ b/math/s_casinhf.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole sine for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ float
diff --git a/math/s_casinhl.c b/math/s_casinhl.c
index 376b2347a0..b8e3918290 100644
--- a/math/s_casinhl.c
+++ b/math/s_casinhl.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole sine for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ long double
diff --git a/math/s_casinl.c b/math/s_casinl.c
index f303c05ae6..431e9a2413 100644
--- a/math/s_casinl.c
+++ b/math/s_casinl.c
@@ -1,5 +1,5 @@
/* Return arc sine of complex long double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <complex.h>
#include <math.h>
+#include <math_private.h>
__complex__ long double
@@ -33,7 +34,7 @@ __casinl (__complex__ long double x)
{
res = x;
}
- else if (__isinfl (__real__ x) || __isinfl (__imag__ x))
+ else if (__isinf_nsl (__real__ x) || __isinf_nsl (__imag__ x))
{
__real__ res = __nanl ("");
__imag__ res = __copysignl (HUGE_VALL, __imag__ x);
diff --git a/math/s_catan.c b/math/s_catan.c
index 59c0a3af6b..1a458a3833 100644
--- a/math/s_catan.c
+++ b/math/s_catan.c
@@ -1,5 +1,5 @@
/* Return arc tangent of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __catan (__complex__ double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (rcls == FP_INFINITE)
{
@@ -57,7 +56,7 @@ __catan (__complex__ double x)
__imag__ res = __nan ("");
}
}
- else if (rcls == FP_ZERO && icls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
res = x;
}
diff --git a/math/s_catanf.c b/math/s_catanf.c
index 0aefb6ef39..defcf18c67 100644
--- a/math/s_catanf.c
+++ b/math/s_catanf.c
@@ -1,5 +1,5 @@
/* Return arc tangent of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __catanf (__complex__ float x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (rcls == FP_INFINITE)
{
@@ -57,7 +56,7 @@ __catanf (__complex__ float x)
__imag__ res = __nanf ("");
}
}
- else if (rcls == FP_ZERO && icls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
res = x;
}
diff --git a/math/s_catanh.c b/math/s_catanh.c
index 0b31b27708..22ade15fa8 100644
--- a/math/s_catanh.c
+++ b/math/s_catanh.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole tangent for double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __catanh (__complex__ double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (icls == FP_INFINITE)
{
@@ -52,20 +51,18 @@ __catanh (__complex__ double x)
__imag__ res = __nan ("");
}
}
- else if (rcls == FP_ZERO && icls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
res = x;
}
else
{
- double i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
+ double i2 = __imag__ x * __imag__ x;
- num = 1.0 + __real__ x;
+ double num = 1.0 + __real__ x;
num = i2 + num * num;
- den = 1.0 - __real__ x;
+ double den = 1.0 - __real__ x;
den = i2 + den * den;
__real__ res = 0.25 * (__ieee754_log (num) - __ieee754_log (den));
diff --git a/math/s_catanhf.c b/math/s_catanhf.c
index 7424bda9b9..f3d07f2354 100644
--- a/math/s_catanhf.c
+++ b/math/s_catanhf.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole tangent for float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __catanhf (__complex__ float x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (icls == FP_INFINITE)
{
@@ -52,20 +51,18 @@ __catanhf (__complex__ float x)
__imag__ res = __nanf ("");
}
}
- else if (rcls == FP_ZERO && icls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
res = x;
}
else
{
- float i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
+ float i2 = __imag__ x * __imag__ x;
- num = 1.0 + __real__ x;
+ float num = 1.0 + __real__ x;
num = i2 + num * num;
- den = 1.0 - __real__ x;
+ float den = 1.0 - __real__ x;
den = i2 + den * den;
__real__ res = 0.25 * (__ieee754_logf (num) - __ieee754_logf (den));
diff --git a/math/s_catanhl.c b/math/s_catanhl.c
index 9e67b8789c..af48f1a553 100644
--- a/math/s_catanhl.c
+++ b/math/s_catanhl.c
@@ -1,5 +1,5 @@
/* Return arc hyperbole tangent for long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __catanhl (__complex__ long double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (icls == FP_INFINITE)
{
@@ -52,20 +51,18 @@ __catanhl (__complex__ long double x)
__imag__ res = __nanl ("");
}
}
- else if (rcls == FP_ZERO && icls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
res = x;
}
else
{
- long double i2, num, den;
-
- i2 = __imag__ x * __imag__ x;
+ long double i2 = __imag__ x * __imag__ x;
- num = 1.0 + __real__ x;
+ long double num = 1.0 + __real__ x;
num = i2 + num * num;
- den = 1.0 - __real__ x;
+ long double den = 1.0 - __real__ x;
den = i2 + den * den;
__real__ res = 0.25 * (__ieee754_logl (num) - __ieee754_logl (den));
diff --git a/math/s_catanl.c b/math/s_catanl.c
index b4ae321710..47df85cc7b 100644
--- a/math/s_catanl.c
+++ b/math/s_catanl.c
@@ -1,5 +1,5 @@
/* Return arc tangent of complex long double value.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __catanl (__complex__ long double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (rcls == FP_INFINITE)
{
@@ -57,7 +56,7 @@ __catanl (__complex__ long double x)
__imag__ res = __nanl ("");
}
}
- else if (rcls == FP_ZERO && icls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
res = x;
}
diff --git a/math/s_ccos.c b/math/s_ccos.c
index 1b244d7079..4612eb33c3 100644
--- a/math/s_ccos.c
+++ b/math/s_ccos.c
@@ -1,5 +1,5 @@
/* Return cosine of complex double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,57 +21,18 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
+#include <math_private.h>
__complex__ double
__ccos (__complex__ double x)
{
- __complex__ double res;
+ __complex__ double y;
- if (!isfinite (__real__ x) || __isnan (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nan ("");
- __imag__ res = 0.0;
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinf (__imag__ x))
- {
- __real__ res = HUGE_VAL;
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nan ("");
- __imag__ res = __nan ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccosh (y);
- }
-
- return res;
+ return __ccosh (y);
}
weak_alias (__ccos, ccos)
#ifdef NO_LONG_DOUBLE
diff --git a/math/s_ccosf.c b/math/s_ccosf.c
index 4b154deac5..1ee932486b 100644
--- a/math/s_ccosf.c
+++ b/math/s_ccosf.c
@@ -1,5 +1,5 @@
/* Return cosine of complex float value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,57 +21,18 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
+#include <math_private.h>
__complex__ float
__ccosf (__complex__ float x)
{
- __complex__ float res;
+ __complex__ float y;
- if (!isfinite (__real__ x) || __isnanf (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanf ("");
- __imag__ res = 0.0;
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinff (__imag__ x))
- {
- __real__ res = HUGE_VALF;
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanf ("");
- __imag__ res = __nanf ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ float y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshf (y);
- }
-
- return res;
+ return __ccoshf (y);
}
#ifndef __ccosf
weak_alias (__ccosf, ccosf)
diff --git a/math/s_ccosh.c b/math/s_ccosh.c
index 83aa025d42..c10e5d899f 100644
--- a/math/s_ccosh.c
+++ b/math/s_ccosh.c
@@ -1,5 +1,5 @@
/* Complex cosine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -32,10 +32,10 @@ __ccosh (__complex__ double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinh_val = __ieee754_sinh (__real__ x);
@@ -52,22 +52,14 @@ __ccosh (__complex__ double x)
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nan ("");
__real__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else if (rcls == FP_INFINITE)
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VAL;
- __imag__ retval = __imag__ x * __copysign (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinix, cosix;
@@ -78,16 +70,20 @@ __ccosh (__complex__ double x)
__imag__ retval = (__copysign (HUGE_VAL, sinix)
* __copysign (1.0, __real__ x));
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = HUGE_VAL;
+ __imag__ retval = __imag__ x * __copysign (1.0, __real__ x);
+ }
else
{
/* The addition raises the invalid exception. */
__real__ retval = HUGE_VAL;
__imag__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_ccoshf.c b/math/s_ccoshf.c
index b9b2f3346f..6aae5d854b 100644
--- a/math/s_ccoshf.c
+++ b/math/s_ccoshf.c
@@ -1,5 +1,5 @@
/* Complex cosine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -32,10 +32,10 @@ __ccoshf (__complex__ float x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinh_val = __ieee754_sinhf (__real__ x);
@@ -52,22 +52,14 @@ __ccoshf (__complex__ float x)
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanf ("");
__real__ retval = __nanf ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALF;
- __imag__ retval = __imag__ x * __copysignf (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinix, cosix;
@@ -78,6 +70,12 @@ __ccoshf (__complex__ float x)
__imag__ retval = (__copysignf (HUGE_VALF, sinix)
* __copysignf (1.0, __real__ x));
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = HUGE_VALF;
+ __imag__ retval = __imag__ x * __copysignf (1.0, __real__ x);
+ }
else
{
/* The addition raises the invalid exception. */
diff --git a/math/s_ccoshl.c b/math/s_ccoshl.c
index 1913bb6ee4..ed1bc459df 100644
--- a/math/s_ccoshl.c
+++ b/math/s_ccoshl.c
@@ -1,5 +1,5 @@
/* Complex cosine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -32,10 +32,10 @@ __ccoshl (__complex__ long double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinh_val = __ieee754_sinhl (__real__ x);
@@ -52,22 +52,14 @@ __ccoshl (__complex__ long double x)
__imag__ retval = __real__ x == 0.0 ? 0.0 : __nanl ("");
__real__ retval = __nanl ("") + __nanl ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = HUGE_VALL;
- __imag__ retval = __imag__ x * __copysignl (1.0, __real__ x);
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinix, cosix;
@@ -78,16 +70,20 @@ __ccoshl (__complex__ long double x)
__imag__ retval = (__copysignl (HUGE_VALL, sinix)
* __copysignl (1.0, __real__ x));
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = HUGE_VALL;
+ __imag__ retval = __imag__ x * __copysignl (1.0, __real__ x);
+ }
else
{
/* The addition raises the invalid exception. */
__real__ retval = HUGE_VALL;
__imag__ retval = __nanl ("") + __nanl ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_ccosl.c b/math/s_ccosl.c
index 4ebe2c347d..153a60b08b 100644
--- a/math/s_ccosl.c
+++ b/math/s_ccosl.c
@@ -1,5 +1,5 @@
/* Return cosine of complex long double value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,56 +21,17 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
+#include <math_private.h>
__complex__ long double
__ccosl (__complex__ long double x)
{
- __complex__ long double res;
+ __complex__ long double y;
- if (!isfinite (__real__ x) || __isnanl (__imag__ x))
- {
- if (__real__ x == 0.0 || __imag__ x == 0.0)
- {
- __real__ res = __nanl ("");
- __imag__ res = 0.0;
+ __real__ y = -__imag__ x;
+ __imag__ y = __real__ x;
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else if (__isinfl (__imag__ x))
- {
- __real__ res = HUGE_VALL;
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- else
- {
- __real__ res = __nanl ("");
- __imag__ res = __nanl ("");
-
-#ifdef FE_INVALID
- if (isfinite (__imag__ x))
- feraiseexcept (FE_INVALID);
-#endif
- }
- }
- else
- {
- __complex__ long double y;
-
- __real__ y = -__imag__ x;
- __imag__ y = __real__ x;
-
- res = __ccoshl (y);
- }
-
- return res;
+ return __ccoshl (y);
}
weak_alias (__ccosl, ccosl)
diff --git a/math/s_cexp.c b/math/s_cexp.c
index de122e07f8..0d1ec29850 100644
--- a/math/s_cexp.c
+++ b/math/s_cexp.c
@@ -1,5 +1,5 @@
/* Return value of complex exponential function for double complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
@@ -32,10 +31,10 @@ __cexp (__complex__ double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
double exp_val = __ieee754_exp (__real__ x);
@@ -61,15 +60,13 @@ __cexp (__complex__ double x)
__real__ retval = __nan ("");
__imag__ retval = __nan ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
double value = signbit (__real__ x) ? 0.0 : HUGE_VAL;
@@ -95,10 +92,8 @@ __cexp (__complex__ double x)
__real__ retval = HUGE_VAL;
__imag__ retval = __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
@@ -112,10 +107,8 @@ __cexp (__complex__ double x)
__real__ retval = __nan ("");
__imag__ retval = __nan ("");
-#ifdef FE_INVALID
if (rcls != FP_NAN || icls != FP_NAN)
feraiseexcept (FE_INVALID);
-#endif
}
return retval;
diff --git a/math/s_cexpf.c b/math/s_cexpf.c
index 70e4a02588..652fe3d5b2 100644
--- a/math/s_cexpf.c
+++ b/math/s_cexpf.c
@@ -1,5 +1,5 @@
/* Return value of complex exponential function for float complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
@@ -32,10 +31,10 @@ __cexpf (__complex__ float x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
float exp_val = __ieee754_expf (__real__ x);
@@ -61,15 +60,13 @@ __cexpf (__complex__ float x)
__real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
float value = signbit (__real__ x) ? 0.0 : HUGE_VALF;
@@ -95,10 +92,8 @@ __cexpf (__complex__ float x)
__real__ retval = HUGE_VALF;
__imag__ retval = __nanf ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
@@ -112,10 +107,8 @@ __cexpf (__complex__ float x)
__real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
-#ifdef FE_INVALID
if (rcls != FP_NAN || icls != FP_NAN)
feraiseexcept (FE_INVALID);
-#endif
}
return retval;
diff --git a/math/s_cexpl.c b/math/s_cexpl.c
index 1c585f8d0a..6bb56c02f5 100644
--- a/math/s_cexpl.c
+++ b/math/s_cexpl.c
@@ -1,5 +1,5 @@
/* Return value of complex exponential function for long double complex value.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
@@ -32,10 +31,10 @@ __cexpl (__complex__ long double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double exp_val = __ieee754_expl (__real__ x);
@@ -61,15 +60,13 @@ __cexpl (__complex__ long double x)
__real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double value = signbit (__real__ x) ? 0.0 : HUGE_VALL;
@@ -95,10 +92,8 @@ __cexpl (__complex__ long double x)
__real__ retval = HUGE_VALL;
__imag__ retval = __nanl ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
@@ -112,10 +107,8 @@ __cexpl (__complex__ long double x)
__real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
-#ifdef FE_INVALID
if (rcls != FP_NAN || icls != FP_NAN)
feraiseexcept (FE_INVALID);
-#endif
}
return retval;
diff --git a/math/s_clog.c b/math/s_clog.c
index 5e7b8fbdab..ba27140b4b 100644
--- a/math/s_clog.c
+++ b/math/s_clog.c
@@ -1,5 +1,5 @@
/* Compute complex natural logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __clog (__complex__ double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls == FP_ZERO && icls == FP_ZERO)
+ if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
/* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PI : 0.0;
@@ -39,7 +38,7 @@ __clog (__complex__ double x)
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabs (__real__ x);
}
- else if (rcls != FP_NAN && icls != FP_NAN)
+ else if (__builtin_expect (rcls != FP_NAN && icls != FP_NAN, 1))
{
/* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_log (__ieee754_hypot (__real__ x,
diff --git a/math/s_clog10.c b/math/s_clog10.c
index a98de1942e..4b741fab55 100644
--- a/math/s_clog10.c
+++ b/math/s_clog10.c
@@ -1,5 +1,5 @@
/* Compute complex base 10 logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __clog10 (__complex__ double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls == FP_ZERO && icls == FP_ZERO)
+ if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
/* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PI : 0.0;
@@ -39,7 +38,7 @@ __clog10 (__complex__ double x)
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabs (__real__ x);
}
- else if (rcls != FP_NAN && icls != FP_NAN)
+ else if (__builtin_expect (rcls != FP_NAN && icls != FP_NAN, 1))
{
/* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_log10 (__ieee754_hypot (__real__ x,
diff --git a/math/s_clog10f.c b/math/s_clog10f.c
index ce689e7426..fe38f9e8df 100644
--- a/math/s_clog10f.c
+++ b/math/s_clog10f.c
@@ -1,5 +1,5 @@
/* Compute complex base 10 logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __clog10f (__complex__ float x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls == FP_ZERO && icls == FP_ZERO)
+ if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
/* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PI : 0.0;
@@ -39,7 +38,7 @@ __clog10f (__complex__ float x)
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabsf (__real__ x);
}
- else if (rcls != FP_NAN && icls != FP_NAN)
+ else if (__builtin_expect (rcls != FP_NAN && icls != FP_NAN, 1))
{
/* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_log10f (__ieee754_hypotf (__real__ x,
diff --git a/math/s_clog10l.c b/math/s_clog10l.c
index 5ea72fdf32..990913e7b8 100644
--- a/math/s_clog10l.c
+++ b/math/s_clog10l.c
@@ -1,5 +1,5 @@
/* Compute complex base 10 logarithm.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __clog10l (__complex__ long double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls == FP_ZERO && icls == FP_ZERO)
+ if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
/* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PIl : 0.0;
@@ -39,7 +38,7 @@ __clog10l (__complex__ long double x)
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabsl (__real__ x);
}
- else if (rcls != FP_NAN && icls != FP_NAN)
+ else if (__builtin_expect (rcls != FP_NAN && icls != FP_NAN, 1))
{
/* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_log10l (__ieee754_hypotl (__real__ x,
diff --git a/math/s_clogf.c b/math/s_clogf.c
index b9e918968b..fdda83e548 100644
--- a/math/s_clogf.c
+++ b/math/s_clogf.c
@@ -1,5 +1,5 @@
/* Compute complex natural logarithm.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -31,7 +31,7 @@ __clogf (__complex__ float x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls == FP_ZERO && icls == FP_ZERO)
+ if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
/* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PI : 0.0;
@@ -39,7 +39,7 @@ __clogf (__complex__ float x)
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabsf (__real__ x);
}
- else if (rcls != FP_NAN && icls != FP_NAN)
+ else if (__builtin_expect (rcls != FP_NAN && icls != FP_NAN, 1))
{
/* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_logf (__ieee754_hypotf (__real__ x,
diff --git a/math/s_clogl.c b/math/s_clogl.c
index 51ad03b34a..396ba91802 100644
--- a/math/s_clogl.c
+++ b/math/s_clogl.c
@@ -1,5 +1,5 @@
/* Compute complex natural logarithm.
- Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,7 +20,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -31,7 +30,7 @@ __clogl (__complex__ long double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls == FP_ZERO && icls == FP_ZERO)
+ if (__builtin_expect (rcls == FP_ZERO && icls == FP_ZERO, 0))
{
/* Real and imaginary part are 0.0. */
__imag__ result = signbit (__real__ x) ? M_PIl : 0.0;
@@ -39,7 +38,7 @@ __clogl (__complex__ long double x)
/* Yes, the following line raises an exception. */
__real__ result = -1.0 / fabsl (__real__ x);
}
- else if (rcls != FP_NAN && icls != FP_NAN)
+ else if (__builtin_expect (rcls != FP_NAN && icls != FP_NAN, 1))
{
/* Neither real nor imaginary part is NaN. */
__real__ result = __ieee754_logl (__ieee754_hypotl (__real__ x,
diff --git a/math/s_csin.c b/math/s_csin.c
index 0d4441ca2b..07a78c4384 100644
--- a/math/s_csin.c
+++ b/math/s_csin.c
@@ -1,5 +1,5 @@
/* Complex sine function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -35,10 +35,10 @@ __csin (__complex__ double x)
__real__ x = fabs (__real__ x);
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
double sinh_val = __ieee754_sinh (__imag__ x);
@@ -61,19 +61,15 @@ __csin (__complex__ double x)
__real__ retval = __nan ("");
__imag__ retval = __imag__ x;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nan ("");
__imag__ retval = __nan ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
@@ -107,10 +103,8 @@ __csin (__complex__ double x)
__real__ retval = __nan ("");
__imag__ retval = HUGE_VAL;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_csinf.c b/math/s_csinf.c
index 61786ba6c8..4f4dfb8ea2 100644
--- a/math/s_csinf.c
+++ b/math/s_csinf.c
@@ -1,5 +1,5 @@
/* Complex sine function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -35,10 +35,10 @@ __csinf (__complex__ float x)
__real__ x = fabsf (__real__ x);
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
float sinh_val = __ieee754_sinhf (__imag__ x);
@@ -61,19 +61,15 @@ __csinf (__complex__ float x)
__real__ retval = __nanf ("");
__imag__ retval = __imag__ x;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
@@ -107,10 +103,8 @@ __csinf (__complex__ float x)
__real__ retval = __nanf ("");
__imag__ retval = HUGE_VALF;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_csinh.c b/math/s_csinh.c
index 138d80505e..2eec065a8f 100644
--- a/math/s_csinh.c
+++ b/math/s_csinh.c
@@ -1,5 +1,5 @@
/* Complex sine hyperbole function for double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -35,10 +35,10 @@ __csinh (__complex__ double x)
__real__ x = fabs (__real__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinh_val = __ieee754_sinh (__real__ x);
@@ -61,32 +61,22 @@ __csinh (__complex__ double x)
__real__ retval = __copysign (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nan ("");
__imag__ retval = __nan ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
else if (rcls == FP_INFINITE)
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
double sinix, cosix;
@@ -99,16 +89,20 @@ __csinh (__complex__ double x)
if (negate)
__real__ retval = -__real__ retval;
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = negate ? -HUGE_VAL : HUGE_VAL;
+ __imag__ retval = __imag__ x;
+ }
else
{
/* The addition raises the invalid exception. */
__real__ retval = HUGE_VAL;
__imag__ retval = __nan ("") + __nan ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_csinhf.c b/math/s_csinhf.c
index 3440516529..51e837b14f 100644
--- a/math/s_csinhf.c
+++ b/math/s_csinhf.c
@@ -1,5 +1,5 @@
/* Complex sine hyperbole function for float.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -35,10 +35,10 @@ __csinhf (__complex__ float x)
__real__ x = fabsf (__real__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinh_val = __ieee754_sinhf (__real__ x);
@@ -61,32 +61,22 @@ __csinhf (__complex__ float x)
__real__ retval = __copysignf (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanf ("") + __nanf ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanf ("");
__imag__ retval = __nanf ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
float sinix, cosix;
@@ -99,6 +89,12 @@ __csinhf (__complex__ float x)
if (negate)
__real__ retval = -__real__ retval;
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = negate ? -HUGE_VALF : HUGE_VALF;
+ __imag__ retval = __imag__ x;
+ }
else
{
/* The addition raises the invalid exception. */
diff --git a/math/s_csinhl.c b/math/s_csinhl.c
index db1b47b301..d2964f8a2b 100644
--- a/math/s_csinhl.c
+++ b/math/s_csinhl.c
@@ -1,5 +1,5 @@
/* Complex sine hyperbole function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -35,10 +35,10 @@ __csinhl (__complex__ long double x)
__real__ x = fabsl (__real__ x);
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinh_val = __ieee754_sinhl (__real__ x);
@@ -61,32 +61,22 @@ __csinhl (__complex__ long double x)
__real__ retval = __copysignl (0.0, negate ? -1.0 : 1.0);
__imag__ retval = __nanl ("") + __nanl ("");
-#ifdef FE_INVALID
if (icls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
- else if (rcls == FP_INFINITE)
+ else if (__builtin_expect (rcls == FP_INFINITE, 1))
{
/* Real part is infinite. */
- if (icls == FP_ZERO)
- {
- /* Imaginary part is 0.0. */
- __real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
- __imag__ retval = __imag__ x;
- }
- else if (icls > FP_ZERO)
+ if (__builtin_expect (icls > FP_ZERO, 1))
{
/* Imaginary part is finite. */
long double sinix, cosix;
@@ -99,6 +89,12 @@ __csinhl (__complex__ long double x)
if (negate)
__real__ retval = -__real__ retval;
}
+ else if (icls == FP_ZERO)
+ {
+ /* Imaginary part is 0.0. */
+ __real__ retval = negate ? -HUGE_VALL : HUGE_VALL;
+ __imag__ retval = __imag__ x;
+ }
else
{
/* The addition raises the invalid exception. */
diff --git a/math/s_csinl.c b/math/s_csinl.c
index 5e477eb7f9..300035c699 100644
--- a/math/s_csinl.c
+++ b/math/s_csinl.c
@@ -1,5 +1,5 @@
/* Complex sine function for long double.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -35,10 +35,10 @@ __csinl (__complex__ long double x)
__real__ x = fabsl (__real__ x);
- if (icls >= FP_ZERO)
+ if (__builtin_expect (icls >= FP_ZERO, 1))
{
/* Imaginary part is finite. */
- if (rcls >= FP_ZERO)
+ if (__builtin_expect (rcls >= FP_ZERO, 1))
{
/* Real part is finite. */
long double sinh_val = __ieee754_sinhl (__imag__ x);
@@ -61,19 +61,15 @@ __csinl (__complex__ long double x)
__real__ retval = __nanl ("");
__imag__ retval = __imag__ x;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
else
{
__real__ retval = __nanl ("");
__imag__ retval = __nanl ("");
-#ifdef FE_INVALID
feraiseexcept (FE_INVALID);
-#endif
}
}
}
@@ -107,10 +103,8 @@ __csinl (__complex__ long double x)
__real__ retval = __nanl ("");
__imag__ retval = HUGE_VALL;
-#ifdef FE_INVALID
if (rcls == FP_INFINITE)
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_csqrt.c b/math/s_csqrt.c
index 0ceb461b09..1691a01ecc 100644
--- a/math/s_csqrt.c
+++ b/math/s_csqrt.c
@@ -1,5 +1,5 @@
/* Complex square root of double value.
- Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -32,7 +31,7 @@ __csqrt (__complex__ double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (icls == FP_INFINITE)
{
@@ -61,7 +60,7 @@ __csqrt (__complex__ double x)
}
else
{
- if (icls == FP_ZERO)
+ if (__builtin_expect (icls == FP_ZERO, 0))
{
if (__real__ x < 0.0)
{
@@ -75,7 +74,7 @@ __csqrt (__complex__ double x)
__imag__ res = __copysign (0.0, __imag__ x);
}
}
- else if (rcls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO, 0))
{
double r = __ieee754_sqrt (0.5 * fabs (__imag__ x));
diff --git a/math/s_csqrtf.c b/math/s_csqrtf.c
index 1cf3b79c31..1613192a5e 100644
--- a/math/s_csqrtf.c
+++ b/math/s_csqrtf.c
@@ -1,5 +1,5 @@
/* Complex square root of float value.
- Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -32,7 +31,7 @@ __csqrtf (__complex__ float x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (icls == FP_INFINITE)
{
@@ -61,7 +60,7 @@ __csqrtf (__complex__ float x)
}
else
{
- if (icls == FP_ZERO)
+ if (__builtin_expect (icls == FP_ZERO, 0))
{
if (__real__ x < 0.0)
{
@@ -75,7 +74,7 @@ __csqrtf (__complex__ float x)
__imag__ res = __copysignf (0.0, __imag__ x);
}
}
- else if (rcls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO, 0))
{
float r = __ieee754_sqrtf (0.5 * fabsf (__imag__ x));
diff --git a/math/s_csqrtl.c b/math/s_csqrtl.c
index 32d6f364a0..9b93ef66b2 100644
--- a/math/s_csqrtl.c
+++ b/math/s_csqrtl.c
@@ -1,5 +1,5 @@
/* Complex square root of long double value.
- Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on an algorithm by Stephen L. Moshier <moshier@world.std.com>.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <math.h>
-
#include <math_private.h>
@@ -32,7 +31,7 @@ __csqrtl (__complex__ long double x)
int rcls = fpclassify (__real__ x);
int icls = fpclassify (__imag__ x);
- if (rcls <= FP_INFINITE || icls <= FP_INFINITE)
+ if (__builtin_expect (rcls <= FP_INFINITE || icls <= FP_INFINITE, 0))
{
if (icls == FP_INFINITE)
{
@@ -61,7 +60,7 @@ __csqrtl (__complex__ long double x)
}
else
{
- if (icls == FP_ZERO)
+ if (__builtin_expect (icls == FP_ZERO, 0))
{
if (__real__ x < 0.0)
{
@@ -75,7 +74,7 @@ __csqrtl (__complex__ long double x)
__imag__ res = __copysignl (0.0, __imag__ x);
}
}
- else if (rcls == FP_ZERO)
+ else if (__builtin_expect (rcls == FP_ZERO, 0))
{
long double r = __ieee754_sqrtl (0.5 * fabsl (__imag__ x));
diff --git a/math/s_ctan.c b/math/s_ctan.c
index 4cadad1dac..41958516f1 100644
--- a/math/s_ctan.c
+++ b/math/s_ctan.c
@@ -1,5 +1,5 @@
/* Complex tangent function for double.
- Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -30,9 +30,9 @@ __ctan (__complex__ double x)
{
__complex__ double res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
- if (__isinf (__imag__ x))
+ if (__isinf_ns (__imag__ x))
{
__real__ res = __copysign (0.0, __real__ x);
__imag__ res = __copysign (1.0, __imag__ x);
@@ -46,10 +46,8 @@ __ctan (__complex__ double x)
__real__ res = __nan ("");
__imag__ res = __nan ("");
-#ifdef FE_INVALID
- if (__isinf (__real__ x))
+ if (__isinf_ns (__real__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_ctanf.c b/math/s_ctanf.c
index 7fa16200c5..7063e38d8e 100644
--- a/math/s_ctanf.c
+++ b/math/s_ctanf.c
@@ -1,5 +1,5 @@
/* Complex tangent function for float.
- Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
@@ -30,9 +29,9 @@ __ctanf (__complex__ float x)
{
__complex__ float res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
- if (__isinff (__imag__ x))
+ if (__isinf_nsf (__imag__ x))
{
__real__ res = __copysignf (0.0, __real__ x);
__imag__ res = __copysignf (1.0, __imag__ x);
@@ -46,10 +45,8 @@ __ctanf (__complex__ float x)
__real__ res = __nanf ("");
__imag__ res = __nanf ("");
-#ifdef FE_INVALID
- if (__isinff (__real__ x))
+ if (__isinf_nsf (__real__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_ctanh.c b/math/s_ctanh.c
index 60a52dbdb7..9d31c43cd9 100644
--- a/math/s_ctanh.c
+++ b/math/s_ctanh.c
@@ -1,5 +1,5 @@
/* Complex hyperbole tangent for double.
- Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
@@ -30,9 +29,9 @@ __ctanh (__complex__ double x)
{
__complex__ double res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
- if (__isinf (__real__ x))
+ if (__isinf_ns (__real__ x))
{
__real__ res = __copysign (1.0, __real__ x);
__imag__ res = __copysign (0.0, __imag__ x);
@@ -46,10 +45,8 @@ __ctanh (__complex__ double x)
__real__ res = __nan ("");
__imag__ res = __nan ("");
-#ifdef FE_INVALID
- if (__isinf (__imag__ x))
+ if (__isinf_ns (__imag__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_ctanhf.c b/math/s_ctanhf.c
index 1d62afc27b..6cb3a2cc99 100644
--- a/math/s_ctanhf.c
+++ b/math/s_ctanhf.c
@@ -1,5 +1,5 @@
/* Complex hyperbole tangent for float.
- Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
@@ -30,9 +29,9 @@ __ctanhf (__complex__ float x)
{
__complex__ float res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
- if (__isinff (__real__ x))
+ if (__isinf_nsf (__real__ x))
{
__real__ res = __copysignf (1.0, __real__ x);
__imag__ res = __copysignf (0.0, __imag__ x);
@@ -46,10 +45,8 @@ __ctanhf (__complex__ float x)
__real__ res = __nanf ("");
__imag__ res = __nanf ("");
-#ifdef FE_INVALID
- if (__isinff (__imag__ x))
+ if (__isinf_nsf (__imag__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_ctanhl.c b/math/s_ctanhl.c
index 99df2b06cd..0c4641714b 100644
--- a/math/s_ctanhl.c
+++ b/math/s_ctanhl.c
@@ -1,5 +1,5 @@
/* Complex hyperbole tangent for long double.
- Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -21,7 +21,6 @@
#include <complex.h>
#include <fenv.h>
#include <math.h>
-
#include <math_private.h>
@@ -30,9 +29,9 @@ __ctanhl (__complex__ long double x)
{
__complex__ long double res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
- if (__isinfl (__real__ x))
+ if (__isinf_nsl (__real__ x))
{
__real__ res = __copysignl (1.0, __real__ x);
__imag__ res = __copysignl (0.0, __imag__ x);
@@ -46,10 +45,8 @@ __ctanhl (__complex__ long double x)
__real__ res = __nanl ("");
__imag__ res = __nanl ("");
-#ifdef FE_INVALID
- if (__isinfl (__imag__ x))
+ if (__isinf_nsl (__imag__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_ctanl.c b/math/s_ctanl.c
index 4a95c1df06..6f49c57c90 100644
--- a/math/s_ctanl.c
+++ b/math/s_ctanl.c
@@ -1,5 +1,5 @@
/* Complex tangent function for long double.
- Copyright (C) 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -30,9 +30,9 @@ __ctanl (__complex__ long double x)
{
__complex__ long double res;
- if (!isfinite (__real__ x) || !isfinite (__imag__ x))
+ if (__builtin_expect (!isfinite (__real__ x) || !isfinite (__imag__ x), 0))
{
- if (__isinfl (__imag__ x))
+ if (__isinf_nsl (__imag__ x))
{
__real__ res = __copysignl (0.0, __real__ x);
__imag__ res = __copysignl (1.0, __imag__ x);
@@ -46,10 +46,8 @@ __ctanl (__complex__ long double x)
__real__ res = __nanl ("");
__imag__ res = __nanl ("");
-#ifdef FE_INVALID
- if (__isinfl (__real__ x))
+ if (__isinf_nsl (__real__ x))
feraiseexcept (FE_INVALID);
-#endif
}
}
else
diff --git a/math/s_nan.c b/math/s_nan.c
index 9b2c50558b..97f9d898a0 100644
--- a/math/s_nan.c
+++ b/math/s_nan.c
@@ -25,6 +25,7 @@
#include <ieee754.h>
+#undef __nan
double
__nan (const char *tagp)
{
diff --git a/math/s_nanf.c b/math/s_nanf.c
index 2e1b1eb911..6161bcdd29 100644
--- a/math/s_nanf.c
+++ b/math/s_nanf.c
@@ -25,6 +25,7 @@
#include <ieee754.h>
+#undef __nanf
float
__nanf (const char *tagp)
{
diff --git a/math/s_nanl.c b/math/s_nanl.c
index 9709b92383..1db246426c 100644
--- a/math/s_nanl.c
+++ b/math/s_nanl.c
@@ -25,6 +25,7 @@
#include <ieee754.h>
+#undef __nanl
long double
__nanl (const char *tagp)
{
diff --git a/math/w_acos.c b/math/w_acos.c
index 0bf5a80942..617cfdae49 100644
--- a/math/w_acos.c
+++ b/math/w_acos.c
@@ -1,45 +1,39 @@
-/* @(#)w_acos.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acos.c,v 1.6 1995/05/10 20:48:26 jtc Exp $";
-#endif
+ 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.
-/*
- * wrap_acos(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __acos(double x) /* wrapper acos */
-#else
- double __acos(x) /* wrapper acos */
- double x;
-#endif
+/* wrapper acos */
+double
+__acos (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_acos(x);
-#else
- double z;
- z = __ieee754_acos(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- if(fabs(x)>1.0) {
- return __kernel_standard(x,x,1); /* acos(|x|>1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
+ {
+ /* acos(|x|>1) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 1);
+ }
+
+ return __ieee754_acos (x);
}
weak_alias (__acos, acos)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_acosf.c b/math/w_acosf.c
index 37d22afea8..bb3aae0010 100644
--- a/math/w_acosf.c
+++ b/math/w_acosf.c
@@ -1,48 +1,38 @@
-/* w_acosf.c -- float version of w_acos.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acosf.c,v 1.3 1995/05/10 20:48:29 jtc Exp $";
-#endif
+ 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.
-/*
- * wrap_acosf(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __acosf(float x) /* wrapper acosf */
-#else
- float __acosf(x) /* wrapper acosf */
- float x;
-#endif
+/* wrapper acosf */
+float
+__acosf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_acosf(x);
-#else
- float z;
- z = __ieee754_acosf(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- if(fabsf(x)>(float)1.0) {
- /* acosf(|x|>1) */
- return (float)__kernel_standard((double)x,(double)x,101);
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
+ {
+ /* acos(|x|>1) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (x, x, 101);
+ }
+
+ return __ieee754_acosf (x);
}
weak_alias (__acosf, acosf)
diff --git a/math/w_acosh.c b/math/w_acosh.c
index 18ea8cc1b7..50201b4d22 100644
--- a/math/w_acosh.c
+++ b/math/w_acosh.c
@@ -1,44 +1,35 @@
-/* @(#)w_acosh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acosh.c,v 1.6 1995/05/10 20:48:31 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper acosh(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __acosh(double x) /* wrapper acosh */
-#else
- double __acosh(x) /* wrapper acosh */
- double x;
-#endif
+
+/* wrapper acosh */
+double
+__acosh (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_acosh(x);
-#else
- double z;
- z = __ieee754_acosh(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- if(x<1.0) {
- return __kernel_standard(x,x,29); /* acosh(x<1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x < 1.0, 0) && _LIB_VERSION != _IEEE_)
+ /* acosh(x<1) */
+ return __kernel_standard (x, x, 29);
+
+ return __ieee754_acosh (x);
}
weak_alias (__acosh, acosh)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_acoshf.c b/math/w_acoshf.c
index d7d6d4eb41..2b07824a0e 100644
--- a/math/w_acoshf.c
+++ b/math/w_acoshf.c
@@ -1,48 +1,34 @@
-/* w_acoshf.c -- float version of w_acosh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- *
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_acoshf.c,v 1.3 1995/05/10 20:48:33 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper acoshf(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __acoshf(float x) /* wrapper acoshf */
-#else
- float __acoshf(x) /* wrapper acoshf */
- float x;
-#endif
+
+/* wrapper acoshf */
+float
+__acoshf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_acoshf(x);
-#else
- float z;
- z = __ieee754_acoshf(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- if(x<(float)1.0) {
- /* acosh(x<1) */
- return (float)__kernel_standard((double)x,(double)x,129);
- } else
- return z;
-#endif
+ if (__builtin_expect (x < 1.0f, 0) && _LIB_VERSION != _IEEE_)
+ /* acosh(x<1) */
+ return __kernel_standard_f (x, x, 129);
+
+ return __ieee754_acoshf (x);
}
weak_alias (__acoshf, acoshf)
diff --git a/math/w_acoshl.c b/math/w_acoshl.c
index 3c77321dc2..0f7068a96e 100644
--- a/math/w_acoshl.c
+++ b/math/w_acoshl.c
@@ -1,47 +1,34 @@
-/* w_acoshl.c -- long double version of w_acosh.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper acoshl(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __acoshl(long double x) /* wrapper acosh */
-#else
- long double __acoshl(x) /* wrapper acosh */
- long double x;
-#endif
+
+/* wrapper acosl */
+long double
+__acoshl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_acoshl(x);
-#else
- long double z;
- z = __ieee754_acoshl(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- if(x<1.0) {
- return __kernel_standard(x,x,229); /* acoshl(x<1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x < 1.0L, 0) && _LIB_VERSION != _IEEE_)
+ /* acosh(x<1) */
+ return __kernel_standard (x, x, 229);
+
+ return __ieee754_acoshl (x);
}
weak_alias (__acoshl, acoshl)
diff --git a/math/w_acosl.c b/math/w_acosl.c
index a16c55b97a..dd1039ec85 100644
--- a/math/w_acosl.c
+++ b/math/w_acosl.c
@@ -1,48 +1,38 @@
-/* w_acosl.c -- long double version of w_acos.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrap_acosl(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __acosl(long double x) /* wrapper acos */
-#else
- long double __acosl(x) /* wrapper acos */
- long double x;
-#endif
+/* wrapper acosl */
+long double
+__acosl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_acosl(x);
-#else
- long double z;
- z = __ieee754_acosl(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- if(fabsl(x)>1.0) {
- return __kernel_standard(x,x,201); /* acosl(|x|>1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
+ {
+ /* acos(|x|>1) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 201);
+ }
+
+ return __ieee754_acosl (x);
}
weak_alias (__acosl, acosl)
diff --git a/math/w_asin.c b/math/w_asin.c
index b7fccdea7e..feb5c6aaf3 100644
--- a/math/w_asin.c
+++ b/math/w_asin.c
@@ -1,46 +1,39 @@
-/* @(#)w_asin.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_asin.c,v 1.6 1995/05/10 20:48:35 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper asin(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __asin(double x) /* wrapper asin */
-#else
- double __asin(x) /* wrapper asin */
- double x;
-#endif
+/* wrapper asin */
+double
+__asin (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_asin(x);
-#else
- double z;
- z = __ieee754_asin(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- if(fabs(x)>1.0) {
- return __kernel_standard(x,x,2); /* asin(|x|>1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabs (x) > 1.0, 0) && _LIB_VERSION != _IEEE_)
+ {
+ /* asin(|x|>1) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 2);
+ }
+
+ return __ieee754_asin (x);
}
weak_alias (__asin, asin)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_asinf.c b/math/w_asinf.c
index f2c0b22e4a..1a21dc389a 100644
--- a/math/w_asinf.c
+++ b/math/w_asinf.c
@@ -1,49 +1,38 @@
-/* w_asinf.c -- float version of w_asin.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_asinf.c,v 1.3 1995/05/10 20:48:37 jtc Exp $";
-#endif
-
-/*
- * wrapper asinf(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __asinf(float x) /* wrapper asinf */
-#else
- float __asinf(x) /* wrapper asinf */
- float x;
-#endif
+/* wrapper asinf */
+float
+__asinf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_asinf(x);
-#else
- float z;
- z = __ieee754_asinf(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- if(fabsf(x)>(float)1.0) {
- /* asinf(|x|>1) */
- return (float)__kernel_standard((double)x,(double)x,102);
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsf (x) > 1.0f, 0) && _LIB_VERSION != _IEEE_)
+ {
+ /* asin(|x|>1) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (x, x, 102);
+ }
+
+ return __ieee754_asinf (x);
}
weak_alias (__asinf, asinf)
diff --git a/math/w_asinl.c b/math/w_asinl.c
index 9a316b77cd..a9f14fbd63 100644
--- a/math/w_asinl.c
+++ b/math/w_asinl.c
@@ -1,49 +1,38 @@
-/* w_asinl.c -- long double version of w_asin.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper asinl(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __asinl(long double x) /* wrapper asinl */
-#else
- long double __asinl(x) /* wrapper asinl */
- long double x;
-#endif
+/* wrapper asinl */
+long double
+__asinl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_asinl(x);
-#else
- long double z;
- z = __ieee754_asinl(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- if(fabsl(x)>1.0) {
- return __kernel_standard(x,x,202); /* asinl(|x|>1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsl (x) > 1.0L, 0) && _LIB_VERSION != _IEEE_)
+ {
+ /* asin(|x|>1) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 202);
+ }
+
+ return __ieee754_asinl (x);
}
weak_alias (__asinl, asinl)
diff --git a/math/w_atan2.c b/math/w_atan2.c
index 4fcaba920b..7d61c7279e 100644
--- a/math/w_atan2.c
+++ b/math/w_atan2.c
@@ -1,18 +1,21 @@
-/* @(#)w_atan2.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atan2.c,v 1.6 1995/05/10 20:48:39 jtc Exp $";
-#endif
+ 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. */
/*
* wrapper atan2(y,x)
@@ -22,23 +25,13 @@ static char rcsid[] = "$NetBSD: w_atan2.c,v 1.6 1995/05/10 20:48:39 jtc Exp $";
#include <math_private.h>
-#ifdef __STDC__
- double __atan2(double y, double x) /* wrapper atan2 */
-#else
- double __atan2(y,x) /* wrapper atan2 */
- double y,x;
-#endif
+double
+__atan2 (double y, double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_atan2(y,x);
-#else
- double z;
- z = __ieee754_atan2(y,x);
- if(_LIB_VERSION != _SVID_||__isnan(x)||__isnan(y)) return z;
- if(x==0.0&&y==0.0)
- return __kernel_standard(y,x,3); /* atan2(+-0,+-0) */
- return z;
-#endif
+ if (__builtin_expect (x == 0.0 && y == 0.0, 0) && _LIB_VERSION == _SVID_)
+ return __kernel_standard (y, x, 3); /* atan2(+-0,+-0) */
+
+ return __ieee754_atan2 (y, x);
}
weak_alias (__atan2, atan2)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_atan2f.c b/math/w_atan2f.c
index 2a1ca9cf95..b3c65bfcb7 100644
--- a/math/w_atan2f.c
+++ b/math/w_atan2f.c
@@ -1,21 +1,21 @@
-/* w_atan2f.c -- float version of w_atan2.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atan2f.c,v 1.3 1995/05/10 20:48:42 jtc Exp $";
-#endif
+ 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. */
/*
* wrapper atan2f(y,x)
@@ -25,22 +25,12 @@ static char rcsid[] = "$NetBSD: w_atan2f.c,v 1.3 1995/05/10 20:48:42 jtc Exp $";
#include <math_private.h>
-#ifdef __STDC__
- float __atan2f(float y, float x) /* wrapper atan2f */
-#else
- float __atan2f(y,x) /* wrapper atan2 */
- float y,x;
-#endif
+float
+__atan2f (float y, float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_atan2f(y,x);
-#else
- float z;
- z = __ieee754_atan2f(y,x);
- if(_LIB_VERSION != _SVID_||__isnanf(x)||__isnanf(y)) return z;
- if(x==0.0&&y==0.0)
- return __kernel_standard(y,x,103); /* atan2(+-0,+-0) */
- return z;
-#endif
+ if (__builtin_expect (x == 0.0f && y == 0.0f, 0) && _LIB_VERSION == _SVID_)
+ return __kernel_standard_f (y, x, 103); /* atan2(+-0,+-0) */
+
+ return __ieee754_atan2f (y, x);
}
weak_alias (__atan2f, atan2f)
diff --git a/math/w_atan2l.c b/math/w_atan2l.c
index 85d6f5dd7d..c4854993a5 100644
--- a/math/w_atan2l.c
+++ b/math/w_atan2l.c
@@ -1,22 +1,21 @@
-/* w_atan2l.c -- long double version of w_atan2.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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. */
/*
* wrapper atan2l(y,x)
@@ -26,22 +25,12 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
-#ifdef __STDC__
- long double __atan2l(long double y, long double x) /* wrapper atan2l */
-#else
- long double __atan2l(y,x) /* wrapper atan2l */
- long double y,x;
-#endif
+long double
+__atan2l (long double y, long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_atan2l(y,x);
-#else
- long double z;
- z = __ieee754_atan2l(y,x);
- if(_LIB_VERSION != _SVID_||__isnanl(x)||__isnanl(y)) return z;
- if(x==0.0&&y==0.0)
- return __kernel_standard(y,x,203); /* atan2(+-0,+-0) */
- return z;
-#endif
+ if (__builtin_expect (x == 0.0L && y == 0.0L, 0) && _LIB_VERSION == _SVID_)
+ return __kernel_standard (y, x, 203); /* atan2(+-0,+-0) */
+
+ return __ieee754_atan2l (y, x);
}
weak_alias (__atan2l, atan2l)
diff --git a/math/w_atanh.c b/math/w_atanh.c
index a2dab67a75..61ea0d8754 100644
--- a/math/w_atanh.c
+++ b/math/w_atanh.c
@@ -1,49 +1,37 @@
-/* @(#)w_atanh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atanh.c,v 1.6 1995/05/10 20:48:43 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper atanh(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __atanh(double x) /* wrapper atanh */
-#else
- double __atanh(x) /* wrapper atanh */
- double x;
-#endif
+/* wrapper atanh */
+double
+__atanh (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_atanh(x);
-#else
- double z,y;
- z = __ieee754_atanh(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- y = fabs(x);
- if(y>=1.0) {
- if(y>1.0)
- return __kernel_standard(x,x,30); /* atanh(|x|>1) */
- else
- return __kernel_standard(x,x,31); /* atanh(|x|==1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabs (x) >= 1.0, 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x,
+ fabs (x) > 1.0
+ ? 30 /* atanh(|x|>1) */
+ : 31); /* atanh(|x|==1) */
+
+ return __ieee754_atanh (x);
}
weak_alias (__atanh, atanh)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_atanhf.c b/math/w_atanhf.c
index 41dd2ac33b..fd1dbaeee3 100644
--- a/math/w_atanhf.c
+++ b/math/w_atanhf.c
@@ -1,53 +1,36 @@
-/* w_atanhf.c -- float version of w_atanh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_atanhf.c,v 1.3 1995/05/10 20:48:45 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper atanhf(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __atanhf(float x) /* wrapper atanhf */
-#else
- float __atanhf(x) /* wrapper atanhf */
- float x;
-#endif
+/* wrapper atanhf */
+float
+__atanhf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_atanhf(x);
-#else
- float z,y;
- z = __ieee754_atanhf(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- y = fabsf(x);
- if(y>=(float)1.0) {
- if(y>(float)1.0)
- /* atanhf(|x|>1) */
- return (float)__kernel_standard((double)x,(double)x,130);
- else
- /* atanhf(|x|==1) */
- return (float)__kernel_standard((double)x,(double)x,131);
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsf (x) >= 1.0f, 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x,
+ fabsf (x) > 1.0f
+ ? 130 /* atanh(|x|>1) */
+ : 131); /* atanh(|x|==1) */
+
+ return __ieee754_atanhf (x);
}
weak_alias (__atanhf, atanhf)
diff --git a/math/w_atanhl.c b/math/w_atanhl.c
index c61229c345..7c958f1312 100644
--- a/math/w_atanhl.c
+++ b/math/w_atanhl.c
@@ -1,52 +1,36 @@
-/* w_atanhl.c -- long double version of w_atanh.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper atanhl(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __atanhl(long double x) /* wrapper atanhl */
-#else
- long double __atanhl(x) /* wrapper atanhl */
- long double x;
-#endif
+/* wrapper atanhl */
+long double
+__atanhl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_atanhl(x);
-#else
- long double z,y;
- z = __ieee754_atanhl(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- y = fabsl(x);
- if(y>=1.0) {
- if(y>1.0)
- return __kernel_standard(x,x,230); /* atanhl(|x|>1) */
- else
- return __kernel_standard(x,x,231); /* atanhl(|x|==1) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsl (x) >= 1.0L, 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x,
+ fabsl (x) > 1.0L
+ ? 230 /* atanh(|x|>1) */
+ : 231); /* atanh(|x|==1) */
+
+ return __ieee754_atanhl (x);
}
weak_alias (__atanhl, atanhl)
diff --git a/math/w_cosh.c b/math/w_cosh.c
index 0e27a2da1c..57010781bf 100644
--- a/math/w_cosh.c
+++ b/math/w_cosh.c
@@ -1,4 +1,4 @@
-/* @(#)w_cosh.c 5.1 93/09/24 */
+/* Optimizations bu Ulrich Drepper <drepper@gmail.com>, 2011 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_cosh.c,v 1.6 1995/05/10 20:48:47 jtc Exp $";
-#endif
-
/*
* wrapper cosh(x)
*/
@@ -21,24 +17,15 @@ static char rcsid[] = "$NetBSD: w_cosh.c,v 1.6 1995/05/10 20:48:47 jtc Exp $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __cosh(double x) /* wrapper cosh */
-#else
- double __cosh(x) /* wrapper cosh */
- double x;
-#endif
+double
+__cosh (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_cosh(x);
-#else
- double z;
- z = __ieee754_cosh(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- if(!__finite(z) && __finite(x)) {
- return __kernel_standard(x,x,5); /* cosh overflow */
- } else
- return z;
-#endif
+ double z = __ieee754_cosh (x);
+ if (__builtin_expect (!__finite (z), 0) && __finite (x)
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 5); /* cosh overflow */
+
+ return z;
}
weak_alias (__cosh, cosh)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_coshf.c b/math/w_coshf.c
index 5e3477fdb7..df1f681205 100644
--- a/math/w_coshf.c
+++ b/math/w_coshf.c
@@ -1,5 +1,6 @@
/* w_coshf.c -- float version of w_cosh.c.
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ * Optimizations by Ulrich Drepper <drepper@gmail.com>, 2011.
*/
/*
@@ -8,40 +9,26 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_coshf.c,v 1.3 1995/05/10 20:48:49 jtc Exp $";
-#endif
-
-/*
+/*
* wrapper coshf(x)
*/
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __coshf(float x) /* wrapper coshf */
-#else
- float __coshf(x) /* wrapper coshf */
- float x;
-#endif
+float
+__coshf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_coshf(x);
-#else
- float z;
- z = __ieee754_coshf(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- if(!__finite(z) && __finite(x)) {
- /* cosh overflow */
- return (float)__kernel_standard((double)x,(double)x,105);
- } else
- return z;
-#endif
+ float z = __ieee754_coshf (x);
+ if (__builtin_expect (!__finitef (z), 0) && __finitef (x)
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 105); /* cosh overflow */
+
+ return z;
}
weak_alias (__coshf, coshf)
diff --git a/math/w_coshl.c b/math/w_coshl.c
index ecba921072..abca8b05f5 100644
--- a/math/w_coshl.c
+++ b/math/w_coshl.c
@@ -1,6 +1,7 @@
/* w_acoshl.c -- long double version of w_acosh.c.
* Conversion to long double by Ulrich Drepper,
* Cygnus Support, drepper@cygnus.com.
+ * Optimizations bu Ulrich Drepper <drepper@gmail.com>, 2011.
*/
/*
@@ -14,10 +15,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/*
* wrapper coshl(x)
*/
@@ -25,23 +22,14 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __coshl(long double x) /* wrapper coshl */
-#else
- long double __coshl(x) /* wrapper coshl */
- long double x;
-#endif
+long double
+__coshl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_coshl(x);
-#else
- long double z;
- z = __ieee754_coshl(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- if(!__finitel(z) && __finitel(x)) {
- return __kernel_standard(x,x,205); /* cosh overflow */
- } else
- return z;
-#endif
+ long double z = __ieee754_coshl (x);
+ if (__builtin_expect (!__finitel (z), 0) && __finitel (x)
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 205); /* cosh overflow */
+
+ return z;
}
weak_alias (__coshl, coshl)
diff --git a/math/w_exp10.c b/math/w_exp10.c
index 1512cc0a34..830b08df1e 100644
--- a/math/w_exp10.c
+++ b/math/w_exp10.c
@@ -1,17 +1,22 @@
-/* @(#)w_exp10.c
- * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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. */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
/*
* wrapper exp10(x)
@@ -20,25 +25,16 @@
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __exp10(double x) /* wrapper exp10 */
-#else
- double __exp10(x) /* wrapper exp10 */
- double x;
-#endif
+double
+__exp10 (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_exp10(x);
-#else
- double z;
- z = __ieee754_exp10(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!__finite(z) && __finite(x)) {
- /* exp10 overflow (46) if x > 0, underflow (47) if x < 0. */
- return __kernel_standard(x,x,46+!!__signbit(x));
- }
- return z;
-#endif
+ double z = __ieee754_exp10 (x);
+ if (__builtin_expect (!__finite (z), 0)
+ && __finite (x) && _LIB_VERSION != _IEEE_)
+ /* exp10 overflow (46) if x > 0, underflow (47) if x < 0. */
+ return __kernel_standard (x, x, 46 + !!__signbit (x));
+
+ return z;
}
weak_alias (__exp10, exp10)
strong_alias (__exp10, __pow10)
diff --git a/math/w_exp10f.c b/math/w_exp10f.c
index dcc8dc768e..6fd52f9a3e 100644
--- a/math/w_exp10f.c
+++ b/math/w_exp10f.c
@@ -1,45 +1,40 @@
-/* w_exp10f.c -- float version of w_exp10.c.
- * Conversion to exp10 by Ulrich Drepper <drepper@cygnus.com>.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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. */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
/*
- * wrapper expf10(x)
+ * wrapper exp10f(x)
*/
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __exp10f(float x) /* wrapper exp10f */
-#else
- float __exp10f(x) /* wrapper exp10f */
- float x;
-#endif
+float
+__exp10f (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_exp10f(x);
-#else
- float z;
- z = __ieee754_exp10f(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!__finitef(z) && __finitef(x)) {
- /* exp10f overflow (146) if x > 0, underflow (147) if x < 0. */
- return (float)__kernel_standard((double) x, (double) x,
- 146+!!__signbitf(x));
- }
- return z;
-#endif
+ float z = __ieee754_exp10f (x);
+ if (__builtin_expect (!__finitef (z), 0)
+ && __finitef (x) && _LIB_VERSION != _IEEE_)
+ /* exp10f overflow (146) if x > 0, underflow (147) if x < 0. */
+ return __kernel_standard_f (x, x, 146 + !!__signbitf (x));
+
+ return z;
}
weak_alias (__exp10f, exp10f)
strong_alias (__exp10f, __pow10f)
diff --git a/math/w_exp10l.c b/math/w_exp10l.c
index 80e720a205..0cda27c76b 100644
--- a/math/w_exp10l.c
+++ b/math/w_exp10l.c
@@ -1,18 +1,22 @@
-/* w_exp10l.c -- long double version of w_exp10.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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. */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
/*
* wrapper exp10l(x)
@@ -21,25 +25,16 @@
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __exp10l(long double x) /* wrapper exp10 */
-#else
- long double __exp10l(x) /* wrapper exp10 */
- long double x;
-#endif
+long double
+__exp10l (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_exp10l(x);
-#else
- long double z;
- z = __ieee754_exp10l(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!__finitel(z) && __finitel(x)) {
- /* exp10 overflow (246) if x > 0, underflow (247) if x < 0. */
- return __kernel_standard(x,x,246+__signbitl(x));
- }
- return z;
-#endif
+ long double z = __ieee754_exp10l (x);
+ if (__builtin_expect (!__finitel (z), 0)
+ && __finitel (x) && _LIB_VERSION != _IEEE_)
+ /* exp10l overflow (246) if x > 0, underflow (247) if x < 0. */
+ return __kernel_standard (x, x, 246 + !!__signbitl (x));
+
+ return z;
}
weak_alias (__exp10l, exp10l)
strong_alias (__exp10l, __pow10l)
diff --git a/math/w_exp2.c b/math/w_exp2.c
index c92fb52ad0..bf223265cb 100644
--- a/math/w_exp2.c
+++ b/math/w_exp2.c
@@ -6,28 +6,18 @@
#include <math.h>
#include <math_private.h>
-static const double o_threshold= (double) DBL_MAX_EXP;
-static const double u_threshold= (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
+static const double o_threshold = (double) DBL_MAX_EXP;
+static const double u_threshold = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
double
-__exp2 (double x) /* wrapper exp2 */
+__exp2 (double x)
{
-#ifdef _IEEE_LIBM
+ if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
+ && _LIB_VERSION != _IEEE_ && __finite (x))
+ /* exp2 overflow: 44, exp2 underflow: 45 */
+ return __kernel_standard (x, x, 44 + (x <= o_threshold));
+
return __ieee754_exp2 (x);
-#else
- double z;
- z = __ieee754_exp2 (x);
- if (_LIB_VERSION != _IEEE_ && __finite (x))
- {
- if (x > o_threshold)
- /* exp2 overflow */
- return __kernel_standard (x, x, 44);
- else if (x <= u_threshold)
- /* exp2 underflow */
- return __kernel_standard (x, x, 45);
- }
- return z;
-#endif
}
weak_alias (__exp2, exp2)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_exp2f.c b/math/w_exp2f.c
index 94c82e206e..7215fcaf4c 100644
--- a/math/w_exp2f.c
+++ b/math/w_exp2f.c
@@ -6,27 +6,17 @@
#include <math.h>
#include <math_private.h>
-static const float o_threshold= (float) FLT_MAX_EXP;
-static const float u_threshold= (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
+static const float o_threshold = (float) FLT_MAX_EXP;
+static const float u_threshold = (float) (FLT_MIN_EXP - FLT_MANT_DIG - 1);
float
-__exp2f (float x) /* wrapper exp2f */
+__exp2f (float x)
{
-#ifdef _IEEE_LIBM
+ if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
+ && _LIB_VERSION != _IEEE_ && __finitef (x))
+ /* exp2 overflow: 144, exp2 underflow: 145 */
+ return __kernel_standard_f (x, x, 144 + (x <= o_threshold));
+
return __ieee754_exp2f (x);
-#else
- float z;
- z = __ieee754_exp2f (x);
- if (_LIB_VERSION != _IEEE_ && __finitef (x))
- {
- if (x > o_threshold)
- /* exp2 overflow */
- return (float) __kernel_standard ((double) x, (double) x, 144);
- else if (x <= u_threshold)
- /* exp2 underflow */
- return (float) __kernel_standard ((double) x, (double) x, 145);
- }
- return z;
-#endif
}
weak_alias (__exp2f, exp2f)
diff --git a/math/w_exp2l.c b/math/w_exp2l.c
index f54e3946d8..ac8d231e2c 100644
--- a/math/w_exp2l.c
+++ b/math/w_exp2l.c
@@ -11,21 +11,13 @@ static const long double u_threshold
= (long double) (LDBL_MIN_EXP - LDBL_MANT_DIG - 1);
long double
-__exp2l (long double x) /* wrapper exp2l */
+__exp2l (long double x)
{
-#ifdef _IEEE_LIBM
+ if (__builtin_expect (x <= u_threshold || x > o_threshold, 0)
+ && _LIB_VERSION != _IEEE_ && __finitel (x))
+ /* exp2 overflow: 244, exp2 underflow: 245 */
+ return __kernel_standard (x, x, 244 + (x <= o_threshold));
+
return __ieee754_exp2l (x);
-#else
- long double z;
- z = __ieee754_exp2l (x);
- if (_LIB_VERSION != _IEEE_ && __finitel (x))
- {
- if (x > o_threshold)
- return __kernel_standard (x, x, 244); /* exp2l overflow */
- else if (x <= u_threshold)
- return __kernel_standard (x, x, 245); /* exp2l underflow */
- }
- return z;
-#endif
}
weak_alias (__exp2l, exp2l)
diff --git a/math/w_fmod.c b/math/w_fmod.c
index 69102de9c5..d38ae8c5aa 100644
--- a/math/w_fmod.c
+++ b/math/w_fmod.c
@@ -1,46 +1,35 @@
-/* @(#)w_fmod.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_fmod.c,v 1.6 1995/05/10 20:48:55 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper fmod(x,y)
- */
+ 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 <math.h>
#include <math_private.h>
-
-#ifdef __STDC__
- double __fmod(double x, double y) /* wrapper fmod */
-#else
- double __fmod(x,y) /* wrapper fmod */
- double x,y;
-#endif
+/* wrapper fmod */
+double
+__fmod (double x, double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_fmod(x,y);
-#else
- double z;
- z = __ieee754_fmod(x,y);
- if(_LIB_VERSION == _IEEE_ ||__isnan(y)||__isnan(x)) return z;
- if(__isinf(x)||y==0.0) {
- /* fmod(+-Inf,y) or fmod(x,0) */
- return __kernel_standard(x,y,27);
- } else
- return z;
-#endif
+ if (__builtin_expect (__isinf_ns (x) || y == 0.0, 0)
+ && _LIB_VERSION != _IEEE_ && !__isnan (y) && !__isnan (x))
+ /* fmod(+-Inf,y) or fmod(x,0) */
+ return __kernel_standard (x, y, 27);
+
+ return __ieee754_fmod (x, y);
}
weak_alias (__fmod, fmod)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_fmodf.c b/math/w_fmodf.c
index 55ec8737c8..c0370cf6f3 100644
--- a/math/w_fmodf.c
+++ b/math/w_fmodf.c
@@ -1,48 +1,34 @@
-/* w_fmodf.c -- float version of w_fmod.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_fmodf.c,v 1.3 1995/05/10 20:48:57 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper fmodf(x,y)
- */
+ 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 <math.h>
#include <math_private.h>
-
-#ifdef __STDC__
- float __fmodf(float x, float y) /* wrapper fmodf */
-#else
- float __fmodf(x,y) /* wrapper fmodf */
- float x,y;
-#endif
+/* wrapper fmodf */
+float
+__fmodf (float x, float y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_fmodf(x,y);
-#else
- float z;
- z = __ieee754_fmodf(x,y);
- if(_LIB_VERSION == _IEEE_ ||__isnanf(y)||__isnanf(x)) return z;
- if(__isinff(x)||y==(float)0.0) {
- /* fmodf(+-Inf,y) or fmodf(x,0) */
- return (float)__kernel_standard((double)x,(double)y,127);
- } else
- return z;
-#endif
+ if (__builtin_expect (__isinf_nsf (x) || y == 0.0f, 0)
+ && _LIB_VERSION != _IEEE_ && !__isnanf (y) && !__isnanf (x))
+ /* fmod(+-Inf,y) or fmod(x,0) */
+ return __kernel_standard_f (x, y, 127);
+
+ return __ieee754_fmodf (x, y);
}
weak_alias (__fmodf, fmodf)
diff --git a/math/w_fmodl.c b/math/w_fmodl.c
index c95e23293b..d236fb9fdb 100644
--- a/math/w_fmodl.c
+++ b/math/w_fmodl.c
@@ -1,49 +1,34 @@
-/* w_fmodl.c -- long double version of w_fmod.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper fmodl(x,y)
- */
+ 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 <math.h>
#include <math_private.h>
-
-#ifdef __STDC__
- long double __fmodl(long double x, long double y)/* wrapper fmodl */
-#else
- long double __fmodl(x,y) /* wrapper fmodl */
- long double x,y;
-#endif
+/* wrapper fmodl */
+long double
+__fmodl (long double x, long double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_fmodl(x,y);
-#else
- long double z;
- z = __ieee754_fmodl(x,y);
- if(_LIB_VERSION == _IEEE_ ||__isnanl(y)||__isnanl(x)) return z;
- if(__isinfl(x)||y==0.0) {
- /* fmodl(+-Inf,y) or fmodl(x,0) */
- return __kernel_standard(x,y,227);
- } else
- return z;
-#endif
+ if (__builtin_expect (__isinf_nsl (x) || y == 0.0L, 0)
+ && _LIB_VERSION != _IEEE_ && !__isnanl (y) && !__isnanl (x))
+ /* fmod(+-Inf,y) or fmod(x,0) */
+ return __kernel_standard (x, y, 227);
+
+ return __ieee754_fmodl (x, y);
}
weak_alias (__fmodl, fmodl)
diff --git a/math/w_hypot.c b/math/w_hypot.c
index df69ed383b..2c6de28600 100644
--- a/math/w_hypot.c
+++ b/math/w_hypot.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $";
-#endif
-
/*
* wrapper hypot(x,y)
*/
@@ -22,24 +18,15 @@ static char rcsid[] = "$NetBSD: w_hypot.c,v 1.6 1995/05/10 20:49:07 jtc Exp $";
#include <math_private.h>
-#ifdef __STDC__
- double __hypot(double x, double y)/* wrapper hypot */
-#else
- double __hypot(x,y) /* wrapper hypot */
- double x,y;
-#endif
+double
+__hypot (double x, double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_hypot(x,y);
-#else
- double z;
- z = __ieee754_hypot(x,y);
- if(_LIB_VERSION == _IEEE_) return z;
- if((!__finite(z))&&__finite(x)&&__finite(y))
- return __kernel_standard(x,y,4); /* hypot overflow */
- else
- return z;
-#endif
+ double z = __ieee754_hypot(x,y);
+ if(__builtin_expect(!__finite(z), 0)
+ && __finite(x) && __finite(y) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard(x, y, 4); /* hypot overflow */
+
+ return z;
}
weak_alias (__hypot, hypot)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_hypotf.c b/math/w_hypotf.c
index e1f074f75e..6042b8802d 100644
--- a/math/w_hypotf.c
+++ b/math/w_hypotf.c
@@ -8,15 +8,11 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_hypotf.c,v 1.3 1995/05/10 20:49:09 jtc Exp $";
-#endif
-
/*
* wrapper hypotf(x,y)
*/
@@ -25,24 +21,15 @@ static char rcsid[] = "$NetBSD: w_hypotf.c,v 1.3 1995/05/10 20:49:09 jtc Exp $";
#include <math_private.h>
-#ifdef __STDC__
- float __hypotf(float x, float y) /* wrapper hypotf */
-#else
- float __hypotf(x,y) /* wrapper hypotf */
- float x,y;
-#endif
+float
+__hypotf(float x, float y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_hypotf(x,y);
-#else
- float z;
- z = __ieee754_hypotf(x,y);
- if(_LIB_VERSION == _IEEE_) return z;
- if((!__finitef(z))&&__finitef(x)&&__finitef(y))
+ float z = __ieee754_hypotf(x,y);
+ if(__builtin_expect(!__finitef(z), 0)
+ && __finitef(x) && __finitef(y) && _LIB_VERSION != _IEEE_)
/* hypot overflow */
- return (float)__kernel_standard((double)x,(double)y,104);
- else
- return z;
-#endif
+ return __kernel_standard_f(x, y, 104);
+
+ return z;
}
weak_alias (__hypotf, hypotf)
diff --git a/math/w_hypotl.c b/math/w_hypotl.c
index 6b6414da22..522eb63c39 100644
--- a/math/w_hypotl.c
+++ b/math/w_hypotl.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/*
* wrapper hypotl(x,y)
*/
@@ -26,23 +22,15 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
-#ifdef __STDC__
- long double __hypotl(long double x, long double y)/* wrapper hypotl */
-#else
- long double __hypotl(x,y) /* wrapper hypotl */
- long double x,y;
-#endif
+long double
+__hypotl(long double x, long double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_hypotl(x,y);
-#else
long double z;
z = __ieee754_hypotl(x,y);
- if(_LIB_VERSION == _IEEE_) return z;
- if((!__finitel(z))&&__finitel(x)&&__finitel(y))
- return __kernel_standard(x,y,204); /* hypot overflow */
- else
- return z;
-#endif
+ if(__builtin_expect(!__finitel(z), 0)
+ && __finitel(x) && __finitel(y) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard(x, y, 204); /* hypot overflow */
+
+ return z;
}
weak_alias (__hypotl, hypotl)
diff --git a/math/w_j0.c b/math/w_j0.c
index 59b6b66d0a..361352048c 100644
--- a/math/w_j0.c
+++ b/math/w_j0.c
@@ -1,75 +1,63 @@
-/* @(#)w_j0.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j0.c,v 1.6 1995/05/10 20:49:11 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper j0(double x), y0(double x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double j0(double x) /* wrapper j0 */
-#else
- double j0(x) /* wrapper j0 */
- double x;
-#endif
+
+/* wrapper j0 */
+double
+j0 (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_j0(x);
-#else
- double z = __ieee754_j0(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- if(fabs(x)>X_TLOSS) {
- return __kernel_standard(x,x,34); /* j0(|x|>X_TLOSS) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ /* j0(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 34);
+
+ return __ieee754_j0 (x);
}
#ifdef NO_LONG_DOUBLE
strong_alias (j0, j0l)
#endif
-#ifdef __STDC__
- double y0(double x) /* wrapper y0 */
-#else
- double y0(x) /* wrapper y0 */
- double x;
-#endif
+/* wrapper y0 */
+double
+y0 (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_y0(x);
-#else
- double z;
- z = __ieee754_y0(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard(x,x,8);
- else
- /* d = zero/(x-x); */
- return __kernel_standard(x,x,9);
- }
- if(x>X_TLOSS) {
- return __kernel_standard(x,x,35); /* y0(x>X_TLOSS) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 9);
+ }
+ else if (x == 0.0)
+ /* d = -one/(x-x) */
+ return __kernel_standard (x, x, 8);
+ else
+ /* y0(x>X_TLOSS) */
+ return __kernel_standard (x, x, 35);
+ }
+
+ return __ieee754_y0 (x);
}
#ifdef NO_LONG_DOUBLE
strong_alias (y0, y0l)
diff --git a/math/w_j0f.c b/math/w_j0f.c
index dd436fff59..ff1ac3ca3d 100644
--- a/math/w_j0f.c
+++ b/math/w_j0f.c
@@ -1,74 +1,60 @@
-/* w_j0f.c -- float version of w_j0.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j0f.c,v 1.3 1995/05/10 20:49:13 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper j0f(float x), y0f(float x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float j0f(float x) /* wrapper j0f */
-#else
- float j0f(x) /* wrapper j0f */
- float x;
-#endif
+
+/* wrapper j0f */
+float
+j0f (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_j0f(x);
-#else
- float z = __ieee754_j0f(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- if(fabsf(x)>(float)X_TLOSS) {
- /* j0f(|x|>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,134);
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
+ && _LIB_VERSION != _IEEE_)
+ /* j0(|x|>X_TLOSS) */
+ return __kernel_standard_f (x, x, 134);
+
+ return __ieee754_j0f (x);
}
-#ifdef __STDC__
- float y0f(float x) /* wrapper y0f */
-#else
- float y0f(x) /* wrapper y0f */
- float x;
-#endif
+
+/* wrapper y0f */
+float
+y0f (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_y0f(x);
-#else
- float z;
- z = __ieee754_y0f(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
- if(x <= (float)0.0){
- if(x==(float)0.0)
- /* d= -one/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,108);
- else
- /* d = zero/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,109);
- }
- if(x>(float)X_TLOSS) {
- /* y0(x>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,135);
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0f)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (x, x, 109);
+ }
+ else if (x == 0.0f)
+ /* d = -one/(x-x) */
+ return __kernel_standard_f (x, x, 108);
+ else
+ /* y0(x>X_TLOSS) */
+ return __kernel_standard_f (x, x, 135);
+ }
+
+ return __ieee754_y0f (x);
}
diff --git a/math/w_j0l.c b/math/w_j0l.c
index a91457d374..a16363d53a 100644
--- a/math/w_j0l.c
+++ b/math/w_j0l.c
@@ -1,76 +1,60 @@
-/* w_j0l.c -- long double version of w_j0.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper j0l(long double x), y0l(long double x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __j0l(long double x) /* wrapper j0l */
-#else
- long double __j0l(x) /* wrapper j0 */
- long double x;
-#endif
+
+/* wrapper j0l */
+long double
+__j0l (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_j0l(x);
-#else
- long double z = __ieee754_j0l(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- if(fabsl(x)>X_TLOSS) {
- return __kernel_standard(x,x,234); /* j0(|x|>X_TLOSS) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ /* j0(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 234);
+
+ return __ieee754_j0l (x);
}
weak_alias (__j0l, j0l)
-#ifdef __STDC__
- long double __y0l(long double x) /* wrapper y0l */
-#else
- long double __y0l(x) /* wrapper y0 */
- long double x;
-#endif
+
+/* wrapper y0l */
+long double
+__y0l (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_y0l(x);
-#else
- long double z;
- z = __ieee754_y0l(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard(x,x,208);
- else
- /* d = zero/(x-x); */
- return __kernel_standard(x,x,209);
- }
- if(x>X_TLOSS) {
- return __kernel_standard(x,x,235); /* y0(x>X_TLOSS) */
- } else
- return z;
-#endif
-}
+ if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0L)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 209);
+ }
+ else if (x == 0.0L)
+ /* d = -one/(x-x) */
+ return __kernel_standard (x, x, 208);
+ else
+ /* y0(x>X_TLOSS) */
+ return __kernel_standard (x, x, 235);
+ }
+ return __ieee754_y0l (x);
+}
weak_alias (__y0l, y0l)
diff --git a/math/w_j1.c b/math/w_j1.c
index 7bb3208a74..09cacb82c5 100644
--- a/math/w_j1.c
+++ b/math/w_j1.c
@@ -1,76 +1,63 @@
-/* @(#)w_j1.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j1.c,v 1.6 1995/05/10 20:49:15 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper of j1,y1
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double j1(double x) /* wrapper j1 */
-#else
- double j1(x) /* wrapper j1 */
- double x;
-#endif
+
+/* wrapper j1 */
+double
+j1 (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_j1(x);
-#else
- double z;
- z = __ieee754_j1(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
- if(fabs(x)>X_TLOSS) {
- return __kernel_standard(x,x,36); /* j1(|x|>X_TLOSS) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ /* j1(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 36);
+
+ return __ieee754_j1 (x);
}
#ifdef NO_LONG_DOUBLE
strong_alias (j1, j1l)
#endif
-#ifdef __STDC__
- double y1(double x) /* wrapper y1 */
-#else
- double y1(x) /* wrapper y1 */
- double x;
-#endif
+/* wrapper y1 */
+double
+y1 (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_y1(x);
-#else
- double z;
- z = __ieee754_y1(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard(x,x,10);
- else
- /* d = zero/(x-x); */
- return __kernel_standard(x,x,11);
- }
- if(x>X_TLOSS) {
- return __kernel_standard(x,x,37); /* y1(x>X_TLOSS) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 11);
+ }
+ else if (x == 0.0)
+ /* d = -one/(x-x) */
+ return __kernel_standard (x, x, 10);
+ else
+ /* y1(x>X_TLOSS) */
+ return __kernel_standard (x, x, 37);
+ }
+
+ return __ieee754_y1 (x);
}
#ifdef NO_LONG_DOUBLE
strong_alias (y1, y1l)
diff --git a/math/w_j1f.c b/math/w_j1f.c
index 43dfc6142e..40a2cf3022 100644
--- a/math/w_j1f.c
+++ b/math/w_j1f.c
@@ -1,75 +1,59 @@
-/* w_j1f.c -- float version of w_j1.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_j1f.c,v 1.3 1995/05/10 20:49:17 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper of j1f,y1f
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float j1f(float x) /* wrapper j1f */
-#else
- float j1f(x) /* wrapper j1f */
- float x;
-#endif
+
+/* wrapper j1f */
+float
+j1f (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_j1f(x);
-#else
- float z;
- z = __ieee754_j1f(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
- if(fabsf(x)>(float)X_TLOSS) {
- /* j1(|x|>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,136);
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsf (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ /* j1(|x|>X_TLOSS) */
+ return __kernel_standard_f (x, x, 136);
+
+ return __ieee754_j1f (x);
}
-#ifdef __STDC__
- float y1f(float x) /* wrapper y1f */
-#else
- float y1f(x) /* wrapper y1f */
- float x;
-#endif
+
+/* wrapper y1f */
+float
+y1f (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_y1f(x);
-#else
- float z;
- z = __ieee754_y1f(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
- if(x <= (float)0.0){
- if(x==(float)0.0)
- /* d= -one/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,110);
- else
- /* d = zero/(x-x); */
- return (float)__kernel_standard((double)x,(double)x,111);
- }
- if(x>(float)X_TLOSS) {
- /* y1(x>X_TLOSS) */
- return (float)__kernel_standard((double)x,(double)x,137);
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0f)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (x, x, 111);
+ }
+ else if (x == 0.0f)
+ /* d = -one/(x-x) */
+ return __kernel_standard_f (x, x, 110);
+ else
+ /* y1(x>X_TLOSS) */
+ return __kernel_standard_f (x, x, 137);
+ }
+
+ return __ieee754_y1f (x);
}
diff --git a/math/w_j1l.c b/math/w_j1l.c
index d0522953da..91b56e332c 100644
--- a/math/w_j1l.c
+++ b/math/w_j1l.c
@@ -1,76 +1,60 @@
-/* w_j1l.c -- long double version of w_j1.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper of j1l,y1l
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __j1l(long double x) /* wrapper j1l */
-#else
- long double __j1l(x) /* wrapper j1l */
- long double x;
-#endif
+
+/* wrapper j1l */
+long double
+__j1l (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_j1l(x);
-#else
- long double z;
- z = __ieee754_j1l(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
- if(fabsl(x)>X_TLOSS) {
- return __kernel_standard(x,x,236); /* j1(|x|>X_TLOSS) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsl (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ /* j1(|x|>X_TLOSS) */
+ return __kernel_standard (x, x, 236);
+
+ return __ieee754_j1l (x);
}
weak_alias (__j1l, j1l)
-#ifdef __STDC__
- long double __y1l(long double x) /* wrapper y1l */
-#else
- long double __y1l(x) /* wrapper y1l */
- long double x;
-#endif
+
+/* wrapper y1l */
+long double
+__y1l (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_y1l(x);
-#else
- long double z;
- z = __ieee754_y1l(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard(x,x,210);
- else
- /* d = zero/(x-x); */
- return __kernel_standard(x,x,211);
- }
- if(x>X_TLOSS) {
- return __kernel_standard(x,x,237); /* y1(x>X_TLOSS) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0L || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0L)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 211);
+ }
+ else if (x == 0.0L)
+ /* d = -one/(x-x) */
+ return __kernel_standard (x, x, 210);
+ else
+ /* y1(x>X_TLOSS) */
+ return __kernel_standard (x, x, 237);
+ }
+
+ return __ieee754_y1l (x);
}
weak_alias (__y1l, y1l)
diff --git a/math/w_jn.c b/math/w_jn.c
index 41ec8b32d4..36fb448163 100644
--- a/math/w_jn.c
+++ b/math/w_jn.c
@@ -1,98 +1,63 @@
-/* @(#)w_jn.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_jn.c,v 1.6 1995/05/10 20:49:19 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper jn(int n, double x), yn(int n, double x)
- * floating point Bessel's function of the 1st and 2nd kind
- * of order n
- *
- * Special cases:
- * y0(0)=y1(0)=yn(n,0) = -inf with division by zero signal;
- * y0(-ve)=y1(-ve)=yn(n,-ve) are NaN with invalid signal.
- * Note 2. About jn(n,x), yn(n,x)
- * For n=0, j0(x) is called,
- * for n=1, j1(x) is called,
- * for n<x, forward recursion us used starting
- * from values of j0(x) and j1(x).
- * for n>x, a continued fraction approximation to
- * j(n,x)/j(n-1,x) is evaluated and then backward
- * recursion is used starting from a supposed value
- * for j(n,x). The resulting value of j(0,x) is
- * compared with the actual value to correct the
- * supposed value of j(n,x).
- *
- * yn(n,x) is similar in all respects, except
- * that forward recursion is used for all
- * values of n>1.
- *
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double jn(int n, double x) /* wrapper jn */
-#else
- double jn(n,x) /* wrapper jn */
- double x; int n;
-#endif
+
+/* wrapper jn */
+double
+jn (int n, double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_jn(n,x);
-#else
- double z;
- z = __ieee754_jn(n,x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
- if(fabs(x)>X_TLOSS) {
- return __kernel_standard((double)n,x,38); /* jn(|x|>X_TLOSS,n) */
- } else
- return z;
-#endif
+ if (__builtin_expect (fabs (x) > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ /* jn(n,|x|>X_TLOSS) */
+ return __kernel_standard (n, x, 38);
+
+ return __ieee754_jn (n, x);
}
#ifdef NO_LONG_DOUBLE
strong_alias (jn, jnl)
#endif
-#ifdef __STDC__
- double yn(int n, double x) /* wrapper yn */
-#else
- double yn(n,x) /* wrapper yn */
- double x; int n;
-#endif
+/* wrapper yn */
+double
+yn (int n, double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_yn(n,x);
-#else
- double z;
- z = __ieee754_yn(n,x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x) ) return z;
- if(x <= 0.0){
- if(x==0.0)
- /* d= -one/(x-x); */
- return __kernel_standard((double)n,x,12);
- else
- /* d = zero/(x-x); */
- return __kernel_standard((double)n,x,13);
- }
- if(x>X_TLOSS) {
- return __kernel_standard((double)n,x,39); /* yn(x>X_TLOSS,n) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0 || x > X_TLOSS, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (n, x, 13);
+ }
+ else if (x == 0.0)
+ /* d = -one/(x-x) */
+ return __kernel_standard (n, x, 12);
+ else
+ /* yn(n,x>X_TLOSS) */
+ return __kernel_standard (n, x, 39);
+ }
+
+ return __ieee754_yn (n, x);
}
#ifdef NO_LONG_DOUBLE
strong_alias (yn, ynl)
diff --git a/math/w_jnf.c b/math/w_jnf.c
index 0b9a2aabb9..7b359558f1 100644
--- a/math/w_jnf.c
+++ b/math/w_jnf.c
@@ -1,71 +1,60 @@
-/* w_jnf.c -- float version of w_jn.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_jnf.c,v 1.3 1995/05/10 20:49:21 jtc Exp $";
-#endif
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float jnf(int n, float x) /* wrapper jnf */
-#else
- float jnf(n,x) /* wrapper jnf */
- float x; int n;
-#endif
+
+/* wrapper jnf */
+float
+jnf (int n, float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_jnf(n,x);
-#else
- float z;
- z = __ieee754_jnf(n,x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
- if(fabsf(x)>(float)X_TLOSS) {
- /* jn(|x|>X_TLOSS,n) */
- return (float)__kernel_standard((double)n,(double)x,138);
- } else
- return z;
-#endif
+ if (__builtin_expect (fabsf (x) > (float) X_TLOSS, 0)
+ && _LIB_VERSION != _IEEE_)
+ /* jn(n,|x|>X_TLOSS) */
+ return __kernel_standard_f (n, x, 138);
+
+ return __ieee754_jnf (n, x);
}
-#ifdef __STDC__
- float ynf(int n, float x) /* wrapper ynf */
-#else
- float ynf(n,x) /* wrapper ynf */
- float x; int n;
-#endif
+
+/* wrapper ynf */
+float
+ynf (int n, float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_ynf(n,x);
-#else
- float z;
- z = __ieee754_ynf(n,x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x) ) return z;
- if(x <= (float)0.0){
- if(x==(float)0.0)
- /* d= -one/(x-x); */
- return (float)__kernel_standard((double)n,(double)x,112);
- else
- /* d = zero/(x-x); */
- return (float)__kernel_standard((double)n,(double)x,113);
- }
- if(x>(float)X_TLOSS) {
- /* yn(x>X_TLOSS,n) */
- return (float)__kernel_standard((double)n,(double)x,139);
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0f || x > (float) X_TLOSS, 0)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x < 0.0f)
+ {
+ /* d = zero/(x-x) */
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (n, x, 113);
+ }
+ else if (x == 0.0)
+ /* d = -one/(x-x) */
+ return __kernel_standard_f (n, x, 112);
+ else
+ /* yn(n,x>X_TLOSS) */
+ return __kernel_standard_f (n, x, 139);
+ }
+
+ return __ieee754_ynf (n, x);
}
diff --git a/math/w_lgamma.c b/math/w_lgamma.c
index f76b552be0..17c546059d 100644
--- a/math/w_lgamma.c
+++ b/math/w_lgamma.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $";
-#endif
-
/* double lgamma(double x)
* Return the logarithm of the Gamma function of x.
*
@@ -23,31 +19,24 @@ static char rcsid[] = "$NetBSD: w_lgamma.c,v 1.6 1995/05/10 20:49:24 jtc Exp $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __lgamma(double x)
-#else
- double __lgamma(x)
- double x;
-#endif
+double
+__lgamma(double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_lgamma_r(x,&signgam);
-#else
- double y;
int local_signgam = 0;
- y = __ieee754_lgamma_r(x,&local_signgam);
- if (_LIB_VERSION != _ISOC_)
- /* ISO C99 does not define the global variable. */
- signgam = local_signgam;
- if(_LIB_VERSION == _IEEE_) return y;
- if(!__finite(y)&&__finite(x)) {
- if(__floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,15); /* lgamma pole */
- else
- return __kernel_standard(x,x,14); /* lgamma overflow */
- } else
- return y;
-#endif
+ double y = __ieee754_lgamma_r(x,
+ _LIB_VERSION != _ISOC_
+ /* ISO C99 does not define the
+ global variable. */
+ ? &signgam
+ : &local_signgam);
+ if(__builtin_expect(!__finite(y), 0)
+ && __finite(x) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard(x, x,
+ __floor(x)==x&&x<=0.0
+ ? 15 /* lgamma pole */
+ : 14); /* lgamma overflow */
+
+ return y;
}
weak_alias (__lgamma, lgamma)
strong_alias (__lgamma, __gamma)
diff --git a/math/w_lgamma_r.c b/math/w_lgamma_r.c
index bec2c6e20a..9d00f58ab7 100644
--- a/math/w_lgamma_r.c
+++ b/math/w_lgamma_r.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $";
-#endif
-
/*
* wrapper double lgamma_r(double x, int *signgamp)
*/
@@ -22,27 +18,18 @@ static char rcsid[] = "$NetBSD: w_lgamma_r.c,v 1.6 1995/05/10 20:49:27 jtc Exp $
#include <math_private.h>
-#ifdef __STDC__
- double __lgamma_r(double x, int *signgamp) /* wrapper lgamma_r */
-#else
- double __lgamma_r(x,signgamp) /* wrapper lgamma_r */
- double x; int *signgamp;
-#endif
+double
+__lgamma_r(double x, int *signgamp)
{
-#ifdef _IEEE_LIBM
- return __ieee754_lgamma_r(x,signgamp);
-#else
- double y;
- y = __ieee754_lgamma_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!__finite(y)&&__finite(x)) {
- if(__floor(x)==x&&x<=0.0)
- return __kernel_standard(x,x,15); /* lgamma pole */
- else
- return __kernel_standard(x,x,14); /* lgamma overflow */
- } else
- return y;
-#endif
+ double y = __ieee754_lgamma_r(x,signgamp);
+ if(__builtin_expect(!__finite(y), 0)
+ && __finite(x) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard(x, x,
+ __floor(x)==x&&x<=0.0
+ ? 15 /* lgamma pole */
+ : 14); /* lgamma overflow */
+
+ return y;
}
weak_alias (__lgamma_r, lgamma_r)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_lgammaf.c b/math/w_lgammaf.c
index 9747e9216a..f3166dfd33 100644
--- a/math/w_lgammaf.c
+++ b/math/w_lgammaf.c
@@ -13,40 +13,27 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgammaf.c,v 1.3 1995/05/10 20:49:30 jtc Exp $";
-#endif
-
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __lgammaf(float x)
-#else
- float __lgammaf(x)
- float x;
-#endif
+float
+__lgammaf(float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_lgammaf_r(x,&signgam);
-#else
- float y;
int local_signgam = 0;
- y = __ieee754_lgammaf_r(x,&local_signgam);
- if (_LIB_VERSION != _ISOC_)
- /* ISO C99 does not define the global variable. */
- signgam = local_signgam;
- if(_LIB_VERSION == _IEEE_) return y;
- if(!__finitef(y)&&__finitef(x)) {
- if(__floorf(x)==x&&x<=(float)0.0)
- /* lgamma pole */
- return (float)__kernel_standard((double)x,(double)x,115);
- else
- /* lgamma overflow */
- return (float)__kernel_standard((double)x,(double)x,114);
- } else
- return y;
-#endif
+ float y = __ieee754_lgammaf_r(x,
+ _LIB_VERSION != _ISOC_
+ /* ISO C99 does not define the
+ global variable. */
+ ? &signgam
+ : &local_signgam);
+ if(__builtin_expect(!__finitef(y), 0)
+ && __finitef(x) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f(x, x,
+ __floorf(x)==x&&x<=0.0f
+ ? 115 /* lgamma pole */
+ : 114); /* lgamma overflow */
+
+ return y;
}
weak_alias (__lgammaf, lgammaf)
strong_alias (__lgammaf, __gammaf)
diff --git a/math/w_lgammaf_r.c b/math/w_lgammaf_r.c
index 3758fa0d06..683fe72dc6 100644
--- a/math/w_lgammaf_r.c
+++ b/math/w_lgammaf_r.c
@@ -8,16 +8,12 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_lgammaf_r.c,v 1.3 1995/05/10 20:49:32 jtc Exp $";
-#endif
-
-/*
+/*
* wrapper float lgammaf_r(float x, int *signgamp)
*/
@@ -25,28 +21,17 @@ static char rcsid[] = "$NetBSD: w_lgammaf_r.c,v 1.3 1995/05/10 20:49:32 jtc Exp
#include <math_private.h>
-#ifdef __STDC__
- float __lgammaf_r(float x, int *signgamp) /* wrapper lgammaf_r */
-#else
- float __lgammaf_r(x,signgamp) /* wrapper lgammaf_r */
- float x; int *signgamp;
-#endif
+float
+__lgammaf_r(float x, int *signgamp)
{
-#ifdef _IEEE_LIBM
- return __ieee754_lgammaf_r(x,signgamp);
-#else
- float y;
- y = __ieee754_lgammaf_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!__finitef(y)&&__finitef(x)) {
- if(__floorf(x)==x&&x<=(float)0.0)
- /* lgamma pole */
- return (float)__kernel_standard((double)x,(double)x,115);
- else
- /* lgamma overflow */
- return (float)__kernel_standard((double)x,(double)x,114);
- } else
- return y;
-#endif
-}
+ float y = __ieee754_lgammaf_r(x,signgamp);
+ if(__builtin_expect(!__finitef(y), 0)
+ && __finitef(x) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f(x, x,
+ __floorf(x)==x&&x<=0.0f
+ ? 115 /* lgamma pole */
+ : 114); /* lgamma overflow */
+
+ return y;
+}
weak_alias (__lgammaf_r, lgammaf_r)
diff --git a/math/w_lgammal.c b/math/w_lgammal.c
index 0176243c4a..7df38e761b 100644
--- a/math/w_lgammal.c
+++ b/math/w_lgammal.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* long double lgammal(long double x)
* Return the logarithm of the Gamma function of x.
*
@@ -27,31 +23,24 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __lgammal(long double x)
-#else
- long double __lgammal(x)
- long double x;
-#endif
+long double
+__lgammal(long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_lgammal_r(x,&signgam);
-#else
- long double y;
int local_signgam = 0;
- y = __ieee754_lgammal_r(x,&local_signgam);
- if (_LIB_VERSION != _ISOC_)
- /* ISO C99 does not define the global variable. */
- signgam = local_signgam;
- if(_LIB_VERSION == _IEEE_) return y;
- if(!__finitel(y)&&__finitel(x)) {
- if(__floorl(x)==x&&x<=0.0)
- return __kernel_standard(x,x,215); /* lgamma pole */
- else
- return __kernel_standard(x,x,214); /* lgamma overflow */
- } else
- return y;
-#endif
+ long double y = __ieee754_lgammal_r(x,
+ _LIB_VERSION != _ISOC_
+ /* ISO C99 does not define the
+ global variable. */
+ ? &signgam
+ : &local_signgam);
+ if(__builtin_expect(!__finitel(y), 0)
+ && __finitel(x) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard(x, x,
+ __floorl(x)==x&&x<=0.0L
+ ? 215 /* lgamma pole */
+ : 214); /* lgamma overflow */
+
+ return y;
}
weak_alias (__lgammal, lgammal)
strong_alias (__lgammal, __gammal)
diff --git a/math/w_lgammal_r.c b/math/w_lgammal_r.c
index baa4f95393..ec3428486a 100644
--- a/math/w_lgammal_r.c
+++ b/math/w_lgammal_r.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/*
* wrapper long double lgammal_r(long double x, int *signgamp)
*/
@@ -26,27 +22,17 @@ static char rcsid[] = "$NetBSD: $";
#include <math_private.h>
-#ifdef __STDC__
- long double __lgammal_r(long double x, int *signgamp)
- /* wrapper lgamma_r */
-#else
- long double __lgammal_r(x,signgamp) /* wrapper lgamma_r */
- long double x; int *signgamp;
-#endif
+long double
+__lgammal_r(long double x, int *signgamp)
{
-#ifdef _IEEE_LIBM
- return __ieee754_lgammal_r(x,signgamp);
-#else
- long double y;
- y = __ieee754_lgammal_r(x,signgamp);
- if(_LIB_VERSION == _IEEE_) return y;
- if(!__finitel(y)&&__finitel(x)) {
- if(__floorl(x)==x&&x<=0.0)
- return __kernel_standard(x,x,215); /* lgamma pole */
- else
- return __kernel_standard(x,x,214); /* lgamma overflow */
- } else
- return y;
-#endif
+ long double y = __ieee754_lgammal_r(x,signgamp);
+ if(__builtin_expect(!__finitel(y), 0)
+ && __finitel(x) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard(x, x,
+ __floorl(x)==x&&x<=0.0
+ ? 215 /* lgamma pole */
+ : 214); /* lgamma overflow */
+
+ return y;
}
weak_alias (__lgammal_r, lgammal_r)
diff --git a/math/w_log.c b/math/w_log.c
index 7e9afdf2b8..b43af792c5 100644
--- a/math/w_log.c
+++ b/math/w_log.c
@@ -1,45 +1,46 @@
-/* @(#)w_log.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_log.c,v 1.6 1995/05/10 20:49:33 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper log(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __log(double x) /* wrapper log */
-#else
- double __log(x) /* wrapper log */
- double x;
-#endif
+/* wrapper log(x) */
+double
+__log (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_log(x);
-#else
- double z;
- z = __ieee754_log(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x) || x > 0.0) return z;
- if(x==0.0)
- return __kernel_standard(x,x,16); /* log(0) */
- else
- return __kernel_standard(x,x,17); /* log(x<0) */
-#endif
+ if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard (x, x, 16); /* log(0) */
+ }
+ else
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 17); /* log(x<0) */
+ }
+ }
+
+ return __ieee754_log (x);
}
weak_alias (__log, log)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_log10.c b/math/w_log10.c
index 08a65add59..75ae580c9b 100644
--- a/math/w_log10.c
+++ b/math/w_log10.c
@@ -1,48 +1,46 @@
-/* @(#)w_log10.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_log10.c,v 1.6 1995/05/10 20:49:35 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper log10(X)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __log10(double x) /* wrapper log10 */
-#else
- double __log10(x) /* wrapper log10 */
- double x;
-#endif
+/* wrapper log10(x) */
+double
+__log10 (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_log10(x);
-#else
- double z;
- z = __ieee754_log10(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- if(x<=0.0) {
- if(x==0.0)
- return __kernel_standard(x,x,18); /* log10(0) */
- else
- return __kernel_standard(x,x,19); /* log10(x<0) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard (x, x, 18); /* log10(0) */
+ }
+ else
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 19); /* log10(x<0) */
+ }
+ }
+
+ return __ieee754_log10 (x);
}
weak_alias (__log10, log10)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_log10f.c b/math/w_log10f.c
index f2ac540f6b..3426e2d05b 100644
--- a/math/w_log10f.c
+++ b/math/w_log10f.c
@@ -1,52 +1,45 @@
-/* w_log10f.c -- float version of w_log10.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_log10f.c,v 1.3 1995/05/10 20:49:37 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper log10f(X)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __log10f(float x) /* wrapper log10f */
-#else
- float __log10f(x) /* wrapper log10f */
- float x;
-#endif
+/* wrapper log10f(x) */
+float
+__log10f (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_log10f(x);
-#else
- float z;
- z = __ieee754_log10f(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- if(x<=(float)0.0) {
- if(x==(float)0.0)
- /* log10(0) */
- return (float)__kernel_standard((double)x,(double)x,118);
- else
- /* log10(x<0) */
- return (float)__kernel_standard((double)x,(double)x,119);
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0f)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard_f (x, x, 118); /* log10(0) */
+ }
+ else
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (x, x, 119); /* log10(x<0) */
+ }
+ }
+
+ return __ieee754_log10f (x);
}
weak_alias (__log10f, log10f)
diff --git a/math/w_log10l.c b/math/w_log10l.c
index a9a8ed27d8..6f81f3961a 100644
--- a/math/w_log10l.c
+++ b/math/w_log10l.c
@@ -1,51 +1,45 @@
-/* w_log10l.c -- long double version of w_log10.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper log10l(X)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __log10l(long double x) /* wrapper log10l */
-#else
- long double __log10l(x) /* wrapper log10l */
- long double x;
-#endif
+/* wrapper log10l(x) */
+long double
+__log10l (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_log10l(x);
-#else
- long double z;
- z = __ieee754_log10l(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- if(x<=0.0) {
- if(x==0.0)
- return __kernel_standard(x,x,218); /* log10(0) */
- else
- return __kernel_standard(x,x,219); /* log10(x<0) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0L)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard (x, x, 218); /* log10(0) */
+ }
+ else
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 219); /* log10(x<0) */
+ }
+ }
+
+ return __ieee754_log10l (x);
}
weak_alias (__log10l, log10l)
diff --git a/math/w_log2.c b/math/w_log2.c
index 90d2dff5d6..6d420438d4 100644
--- a/math/w_log2.c
+++ b/math/w_log2.c
@@ -1,29 +1,46 @@
-/*
- * wrapper log2(X)
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
+
+/* wrapper log2(x) */
double
-__log2 (double x) /* wrapper log2 */
+__log2 (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_log2 (x);
-#else
- double z;
- z = __ieee754_log2 (x);
- if (_LIB_VERSION == _IEEE_ || __isnan (x)) return z;
- if (x <= 0.0)
+ if (__builtin_expect (x <= 0.0, 0) && _LIB_VERSION != _IEEE_)
{
if (x == 0.0)
- return __kernel_standard (x, x, 48); /* log2 (0) */
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard (x, x, 48); /* log2(0) */
+ }
else
- return __kernel_standard (x, x, 49); /* log2 (x < 0) */
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 49); /* log2(x<0) */
+ }
}
- else
- return z;
-#endif
+
+ return __ieee754_log2 (x);
}
weak_alias (__log2, log2)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_log2f.c b/math/w_log2f.c
index 10d73ffd1b..7c64ad8b81 100644
--- a/math/w_log2f.c
+++ b/math/w_log2f.c
@@ -1,30 +1,45 @@
-/*
- * wrapper log2(X)
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
+
+/* wrapper log2f(x) */
float
-__log2f (float x) /* wrapper log2f */
+__log2f (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_log2f (x);
-#else
- float z;
- z = __ieee754_log2f (x);
- if (_LIB_VERSION == _IEEE_ || __isnanf (x)) return z;
- if (x <= 0.0f)
+ if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
{
- if (x == 0.0f)
- /* log2f (0) */
- return __kernel_standard ((double) x, (double) x, 148);
+ if (x == 0.0)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard_f (x, x, 148); /* log2(0) */
+ }
else
- /* log2f (x < 0) */
- return __kernel_standard ((double) x, (double) x, 149);
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (x, x, 149); /* log2(x<0) */
+ }
}
- else
- return z;
-#endif
+
+ return __ieee754_log2f (x);
}
weak_alias (__log2f, log2f)
diff --git a/math/w_log2l.c b/math/w_log2l.c
index ff7ba2621e..f589768b15 100644
--- a/math/w_log2l.c
+++ b/math/w_log2l.c
@@ -1,28 +1,45 @@
-/*
- * wrapper log2l(X)
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
+
+/* wrapper log2l(x) */
long double
-__log2l (long double x) /* wrapper log2l */
+__log2l (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_log2l (x);
-#else
- long double z;
- z = __ieee754_log2l (x);
- if (_LIB_VERSION == _IEEE_ || __isnanl (x)) return z;
- if (x <= 0.0)
+ if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
{
- if (x == 0.0)
- return __kernel_standard (x, x, 248); /* log2l (0) */
+ if (x == 0.0L)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard (x, x, 248); /* log2(0) */
+ }
else
- return __kernel_standard (x, x, 249); /* log2l (x < 0) */
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 249); /* log2(x<0) */
+ }
}
- else
- return z;
-#endif
+
+ return __ieee754_log2l (x);
}
weak_alias (__log2l, log2l)
diff --git a/math/w_logf.c b/math/w_logf.c
index 200a8b7133..52b9befd1b 100644
--- a/math/w_logf.c
+++ b/math/w_logf.c
@@ -1,49 +1,45 @@
-/* w_logf.c -- float version of w_log.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_logf.c,v 1.3 1995/05/10 20:49:40 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper logf(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __logf(float x) /* wrapper logf */
-#else
- float __logf(x) /* wrapper logf */
- float x;
-#endif
+/* wrapper logf(x) */
+float
+__logf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_logf(x);
-#else
- float z;
- z = __ieee754_logf(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x) || x > (float)0.0) return z;
- if(x==(float)0.0)
- /* logf(0) */
- return (float)__kernel_standard((double)x,(double)x,116);
- else
- /* logf(x<0) */
- return (float)__kernel_standard((double)x,(double)x,117);
-#endif
+ if (__builtin_expect (x <= 0.0f, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0f)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard_f (x, x, 116); /* log(0) */
+ }
+ else
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard_f (x, x, 117); /* log(x<0) */
+ }
+ }
+
+ return __ieee754_logf (x);
}
weak_alias (__logf, logf)
diff --git a/math/w_logl.c b/math/w_logl.c
index e869bce0f4..9f2bdf06cc 100644
--- a/math/w_logl.c
+++ b/math/w_logl.c
@@ -1,48 +1,45 @@
-/* w_logl.c -- long double version of w_log.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper logl(x)
- */
+ 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 <fenv.h>
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __logl(long double x) /* wrapper logl */
-#else
- long double __logl(x) /* wrapper logl */
- long double x;
-#endif
+/* wrapper logl(x) */
+long double
+__logl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_logl(x);
-#else
- long double z;
- z = __ieee754_logl(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x) || x > 0.0) return z;
- if(x==0.0)
- return __kernel_standard(x,x,216); /* log(0) */
- else
- return __kernel_standard(x,x,217); /* log(x<0) */
-#endif
+ if (__builtin_expect (x <= 0.0L, 0) && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0L)
+ {
+ feraiseexcept (FE_DIVBYZERO);
+ return __kernel_standard (x, x, 216); /* log(0) */
+ }
+ else
+ {
+ feraiseexcept (FE_INVALID);
+ return __kernel_standard (x, x, 217); /* log(x<0) */
+ }
+ }
+
+ return __ieee754_logl (x);
}
weak_alias (__logl, logl)
diff --git a/math/w_pow.c b/math/w_pow.c
index e0d2a92847..4993c232a6 100644
--- a/math/w_pow.c
+++ b/math/w_pow.c
@@ -1,67 +1,76 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+ 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.
-/* @(#)w_pow.c 5.2 93/10/01 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-/*
- * wrapper pow(x,y) return x**y
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __pow(double x, double y) /* wrapper pow */
-#else
- double __pow(x,y) /* wrapper pow */
- double x,y;
-#endif
+/* wrapper pow */
+double
+__pow (double x, double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_pow(x,y);
-#else
- double z;
- z=__ieee754_pow(x,y);
- if(_LIB_VERSION == _IEEE_|| __isnan(y)) return z;
- if(__isnan(x)) {
- if(y==0.0)
- return __kernel_standard(x,y,42); /* pow(NaN,0.0) */
- else
- return z;
- }
- if(x==0.0) {
- if(y==0.0)
- return __kernel_standard(x,y,20); /* pow(0.0,0.0) */
- if(__finite(y)&&y<0.0) {
- if (signbit (x) && signbit (z))
- return __kernel_standard(x,y,23); /* pow(-0.0,negative) */
+ double z = __ieee754_pow (x, y);
+ if (__builtin_expect (!__finite (z), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ {
+ if (__isnan (x))
+ {
+ if (y == 0.0)
+ /* pow(NaN,0.0) */
+ return __kernel_standard (x, y, 42);
+ }
+ else if (__finite (x) && __finite (y))
+ {
+ if (__isnan (z))
+ /* pow neg**non-int */
+ return __kernel_standard (x, y, 24);
+ else if (x == 0.0 && y < 0.0)
+ {
+ if (signbit (x) && signbit (z))
+ /* pow(-0.0,negative) */
+ return __kernel_standard (x, y, 23);
+ else
+ /* pow(+0.0,negative) */
+ return __kernel_standard (x, y, 43);
+ }
else
- return __kernel_standard(x,y,43); /* pow(+0.0,negative) */
+ /* pow overflow */
+ return __kernel_standard (x, y, 21);
}
- return z;
}
- if(!__finite(z)) {
- if(__finite(x)&&__finite(y)) {
- if(__isnan(z))
- return __kernel_standard(x,y,24); /* pow neg**non-int */
- else
- return __kernel_standard(x,y,21); /* pow overflow */
- }
+ }
+ else if (__builtin_expect (z == 0.0, 0) && __finite (x) && __finite (y)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0)
+ {
+ if (y == 0.0)
+ /* pow(0.0,0.0) */
+ return __kernel_standard (x, y, 20);
}
- if(z==0.0&&__finite(x)&&__finite(y))
- return __kernel_standard(x,y,22); /* pow underflow */
- return z;
-#endif
+ else
+ /* pow underflow */
+ return __kernel_standard (x, y, 22);
+ }
+
+ return z;
}
weak_alias (__pow, pow)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_powf.c b/math/w_powf.c
index 761e4d1328..c0406f4c12 100644
--- a/math/w_powf.c
+++ b/math/w_powf.c
@@ -1,77 +1,75 @@
-/* w_powf.c -- float version of w_pow.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_powf.c,v 1.3 1995/05/10 20:49:41 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper powf(x,y) return x**y
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __powf(float x, float y) /* wrapper powf */
-#else
- float __powf(x,y) /* wrapper powf */
- float x,y;
-#endif
+/* wrapper powf */
+float
+__powf (float x, float y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_powf(x,y);
-#else
- float z;
- z=__ieee754_powf(x,y);
- if(_LIB_VERSION == _IEEE_|| __isnanf(y)) return z;
- if(__isnanf(x)) {
- if(y==(float)0.0)
- /* powf(NaN,0.0) */
- return (float)__kernel_standard((double)x,(double)y,142);
- else
- return z;
- }
- if(x==(float)0.0) {
- if(y==(float)0.0)
- /* powf(0.0,0.0) */
- return (float)__kernel_standard((double)x,(double)y,120);
- if(__finitef(y)&&y<(float)0.0) {
- if (signbit (x) && signbit (z))
- /* powf(0.0,negative) */
- return (float)__kernel_standard((double)x,(double)y,123);
+ float z = __ieee754_powf (x, y);
+ if (__builtin_expect (!__finitef (z), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ {
+ if (__isnanf (x))
+ {
+ if (y == 0.0f)
+ /* pow(NaN,0.0) */
+ return __kernel_standard_f (x, y, 142);
+ }
+ else if (__finitef (x) && __finitef (y))
+ {
+ if (__isnanf (z))
+ /* pow neg**non-int */
+ return __kernel_standard_f (x, y, 124);
+ else if (x == 0.0f && y < 0.0f)
+ {
+ if (signbit (x) && signbit (z))
+ /* pow(-0.0,negative) */
+ return __kernel_standard_f (x, y, 123);
+ else
+ /* pow(+0.0,negative) */
+ return __kernel_standard_f (x, y, 143);
+ }
else
- return (float)__kernel_standard((double)x,(double)y,143);
+ /* pow overflow */
+ return __kernel_standard_f (x, y, 121);
}
- return z;
}
- if(!__finitef(z)) {
- if(__finitef(x)&&__finitef(y)) {
- if(__isnanf(z))
- /* powf neg**non-int */
- return (float)__kernel_standard((double)x,(double)y,124);
- else
- /* powf overflow */
- return (float)__kernel_standard((double)x,(double)y,121);
- }
+ }
+ else if (__builtin_expect (z == 0.0f, 0) && __finitef (x) && __finitef (y)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0f)
+ {
+ if (y == 0.0f)
+ /* pow(0.0,0.0) */
+ return __kernel_standard_f (x, y, 120);
}
- if(z==(float)0.0&&__finitef(x)&&__finitef(y))
- /* powf underflow */
- return (float)__kernel_standard((double)x,(double)y,122);
- return z;
-#endif
+ else
+ /* pow underflow */
+ return __kernel_standard_f (x, y, 122);
+ }
+
+ return z;
}
weak_alias (__powf, powf)
diff --git a/math/w_powl.c b/math/w_powl.c
index 0bb09518d5..1ad581ad94 100644
--- a/math/w_powl.c
+++ b/math/w_powl.c
@@ -1,68 +1,75 @@
-/* w_powl.c -- long double version of w_pow.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-/*
- * wrapper powl(x,y) return x**y
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __powl(long double x, long double y)/* wrapper powl */
-#else
- long double __powl(x,y) /* wrapper powl */
- long double x,y;
-#endif
+/* wrapper powl */
+long double
+__powl (long double x, long double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_powl(x,y);
-#else
- long double z;
- z=__ieee754_powl(x,y);
- if(_LIB_VERSION == _IEEE_|| __isnanl(y)) return z;
- if(__isnanl(x)) {
- if(y==0.0)
- return __kernel_standard(x,y,242); /* pow(NaN,0.0) */
- else
- return z;
- }
- if(x==0.0) {
- if(y==0.0)
- return __kernel_standard(x,y,220); /* pow(0.0,0.0) */
- if(__finitel(y)&&y<0.0) {
- if (signbit (x) && signbit (z))
- return __kernel_standard(x,y,223); /* pow(-0.0,negative) */
+ long double z = __ieee754_powl (x, y);
+ if (__builtin_expect (!__finitel (z), 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ {
+ if (__isnanl (x))
+ {
+ if (y == 0.0L)
+ /* pow(NaN,0.0) */
+ return __kernel_standard (x, y, 242);
+ }
+ else if (__finitel (x) && __finitel (y))
+ {
+ if (__isnanl (z))
+ /* pow neg**non-int */
+ return __kernel_standard (x, y, 224);
+ else if (x == 0.0L && y < 0.0L)
+ {
+ if (signbit (x) && signbit (z))
+ /* pow(-0.0,negative) */
+ return __kernel_standard (x, y, 223);
+ else
+ /* pow(+0.0,negative) */
+ return __kernel_standard (x, y, 243);
+ }
else
- return __kernel_standard(x,y,243); /* pow(+0.0,negative) */
+ /* pow overflow */
+ return __kernel_standard (x, y, 221);
}
- return z;
}
- if(!__finitel(z)) {
- if(__finitel(x)&&__finitel(y)) {
- if(__isnanl(z))
- return __kernel_standard(x,y,224); /* pow neg**non-int */
- else
- return __kernel_standard(x,y,221); /* pow overflow */
- }
+ }
+ else if (__builtin_expect (z == 0.0L, 0) && __finitel (x) && __finitel (y)
+ && _LIB_VERSION != _IEEE_)
+ {
+ if (x == 0.0L)
+ {
+ if (y == 0.0L)
+ /* pow(0.0,0.0) */
+ return __kernel_standard (x, y, 220);
}
- if(z==0.0&&__finitel(x)&&__finitel(y))
- return __kernel_standard(x,y,222); /* pow underflow */
- return z;
-#endif
+ else
+ /* pow underflow */
+ return __kernel_standard (x, y, 222);
+ }
+
+ return z;
}
weak_alias (__powl, powl)
diff --git a/math/w_remainder.c b/math/w_remainder.c
index 087bf2353b..524cbf582a 100644
--- a/math/w_remainder.c
+++ b/math/w_remainder.c
@@ -1,44 +1,36 @@
-/* @(#)w_remainder.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_remainder.c,v 1.6 1995/05/10 20:49:44 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper remainder(x,p)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __remainder(double x, double y) /* wrapper remainder */
-#else
- double __remainder(x,y) /* wrapper remainder */
- double x,y;
-#endif
+
+/* wrapper remainder */
+double
+__remainder (double x, double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_remainder(x,y);
-#else
- double z;
- z = __ieee754_remainder(x,y);
- if(_LIB_VERSION == _IEEE_ || __isnan(y) || __isnan(x)) return z;
- if(y==0.0 || __isinf(x))
- return __kernel_standard(x,y,28); /* remainder(x,0) */
- else
- return z;
-#endif
+ if (((__builtin_expect (y == 0.0, 0) && ! __isnan (x))
+ || (__builtin_expect (__isinf_ns (x), 0) && ! __isnan (y)))
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, y, 28); /* remainder domain */
+
+ return __ieee754_remainder (x, y);
}
weak_alias (__remainder, remainder)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_remainderf.c b/math/w_remainderf.c
index 95e6d302b9..9bddf6f619 100644
--- a/math/w_remainderf.c
+++ b/math/w_remainderf.c
@@ -1,47 +1,35 @@
-/* w_remainderf.c -- float version of w_remainder.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_remainderf.c,v 1.3 1995/05/10 20:49:46 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper remainderf(x,p)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __remainderf(float x, float y) /* wrapper remainder */
-#else
- float __remainderf(x,y) /* wrapper remainder */
- float x,y;
-#endif
+
+/* wrapper remainderf */
+float
+__remainderf (float x, float y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_remainderf(x,y);
-#else
- float z;
- z = __ieee754_remainderf(x,y);
- if(_LIB_VERSION == _IEEE_ || __isnanf(y) || __isnanf(x)) return z;
- if(y==(float)0.0 || __isinff(x))
- /* remainder(x,0) */
- return (float)__kernel_standard((double)x,(double)y,128);
- else
- return z;
-#endif
+ if (((__builtin_expect (y == 0.0f, 0) && ! __isnanf (x))
+ || (__builtin_expect (__isinf_nsf (x), 0) && ! __isnanf (y)))
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, y, 128); /* remainder domain */
+
+ return __ieee754_remainderf (x, y);
}
weak_alias (__remainderf, remainderf)
diff --git a/math/w_remainderl.c b/math/w_remainderl.c
index 36050f0de2..66a141328b 100644
--- a/math/w_remainderl.c
+++ b/math/w_remainderl.c
@@ -1,48 +1,35 @@
-/* w_remainderl.c -- long double version of w_remainder.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper remainderl(x,p)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __remainderl(long double x, long double y)
- /* wrapper remainderl */
-#else
- long double __remainderl(x,y) /* wrapper remainder */
- long double x,y;
-#endif
+
+/* wrapper remainderl */
+long double
+__remainderl (long double x, long double y)
{
-#ifdef _IEEE_LIBM
- return __ieee754_remainderl(x,y);
-#else
- long double z;
- z = __ieee754_remainderl(x,y);
- if(_LIB_VERSION == _IEEE_ || __isnanl(y) || __isnanl(x)) return z;
- if(y==0.0 || __isinfl(x))
- return __kernel_standard(x,y,228); /* remainder(x,0) */
- else
- return z;
-#endif
+ if (((__builtin_expect (y == 0.0L, 0) && ! __isnanl (x))
+ || (__builtin_expect (__isinf_nsl (x), 0) && ! __isnanl (y)))
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, y, 228); /* remainder domain */
+
+ return __ieee754_remainderl (x, y);
}
weak_alias (__remainderl, remainderl)
diff --git a/math/w_scalb.c b/math/w_scalb.c
index 830f387644..91f3658a67 100644
--- a/math/w_scalb.c
+++ b/math/w_scalb.c
@@ -1,62 +1,54 @@
-/* @(#)w_scalb.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_scalb.c,v 1.6 1995/05/10 20:49:48 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper scalb(double x, double fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
+ 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 <errno.h>
#include <math.h>
#include <math_private.h>
-#include <errno.h>
-#ifdef __STDC__
-#ifdef _SCALB_INT
- double __scalb(double x, int fn) /* wrapper scalb */
-#else
- double __scalb(double x, double fn) /* wrapper scalb */
-#endif
-#else
- double __scalb(x,fn) /* wrapper scalb */
-#ifdef _SCALB_INT
- double x; int fn;
-#else
- double x,fn;
-#endif
-#endif
+static double
+__attribute__ ((noinline))
+sysv_scalb (double x, double fn)
{
-#ifdef _IEEE_LIBM
- return __ieee754_scalb(x,fn);
-#else
- double z;
- z = __ieee754_scalb(x,fn);
- if(_LIB_VERSION != _SVID_) return z;
- if(!(__finite(z)||__isnan(z))&&__finite(x)) {
- return __kernel_standard(x,(double)fn,32); /* scalb overflow */
- }
- if(z==0.0&&z!=x) {
- return __kernel_standard(x,(double)fn,33); /* scalb underflow */
- }
-#ifndef _SCALB_INT
- if(!__finite(fn)) __set_errno (ERANGE);
-#endif
- return z;
-#endif
+ double z = __ieee754_scalb (x, fn);
+
+ if (__builtin_expect (__isinf (z), 0))
+ {
+ if (__finite (x))
+ return __kernel_standard (x, fn, 32); /* scalb overflow */
+ else
+ __set_errno (ERANGE);
+ }
+ else if (__builtin_expect (z == 0.0, 0) && z != x)
+ return __kernel_standard (x, fn, 33); /* scalb underflow */
+
+ return z;
+}
+
+
+/* Wrapper scalb */
+double
+__scalb (double x, double fn)
+{
+ return (__builtin_expect (_LIB_VERSION == _SVID_, 0)
+ ? sysv_scalb (x, fn)
+ : __ieee754_scalb (x, fn));
}
weak_alias (__scalb, scalb)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_scalbf.c b/math/w_scalbf.c
index bd92cc1c00..b8ee3f1b46 100644
--- a/math/w_scalbf.c
+++ b/math/w_scalbf.c
@@ -1,66 +1,53 @@
-/* w_scalbf.c -- float version of w_scalb.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_scalbf.c,v 1.3 1995/05/10 20:49:50 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper scalbf(float x, float fn) is provide for
- * passing various standard test suite. One
- * should use scalbn() instead.
- */
+ 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 <errno.h>
#include <math.h>
#include <math_private.h>
-#include <errno.h>
-#ifdef __STDC__
-#ifdef _SCALB_INT
- float __scalbf(float x, int fn) /* wrapper scalbf */
-#else
- float __scalbf(float x, float fn) /* wrapper scalbf */
-#endif
-#else
- float __scalbf(x,fn) /* wrapper scalbf */
-#ifdef _SCALB_INT
- float x; int fn;
-#else
- float x,fn;
-#endif
-#endif
+static float
+__attribute__ ((noinline))
+sysv_scalbf (float x, float fn)
+{
+ float z = __ieee754_scalbf (x, fn);
+
+ if (__builtin_expect (__isinff (z), 0))
+ {
+ if (__finitef (x))
+ return __kernel_standard_f (x, fn, 132); /* scalb overflow */
+ else
+ __set_errno (ERANGE);
+ }
+ else if (__builtin_expect (z == 0.0f, 0) && z != x)
+ return __kernel_standard_f (x, fn, 133); /* scalb underflow */
+
+ return z;
+}
+
+
+/* Wrapper scalbf */
+float
+__scalbf (float x, float fn)
{
-#ifdef _IEEE_LIBM
- return __ieee754_scalbf(x,fn);
-#else
- float z;
- z = __ieee754_scalbf(x,fn);
- if(_LIB_VERSION != _SVID_) return z;
- if(!(__finitef(z)||__isnanf(z))&&__finitef(x)) {
- /* scalbf overflow */
- return (float)__kernel_standard((double)x,(double)fn,132);
- }
- if(z==(float)0.0&&z!=x) {
- /* scalbf underflow */
- return (float)__kernel_standard((double)x,(double)fn,133);
- }
-#ifndef _SCALB_INT
- if(!__finitef(fn)) __set_errno (ERANGE);
-#endif
- return z;
-#endif
+ return (__builtin_expect (_LIB_VERSION == _SVID_, 0)
+ ? sysv_scalbf (x, fn)
+ : __ieee754_scalbf (x, fn));
}
weak_alias (__scalbf, scalbf)
diff --git a/math/w_scalbl.c b/math/w_scalbl.c
index eb118b19b7..33fc725e5f 100644
--- a/math/w_scalbl.c
+++ b/math/w_scalbl.c
@@ -1,65 +1,53 @@
-/* w_scalbl.c -- long double version of w_scalb.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper scalbl(long double x, long double fn) is provide for
- * passing various standard test suite. One
- * should use scalbnl() instead.
- */
+ 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 <errno.h>
#include <math.h>
#include <math_private.h>
-#include <errno.h>
-#ifdef __STDC__
-#ifdef _SCALB_INT
- long double __scalbl(long double x, int fn) /* wrapper scalbl */
-#else
- long double __scalbl(long double x, long double fn)/* wrapper scalbl */
-#endif
-#else
- long double __scalbl(x,fn) /* wrapper scalbl */
-#ifdef _SCALB_INT
- long double x; int fn;
-#else
- long double x,fn;
-#endif
-#endif
+static long double
+__attribute__ ((noinline))
+sysv_scalbl (long double x, long double fn)
+{
+ long double z = __ieee754_scalbl (x, fn);
+
+ if (__builtin_expect (__isinfl (z), 0))
+ {
+ if (__finitel (x))
+ return __kernel_standard (x, fn, 232); /* scalb overflow */
+ else
+ __set_errno (ERANGE);
+ }
+ else if (__builtin_expect (z == 0.0L, 0) && z != x)
+ return __kernel_standard (x, fn, 233); /* scalb underflow */
+
+ return z;
+}
+
+
+/* Wrapper scalbl */
+long double
+__scalbl (long double x, long double fn)
{
-#ifdef _IEEE_LIBM
- return __ieee754_scalbl(x,fn);
-#else
- long double z;
- z = __ieee754_scalbl(x,fn);
- if(_LIB_VERSION != _SVID_) return z;
- if(!(__finitel(z)||__isnanl(z))&&__finitel(x)) {
- return __kernel_standard(x,(double)fn,232); /* scalb overflow */
- }
- if(z==0.0&&z!=x) {
- return __kernel_standard(x,(double)fn,233); /* scalb underflow */
- }
-#ifndef _SCALB_INT
- if(!__finitel(fn)) __set_errno (ERANGE);
-#endif
- return z;
-#endif
+ return (__builtin_expect (_LIB_VERSION == _SVID_, 0)
+ ? sysv_scalbl (x, fn)
+ : __ieee754_scalbl (x, fn));
}
weak_alias (__scalbl, scalbl)
diff --git a/math/w_sinh.c b/math/w_sinh.c
index c95e154fc3..34ad2d8624 100644
--- a/math/w_sinh.c
+++ b/math/w_sinh.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $";
-#endif
-
/*
* wrapper sinh(x)
*/
@@ -21,24 +17,15 @@ static char rcsid[] = "$NetBSD: w_sinh.c,v 1.6 1995/05/10 20:49:51 jtc Exp $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __sinh(double x) /* wrapper sinh */
-#else
- double __sinh(x) /* wrapper sinh */
- double x;
-#endif
+double
+__sinh (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_sinh(x);
-#else
- double z;
- z = __ieee754_sinh(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!__finite(z)&&__finite(x)) {
- return __kernel_standard(x,x,25); /* sinh overflow */
- } else
- return z;
-#endif
+ double z = __ieee754_sinh (x);
+ if (__builtin_expect (!__finite (z), 0) && __finite (x)
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 25); /* sinh overflow */
+
+ return z;
}
weak_alias (__sinh, sinh)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_sinhf.c b/math/w_sinhf.c
index c3555999ed..1347e91728 100644
--- a/math/w_sinhf.c
+++ b/math/w_sinhf.c
@@ -8,40 +8,26 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sinhf.c,v 1.3 1995/05/10 20:49:54 jtc Exp $";
-#endif
-
-/*
+/*
* wrapper sinhf(x)
*/
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __sinhf(float x) /* wrapper sinhf */
-#else
- float __sinhf(x) /* wrapper sinhf */
- float x;
-#endif
+float
+__sinhf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_sinhf(x);
-#else
- float z;
- z = __ieee754_sinhf(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!__finitef(z)&&__finitef(x)) {
- /* sinhf overflow */
- return (float)__kernel_standard((double)x,(double)x,125);
- } else
- return z;
-#endif
+ float z = __ieee754_sinhf (x);
+ if (__builtin_expect (!__finitef (z), 0) && __finitef (x)
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 125); /* sinhf overflow */
+
+ return z;
}
weak_alias (__sinhf, sinhf)
diff --git a/math/w_sinhl.c b/math/w_sinhl.c
index da7de8185b..5e65cf9b95 100644
--- a/math/w_sinhl.c
+++ b/math/w_sinhl.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/*
* wrapper sinhl(x)
*/
@@ -25,23 +21,14 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __sinhl(long double x) /* wrapper sinhl */
-#else
- long double __sinhl(x) /* wrapper sinhl */
- long double x;
-#endif
+long double
+__sinhl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_sinhl(x);
-#else
- long double z;
- z = __ieee754_sinhl(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(!__finitel(z)&&__finitel(x)) {
- return __kernel_standard(x,x,225); /* sinh overflow */
- } else
- return z;
-#endif
+ long double z = __ieee754_sinhl (x);
+ if (__builtin_expect (!__finitel (z), 0) && __finitel (x)
+ && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 225); /* sinh overflow */
+
+ return z;
}
weak_alias (__sinhl, sinhl)
diff --git a/math/w_sqrt.c b/math/w_sqrt.c
index c281bf40af..8a435ef48e 100644
--- a/math/w_sqrt.c
+++ b/math/w_sqrt.c
@@ -1,44 +1,34 @@
-/* @(#)w_sqrt.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sqrt.c,v 1.6 1995/05/10 20:49:55 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper sqrt(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __sqrt(double x) /* wrapper sqrt */
-#else
- double __sqrt(x) /* wrapper sqrt */
- double x;
-#endif
+
+/* wrapper sqrt */
+double
+__sqrt (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_sqrt(x);
-#else
- double z;
- z = __ieee754_sqrt(x);
- if(_LIB_VERSION == _IEEE_ || __isnan(x)) return z;
- if(x<0.0) {
- return __kernel_standard(x,x,26); /* sqrt(negative) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x < 0.0, 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 26); /* sqrt(negative) */
+
+ return __ieee754_sqrt (x);
}
weak_alias (__sqrt, sqrt)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_sqrtf.c b/math/w_sqrtf.c
index 854d1cded2..fc088b6222 100644
--- a/math/w_sqrtf.c
+++ b/math/w_sqrtf.c
@@ -1,47 +1,33 @@
-/* w_sqrtf.c -- float version of w_sqrt.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_sqrtf.c,v 1.3 1995/05/10 20:49:59 jtc Exp $";
-#endif
+ 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.
-/*
- * wrapper sqrtf(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __sqrtf(float x) /* wrapper sqrtf */
-#else
- float sqrt(x) /* wrapper sqrtf */
- float x;
-#endif
+
+/* wrapper sqrtf */
+float
+__sqrtf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_sqrtf(x);
-#else
- float z;
- z = __ieee754_sqrtf(x);
- if(_LIB_VERSION == _IEEE_ || __isnanf(x)) return z;
- if(x<(float)0.0) {
- /* sqrtf(negative) */
- return (float)__kernel_standard((double)x,(double)x,126);
- } else
- return z;
-#endif
+ if (__builtin_expect (x < 0.0f, 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 126); /* sqrt(negative) */
+
+ return __ieee754_sqrtf (x);
}
weak_alias (__sqrtf, sqrtf)
diff --git a/math/w_sqrtl.c b/math/w_sqrtl.c
index 43770eeb39..0c446295c6 100644
--- a/math/w_sqrtl.c
+++ b/math/w_sqrtl.c
@@ -1,47 +1,33 @@
-/* w_sqrtl.c -- long double version of w_sqrt.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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.
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
+ 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.
-/*
- * wrapper sqrtl(x)
- */
+ 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 <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __sqrtl(long double x) /* wrapper sqrtl */
-#else
- long double __sqrtl(x) /* wrapper sqrtl */
- long double x;
-#endif
+
+/* wrapper sqrtl */
+long double
+__sqrtl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_sqrtl(x);
-#else
- long double z;
- z = __ieee754_sqrtl(x);
- if(_LIB_VERSION == _IEEE_ || __isnanl(x)) return z;
- if(x<0.0) {
- return __kernel_standard(x,x,226); /* sqrt(negative) */
- } else
- return z;
-#endif
+ if (__builtin_expect (x < 0.0L, 0) && _LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 226); /* sqrt(negative) */
+
+ return __ieee754_sqrtl (x);
}
weak_alias (__sqrtl, sqrtl)
diff --git a/math/w_tgamma.c b/math/w_tgamma.c
index 14d6855829..976b5fb95c 100644
--- a/math/w_tgamma.c
+++ b/math/w_tgamma.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $";
-#endif
-
/* double gamma(double x)
* Return the logarithm of the Gamma function of x or the Gamma function of x,
* depending on the library mode.
@@ -22,23 +18,14 @@ static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- double __tgamma(double x)
-#else
- double __tgamma(x)
- double x;
-#endif
+double
+__tgamma(double x)
{
- double y;
int local_signgam;
- y = __ieee754_gamma_r(x,&local_signgam);
- if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
- return y;
-#else
- if(_LIB_VERSION == _IEEE_) return y;
+ double y = __ieee754_gamma_r(x,&local_signgam);
- if(!__finite(y)&&__finite(x)) {
+ if(__builtin_expect(!__finite(y), 0)&&__finite(x)
+ && _LIB_VERSION != _IEEE_) {
if (x == 0.0)
return __kernel_standard(x,x,50); /* tgamma pole */
else if(__floor(x)==x&&x<0.0)
@@ -46,8 +33,7 @@ static char rcsid[] = "$NetBSD: w_gamma.c,v 1.7 1995/11/20 22:06:43 jtc Exp $";
else
return __kernel_standard(x,x,40); /* tgamma overflow */
}
- return y;
-#endif
+ return local_signgam < 0 ? -y : y;
}
weak_alias (__tgamma, tgamma)
#ifdef NO_LONG_DOUBLE
diff --git a/math/w_tgammaf.c b/math/w_tgammaf.c
index b1e72c653d..48141354e2 100644
--- a/math/w_tgammaf.c
+++ b/math/w_tgammaf.c
@@ -13,41 +13,27 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_gammaf.c,v 1.4 1995/11/20 22:06:48 jtc Exp $";
-#endif
-
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- float __tgammaf(float x)
-#else
- float __tgammaf(x)
- float x;
-#endif
+float
+__tgammaf(float x)
{
- float y;
int local_signgam;
- y = __ieee754_gammaf_r(x,&local_signgam);
- if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
- return y;
-#else
- if(_LIB_VERSION == _IEEE_) return y;
+ float y = __ieee754_gammaf_r(x,&local_signgam);
- if(!__finitef(y)&&__finitef(x)) {
+ if(__builtin_expect(!__finitef(y), 0) && __finitef(x)
+ && _LIB_VERSION != _IEEE_) {
if (x == (float)0.0)
/* tgammaf pole */
- return (float)__kernel_standard((double)x,(double)x,150);
- else if(__floorf(x)==x&&x<(float)0.0)
+ return __kernel_standard_f(x, x, 150);
+ else if(__floorf(x)==x&&x<0.0f)
/* tgammaf domain */
- return (float)__kernel_standard((double)x,(double)x,141);
+ return __kernel_standard_f(x, x, 141);
else
/* tgammaf overflow */
- return (float)__kernel_standard((double)x,(double)x,140);
+ return __kernel_standard_f(x, x, 140);
}
- return y;
-#endif
+ return local_signgam < 0 ? - y : y;
}
weak_alias (__tgammaf, tgammaf)
diff --git a/math/w_tgammal.c b/math/w_tgammal.c
index 63379a8575..6910f923aa 100644
--- a/math/w_tgammal.c
+++ b/math/w_tgammal.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* long double gammal(double x)
* Return the Gamma function of x.
*/
@@ -25,31 +21,21 @@ static char rcsid[] = "$NetBSD: $";
#include <math.h>
#include <math_private.h>
-#ifdef __STDC__
- long double __tgammal(long double x)
-#else
- long double __tgammal(x)
- long double x;
-#endif
+long double
+__tgammal(long double x)
{
- long double y;
int local_signgam;
- y = __ieee754_gammal_r(x,&local_signgam);
- if (local_signgam < 0) y = -y;
-#ifdef _IEEE_LIBM
- return y;
-#else
- if(_LIB_VERSION == _IEEE_) return y;
+ long double y = __ieee754_gammal_r(x,&local_signgam);
- if(!__finitel(y)&&__finitel(x)) {
+ if(__builtin_expect(!__finitel(y), 0) && __finitel(x)
+ && _LIB_VERSION != _IEEE_) {
if(x==0.0)
return __kernel_standard(x,x,250); /* tgamma pole */
- else if(__floorl(x)==x&&x<0.0)
+ else if(__floorl(x)==x&&x<0.0L)
return __kernel_standard(x,x,241); /* tgamma domain */
else
return __kernel_standard(x,x,240); /* tgamma overflow */
}
- return y;
-#endif
+ return local_signgam < 0 ? - y : y;
}
weak_alias (__tgammal, tgammal)
diff --git a/misc/bits/select2.h b/misc/bits/select2.h
index 37c4827f1c..a7ce1b47e8 100644
--- a/misc/bits/select2.h
+++ b/misc/bits/select2.h
@@ -27,7 +27,8 @@ extern unsigned long int __fdelt_warn (unsigned long int __d)
__warnattr ("bit outside of fd_set selected");
#undef __FD_ELT
#define __FD_ELT(d) \
- ({ unsigned long int __d = d; \
+ __extension__ \
+ ({ unsigned long int __d = (d); \
(__builtin_constant_p (__d) \
? (__d >= __FD_SETSIZE \
? __fdelt_warn (__d) : (__d / __NFDBITS)) \
diff --git a/misc/getpass.c b/misc/getpass.c
index 5290c3c7d3..bdfa2c807a 100644
--- a/misc/getpass.c
+++ b/misc/getpass.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-1999,2001,2003,2004,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1992-1999,2001,2003-2005,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,7 +57,7 @@ getpass (prompt)
/* Try to write to and read from the terminal if we can.
If we can't open the terminal, use stderr and stdin. */
- in = fopen ("/dev/tty", "w+c");
+ in = fopen ("/dev/tty", "w+ce");
if (in == NULL)
{
in = stdin;
diff --git a/misc/getttyent.c b/misc/getttyent.c
index 6d789c4e2e..b1e6376fb6 100644
--- a/misc/getttyent.c
+++ b/misc/getttyent.c
@@ -190,7 +190,7 @@ setttyent()
if (tf) {
(void)rewind(tf);
return (1);
- } else if ((tf = fopen(_PATH_TTYS, "rc"))) {
+ } else if ((tf = fopen(_PATH_TTYS, "rce"))) {
/* We do the locking ourselves. */
__fsetlocking (tf, FSETLOCKING_BYCALLER);
return (1);
diff --git a/misc/getusershell.c b/misc/getusershell.c
index 0e4f79619f..2e8d97e65c 100644
--- a/misc/getusershell.c
+++ b/misc/getusershell.c
@@ -104,7 +104,7 @@ initshells()
shells = NULL;
free(strings);
strings = NULL;
- if ((fp = fopen(_PATH_SHELLS, "rc")) == NULL)
+ if ((fp = fopen(_PATH_SHELLS, "rce")) == NULL)
goto init_okshells_noclose;
if (fstat64(fileno(fp), &statb) == -1) {
init_okshells:
diff --git a/misc/mntent_r.c b/misc/mntent_r.c
index 0e9835c61e..3b5418a193 100644
--- a/misc/mntent_r.c
+++ b/misc/mntent_r.c
@@ -38,10 +38,10 @@ FILE *
__setmntent (const char *file, const char *mode)
{
/* Extend the mode parameter with "c" to disable cancellation in the
- I/O functions. */
+ I/O functions and "e" to set FD_CLOEXEC. */
size_t modelen = strlen (mode);
- char newmode[modelen + 2];
- memcpy (mempcpy (newmode, mode, modelen), "c", 2);
+ char newmode[modelen + 3];
+ memcpy (mempcpy (newmode, mode, modelen), "ce", 3);
FILE *result = fopen (file, newmode);
if (result != NULL)
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index 165a94a64b..c856e87a07 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -38,20 +38,33 @@
#ifdef __GNUC__
+/* All functions, except those with callbacks or those that
+ synchronize memory, are leaf functions. */
+# if __GNUC_PREREQ (4, 6) && !defined _LIBC
+# define __LEAF , __leaf__
+# define __LEAF_ATTR __attribute__ ((__leaf__))
+# else
+# define __LEAF
+# define __LEAF_ATTR
+# endif
+
/* GCC can always grok prototypes. For C++ programs we add throw()
to help it optimize the function calls. But this works only with
gcc 2.8.x and egcs. For gcc 3.2 and up we even mark C functions
as non-throwing using a function attribute since programs can use
the -fexceptions options for C code as well. */
# if !defined __cplusplus && __GNUC_PREREQ (3, 3)
-# define __THROW __attribute__ ((__nothrow__))
-# define __NTH(fct) __attribute__ ((__nothrow__)) fct
+# define __THROW __attribute__ ((__nothrow__ __LEAF))
+# define __THROWNL __attribute__ ((__nothrow__))
+# define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
# else
# if defined __cplusplus && __GNUC_PREREQ (2,8)
# define __THROW throw ()
-# define __NTH(fct) fct throw ()
+# define __THROWNL throw ()
+# define __NTH(fct) __LEAF_ATTR fct throw ()
# else
# define __THROW
+# define __THROWNL
# define __NTH(fct) fct
# endif
# endif
@@ -61,6 +74,7 @@
# define __inline /* No inline functions. */
# define __THROW
+# define __THROWNL
# define __NTH(fct) fct
# define __const const
@@ -178,9 +192,13 @@
# ifdef __cplusplus
# define __REDIRECT_NTH(name, proto, alias) \
name proto __THROW __asm__ (__ASMNAME (#alias))
+# define __REDIRECT_NTHNL(name, proto, alias) \
+ name proto __THROWNL __asm__ (__ASMNAME (#alias))
# else
# define __REDIRECT_NTH(name, proto, alias) \
name proto __asm__ (__ASMNAME (#alias)) __THROW
+# define __REDIRECT_NTHNL(name, proto, alias) \
+ name proto __asm__ (__ASMNAME (#alias)) __THROWNL
# endif
# define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
# define __ASMNAME2(prefix, cname) __STRING (prefix) cname
diff --git a/nis/nis_file.c b/nis/nis_file.c
index 566f30c48c..dc382424be 100644
--- a/nis/nis_file.c
+++ b/nis/nis_file.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 1999, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 1999, 2004, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@@ -31,7 +31,7 @@ static void *
read_nis_obj (const char *name, iofct_t readfct, freefct_t freefct,
size_t objsize)
{
- FILE *in = fopen (name, "rc");
+ FILE *in = fopen (name, "rce");
if (in == NULL)
return NULL;
@@ -59,7 +59,7 @@ read_nis_obj (const char *name, iofct_t readfct, freefct_t freefct,
static bool_t
write_nis_obj (const char *name, const void *obj, iofct_t writefct)
{
- FILE *out = fopen (name, "w");
+ FILE *out = fopen (name, "wce");
if (out == NULL)
return FALSE;
diff --git a/nis/nis_findserv.c b/nis/nis_findserv.c
index b1a9aa7e01..b02c63bdbc 100644
--- a/nis/nis_findserv.c
+++ b/nis/nis_findserv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2000, 2001, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000, 2001, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
@@ -175,7 +175,9 @@ __nis_findfastest_with_timeout (dir_binding *bind,
(xdrproc_t) xdr_void, (caddr_t) 0,
*timeout);
if (RPC_SUCCESS == rc) {
- fastest = *((u_int32_t *) (cu->cu_inbuf)) - xid_seed;
+ u_int32_t val;
+ memcpy (&val, cu->cu_inbuf, sizeof (u_int32_t));
+ fastest = val - xid_seed;
if (fastest < pings_count) {
bind->server_used = pings[fastest].server_nr;
bind->current_ep = pings[fastest].server_ep;
diff --git a/nis/nis_table.c b/nis/nis_table.c
index aba2897320..c628ed63c5 100644
--- a/nis/nis_table.c
+++ b/nis/nis_table.c
@@ -101,8 +101,8 @@ __create_ib_request (const_nis_name name, unsigned int flags)
}
*val++ = '\0';
if (search_len + 1 >= size)
- {
- size += 1;
+ {
+ size += 1;
nis_attr *newp = realloc (search_val, size * sizeof (nis_attr));
if (newp == NULL)
goto free_null;
@@ -279,8 +279,8 @@ nis_list (const_nis_name name, unsigned int flags,
&dir, &bptr, flags & ~MASTER_ONLY);
if (status != NIS_SUCCESS)
{
- NIS_RES_STATUS (res) = status;
- goto fail3;
+ NIS_RES_STATUS (res) = status;
+ goto fail3;
}
while (__nisbind_connect (&bptr) != NIS_SUCCESS)
@@ -368,12 +368,12 @@ nis_list (const_nis_name name, unsigned int flags,
else if ((flags & FOLLOW_PATH)
&& NIS_RES_STATUS (res) == NIS_PARTIAL)
{
- clnt_status = __follow_path (&tablepath, &tableptr, ibreq,
- &bptr);
- if (clnt_status != NIS_SUCCESS)
+ enum nis_error err = __follow_path (&tablepath, &tableptr,
+ ibreq, &bptr);
+ if (err != NIS_SUCCESS)
{
- if (clnt_status == NIS_NOMEMORY)
- NIS_RES_STATUS (res) = clnt_status;
+ if (err == NIS_NOMEMORY)
+ NIS_RES_STATUS (res) = err;
++done;
}
else
@@ -428,15 +428,15 @@ nis_list (const_nis_name name, unsigned int flags,
NIS_RES_STATUS (allres) = NIS_RES_STATUS (res);
xdr_free ((xdrproc_t) _xdr_nis_result, (char *) res);
}
- clnt_status = __follow_path (&tablepath, &tableptr, ibreq,
- &bptr);
- if (clnt_status != NIS_SUCCESS)
+ enum nis_error err = __follow_path (&tablepath, &tableptr,
+ ibreq, &bptr);
+ if (err != NIS_SUCCESS)
{
/* Prepare for the nis_freeresult call. */
memset (res, '\0', sizeof (*res));
- if (clnt_status == NIS_NOMEMORY)
- NIS_RES_STATUS (allres) = clnt_status;
+ if (err == NIS_NOMEMORY)
+ NIS_RES_STATUS (allres) = err;
++done;
}
}
@@ -453,12 +453,12 @@ nis_list (const_nis_name name, unsigned int flags,
++done;
else
{
- clnt_status
+ enum nis_error err
= __follow_path (&tablepath, &tableptr, ibreq, &bptr);
- if (clnt_status != NIS_SUCCESS)
+ if (err != NIS_SUCCESS)
{
- if (clnt_status == NIS_NOMEMORY)
- NIS_RES_STATUS (res) = clnt_status;
+ if (err == NIS_NOMEMORY)
+ NIS_RES_STATUS (res) = err;
++done;
}
}
diff --git a/nis/nss-default.c b/nis/nss-default.c
index d7a3293a49..e4dc3d6af1 100644
--- a/nis/nss-default.c
+++ b/nis/nss-default.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1996,2001,2004,2006,2007,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1996,2001,2004,2006,2007,2010,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,7 +58,7 @@ static void
init (void)
{
int saved_errno = errno;
- FILE *fp = fopen (default_nss, "rc");
+ FILE *fp = fopen (default_nss, "rce");
if (fp != NULL)
{
char *line = NULL;
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index ae48299a41..e8ff69ab00 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,74 @@
+2011-12-22 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/pthread/gai_misc.h (__gai_create_helper_thread): Use
+ __pthread_get_minstack.
+ * sysdeps/unix/sysv/linux/mq_notify.c (init_mq_netlink): Likewise.
+
+ [BZ #13088]
+ * sysdeps/unix/sysv/linux/timer_routines.c: Get minimum stack size
+ through __pthread_get_minstack.
+ * nptl-init.c (__pthread_initialize_minimal_internal): Get page size
+ directly from _rtld_global_ro.
+ (__pthread_get_minstack): New function.
+ * pthreadP.h: Declare __pthread_get_minstack.
+ * Versions (libpthread) [GLIBC_PRIVATE]: Add __pthread_get_minstack.
+
+2011-12-21 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13515]
+ * sysdeps/unix/sysv/linux/pthread_getname.c (pthread_getname_np):
+ Correct reading name from file.
+
+2011-12-14 Carlos O'Donell <carlos@systemhalted.org>
+
+ * allocatestack.c (allocate_stack): Return errno on failure.
+
+2011-12-14 Jeff Law <law@redhat.com>
+
+ [BZ #5245]
+ * pthread_create.c (__pthread_create_2_1): Translate ENOMEM to EAGAIN.
+
+2011-11-28 Andreas Schwab <schwab@redhat.com>
+
+ * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S: Handle
+ EAGAIN from FUTEX_WAIT_REQUEUE_PI.
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+
+2011-11-15 Ulrich Drepper <drepper@gmail.com>
+
+ * pthread_getattr_np.c (pthread_getattr_np): Set FD_CLOEXEC for
+ /proc/self/maps.
+
+2011-10-29 Ulrich Drepper <drepper@gmail.com>
+
+ [BZ #13358]
+ * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+ (__pthread_cond_timedwait): Initialize %r15 correctly also for code
+ path for kernels with FUTEX_CLOCK_REALTIME.
+ Debugged by H.J. Lu <hjl.tools@gmail.com>.
+
+2011-10-27 Andreas Schwab <schwab@redhat.com>
+
+ [BZ #13344]
+ * sysdeps/pthread/pthread.h: Use __THREADNL instead of __THREAD
+ for memory synchronization functions.
+ * semaphore.h: Likewise.
+
+2011-10-24 Ulrich Drepper <drepper@gmail.com>
+
+ * tst-cancel7.c: Avoid warning.
+ * tst-mutex6.c: Likewise.
+ * tst-mutex9.c: Likewise.
+ * tst-mutexpi6.c: Likewise.
+
+2011-10-23 Ulrich Drepper <drepper@gmail.com>
+
+ * sysdeps/i386/tls.h: Remove #include <list.h>.
+
+2011-10-15 Ulrich Drepper <drepper@gmail.com>
+
+ * pthread_create.c (start_thread): Call __ctype_init.
+
2011-09-15 Andreas Schwab <schwab@redhat.com>
* sysdeps/pthread/list.h: Define only list_t if __need_list_t is
diff --git a/nptl/Versions b/nptl/Versions
index 5a884202f1..6a10375502 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -255,6 +255,6 @@ libpthread {
GLIBC_PRIVATE {
__pthread_initialize_minimal;
__pthread_clock_gettime; __pthread_clock_settime;
- __pthread_unwind;
+ __pthread_unwind; __pthread_get_minstack;
}
}
diff --git a/nptl/allocatestack.c b/nptl/allocatestack.c
index 36b4aa16fd..b1b17ceba7 100644
--- a/nptl/allocatestack.c
+++ b/nptl/allocatestack.c
@@ -435,7 +435,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
{
/* Something went wrong. */
assert (errno == ENOMEM);
- return EAGAIN;
+ return errno;
}
@@ -496,12 +496,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);
if (__builtin_expect (mem == MAP_FAILED, 0))
- {
- if (errno == ENOMEM)
- __set_errno (EAGAIN);
-
- return errno;
- }
+ return errno;
/* SIZE is guaranteed to be greater than zero.
So we can never get a null pointer back from mmap. */
@@ -581,7 +576,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
/* Free the stack memory we just allocated. */
(void) munmap (mem, size);
- return EAGAIN;
+ return errno;
}
@@ -636,10 +631,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
#endif
if (mprotect (guard, guardsize, PROT_NONE) != 0)
{
- int err;
mprot_error:
- err = errno == ENOMEM ? EAGAIN : errno;
-
lll_lock (stack_cache_lock, LLL_PRIVATE);
/* Remove the thread from the list. */
@@ -657,7 +649,7 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
is nothing we could do. */
(void) munmap (mem, size);
- return err;
+ return errno;
}
pd->guardsize = guardsize;
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index db45cab230..4349224463 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -427,7 +427,7 @@ __pthread_initialize_minimal_internal (void)
/* Make sure it meets the minimum size that allocate_stack
(allocatestack.c) will demand, which depends on the page size. */
- const uintptr_t pagesz = __sysconf (_SC_PAGESIZE);
+ const uintptr_t pagesz = GLRO(dl_pagesize);
const size_t minstack = pagesz + __static_tls_size + MINIMAL_REST_STACK;
if (limit.rlim_cur < minstack)
limit.rlim_cur = minstack;
@@ -469,3 +469,13 @@ __pthread_initialize_minimal_internal (void)
}
strong_alias (__pthread_initialize_minimal_internal,
__pthread_initialize_minimal)
+
+
+size_t
+__pthread_get_minstack (const pthread_attr_t *attr)
+{
+ struct pthread_attr *iattr = (struct pthread_attr *) attr;
+
+ return (GLRO(dl_pagesize) + __static_tls_size + PTHREAD_STACK_MIN
+ + iattr->guardsize);
+}
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index df4f4d769b..845434e50e 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -397,6 +397,7 @@ weak_function;
extern void __pthread_init_static_tls (struct link_map *) attribute_hidden;
+extern size_t __pthread_get_minstack (const pthread_attr_t *attr);
/* Namespace save aliases. */
extern int __pthread_getschedparam (pthread_t thread_id, int *policy,
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 34d83f94ad..6250d03ff6 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007,2008,2009,2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007,2008,2009,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <ctype.h>
#include <errno.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -239,6 +240,9 @@ start_thread (void *arg)
/* Initialize resolver state pointer. */
__resp = &pd->res;
+ /* Initialize pointers to locale data. */
+ __ctype_init ();
+
/* Allow setxid from now onwards. */
if (__builtin_expect (atomic_exchange_acq (&pd->setxid_futex, 0) == -2, 0))
lll_futex_wake (&pd->setxid_futex, 1, LLL_PRIVATE);
@@ -453,8 +457,9 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg)
int err = ALLOCATE_STACK (iattr, &pd);
if (__builtin_expect (err != 0, 0))
/* Something went wrong. Maybe a parameter of the attributes is
- invalid or we could not allocate memory. */
- return err;
+ invalid or we could not allocate memory. Note we have to
+ translate error codes. */
+ return err == ENOMEM ? EAGAIN : err;
/* Initialize the TCB. All initializations with zero should be
diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c
index 9c25caff89..f03c97899c 100644
--- a/nptl/pthread_getattr_np.c
+++ b/nptl/pthread_getattr_np.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2004, 2006, 2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -75,7 +75,7 @@ pthread_getattr_np (thread_id, attr)
/* The safest way to get the top of the stack is to read
/proc/self/maps and locate the line into which
__libc_stack_end falls. */
- FILE *fp = fopen ("/proc/self/maps", "rc");
+ FILE *fp = fopen ("/proc/self/maps", "rce");
if (fp == NULL)
ret = errno;
/* We need the limit of the stack in any case. */
@@ -164,7 +164,7 @@ pthread_getattr_np (thread_id, attr)
{
free (cpuset);
if (ret == ENOSYS)
- {
+ {
/* There is no such functionality. */
ret = 0;
iattr->cpuset = NULL;
diff --git a/nptl/semaphore.h b/nptl/semaphore.h
index 4f13725b32..11caf664ab 100644
--- a/nptl/semaphore.h
+++ b/nptl/semaphore.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2011 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
@@ -64,10 +64,10 @@ extern int sem_timedwait (sem_t *__restrict __sem,
#endif
/* Test whether SEM is posted. */
-extern int sem_trywait (sem_t *__sem) __THROW;
+extern int sem_trywait (sem_t *__sem) __THROWNL;
/* Post SEM. */
-extern int sem_post (sem_t *__sem) __THROW;
+extern int sem_post (sem_t *__sem) __THROWNL;
/* Get current value of SEM and store it in *SVAL. */
extern int sem_getvalue (sem_t *__restrict __sem, int *__restrict __sval)
diff --git a/nptl/sysdeps/i386/tls.h b/nptl/sysdeps/i386/tls.h
index 3f597a9771..3d74338970 100644
--- a/nptl/sysdeps/i386/tls.h
+++ b/nptl/sysdeps/i386/tls.h
@@ -26,7 +26,6 @@
# include <stddef.h>
# include <stdint.h>
# include <stdlib.h>
-# include <list.h>
# include <sysdep.h>
# include <kernel-features.h>
diff --git a/nptl/sysdeps/pthread/gai_misc.h b/nptl/sysdeps/pthread/gai_misc.h
index 9094c1e37b..cbbe47657b 100644
--- a/nptl/sysdeps/pthread/gai_misc.h
+++ b/nptl/sysdeps/pthread/gai_misc.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2006, 2007, 2008, 2011 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
@@ -97,7 +97,9 @@ __gai_create_helper_thread (pthread_t *threadp, void *(*tf) (void *),
pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
/* The helper thread needs only very little resources. */
- (void) pthread_attr_setstacksize (&attr, 4 * PTHREAD_STACK_MIN);
+ (void) pthread_attr_setstacksize (&attr,
+ __pthread_get_minstack (&attr)
+ + 4 * PTHREAD_STACK_MIN);
/* Block all signals in the helper thread. To do this thoroughly we
temporarily have to block all signals here. */
diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h
index 4c83665452..a92428162d 100644
--- a/nptl/sysdeps/pthread/pthread.h
+++ b/nptl/sysdeps/pthread/pthread.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+/* Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -225,7 +225,7 @@ __BEGIN_DECLS
extern int pthread_create (pthread_t *__restrict __newthread,
__const pthread_attr_t *__restrict __attr,
void *(*__start_routine) (void *),
- void *__restrict __arg) __THROW __nonnull ((1, 3));
+ void *__restrict __arg) __THROWNL __nonnull ((1, 3));
/* Terminate calling thread.
@@ -740,22 +740,22 @@ extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
/* Try locking a mutex. */
extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Lock a mutex. */
extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
#ifdef __USE_XOPEN2K
/* Wait until lock becomes available, or specified time passes. */
extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
__const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
+ __abstime) __THROWNL __nonnull ((1, 2));
#endif
/* Unlock a mutex. */
extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Get the priority ceiling of MUTEX. */
@@ -879,37 +879,37 @@ extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
/* Acquire read lock for RWLOCK. */
extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Try to acquire read lock for RWLOCK. */
extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
# ifdef __USE_XOPEN2K
/* Try to acquire read lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
+ __abstime) __THROWNL __nonnull ((1, 2));
# endif
/* Acquire write lock for RWLOCK. */
extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Try to acquire write lock for RWLOCK. */
extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
# ifdef __USE_XOPEN2K
/* Try to acquire write lock for RWLOCK or return after specfied time. */
extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
__const struct timespec *__restrict
- __abstime) __THROW __nonnull ((1, 2));
+ __abstime) __THROWNL __nonnull ((1, 2));
# endif
/* Unlock RWLOCK. */
extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Functions for handling read-write lock attributes. */
@@ -959,11 +959,11 @@ extern int pthread_cond_destroy (pthread_cond_t *__cond)
/* Wake up one thread waiting for condition variable COND. */
extern int pthread_cond_signal (pthread_cond_t *__cond)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Wake up all threads waiting for condition variables COND. */
extern int pthread_cond_broadcast (pthread_cond_t *__cond)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Wait for condition variable COND to be signaled or broadcast.
MUTEX is assumed to be locked before.
@@ -1034,15 +1034,15 @@ extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
/* Wait until spinlock LOCK is retrieved. */
extern int pthread_spin_lock (pthread_spinlock_t *__lock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Try to lock spinlock LOCK. */
extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Release spinlock LOCK. */
extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Functions to handle barriers. */
@@ -1060,7 +1060,7 @@ extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
/* Wait on barrier BARRIER. */
extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
- __THROW __nonnull ((1));
+ __THROWNL __nonnull ((1));
/* Initialize barrier attribute ATTR. */
diff --git a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
index 53970d755f..54590b7b8b 100644
--- a/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_cond_wait.S
@@ -134,6 +134,7 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 18f
+90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %ecx
movl %ebp, %edx
xorl %esi, %esi
@@ -147,6 +148,9 @@ __pthread_cond_wait:
sete 16(%esp)
je 19f
+ cmpl $-EAGAIN, %eax
+ je 91f
+
/* Normal and PI futexes dont mix. Use normal futex functions only
if the kernel does not support the PI futex functions. */
cmpl $-ENOSYS, %eax
@@ -391,6 +395,78 @@ __pthread_cond_wait:
#endif
call __lll_unlock_wake
jmp 11b
+
+91:
+.LcleanupSTART2:
+ /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+ call it again. */
+
+ /* Get internal lock. */
+ movl $1, %edx
+ xorl %eax, %eax
+ LOCK
+#if cond_lock == 0
+ cmpxchgl %edx, (%ebx)
+#else
+ cmpxchgl %edx, cond_lock(%ebx)
+#endif
+ jz 92f
+
+#if cond_lock == 0
+ movl %ebx, %edx
+#else
+ leal cond_lock(%ebx), %edx
+#endif
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
+ call __lll_lock_wait
+
+92:
+ /* Increment the cond_futex value again, so it can be used as a new
+ expected value. */
+ addl $1, cond_futex(%ebx)
+ movl cond_futex(%ebx), %ebp
+
+ /* Unlock. */
+ LOCK
+#if cond_lock == 0
+ subl $1, (%ebx)
+#else
+ subl $1, cond_lock(%ebx)
+#endif
+ je 93f
+#if cond_lock == 0
+ movl %ebx, %eax
+#else
+ leal cond_lock(%ebx), %eax
+#endif
+#if (LLL_SHARED-LLL_PRIVATE) > 255
+ xorl %ecx, %ecx
+#endif
+ cmpl $-1, dep_mutex(%ebx)
+ setne %cl
+ subl $1, %ecx
+ andl $(LLL_SHARED-LLL_PRIVATE), %ecx
+#if LLL_PRIVATE != 0
+ addl $LLL_PRIVATE, %ecx
+#endif
+ call __lll_unlock_wake
+
+93:
+ /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+ xorl %ecx, %ecx
+ movl dep_mutex(%ebx), %edi
+ jmp 90b
+.LcleanupEND2:
+
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -563,6 +639,10 @@ __condvar_w_cleanup:
.long .LcleanupEND-.Lsub_cond_futex
.long __condvar_w_cleanup-.LSTARTCODE
.uleb128 0
+ .long .LcleanupSTART2-.LSTARTCODE
+ .long .LcleanupEND2-.LcleanupSTART2
+ .long __condvar_w_cleanup-.LSTARTCODE
+ .uleb128 0
.long .LcallUR-.LSTARTCODE
.long .LENDCODE-.LcallUR
.long 0
diff --git a/nptl/sysdeps/unix/sysv/linux/mq_notify.c b/nptl/sysdeps/unix/sysv/linux/mq_notify.c
index 49ddeae052..11ffc328e7 100644
--- a/nptl/sysdeps/unix/sysv/linux/mq_notify.c
+++ b/nptl/sysdeps/unix/sysv/linux/mq_notify.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005, 2008 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2008, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contribute by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -201,7 +201,7 @@ init_mq_netlink (void)
(void) pthread_attr_init (&attr);
(void) pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
/* We do not need much stack space, the bare minimum will be enough. */
- (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+ (void) pthread_attr_setstacksize (&attr, __pthread_get_minstack (&attr));
/* Temporarily block all signals so that the newly created
thread inherits the mask. */
diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_getname.c b/nptl/sysdeps/unix/sysv/linux/pthread_getname.c
index 6e7786f987..2c5ee6305e 100644
--- a/nptl/sysdeps/unix/sysv/linux/pthread_getname.c
+++ b/nptl/sysdeps/unix/sysv/linux/pthread_getname.c
@@ -1,5 +1,5 @@
/* pthread_getname_np -- Get thread name. Linux version
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -57,6 +57,15 @@ pthread_getname_np (th, buf, len)
ssize_t n = TEMP_FAILURE_RETRY (read_not_cancel (fd, buf, len));
if (n < 0)
res = errno;
+ else
+ {
+ if (buf[n - 1] == '\n')
+ buf[n - 1] = '\0';
+ else if (n == len)
+ res = ERANGE;
+ else
+ buf[n] = '\0';
+ }
close_not_cancel_no_status (fd);
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_routines.c b/nptl/sysdeps/unix/sysv/linux/timer_routines.c
index b159316fb2..44da8563df 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_routines.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_routines.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -165,7 +165,7 @@ __start_helper_thread (void)
and should go away automatically when canceled. */
pthread_attr_t attr;
(void) pthread_attr_init (&attr);
- (void) pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
+ (void) pthread_attr_setstacksize (&attr, __pthread_get_minstack (&attr));
/* Block all signals in the helper thread but SIGSETXID. To do this
thoroughly we temporarily have to block all signals here. The
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
index d11b29746a..acbd3fa533 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005,2007,2009,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -101,6 +101,8 @@ __pthread_cond_timedwait:
movq %rsi, dep_mutex(%rdi)
22:
+ xorl %r15d, %r15d
+
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
# ifdef PIC
cmpl $0, __have_futex_clock_realtime(%rip)
@@ -402,8 +404,6 @@ __pthread_cond_timedwait:
#ifndef __ASSUME_FUTEX_CLOCK_REALTIME
.Lreltmo:
- xorl %r15d, %r15d
-
/* Get internal lock. */
movl $1, %esi
xorl %eax, %eax
diff --git a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
index 7535baa786..d837d158a4 100644
--- a/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
+++ b/nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S
@@ -23,6 +23,7 @@
#include <lowlevelcond.h>
#include <tcb-offsets.h>
#include <pthread-pi-defines.h>
+#include <pthread-errnos.h>
#include <kernel-features.h>
@@ -133,11 +134,14 @@ __pthread_cond_wait:
cmpl $PI_BIT, %eax
jne 61f
+90:
movl $(FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG), %esi
movl $SYS_futex, %eax
syscall
movl $1, %r8d
+ cmpq $-EAGAIN, %rax
+ je 91f
#ifdef __ASSUME_REQUEUE_PI
jmp 62f
#else
@@ -324,6 +328,70 @@ __pthread_cond_wait:
13: movq %r10, %rax
jmp 14b
+
+91:
+.LcleanupSTART2:
+ /* FUTEX_WAIT_REQUEUE_PI returned EAGAIN. We need to
+ call it again. */
+ movq 8(%rsp), %rdi
+
+ /* Get internal lock. */
+ movl $1, %esi
+ xorl %eax, %eax
+ LOCK
+#if cond_lock == 0
+ cmpxchgl %esi, (%rdi)
+#else
+ cmpxchgl %esi, cond_lock(%rdi)
+#endif
+ jz 92f
+
+#if cond_lock != 0
+ addq $cond_lock, %rdi
+#endif
+ cmpq $-1, dep_mutex-cond_lock(%rdi)
+ movl $LLL_PRIVATE, %eax
+ movl $LLL_SHARED, %esi
+ cmovne %eax, %esi
+ callq __lll_lock_wait
+#if cond_lock != 0
+ subq $cond_lock, %rdi
+#endif
+92:
+ /* Increment the cond_futex value again, so it can be used as a new
+ expected value. */
+ incl cond_futex(%rdi)
+ movl cond_futex(%rdi), %edx
+
+ /* Release internal lock. */
+ LOCK
+#if cond_lock == 0
+ decl (%rdi)
+#else
+ decl cond_lock(%rdi)
+#endif
+ jz 93f
+
+#if cond_lock != 0
+ addq $cond_lock, %rdi
+#endif
+ cmpq $-1, dep_mutex-cond_lock(%rdi)
+ movl $LLL_PRIVATE, %eax
+ movl $LLL_SHARED, %esi
+ cmovne %eax, %esi
+ /* The call preserves %rdx. */
+ callq __lll_unlock_wake
+#if cond_lock != 0
+ subq $cond_lock, %rdi
+#endif
+93:
+ /* Set the rest of SYS_futex args for FUTEX_WAIT_REQUEUE_PI. */
+ xorq %r10, %r10
+ movq dep_mutex(%rdi), %r8
+ leaq cond_futex(%rdi), %rdi
+ jmp 90b
+.LcleanupEND2:
+
.size __pthread_cond_wait, .-__pthread_cond_wait
versioned_symbol (libpthread, __pthread_cond_wait, pthread_cond_wait,
GLIBC_2_3_2)
@@ -476,11 +544,15 @@ __condvar_cleanup1:
.uleb128 .LcleanupSTART-.LSTARTCODE
.uleb128 .LcleanupEND-.LcleanupSTART
.uleb128 __condvar_cleanup1-.LSTARTCODE
- .uleb128 0
+ .uleb128 0
+ .uleb128 .LcleanupSTART2-.LSTARTCODE
+ .uleb128 .LcleanupEND2-.LcleanupSTART2
+ .uleb128 __condvar_cleanup1-.LSTARTCODE
+ .uleb128 0
.uleb128 .LcallUR-.LSTARTCODE
.uleb128 .LENDCODE-.LcallUR
.uleb128 0
- .uleb128 0
+ .uleb128 0
.Lcstend:
diff --git a/nptl/tst-cancel7.c b/nptl/tst-cancel7.c
index be9b1c6064..af0d18f1ec 100644
--- a/nptl/tst-cancel7.c
+++ b/nptl/tst-cancel7.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2002.
@@ -204,7 +204,7 @@ do_cleanup (void)
case OPT_PIDFILE: \
pidfile = optarg; \
break;
-// #define CLEANUP_HANDLER do_cleanup ()
+#define CLEANUP_HANDLER do_cleanup ()
#define PREPARE(argc, argv) do_prepare (argc, argv)
#define TEST_FUNCTION do_test ()
#define TIMEOUT 5
diff --git a/nptl/tst-mutex6.c b/nptl/tst-mutex6.c
index de64bdb435..19611ee94b 100644
--- a/nptl/tst-mutex6.c
+++ b/nptl/tst-mutex6.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -25,7 +25,8 @@
#ifndef ATTR
-# define ATTR NULL
+pthread_mutexattr_t *attr;
+# define ATTR attr
#endif
diff --git a/nptl/tst-mutex9.c b/nptl/tst-mutex9.c
index f9d379343d..bdf1dc8420 100644
--- a/nptl/tst-mutex9.c
+++ b/nptl/tst-mutex9.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2003.
@@ -37,7 +37,6 @@ do_test (void)
pthread_mutex_t *m;
pthread_mutexattr_t a;
pid_t pid;
- char *p;
fd = mkstemp (tmpfname);
if (fd == -1)
@@ -68,7 +67,6 @@ do_test (void)
m = (pthread_mutex_t *) (((uintptr_t) mem + __alignof (pthread_mutex_t))
& ~(__alignof (pthread_mutex_t) - 1));
- p = (char *) (m + 1);
if (pthread_mutexattr_init (&a) != 0)
{
diff --git a/nptl/tst-mutexpi6.c b/nptl/tst-mutexpi6.c
index 42cda377d1..8881a1d2c0 100644
--- a/nptl/tst-mutexpi6.c
+++ b/nptl/tst-mutexpi6.c
@@ -3,11 +3,13 @@
#include <stdlib.h>
-static pthread_mutexattr_t a;
+pthread_mutexattr_t a;
+pthread_mutexattr_t *attr;
static void
prepare (void)
{
+ attr = &a;
if (pthread_mutexattr_init (&a) != 0)
{
puts ("mutexattr_init failed");
@@ -23,5 +25,5 @@ prepare (void)
#define PREPARE(argc, argv) prepare ()
-#define ATTR &a
+#define ATTR attr
#include "tst-mutex6.c"
diff --git a/nscd/Makefile b/nscd/Makefile
index be0afed2d8..284b4fc4e7 100644
--- a/nscd/Makefile
+++ b/nscd/Makefile
@@ -43,7 +43,7 @@ others += nscd
others-pie += nscd
install-sbin := nscd
-extra-objs := $(nscd-modules:=.o)
+extra-objs = $(nscd-modules:=.o)
endif
diff --git a/nscd/aicache.c b/nscd/aicache.c
index 8d100f8d31..aaaf80df9d 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -461,9 +461,12 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
<= (sizeof (struct database_pers_head)
+ db->head->module * sizeof (ref_t)
+ db->head->data_size));
+# ifndef __ASSUME_SENDFILE
ssize_t written;
- written = sendfileall (fd, db->wr_fd, (char *) &dataset->resp
- - (char *) db->head, dataset->head.recsize);
+ written =
+# endif
+ sendfileall (fd, db->wr_fd, (char *) &dataset->resp
+ - (char *) db->head, dataset->head.recsize);
# ifndef __ASSUME_SENDFILE
if (written == -1 && errno == ENOSYS)
goto use_write;
diff --git a/nscd/connections.c b/nscd/connections.c
index cd6a995c5f..5f1c5be681 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -24,6 +24,7 @@
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
+#include <ifaddrs.h>
#include <libintl.h>
#include <pthread.h>
#include <pwd.h>
@@ -32,6 +33,10 @@
#include <stdlib.h>
#include <unistd.h>
#include <arpa/inet.h>
+#ifdef HAVE_NETLINK
+# include <linux/netlink.h>
+# include <linux/rtnetlink.h>
+#endif
#ifdef HAVE_EPOLL
# include <sys/epoll.h>
#endif
@@ -246,6 +251,11 @@ static int sock;
int inotify_fd = -1;
#endif
+#ifdef HAVE_NETLINK
+/* Descriptor for netlink status updates. */
+static int nl_status_fd = -1;
+#endif
+
#ifndef __ASSUME_SOCK_CLOEXEC
/* Negative if SOCK_CLOEXEC is not supported, positive if it is, zero
before be know the result. */
@@ -902,6 +912,65 @@ cannot set socket to close on exec: %s; disabling paranoia mode"),
exit (1);
}
+#ifdef HAVE_NETLINK
+ if (dbs[hstdb].enabled)
+ {
+ /* Try to open netlink socket to monitor network setting changes. */
+ nl_status_fd = socket (AF_NETLINK,
+ SOCK_RAW | SOCK_CLOEXEC | SOCK_NONBLOCK,
+ NETLINK_ROUTE);
+ if (nl_status_fd != -1)
+ {
+ struct sockaddr_nl snl;
+ memset (&snl, '\0', sizeof (snl));
+ snl.nl_family = AF_NETLINK;
+ /* XXX Is this the best set to use? */
+ snl.nl_groups = (RTMGRP_IPV4_IFADDR | RTMGRP_TC | RTMGRP_IPV4_MROUTE
+ | RTMGRP_IPV4_ROUTE | RTMGRP_IPV4_RULE
+ | RTMGRP_IPV6_IFADDR | RTMGRP_IPV6_MROUTE
+ | RTMGRP_IPV6_ROUTE | RTMGRP_IPV6_IFINFO
+ | RTMGRP_IPV6_PREFIX);
+
+ if (bind (nl_status_fd, (struct sockaddr *) &snl, sizeof (snl)) != 0)
+ {
+ close (nl_status_fd);
+ nl_status_fd = -1;
+ }
+ else
+ {
+ /* Start the timestamp process. */
+ dbs[hstdb].head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP]
+ = __bump_nl_timestamp ();
+
+# ifndef __ASSUME_SOCK_CLOEXEC
+ if (have_sock_cloexec < 0)
+ {
+ /* We don't want to get stuck on accept. */
+ int fl = fcntl (nl_status_fd, F_GETFL);
+ if (fl == -1
+ || fcntl (nl_status_fd, F_SETFL, fl | O_NONBLOCK) == -1)
+ {
+ dbg_log (_("\
+cannot change socket to nonblocking mode: %s"),
+ strerror (errno));
+ exit (1);
+ }
+
+ /* The descriptor needs to be closed on exec. */
+ if (paranoia
+ && fcntl (nl_status_fd, F_SETFD, FD_CLOEXEC) == -1)
+ {
+ dbg_log (_("cannot set socket to close on exec: %s"),
+ strerror (errno));
+ exit (1);
+ }
+ }
+# endif
+ }
+ }
+ }
+#endif
+
/* Change to unprivileged uid/gid/groups if specified in config file */
if (server_user != NULL)
finish_drop_privileges ();
@@ -1825,6 +1894,18 @@ main_loop_poll (void)
}
#endif
+#ifdef HAVE_NETLINK
+ size_t idx_nl_status_fd = 0;
+ if (nl_status_fd != -1)
+ {
+ idx_nl_status_fd = nused;
+ conns[nused].fd = nl_status_fd;
+ conns[nused].events = POLLRDNORM;
+ ++nused;
+ firstfree = nused;
+ }
+#endif
+
while (1)
{
/* Wait for any event. We wait at most a couple of seconds so
@@ -1967,6 +2048,20 @@ disabled inotify after read error %d"),
}
#endif
+#ifdef HAVE_NETLINK
+ if (idx_nl_status_fd != 0 && conns[idx_nl_status_fd].revents != 0)
+ {
+ char buf[4096];
+ /* Read all the data. We do not interpret it here. */
+ while (TEMP_FAILURE_RETRY (read (nl_status_fd, buf,
+ sizeof (buf))) != -1)
+ ;
+
+ dbs[hstdb].head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP]
+ = __bump_nl_timestamp ();
+ }
+#endif
+
for (size_t cnt = first; cnt < nused && n > 0; ++cnt)
if (conns[cnt].revents != 0)
{
@@ -2045,6 +2140,17 @@ main_loop_epoll (int efd)
}
# endif
+# ifdef HAVE_NETLINK
+ if (nl_status_fd != -1)
+ {
+ ev.events = EPOLLRDNORM;
+ ev.data.fd = nl_status_fd;
+ if (epoll_ctl (efd, EPOLL_CTL_ADD, nl_status_fd, &ev) == -1)
+ /* We cannot use epoll. */
+ return;
+ }
+# endif
+
while (1)
{
struct epoll_event revs[100];
@@ -2161,6 +2267,18 @@ main_loop_epoll (int efd)
}
}
# endif
+# ifdef HAVE_NETLINK
+ else if (revs[cnt].data.fd == nl_status_fd)
+ {
+ char buf[4096];
+ /* Read all the data. We do not interpret it here. */
+ while (TEMP_FAILURE_RETRY (read (nl_status_fd, buf,
+ sizeof (buf))) != -1)
+ ;
+
+ __bump_nl_timestamp ();
+ }
+# endif
else
{
/* Remove the descriptor from the epoll descriptor. */
@@ -2184,6 +2302,7 @@ main_loop_epoll (int efd)
time_t laststart = now - ACCEPT_TIMEOUT;
assert (starttime[sock] == 0);
assert (inotify_fd == -1 || starttime[inotify_fd] == 0);
+ assert (nl_status_fd == -1 || starttime[nl_status_fd] == 0);
for (int cnt = highest; cnt > STDERR_FILENO; --cnt)
if (starttime[cnt] != 0 && starttime[cnt] < laststart)
{
diff --git a/nscd/netgroupcache.c b/nscd/netgroupcache.c
index dd90ce40cb..1bb18d4ec5 100644
--- a/nscd/netgroupcache.c
+++ b/nscd/netgroupcache.c
@@ -405,10 +405,10 @@ addgetnetgrentX (struct database_dyn *db, int fd, request_header *req,
# endif
}
else
+#endif
{
-# ifndef __ASSUME_SENDFILE
+#if defined HAVE_SENDFILE && !defined __ASSUME_SENDFILE
use_write:
-# endif
#endif
writeall (fd, &dataset->resp, dataset->head.recsize);
}
diff --git a/nscd/nscd-client.h b/nscd/nscd-client.h
index caad26a9cc..b5cd2d2c1e 100644
--- a/nscd/nscd-client.h
+++ b/nscd/nscd-client.h
@@ -260,12 +260,17 @@ struct hashentry
/* Current persistent database version. */
-#define DB_VERSION 1
+#define DB_VERSION 2
/* Maximum time allowed between updates of the timestamp. */
#define MAPPING_TIMEOUT (5 * 60)
+/* Used indices for the EXTRA_DATA element of 'database_pers_head'.
+ Each database has its own indices. */
+#define NSCD_HST_IDX_CONF_TIMESTAMP 0
+
+
/* Header of persistent database file. */
struct database_pers_head
{
@@ -274,6 +279,8 @@ struct database_pers_head
volatile int32_t gc_cycle;
volatile int32_t nscd_certainly_running;
volatile nscd_time_t timestamp;
+ /* Room for extensions. */
+ volatile uint32_t extra_data[4];
nscd_ssize_t module;
nscd_ssize_t data_size;
@@ -322,6 +329,12 @@ extern int __nscd_open_socket (const char *key, size_t keylen,
request_type type, void *response,
size_t responselen) attribute_hidden;
+/* Try to get a file descriptor for the shared meory segment
+ containing the database. */
+extern struct mapped_database *__nscd_get_mapping (request_type type,
+ const char *key,
+ struct mapped_database **mappedp) attribute_hidden;
+
/* Get reference of mapping. */
extern struct mapped_database *__nscd_get_map_ref (request_type type,
const char *name,
@@ -371,4 +384,7 @@ extern ssize_t writeall (int fd, const void *buf, size_t len)
extern ssize_t sendfileall (int tofd, int fromfd, off_t off, size_t len)
attribute_hidden;
+/* Get netlink timestamp counter from mapped area or zero. */
+extern uint32_t __nscd_get_nl_timestamp (void);
+
#endif /* nscd.h */
diff --git a/nscd/nscd.c b/nscd/nscd.c
index e9bb75d3e9..be693c9d5c 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -263,10 +263,6 @@ main (int argc, char **argv)
/* In foreground mode we are not paranoid. */
paranoia = 0;
- /* Start the SELinux AVC. */
- if (selinux_enabled)
- nscd_avc_init ();
-
signal (SIGINT, termination_handler);
signal (SIGQUIT, termination_handler);
signal (SIGTERM, termination_handler);
@@ -294,6 +290,10 @@ main (int argc, char **argv)
/* Init databases. */
nscd_init ();
+ /* Start the SELinux AVC. */
+ if (selinux_enabled)
+ nscd_avc_init ();
+
/* Handle incoming requests */
start_threads ();
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 70631fa961..6ee142d71b 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009
+/* Copyright (C) 1998-2005, 2006, 2007, 2008, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -98,6 +98,27 @@ libc_freeres_fn (hst_map_free)
}
+uint32_t
+__nscd_get_nl_timestamp (void)
+{
+ if (__nss_not_use_nscd_hosts != 0)
+ return 0;
+
+ struct mapped_database *map = __hst_map_handle.mapped;
+
+ if (map == NULL
+ || (map != NO_MAPPING
+ && map->head->nscd_certainly_running == 0
+ && map->head->timestamp + MAPPING_TIMEOUT < time (NULL)))
+ map = __nscd_get_mapping (GETFDHST, "hosts", &__hst_map_handle.mapped);
+
+ if (map == NO_MAPPING)
+ return 0;
+
+ return map->head->extra_data[NSCD_HST_IDX_CONF_TIMESTAMP];
+}
+
+
int __nss_have_localdomain attribute_hidden;
static int
diff --git a/nscd/nscd_helper.c b/nscd/nscd_helper.c
index fe63f9a7fe..365b599892 100644
--- a/nscd/nscd_helper.c
+++ b/nscd/nscd_helper.c
@@ -277,9 +277,9 @@ __nscd_unmap (struct mapped_database *mapped)
/* Try to get a file descriptor for the shared meory segment
containing the database. */
-static struct mapped_database *
-get_mapping (request_type type, const char *key,
- struct mapped_database **mappedp)
+struct mapped_database *
+__nscd_get_mapping (request_type type, const char *key,
+ struct mapped_database **mappedp)
{
struct mapped_database *result = NO_MAPPING;
#ifdef SCM_RIGHTS
@@ -449,8 +449,8 @@ __nscd_get_map_ref (request_type type, const char *name,
|| (cur->head->nscd_certainly_running == 0
&& cur->head->timestamp + MAPPING_TIMEOUT < time (NULL))
|| cur->head->data_size > cur->datasize)
- cur = get_mapping (type, name,
- (struct mapped_database **) &mapptr->mapped);
+ cur = __nscd_get_mapping (type, name,
+ (struct mapped_database **) &mapptr->mapped);
if (__builtin_expect (cur != NO_MAPPING, 1))
{
diff --git a/nscd/nscd_proto.h b/nscd/nscd_proto.h
index 8aa29732ef..742c154fac 100644
--- a/nscd/nscd_proto.h
+++ b/nscd/nscd_proto.h
@@ -74,5 +74,7 @@ extern int __nscd_getservbyport_r (int port, const char *proto,
size_t buflen, struct servent **result);
extern int __nscd_innetgr (const char *netgroup, const char *host,
const char *user, const char *domain);
+extern int __nscd_setnetgrent (const char *group, struct __netgrent *datap);
+
#endif /* _NSCD_PROTO_H */
diff --git a/nss/db-Makefile b/nss/db-Makefile
index 13259c188c..f86ba12bad 100644
--- a/nss/db-Makefile
+++ b/nss/db-Makefile
@@ -59,7 +59,7 @@ $(VAR_DB)/group.db: /etc/group
} \
delete grmems; } } \
END { for (mem in members) \
- printf ":%s $s %s\n", mem, mem, members[mem]; }' $^ | \
+ printf ":%s %s %s\n", mem, mem, members[mem]; }' $^ | \
$(MAKEDB) -o $@ -
@echo "done."
diff --git a/nss/getent.c b/nss/getent.c
index b843433ed6..0e39836179 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -472,7 +472,6 @@ static int
netgroup_keys (int number, char *key[])
{
int result = 0;
- int i;
if (number == 0)
{
@@ -519,6 +518,12 @@ initgroups_keys (int number, char *key[])
size_t grpslen = ngrps * sizeof (gid_t);
gid_t *grps = alloca (grpslen);
+ if (number == 0)
+ {
+ fprintf (stderr, _("Enumeration not supported on %s\n"), "initgroups");
+ return 3;
+ }
+
for (int i = 0; i < number; ++i)
{
int no = ngrps;
diff --git a/nss/makedb.c b/nss/makedb.c
index 514f5a49c2..5e5b64b860 100644
--- a/nss/makedb.c
+++ b/nss/makedb.c
@@ -848,7 +848,7 @@ set_file_creation_context (const char *outname, mode_t mode)
/* Check if SELinux is enabled, and remember. */
if (enabled == 0)
- enabled = is_selinux_enabled ();
+ enabled = is_selinux_enabled () ? 1 : -1;
if (enabled < 0)
return;
diff --git a/nss/nss_files/files-XXX.c b/nss/nss_files/files-XXX.c
index 1a6fa0ddd5..8db052903f 100644
--- a/nss/nss_files/files-XXX.c
+++ b/nss/nss_files/files-XXX.c
@@ -77,7 +77,7 @@ internal_setent (int stayopen)
if (stream == NULL)
{
- stream = fopen (DATAFILE, "re");
+ stream = fopen (DATAFILE, "rce");
if (stream == NULL)
status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
diff --git a/nss/nss_files/files-alias.c b/nss/nss_files/files-alias.c
index 714299aadf..023021e6ce 100644
--- a/nss/nss_files/files-alias.c
+++ b/nss/nss_files/files-alias.c
@@ -48,7 +48,7 @@ internal_setent (void)
if (stream == NULL)
{
- stream = fopen ("/etc/aliases", "re");
+ stream = fopen ("/etc/aliases", "rce");
if (stream == NULL)
status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
@@ -258,7 +258,7 @@ get_next_alias (const char *match, struct aliasent *result,
first_unused = cp;
- listfile = fopen (&cp[9], "r");
+ listfile = fopen (&cp[9], "rce");
/* If the file does not exist we simply ignore
the statement. */
if (listfile != NULL
diff --git a/nss/nss_files/files-initgroups.c b/nss/nss_files/files-initgroups.c
index c343b35e56..3a3b5c1e38 100644
--- a/nss/nss_files/files-initgroups.c
+++ b/nss/nss_files/files-initgroups.c
@@ -30,7 +30,7 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
long int *size, gid_t **groupsp, long int limit,
int *errnop)
{
- FILE *stream = fopen ("/etc/group", "re");
+ FILE *stream = fopen ("/etc/group", "rce");
if (stream == NULL)
{
*errnop = errno;
@@ -73,7 +73,7 @@ _nss_files_initgroups_dyn (const char *user, gid_t group, long int *start,
if (buffer_use_malloc || ! __libc_use_alloca (buflen + newbuflen))
{
void *newbuf = realloc (buffer_use_malloc ? buffer : NULL,
- buflen);
+ newbuflen);
if (newbuf == NULL)
{
*errnop = ENOMEM;
diff --git a/nss/nss_files/files-key.c b/nss/nss_files/files-key.c
index fb108c8092..cb39204825 100644
--- a/nss/nss_files/files-key.c
+++ b/nss/nss_files/files-key.c
@@ -33,7 +33,7 @@ extern int xdecrypt (char *, char *);
static enum nss_status
search (const char *netname, char *result, int *errnop, int secret)
{
- FILE *stream = fopen (DATAFILE, "re");
+ FILE *stream = fopen (DATAFILE, "rce");
if (stream == NULL)
return errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
diff --git a/nss/nss_files/files-netgrp.c b/nss/nss_files/files-netgrp.c
index 4b5d774fdd..f70196bc7e 100644
--- a/nss/nss_files/files-netgrp.c
+++ b/nss/nss_files/files-netgrp.c
@@ -1,5 +1,5 @@
/* Netgroup file parser in nss_files modules.
- Copyright (C) 1996, 1997, 2000, 2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2000, 2004, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -63,7 +63,7 @@ _nss_files_setnetgrent (const char *group, struct __netgrent *result)
return NSS_STATUS_UNAVAIL;
/* Find the netgroups file and open it. */
- fp = fopen (DATAFILE, "r");
+ fp = fopen (DATAFILE, "rce");
if (fp == NULL)
status = errno == EAGAIN ? NSS_STATUS_TRYAGAIN : NSS_STATUS_UNAVAIL;
else
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 09fa0a6694..6ac1458a62 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -503,7 +503,7 @@ nss_parse_file (const char *fname)
size_t len;
/* Open the configuration file. */
- fp = fopen (fname, "rc");
+ fp = fopen (fname, "rce");
if (fp == NULL)
return NULL;
diff --git a/po/es.po b/po/es.po
index 493a54c60d..e03b826768 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,382 +1,1448 @@
-# Mensajes en español para GNU libc.
-# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
-# Enrique Melero Gómez <melero@eurolands.com>, 1996, 1997.
-# Santiago Vila Doncel <sanvila@unex.es>, 1997, 1998, 2001, 2002, 2003, 2004.
+# Mensajes en español para GNU libc.
+# Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2004, 2011 Free Software Foundation, Inc.
+# This file is distributed under the same license as the glibc package.
+# Enrique Melero Gómez <melero@eurolands.com>, 1996, 1997.
+# Santiago Vila Doncel <sanvila@unex.es>, 1997, 1998, 2001, 2002, 2003, 2004, 2011.
#
msgid ""
msgstr ""
-"Project-Id-Version: GNU libc 2.3.3\n"
+"Project-Id-Version: GNU libc 2.14\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-08-05 09:16+0200\n"
-"PO-Revision-Date: 2004-12-28 19:46+0100\n"
+"POT-Creation-Date: 2011-05-31 00:06-0400\n"
+"PO-Revision-Date: 2011-10-25 17:03+0200\n"
"Last-Translator: Santiago Vila Doncel <sanvila@unex.es>\n"
"Language-Team: Spanish <es@li.org>\n"
+"Language: es\n"
"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8-bit\n"
-# Habrá que mirar esto
-# Mirado, efectivamente esto es una señal que habrá
-# que dejarla con su nombre original ( entre paréntesis )
-#: sysdeps/generic/siglist.h:29 stdio-common/../sysdeps/unix/siglist.c:27
-msgid "Hangup"
-msgstr "Colgar (hangup)"
+#: argp/argp-help.c:228
+#, c-format
+msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
+msgstr "%.*s: El argumento ARGP_HELP_FMT requiere un valor"
-#: sysdeps/generic/siglist.h:30 stdio-common/../sysdeps/unix/siglist.c:28
-msgid "Interrupt"
-msgstr "Interrupción"
+#: argp/argp-help.c:238
+#, c-format
+msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
+msgstr "%.*s: Parámetro ARGP_HELP_FMT desconocido"
-# Podría ser también "Abandonar" sv
-#: sysdeps/generic/siglist.h:31 stdio-common/../sysdeps/unix/siglist.c:29
-msgid "Quit"
-msgstr "Abandona"
+#: argp/argp-help.c:251
+#, c-format
+msgid "Garbage in ARGP_HELP_FMT: %s"
+msgstr "Inconsistencias en ARGP_HELP_FMT: %s"
-# Se trata de una instrucción ilegal en el juego de instrucciones del 486
-# que provoca una "excepción".
-#: sysdeps/generic/siglist.h:32 stdio-common/../sysdeps/unix/siglist.c:30
-msgid "Illegal instruction"
-msgstr "Instrucción ilegal"
+#: argp/argp-help.c:1215
+msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
+msgstr ""
+"Los argumentos obligatorios u opcionales para las opciones largas son\n"
+"también obligatorios u opcionales para las opciones cortas correspondientes."
-#: sysdeps/generic/siglist.h:33 stdio-common/../sysdeps/unix/siglist.c:31
-msgid "Trace/breakpoint trap"
-msgstr "`trap' para punto de parada/seguimiento"
+#: argp/argp-help.c:1601
+msgid "Usage:"
+msgstr "Modo de empleo:"
-#: sysdeps/generic/siglist.h:34
-msgid "Aborted"
-msgstr "Abortado"
+#: argp/argp-help.c:1605
+msgid " or: "
+msgstr " o: "
-#: sysdeps/generic/siglist.h:35 stdio-common/../sysdeps/unix/siglist.c:34
-msgid "Floating point exception"
-msgstr "Excepción de coma flotante"
+#: argp/argp-help.c:1617
+msgid " [OPTION...]"
+msgstr " [OPCIÓN...]"
-# A quien se le ocurra `matar' un proceso, que especifique con qué señal.
-# En todo caso ` Terminado ( KILL ) ' sería apropiado. Ver fuentes
-#: sysdeps/generic/siglist.h:36 stdio-common/../sysdeps/unix/siglist.c:35
-msgid "Killed"
-msgstr "Terminado (killed)"
+#: argp/argp-help.c:1644
+#, c-format
+msgid "Try `%s --help' or `%s --usage' for more information.\n"
+msgstr "Pruebe `%s --help' o `%s --usage' para más información.\n"
-#: sysdeps/generic/siglist.h:37 stdio-common/../sysdeps/unix/siglist.c:36
-msgid "Bus error"
-msgstr "Error del bus"
+#: argp/argp-help.c:1672
+#, c-format
+msgid "Report bugs to %s.\n"
+msgstr "Comunicar bichos a %s.\n"
-# ¿De "segmento", o de "segmentación"? sv
-# De segmentación me parece incorrecto. La memoria ya estaba
-# segmentada, y se intentó acceder a un segmento
-# que no pertenece al programa. em
-# ¿Entonces dirías que está mal el original inglés? sv
-# No, en inglés siempre se ha dicho así. Siempre he traducido
-# Segmentation fault como violación de segmento. Consultémoslo,
-# es un mensaje que se ve demasiado a menudo em
-#: sysdeps/generic/siglist.h:38 stdio-common/../sysdeps/unix/siglist.c:37
-msgid "Segmentation fault"
-msgstr "Violación de segmento"
+#: argp/argp-parse.c:102
+msgid "Give this help list"
+msgstr "Da esta lista de ayuda"
+
+#: argp/argp-parse.c:103
+msgid "Give a short usage message"
+msgstr "Da un mensaje corto de uso"
+
+#: argp/argp-parse.c:104
+msgid "Set the program name"
+msgstr "Establece el nombre del programa"
+
+#: argp/argp-parse.c:106
+msgid "Hang for SECS seconds (default 3600)"
+msgstr "Cuelga durante SECS segundos (por omisión, 3600)"
-# Vi traducido pipe como tubo en un libro sobre pc/dos, y me horrorizó
-# menos mal que venía siempre la palabra `pipe' al lado entrecomillada
+#: argp/argp-parse.c:167
+msgid "Print program version"
+msgstr "Muestra la versión del programa"
+
+#: argp/argp-parse.c:183
+msgid "(PROGRAM ERROR) No version known!?"
+msgstr "(ERROR DEL PROGRAMA) ¿¡No se conoce ninguna versión!?"
+
+#: argp/argp-parse.c:623
+#, c-format
+msgid "%s: Too many arguments\n"
+msgstr "%s: Demasiados argumentos\n"
+
+#: argp/argp-parse.c:766
+msgid "(PROGRAM ERROR) Option should have been recognized!?"
+msgstr "(ERROR DEL PROGRAMA) ¿¡No se debería haber reconocido la opción!?"
+
+# ¿Qué tiene de malo "inesperado"? sv
#
-# Este mensaje sale ahora cada vez que pulsas "q" cuando haces por ejemplo
-# cat loquesea | less
-# Sale *muy a menudo* y estoy harto, así que lo borro que ya está bien. sv
-#. TRANS Broken pipe; there is no process reading from the other end of a pipe.
-#. TRANS Every library function that returns this error code also generates a
-#. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled
-#. TRANS or blocked. Thus, your program will never actually see @code{EPIPE}
-#. TRANS unless it has handled or blocked @code{SIGPIPE}.
-#: sysdeps/generic/siglist.h:39 stdio-common/../sysdeps/gnu/errlist.c:351
-#: stdio-common/../sysdeps/unix/siglist.c:39
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:62
-msgid "Broken pipe"
-msgstr "Tubería rota"
+# Parece el nombre de película de los '50 em
+# ... y antes de que digas nada, a mí me encantan
+# las películas de los 50 em
+#
+# Pero es que esa palabra *existe* y significa "no esperado".
+# ¿Por qué quieres empobrecer el idioma de esa forma?
+# ¿No podrías emplear la forma in-loquesea unas veces sí y otras no,
+# para darle variedad a la cosa? (Por ejemplo aquí sí, pues no te debe
+# recordar a una opción en silla de ruedas...). sv+
+#
+# Lo cambio después de leer 1984. sv
+#: assert/assert-perr.c:37
+#, c-format
+msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
+msgstr "%s%s%s:%u: %s%sError inesperado: %s.\n"
-#: sysdeps/generic/siglist.h:40 stdio-common/../sysdeps/unix/siglist.c:40
-msgid "Alarm clock"
-msgstr "Temporizador"
+# La traducción de Jochen es exactamente esta: Zusicherung %s nicht erfüllt
+# que viene a decir algo así que las promesas no se han cumplido, o que
+# las afirmaciones hechas no son ciertas.
+#: assert/assert.c:105
+#, c-format
+msgid ""
+"%s%s%s:%u: %s%sAssertion `%s' failed.\n"
+"%n"
+msgstr ""
+"%s%s%s:%u: %s%sLa declaración `%s' no se cumple.\n"
+"%n"
-#: sysdeps/generic/siglist.h:41 stdio-common/../sysdeps/unix/siglist.c:41
-msgid "Terminated"
-msgstr "Terminado"
+#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:100 nss/makedb.c:61
+msgid "NAME"
+msgstr "NOMBRE"
-# ?? sigo pensando en una traducción para condición
-#: sysdeps/generic/siglist.h:42 stdio-common/../sysdeps/unix/siglist.c:42
-msgid "Urgent I/O condition"
-msgstr "Condición urgente de E/S"
+#: catgets/gencat.c:111
+msgid "Create C header file NAME containing symbol definitions"
+msgstr "Crea un fichero de cabecera C, NOMBRE, que contiene las definiciones de símbolos"
-#: sysdeps/generic/siglist.h:43 stdio-common/../sysdeps/unix/siglist.c:43
-msgid "Stopped (signal)"
-msgstr "Parado (por una señal)"
+#: catgets/gencat.c:113
+msgid "Do not use existing catalog, force new output file"
+msgstr "No utiliza el catálogo existente, crea un nuevo fichero de salida"
-#: sysdeps/generic/siglist.h:44 stdio-common/../sysdeps/unix/siglist.c:44
-msgid "Stopped"
-msgstr "Parado"
+#: catgets/gencat.c:114 nss/makedb.c:61
+msgid "Write output to file NAME"
+msgstr "Escribe el resultado en el fichero NOMBRE"
-#: sysdeps/generic/siglist.h:45 stdio-common/../sysdeps/unix/siglist.c:45
-msgid "Continued"
-msgstr "Continúa"
+# FIXME: ¿Qué es ^K?
+#: catgets/gencat.c:119
+msgid ""
+"Generate message catalog.\vIf INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n"
+"is -, output is written to standard output.\n"
+msgstr ""
+"Genera un catálogo de mensajes.\vSi FICHERO-ENTRADA es -, la entrada\n"
+"se lee de la entrada estándar. Si FICHERO-SALIDA es -, el resultado se\n"
+"escribe en la salida estándar.\n"
-#: sysdeps/generic/siglist.h:46 stdio-common/../sysdeps/unix/siglist.c:46
-msgid "Child exited"
-msgstr "El proceso hijo terminó"
+#: catgets/gencat.c:124
+msgid ""
+"-o OUTPUT-FILE [INPUT-FILE]...\n"
+"[OUTPUT-FILE [INPUT-FILE]...]"
+msgstr ""
+"-o FICHERO-SALIDA [FICHERO-ENTRADA]...\n"
+"[FICHERO-SALIDA [FICHERO-ENTRADA]...]"
-# Perdonad que sea tan largo, pero es algo que nunca está de más
-# Creo que mejora al original ;)
-#: sysdeps/generic/siglist.h:47 stdio-common/../sysdeps/unix/siglist.c:47
-msgid "Stopped (tty input)"
-msgstr "Parado (requiere entrada de terminal)"
+#: catgets/gencat.c:232 debug/pcprofiledump.c:208 debug/xtrace.sh:58
+#: elf/ldconfig.c:302 elf/ldd.bash.in:56 elf/sln.c:86 elf/sotruss.ksh:49
+#: elf/sprof.c:371 iconv/iconv_prog.c:408 iconv/iconvconfig.c:380
+#: locale/programs/locale.c:278 locale/programs/localedef.c:371
+#: login/programs/pt_chown.c:92 malloc/memusage.sh:65
+#: malloc/memusagestat.c:539 nscd/nscd.c:415 nss/getent.c:918 nss/makedb.c:231
+#: posix/getconf.c:1122 sunrpc/rpc_main.c:1492 sunrpc/rpcinfo.c:691
+#: sysdeps/unix/sysv/linux/lddlibc4.c:62
+msgid ""
+"For bug reporting instructions, please see:\n"
+"<http://www.gnu.org/software/libc/bugs.html>.\n"
+msgstr ""
+"Para instrucciones sobre informes de fallo, por favor consulte:\n"
+"<http://www.gnu.org/software/libc/bugs.html>.\n"
-# Perdonad que sea tan largo, pero es algo que nunca está de más
-# Creo que mejora al original ;)
-#: sysdeps/generic/siglist.h:48 stdio-common/../sysdeps/unix/siglist.c:48
-msgid "Stopped (tty output)"
-msgstr "Parado (requiere salida por terminal)"
+#: catgets/gencat.c:246 debug/pcprofiledump.c:222 debug/xtrace.sh:66
+#: elf/ldconfig.c:316 elf/ldd.bash.in:39 elf/sotruss.ksh:76 elf/sprof.c:386
+#: iconv/iconv_prog.c:423 iconv/iconvconfig.c:395 locale/programs/locale.c:293
+#: locale/programs/localedef.c:387 login/programs/pt_chown.c:63
+#: malloc/memusage.sh:73 malloc/memusagestat.c:557 nscd/nscd.c:429
+#: nss/getent.c:87 nss/makedb.c:245 posix/getconf.c:1104
+#: sysdeps/unix/sysv/linux/lddlibc4.c:69
+#, c-format
+msgid ""
+"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"
+msgstr ""
+"Copyright (C) %s Free Software Foundation, Inc.\n"
+"Esto es software libre; vea el código fuente para las condiciones de copia.\n"
+"No hay NINGUNA garantía; ni siquiera de COMERCIABILIDAD o IDONEIDAD PARA UN\n"
+"FIN DETERMINADO.\n"
-#: sysdeps/generic/siglist.h:49 stdio-common/../sysdeps/unix/siglist.c:49
-msgid "I/O possible"
-msgstr "Operación de E/S permitida"
+#: catgets/gencat.c:251 debug/pcprofiledump.c:227 debug/xtrace.sh:70
+#: elf/ldconfig.c:321 elf/sprof.c:392 iconv/iconv_prog.c:428
+#: iconv/iconvconfig.c:400 locale/programs/locale.c:298
+#: locale/programs/localedef.c:392 malloc/memusage.sh:77
+#: malloc/memusagestat.c:562 nscd/nscd.c:434 nss/getent.c:92 nss/makedb.c:250
+#: posix/getconf.c:1109
+#, c-format
+msgid "Written by %s.\n"
+msgstr "Escrito por %s.\n"
-#: sysdeps/generic/siglist.h:50 stdio-common/../sysdeps/unix/siglist.c:50
-msgid "CPU time limit exceeded"
-msgstr "Rebasado el límite de tiempo de CPU"
+#: catgets/gencat.c:282
+msgid "*standard input*"
+msgstr "*entrada estándar*"
-#: sysdeps/generic/siglist.h:51 stdio-common/../sysdeps/unix/siglist.c:51
-msgid "File size limit exceeded"
-msgstr "Superado el límite de tamaño de fichero"
+#: catgets/gencat.c:288 iconv/iconv_charmap.c:170 iconv/iconv_prog.c:294
+#: nss/makedb.c:170
+#, c-format
+msgid "cannot open input file `%s'"
+msgstr "no se puede abrir el fichero de entrada `%s'"
-#: sysdeps/generic/siglist.h:52 stdio-common/../sysdeps/unix/siglist.c:52
-msgid "Virtual timer expired"
-msgstr "El temporizador virtual llegó al final"
+#: catgets/gencat.c:417 catgets/gencat.c:494
+msgid "illegal set number"
+msgstr "número de conjunto ilegal"
-# ¿No habría que traducir profile? sv
-# Miré los fuentes, y la última documentación de Glibc
-# No se me ocurre traducción para profile ( así se llamaba
-# en los viejos apple al disco duro de 5 Megas ) em
-# Pero esto no tiene nada que ver, ¿no?
-# "Profiling" es ejecutar un programa midiendo qué partes de él consumen
-# más tiempo. Creo recordar que esto tenía nombre en español, pero no
-# me acuerdo de cuál. sv
-# Gracias por la explicación, sé que era algo referente
-# al trace o debug de un programa. Miro a la alemana.
-#: sysdeps/generic/siglist.h:53 stdio-common/../sysdeps/unix/siglist.c:53
-msgid "Profiling timer expired"
-msgstr "El tiempo de CPU expiró"
+#: catgets/gencat.c:444
+msgid "duplicate set definition"
+msgstr "definición de conjunto duplicada"
-#: sysdeps/generic/siglist.h:54 stdio-common/../sysdeps/unix/siglist.c:54
-msgid "Window changed"
-msgstr "La ventana ha cambiado"
+#: catgets/gencat.c:446 catgets/gencat.c:623 catgets/gencat.c:677
+msgid "this is the first definition"
+msgstr "esta es la primera vez que aparece la definición"
-#: sysdeps/generic/siglist.h:55 stdio-common/../sysdeps/unix/siglist.c:56
-msgid "User defined signal 1"
-msgstr "Señal definida por el usuario 1"
+#: catgets/gencat.c:522
+#, c-format
+msgid "unknown set `%s'"
+msgstr "conjunto `%s' desconocido"
-#: sysdeps/generic/siglist.h:56 stdio-common/../sysdeps/unix/siglist.c:57
-msgid "User defined signal 2"
-msgstr "Señal definida por el usuario 2"
+#: catgets/gencat.c:563
+msgid "invalid quote character"
+msgstr "carácter de cita inválido"
-# ???, siempre lo he usado como trap, nunca encontramos la palabra
-# y es una señal estándar Unix, así que no creo conveniente traducirla
-#: sysdeps/generic/siglist.h:60 stdio-common/../sysdeps/unix/siglist.c:33
-msgid "EMT trap"
-msgstr "`trap' de EMT"
+# descartada (?) sv
+# ¿y así? em
+# por mí, vale. sv+
+#: catgets/gencat.c:576
+#, c-format
+msgid "unknown directive `%s': line ignored"
+msgstr "directiva desconocida `%s': línea pasada por alto"
-#: sysdeps/generic/siglist.h:63 stdio-common/../sysdeps/unix/siglist.c:38
-msgid "Bad system call"
-msgstr "Llamada al sistema errónea"
+#: catgets/gencat.c:621
+msgid "duplicated message number"
+msgstr "número de mensaje duplicado"
-#: sysdeps/generic/siglist.h:66
-msgid "Stack fault"
-msgstr "Fallo en la pila"
+#: catgets/gencat.c:674
+msgid "duplicated message identifier"
+msgstr "identificador de mensaje duplicado"
-#: sysdeps/generic/siglist.h:69
-msgid "Information request"
-msgstr "Petición de información"
+#: catgets/gencat.c:731
+msgid "invalid character: message ignored"
+msgstr "carácter inválido: mensaje descartado"
-#: sysdeps/generic/siglist.h:71
-msgid "Power failure"
-msgstr "Fallo de alimentación"
+#: catgets/gencat.c:774
+msgid "invalid line"
+msgstr "línea inválida"
-#: sysdeps/generic/siglist.h:74 stdio-common/../sysdeps/unix/siglist.c:55
-msgid "Resource lost"
-msgstr "Recurso perdido"
+#: catgets/gencat.c:828
+msgid "malformed line ignored"
+msgstr "una línea incorrecta no se tendrá en cuenta"
-# ¿Qué demonios es esto?
-# ¿Error en el error del sistema desconocido? sv
-#: sysdeps/mach/hurd/mips/dl-machine.c:68
-#: string/../sysdeps/mach/_strerror.c:57
-msgid "Error in unknown error system: "
-msgstr "Error de sistema desconocido: "
+#: catgets/gencat.c:992 catgets/gencat.c:1033 nss/makedb.c:183
+#, c-format
+msgid "cannot open output file `%s'"
+msgstr "no se puede abrir el fichero de salida `%s'"
-#: sysdeps/mach/hurd/mips/dl-machine.c:83
-#: string/../sysdeps/generic/_strerror.c:44
-#: string/../sysdeps/mach/_strerror.c:87
-msgid "Unknown error "
-msgstr "Error desconocido "
+#: catgets/gencat.c:1195 locale/programs/linereader.c:560
+msgid "invalid escape sequence"
+msgstr "secuencia de escape inválida"
+
+#: catgets/gencat.c:1217
+msgid "unterminated message"
+msgstr "mensaje sin terminar"
-#: sysdeps/unix/sysv/linux/lddlibc4.c:64
+#: catgets/gencat.c:1241
#, c-format
-msgid "cannot open `%s'"
-msgstr "no se puede abrir `%s'"
+msgid "while opening old catalog file"
+msgstr "al abrir el fichero de catálogo antiguo"
-#: sysdeps/unix/sysv/linux/lddlibc4.c:68
+#: catgets/gencat.c:1332
#, c-format
-msgid "cannot read header from `%s'"
-msgstr "no se puede leer la cabecera de `%s'"
+msgid "conversion modules not available"
+msgstr "no están disponibles los módulos de conversión"
-#: iconv/iconv_charmap.c:159 iconv/iconv_prog.c:295 catgets/gencat.c:288
+#: catgets/gencat.c:1358
#, c-format
-msgid "cannot open input file `%s'"
-msgstr "no se puede abrir el fichero de entrada `%s'"
+msgid "cannot determine escape character"
+msgstr "no se puede determinar el carácter de escape"
+
+#: debug/pcprofiledump.c:53
+msgid "Don't buffer output"
+msgstr "No hace pasar el resultado a través de un búfer"
+
+# Se admiten sugerencias. sv
+#: debug/pcprofiledump.c:58
+msgid "Dump information generated by PC profiling."
+msgstr "Información de volcado generada mediante `PC profiling'."
+
+#: debug/pcprofiledump.c:61
+msgid "[FILE]"
+msgstr "[FICHERO]"
+
+#: debug/pcprofiledump.c:108
+#, c-format
+msgid "cannot open input file"
+msgstr "no se puede abrir el fichero de entrada"
+
+#: debug/pcprofiledump.c:115
+#, c-format
+msgid "cannot read header"
+msgstr "no se puede leer la cabecera"
+
+#: debug/pcprofiledump.c:179
+#, c-format
+msgid "invalid pointer size"
+msgstr "tamaño de puntero inválido"
+
+#: debug/xtrace.sh:27 debug/xtrace.sh:45
+msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n"
+msgstr "Modo de empleo: xtrace [OPCIÓN]... PROGRAMA [OPCIÓNDEPROGRAMA]...\\n"
+
+#: debug/xtrace.sh:33 malloc/memusage.sh:27
+msgid "Try \\`%s --help' or `%s --usage' for more information.\\n"
+msgstr "Pruebe \\`%s --help' o `%s --usage' para más información.\\n"
+
+#: debug/xtrace.sh:39
+msgid "%s: option '%s' requires an argument.\\n"
+msgstr "%s: la opción '%s' requiere un argumento\\n"
+
+#: debug/xtrace.sh:46
+msgid ""
+"Trace execution of program by printing currently executed function.\n"
+"\n"
+" --data=FILE Don't run the program, just print the data from FILE.\n"
+"\n"
+" -?,--help Print this help and exit\n"
+" --usage Give a short usage message\n"
+" -V,--version Print version information and exit\n"
+"\n"
+"Mandatory arguments to long options are also mandatory for any corresponding\n"
+"short options.\n"
+"\n"
+msgstr ""
+"Sigue la ejecución del programa mostrando la función que se ejecuta actualmente.\n"
+"\n"
+" --data=FICHERO No ejecuta el programa, solamente muestra los datos\n"
+" de FICHERO\n"
+" -?,--help Muestra esta ayuda y finaliza\n"
+" --usage Da un mensaje de uso breve\n"
+" -V,--version Muestra la información de versión y finaliza\n"
+"\n"
+"Los argumentos obligatorios para las opciones largas son también obligatorios\n"
+"para las opciones cortas correspondientes.\n"
+
+#: debug/xtrace.sh:127
+msgid "xtrace: unrecognized option \\`$1'\\n"
+msgstr "xtrace: opción no reconocida \\`$1'\\n"
+
+#: debug/xtrace.sh:140
+msgid "No program name given\\n"
+msgstr "No se ha especificado el nombre del programa\\n"
+
+#: debug/xtrace.sh:148
+#, sh-format
+msgid "executable \\`$program' not found\\n"
+msgstr "no se ha encontrado el ejecutable \\`$program'\\n"
+
+#: debug/xtrace.sh:152
+#, sh-format
+msgid "\\`$program' is no executable\\n"
+msgstr "\\`$program' no es ejecutable\\n"
+
+#: dlfcn/dlinfo.c:64
+msgid "RTLD_SELF used in code not dynamically loaded"
+msgstr "Se ha usado RTLD_SELF en una parte del código que no se cargó dinámicamente"
+
+#: dlfcn/dlinfo.c:73
+msgid "unsupported dlinfo request"
+msgstr "Petición dlinfo no admitida"
+
+#: dlfcn/dlmopen.c:64
+msgid "invalid namespace"
+msgstr "espacio de nombres inválido"
+
+#: dlfcn/dlmopen.c:69
+msgid "invalid mode"
+msgstr "modo inválido"
+
+#: dlfcn/dlopen.c:65
+msgid "invalid mode parameter"
+msgstr "parámetro de modo inválido"
+
+# FIXME: Falta ver si es niño o niña. sv
+#: elf/cache.c:69
+msgid "unknown"
+msgstr "desconocido/a"
+
+#: elf/cache.c:112
+msgid "Unknown OS"
+msgstr "Sistema Operativo desconocido"
+
+#: elf/cache.c:117
+#, c-format
+msgid ", OS ABI: %s %d.%d.%d"
+msgstr ", ABI del SO: %s %d.%d.%d"
+
+#: elf/cache.c:134 elf/ldconfig.c:1305
+#, c-format
+msgid "Can't open cache file %s\n"
+msgstr "No se puede abrir el fichero de caché %s\n"
+
+#: elf/cache.c:148
+#, c-format
+msgid "mmap of cache file failed.\n"
+msgstr "falló la operación `mmap' sobre el fichero de caché.\n"
+
+#: elf/cache.c:152 elf/cache.c:166
+#, c-format
+msgid "File is not a cache file.\n"
+msgstr "El fichero no es un fichero de caché.\n"
+
+#: elf/cache.c:199 elf/cache.c:209
+#, c-format
+msgid "%d libs found in cache `%s'\n"
+msgstr "%d bibliotecas se encontraron en la caché `%s'\n"
+
+#: elf/cache.c:403
+#, c-format
+msgid "Can't create temporary cache file %s"
+msgstr "No se puede crear el fichero temporal de caché %s"
+
+#: elf/cache.c:411 elf/cache.c:421 elf/cache.c:425 elf/cache.c:430
+#, c-format
+msgid "Writing of cache data failed"
+msgstr "Falló la escritura de los datos de la caché"
+
+#: elf/cache.c:435
+#, c-format
+msgid "Changing access rights of %s to %#o failed"
+msgstr "El cambio de los derechos de acceso de %s a %#o falló"
+
+#: elf/cache.c:440
+#, c-format
+msgid "Renaming of %s to %s failed"
+msgstr "Falló el renombramiento de %s a %s"
+
+#: elf/dl-close.c:387 elf/dl-open.c:397
+msgid "cannot create scope list"
+msgstr "no se puede crear la lista de ámbito"
+
+#: elf/dl-close.c:767
+msgid "shared object not open"
+msgstr "el objeto compartido no está abierto"
+
+#: elf/dl-deps.c:114
+msgid "DST not allowed in SUID/SGID programs"
+msgstr "No se permite DST en programas SUID/SGID"
+
+#: elf/dl-deps.c:127
+msgid "empty dynamic string token substitution"
+msgstr "sustitución dinámica de un elemento por una cadena vacía"
+
+# Hmm, me suena que lo que es dinámica aquí es la cadena, no la sustitución.
+# FIXME: Consultarlo. sv
+#: elf/dl-deps.c:133
+#, c-format
+msgid "cannot load auxiliary `%s' because of empty dynamic string token substitution\n"
+msgstr ""
+"no se puede cargar el `%s' auxiliar debido a la sustitución dinámica\n"
+"de un elemento por cadena vacía\n"
+
+#: elf/dl-deps.c:474
+msgid "cannot allocate dependency list"
+msgstr "no se pudo asignar espacio para la lista de dependencias"
+
+#: elf/dl-deps.c:514 elf/dl-deps.c:574
+msgid "cannot allocate symbol search list"
+msgstr "no se puede asignar espacio para la lista de búsqueda de los símbolos"
+
+#: elf/dl-deps.c:554
+msgid "Filters not supported with LD_TRACE_PRELINKING"
+msgstr "No se admiten filtros con LD_TRACE_PRELINKING"
+
+# Véase "A bug's life".
+#: elf/dl-error.c:77
+msgid "DYNAMIC LINKER BUG!!!"
+msgstr "¡¡¡HAY UN BICHO EN EL ENLAZADOR DINÃMICO!!!"
+
+#: elf/dl-error.c:124
+msgid "error while loading shared libraries"
+msgstr "error al cargar las bibliotecas compartidas"
+
+#: elf/dl-fptr.c:88
+msgid "cannot map pages for fdesc table"
+msgstr "no se pueden asignar páginas para la tabla fdesc"
+
+#: elf/dl-fptr.c:192
+msgid "cannot map pages for fptr table"
+msgstr "no se pueden asignar páginas para la tabla fptr"
+
+#: elf/dl-fptr.c:221
+msgid "internal error: symidx out of range of fptr table"
+msgstr "error interno: symidx fuera del rango de la tabla fptr"
+
+#: elf/dl-load.c:471
+msgid "cannot allocate name record"
+msgstr "no se puede asignar el registro del nombre"
+
+# He intentado mejorarlo un poco ...
+#
+#: elf/dl-load.c:548 elf/dl-load.c:664 elf/dl-load.c:749 elf/dl-load.c:862
+msgid "cannot create cache for search path"
+msgstr "no se puede crear un caché para la ruta de búsqueda"
+
+#: elf/dl-load.c:639
+msgid "cannot create RUNPATH/RPATH copy"
+msgstr "no se puede crear una copia RUNPATH/RPATH"
+
+#: elf/dl-load.c:735
+msgid "cannot create search path array"
+msgstr "no se puede crear la matriz de la ruta de búsqueda"
+
+#: elf/dl-load.c:931
+msgid "cannot stat shared object"
+msgstr "no se puede efectuar `stat' sobre el objeto compartido"
+
+#: elf/dl-load.c:1009
+msgid "cannot open zero fill device"
+msgstr "no se puede abrir el dispositivo de `zero fill'"
+
+#: elf/dl-load.c:1055 elf/dl-load.c:2313
+msgid "cannot create shared object descriptor"
+msgstr "no se puede crear el descriptor del objeto compartido"
+
+#: elf/dl-load.c:1074 elf/dl-load.c:1730 elf/dl-load.c:1833
+msgid "cannot read file data"
+msgstr "no se pueden leer los datos del fichero"
+
+#: elf/dl-load.c:1120
+msgid "ELF load command alignment not page-aligned"
+msgstr "El alineamiento de la orden de carga ELF no está alineada a la página"
+
+#: elf/dl-load.c:1127
+msgid "ELF load command address/offset not properly aligned"
+msgstr "La dirección/desplazamiento de la orden de carga ELF no está bien alineada"
+
+#: elf/dl-load.c:1210
+msgid "cannot allocate TLS data structures for initial thread"
+msgstr "no se pueden crear las estructuras de datos TLS para el hilo inicial"
+
+#: elf/dl-load.c:1233
+msgid "cannot handle TLS data"
+msgstr "no se pueden manejar los datos de TLS"
+
+#: elf/dl-load.c:1252
+msgid "object file has no loadable segments"
+msgstr "el fichero objeto no tiene segmentos cargables"
+
+#: elf/dl-load.c:1288
+msgid "failed to map segment from shared object"
+msgstr "fallo al asignar un segmento del objeto compartido"
+
+#: elf/dl-load.c:1314
+msgid "cannot dynamically load executable"
+msgstr "no se puede cargar el ejecutable dinámicamente"
+
+#: elf/dl-load.c:1376
+msgid "cannot change memory protections"
+msgstr "no se pueden cambiar las protecciones de memoria"
+
+#: elf/dl-load.c:1395
+msgid "cannot map zero-fill pages"
+msgstr "no se pueden asignar páginas de tipo `zero-fill'"
+
+#: elf/dl-load.c:1409
+msgid "object file has no dynamic section"
+msgstr "el fichero objeto no tiene sección dinámica"
+
+#: elf/dl-load.c:1432
+msgid "shared object cannot be dlopen()ed"
+msgstr "no se puede efectuar dlopen() sobre el objeto compartido"
+
+#: elf/dl-load.c:1445
+msgid "cannot allocate memory for program header"
+msgstr "no se puede asignar memoria para la cabecera del programa"
+
+#: elf/dl-load.c:1462 elf/dl-open.c:180
+msgid "invalid caller"
+msgstr "llamante inválido"
+
+#: elf/dl-load.c:1501
+msgid "cannot enable executable stack as shared object requires"
+msgstr "no se puede activar la pila ejecutable tal y como el objeto compartido necesita"
+
+#: elf/dl-load.c:1514
+msgid "cannot close file descriptor"
+msgstr "no se puede cerrar el descriptor de fichero"
+
+#: elf/dl-load.c:1730
+msgid "file too short"
+msgstr "fichero demasiado corto"
+
+#: elf/dl-load.c:1766
+msgid "invalid ELF header"
+msgstr "cabecera ELF inválida"
+
+#: elf/dl-load.c:1778
+msgid "ELF file data encoding not big-endian"
+msgstr "La codificación de los datos del fichero ELF no es `big-endian'"
+
+#: elf/dl-load.c:1780
+msgid "ELF file data encoding not little-endian"
+msgstr "La codificación de los datos del fichero ELF no es `little-endian'"
+
+#: elf/dl-load.c:1784
+msgid "ELF file version ident does not match current one"
+msgstr "La identificación de versión del fichero ELF no encaja con la actual"
+
+#: elf/dl-load.c:1788
+msgid "ELF file OS ABI invalid"
+msgstr "ABI del OS del fichero ELF inválida"
+
+#: elf/dl-load.c:1791
+msgid "ELF file ABI version invalid"
+msgstr "Versión de ABI del fichero ELF inválida"
+
+#: elf/dl-load.c:1794
+msgid "nonzero padding in e_ident"
+msgstr "relleno con no ceros en e_ident"
+
+#: elf/dl-load.c:1797
+msgid "internal error"
+msgstr "error interno"
+
+#: elf/dl-load.c:1804
+msgid "ELF file version does not match current one"
+msgstr "La versión del fichero ELF no coincide con la actual"
+
+#: elf/dl-load.c:1812
+msgid "only ET_DYN and ET_EXEC can be loaded"
+msgstr "solamente pueden cargarse ET_DYN y ET_EXEC"
+
+#: elf/dl-load.c:1818
+msgid "ELF file's phentsize not the expected size"
+msgstr "El `phentsize' del fichero ELF no es el tamaño esperado"
+
+#: elf/dl-load.c:2332
+msgid "wrong ELF class: ELFCLASS64"
+msgstr "clase ELF errónea: ELFCLASS64"
+
+#: elf/dl-load.c:2333
+msgid "wrong ELF class: ELFCLASS32"
+msgstr "clase ELF errónea: ELFCLASS32"
+
+#: elf/dl-load.c:2336
+msgid "cannot open shared object file"
+msgstr "no se puede abrir el fichero del objeto compartido"
+
+#: elf/dl-lookup.c:757
+msgid "relocation error"
+msgstr "error de relocalización"
+
+#: elf/dl-lookup.c:785
+msgid "symbol lookup error"
+msgstr "error de búsqueda de símbolo"
+
+#: elf/dl-open.c:115
+msgid "cannot extend global scope"
+msgstr "no se puede extender el ámbito global"
+
+#: elf/dl-open.c:440
+msgid "TLS generation counter wrapped! Please report this."
+msgstr "¡El contador de generaciones TLS ha vuelto a cero! Por favor envíe un informe."
+
+#: elf/dl-open.c:462
+msgid "cannot load any more object with static TLS"
+msgstr "no se puede cargar ningún objeto más con TLS estático"
+
+#: elf/dl-open.c:511
+msgid "invalid mode for dlopen()"
+msgstr "modo inválido para dlopen()"
+
+#: elf/dl-open.c:528
+msgid "no more namespaces available for dlmopen()"
+msgstr "no hay más espacios de nombres disponibles para dlmopen()"
+
+#: elf/dl-open.c:547
+msgid "invalid target namespace in dlmopen()"
+msgstr "espacio de nombres objetivo inválido para dlmopen()"
+
+#: elf/dl-reloc.c:120
+msgid "cannot allocate memory in static TLS block"
+msgstr "No se pudo asignar memoria en el bloque TLS estático"
+
+#: elf/dl-reloc.c:212
+msgid "cannot make segment writable for relocation"
+msgstr "no se puede hacer el segmento escribible para su relocalización"
+
+#: elf/dl-reloc.c:275
+#, c-format
+msgid "%s: no PLTREL found in object %s\n"
+msgstr "%s no se encontró ningún PLTREL en el objeto %s\n"
+
+#: elf/dl-reloc.c:286
+#, c-format
+msgid "%s: out of memory to store relocation results for %s\n"
+msgstr "%s: memoria agotada para almacenar los resultados de relocalización para %s\n"
+
+# Se admiten sugerencias. sv
+#: elf/dl-reloc.c:302
+msgid "cannot restore segment prot after reloc"
+msgstr "no se puede restaurar el `prot' del segmento después de la relocalización"
+
+#: elf/dl-reloc.c:331
+msgid "cannot apply additional memory protection after relocation"
+msgstr "no se pueden aplicar protecciones de memoria adicionales después de relocalizar"
+
+#: elf/dl-sym.c:162
+msgid "RTLD_NEXT used in code not dynamically loaded"
+msgstr "Se ha usado RTLD_NEXT en una parte del código que no se cargó dinámicamente"
+
+#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
+msgid "cannot create capability list"
+msgstr "no se puede crear la lista de capacidades"
+
+#: elf/dl-tls.c:861
+msgid "cannot create TLS data structures"
+msgstr "no se pueden crear las estructuras de datos TLS"
+
+#: elf/dl-version.c:172
+msgid "version lookup error"
+msgstr "error de búsqueda de versión"
+
+#: elf/dl-version.c:303
+msgid "cannot allocate version reference table"
+msgstr "no se puede asignar espacio para la tabla de versiones de referencia"
+
+#: elf/ldconfig.c:141
+msgid "Print cache"
+msgstr "Muestra la caché"
+
+#: elf/ldconfig.c:142
+msgid "Generate verbose messages"
+msgstr "Genera mensajes explicativos"
+
+#: elf/ldconfig.c:143
+msgid "Don't build cache"
+msgstr "No crea caché"
+
+#: elf/ldconfig.c:144
+msgid "Don't generate links"
+msgstr "No genera enlaces"
+
+#: elf/ldconfig.c:145
+msgid "Change to and use ROOT as root directory"
+msgstr "Cambia a RAÃZ y lo utiliza como directorio raíz"
+
+#: elf/ldconfig.c:145
+msgid "ROOT"
+msgstr "RAÃZ"
+
+#: elf/ldconfig.c:146
+msgid "CACHE"
+msgstr "CACHÉ"
+
+#: elf/ldconfig.c:146
+msgid "Use CACHE as cache file"
+msgstr "Utiliza CACHE como fichero de caché"
+
+#: elf/ldconfig.c:147
+msgid "CONF"
+msgstr "CONF"
+
+#: elf/ldconfig.c:147
+msgid "Use CONF as configuration file"
+msgstr "Utiliza CONF como fichero de configuración"
+
+#: elf/ldconfig.c:148
+msgid "Only process directories specified on the command line. Don't build cache."
+msgstr ""
+"Procesa únicamente los directorios especificados en la línea de órdenes.\n"
+"No crea la caché."
+
+#: elf/ldconfig.c:149
+msgid "Manually link individual libraries."
+msgstr "Enlace bibliotecas individuales manualmente."
+
+#: elf/ldconfig.c:150
+msgid "FORMAT"
+msgstr "FORMATO"
+
+#: elf/ldconfig.c:150
+msgid "Format to use: new, old or compat (default)"
+msgstr "Formato utilizado: new, old o compat (predeterminado)"
+
+# Antes decía: .rhosts no es un fichero regular
+#: elf/ldconfig.c:151
+msgid "Ignore auxiliary cache file"
+msgstr "Descarta el fichero de caché auxiliar"
+
+# FIXME: Why So Many Uppercase Letters? sv
+#: elf/ldconfig.c:159
+msgid "Configure Dynamic Linker Run Time Bindings."
+msgstr "Configura las asociaciones de tiempo de ejecución del enlazador dinámico"
+
+#: elf/ldconfig.c:339
+#, c-format
+msgid "Path `%s' given more than once"
+msgstr "Se ha dado la ruta `%s' más de una vez"
+
+#: elf/ldconfig.c:379
+#, c-format
+msgid "%s is not a known library type"
+msgstr "%s no es un tipo de biblioteca conocido"
+
+#: elf/ldconfig.c:407
+#, c-format
+msgid "Can't stat %s"
+msgstr "No se puede efectuar `stat' sobre %s"
+
+#: elf/ldconfig.c:481
+#, c-format
+msgid "Can't stat %s\n"
+msgstr "No se puede efectuar `stat' sobre %s\n"
+
+#: elf/ldconfig.c:491
+#, c-format
+msgid "%s is not a symbolic link\n"
+msgstr "%s no es un enlace simbólico\n"
+
+#: elf/ldconfig.c:510
+#, c-format
+msgid "Can't unlink %s"
+msgstr "No se puede efectuar `unlink' sobre %s"
+
+#: elf/ldconfig.c:516
+#, c-format
+msgid "Can't link %s to %s"
+msgstr "No se puede crear un enlace de %s a %s"
+
+#: elf/ldconfig.c:522
+msgid " (changed)\n"
+msgstr " (cambiado)\n"
+
+#: elf/ldconfig.c:524
+msgid " (SKIPPED)\n"
+msgstr " (SALTADO)\n"
+
+#: elf/ldconfig.c:579
+#, c-format
+msgid "Can't find %s"
+msgstr "No se encuentra %s"
+
+#: elf/ldconfig.c:595 elf/ldconfig.c:768 elf/ldconfig.c:827 elf/ldconfig.c:861
+#, c-format
+msgid "Cannot lstat %s"
+msgstr "No se puede efectuar `lstat' sobre %s"
+
+#: elf/ldconfig.c:602
+#, c-format
+msgid "Ignored file %s since it is not a regular file."
+msgstr "Descartado el fichero %s dado que no es un fichero regular."
+
+#: elf/ldconfig.c:611
+#, c-format
+msgid "No link created since soname could not be found for %s"
+msgstr "No se creó el enlace ya que no se encontró el soname para %s"
+
+#: elf/ldconfig.c:694
+#, c-format
+msgid "Can't open directory %s"
+msgstr "No se puede abrir el directorio %s"
+
+#: elf/ldconfig.c:786 elf/ldconfig.c:848 elf/readlib.c:91
+#, c-format
+msgid "Input file %s not found.\n"
+msgstr "No se encontró el fichero de entrada %s.\n"
-#: iconv/iconv_charmap.c:177 iconv/iconv_prog.c:313
+#: elf/ldconfig.c:793
+#, c-format
+msgid "Cannot stat %s"
+msgstr "No se puede efectuar `stat' sobre %s"
+
+#: elf/ldconfig.c:922
+#, c-format
+msgid "libc5 library %s in wrong directory"
+msgstr "biblioteca libc5 %s en un directorio equivocado"
+
+#: elf/ldconfig.c:925
+#, c-format
+msgid "libc6 library %s in wrong directory"
+msgstr "biblioteca libc6 %s en un directorio equivocado"
+
+#: elf/ldconfig.c:928
+#, c-format
+msgid "libc4 library %s in wrong directory"
+msgstr "biblioteca libc4 %s en un directorio equivocado"
+
+#: elf/ldconfig.c:956
+#, c-format
+msgid "libraries %s and %s in directory %s have same soname but different type."
+msgstr "las bibliotecas %s y %s en el directorio %s tienen el mismo soname pero distinto tipo."
+
+#: elf/ldconfig.c:1065
+#, c-format
+msgid "Can't open configuration file %s"
+msgstr "No se puede abrir el fichero de configuración `%s'"
+
+#: elf/ldconfig.c:1129
+#, c-format
+msgid "%s:%u: bad syntax in hwcap line"
+msgstr "%s:%u: sintaxis errónea en línea hwcap"
+
+#: elf/ldconfig.c:1135
+#, c-format
+msgid "%s:%u: hwcap index %lu above maximum %u"
+msgstr "%s:%u: el índice de hwcap %lu está por encima del máximo %u"
+
+#: elf/ldconfig.c:1142 elf/ldconfig.c:1150
+#, c-format
+msgid "%s:%u: hwcap index %lu already defined as %s"
+msgstr "%s:%u: el índice de hwcap %lu ya está definido como %s"
+
+#: elf/ldconfig.c:1153
+#, c-format
+msgid "%s:%u: duplicate hwcap %lu %s"
+msgstr "%s:%u: hwcap duplicado %lu %s"
+
+#: elf/ldconfig.c:1175
+#, c-format
+msgid "need absolute file name for configuration file when using -r"
+msgstr "se necesita un nombre de fichero absoluto para el fichero de configuración cuando se utiliza -r"
+
+#: elf/ldconfig.c:1182 locale/programs/xmalloc.c:70 malloc/obstack.c:434
+#: malloc/obstack.c:436 posix/getconf.c:1077 posix/getconf.c:1297
+#, c-format
+msgid "memory exhausted"
+msgstr "memoria agotada"
+
+#: elf/ldconfig.c:1214
+#, c-format
+msgid "%s:%u: cannot read directory %s"
+msgstr "%s:%u: no se puede leer el directorio %s"
+
+#: elf/ldconfig.c:1258
+#, c-format
+msgid "relative path `%s' used to build cache"
+msgstr "se usa el camino relativo `%s' para construir el caché"
+
+#: elf/ldconfig.c:1284
+#, c-format
+msgid "Can't chdir to /"
+msgstr "No se puede cambiar al directorio /"
+
+#: elf/ldconfig.c:1325
+#, c-format
+msgid "Can't open cache file directory %s\n"
+msgstr "No se puede leer el directorio de ficheros de caché %s\n"
+
+#: elf/ldd.bash.in:43
+msgid "Written by %s and %s.\n"
+msgstr "Escrito por %s y %s.\n"
+
+#: elf/ldd.bash.in:48
+msgid ""
+"Usage: ldd [OPTION]... FILE...\n"
+" --help print this help and exit\n"
+" --version print version information and exit\n"
+" -d, --data-relocs process data relocations\n"
+" -r, --function-relocs process data and function relocations\n"
+" -u, --unused print unused direct dependencies\n"
+" -v, --verbose print all information\n"
+msgstr ""
+"Modo de empleo: ldd [OPCIÓN]... FICHERO...\n"
+" --help muestra esta ayuda y finaliza\n"
+" --version muestra la versión y finaliza\n"
+" -d, --data-relocs procesa las relocalizaciones de datos\n"
+" -r, --function-relocs procesa las relocalizaciones de datos y de funciones\n"
+" -u, --unused muestra las dependencias directas no utilizadas\n"
+" -v, --verbose muestra toda la información\n"
+
+#: elf/ldd.bash.in:82
+msgid "ldd: option \\`$1' is ambiguous"
+msgstr "ldd: la opción \\`$1' es ambigua"
+
+#: elf/ldd.bash.in:89
+msgid "unrecognized option"
+msgstr "opción no reconocida"
+
+#: elf/ldd.bash.in:90 elf/ldd.bash.in:128
+msgid "Try \\`ldd --help' for more information."
+msgstr "Pruebe \\`ldd --help' para más información."
+
+#: elf/ldd.bash.in:127
+msgid "missing file arguments"
+msgstr "faltan los ficheros de argumentos"
+
+#. TRANS No such file or directory. This is a ``file doesn't exist'' error
+#. TRANS for ordinary files that are referenced in contexts where they are
+#. TRANS expected to already exist.
+#: elf/ldd.bash.in:150 sysdeps/gnu/errlist.c:36
+msgid "No such file or directory"
+msgstr "No existe el fichero o el directorio"
+
+# Antes decía: .rhosts no es un fichero regular
+#: elf/ldd.bash.in:153 inet/rcmd.c:488
+msgid "not regular file"
+msgstr "no es un fichero regular"
+
+#: elf/ldd.bash.in:156
+msgid "warning: you do not have execution permission for"
+msgstr "atención: no tiene permiso de ejecitación para"
+
+#: elf/ldd.bash.in:185
+msgid "\tnot a dynamic executable"
+msgstr "\tno es un ejecutable dinámico"
+
+#: elf/ldd.bash.in:193
+msgid "exited with unknown exit code"
+msgstr "salió con estado de salida desconocido"
+
+#: elf/ldd.bash.in:198
+msgid "error: you do not have read permission for"
+msgstr "error: no tiene permiso de lectura para"
+
+#: elf/readelflib.c:35
+#, c-format
+msgid "file %s is truncated\n"
+msgstr "el fichero %s está truncado\n"
+
+#: elf/readelflib.c:67
+#, c-format
+msgid "%s is a 32 bit ELF file.\n"
+msgstr "%s es un fichero ELF de 32 bits.\n"
+
+#: elf/readelflib.c:69
+#, c-format
+msgid "%s is a 64 bit ELF file.\n"
+msgstr "%s es un fichero ELF de 64 bits.\n"
+
+#: elf/readelflib.c:71
+#, c-format
+msgid "Unknown ELFCLASS in file %s.\n"
+msgstr "ELFCLASS desconocido en el fichero %s.\n"
+
+#: elf/readelflib.c:78
+#, c-format
+msgid "%s is not a shared object file (Type: %d).\n"
+msgstr "%s no es un fichero `shared object' (Tipo: %d).\n"
+
+#: elf/readelflib.c:109
+#, c-format
+msgid "more than one dynamic segment\n"
+msgstr "más de un segmento dinámico\n"
+
+#: elf/readlib.c:97
+#, c-format
+msgid "Cannot fstat file %s.\n"
+msgstr "No se puede efectuar `fstat' sobre el fichero %s.\n"
+
+#: elf/readlib.c:108
+#, c-format
+msgid "File %s is empty, not checked."
+msgstr "El fichero %s está vacío, no se comprueba."
+
+#: elf/readlib.c:114
+#, c-format
+msgid "File %s is too small, not checked."
+msgstr "El fichero %s es demasiado pequeño, no se comprueba."
+
+#: elf/readlib.c:124
+#, c-format
+msgid "Cannot mmap file %s.\n"
+msgstr "No se puede efectuar `mmap' sobre el fichero %s.\n"
+
+#: elf/readlib.c:162
+#, c-format
+msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n"
+msgstr "%s no es un fichero ELF - tiene los bytes mágicos equivocados en el comienzo.\n"
+
+#: elf/sln.c:85
+#, c-format
+msgid ""
+"Usage: sln src dest|file\n"
+"\n"
+msgstr ""
+"Modo de empleo: sln orig desti|fichero\n"
+"\n"
+
+#: elf/sln.c:110
+#, c-format
+msgid "%s: file open error: %m\n"
+msgstr "%s: error al abrir el fichero: %m\n"
+
+#: elf/sln.c:147
+#, c-format
+msgid "No target in line %d\n"
+msgstr "No hay ningún objetivo en la línea %d\n"
+
+#: elf/sln.c:179
+#, c-format
+msgid "%s: destination must not be a directory\n"
+msgstr "%s: el destino no debe ser un directorio\n"
+
+#: elf/sln.c:185
+#, c-format
+msgid "%s: failed to remove the old destination\n"
+msgstr "%s: fallo al borrar el destino antiguo\n"
+
+# ¿Qué tiene de malo "inválida"? sv
+# Jopé, ¿y qué tiene de malo no válida?
+# usuario inválido tiene un doble sentido claro
+# ya que uso usuario no válido me parece bien usar
+# tambien opción no válida, aunque solo sea de vez
+# en cuando em
+#
+# Pues que *inválida* existe. Piensa en retroreferencia, por ejemplo.
+# Se puede poner retroreferencia porque significa referencia hacia atrás.
+# (Bueno, en este caso esa palabra se usa poco, pero inválida no). sv+
+#
+# Después de leer "1984", lo cambio.
+# Aquí y en todas partes. sv
+#
+#: elf/sln.c:193
+#, c-format
+msgid "%s: invalid destination: %s\n"
+msgstr "%s: destino inválido: %s\n"
+
+#: elf/sln.c:208 elf/sln.c:217
+#, c-format
+msgid "Invalid link from \"%s\" to \"%s\": %s\n"
+msgstr "Enlace inválido de \"%s\" a \"%s\": %s\n"
+
+#: elf/sotruss.ksh:33
+#, sh-format
+msgid ""
+"Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n"
+" -F, --from FROMLIST trace calls from objects on FORMLIST\n"
+" -T, --to TOLIST trace calls to objects on TOLIST\n"
+"\n"
+" -e, --exit also show exits from the function calls\n"
+" -f, --follow trace child processes\n"
+" -o, --output FILENAME write output to FILENAME (or FILENAME.$PID in case\n"
+"\t\t\t -f is also used) instead of standard error\n"
+"\n"
+" --help print this help and exit\n"
+" --version print version information and exit"
+msgstr ""
+"Modo de empleo: sotruss [OPCIÓN...] [--] EJECUTABLE [OPCIÓN-DEL-EJECUTABLE...]\n"
+" -F, --from LISTA_DE sigue las llamadas de objetos en LISTA_DE\n"
+" -T, --to LISTA_A sigue las llamadas a objetos en LISTA_A\n"
+"\n"
+" -e, --exit muestra también la salidas de las llamadas a función\n"
+" -f, --follow sigue los procesos hijos\n"
+" -o, --output FICHERO escribe el resultado en FICHERO (o en FICHERO.$PID si se\n"
+" utiliza también -f) en lugar de la salida de error estándar\n"
+"\n"
+" --help muestra esta ayuda y finaliza\n"
+" --version muestra la información de versión y finaliza"
+
+#: elf/sotruss.ksh:46
+msgid "Mandatory arguments to long options are also mandatory for any corresponding\\nshort options.\\n"
+msgstr ""
+"Los argumentos obligatorios para las opciones largas son\n"
+"también obligatorios para las opciones cortas correspondientes."
+
+#: elf/sotruss.ksh:56
+msgid "%s: option requires an argument -- '%s'\\n"
+msgstr "%s: la opción requiere un argumento -- '%c'\\n"
+
+#: elf/sotruss.ksh:57 elf/sotruss.ksh:68 elf/sotruss.ksh:134
+msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
+msgstr "Pruebe \\`%s --help' o `%s --usage' para más información.\\n"
+
+#: elf/sotruss.ksh:62
+msgid "%s: option is ambiguous; possibilities:"
+msgstr "%s: la opción es ambigua; posibilidades:"
+
+#: elf/sotruss.ksh:80
+msgid "Written by %s.\\n"
+msgstr "Escrito por %s.\\n"
+
+#: elf/sotruss.ksh:87
+msgid ""
+"Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]\n"
+"\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\\n"
+msgstr ""
+"Modo de empleo: %s [-ef] [-F LISTA_DE] [-o FICHERO] [-T LISTA_A] [--exit]\n"
+"\t [--follow] [--from LISTA_DE] [--output FICHERO] [--to LISTA_A]\\n"
+
+#: elf/sotruss.ksh:133
+msgid "%s: unrecognized option '%c%s'\\n"
+msgstr "%s: opción no reconocida '%c%s'\\n"
+
+#: elf/sprof.c:77
+msgid "Output selection:"
+msgstr "Selección del resultado:"
+
+#: elf/sprof.c:79
+msgid "print list of count paths and their number of use"
+msgstr "muestra la lista de contadores de ruta y su número de uso"
+
+#: elf/sprof.c:81
+msgid "generate flat profile with counts and ticks"
+msgstr "genera un `profile' plano con contadores y `ticks'"
+
+#: elf/sprof.c:82
+msgid "generate call graph"
+msgstr "genera el grafo de llamadas"
+
+# ¿profiling? sv
+#: elf/sprof.c:89
+msgid "Read and display shared object profiling data."
+msgstr "Lee y muestra los datos de `profiling' del objeto compartido."
+
+#: elf/sprof.c:94
+msgid "SHOBJ [PROFDATA]"
+msgstr "SHOBJ [DATOSPROF]"
+
+#: elf/sprof.c:431
+#, c-format
+msgid "failed to load shared object `%s'"
+msgstr "fallo al cargar el objeto compartido `%s'"
+
+#: elf/sprof.c:440
+#, c-format
+msgid "cannot create internal descriptors"
+msgstr "no se pueden crear descriptores internos"
+
+#: elf/sprof.c:559
+#, c-format
+msgid "Reopening shared object `%s' failed"
+msgstr "La reapertura del objeto compartido `%s' falló"
+
+#: elf/sprof.c:566 elf/sprof.c:660
+#, c-format
+msgid "reading of section headers failed"
+msgstr "falló la lectura de las cabeceras de sección"
+
+# Estupendo, entre section, header, string y table hay 4! posibilidades...
+#: elf/sprof.c:574 elf/sprof.c:668
+#, c-format
+msgid "reading of section header string table failed"
+msgstr "falló la lectura de la tabla de cadenas de cabeceras de sección"
+
+#: elf/sprof.c:600
+#, c-format
+msgid "*** Cannot read debuginfo file name: %m\n"
+msgstr "*** No se puede leer el nombre del fichero de información de depuración: %m\n"
+
+#: elf/sprof.c:620
+#, c-format
+msgid "cannot determine file name"
+msgstr "no se puede determinar el nombre del fichero"
+
+#: elf/sprof.c:653
+#, c-format
+msgid "reading of ELF header failed"
+msgstr "falló la lectura de la cabecera ELF"
+
+# Duda: stripped.
+#: elf/sprof.c:689
+#, c-format
+msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
+msgstr "*** El fichero `%s' está `stripped': no es posible un análisis detallado\n"
+
+#: elf/sprof.c:719
+#, c-format
+msgid "failed to load symbol data"
+msgstr "fallo al cargar los datos del símbolo"
+
+#: elf/sprof.c:784
+#, c-format
+msgid "cannot load profiling data"
+msgstr "no se pueden cargar los datos de `profiling'"
+
+#: elf/sprof.c:793
+#, c-format
+msgid "while stat'ing profiling data file"
+msgstr "al ejecutar `stat' sobre el fichero de datos de `profiling'"
+
+#: elf/sprof.c:801
+#, c-format
+msgid "profiling data file `%s' does not match shared object `%s'"
+msgstr ""
+"el fichero de datos para `profiling' %s no se corresponde con el\n"
+"objeto compartido `%s'"
+
+#: elf/sprof.c:812
+#, c-format
+msgid "failed to mmap the profiling data file"
+msgstr "no se pudo hacer mmap con el fichero de datos de `profile'"
+
+# Se admiten sugerencias para el "profiling" sv.
+#: elf/sprof.c:820
+#, c-format
+msgid "error while closing the profiling data file"
+msgstr "error al cerrar el fichero de datos de `profiling'"
+
+#: elf/sprof.c:829 elf/sprof.c:927
+#, c-format
+msgid "cannot create internal descriptor"
+msgstr "no se puede crear un descriptor interno"
+
+#: elf/sprof.c:903
+#, c-format
+msgid "`%s' is no correct profile data file for `%s'"
+msgstr "`%s' no es un fichero de datos para `profile' correcto para `%s'"
+
+#: elf/sprof.c:1084 elf/sprof.c:1142
+#, c-format
+msgid "cannot allocate symbol data"
+msgstr "no se puede asignar espacio para los datos del símbolo"
+
+#: iconv/iconv_charmap.c:142 iconv/iconv_prog.c:446
+#, c-format
+msgid "cannot open output file"
+msgstr "no se puede abrir el fichero de salida"
+
+#: iconv/iconv_charmap.c:188 iconv/iconv_prog.c:312
#, c-format
msgid "error while closing input `%s'"
msgstr "error al cerrar la entrada `%s'"
-#: iconv/iconv_charmap.c:443
+#: iconv/iconv_charmap.c:462
#, c-format
msgid "illegal input sequence at position %Zd"
-msgstr "secuencia de entrada ilegal en la posición %Zd"
+msgstr "secuencia de entrada ilegal en la posición %Zd"
-#: iconv/iconv_charmap.c:462 iconv/iconv_prog.c:506
+#: iconv/iconv_charmap.c:481 iconv/iconv_prog.c:537
+#, c-format
msgid "incomplete character or shift sequence at end of buffer"
-msgstr "carácter o secuencia de desplazamiento incompleta al final del búfer"
+msgstr "carácter o secuencia de desplazamiento incompleta al final del búfer"
-#: iconv/iconv_charmap.c:507 iconv/iconv_charmap.c:543 iconv/iconv_prog.c:549
-#: iconv/iconv_prog.c:585
+#: iconv/iconv_charmap.c:526 iconv/iconv_charmap.c:562 iconv/iconv_prog.c:580
+#: iconv/iconv_prog.c:616
+#, c-format
msgid "error while reading the input"
msgstr "error al leer la entrada"
-#: iconv/iconv_charmap.c:525 iconv/iconv_prog.c:567
+#: iconv/iconv_charmap.c:544 iconv/iconv_prog.c:598
+#, c-format
msgid "unable to allocate buffer for input"
-msgstr "no se puede asignar espacio para el búfer de entrada"
+msgstr "no se puede asignar espacio para el búfer de entrada"
-#: iconv/iconv_prog.c:61
+#: iconv/iconv_prog.c:60
msgid "Input/Output format specification:"
-msgstr "Especificación de formato de Entrada/Salida:"
+msgstr "Especificación de formato de Entrada/Salida:"
-#: iconv/iconv_prog.c:62
+#: iconv/iconv_prog.c:61
msgid "encoding of original text"
-msgstr "codificación del texto original"
+msgstr "codificación del texto original"
-#: iconv/iconv_prog.c:63
+#: iconv/iconv_prog.c:62
msgid "encoding for output"
-msgstr "codificación para el resultado"
+msgstr "codificación para el resultado"
-#: iconv/iconv_prog.c:64
+#: iconv/iconv_prog.c:63
msgid "Information:"
-msgstr "Información:"
+msgstr "Información:"
-#: iconv/iconv_prog.c:65
+#: iconv/iconv_prog.c:64
msgid "list all known coded character sets"
msgstr "lista todos los juegos de caracteres conocidos"
-#: iconv/iconv_prog.c:66 locale/programs/localedef.c:128
+#: iconv/iconv_prog.c:65 locale/programs/localedef.c:127
msgid "Output control:"
msgstr "Control del resultado:"
-#: iconv/iconv_prog.c:67
+#: iconv/iconv_prog.c:66
msgid "omit invalid characters from output"
-msgstr "se omiten los caracteres inválidos en la salida"
+msgstr "se omiten los caracteres inválidos en la salida"
-#: iconv/iconv_prog.c:68
+#: iconv/iconv_prog.c:67
msgid "output file"
msgstr "fichero de salida"
-#: iconv/iconv_prog.c:69
+#: iconv/iconv_prog.c:68
msgid "suppress warnings"
msgstr "suprime los avisos"
-#: iconv/iconv_prog.c:70
+#: iconv/iconv_prog.c:69
msgid "print progress information"
-msgstr "muestra información sobre el desarrollo"
+msgstr "muestra información sobre el desarrollo"
-#: iconv/iconv_prog.c:75
+#: iconv/iconv_prog.c:74
msgid "Convert encoding of given files from one encoding to another."
-msgstr "Convierte la codificación de los ficheros dados de una codificación a otra."
+msgstr "Convierte la codificación de los ficheros dados de una codificación a otra."
-#: iconv/iconv_prog.c:79
+#: iconv/iconv_prog.c:78
msgid "[FILE...]"
msgstr "[FICHERO...]"
-#: iconv/iconv_prog.c:201
-msgid "cannot open output file"
-msgstr "no se puede abrir el fichero de salida"
-
-#: iconv/iconv_prog.c:243
+#: iconv/iconv_prog.c:234
#, c-format
msgid "conversions from `%s' and to `%s' are not supported"
-msgstr "no se admite la conversión de `%s' a `%s'"
+msgstr "no se admiten las conversiones desde `%s' y hacia `%s'"
-#: iconv/iconv_prog.c:248
+#: iconv/iconv_prog.c:239
#, c-format
msgid "conversion from `%s' is not supported"
-msgstr "no se admite la conversión de `%s'"
+msgstr "no se admite la conversión de `%s'"
-#: iconv/iconv_prog.c:255
+#: iconv/iconv_prog.c:246
#, c-format
msgid "conversion to `%s' is not supported"
-msgstr "no se admite la conversión a `%s'"
+msgstr "no se admite la conversión a `%s'"
-#: iconv/iconv_prog.c:259
+#: iconv/iconv_prog.c:250
#, c-format
msgid "conversion from `%s' to `%s' is not supported"
-msgstr "no se admite la conversión de `%s' a `%s'"
+msgstr "no se admite la conversión de `%s' a `%s'"
-#: iconv/iconv_prog.c:265
+#: iconv/iconv_prog.c:260
+#, c-format
msgid "failed to start conversion processing"
-msgstr "fallo al comenzar el proceso de conversión"
+msgstr "fallo al comenzar el proceso de conversión"
-#: iconv/iconv_prog.c:360
+#: iconv/iconv_prog.c:358
+#, c-format
msgid "error while closing output file"
msgstr "error al cerrar el fichero de salida"
-#: iconv/iconv_prog.c:409 iconv/iconvconfig.c:357 locale/programs/locale.c:279
-#: locale/programs/localedef.c:372 catgets/gencat.c:233
-#: malloc/memusagestat.c:602 debug/pcprofiledump.c:199
-msgid "Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"
-msgstr "Comunicar bichos usando el programa `glibcbug' a <bugs@gnu.org>.\n"
-
-#: iconv/iconv_prog.c:423 iconv/iconvconfig.c:371 locale/programs/locale.c:292
-#: locale/programs/localedef.c:386 catgets/gencat.c:246 posix/getconf.c:913
-#: nss/getent.c:74 nscd/nscd.c:355 nscd/nscd_nischeck.c:90 elf/ldconfig.c:274
-#: elf/sprof.c:349
-#, c-format
-msgid ""
-"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"
-msgstr ""
-"Copyright (C) %s Free Software Foundation, Inc.\n"
-"Esto es software libre; vea el código fuente para las condiciones de copia.\n"
-"No hay NINGUNA garantía; ni siquiera de COMERCIABILIDAD o IDONEIDAD PARA UN\n"
-"FIN DETERMINADO.\n"
-
-#: iconv/iconv_prog.c:428 iconv/iconvconfig.c:376 locale/programs/locale.c:297
-#: locale/programs/localedef.c:391 catgets/gencat.c:251 posix/getconf.c:918
-#: nss/getent.c:79 nscd/nscd.c:360 nscd/nscd_nischeck.c:95 elf/ldconfig.c:279
-#: elf/sprof.c:355
+#: iconv/iconv_prog.c:456
#, c-format
-msgid "Written by %s.\n"
-msgstr "Escrito por %s.\n"
-
-#: iconv/iconv_prog.c:458 iconv/iconv_prog.c:484
msgid "conversion stopped due to problem in writing the output"
-msgstr "la conversión se ha detenido debido a un problema al escribir el resultado"
+msgstr "la conversión se ha detenido debido a un problema al escribir el resultado"
-#: iconv/iconv_prog.c:502
+#: iconv/iconv_prog.c:533
#, c-format
msgid "illegal input sequence at position %ld"
-msgstr "secuencia de entrada ilegal en la posición %ld"
+msgstr "secuencia de entrada ilegal en la posición %ld"
-#: iconv/iconv_prog.c:510
+#: iconv/iconv_prog.c:541
+#, c-format
msgid "internal error (illegal descriptor)"
msgstr "error interno (descriptor ilegal)"
-#: iconv/iconv_prog.c:513
+#: iconv/iconv_prog.c:544
#, c-format
msgid "unknown iconv() error %d"
msgstr "error de iconv() desconocido %d"
# FIXME: Espacio en blanco final.
-#: iconv/iconv_prog.c:756
+#: iconv/iconv_prog.c:790
msgid ""
"The following list contain all the coded character sets known. This does\n"
"not necessarily mean that all combinations of these names can be used for\n"
@@ -387,7 +1453,7 @@ msgid ""
msgstr ""
"La siguiente lista contiene todos los conjuntos de caracteres conocidos.\n"
"Esto no quiere decir necesariamente que todas las combinaciones de estos\n"
-"nombres se puedan usar como parámetros FROM y TO en la línea de órdenes.\n"
+"nombres se puedan usar como parámetros FROM y TO en la línea de órdenes.\n"
"Un determinado conjunto de caracteres puede aparecer con varios nombres\n"
"(aliases).\n"
"\n"
@@ -395,1043 +1461,1162 @@ msgstr ""
#: iconv/iconvconfig.c:110
msgid "Create fastloading iconv module configuration file."
-msgstr "Crea un fichero de configuración de un módulo iconv de carga rápida."
+msgstr "Crea un fichero de configuración de un módulo iconv de carga rápida."
#: iconv/iconvconfig.c:114
msgid "[DIR...]"
msgstr "[DIR...]"
-# FIXME: El mensaje es ambiguo. No sabe muy bien si después de este
-# mensaje nos dicen justo a continuación cuál es ese prefijo (en cuyo
+# FIXME: El mensaje es ambiguo. No sabe muy bien si después de este
+# mensaje nos dicen justo a continuación cuál es ese prefijo (en cuyo
# caso el msgstr que he puesto es apropiado) o si por el contrario lo
-# que nos dicen es que se utilizará prefijo para todos los accesos a
+# que nos dicen es que se utilizará prefijo para todos los accesos a
# ficheros.
-#: iconv/iconvconfig.c:126
+#: iconv/iconvconfig.c:127
msgid "Prefix used for all file accesses"
msgstr "Prefijo utilizado para todos los accesos a ficheros"
-#: iconv/iconvconfig.c:327 locale/programs/localedef.c:292
+#: iconv/iconvconfig.c:128
+msgid "Put output in FILE instead of installed location (--prefix does not apply to FILE)"
+msgstr "Pone el resultado en FICHERO, no en el lugar instalado (--prefix no es aplicable a FICHERO)"
+
+#: iconv/iconvconfig.c:132
+msgid "Do not search standard directories, only those on the command line"
+msgstr "No busca en los directorios estándar, solamente en los de la línea de órdenes"
+
+#: iconv/iconvconfig.c:301
+#, c-format
+msgid "Directory arguments required when using --nostdlib"
+msgstr "Se requieren directorios como argumentos cuando se usa --nostdlib"
+
+#: iconv/iconvconfig.c:343 locale/programs/localedef.c:291
+#, c-format
msgid "no output file produced because warnings were issued"
-msgstr "no se ha producido ningún fichero de salida debido a la existencia de avisos"
+msgstr "no se ha producido ningún fichero de salida debido a la existencia de avisos"
-#: iconv/iconvconfig.c:405
+#: iconv/iconvconfig.c:429
+#, c-format
msgid "while inserting in search tree"
-msgstr "al insertar en el árbol de búsqueda"
+msgstr "al insertar en el árbol de búsqueda"
-#: iconv/iconvconfig.c:1204
+#: iconv/iconvconfig.c:1238
+#, c-format
msgid "cannot generate output file"
msgstr "no se puede generar el fichero de salida"
+#: inet/rcmd.c:163
+msgid "rcmd: Cannot allocate memory\n"
+msgstr "rcmd: No se puede asignar memoria\n"
+
+#: inet/rcmd.c:178
+msgid "rcmd: socket: All ports in use\n"
+msgstr "rcmd: socket: Se están usando todos los puertos\n"
+
+#: inet/rcmd.c:206
+#, c-format
+msgid "connect to address %s: "
+msgstr "conexión a la dirección %s: "
+
+#: inet/rcmd.c:219
+#, c-format
+msgid "Trying %s...\n"
+msgstr "Intentando %s...\n"
+
+#: inet/rcmd.c:255
+#, c-format
+msgid "rcmd: write (setting up stderr): %m\n"
+msgstr "rcmd: write (activando la salida de error estándar): %m\n"
+
+#: inet/rcmd.c:271
+#, c-format
+msgid "rcmd: poll (setting up stderr): %m\n"
+msgstr "rcmd: poll (activando la salida de error estándar): %m\n"
+
+# ¿en la configuración del servicio?, ¿del circuito?, ¿o dejarlo así?
+# Es de locos, estuve viendo las/los fuentes, preferí dejarlo así. em
+#: inet/rcmd.c:274
+msgid "poll: protocol failure in circuit setup\n"
+msgstr "poll: fallo de protocolo al configurar el circuito\n"
+
+# ??? lo mismo que arriba
+#: inet/rcmd.c:306
+msgid "socket: protocol failure in circuit setup\n"
+msgstr "socket: fallo de protocolo al configurar el circuito\n"
+
+#: inet/rcmd.c:330
+#, c-format
+msgid "rcmd: %s: short read"
+msgstr "rcmd: %s: lectura insuficiente"
+
+# ## Lo mismo con lstat. sv
+# Antes decía: No se pudo obtener información (lstat) del fichero .rhosts
+#: inet/rcmd.c:486
+msgid "lstat failed"
+msgstr "lstat ha fallado"
+
+#: inet/rcmd.c:493
+msgid "cannot open"
+msgstr "no se puede abrir"
+
+# ## Sugerencia: Añadir (fstat) después de información. sv
+# Antes decía: No se pudo obtener información (fstat) del fichero .rhosts
+#: inet/rcmd.c:495
+msgid "fstat failed"
+msgstr "fstat ha fallado"
+
+# Antes decía: El propietario del fichero .rhosts no es válido
+#: inet/rcmd.c:497
+msgid "bad owner"
+msgstr "propietario incorrecto"
+
+#: inet/rcmd.c:499
+msgid "writeable by other than owner"
+msgstr "puede ser modificado por otros además del propietario"
+
+#: inet/rcmd.c:501
+msgid "hard linked somewhere"
+msgstr "hay un enlace duro en alguna parte"
+
+#: inet/ruserpass.c:170 inet/ruserpass.c:193
+msgid "out of memory"
+msgstr "memoria agotada"
+
+# Supongo que se dice legible... sv
+#: inet/ruserpass.c:184
+msgid "Error: .netrc file is readable by others."
+msgstr "Error: el fichero .netrc es legible por otros usuarios."
+
+#: inet/ruserpass.c:185
+msgid "Remove password or make file unreadable by others."
+msgstr "Elimine la contraseña o haga el fichero no legible por otros."
+
+#: inet/ruserpass.c:277
+#, c-format
+msgid "Unknown .netrc keyword %s"
+msgstr "Palabra clave %s desconocida en .netrc"
+
+#: libidn/nfkc.c:464
+msgid "Character out of range for UTF-8"
+msgstr "Carácter fuera de rango para UTF-8"
+
#: locale/programs/charmap-dir.c:59
#, c-format
msgid "cannot read character map directory `%s'"
msgstr "no se puede leer el directorio de tablas de caracteres `%s'"
-#: locale/programs/charmap.c:136
+#: locale/programs/charmap.c:138
#, c-format
msgid "character map file `%s' not found"
-msgstr "el fichero de tabla de caracteres `%s' no se encontró"
+msgstr "el fichero de tabla de caracteres `%s' no se encontró"
-#: locale/programs/charmap.c:194
+#: locale/programs/charmap.c:195
#, c-format
msgid "default character map file `%s' not found"
-msgstr "no se encontró el fichero de tabla de caracteres predeterminado `%s'"
+msgstr "no se encontró el fichero de tabla de caracteres predeterminado `%s'"
-#: locale/programs/charmap.c:257
+#: locale/programs/charmap.c:258
#, c-format
msgid "character map `%s' is not ASCII compatible, locale not ISO C compliant\n"
msgstr ""
"la tabla de caracteres `%s' no es compatible con ASCII, el local no cumple\n"
"con ISO C\n"
-#: locale/programs/charmap.c:336
+#: locale/programs/charmap.c:337
#, c-format
msgid "%s: <mb_cur_max> must be greater than <mb_cur_min>\n"
msgstr "%s: <mb_cur_max> debe ser mayor que <mb_cur_min>\n"
-#: locale/programs/charmap.c:356 locale/programs/charmap.c:373
-#: locale/programs/repertoire.c:175
+#: locale/programs/charmap.c:357 locale/programs/charmap.c:374
+#: locale/programs/repertoire.c:174
#, c-format
msgid "syntax error in prolog: %s"
-msgstr "error de sintaxis en el prólogo: %s"
+msgstr "error de sintaxis en el prólogo: %s"
-#: locale/programs/charmap.c:357
+#: locale/programs/charmap.c:358
msgid "invalid definition"
-msgstr "definición inválida"
+msgstr "definición inválida"
-#: locale/programs/charmap.c:374 locale/programs/locfile.c:126
-#: locale/programs/locfile.c:153 locale/programs/repertoire.c:176
+#: locale/programs/charmap.c:375 locale/programs/locfile.c:126
+#: locale/programs/locfile.c:153 locale/programs/repertoire.c:175
msgid "bad argument"
-msgstr "argumento erróneo"
+msgstr "argumento erróneo"
-#: locale/programs/charmap.c:402
+#: locale/programs/charmap.c:403
#, c-format
msgid "duplicate definition of <%s>"
-msgstr "definición duplicada de <%s>"
+msgstr "definición duplicada de <%s>"
-#: locale/programs/charmap.c:409
+#: locale/programs/charmap.c:410
#, c-format
msgid "value for <%s> must be 1 or greater"
msgstr "el valor para <%s> debe ser 1 o mayor"
-# Milagro, por una vez es más corto en español :-) sv
-#: locale/programs/charmap.c:421
+# Milagro, por una vez es más corto en español :-) sv
+#: locale/programs/charmap.c:422
#, c-format
msgid "value of <%s> must be greater or equal than the value of <%s>"
msgstr "el valor de <%s> debe ser mayor o igual que el valor de <%s>"
-#: locale/programs/charmap.c:444 locale/programs/repertoire.c:184
+#: locale/programs/charmap.c:445 locale/programs/repertoire.c:183
#, c-format
msgid "argument to <%s> must be a single character"
-msgstr "el argumento para <%s> debe ser un único carácter"
+msgstr "el argumento para <%s> debe ser un único carácter"
-#: locale/programs/charmap.c:470
+#: locale/programs/charmap.c:471
msgid "character sets with locking states are not supported"
-msgstr "los conjuntos de caracteres con estados de bloqueo no están soportados"
+msgstr "los conjuntos de caracteres con estados de bloqueo no están soportados"
-#: locale/programs/charmap.c:497 locale/programs/charmap.c:551
-#: locale/programs/charmap.c:583 locale/programs/charmap.c:677
-#: locale/programs/charmap.c:732 locale/programs/charmap.c:773
-#: locale/programs/charmap.c:814
+#: locale/programs/charmap.c:498 locale/programs/charmap.c:552
+#: locale/programs/charmap.c:584 locale/programs/charmap.c:678
+#: locale/programs/charmap.c:733 locale/programs/charmap.c:774
+#: locale/programs/charmap.c:815
#, c-format
msgid "syntax error in %s definition: %s"
-msgstr "error de sintaxis en la definición de %s: %s"
+msgstr "error de sintaxis en la definición de %s: %s"
-#: locale/programs/charmap.c:498 locale/programs/charmap.c:678
-#: locale/programs/charmap.c:774 locale/programs/repertoire.c:231
+#: locale/programs/charmap.c:499 locale/programs/charmap.c:679
+#: locale/programs/charmap.c:775 locale/programs/repertoire.c:230
msgid "no symbolic name given"
-msgstr "no se ha especificado ningún nombre simbólico"
+msgstr "no se ha especificado ningún nombre simbólico"
-#: locale/programs/charmap.c:552
+#: locale/programs/charmap.c:553
msgid "invalid encoding given"
-msgstr "especificada una codificación inválida"
+msgstr "especificada una codificación inválida"
-#: locale/programs/charmap.c:561
+#: locale/programs/charmap.c:562
msgid "too few bytes in character encoding"
-msgstr "insuficiente número de bytes en la codificación del carácter"
+msgstr "insuficiente número de bytes en la codificación del carácter"
-#: locale/programs/charmap.c:563
+#: locale/programs/charmap.c:564
msgid "too many bytes in character encoding"
-msgstr "demasiados bytes en la codificación del carácter"
+msgstr "demasiados bytes en la codificación del carácter"
-#: locale/programs/charmap.c:585 locale/programs/charmap.c:733
-#: locale/programs/charmap.c:816 locale/programs/repertoire.c:297
+#: locale/programs/charmap.c:586 locale/programs/charmap.c:734
+#: locale/programs/charmap.c:817 locale/programs/repertoire.c:296
msgid "no symbolic name given for end of range"
-msgstr "no se ha especificado ningún nombre simbólico para el final del rango"
-
-#: locale/programs/charmap.c:609 locale/programs/locfile.c:818
-#: locale/programs/repertoire.c:314
+msgstr "no se ha especificado ningún nombre simbólico para el final del rango"
+
+#: locale/programs/charmap.c:610 locale/programs/ld-address.c:602
+#: locale/programs/ld-collate.c:2769 locale/programs/ld-collate.c:3927
+#: locale/programs/ld-ctype.c:2257 locale/programs/ld-ctype.c:3009
+#: locale/programs/ld-identification.c:452
+#: locale/programs/ld-measurement.c:238 locale/programs/ld-messages.c:332
+#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:307
+#: locale/programs/ld-numeric.c:368 locale/programs/ld-paper.c:241
+#: locale/programs/ld-telephone.c:313 locale/programs/ld-time.c:1221
+#: locale/programs/repertoire.c:313
#, c-format
-msgid "`%1$s' definition does not end with `END %1$s'"
-msgstr "La definición `%1$s' no termina con `END %1$s'"
+msgid "%1$s: definition does not end with `END %1$s'"
+msgstr "%1$s: la definición no termina con `END %1$s'"
-#: locale/programs/charmap.c:642
+#: locale/programs/charmap.c:643
msgid "only WIDTH definitions are allowed to follow the CHARMAP definition"
-msgstr "solamente se permiten ANCHO definiciones después de la definición CHARMAP"
+msgstr "solamente se permiten ANCHO definiciones después de la definición CHARMAP"
-#: locale/programs/charmap.c:650 locale/programs/charmap.c:713
+#: locale/programs/charmap.c:651 locale/programs/charmap.c:714
#, c-format
msgid "value for %s must be an integer"
-msgstr "el valor para %s debe ser un número entero"
+msgstr "el valor para %s debe ser un número entero"
# Para entender este mensaje, pensar en Turing.
-#: locale/programs/charmap.c:841
+#: locale/programs/charmap.c:842
#, c-format
msgid "%s: error in state machine"
-msgstr "%s: error en la máquina de estados"
-
-#: locale/programs/charmap.c:849 locale/programs/ld-address.c:605
-#: locale/programs/ld-collate.c:2650 locale/programs/ld-collate.c:3818
-#: locale/programs/ld-ctype.c:2225 locale/programs/ld-ctype.c:2994
-#: locale/programs/ld-identification.c:469
-#: locale/programs/ld-measurement.c:255 locale/programs/ld-messages.c:349
-#: locale/programs/ld-monetary.c:958 locale/programs/ld-name.c:324
-#: locale/programs/ld-numeric.c:392 locale/programs/ld-paper.c:258
-#: locale/programs/ld-telephone.c:330 locale/programs/ld-time.c:1219
-#: locale/programs/locfile.c:825 locale/programs/repertoire.c:325
+msgstr "%s: error en la máquina de estados"
+
+#: locale/programs/charmap.c:850 locale/programs/ld-address.c:618
+#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:4120
+#: locale/programs/ld-ctype.c:2254 locale/programs/ld-ctype.c:3026
+#: locale/programs/ld-identification.c:468
+#: locale/programs/ld-measurement.c:254 locale/programs/ld-messages.c:348
+#: locale/programs/ld-monetary.c:959 locale/programs/ld-name.c:323
+#: locale/programs/ld-numeric.c:384 locale/programs/ld-paper.c:257
+#: locale/programs/ld-telephone.c:329 locale/programs/ld-time.c:1237
+#: locale/programs/locfile.c:826 locale/programs/repertoire.c:324
#, c-format
msgid "%s: premature end of file"
msgstr "%s: fin de fichero no esperado"
-#: locale/programs/charmap.c:868 locale/programs/charmap.c:879
+#: locale/programs/charmap.c:869 locale/programs/charmap.c:880
#, c-format
msgid "unknown character `%s'"
-msgstr "carácter desconocido `%s'"
+msgstr "carácter desconocido `%s'"
-#: locale/programs/charmap.c:887
+#: locale/programs/charmap.c:888
#, c-format
msgid "number of bytes for byte sequence of beginning and end of range not the same: %d vs %d"
msgstr ""
-"el número de bytes para la sucesión de bytes de comienzo y final del rango\n"
+"el número de bytes para la sucesión de bytes de comienzo y final del rango\n"
"no es el mismo: %d vs %d"
-#: locale/programs/charmap.c:991 locale/programs/ld-collate.c:2930
-#: locale/programs/repertoire.c:420
+#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3046
+#: locale/programs/repertoire.c:419
msgid "invalid names for character range"
-msgstr "nombres inválidos para el rango de caracteres"
+msgstr "nombres inválidos para el rango de caracteres"
-#: locale/programs/charmap.c:1003 locale/programs/repertoire.c:432
+#: locale/programs/charmap.c:1005 locale/programs/repertoire.c:431
msgid "hexadecimal range format should use only capital characters"
-msgstr "el formato de rango hexadecimal debe usar solamente caracteres en mayúsculas"
+msgstr "el formato de rango hexadecimal debe usar solamente caracteres en mayúsculas"
-#: locale/programs/charmap.c:1021
+#: locale/programs/charmap.c:1023 locale/programs/repertoire.c:449
#, c-format
-msgid "<%s> and <%s> are illegal names for range"
-msgstr "<%s> y <%s> son nombres no permitidos para el rango de caracteres"
+msgid "<%s> and <%s> are invalid names for range"
+msgstr "<%s> y <%s> son nombres inválidos para el rango de caracteres"
-# FIXME: then -> than
-#: locale/programs/charmap.c:1027
-msgid "upper limit in range is not higher then lower limit"
-msgstr "el límite superior del rango no es mayor que el límite inferior"
+#: locale/programs/charmap.c:1029 locale/programs/repertoire.c:456
+msgid "upper limit in range is smaller than lower limit"
+msgstr "el límite superior del rango es menor que el límite inferior"
-#: locale/programs/charmap.c:1085
+#: locale/programs/charmap.c:1087
msgid "resulting bytes for range not representable."
msgstr "los bytes resultantes para el rango no son representables."
-#: locale/programs/ld-address.c:134 locale/programs/ld-collate.c:1534
-#: locale/programs/ld-ctype.c:421 locale/programs/ld-identification.c:134
-#: locale/programs/ld-measurement.c:95 locale/programs/ld-messages.c:98
-#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:95
-#: locale/programs/ld-numeric.c:99 locale/programs/ld-paper.c:92
-#: locale/programs/ld-telephone.c:95 locale/programs/ld-time.c:160
+#: locale/programs/ld-address.c:135 locale/programs/ld-collate.c:1558
+#: locale/programs/ld-ctype.c:421 locale/programs/ld-identification.c:133
+#: locale/programs/ld-measurement.c:94 locale/programs/ld-messages.c:97
+#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94
+#: locale/programs/ld-numeric.c:98 locale/programs/ld-paper.c:91
+#: locale/programs/ld-telephone.c:94 locale/programs/ld-time.c:159
#, c-format
msgid "No definition for %s category found"
-msgstr "No se encontró ninguna definición para la categoría %s"
-
-# FIXME: ¿Por qué hay dos mensajes distintos para este y el siguiente?
-#: locale/programs/ld-address.c:145 locale/programs/ld-address.c:183
-#: locale/programs/ld-address.c:201 locale/programs/ld-address.c:228
-#: locale/programs/ld-address.c:290 locale/programs/ld-address.c:309
-#: locale/programs/ld-address.c:322 locale/programs/ld-identification.c:147
-#: locale/programs/ld-measurement.c:106 locale/programs/ld-monetary.c:206
+msgstr "No se encontró ninguna definición para la categoría %s"
+
+# FIXME: ¿Por qué hay dos mensajes distintos para este y el siguiente?
+#: locale/programs/ld-address.c:146 locale/programs/ld-address.c:184
+#: locale/programs/ld-address.c:202 locale/programs/ld-address.c:231
+#: locale/programs/ld-address.c:303 locale/programs/ld-address.c:322
+#: locale/programs/ld-address.c:335 locale/programs/ld-identification.c:146
+#: locale/programs/ld-measurement.c:105 locale/programs/ld-monetary.c:206
#: locale/programs/ld-monetary.c:250 locale/programs/ld-monetary.c:266
-#: locale/programs/ld-monetary.c:278 locale/programs/ld-name.c:106
-#: locale/programs/ld-name.c:143 locale/programs/ld-numeric.c:113
-#: locale/programs/ld-numeric.c:127 locale/programs/ld-paper.c:103
-#: locale/programs/ld-paper.c:112 locale/programs/ld-telephone.c:106
-#: locale/programs/ld-telephone.c:163 locale/programs/ld-time.c:176
-#: locale/programs/ld-time.c:197
+#: locale/programs/ld-monetary.c:278 locale/programs/ld-name.c:105
+#: locale/programs/ld-name.c:142 locale/programs/ld-numeric.c:112
+#: locale/programs/ld-numeric.c:126 locale/programs/ld-paper.c:102
+#: locale/programs/ld-paper.c:111 locale/programs/ld-telephone.c:105
+#: locale/programs/ld-telephone.c:162 locale/programs/ld-time.c:175
+#: locale/programs/ld-time.c:196
#, c-format
msgid "%s: field `%s' not defined"
-msgstr "%s: el campo `%s' no está definido"
+msgstr "%s: el campo `%s' no está definido"
-#: locale/programs/ld-address.c:157 locale/programs/ld-address.c:209
-#: locale/programs/ld-address.c:235 locale/programs/ld-address.c:265
-#: locale/programs/ld-name.c:118 locale/programs/ld-telephone.c:118
+#: locale/programs/ld-address.c:158 locale/programs/ld-address.c:210
+#: locale/programs/ld-address.c:240 locale/programs/ld-address.c:278
+#: locale/programs/ld-name.c:117 locale/programs/ld-telephone.c:117
#, c-format
msgid "%s: field `%s' must not be empty"
-msgstr "%s: el campo `%s' no debe estar vacío"
+msgstr "%s: el campo `%s' no debe estar vacío"
-#: locale/programs/ld-address.c:169
+#: locale/programs/ld-address.c:170
#, c-format
msgid "%s: invalid escape `%%%c' sequence in field `%s'"
-msgstr "%s: secuencia de escape `%%%c' inválida en el campo `%s'"
+msgstr "%s: secuencia de escape `%%%c' inválida en el campo `%s'"
-#: locale/programs/ld-address.c:220
+#: locale/programs/ld-address.c:221
#, c-format
msgid "%s: terminology language code `%s' not defined"
-msgstr "%s: el código de terminología del idioma `%s' no está definido"
+msgstr "%s: el código de terminología del idioma `%s' no está definido"
+
+# FIXME: ¿Por qué hay dos mensajes distintos para este y el siguiente?
+#: locale/programs/ld-address.c:246
+#, c-format
+msgid "%s: field `%s' must not be defined"
+msgstr "%s: no se debe definir el campo `%s'"
-#: locale/programs/ld-address.c:247 locale/programs/ld-address.c:276
+#: locale/programs/ld-address.c:260 locale/programs/ld-address.c:289
#, c-format
msgid "%s: language abbreviation `%s' not defined"
-msgstr "%s: la abreviatura de lenguaje `%s' no está definida"
+msgstr "%s: la abreviatura de lenguaje `%s' no está definida"
-#: locale/programs/ld-address.c:254 locale/programs/ld-address.c:282
-#: locale/programs/ld-address.c:316 locale/programs/ld-address.c:328
+#: locale/programs/ld-address.c:267 locale/programs/ld-address.c:295
+#: locale/programs/ld-address.c:329 locale/programs/ld-address.c:341
#, c-format
msgid "%s: `%s' value does not match `%s' value"
msgstr "%s: el valor `%s' no coincide con el valor `%s'"
-#: locale/programs/ld-address.c:301
+#: locale/programs/ld-address.c:314
#, c-format
msgid "%s: numeric country code `%d' not valid"
-msgstr "%s: el código numérico de país `%d' no es válido"
-
-#: locale/programs/ld-address.c:497 locale/programs/ld-address.c:534
-#: locale/programs/ld-address.c:572 locale/programs/ld-ctype.c:2601
-#: locale/programs/ld-identification.c:365
-#: locale/programs/ld-measurement.c:222 locale/programs/ld-messages.c:302
-#: locale/programs/ld-monetary.c:700 locale/programs/ld-monetary.c:735
-#: locale/programs/ld-monetary.c:776 locale/programs/ld-name.c:281
-#: locale/programs/ld-numeric.c:264 locale/programs/ld-paper.c:225
-#: locale/programs/ld-telephone.c:289 locale/programs/ld-time.c:1108
-#: locale/programs/ld-time.c:1150
+msgstr "%s: el código numérico de país `%d' no es válido"
+
+#: locale/programs/ld-address.c:510 locale/programs/ld-address.c:547
+#: locale/programs/ld-address.c:585 locale/programs/ld-ctype.c:2633
+#: locale/programs/ld-identification.c:364
+#: locale/programs/ld-measurement.c:221 locale/programs/ld-messages.c:301
+#: locale/programs/ld-monetary.c:701 locale/programs/ld-monetary.c:736
+#: locale/programs/ld-monetary.c:777 locale/programs/ld-name.c:280
+#: locale/programs/ld-numeric.c:263 locale/programs/ld-paper.c:224
+#: locale/programs/ld-telephone.c:288 locale/programs/ld-time.c:1126
+#: locale/programs/ld-time.c:1168
#, c-format
msgid "%s: field `%s' declared more than once"
-msgstr "%s: el campo `%s' ha sido declarado más de una vez"
+msgstr "%s: el campo `%s' ha sido declarado más de una vez"
-#: locale/programs/ld-address.c:501 locale/programs/ld-address.c:539
-#: locale/programs/ld-identification.c:369 locale/programs/ld-messages.c:312
-#: locale/programs/ld-monetary.c:704 locale/programs/ld-monetary.c:739
-#: locale/programs/ld-name.c:285 locale/programs/ld-numeric.c:268
-#: locale/programs/ld-telephone.c:293 locale/programs/ld-time.c:1002
-#: locale/programs/ld-time.c:1071 locale/programs/ld-time.c:1113
+#: locale/programs/ld-address.c:514 locale/programs/ld-address.c:552
+#: locale/programs/ld-identification.c:368 locale/programs/ld-messages.c:311
+#: locale/programs/ld-monetary.c:705 locale/programs/ld-monetary.c:740
+#: locale/programs/ld-name.c:284 locale/programs/ld-numeric.c:267
+#: locale/programs/ld-telephone.c:292 locale/programs/ld-time.c:1020
+#: locale/programs/ld-time.c:1089 locale/programs/ld-time.c:1131
#, c-format
msgid "%s: unknown character in field `%s'"
-msgstr "%s: carácter desconocido en el campo `%s'"
+msgstr "%s: carácter desconocido en el campo `%s'"
-#: locale/programs/ld-address.c:586 locale/programs/ld-collate.c:3800
-#: locale/programs/ld-ctype.c:2974 locale/programs/ld-identification.c:450
-#: locale/programs/ld-measurement.c:236 locale/programs/ld-messages.c:331
-#: locale/programs/ld-monetary.c:940 locale/programs/ld-name.c:306
-#: locale/programs/ld-numeric.c:374 locale/programs/ld-paper.c:240
-#: locale/programs/ld-telephone.c:312 locale/programs/ld-time.c:1201
+#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:3925
+#: locale/programs/ld-ctype.c:3006 locale/programs/ld-identification.c:449
+#: locale/programs/ld-measurement.c:235 locale/programs/ld-messages.c:330
+#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:305
+#: locale/programs/ld-numeric.c:366 locale/programs/ld-paper.c:239
+#: locale/programs/ld-telephone.c:311 locale/programs/ld-time.c:1219
#, c-format
msgid "%s: incomplete `END' line"
-msgstr "%s: línea `END' incompleta"
-
-#: locale/programs/ld-address.c:589 locale/programs/ld-collate.c:2653
-#: locale/programs/ld-collate.c:3802 locale/programs/ld-ctype.c:2228
-#: locale/programs/ld-ctype.c:2977 locale/programs/ld-identification.c:453
-#: locale/programs/ld-measurement.c:239 locale/programs/ld-messages.c:333
-#: locale/programs/ld-monetary.c:942 locale/programs/ld-name.c:308
-#: locale/programs/ld-numeric.c:376 locale/programs/ld-paper.c:242
-#: locale/programs/ld-telephone.c:314 locale/programs/ld-time.c:1203
-#, c-format
-msgid "%1$s: definition does not end with `END %1$s'"
-msgstr "%1$s: la definición no termina con `END %1$s'"
-
-#: locale/programs/ld-address.c:596 locale/programs/ld-collate.c:523
-#: locale/programs/ld-collate.c:575 locale/programs/ld-collate.c:871
-#: locale/programs/ld-collate.c:884 locale/programs/ld-collate.c:2640
-#: locale/programs/ld-collate.c:3809 locale/programs/ld-ctype.c:1956
-#: locale/programs/ld-ctype.c:2215 locale/programs/ld-ctype.c:2799
-#: locale/programs/ld-ctype.c:2985 locale/programs/ld-identification.c:460
-#: locale/programs/ld-measurement.c:246 locale/programs/ld-messages.c:340
-#: locale/programs/ld-monetary.c:949 locale/programs/ld-name.c:315
-#: locale/programs/ld-numeric.c:383 locale/programs/ld-paper.c:249
-#: locale/programs/ld-telephone.c:321 locale/programs/ld-time.c:1210
+msgstr "%s: línea `END' incompleta"
+
+#: locale/programs/ld-address.c:609 locale/programs/ld-collate.c:544
+#: locale/programs/ld-collate.c:596 locale/programs/ld-collate.c:892
+#: locale/programs/ld-collate.c:905 locale/programs/ld-collate.c:2735
+#: locale/programs/ld-collate.c:2756 locale/programs/ld-collate.c:4110
+#: locale/programs/ld-ctype.c:1985 locale/programs/ld-ctype.c:2244
+#: locale/programs/ld-ctype.c:2831 locale/programs/ld-ctype.c:3017
+#: locale/programs/ld-identification.c:459
+#: locale/programs/ld-measurement.c:245 locale/programs/ld-messages.c:339
+#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:314
+#: locale/programs/ld-numeric.c:375 locale/programs/ld-paper.c:248
+#: locale/programs/ld-telephone.c:320 locale/programs/ld-time.c:1228
#, c-format
msgid "%s: syntax error"
msgstr "%s: error de sintaxis"
-#: locale/programs/ld-collate.c:398
+#: locale/programs/ld-collate.c:419
#, c-format
msgid "`%.*s' already defined in charmap"
-msgstr "`%.*s' ya está definido en la tabla de caracteres"
+msgstr "`%.*s' ya está definido en la tabla de caracteres"
-#: locale/programs/ld-collate.c:407
+#: locale/programs/ld-collate.c:428
#, c-format
msgid "`%.*s' already defined in repertoire"
-msgstr "`%.*s' ya está definido en el repertorio"
+msgstr "`%.*s' ya está definido en el repertorio"
-#: locale/programs/ld-collate.c:414
+#: locale/programs/ld-collate.c:435
#, c-format
msgid "`%.*s' already defined as collating symbol"
-msgstr "`%.*s' ya está definido como símbolo de ordenación"
+msgstr "`%.*s' ya está definido como símbolo de ordenación"
-#: locale/programs/ld-collate.c:421
+#: locale/programs/ld-collate.c:442
#, c-format
msgid "`%.*s' already defined as collating element"
-msgstr "`%.*s' ya está definido como elemento de ordenación"
+msgstr "`%.*s' ya está definido como elemento de ordenación"
-#: locale/programs/ld-collate.c:452 locale/programs/ld-collate.c:478
+#: locale/programs/ld-collate.c:473 locale/programs/ld-collate.c:499
#, c-format
msgid "%s: `forward' and `backward' are mutually excluding each other"
msgstr "%s: `forward' y `backward' se excluyen mutuamente"
-#: locale/programs/ld-collate.c:462 locale/programs/ld-collate.c:488
-#: locale/programs/ld-collate.c:504
+#: locale/programs/ld-collate.c:483 locale/programs/ld-collate.c:509
+#: locale/programs/ld-collate.c:525
#, c-format
msgid "%s: `%s' mentioned more than once in definition of weight %d"
-msgstr "%s: `%s' mencionado más de una vez en la definición del peso %d"
+msgstr "%s: `%s' mencionado más de una vez en la definición del peso %d"
-#: locale/programs/ld-collate.c:560
+#: locale/programs/ld-collate.c:581
#, c-format
msgid "%s: too many rules; first entry only had %d"
-msgstr "%s: demasiadas reglas; la primera entrada solamente tenía %d"
+msgstr "%s: demasiadas reglas; la primera entrada solamente tenía %d"
-#: locale/programs/ld-collate.c:596
+#: locale/programs/ld-collate.c:617
#, c-format
msgid "%s: not enough sorting rules"
-msgstr "%s: no hay suficientes reglas de ordenación"
+msgstr "%s: no hay suficientes reglas de ordenación"
-#: locale/programs/ld-collate.c:761
+#: locale/programs/ld-collate.c:782
#, c-format
msgid "%s: empty weight string not allowed"
-msgstr "%s: no se permite una cadena de peso vacía"
+msgstr "%s: no se permite una cadena de peso vacía"
-#: locale/programs/ld-collate.c:856
+#: locale/programs/ld-collate.c:877
#, c-format
msgid "%s: weights must use the same ellipsis symbol as the name"
-msgstr "%s: los pesos deben usar el mismo símbolo de elipsis que el nombre"
+msgstr "%s: los pesos deben usar el mismo símbolo de elipsis que el nombre"
-#: locale/programs/ld-collate.c:912
+#: locale/programs/ld-collate.c:933
#, c-format
msgid "%s: too many values"
msgstr "%s: demasiados valores"
-#: locale/programs/ld-collate.c:1031 locale/programs/ld-collate.c:1206
+#: locale/programs/ld-collate.c:1053 locale/programs/ld-collate.c:1228
#, c-format
msgid "order for `%.*s' already defined at %s:%Zu"
-msgstr "el orden para `%.*s' ya está definido en %s:%Zu"
+msgstr "el orden para `%.*s' ya está definido en %s:%Zu"
-#: locale/programs/ld-collate.c:1081
+#: locale/programs/ld-collate.c:1103
#, c-format
msgid "%s: the start and the end symbol of a range must stand for characters"
-msgstr "%s: los símbolos de comienzo y de final de un rango deben representar caracteres"
+msgstr "%s: los símbolos de comienzo y de final de un rango deben representar caracteres"
-#: locale/programs/ld-collate.c:1108
+#: locale/programs/ld-collate.c:1130
#, c-format
msgid "%s: byte sequences of first and last character must have the same length"
msgstr ""
-"%s: los órdenes de byte de los caracteres primero y último deben tener\n"
+"%s: los órdenes de byte de los caracteres primero y último deben tener\n"
"la misma longitud"
-#: locale/programs/ld-collate.c:1150
+#: locale/programs/ld-collate.c:1172
#, c-format
-msgid "%s: byte sequence of first character of sequence is not lower than that of the last character"
+msgid "%s: byte sequence of first character of range is not lower than that of the last character"
msgstr ""
-"%s: el orden de byte del primer carácter de la sucesión no es menor que\n"
-"el del último carácter"
+"%s: el orden de byte del primer carácter del rango no es menor que\n"
+"el del último carácter"
-#: locale/programs/ld-collate.c:1275
+#: locale/programs/ld-collate.c:1297
#, c-format
msgid "%s: symbolic range ellipsis must not directly follow `order_start'"
-msgstr "%s: el rango simbólico de la elipsis no debe seguir directamente a `order_start'"
+msgstr "%s: el rango simbólico de la elipsis no debe seguir directamente a `order_start'"
-#: locale/programs/ld-collate.c:1279
+#: locale/programs/ld-collate.c:1301
#, c-format
msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'"
-msgstr "%s: el rango simbólico de la elipsis no debe estar directamente seguido por `order_end'"
+msgstr "%s: el rango simbólico de la elipsis no debe estar directamente seguido por `order_end'"
-#: locale/programs/ld-collate.c:1299 locale/programs/ld-ctype.c:1476
+#: locale/programs/ld-collate.c:1321 locale/programs/ld-ctype.c:1502
#, c-format
msgid "`%s' and `%.*s' are not valid names for symbolic range"
-msgstr "`%s' y `%.*s' no son nombres válidos para el rango simbólico"
+msgstr "`%s' y `%.*s' no son nombres válidos para el rango simbólico"
-#: locale/programs/ld-collate.c:1348 locale/programs/ld-collate.c:3737
+#: locale/programs/ld-collate.c:1371 locale/programs/ld-collate.c:3861
#, c-format
msgid "%s: order for `%.*s' already defined at %s:%Zu"
-msgstr "%s: el orden para `%.*s' ya está definido en %s:%Zu"
+msgstr "%s: el orden para `%.*s' ya está definido en %s:%Zu"
-#: locale/programs/ld-collate.c:1357
+#: locale/programs/ld-collate.c:1380
#, c-format
msgid "%s: `%s' must be a character"
-msgstr "%s: `%s' debe ser un carácter"
+msgstr "%s: `%s' debe ser un carácter"
-#: locale/programs/ld-collate.c:1550
+#: locale/programs/ld-collate.c:1575
#, c-format
msgid "%s: `position' must be used for a specific level in all sections or none"
-msgstr "%s: `position' debe utilizarse para un nivel específico en todas las secciones o en ninguna"
+msgstr "%s: `position' debe utilizarse para un nivel específico en todas las secciones o en ninguna"
-#: locale/programs/ld-collate.c:1575
+#: locale/programs/ld-collate.c:1600
#, c-format
msgid "symbol `%s' not defined"
-msgstr "el símbolo `%s' no está definido"
+msgstr "el símbolo `%s' no está definido"
-#: locale/programs/ld-collate.c:1651 locale/programs/ld-collate.c:1757
+#: locale/programs/ld-collate.c:1676 locale/programs/ld-collate.c:1782
#, c-format
msgid "symbol `%s' has the same encoding as"
-msgstr "el símbolo `%s' tiene la misma codificación que"
+msgstr "el símbolo `%s' tiene la misma codificación que"
-#: locale/programs/ld-collate.c:1655 locale/programs/ld-collate.c:1761
+#: locale/programs/ld-collate.c:1680 locale/programs/ld-collate.c:1786
#, c-format
msgid "symbol `%s'"
-msgstr "el símbolo `%s'"
+msgstr "el símbolo `%s'"
-#: locale/programs/ld-collate.c:1803
+#: locale/programs/ld-collate.c:1828
+#, c-format
msgid "no definition of `UNDEFINED'"
-msgstr "no hay definición para `UNDEFINED'"
+msgstr "no hay definición para `UNDEFINED'"
-#: locale/programs/ld-collate.c:1832
+#: locale/programs/ld-collate.c:1857
+#, c-format
msgid "too many errors; giving up"
msgstr "demasiados errores; abandono"
-#: locale/programs/ld-collate.c:2735
+#: locale/programs/ld-collate.c:2661 locale/programs/ld-collate.c:4049
+#, c-format
+msgid "%s: nested conditionals not supported"
+msgstr "%s: no se admiten condicionales anidados"
+
+#: locale/programs/ld-collate.c:2679
+#, c-format
+msgid "%s: more then one 'else'"
+msgstr "%s: más de un 'else'"
+
+#: locale/programs/ld-collate.c:2854
#, c-format
msgid "%s: duplicate definition of `%s'"
-msgstr "%s: definición duplicada de `%s'"
+msgstr "%s: definición duplicada de `%s'"
-#: locale/programs/ld-collate.c:2771
+#: locale/programs/ld-collate.c:2890
#, c-format
msgid "%s: duplicate declaration of section `%s'"
-msgstr "%s: definición duplicada de la sección `%s'"
+msgstr "%s: definición duplicada de la sección `%s'"
-#: locale/programs/ld-collate.c:2910
+#: locale/programs/ld-collate.c:3026
#, c-format
msgid "%s: unknown character in collating symbol name"
-msgstr "%s: carácter desconocido en el nombre de un símbolo de ordenación"
+msgstr "%s: carácter desconocido en el nombre de un símbolo de ordenación"
-#: locale/programs/ld-collate.c:3042
+#: locale/programs/ld-collate.c:3155
#, c-format
msgid "%s: unknown character in equivalent definition name"
-msgstr "%s: carácter desconocido en el nombre de definición equivalente"
+msgstr "%s: carácter desconocido en el nombre de definición equivalente"
-#: locale/programs/ld-collate.c:3055
+#: locale/programs/ld-collate.c:3166
#, c-format
msgid "%s: unknown character in equivalent definition value"
-msgstr "%s: carácter desconocido en el valor de definición equivalente"
+msgstr "%s: carácter desconocido en el valor de definición equivalente"
-#: locale/programs/ld-collate.c:3065
+#: locale/programs/ld-collate.c:3176
#, c-format
msgid "%s: unknown symbol `%s' in equivalent definition"
-msgstr "%s: símbolo desconocido `%s' en la definición equivalente"
+msgstr "%s: símbolo desconocido `%s' en la definición equivalente"
-#: locale/programs/ld-collate.c:3074
+#: locale/programs/ld-collate.c:3185
msgid "error while adding equivalent collating symbol"
-msgstr "error al añadir símbolo de ordenación equivalente"
+msgstr "error al añadir símbolo de ordenación equivalente"
-#: locale/programs/ld-collate.c:3104
+#: locale/programs/ld-collate.c:3223
#, c-format
msgid "duplicate definition of script `%s'"
-msgstr "definición duplicada de `script' `%s'"
+msgstr "definición duplicada de `script' `%s'"
-#: locale/programs/ld-collate.c:3152
+#: locale/programs/ld-collate.c:3271
#, c-format
-msgid "%s: unknown section name `%s'"
-msgstr "%s: nombre de sección desconocido `%s'"
+msgid "%s: unknown section name `%.*s'"
+msgstr "%s: nombre de sección desconocido `%.*s'"
-#: locale/programs/ld-collate.c:3180
+#: locale/programs/ld-collate.c:3300
#, c-format
msgid "%s: multiple order definitions for section `%s'"
-msgstr "%s: hay varias definiciones de orden para la sección `%s'"
+msgstr "%s: hay varias definiciones de orden para la sección `%s'"
-#: locale/programs/ld-collate.c:3205
+#: locale/programs/ld-collate.c:3328
#, c-format
msgid "%s: invalid number of sorting rules"
-msgstr "%s: número inválido de reglas de ordenación"
+msgstr "%s: número inválido de reglas de ordenación"
-#: locale/programs/ld-collate.c:3232
+#: locale/programs/ld-collate.c:3355
#, c-format
msgid "%s: multiple order definitions for unnamed section"
-msgstr "%s: varias definiciones de orden para la sección sin nombre"
+msgstr "%s: varias definiciones de orden para la sección sin nombre"
-#: locale/programs/ld-collate.c:3286 locale/programs/ld-collate.c:3414
-#: locale/programs/ld-collate.c:3778
+#: locale/programs/ld-collate.c:3410 locale/programs/ld-collate.c:3540
+#: locale/programs/ld-collate.c:3903
#, c-format
msgid "%s: missing `order_end' keyword"
msgstr "%s: falta la palabra clave `order_end'"
-#: locale/programs/ld-collate.c:3347
+#: locale/programs/ld-collate.c:3473
#, c-format
msgid "%s: order for collating symbol %.*s not yet defined"
-msgstr "%s: el orden para el símbolo de ordenación %.*s todavía no está definido"
+msgstr "%s: el orden para el símbolo de ordenación %.*s todavía no está definido"
-# FIXME: ¿Por qué este y el siguiente no son iguales?
-#: locale/programs/ld-collate.c:3365
+# FIXME: ¿Por qué este y el siguiente no son iguales?
+#: locale/programs/ld-collate.c:3491
#, c-format
msgid "%s: order for collating element %.*s not yet defined"
-msgstr "%s: el orden para el elemento de ordenación %.*s todavía no está definido"
+msgstr "%s: el orden para el elemento de ordenación %.*s todavía no está definido"
-#: locale/programs/ld-collate.c:3376
+#: locale/programs/ld-collate.c:3502
#, c-format
msgid "%s: cannot reorder after %.*s: symbol not known"
-msgstr "%s: no se puede reordenar después de %.*s: símbolo desconocido"
+msgstr "%s: no se puede reordenar después de %.*s: símbolo desconocido"
-#: locale/programs/ld-collate.c:3428 locale/programs/ld-collate.c:3790
+#: locale/programs/ld-collate.c:3554 locale/programs/ld-collate.c:3915
#, c-format
msgid "%s: missing `reorder-end' keyword"
msgstr "%s: falta la palabra clave `reorder-end'"
-#: locale/programs/ld-collate.c:3462 locale/programs/ld-collate.c:3662
+#: locale/programs/ld-collate.c:3588 locale/programs/ld-collate.c:3786
#, c-format
msgid "%s: section `%.*s' not known"
-msgstr "%s: la sección `%.*s' es desconocida"
+msgstr "%s: la sección `%.*s' es desconocida"
-#: locale/programs/ld-collate.c:3527
+#: locale/programs/ld-collate.c:3653
#, c-format
msgid "%s: bad symbol <%.*s>"
-msgstr "%s: símbolo erróneo <%.*s>"
+msgstr "%s: símbolo erróneo <%.*s>"
-#: locale/programs/ld-collate.c:3725
+#: locale/programs/ld-collate.c:3849
#, c-format
msgid "%s: cannot have `%s' as end of ellipsis range"
msgstr "%s: no puede tener `%s' como final de un rango de elipsis"
-#: locale/programs/ld-collate.c:3774
+#: locale/programs/ld-collate.c:3899
#, c-format
msgid "%s: empty category description not allowed"
-msgstr "%s: no se permite una descripción de categoría vacía"
+msgstr "%s: no se permite una descripción de categoría vacía"
-#: locale/programs/ld-collate.c:3793
+#: locale/programs/ld-collate.c:3918
#, c-format
msgid "%s: missing `reorder-sections-end' keyword"
msgstr "%s: falta la palabra clave `reorder-sections-end'"
+#: locale/programs/ld-collate.c:4082
+#, c-format
+msgid "%s: '%s' without matching 'ifdef' or 'ifndef'"
+msgstr "%s: '%s' sin el 'ifdef' o 'ifndef' correspondiente"
+
+#: locale/programs/ld-collate.c:4100
+#, c-format
+msgid "%s: 'endif' without matching 'ifdef' or 'ifndef'"
+msgstr "%s: 'endif' sin el 'ifdef' o 'ifndef' correspondiente"
+
#: locale/programs/ld-ctype.c:440
+#, c-format
msgid "No character set name specified in charmap"
msgstr ""
-"No se ha especificado ningún nombre de conjunto de caracteres en la tabla\n"
+"No se ha especificado ningún nombre de conjunto de caracteres en la tabla\n"
"de caracteres"
#: locale/programs/ld-ctype.c:469
#, c-format
msgid "character L'\\u%0*x' in class `%s' must be in class `%s'"
-msgstr "el carácter L'\\u%0*x' en la clase `%s' debe estar en la clase `%s'"
+msgstr "el carácter L'\\u%0*x' en la clase `%s' debe estar en la clase `%s'"
#: locale/programs/ld-ctype.c:484
#, c-format
msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'"
-msgstr "el carácter L'\\u%0*x' en la clase `%s' no debe estar en la clase `%s"
+msgstr "el carácter L'\\u%0*x' en la clase `%s' no debe estar en la clase `%s"
#: locale/programs/ld-ctype.c:498 locale/programs/ld-ctype.c:556
#, c-format
msgid "internal error in %s, line %u"
-msgstr "error interno en %s, línea %u"
+msgstr "error interno en %s, línea %u"
#: locale/programs/ld-ctype.c:527
#, c-format
msgid "character '%s' in class `%s' must be in class `%s'"
-msgstr "el carácter '%s' en la clase `%s' debe estar en la clase `%s'"
+msgstr "el carácter '%s' en la clase `%s' debe estar en la clase `%s'"
#: locale/programs/ld-ctype.c:543
#, c-format
msgid "character '%s' in class `%s' must not be in class `%s'"
-msgstr "el carácter '%s' en la clase `%s' no debe estar en la clase `%s"
+msgstr "el carácter '%s' en la clase `%s' no debe estar en la clase `%s"
#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:611
#, c-format
msgid "<SP> character not in class `%s'"
-msgstr "El carácter <SP> no está en la clase `%s'"
+msgstr "El carácter <SP> no está en la clase `%s'"
#: locale/programs/ld-ctype.c:585 locale/programs/ld-ctype.c:622
#, c-format
msgid "<SP> character must not be in class `%s'"
-msgstr "El carácter <SP> no debe estar en la clase `%s'"
+msgstr "El carácter <SP> no debe estar en la clase `%s'"
#: locale/programs/ld-ctype.c:600
+#, c-format
msgid "character <SP> not defined in character map"
-msgstr "el carácter <SP> no está definido en la tabla de caracteres"
+msgstr "el carácter <SP> no está definido en la tabla de caracteres"
-#: locale/programs/ld-ctype.c:714
+#: locale/programs/ld-ctype.c:736
+#, c-format
msgid "`digit' category has not entries in groups of ten"
-msgstr "la categoría `digit' no tiene entradas en grupos de diez"
+msgstr "la categoría `digit' no tiene entradas en grupos de diez"
-# FIXME: El original no se entiende. ¿Es gramaticalmente correcto? sv
-#: locale/programs/ld-ctype.c:763
+# FIXME: El original no se entiende. ¿Es gramaticalmente correcto? sv
+#: locale/programs/ld-ctype.c:785
+#, c-format
msgid "no input digits defined and none of the standard names in the charmap"
msgstr ""
-"no hay ningún dígito de entrada definido y ninguno de los nombres estándar\n"
+"no hay ningún dígito de entrada definido y ninguno de los nombres estándar\n"
"en el conjunto de caracteres"
-#: locale/programs/ld-ctype.c:828
+#: locale/programs/ld-ctype.c:850
+#, c-format
msgid "not all characters used in `outdigit' are available in the charmap"
msgstr ""
-"no todos los caracteres usados en `outdigit' están disponibles en la tabla\n"
+"no todos los caracteres usados en `outdigit' están disponibles en la tabla\n"
"de caracteres"
-#: locale/programs/ld-ctype.c:845
+#: locale/programs/ld-ctype.c:867
+#, c-format
msgid "not all characters used in `outdigit' are available in the repertoire"
-msgstr "no todos los caracteres usados en `outdigit' están disponibles en el repertorio"
+msgstr "no todos los caracteres usados en `outdigit' están disponibles en el repertorio"
-#: locale/programs/ld-ctype.c:1244
+#: locale/programs/ld-ctype.c:1270
#, c-format
msgid "character class `%s' already defined"
-msgstr "la clase de carácter `%s' ya fue definida"
+msgstr "la clase de carácter `%s' ya fue definida"
-#: locale/programs/ld-ctype.c:1250
+#: locale/programs/ld-ctype.c:1276
#, c-format
msgid "implementation limit: no more than %Zd character classes allowed"
-msgstr "límite de la implementación: no se permiten más de %Zd clases de caracteres"
+msgstr "límite de la implementación: no se permiten más de %Zd clases de caracteres"
-#: locale/programs/ld-ctype.c:1276
+#: locale/programs/ld-ctype.c:1302
#, c-format
msgid "character map `%s' already defined"
-msgstr "la tabla de caracteres `%s' ya está definida"
+msgstr "la tabla de caracteres `%s' ya está definida"
-#: locale/programs/ld-ctype.c:1282
+#: locale/programs/ld-ctype.c:1308
#, c-format
msgid "implementation limit: no more than %d character maps allowed"
-msgstr "límite de la implementación: no se permiten más de %d tablas de caracteres"
+msgstr "límite de la implementación: no se permiten más de %d tablas de caracteres"
-#: locale/programs/ld-ctype.c:1547 locale/programs/ld-ctype.c:1672
-#: locale/programs/ld-ctype.c:1778 locale/programs/ld-ctype.c:2464
-#: locale/programs/ld-ctype.c:3460
+#: locale/programs/ld-ctype.c:1573 locale/programs/ld-ctype.c:1698
+#: locale/programs/ld-ctype.c:1804 locale/programs/ld-ctype.c:2496
+#: locale/programs/ld-ctype.c:3492
#, c-format
msgid "%s: field `%s' does not contain exactly ten entries"
msgstr "%s: el campo `%s' no contiene exactamente diez entradas"
-#: locale/programs/ld-ctype.c:1575 locale/programs/ld-ctype.c:2146
+#: locale/programs/ld-ctype.c:1601 locale/programs/ld-ctype.c:2175
#, c-format
msgid "to-value <U%0*X> of range is smaller than from-value <U%0*X>"
-msgstr "el valor `to' del rango <U%0*X> es más pequeño que el valor `from' <U%0*X>"
+msgstr "el valor `to' del rango <U%0*X> es más pequeño que el valor `from' <U%0*X>"
-#: locale/programs/ld-ctype.c:1702
+#: locale/programs/ld-ctype.c:1728
msgid "start and end character sequence of range must have the same length"
msgstr "los caracteres de comienzo y final del rango debe tener la misma longitud"
-#: locale/programs/ld-ctype.c:1709
+#: locale/programs/ld-ctype.c:1735
msgid "to-value character sequence is smaller than from-value sequence"
-msgstr "el valor `to' de la sucesión de caracteres es más pequeño que el valor `from'"
+msgstr "el valor `to' de la sucesión de caracteres es más pequeño que el valor `from'"
-#: locale/programs/ld-ctype.c:2066 locale/programs/ld-ctype.c:2117
+#: locale/programs/ld-ctype.c:2095 locale/programs/ld-ctype.c:2146
msgid "premature end of `translit_ignore' definition"
-msgstr "Fin no esperado de la definición `translit_ignore'"
+msgstr "Fin no esperado de la definición `translit_ignore'"
-#: locale/programs/ld-ctype.c:2072 locale/programs/ld-ctype.c:2123
-#: locale/programs/ld-ctype.c:2165
+#: locale/programs/ld-ctype.c:2101 locale/programs/ld-ctype.c:2152
+#: locale/programs/ld-ctype.c:2194
msgid "syntax error"
msgstr "error de sintaxis"
-#: locale/programs/ld-ctype.c:2296
+#: locale/programs/ld-ctype.c:2328
#, c-format
msgid "%s: syntax error in definition of new character class"
-msgstr "%s: error de sintaxis en la definición de una nueva clase de caracteres"
+msgstr "%s: error de sintaxis en la definición de una nueva clase de caracteres"
-#: locale/programs/ld-ctype.c:2311
+#: locale/programs/ld-ctype.c:2343
#, c-format
msgid "%s: syntax error in definition of new character map"
-msgstr "%s: error de sintaxis en la definición de un nueva tabla de caracteres"
+msgstr "%s: error de sintaxis en la definición de un nueva tabla de caracteres"
-#: locale/programs/ld-ctype.c:2486
+#: locale/programs/ld-ctype.c:2518
msgid "ellipsis range must be marked by two operands of same type"
msgstr "el rango de la elipsis debe estar marcada mediante dos operandos del mismo tipo"
-#: locale/programs/ld-ctype.c:2495
+#: locale/programs/ld-ctype.c:2527
msgid "with symbolic name range values the absolute ellipsis `...' must not be used"
-msgstr "con valores de rango nombre simbólico la elipsis absoluta `...' no debe usarse"
+msgstr "con valores de rango nombre simbólico la elipsis absoluta `...' no debe usarse"
-#: locale/programs/ld-ctype.c:2510
+#: locale/programs/ld-ctype.c:2542
msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'"
-msgstr "con valores de rango UCS se debe utilizar la elipsis simbólica hexadecimal `..'"
+msgstr "con valores de rango UCS se debe utilizar la elipsis simbólica hexadecimal `..'"
-#: locale/programs/ld-ctype.c:2524
+#: locale/programs/ld-ctype.c:2556
msgid "with character code range values one must use the absolute ellipsis `...'"
-msgstr "con valores de rango código de caracteres se debe utilizar la elipsis absoluta `...'"
+msgstr "con valores de rango código de caracteres se debe utilizar la elipsis absoluta `...'"
-#: locale/programs/ld-ctype.c:2675
+#: locale/programs/ld-ctype.c:2707
#, c-format
msgid "duplicated definition for mapping `%s'"
-msgstr "definición duplicada para la asignación `%s'"
+msgstr "definición duplicada para la asignación `%s'"
-#: locale/programs/ld-ctype.c:2761 locale/programs/ld-ctype.c:2905
+#: locale/programs/ld-ctype.c:2793 locale/programs/ld-ctype.c:2937
#, c-format
msgid "%s: `translit_start' section does not end with `translit_end'"
-msgstr "%s: la sección `translit_start' no termina con `translit_end'"
+msgstr "%s: la sección `translit_start' no termina con `translit_end'"
-#: locale/programs/ld-ctype.c:2856
+#: locale/programs/ld-ctype.c:2888
#, c-format
msgid "%s: duplicate `default_missing' definition"
-msgstr "%s: definición `default_missing' duplicada"
+msgstr "%s: definición `default_missing' duplicada"
-#: locale/programs/ld-ctype.c:2861
+#: locale/programs/ld-ctype.c:2893
msgid "previous definition was here"
-msgstr "aquí estaba la definición anterior"
+msgstr "aquí estaba la definición anterior"
-#: locale/programs/ld-ctype.c:2883
+#: locale/programs/ld-ctype.c:2915
#, c-format
msgid "%s: no representable `default_missing' definition found"
-msgstr "%s: no se ha encontrado ninguna definición de `default_missing' representable"
-
-#: locale/programs/ld-ctype.c:3036
-#, c-format
-msgid "%s: character `%s' not defined in charmap while needed as default value"
-msgstr ""
-"%s: el carácter `%s' no está definido en el conjundo de caracteres\n"
-"cuando se necesitó como valor predeterminado"
-
-#: locale/programs/ld-ctype.c:3041 locale/programs/ld-ctype.c:3125
-#: locale/programs/ld-ctype.c:3145 locale/programs/ld-ctype.c:3166
-#: locale/programs/ld-ctype.c:3187 locale/programs/ld-ctype.c:3208
-#: locale/programs/ld-ctype.c:3229 locale/programs/ld-ctype.c:3269
-#: locale/programs/ld-ctype.c:3290 locale/programs/ld-ctype.c:3357
-#, c-format
-msgid "%s: character `%s' in charmap not representable with one byte"
-msgstr "%s: el carácter `%s' en la tabla de caracteres no es representable con un byte"
+msgstr "%s: no se ha encontrado ninguna definición de `default_missing' representable"
-#: locale/programs/ld-ctype.c:3120 locale/programs/ld-ctype.c:3140
-#: locale/programs/ld-ctype.c:3182 locale/programs/ld-ctype.c:3203
-#: locale/programs/ld-ctype.c:3224 locale/programs/ld-ctype.c:3264
-#: locale/programs/ld-ctype.c:3285 locale/programs/ld-ctype.c:3352
-#: locale/programs/ld-ctype.c:3394 locale/programs/ld-ctype.c:3419
+#: locale/programs/ld-ctype.c:3068 locale/programs/ld-ctype.c:3152
+#: locale/programs/ld-ctype.c:3172 locale/programs/ld-ctype.c:3193
+#: locale/programs/ld-ctype.c:3214 locale/programs/ld-ctype.c:3235
+#: locale/programs/ld-ctype.c:3256 locale/programs/ld-ctype.c:3296
+#: locale/programs/ld-ctype.c:3317 locale/programs/ld-ctype.c:3384
+#: locale/programs/ld-ctype.c:3426 locale/programs/ld-ctype.c:3451
#, c-format
msgid "%s: character `%s' not defined while needed as default value"
-msgstr "%s: el carácter `%s' no está definido cuando se necesitó como valor predeterminado"
+msgstr "%s: el carácter `%s' no está definido cuando se necesitó como valor predeterminado"
-#: locale/programs/ld-ctype.c:3161
+#: locale/programs/ld-ctype.c:3073 locale/programs/ld-ctype.c:3157
+#: locale/programs/ld-ctype.c:3177 locale/programs/ld-ctype.c:3198
+#: locale/programs/ld-ctype.c:3219 locale/programs/ld-ctype.c:3240
+#: locale/programs/ld-ctype.c:3261 locale/programs/ld-ctype.c:3301
+#: locale/programs/ld-ctype.c:3322 locale/programs/ld-ctype.c:3389
#, c-format
-msgid "character `%s' not defined while needed as default value"
-msgstr "el carácter `%s' no está definido cuando se necesitó como valor por defecto"
+msgid "%s: character `%s' in charmap not representable with one byte"
+msgstr "%s: el carácter `%s' en la tabla de caracteres no es representable con un byte"
-#: locale/programs/ld-ctype.c:3401 locale/programs/ld-ctype.c:3426
+#: locale/programs/ld-ctype.c:3433 locale/programs/ld-ctype.c:3458
#, c-format
msgid "%s: character `%s' needed as default value not representable with one byte"
msgstr ""
-"%s: el carácter `%s' necesario como valor predeterminado no es representable\n"
+"%s: el carácter `%s' necesario como valor predeterminado no es representable\n"
"con un byte"
# FIXME: Lo mismo de antes.
-#: locale/programs/ld-ctype.c:3481
+#: locale/programs/ld-ctype.c:3514
+#, c-format
msgid "no output digits defined and none of the standard names in the charmap"
msgstr ""
-"no hay ningún dígito de salida definido y ninguno de los nombres estándar\n"
+"no hay ningún dígito de salida definido y ninguno de los nombres estándar\n"
"en el conjunto de caracteres"
-# Pregunta: ¿De verdad existe transliteración en español? sv
-#: locale/programs/ld-ctype.c:3772
+# Pregunta: ¿De verdad existe transliteración en español? sv
+#: locale/programs/ld-ctype.c:3805
#, c-format
msgid "%s: transliteration data from locale `%s' not available"
-msgstr "%s: los datos de transliteración del local `%s' no están disponibles"
+msgstr "%s: los datos de transliteración del local `%s' no están disponibles"
-#: locale/programs/ld-ctype.c:3868
+#: locale/programs/ld-ctype.c:3906
#, c-format
msgid "%s: table for class \"%s\": %lu bytes\n"
msgstr "%s: tabla para la clase \"%s\": %lu bytes\n"
-#: locale/programs/ld-ctype.c:3937
+#: locale/programs/ld-ctype.c:3975
#, c-format
msgid "%s: table for map \"%s\": %lu bytes\n"
-msgstr "%s: tabla para la asignación \"%s\": %lu bytes\n"
+msgstr "%s: tabla para la asignación \"%s\": %lu bytes\n"
-#: locale/programs/ld-ctype.c:4070
+#: locale/programs/ld-ctype.c:4108
#, c-format
msgid "%s: table for width: %lu bytes\n"
msgstr "%s: tabla para el ancho: %lu bytes\n"
-#: locale/programs/ld-identification.c:171
+#: locale/programs/ld-identification.c:170
#, c-format
msgid "%s: no identification for category `%s'"
-msgstr "%s: no hay ninguna identificación para la categoría `%s'"
+msgstr "%s: no hay ninguna identificación para la categoría `%s'"
-#: locale/programs/ld-identification.c:436
+#: locale/programs/ld-identification.c:435
#, c-format
msgid "%s: duplicate category version definition"
-msgstr "%s: definición duplicada de la versión de la categoría"
+msgstr "%s: definición duplicada de la versión de la categoría"
-# Ídem. 1984.
-#: locale/programs/ld-measurement.c:114
+# Ãdem. 1984.
+#: locale/programs/ld-measurement.c:113
#, c-format
msgid "%s: invalid value for field `%s'"
-msgstr "%s: valor inválido para el campo `%s'"
+msgstr "%s: valor inválido para el campo `%s'"
# FIXME: Este mensaje se parece sospechosamente al anterior. sv
-#: locale/programs/ld-messages.c:115 locale/programs/ld-messages.c:149
+#: locale/programs/ld-messages.c:114 locale/programs/ld-messages.c:148
#, c-format
msgid "%s: field `%s' undefined"
-msgstr "%s: el campo `%s' no está definido"
+msgstr "%s: el campo `%s' no está definido"
-#: locale/programs/ld-messages.c:122 locale/programs/ld-messages.c:156
+#: locale/programs/ld-messages.c:121 locale/programs/ld-messages.c:155
+#: locale/programs/ld-monetary.c:256 locale/programs/ld-numeric.c:118
#, c-format
msgid "%s: value for field `%s' must not be an empty string"
-msgstr "%s: el valor para el campo `%s' no debe ser la cadena vacía"
+msgstr "%s: el valor para el campo `%s' no debe ser la cadena vacía"
-#: locale/programs/ld-messages.c:138 locale/programs/ld-messages.c:172
+#: locale/programs/ld-messages.c:137 locale/programs/ld-messages.c:171
#, c-format
msgid "%s: no correct regular expression for field `%s': %s"
-msgstr "%s: la expresión regular para el campo `%s' no es correcta: %s"
+msgstr "%s: la expresión regular para el campo `%s' no es correcta: %s"
-# ¿Errónea? em+
-# También se puede poner equivocada. sv+
+# ¿Errónea? em+
+# También se puede poner equivocada. sv+
#: locale/programs/ld-monetary.c:224
#, c-format
msgid "%s: value of field `int_curr_symbol' has wrong length"
-msgstr "%s: el valor del campo `int_curr_symbol' tiene una longitud errónea"
+msgstr "%s: el valor del campo `int_curr_symbol' tiene una longitud errónea"
#: locale/programs/ld-monetary.c:237
#, c-format
msgid "%s: value of field `int_curr_symbol' does not correspond to a valid name in ISO 4217"
msgstr ""
"%s: el valor del campo `int_curr_symbol' no se corresponde con un nombre\n"
-"válido en ISO 4217"
-
-#: locale/programs/ld-monetary.c:256 locale/programs/ld-numeric.c:119
-#, c-format
-msgid "%s: value for field `%s' must not be the empty string"
-msgstr "%s: el valor para el campo `%s' no debe estar vacío"
+"válido en ISO 4217"
-#: locale/programs/ld-monetary.c:284 locale/programs/ld-monetary.c:314
+#: locale/programs/ld-monetary.c:285 locale/programs/ld-monetary.c:315
#, c-format
msgid "%s: value for field `%s' must be in range %d...%d"
msgstr "%s: el valor para el campo `%s' debe estar en el rango %d...%d"
-#: locale/programs/ld-monetary.c:746 locale/programs/ld-numeric.c:275
+#: locale/programs/ld-monetary.c:747 locale/programs/ld-numeric.c:274
#, c-format
msgid "%s: value for field `%s' must be a single character"
-msgstr "%s: el valor para el campo `%s' debe ser un único carácter"
+msgstr "%s: el valor para el campo `%s' debe ser un único carácter"
-#: locale/programs/ld-monetary.c:843 locale/programs/ld-numeric.c:319
+#: locale/programs/ld-monetary.c:844 locale/programs/ld-numeric.c:318
#, c-format
msgid "%s: `-1' must be last entry in `%s' field"
-msgstr "%s: `-1' debe ser la última entrada del campo `%s'"
+msgstr "%s: `-1' debe ser la última entrada del campo `%s'"
-#: locale/programs/ld-monetary.c:865 locale/programs/ld-numeric.c:340
+#: locale/programs/ld-monetary.c:866 locale/programs/ld-numeric.c:335
#, c-format
msgid "%s: values for field `%s' must be smaller than 127"
msgstr "%s: los valores para el campo `%s' deben ser menores que 127"
-#: locale/programs/ld-monetary.c:908
+#: locale/programs/ld-monetary.c:909
msgid "conversion rate value cannot be zero"
-msgstr "el valor de la tasa de conversión no puede ser cero"
+msgstr "el valor de la tasa de conversión no puede ser cero"
-#: locale/programs/ld-name.c:130 locale/programs/ld-telephone.c:127
-#: locale/programs/ld-telephone.c:150
+#: locale/programs/ld-name.c:129 locale/programs/ld-telephone.c:126
+#: locale/programs/ld-telephone.c:149
#, c-format
msgid "%s: invalid escape sequence in field `%s'"
-msgstr "%s: secuencia de escape inválida en el campo `%s'"
+msgstr "%s: secuencia de escape inválida en el campo `%s'"
-#: locale/programs/ld-time.c:248
+#: locale/programs/ld-time.c:247
#, c-format
msgid "%s: direction flag in string %Zd in `era' field is not '+' nor '-'"
-msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es '+' ni '-'"
+msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es '+' ni '-'"
-#: locale/programs/ld-time.c:259
+#: locale/programs/ld-time.c:258
#, c-format
msgid "%s: direction flag in string %Zd in `era' field is not a single character"
-msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es un único carácter"
+msgstr "%s: el indicador de dirección en la cadena %Zd en el campo `era' no es un único carácter"
-#: locale/programs/ld-time.c:272
+#: locale/programs/ld-time.c:271
#, c-format
msgid "%s: invalid number for offset in string %Zd in `era' field"
-msgstr "%s: número de desplazamiento ilegal en la cadena %Zd en el campo `era'"
+msgstr "%s: número de desplazamiento ilegal en la cadena %Zd en el campo `era'"
-#: locale/programs/ld-time.c:280
+#: locale/programs/ld-time.c:279
#, c-format
msgid "%s: garbage at end of offset value in string %Zd in `era' field"
msgstr ""
"%s: incongruencias al final del valor de desplazamiento en la cadena %Zd\n"
"en el campo `era'"
-#: locale/programs/ld-time.c:331
+#: locale/programs/ld-time.c:330
#, c-format
msgid "%s: invalid starting date in string %Zd in `era' field"
-msgstr "%s: fecha de comienzo inválida en la cadena %Zd en el campo `era'"
+msgstr "%s: fecha de comienzo inválida en la cadena %Zd en el campo `era'"
-# FIXME: ¿Por qué el espacio final? sv
-#: locale/programs/ld-time.c:340
+# FIXME: ¿Por qué el espacio final? sv
+#: locale/programs/ld-time.c:339
#, c-format
msgid "%s: garbage at end of starting date in string %Zd in `era' field "
msgstr ""
"%s: incongruencias al final de la fecha de comienzo en la cadena %Zd\n"
"en el campo `era' "
-#: locale/programs/ld-time.c:359
+#: locale/programs/ld-time.c:358
#, c-format
msgid "%s: starting date is invalid in string %Zd in `era' field"
-msgstr "%s: la fecha de comienzo es inválida en la cadena %Zd del campo `era'"
+msgstr "%s: la fecha de comienzo es inválida en la cadena %Zd del campo `era'"
-#: locale/programs/ld-time.c:408
+#: locale/programs/ld-time.c:407 locale/programs/ld-time.c:435
#, c-format
msgid "%s: invalid stopping date in string %Zd in `era' field"
-msgstr "%s: fecha de parada inválida en la cadena %Zd en el campo `era'"
+msgstr "%s: fecha de parada inválida en la cadena %Zd en el campo `era'"
-#: locale/programs/ld-time.c:417
+#: locale/programs/ld-time.c:416
#, c-format
msgid "%s: garbage at end of stopping date in string %Zd in `era' field"
msgstr ""
"%s: incongruencias al final de la fecha de parada en la cadena %Zd\n"
"en el campo `era'"
-#: locale/programs/ld-time.c:436
-#, c-format
-msgid "%s: stopping date is invalid in string %Zd in `era' field"
-msgstr "%s: la fecha de final es inválida en la cadena %Zd del campo `era'"
-
-#: locale/programs/ld-time.c:445
+#: locale/programs/ld-time.c:444
#, c-format
msgid "%s: missing era name in string %Zd in `era' field"
msgstr "%s: falta el nombre de la era en la cadena %Zd en el campo `era'"
-#: locale/programs/ld-time.c:457
+#: locale/programs/ld-time.c:456
#, c-format
msgid "%s: missing era format in string %Zd in `era' field"
msgstr "%s: falta el formato de era en la cadena %Zd en el campo `era'"
-#: locale/programs/ld-time.c:486
+#: locale/programs/ld-time.c:497
#, c-format
msgid "%s: third operand for value of field `%s' must not be larger than %d"
msgstr "%s: el tercer operando para el valor del campo `%s' no debe ser mayor que %d"
-#: locale/programs/ld-time.c:494 locale/programs/ld-time.c:502
-#, c-format
-msgid "%s: values of field `%s' must not be larger than %d"
-msgstr "%s: los valores para el campo `%s' no deben ser mayores que %d"
-
-#: locale/programs/ld-time.c:510
+#: locale/programs/ld-time.c:505 locale/programs/ld-time.c:513
+#: locale/programs/ld-time.c:521
#, c-format
msgid "%s: values for field `%s' must not be larger than %d"
msgstr "%s: los valores para el campo `%s' no deben ser mayores que %d"
-#: locale/programs/ld-time.c:986
+#: locale/programs/ld-time.c:1004
#, c-format
msgid "%s: too few values for field `%s'"
-msgstr "%s: insuficiente número de valores para el campo `%s'"
+msgstr "%s: insuficiente número de valores para el campo `%s'"
-#: locale/programs/ld-time.c:1031
+#: locale/programs/ld-time.c:1049
msgid "extra trailing semicolon"
msgstr "sobra un punto y coma al final"
-#: locale/programs/ld-time.c:1034
+#: locale/programs/ld-time.c:1052
#, c-format
msgid "%s: too many values for field `%s'"
msgstr "%s: demasiados valores para el campo `%s'"
#: locale/programs/linereader.c:130
msgid "trailing garbage at end of line"
-msgstr "hay inconsistencias al final de la línea"
+msgstr "hay inconsistencias al final de la línea"
-#: locale/programs/linereader.c:304
+#: locale/programs/linereader.c:298
msgid "garbage at end of number"
-msgstr "inconsistencias al final del número"
+msgstr "inconsistencias al final del número"
-#: locale/programs/linereader.c:416
+#: locale/programs/linereader.c:410
msgid "garbage at end of character code specification"
-msgstr "inconsistencia al final de la especificación del código de caracteres"
+msgstr "inconsistencia al final de la especificación del código de caracteres"
-#: locale/programs/linereader.c:502
+#: locale/programs/linereader.c:496
msgid "unterminated symbolic name"
-msgstr "nombre simbólico sin terminar"
-
-#: locale/programs/linereader.c:566 catgets/gencat.c:1195
-msgid "invalid escape sequence"
-msgstr "secuencia de escape inválida"
+msgstr "nombre simbólico sin terminar"
-#: locale/programs/linereader.c:629
+#: locale/programs/linereader.c:623
msgid "illegal escape sequence at end of string"
msgstr "secuencia de escape ilegal al final de la cadena de caracteres"
-#: locale/programs/linereader.c:633 locale/programs/linereader.c:861
+#: locale/programs/linereader.c:627 locale/programs/linereader.c:855
msgid "unterminated string"
msgstr "cadena de caracteres sin terminar"
-#: locale/programs/linereader.c:675
+#: locale/programs/linereader.c:669
msgid "non-symbolic character value should not be used"
-msgstr "los valores de caracteres no simbólicos no deben utilizarse"
+msgstr "los valores de caracteres no simbólicos no deben utilizarse"
-#: locale/programs/linereader.c:822
+#: locale/programs/linereader.c:816
#, c-format
msgid "symbol `%.*s' not in charmap"
-msgstr "el símbolo `%.*s' no está en la tabla de caracteres"
+msgstr "el símbolo `%.*s' no está en la tabla de caracteres"
-#: locale/programs/linereader.c:843
+#: locale/programs/linereader.c:837
#, c-format
msgid "symbol `%.*s' not in repertoire map"
-msgstr "el símbolo `%.*s' no está en el repertorio"
+msgstr "el símbolo `%.*s' no está en el repertorio"
+
+#: locale/programs/locale-spec.c:131
+#, c-format
+msgid "unknown name \"%s\""
+msgstr "nombre desconocido \"%s\""
-#: locale/programs/locale.c:75
+#: locale/programs/locale.c:74
msgid "System information:"
-msgstr "Información del sistema:"
+msgstr "Información del sistema:"
-#: locale/programs/locale.c:77
+#: locale/programs/locale.c:76
msgid "Write names of available locales"
msgstr "Escribe los nombres de los locales disponibles"
-#: locale/programs/locale.c:79
+#: locale/programs/locale.c:78
msgid "Write names of available charmaps"
msgstr "Escribe los nombres de las asignaciones de caracteres disponibles"
-#: locale/programs/locale.c:80
+#: locale/programs/locale.c:79
msgid "Modify output format:"
msgstr "Modifica el formato de salida:"
-#: locale/programs/locale.c:81
+#: locale/programs/locale.c:80
msgid "Write names of selected categories"
-msgstr "Escribe los nombres de las categorías seleccionadas"
+msgstr "Escribe los nombres de las categorías seleccionadas"
-#: locale/programs/locale.c:82
+#: locale/programs/locale.c:81
msgid "Write names of selected keywords"
msgstr "Escribe los nombres de las palabras clave seleccionadas"
-#: locale/programs/locale.c:83
+#: locale/programs/locale.c:82
msgid "Print more information"
-msgstr "Muestra más información"
+msgstr "Muestra más información"
-#: locale/programs/locale.c:88
+#: locale/programs/locale.c:87
msgid "Get locale-specific information."
-msgstr "Obtiene la información específica del local."
+msgstr "Obtiene la información específica del local."
-#: locale/programs/locale.c:91
+#: locale/programs/locale.c:90
msgid ""
"NAME\n"
"[-a|-m]"
@@ -1439,99 +2624,104 @@ msgstr ""
"NOMBRE\n"
"[-a|-m]"
-#: locale/programs/locale.c:195
+#: locale/programs/locale.c:194
+#, c-format
msgid "Cannot set LC_CTYPE to default locale"
msgstr "No se puede establecer LC_CTYPE al local predeterminado"
-#: locale/programs/locale.c:197
+#: locale/programs/locale.c:196
+#, c-format
msgid "Cannot set LC_MESSAGES to default locale"
msgstr "No se puede establecer LC_MESSAGES al local predeterminado"
-#: locale/programs/locale.c:210
+#: locale/programs/locale.c:209
+#, c-format
msgid "Cannot set LC_COLLATE to default locale"
msgstr "No se puede establecer LC_COLLATE al local predeterminado"
-#: locale/programs/locale.c:226
+#: locale/programs/locale.c:225
+#, c-format
msgid "Cannot set LC_ALL to default locale"
msgstr "No se puede establecer LC_ALL al local predeterminado"
-#: locale/programs/locale.c:517
+#: locale/programs/locale.c:518
+#, c-format
msgid "while preparing output"
msgstr "al preparar la salida"
-#: locale/programs/localedef.c:121
+#: locale/programs/localedef.c:120
msgid "Input Files:"
msgstr "Ficheros de Entrada:"
-#: locale/programs/localedef.c:123
+#: locale/programs/localedef.c:122
msgid "Symbolic character names defined in FILE"
-msgstr "Nombres simbólicos de caracteres definidos en FICHERO"
+msgstr "Nombres simbólicos de caracteres definidos en FICHERO"
-#: locale/programs/localedef.c:124
+#: locale/programs/localedef.c:123
msgid "Source definitions are found in FILE"
msgstr "Las definiciones fuente se encuentran en FICHERO"
-#: locale/programs/localedef.c:126
+#: locale/programs/localedef.c:125
msgid "FILE contains mapping from symbolic names to UCS4 values"
-msgstr "El FICHERO contiene una asignación de nombres simbólicos a valores UCS4"
+msgstr "El FICHERO contiene una asignación de nombres simbólicos a valores UCS4"
-#: locale/programs/localedef.c:130
+#: locale/programs/localedef.c:129
msgid "Create output even if warning messages were issued"
msgstr "Crea la salida incluso si hubo mensajes de aviso"
-#: locale/programs/localedef.c:131
+#: locale/programs/localedef.c:130
msgid "Create old-style tables"
msgstr "Crea tablas en estilo antiguo"
-#: locale/programs/localedef.c:132
+#: locale/programs/localedef.c:131
msgid "Optional output file prefix"
msgstr "Prefijo opcional del fichero de salida"
-#: locale/programs/localedef.c:133
+#: locale/programs/localedef.c:132
msgid "Be strictly POSIX conform"
-msgstr "Actúa estrictamente de acuerdo con la norma POSIX"
+msgstr "Actúa estrictamente de acuerdo con la norma POSIX"
-#: locale/programs/localedef.c:135
+#: locale/programs/localedef.c:134
msgid "Suppress warnings and information messages"
-msgstr "Suprime los avisos y los mensajes de información"
+msgstr "Suprime los avisos y los mensajes de información"
-#: locale/programs/localedef.c:136
+#: locale/programs/localedef.c:135
msgid "Print more messages"
-msgstr "Muestra más mensajes"
+msgstr "Muestra más mensajes"
-#: locale/programs/localedef.c:137
+#: locale/programs/localedef.c:136
msgid "Archive control:"
msgstr "Control del archivo:"
-#: locale/programs/localedef.c:139
+#: locale/programs/localedef.c:138
msgid "Don't add new data to archive"
-msgstr "No añade nuevos datos al archivo"
+msgstr "No añade nuevos datos al archivo"
-#: locale/programs/localedef.c:141
+#: locale/programs/localedef.c:140
msgid "Add locales named by parameters to archive"
-msgstr "Añade locales nombrados por parámetros al archivo"
+msgstr "Añade locales nombrados por parámetros al archivo"
-#: locale/programs/localedef.c:142
+#: locale/programs/localedef.c:141
msgid "Replace existing archive content"
msgstr "Reemplaza el contenido del archivo que exista"
-#: locale/programs/localedef.c:144
+#: locale/programs/localedef.c:143
msgid "Remove locales named by parameters from archive"
-msgstr "Elimina locales nombrados por parámetros del archivo"
+msgstr "Elimina locales nombrados por parámetros del archivo"
-#: locale/programs/localedef.c:145
+#: locale/programs/localedef.c:144
msgid "List content of archive"
msgstr "Lista el contenido del archivo"
-#: locale/programs/localedef.c:147
+#: locale/programs/localedef.c:146
msgid "locale.alias file to consult when making archive"
-msgstr "fichero locale.alias que se consultará al crear el archivo"
+msgstr "fichero locale.alias que se consultará al crear el archivo"
-#: locale/programs/localedef.c:152
+#: locale/programs/localedef.c:151
msgid "Compile locale specification"
-msgstr "Compila una especificación de locales"
+msgstr "Compila una especificación de locales"
-#: locale/programs/localedef.c:155
+#: locale/programs/localedef.c:154
msgid ""
"NAME\n"
"[--add-to-archive|--delete-from-archive] FILE...\n"
@@ -1541,2605 +2731,2049 @@ msgstr ""
"[--add-to-archive|--delete-from-archive] FICHERO...\n"
"--list-archive [FICHERO]"
-#: locale/programs/localedef.c:233
+#: locale/programs/localedef.c:232
+#, c-format
msgid "cannot create directory for output files"
msgstr "no se puede crear el directorio para los ficheros de salida"
-#: locale/programs/localedef.c:244
+#: locale/programs/localedef.c:243
+#, c-format
msgid "FATAL: system does not define `_POSIX2_LOCALEDEF'"
msgstr "Error fatal: el sistema no define `_POSIX2_LOCALEDEF'"
-#: locale/programs/localedef.c:258 locale/programs/localedef.c:274
+#: locale/programs/localedef.c:257 locale/programs/localedef.c:273
#: locale/programs/localedef.c:599 locale/programs/localedef.c:619
#, c-format
msgid "cannot open locale definition file `%s'"
-msgstr "no se puede abrir el fichero de definición de locales `%s'"
+msgstr "no se puede abrir el fichero de definición de locales `%s'"
-# OJO: %s podría ser un directorio.
-#: locale/programs/localedef.c:286
+# OJO: %s podría ser un directorio.
+#: locale/programs/localedef.c:285
#, c-format
msgid "cannot write output files to `%s'"
msgstr "no se puede escribir en el fichero de salida `%s'"
-# ¿repertorios?
-#: locale/programs/localedef.c:367
+# ¿repertorios?
+#: locale/programs/localedef.c:366
#, c-format
msgid ""
"System's directory for character maps : %s\n"
-" repertoire maps: %s\n"
-" locale path : %s\n"
+"\t\t repertoire maps: %s\n"
+"\t\t locale path : %s\n"
"%s"
msgstr ""
"Directorio del sistema para asignaciones de caracteres : %s\n"
-" asignaciones de repertorios: %s\n"
-" ruta de búsqueda de locales: %s\n"
+"\t\t asignaciones de repertorios : %s\n"
+"\t\t ruta de búsqueda de locales : %s\n"
"%s"
#: locale/programs/localedef.c:567
+#, c-format
msgid "circular dependencies between locale definitions"
msgstr "dependencias circulares entre definiciones de locales"
#: locale/programs/localedef.c:573
#, c-format
msgid "cannot add already read locale `%s' a second time"
-msgstr "no se puede añadir el local ya leído `%s' por segunda vez"
+msgstr "no se puede añadir el local ya leído `%s' por segunda vez"
-#: locale/programs/locarchive.c:89 locale/programs/locarchive.c:259
+#: locale/programs/locarchive.c:92 locale/programs/locarchive.c:338
+#, c-format
msgid "cannot create temporary file"
msgstr "no se puede crear un fichero temporal"
-#: locale/programs/locarchive.c:118 locale/programs/locarchive.c:305
+#: locale/programs/locarchive.c:122 locale/programs/locarchive.c:384
+#, c-format
msgid "cannot initialize archive file"
msgstr "no se puede inicializar el archivo"
-#: locale/programs/locarchive.c:125 locale/programs/locarchive.c:312
+#: locale/programs/locarchive.c:129 locale/programs/locarchive.c:391
+#, c-format
msgid "cannot resize archive file"
-msgstr "no se puede cambiar el tamaño del archivo"
+msgstr "no se puede cambiar el tamaño del archivo"
-#: locale/programs/locarchive.c:134 locale/programs/locarchive.c:321
-#: locale/programs/locarchive.c:511
+#: locale/programs/locarchive.c:152 locale/programs/locarchive.c:414
+#: locale/programs/locarchive.c:633
+#, c-format
msgid "cannot map archive header"
msgstr "no se puede leer la cabecera del archivo"
-#: locale/programs/locarchive.c:156
+#: locale/programs/locarchive.c:174
+#, c-format
msgid "failed to create new locale archive"
msgstr "fallo al crear un nuevo archivo de locales"
-#: locale/programs/locarchive.c:168
+#: locale/programs/locarchive.c:186
+#, c-format
msgid "cannot change mode of new locale archive"
msgstr "no se puede cambiar el modo del nuevo archivo de locales"
-#: locale/programs/locarchive.c:253
+#: locale/programs/locarchive.c:285
+#, c-format
+msgid "cannot read data from locale archive"
+msgstr "no se pueden leer datos del archivo de locales"
+
+#: locale/programs/locarchive.c:318
+#, c-format
msgid "cannot map locale archive file"
msgstr "no se puede leer el fichero de locales"
-#: locale/programs/locarchive.c:329
+#: locale/programs/locarchive.c:422
+#, c-format
msgid "cannot lock new archive"
msgstr "no se puede bloquear el archivo nuevo"
-#: locale/programs/locarchive.c:380
+#: locale/programs/locarchive.c:488
+#, c-format
msgid "cannot extend locale archive file"
msgstr "no se puede extender el archivo de locales"
-#: locale/programs/locarchive.c:389
+#: locale/programs/locarchive.c:497
+#, c-format
msgid "cannot change mode of resized locale archive"
msgstr "no se puede cambiar el modo de un archivo de locales redimensionado"
-#: locale/programs/locarchive.c:397
+#: locale/programs/locarchive.c:505
+#, c-format
msgid "cannot rename new archive"
msgstr "no se puede renombrar el nuevo archivo"
-#: locale/programs/locarchive.c:450
+#: locale/programs/locarchive.c:558
#, c-format
msgid "cannot open locale archive \"%s\""
msgstr "no se puede abrir el archivo de locales \"%s\""
-#: locale/programs/locarchive.c:455
+#: locale/programs/locarchive.c:563
#, c-format
msgid "cannot stat locale archive \"%s\""
msgstr "no se puede efectuar `stat' sobre el archivo de locales \"%s\""
-#: locale/programs/locarchive.c:474
+#: locale/programs/locarchive.c:582
#, c-format
msgid "cannot lock locale archive \"%s\""
msgstr "no se puede bloquear el archivo de locales \"%s\""
-#: locale/programs/locarchive.c:497
+#: locale/programs/locarchive.c:605
+#, c-format
msgid "cannot read archive header"
msgstr "no se puede leer la cabecera del archivo"
-#: locale/programs/locarchive.c:557
+#: locale/programs/locarchive.c:680
#, c-format
msgid "locale '%s' already exists"
msgstr "el local `%s' ya existe"
-#: locale/programs/locarchive.c:788 locale/programs/locarchive.c:803
-#: locale/programs/locarchive.c:815 locale/programs/locarchive.c:827
-#: locale/programs/locfile.c:343
+#: locale/programs/locarchive.c:942 locale/programs/locarchive.c:957
+#: locale/programs/locarchive.c:969 locale/programs/locarchive.c:981
+#: locale/programs/locfile.c:344
+#, c-format
msgid "cannot add to locale archive"
-msgstr "no se puede añadir al archivo de locales"
+msgstr "no se puede añadir al archivo de locales"
-#: locale/programs/locarchive.c:982
+#: locale/programs/locarchive.c:1139
#, c-format
msgid "locale alias file `%s' not found"
-msgstr "no se encontró el fichero de alias de locales `%s'"
+msgstr "no se encontró el fichero de alias de locales `%s'"
-#: locale/programs/locarchive.c:1126
+#: locale/programs/locarchive.c:1289
#, c-format
msgid "Adding %s\n"
-msgstr "Añadiendo %s\n"
+msgstr "Añadiendo %s\n"
-#: locale/programs/locarchive.c:1132
+#: locale/programs/locarchive.c:1295
#, c-format
msgid "stat of \"%s\" failed: %s: ignored"
-msgstr "falló la llamada a `stat' sobre \"%s\": %s: descartado"
+msgstr "falló la llamada a `stat' sobre \"%s\": %s: descartado"
-#: locale/programs/locarchive.c:1138
+#: locale/programs/locarchive.c:1301
#, c-format
msgid "\"%s\" is no directory; ignored"
msgstr "\"%s\" no es un directorio; descartado"
-#: locale/programs/locarchive.c:1145
+#: locale/programs/locarchive.c:1308
#, c-format
msgid "cannot open directory \"%s\": %s: ignored"
msgstr "no se puede abrir el directorio \"%s\": %s: descartado"
-#: locale/programs/locarchive.c:1217
+#: locale/programs/locarchive.c:1380
#, c-format
msgid "incomplete set of locale files in \"%s\""
msgstr "conjunto incompleto de ficheros de locales en \"%s\""
-#: locale/programs/locarchive.c:1281
+#: locale/programs/locarchive.c:1444
#, c-format
msgid "cannot read all files in \"%s\": ignored"
msgstr "no se pueden leer todos los ficheros de \"%s\": descartado"
-#: locale/programs/locarchive.c:1351
+#: locale/programs/locarchive.c:1514
#, c-format
msgid "locale \"%s\" not in archive"
-msgstr "el local \"%s\" no está en el archivo"
+msgstr "el local \"%s\" no está en el archivo"
#: locale/programs/locfile.c:132
#, c-format
msgid "argument to `%s' must be a single character"
-msgstr "el argumento para `%s' debe ser un único carácter"
+msgstr "el argumento para `%s' debe ser un único carácter"
-#: locale/programs/locfile.c:251
+#: locale/programs/locfile.c:252
msgid "syntax error: not inside a locale definition section"
-msgstr "error de sintaxis: no está dentro de una sección de definición para un local"
+msgstr "error de sintaxis: no está dentro de una sección de definición para un local"
-#: locale/programs/locfile.c:625
+#: locale/programs/locfile.c:626
#, c-format
msgid "cannot open output file `%s' for category `%s'"
-msgstr "no se puede abrir el fichero de salida `%s' para la categoría `%s'"
+msgstr "no se puede abrir el fichero de salida `%s' para la categoría `%s'"
-#: locale/programs/locfile.c:649
+#: locale/programs/locfile.c:650
#, c-format
msgid "failure while writing data for category `%s'"
-msgstr "error al escribir los datos para la categoría `%s'"
+msgstr "error al escribir los datos para la categoría `%s'"
-#: locale/programs/locfile.c:745
+#: locale/programs/locfile.c:746
#, c-format
msgid "cannot create output file `%s' for category `%s'"
-msgstr "no se puede crear el fichero de salida `%s' para la categoría `%s'"
+msgstr "no se puede crear el fichero de salida `%s' para la categoría `%s'"
-#: locale/programs/locfile.c:781
-msgid "expect string argument for `copy'"
-msgstr "se espera un argumento de cadena de caracteres para `copy'"
+#: locale/programs/locfile.c:782
+msgid "expecting string argument for `copy'"
+msgstr "se esperaba un argumento de cadena de caracteres para `copy'"
-#: locale/programs/locfile.c:785
+#: locale/programs/locfile.c:786
msgid "locale name should consist only of portable characters"
-msgstr "el nombre del local debe estar formado por caracteres portables únicamente"
+msgstr "el nombre del local debe estar formado por caracteres portables únicamente"
-#: locale/programs/locfile.c:804
+#: locale/programs/locfile.c:805
msgid "no other keyword shall be specified when `copy' is used"
msgstr "cuando se utiliza `copy' no debe especificarse ninguna otra palabra clave"
-#: locale/programs/repertoire.c:230 locale/programs/repertoire.c:271
-#: locale/programs/repertoire.c:296
+#: locale/programs/locfile.c:819
+#, c-format
+msgid "`%1$s' definition does not end with `END %1$s'"
+msgstr "La definición `%1$s' no termina con `END %1$s'"
+
+#: locale/programs/repertoire.c:229 locale/programs/repertoire.c:270
+#: locale/programs/repertoire.c:295
#, c-format
msgid "syntax error in repertoire map definition: %s"
-msgstr "error de sintaxis en la definición de la asignación: %s"
+msgstr "error de sintaxis en la definición de la asignación: %s"
-#: locale/programs/repertoire.c:272
+#: locale/programs/repertoire.c:271
msgid "no <Uxxxx> or <Uxxxxxxxx> value given"
-msgstr "no se ha dado ningún valor <Uxxxx> o <Uxxxxxxxx>"
+msgstr "no se ha dado ningún valor <Uxxxx> o <Uxxxxxxxx>"
-# No sé qué es eso del "repertoire map", pero creo que el repertoire
-# es una simple aclaración. sv
-#: locale/programs/repertoire.c:332
+# No sé qué es eso del "repertoire map", pero creo que el repertoire
+# es una simple aclaración. sv
+#: locale/programs/repertoire.c:331
+#, c-format
msgid "cannot save new repertoire map"
-msgstr "no se puede asegurar el nuevo repertorio"
+msgstr "no se puede guardar el nuevo repertorio"
-#: locale/programs/repertoire.c:343
+#: locale/programs/repertoire.c:342
#, c-format
msgid "repertoire map file `%s' not found"
-msgstr "el fichero de tabla de caracteres `%s' no se encontró"
+msgstr "el fichero de tabla de caracteres `%s' no se encontró"
-#: locale/programs/repertoire.c:450
+#: login/programs/pt_chown.c:78
#, c-format
-msgid "<%s> and <%s> are invalid names for range"
-msgstr "<%s> y <%s> son nombres inválidos para el rango de caracteres"
-
-# FIXME: then -> than
-#: locale/programs/repertoire.c:457
-msgid "upper limit in range is not smaller then lower limit"
-msgstr "el límite superior del rango no es menor que el límite inferior"
-
-#: locale/programs/xmalloc.c:70 malloc/obstack.c:505 malloc/obstack.c:508
-#: posix/getconf.c:1007
-msgid "memory exhausted"
-msgstr "memoria agotada"
+msgid "Set the owner, group and access permission of the slave pseudo terminal corresponding to the master pseudo terminal passed on file descriptor `%d'. This is the helper program for the `grantpt' function. It is not intended to be run directly from the command line.\n"
+msgstr "Establece el propietario, grupo y permisos de acceso del pseudoterminal esclavo correspondiente al pseudoterminal maestro que se le pasa en el descriptor de fichero `%d'. Este es el programa de apoyo para la función `grantpt'. No está pensada para ejecutarse directamente desde la línea de órdenes.\n"
-# ¿Qué tiene de malo "inesperado"? sv
-#
-# Parece el nombre de película de los '50 em
-# ... y antes de que digas nada, a mí me encantan
-# las películas de los 50 em
-#
-# Pero es que esa palabra *existe* y significa "no esperado".
-# ¿Por qué quieres empobrecer el idioma de esa forma?
-# ¿No podrías emplear la forma in-loquesea unas veces sí y otras no,
-# para darle variedad a la cosa? (Por ejemplo aquí sí, pues no te debe
-# recordar a una opción en silla de ruedas...). sv+
-#
-# Lo cambio después de leer 1984. sv
-#: assert/assert-perr.c:57
+#: login/programs/pt_chown.c:88
#, c-format
-msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
-msgstr "%s%s%s:%u: %s%sError inesperado: %s.\n"
+msgid ""
+"The owner is set to the current user, the group is set to `%s', and the access permission is set to `%o'.\n"
+"\n"
+"%s"
+msgstr ""
+"El propietario se establece al usuario actual, el grupo se establece a `%s', y los permissos de acceso se establecen a `%o'.\n"
+"\n"
+"%s"
-# La traducción de Jochen es exactamente esta: Zusicherung %s nicht erfüllt
-# que viene a decir algo así que las promesas no se han cumplido, o que
-# las afirmaciones hechas no son ciertas.
-#: assert/assert.c:56
+#: login/programs/pt_chown.c:192
#, c-format
-msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
-msgstr "%s%s%s:%u: %s%sLa declaración `%s' no se cumple.\n"
+msgid "too many arguments"
+msgstr "demasiados argumentos"
-# ¿Qué demonios es esto? sv
-#: intl/tst-codeset.c:40 intl/tst-codeset.c:50
-msgid "cheese"
-msgstr "queso"
+#: login/programs/pt_chown.c:200
+#, c-format
+msgid "needs to be installed setuid `root'"
+msgstr "necesita ser instalado setuid `root'"
-#: intl/tst-gettext2.c:37
-msgid "First string for testing."
-msgstr "Primera cadena para hacer pruebas."
+#: malloc/mcheck.c:350
+msgid "memory is consistent, library is buggy\n"
+msgstr "la memoria es consistente, la biblioteca tiene un bicho\n"
-#: intl/tst-gettext2.c:38
-msgid "Another string for testing."
-msgstr "Otra cadena para hacer pruebas."
+#: malloc/mcheck.c:353
+msgid "memory clobbered before allocated block\n"
+msgstr "memoria alterada antes del bloque de memoria asignado\n"
-#: catgets/gencat.c:111 catgets/gencat.c:115 nscd/nscd.c:88
-msgid "NAME"
-msgstr "NOMBRE"
+#: malloc/mcheck.c:356
+msgid "memory clobbered past end of allocated block\n"
+msgstr "memoria alterada pasado el final del bloque de memoria asignado\n"
-#: catgets/gencat.c:112
-msgid "Create C header file NAME containing symbol definitions"
-msgstr "Crea un fichero de cabecera C, NOMBRE, que contiene las definiciones de símbolos"
+#: malloc/mcheck.c:359
+msgid "block freed twice\n"
+msgstr "bloque liberado dos veces\n"
-#: catgets/gencat.c:114
-msgid "Do not use existing catalog, force new output file"
-msgstr "No utiliza el catálogo existente, crea un nuevo fichero de salida"
+# Revisar lo de bogus. creo que es eso.
+#: malloc/mcheck.c:362
+msgid "bogus mcheck_status, library is buggy\n"
+msgstr "valor de mcheck_status incorrecto, la biblioteca tiene un bicho\n"
-#: catgets/gencat.c:115
-msgid "Write output to file NAME"
-msgstr "Escribe el resultado en el fichero NOMBRE"
+#: malloc/memusage.sh:33
+msgid "%s: option '%s' requires an argument\\n"
+msgstr "%s: la opción '%s' requiere un argumento\\n"
-# FIXME: ¿Qué es ^K?
-#: catgets/gencat.c:120
+#: malloc/memusage.sh:39
msgid ""
-"Generate message catalog. If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n"
-"is -, output is written to standard output.\n"
+"Usage: memusage [OPTION]... PROGRAM [PROGRAMOPTION]...\n"
+"Profile memory usage of PROGRAM.\n"
+"\n"
+" -n,--progname=NAME Name of the program file to profile\n"
+" -p,--png=FILE Generate PNG graphic and store it in FILE\n"
+" -d,--data=FILE Generate binary data file and store it in FILE\n"
+" -u,--unbuffered Don't buffer output\n"
+" -b,--buffer=SIZE Collect SIZE entries before writing them out\n"
+" --no-timer Don't collect additional information through timer\n"
+" -m,--mmap Also trace mmap & friends\n"
+"\n"
+" -?,--help Print this help and exit\n"
+" --usage Give a short usage message\n"
+" -V,--version Print version information and exit\n"
+"\n"
+" The following options only apply when generating graphical output:\n"
+" -t,--time-based Make graph linear in time\n"
+" -T,--total Also draw graph of total memory use\n"
+" --title=STRING Use STRING as title of the graph\n"
+" -x,--x-size=SIZE Make graphic SIZE pixels wide\n"
+" -y,--y-size=SIZE Make graphic SIZE pixels high\n"
+"\n"
+"Mandatory arguments to long options are also mandatory for any corresponding\n"
+"short options.\n"
+"\n"
msgstr ""
-"Genera un catálogo de mensajes. Si FICHERO-ENTRADA es -, la entrada\n"
-"se lee de la entrada estándar. Si FICHERO-SALIDA es -, el resultado se\n"
-"escribe en la salida estándar.\n"
+"Modo de empleo: memusage [OPCIÓN]... PROGRAMA [OPCIÓNDEPROGRAMA]...\n"
+"Calibra el uso de memoria de PROGRAMA.\n"
+"\n"
+" -n,--progname=NOMBRE Nombre del programa que se calibra\n"
+" -p,--png=FICHERO Genera un gráfico PNG y lo almacena en FICHERO\n"
+" -d,--data=FICHERO Genera un fichero de datos binario y lo almacena en FICHERO\n"
+" -u,--unbuffered No hace búfer con el resultado\n"
+" -b,--buffer=TAMAÑO Acumula TAMAÑO entradas antes de escribirlas\n"
+" --no-timer No obtiene información adicional a través del temporizador\n"
+" -m,--mmap Sigue también mmap y compañía\n"
+"\n"
+" -?,--help Muestra esta ayuda y finaliza\n"
+" --usage Muestra un breve mensaje de uso\n"
+" -V,--version Muestra la versión y finaliza\n"
+"\n"
+" Las siguientes opciones solamente son aplicables cuando se genera una salida gráfica:\n"
+" -t,--time-based Crea el gráfico lineal en el tiempo\n"
+" -T,--total Dibuja también un gráfico del uso total de memoria\n"
+" --title=CADENA Utiliza CADENA como título del gráfico\n"
+" -x,--x-size=TAMAÑO Crea un gráfico de TAMAÑO pixeles de ancho\n"
+" -y,--y-size=TAMAÑO Crea un gráfico de TAMAÑO pixeles de alto\n"
+"\n"
+"Los argumentos obligatorios para las opciones largas son también obligatorios\n"
+"para las opciones cortas correspondientes.\n"
-#: catgets/gencat.c:125
+#: malloc/memusage.sh:101
msgid ""
-"-o OUTPUT-FILE [INPUT-FILE]...\n"
-"[OUTPUT-FILE [INPUT-FILE]...]"
+"Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n"
+"\t [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
+"\t [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
+"\t PROGRAM [PROGRAMOPTION]..."
msgstr ""
-"-o FICHERO-SALIDA [FICHERO-ENTRADA]...\n"
-"[FICHERO-SALIDA [FICHERO-ENTRADA]...]"
+"Sintaxis: memusage [--data=FICHERO] [--progname=NOMBRE] [--png=FICHERO] [--unbuffered]\n"
+"\t [--buffer=TAMAÑO] [--no-timer] [--time-based] [--total]\n"
+"\t [--title=CADENA] [--x-size=TAMAÑO] [--y-size=TAMAÑO]\n"
+"\t PROGRAMA [OPCIÓNDEPROGRAMA]..."
-#: catgets/gencat.c:282
-msgid "*standard input*"
-msgstr "*entrada estándar*"
+#: malloc/memusage.sh:193
+msgid "memusage: option \\`${1##*=}' is ambiguous"
+msgstr "memusage: la opción \\`${1##*=}' es ambigua"
-#: catgets/gencat.c:417 catgets/gencat.c:494
-msgid "illegal set number"
-msgstr "número de conjunto ilegal"
+#: malloc/memusage.sh:202
+msgid "memusage: unrecognized option \\`$1'"
+msgstr "memusage: opción no reconocida \\`$1'"
-#: catgets/gencat.c:444
-msgid "duplicate set definition"
-msgstr "definición de conjunto duplicada"
+#: malloc/memusage.sh:215
+msgid "No program name given"
+msgstr "No se ha dado ningún nombre de programa"
-#: catgets/gencat.c:446 catgets/gencat.c:623 catgets/gencat.c:677
-msgid "this is the first definition"
-msgstr "esta es la primera vez que aparece la definición"
-
-#: catgets/gencat.c:522
-#, c-format
-msgid "unknown set `%s'"
-msgstr "conjunto `%s' desconocido"
-
-#: catgets/gencat.c:563
-msgid "invalid quote character"
-msgstr "carácter de cita inválido"
-
-# descartada (?) sv
-# ¿y así? em
-# por mí, vale. sv+
-#: catgets/gencat.c:576
-#, c-format
-msgid "unknown directive `%s': line ignored"
-msgstr "directiva desconocida `%s': línea pasada por alto"
-
-#: catgets/gencat.c:621
-msgid "duplicated message number"
-msgstr "número de mensaje duplicado"
-
-#: catgets/gencat.c:674
-msgid "duplicated message identifier"
-msgstr "identificador de mensaje duplicado"
+# Supondremos que se trata de un imperativo. sv
+#: malloc/memusagestat.c:57
+msgid "Name output file"
+msgstr "Nombre el fichero de salida"
-#: catgets/gencat.c:731
-msgid "invalid character: message ignored"
-msgstr "carácter inválido: mensaje descartado"
+#: malloc/memusagestat.c:58
+msgid "Title string used in output graphic"
+msgstr "Se ha utilizado una cadena de título en la gráfica de salida"
-#: catgets/gencat.c:774
-msgid "invalid line"
-msgstr "línea inválida"
+#: malloc/memusagestat.c:59
+msgid "Generate output linear to time (default is linear to number of function calls)"
+msgstr ""
+"Genera un resultado lineal en el tiempo (por omisión es lineal en el número\n"
+"de llamadas a función)"
-#: catgets/gencat.c:828
-msgid "malformed line ignored"
-msgstr "una línea incorrecta no se tendrá en cuenta"
+#: malloc/memusagestat.c:61
+msgid "Also draw graph for total memory consumption"
+msgstr "Dibuja también una gráfica del total de memoria consumida"
-#: catgets/gencat.c:992 catgets/gencat.c:1033
-#, c-format
-msgid "cannot open output file `%s'"
-msgstr "no se puede abrir el fichero de salida `%s'"
+#: malloc/memusagestat.c:62
+msgid "Make output graphic VALUE pixels wide"
+msgstr "Hace que la salida gráfica tenga VALOR pixels de ancho"
-#: catgets/gencat.c:1217
-msgid "unterminated message"
-msgstr "mensaje sin terminar"
+#: malloc/memusagestat.c:63
+msgid "Make output graphic VALUE pixels high"
+msgstr "Hace que la salida gráfica tenga VALOR pixels de alto"
-#: catgets/gencat.c:1241
-msgid "while opening old catalog file"
-msgstr "al abrir el fichero de catálogo antiguo"
+#: malloc/memusagestat.c:68
+msgid "Generate graphic from memory profiling data"
+msgstr "Genera un gráfico a partir de los datos de `profiling' de memoria"
-#: catgets/gencat.c:1332
-msgid "conversion modules not available"
-msgstr "no están disponibles los módulos de conversión"
+#: malloc/memusagestat.c:71
+msgid "DATAFILE [OUTFILE]"
+msgstr "FICHERODEDATOS [FICHERODESALIDA]"
-#: catgets/gencat.c:1358
-msgid "cannot determine escape character"
-msgstr "no se puede determinar el carácter de escape"
+#: misc/error.c:118
+msgid "Unknown system error"
+msgstr "Error del sistema desconocido"
-#: stdlib/../sysdeps/unix/sysv/linux/ia64/makecontext.c:63
-#, c-format
-msgid "makecontext: does not know how to handle more than 8 arguments\n"
-msgstr "makecontext: no sabe cómo manejar más de 8 argumentos\n"
+#: nis/nis_callback.c:189
+msgid "unable to free arguments"
+msgstr "no se pueden liberar los argumentos"
-# "¡conseguido!" me recuerda a los "sketches" de Faemino y Cansado...
-# me gustaría que hubiera otra palabra mejor. SV
+# "¡conseguido!" me recuerda a los "sketches" de Faemino y Cansado...
+# me gustaría que hubiera otra palabra mejor. SV
# Siempre me han gustado F&C ;-)
-# A mí también :-) sv
-#: stdio-common/../sysdeps/gnu/errlist.c:12 posix/regcomp.c:147
-#: nis/nis_error.c:29 nis/ypclnt.c:778 nis/ypclnt.c:852
+# A mí también :-) sv
+#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:132
+#: sysdeps/gnu/errlist.c:20
msgid "Success"
msgstr "Conseguido"
-#. TRANS Operation not permitted; only the owner of the file (or other resource)
-#. TRANS or processes with special privileges can perform the operation.
-#: stdio-common/../sysdeps/gnu/errlist.c:17
-msgid "Operation not permitted"
-msgstr "Operación no permitida"
-
-#. TRANS No such file or directory. This is a ``file doesn't exist'' error
-#. TRANS for ordinary files that are referenced in contexts where they are
-#. TRANS expected to already exist.
-#: stdio-common/../sysdeps/gnu/errlist.c:28
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:32
-msgid "No such file or directory"
-msgstr "No existe el fichero o el directorio"
-
-# Sugerencia: No existe el proceso. sv
-# ¿Por qué?
-# Porque si "No such file or directory" se ha traducido por
-# "no existe el fichero o el directorio", está claro que si le dices un
-# proceso y te dice "no existe el proceso" se refiere al que
-# tú le has dicho y no a otro. sv
-#
-#. TRANS No process matches the specified process ID.
-#: stdio-common/../sysdeps/gnu/errlist.c:37
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:33
-msgid "No such process"
-msgstr "No existe el proceso"
-
-#. TRANS Interrupted function call; an asynchronous signal occurred and prevented
-#. TRANS completion of the call. When this happens, you should try the call
-#. TRANS again.
-#. TRANS
-#. TRANS You can choose to have functions resume after a signal that is handled,
-#. TRANS rather than failing with @code{EINTR}; see @ref{Interrupted
-#. TRANS Primitives}.
-#: stdio-common/../sysdeps/gnu/errlist.c:52
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:34
-msgid "Interrupted system call"
-msgstr "Llamada al sistema interrumpida"
+#: nis/nis_error.h:2
+msgid "Probable success"
+msgstr "Éxito probable"
-#. TRANS Input/output error; usually used for physical read or write errors.
-#: stdio-common/../sysdeps/gnu/errlist.c:61
-msgid "Input/output error"
-msgstr "Error de entrada/salida"
+#: nis/nis_error.h:3
+msgid "Not found"
+msgstr "No se ha encontrado"
-#. TRANS No such device or address. The system tried to use the device
-#. TRANS represented by a file you specified, and it couldn't find the device.
-#. TRANS This can mean that the device file was installed incorrectly, or that
-#. TRANS the physical device is missing or not correctly attached to the
-#. TRANS computer.
-#: stdio-common/../sysdeps/gnu/errlist.c:74
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:36
-msgid "No such device or address"
-msgstr "No existe el dispositivo o la dirección"
+#: nis/nis_error.h:4
+msgid "Probably not found"
+msgstr "Probablemente no se encontró"
-#. TRANS Argument list too long; used when the arguments passed to a new program
-#. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a
-#. TRANS File}) occupy too much memory space. This condition never arises in the
-#. TRANS GNU system.
-#: stdio-common/../sysdeps/gnu/errlist.c:86
-msgid "Argument list too long"
-msgstr "La lista de argumentos es demasiado larga"
+#: nis/nis_error.h:5
+msgid "Cache expired"
+msgstr "El caché ha expirado"
-#. TRANS Invalid executable file format. This condition is detected by the
-#. TRANS @code{exec} functions; see @ref{Executing a File}.
-#: stdio-common/../sysdeps/gnu/errlist.c:96
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:38
-msgid "Exec format error"
-msgstr "Formato de ejecutable incorrecto"
+#: nis/nis_error.h:6
+msgid "NIS+ servers unreachable"
+msgstr "No se puede acceder a los servidores NIS+"
-#. TRANS Bad file descriptor; for example, I/O on a descriptor that has been
-#. TRANS closed or reading from a descriptor open only for writing (or vice
-#. TRANS versa).
-#: stdio-common/../sysdeps/gnu/errlist.c:107
-msgid "Bad file descriptor"
-msgstr "Descriptor de fichero erróneo"
+#: nis/nis_error.h:7
+msgid "Unknown object"
+msgstr "Objeto desconocido"
-#. TRANS There are no child processes. This error happens on operations that are
-#. TRANS supposed to manipulate child processes, when there aren't any processes
-#. TRANS to manipulate.
-#: stdio-common/../sysdeps/gnu/errlist.c:118
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:40
-msgid "No child processes"
-msgstr "No hay ningún proceso hijo"
+#: nis/nis_error.h:8
+msgid "Server busy, try again"
+msgstr "El servidor está ocupado, inténtelo de nuevo"
-# ¿Sugerencias? em
-# ¿Evitado? sv
-# Esperemos a ver la opinión de otro. em
-#
-# ¡Ya la tienen! Creo que hay que traducir (o al menos preservar) deadlock.
-# No diría "el recurso" porque aquí "resource deadlock" significa
-# "deadlock de recursos" y un deadlock siempre se trata de más de un
-# recurso. -jtobey
-#
-# Estupendo. sv
-#
-#. TRANS Deadlock avoided; allocating a system resource would have resulted in a
-#. TRANS deadlock situation. The system does not guarantee that it will notice
-#. TRANS all such situations. This error means you got lucky and the system
-#. TRANS noticed; it might just hang. @xref{File Locks}, for an example.
-#: stdio-common/../sysdeps/gnu/errlist.c:130
-msgid "Resource deadlock avoided"
-msgstr "Se ha evitado un bloqueo de recursos"
+#: nis/nis_error.h:9
+msgid "Generic system error"
+msgstr "Error del sistema genérico"
-#. TRANS No memory available. The system cannot allocate more virtual memory
-#. TRANS because its capacity is full.
-#: stdio-common/../sysdeps/gnu/errlist.c:140
-msgid "Cannot allocate memory"
-msgstr "No se pudo asignar memoria"
+#: nis/nis_error.h:10
+msgid "First/next chain broken"
+msgstr "Cadena primero/siguiente rota"
#. TRANS Permission denied; the file permissions do not allow the attempted operation.
-#: stdio-common/../sysdeps/gnu/errlist.c:149
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:43
-#: nis/nis_error.c:39 nis/ypclnt.c:808
+#: nis/nis_error.h:11 nis/ypclnt.c:878 sysdeps/gnu/errlist.c:157
msgid "Permission denied"
msgstr "Permiso denegado"
-#. TRANS Bad address; an invalid pointer was detected.
-#. TRANS In the GNU system, this error never happens; you get a signal instead.
-#: stdio-common/../sysdeps/gnu/errlist.c:159
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:44
-msgid "Bad address"
-msgstr "Dirección incorrecta"
-
-#. TRANS A file that isn't a block special file was given in a situation that
-#. TRANS requires one. For example, trying to mount an ordinary file as a file
-#. TRANS system in Unix gives this error.
-#: stdio-common/../sysdeps/gnu/errlist.c:170
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:45
-msgid "Block device required"
-msgstr "Se requiere un dispositivo de bloques"
-
-#. TRANS Resource busy; a system resource that can't be shared is already in use.
-#. TRANS For example, if you try to delete a file that is the root of a currently
-#. TRANS mounted filesystem, you get this error.
-#: stdio-common/../sysdeps/gnu/errlist.c:181
-msgid "Device or resource busy"
-msgstr "Dispositivo o recurso ocupado"
+#: nis/nis_error.h:12
+msgid "Not owner"
+msgstr "No es el propietario"
-#. TRANS File exists; an existing file was specified in a context where it only
-#. TRANS makes sense to specify a new file.
-#: stdio-common/../sysdeps/gnu/errlist.c:191
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:47
-msgid "File exists"
-msgstr "El fichero ya existe"
+#: nis/nis_error.h:13
+msgid "Name not served by this server"
+msgstr "Nombre no servido por este servidor"
-# ??? ver esto.
-#. TRANS An attempt to make an improper link across file systems was detected.
-#. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but
-#. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}).
-#: stdio-common/../sysdeps/gnu/errlist.c:202
-msgid "Invalid cross-device link"
-msgstr "Enlace cruzado entre dispositivos no permitido"
+#: nis/nis_error.h:14
+msgid "Server out of memory"
+msgstr "Memoria agotada en el servidor"
-#. TRANS The wrong type of device was given to a function that expects a
-#. TRANS particular sort of device.
-#: stdio-common/../sysdeps/gnu/errlist.c:212
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:49
-msgid "No such device"
-msgstr "No existe el dispositivo"
+#: nis/nis_error.h:15
+msgid "Object with same name exists"
+msgstr "Existe un objeto con el mismo nombre"
-#. TRANS A file that isn't a directory was specified when a directory is required.
-#: stdio-common/../sysdeps/gnu/errlist.c:221
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:50
-msgid "Not a directory"
-msgstr "No es un directorio"
+#: nis/nis_error.h:16
+msgid "Not master server for this domain"
+msgstr "No existe un servidor maestro para este dominio"
-#. TRANS File is a directory; you cannot open a directory for writing,
-#. TRANS or create or remove hard links to it.
-#: stdio-common/../sysdeps/gnu/errlist.c:231
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:51
-msgid "Is a directory"
-msgstr "Es un directorio"
+#: nis/nis_error.h:17
+msgid "Invalid object for operation"
+msgstr "Objeto inválido para la operación"
-#. TRANS Invalid argument. This is used to indicate various kinds of problems
-#. TRANS with passing the wrong argument to a library function.
-#: stdio-common/../sysdeps/gnu/errlist.c:241
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:52
-msgid "Invalid argument"
-msgstr "Argumento inválido"
+#: nis/nis_error.h:18
+msgid "Malformed name, or illegal name"
+msgstr "Nombre mal escrito, o nombre ilegal"
-#. TRANS The current process has too many files open and can't open any more.
-#. TRANS Duplicate descriptors do count toward this limit.
-#. TRANS
-#. TRANS In BSD and GNU, the number of open files is controlled by a resource
-#. TRANS limit that can usually be increased. If you get this error, you might
-#. TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited;
-#. TRANS @pxref{Limits on Resources}.
-#: stdio-common/../sysdeps/gnu/errlist.c:256
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:54
-msgid "Too many open files"
-msgstr "Demasiados ficheros abiertos"
+#: nis/nis_error.h:19
+msgid "Unable to create callback"
+msgstr "No se puede crear la llamada de regreso"
-#. TRANS There are too many distinct file openings in the entire system. Note
-#. TRANS that any number of linked channels count as just one file opening; see
-#. TRANS @ref{Linked Channels}. This error never occurs in the GNU system.
-#: stdio-common/../sysdeps/gnu/errlist.c:267
-msgid "Too many open files in system"
-msgstr "Demasiados ficheros abiertos en el sistema"
+# ¿callback?
+#: nis/nis_error.h:20
+msgid "Results sent to callback proc"
+msgstr "Resultados enviados al proceso de `callback'"
-#. TRANS Inappropriate I/O control operation, such as trying to set terminal
-#. TRANS modes on an ordinary file.
-#: stdio-common/../sysdeps/gnu/errlist.c:277
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:55
-msgid "Inappropriate ioctl for device"
-msgstr "Función ioctl no apropiada para el dispositivo"
+#: nis/nis_error.h:21
+msgid "Not found, no such name"
+msgstr "No se encontró, no existe ese nombre"
-#. TRANS An attempt to execute a file that is currently open for writing, or
-#. TRANS write to a file that is currently being executed. Often using a
-#. TRANS debugger to run a program is considered having it open for writing and
-#. TRANS will cause this error. (The name stands for ``text file busy''.) This
-#. TRANS is not an error in the GNU system; the text is copied as necessary.
-#: stdio-common/../sysdeps/gnu/errlist.c:290
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:56
-msgid "Text file busy"
-msgstr "El fichero de texto está ocupado"
+#: nis/nis_error.h:22
+msgid "Name/entry isn't unique"
+msgstr "El par nombre/entrada no es único"
-#. TRANS File too big; the size of a file would be larger than allowed by the system.
-#: stdio-common/../sysdeps/gnu/errlist.c:299
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:57
-msgid "File too large"
-msgstr "Fichero demasiado grande"
+#: nis/nis_error.h:23
+msgid "Modification failed"
+msgstr "Fallo en la modificación"
-#. TRANS No space left on device; write operation on a file failed because the
-#. TRANS disk is full.
-#: stdio-common/../sysdeps/gnu/errlist.c:309
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:58
-msgid "No space left on device"
-msgstr "No queda espacio en el dispositivo"
+#: nis/nis_error.h:24
+msgid "Database for table does not exist"
+msgstr "No existe la base de datos para la tabla"
-# ¿"seek" no era "desplazamiento"? sv
-# Según el contexto no se puede saber a qué se refiere
-# cambio ... por no permitida em+
-# Suggestion: "Llamada a lseek() inválida" -jtobey
-# Sí, bueno, esto lo hemos traducido otras veces por desplazamiento, así
-# que lo cambio (antes era "búsqueda no permitida").
-# Como hay varias funciones de desplazamiento creo que es mejor
-# no decantarse por ninguna en particular. sv
-#. TRANS Invalid seek operation (such as on a pipe).
-#: stdio-common/../sysdeps/gnu/errlist.c:318
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:59
-msgid "Illegal seek"
-msgstr "Desplazamiento ilegal"
+#: nis/nis_error.h:25
+msgid "Entry/table type mismatch"
+msgstr "Discordancia de tipo entrada/tabla"
-#. TRANS An attempt was made to modify something on a read-only file system.
-#: stdio-common/../sysdeps/gnu/errlist.c:327
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:60
-msgid "Read-only file system"
-msgstr "Sistema de ficheros de sólo lectura"
+#: nis/nis_error.h:26
+msgid "Link points to illegal name"
+msgstr "En enlace apunta a un nombre ilegal"
-#. TRANS Too many links; the link count of a single file would become too large.
-#. TRANS @code{rename} can cause this error if the file being renamed already has
-#. TRANS as many links as it can take (@pxref{Renaming Files}).
-#: stdio-common/../sysdeps/gnu/errlist.c:338
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:61
-msgid "Too many links"
-msgstr "Demasiados enlaces"
+#: nis/nis_error.h:27
+msgid "Partial success"
+msgstr "Éxito parcial"
-#. TRANS Domain error; used by mathematical functions when an argument value does
-#. TRANS not fall into the domain over which the function is defined.
-#: stdio-common/../sysdeps/gnu/errlist.c:361
-msgid "Numerical argument out of domain"
-msgstr "Argumento numérico fuera del dominio de la función"
+#: nis/nis_error.h:28
+msgid "Too many attributes"
+msgstr "Demasiados atributos"
-#. TRANS Range error; used by mathematical functions when the result value is
-#. TRANS not representable because of overflow or underflow.
-#: stdio-common/../sysdeps/gnu/errlist.c:371
-msgid "Numerical result out of range"
-msgstr "Resultado numérico fuera de rango"
+#: nis/nis_error.h:29
+msgid "Error in RPC subsystem"
+msgstr "Error en el subsistema RPC"
-#. TRANS Resource temporarily unavailable; the call might work if you try again
-#. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN};
-#. TRANS they are always the same in the GNU C library.
-#. TRANS
-#. TRANS This error can happen in a few different situations:
-#. TRANS
-#. TRANS @itemize @bullet
-#. TRANS @item
-#. TRANS An operation that would block was attempted on an object that has
-#. TRANS non-blocking mode selected. Trying the same operation again will block
-#. TRANS until some external condition makes it possible to read, write, or
-#. TRANS connect (whatever the operation). You can use @code{select} to find out
-#. TRANS when the operation will be possible; @pxref{Waiting for I/O}.
-#. TRANS
-#. TRANS @strong{Portability Note:} In many older Unix systems, this condition
-#. TRANS was indicated by @code{EWOULDBLOCK}, which was a distinct error code
-#. TRANS different from @code{EAGAIN}. To make your program portable, you should
-#. TRANS check for both codes and treat them the same.
-#. TRANS
-#. TRANS @item
-#. TRANS A temporary resource shortage made an operation impossible. @code{fork}
-#. TRANS can return this error. It indicates that the shortage is expected to
-#. TRANS pass, so your program can try the call again later and it may succeed.
-#. TRANS It is probably a good idea to delay for a few seconds before trying it
-#. TRANS again, to allow time for other processes to release scarce resources.
-#. TRANS Such shortages are usually fairly serious and affect the whole system,
-#. TRANS so usually an interactive program should report the error to the user
-#. TRANS and return to its command loop.
-#. TRANS @end itemize
-#: stdio-common/../sysdeps/gnu/errlist.c:408
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:41
-msgid "Resource temporarily unavailable"
-msgstr "Recurso no disponible temporalmente"
+#: nis/nis_error.h:30
+msgid "Missing or malformed attribute"
+msgstr "Falta un atributo o está mal escrito"
-#. TRANS In the GNU C library, this is another name for @code{EAGAIN} (above).
-#. TRANS The values are always the same, on every operating system.
-#. TRANS
-#. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a
-#. TRANS separate error code.
-#: stdio-common/../sysdeps/gnu/errlist.c:421
-msgid "Operation would block"
-msgstr "La operación se bloquearía"
+#: nis/nis_error.h:31
+msgid "Named object is not searchable"
+msgstr "El objeto nombrado no es localizable"
-#. TRANS An operation that cannot complete immediately was initiated on an object
-#. TRANS that has non-blocking mode selected. Some functions that must always
-#. TRANS block (such as @code{connect}; @pxref{Connecting}) never return
-#. TRANS @code{EAGAIN}. Instead, they return @code{EINPROGRESS} to indicate that
-#. TRANS the operation has begun and will take some time. Attempts to manipulate
-#. TRANS the object before the call completes return @code{EALREADY}. You can
-#. TRANS use the @code{select} function to find out when the pending operation
-#. TRANS has completed; @pxref{Waiting for I/O}.
-#: stdio-common/../sysdeps/gnu/errlist.c:437
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:180
-msgid "Operation now in progress"
-msgstr "Operación en curso"
+# ¿callback?
+#: nis/nis_error.h:32
+msgid "Error while talking to callback proc"
+msgstr "Error al hablar con el proceso de `callback'"
-# Vale, pero muy poco más abajo has puesto "en curso", que me parece mejor. sv
-# Creo que prefiero dejar uno de cada. Se me ocurre si no cambiar el
-# de abajo también. em
-#. TRANS An operation is already in progress on an object that has non-blocking
-#. TRANS mode selected.
-#: stdio-common/../sysdeps/gnu/errlist.c:447
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:179
-msgid "Operation already in progress"
-msgstr "La operación ya se está llevando a cabo"
+#: nis/nis_error.h:33
+msgid "Non NIS+ namespace encountered"
+msgstr "Se ha encontrado un nombre de espacio que no es NIS+"
-#. TRANS A file that isn't a socket was specified when a socket is required.
-#: stdio-common/../sysdeps/gnu/errlist.c:456
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:125
-msgid "Socket operation on non-socket"
-msgstr "Operación de `socket' en un `no-socket'"
+#: nis/nis_error.h:34
+msgid "Illegal object type for operation"
+msgstr "Objeto ilegal para la operación"
-#. TRANS The size of a message sent on a socket was larger than the supported
-#. TRANS maximum size.
-#: stdio-common/../sysdeps/gnu/errlist.c:466
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:127
-msgid "Message too long"
-msgstr "Mensaje demasiado largo"
+# ¿pasado? sv
+#: nis/nis_error.h:35
+msgid "Passed object is not the same object on server"
+msgstr "El objeto pasado no es el mismo objeto que hay en el servidor"
-#. TRANS The socket type does not support the requested communications protocol.
-#: stdio-common/../sysdeps/gnu/errlist.c:475
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:128
-msgid "Protocol wrong type for socket"
-msgstr "Tipo de protocolo incorrecto para el `socket'"
+#: nis/nis_error.h:36
+msgid "Modify operation failed"
+msgstr "La operación de modificación ha fallado"
-#. TRANS You specified a socket option that doesn't make sense for the
-#. TRANS particular protocol being used by the socket. @xref{Socket Options}.
-#: stdio-common/../sysdeps/gnu/errlist.c:485
-msgid "Protocol not available"
-msgstr "Protocolo no disponible"
+#: nis/nis_error.h:37
+msgid "Query illegal for named table"
+msgstr "Consulta ilegal para la tabla nombrada"
-#. TRANS The socket domain does not support the requested communications protocol
-#. TRANS (perhaps because the requested protocol is completely invalid).
-#. TRANS @xref{Creating a Socket}.
-#: stdio-common/../sysdeps/gnu/errlist.c:496
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:150
-msgid "Protocol not supported"
-msgstr "Protocolo no soportado"
+#: nis/nis_error.h:38
+msgid "Attempt to remove a non-empty table"
+msgstr "Se intentó eliminar una tabla no vacía"
-#. TRANS The socket type is not supported.
-#: stdio-common/../sysdeps/gnu/errlist.c:505
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:151
-msgid "Socket type not supported"
-msgstr "Tipo de `socket' no soportado"
+#: nis/nis_error.h:39
+msgid "Error in accessing NIS+ cold start file. Is NIS+ installed?"
+msgstr "Error al acceder al fichero de comienzo frio de NIS+. ¿Está NIS+ instalado?"
-#. TRANS The operation you requested is not supported. Some socket functions
-#. TRANS don't make sense for all types of sockets, and others may not be
-#. TRANS implemented for all communications protocols. In the GNU system, this
-#. TRANS error can happen for many calls when the object does not support the
-#. TRANS particular operation; it is a generic indication that the server knows
-#. TRANS nothing to do for that call.
-#: stdio-common/../sysdeps/gnu/errlist.c:519
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:78
-msgid "Operation not supported"
-msgstr "La operación no está soportada"
+#: nis/nis_error.h:40
+msgid "Full resync required for directory"
+msgstr "Se necesita una resincronización completa del directorio"
-#. TRANS The socket communications protocol family you requested is not supported.
-#: stdio-common/../sysdeps/gnu/errlist.c:528
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:153
-msgid "Protocol family not supported"
-msgstr "Familia de protocolos no soportada"
+#: nis/nis_error.h:41
+msgid "NIS+ operation failed"
+msgstr "Falló la operación de NIS+"
-#. TRANS The address family specified for a socket is not supported; it is
-#. TRANS inconsistent with the protocol being used on the socket. @xref{Sockets}.
-#: stdio-common/../sysdeps/gnu/errlist.c:538
-msgid "Address family not supported by protocol"
-msgstr "Esta familia de direcciones no está soportada por el protocolo"
+#: nis/nis_error.h:42
+msgid "NIS+ service is unavailable or not installed"
+msgstr "El servicio NIS+ no está disponible o no está instalado"
-#. TRANS The requested socket address is already in use. @xref{Socket Addresses}.
-#: stdio-common/../sysdeps/gnu/errlist.c:547
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:155
-msgid "Address already in use"
-msgstr "La dirección ya se está usando"
+# ¿¿Qué demonios es esto?? sv
+#: nis/nis_error.h:43
+msgid "Yes, 42 is the meaning of life"
+msgstr "Sí, 42 es el significado de la vida"
-#. TRANS The requested socket address is not available; for example, you tried
-#. TRANS to give a socket a name that doesn't match the local host name.
-#. TRANS @xref{Socket Addresses}.
-#: stdio-common/../sysdeps/gnu/errlist.c:558
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:156
-msgid "Cannot assign requested address"
-msgstr "No se puede asignar la dirección solicitada"
+#: nis/nis_error.h:44
+msgid "Unable to authenticate NIS+ server"
+msgstr "No se puede autentificar el servidor NIS+"
-#. TRANS A socket operation failed because the network was down.
-#: stdio-common/../sysdeps/gnu/errlist.c:567
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:157
-msgid "Network is down"
-msgstr "La red no está activa"
+#: nis/nis_error.h:45
+msgid "Unable to authenticate NIS+ client"
+msgstr "No se puede autentificar el cliente NIS+"
-# Este no me gusta. Preferiría poner "la red es inaccesible", o al menos
-# añadirle un "es": "Es imposible conectar con la red". sv
-# En muchos mensajes he puesto el 'Es' al principio, terminaremos hablando
-# como indios si no. em
-#
-# Mira un mensaje que he puesto más arriba a ver si estás de acuerdo con
-# mi definición de "indio". sv
-#
-# Después de que me haya salido este mensaje varias veces, lo cambio.
-# Antes decía "Es imposible conectar con la red", demasiado largo. sv
-#. TRANS A socket operation failed because the subnet containing the remote host
-#. TRANS was unreachable.
-#: stdio-common/../sysdeps/gnu/errlist.c:577
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:158
-msgid "Network is unreachable"
-msgstr "La red es inaccesible"
+#: nis/nis_error.h:46
+msgid "No file space on server"
+msgstr "No queda espacio de ficheros en el servidor"
-#. TRANS A network connection was reset because the remote host crashed.
-#: stdio-common/../sysdeps/gnu/errlist.c:586
-msgid "Network dropped connection on reset"
-msgstr "La conexión de red se perdió al reinicializar"
+#: nis/nis_error.h:47
+msgid "Unable to create process on server"
+msgstr "No se puede crear el proceso en el servidor"
-#. TRANS A network connection was aborted locally.
-#: stdio-common/../sysdeps/gnu/errlist.c:595
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:160
-msgid "Software caused connection abort"
-msgstr "El programa provocó el fin de la conexión"
+#: nis/nis_error.h:48
+msgid "Master server busy, full dump rescheduled."
+msgstr "El servidor maestro está ocupado, el volcado completo se postpone."
-# Se aceptan sugerencias alternativas para "peer"
-# ¿Qué tal "remote machine"? ;-)
-# Prefiero la traducción. -jtobey
-# La verdad es que no se me ocurre nada mejor, así que se queda así. sv
-#. TRANS A network connection was closed for reasons outside the control of the
-#. TRANS local host, such as by the remote machine rebooting or an unrecoverable
-#. TRANS protocol violation.
-#: stdio-common/../sysdeps/gnu/errlist.c:606
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:161
-msgid "Connection reset by peer"
-msgstr "Conexión reinicializada por la máquina remota"
+#: nis/nis_local_names.c:122
+#, c-format
+msgid "LOCAL entry for UID %d in directory %s not unique\n"
+msgstr "La entrada LOCAL para el UID %d en el directorio %s no es única\n"
-# Memoria intermedia me parece una traducción óptima.
-# Desgraciadamente no tengo ningún diccionario de Castellano
-# Enrique, creo que en español existe "búfer", míralo si puedes. sv
-# ¿Buffer? memoria intermedia.
-# A ver qué dice Iñaky... sv
-#. TRANS The kernel's buffers for I/O operations are all in use. In GNU, this
-#. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the
-#. TRANS other from network operations.
-#: stdio-common/../sysdeps/gnu/errlist.c:617
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:162
-msgid "No buffer space available"
-msgstr "No queda espacio para memoria intermedia"
+#: nis/nis_print.c:51
+msgid "UNKNOWN"
+msgstr "DESCONOCIDO"
-#. TRANS You tried to connect a socket that is already connected.
-#. TRANS @xref{Connecting}.
-#: stdio-common/../sysdeps/gnu/errlist.c:627
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:163
-msgid "Transport endpoint is already connected"
-msgstr "El otro extremo ya está conectado"
+#: nis/nis_print.c:109
+msgid "BOGUS OBJECT\n"
+msgstr "OBJETO INVÃLIDO\n"
-#. TRANS The socket is not connected to anything. You get this error when you
-#. TRANS try to transmit data over a socket, without first specifying a
-#. TRANS destination for the data. For a connectionless socket (for datagram
-#. TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead.
-#: stdio-common/../sysdeps/gnu/errlist.c:639
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:164
-msgid "Transport endpoint is not connected"
-msgstr "El otro extremo de la conexión no está conectado"
+#: nis/nis_print.c:112
+msgid "NO OBJECT\n"
+msgstr "NO HAY NINGÚN OBJETO\n"
-#. TRANS No default destination address was set for the socket. You get this
-#. TRANS error when you try to transmit data over a connectionless socket,
-#. TRANS without first specifying a destination for the data with @code{connect}.
-#: stdio-common/../sysdeps/gnu/errlist.c:650
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:126
-msgid "Destination address required"
-msgstr "Se debe especificar la dirección de destino"
+#: nis/nis_print.c:115
+msgid "DIRECTORY\n"
+msgstr "DIRECTORIO\n"
-#. TRANS The socket has already been shut down.
-#: stdio-common/../sysdeps/gnu/errlist.c:659
-msgid "Cannot send after transport endpoint shutdown"
-msgstr "No se puede enviar tras la destrucción del punto de destino"
+#: nis/nis_print.c:118
+msgid "GROUP\n"
+msgstr "GRUPO\n"
-# FUZZY
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:668
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:174
-msgid "Too many references: cannot splice"
-msgstr "Demasiadas referencias: no se pueden solapar"
+#: nis/nis_print.c:121
+msgid "TABLE\n"
+msgstr "TABLA\n"
-#. TRANS A socket operation with a specified timeout received no response during
-#. TRANS the timeout period.
-#: stdio-common/../sysdeps/gnu/errlist.c:678
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:175
-msgid "Connection timed out"
-msgstr "Expiró el tiempo de conexión"
+#: nis/nis_print.c:124
+msgid "ENTRY\n"
+msgstr "ENTRADA\n"
-#. TRANS A remote host refused to allow the network connection (typically because
-#. TRANS it is not running the requested service).
-#: stdio-common/../sysdeps/gnu/errlist.c:688
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:176
-msgid "Connection refused"
-msgstr "Conexión rehusada"
+#: nis/nis_print.c:127
+msgid "LINK\n"
+msgstr "ENLACE\n"
-#. TRANS Too many levels of symbolic links were encountered in looking up a file name.
-#. TRANS This often indicates a cycle of symbolic links.
-#: stdio-common/../sysdeps/gnu/errlist.c:698
-msgid "Too many levels of symbolic links"
-msgstr "Demasiados niveles de enlaces simbólicos"
+#: nis/nis_print.c:130
+msgid "PRIVATE\n"
+msgstr "PRIVADO\n"
-#. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for
-#. TRANS Files}) or host name too long (in @code{gethostname} or
-#. TRANS @code{sethostname}; @pxref{Host Identification}).
-#: stdio-common/../sysdeps/gnu/errlist.c:709
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:108
-msgid "File name too long"
-msgstr "Nombre de fichero demasiado largo"
+#: nis/nis_print.c:133
+msgid "(Unknown object)\n"
+msgstr "(Objeto desconocido)\n"
-# La palabra "host" es delicada.
-# En spanglish algunos la traducen por "anfitrión".
-#
-# Enrique considera equívoca la propia palabra host.
-# [ A un huésped también se le llama "host" ].
-#
-# En este fichero .po he decidido ser cauto y de momento la dejaré sin
-# traducir. De acuerdo con nuestra costumbre, cuando una palabra no nos
-# atrevemos a traducirla la encerramos entre apóstrofos: `host'
-#
-#. TRANS The remote host for a requested network connection is down.
-#: stdio-common/../sysdeps/gnu/errlist.c:718
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:177
-msgid "Host is down"
-msgstr "El `host' no está operativo"
+#: nis/nis_print.c:167
+#, c-format
+msgid "Name : `%s'\n"
+msgstr "Nombre : `%s'\n"
-#. TRANS The remote host for a requested network connection is not reachable.
-#: stdio-common/../sysdeps/gnu/errlist.c:727
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:178
-msgid "No route to host"
-msgstr "No existe ninguna ruta hasta el `host'"
+#: nis/nis_print.c:168
+#, c-format
+msgid "Type : %s\n"
+msgstr "Tipo : %s\n"
-#. TRANS Directory not empty, where an empty directory was expected. Typically,
-#. TRANS this error occurs when you are trying to delete a directory.
-#: stdio-common/../sysdeps/gnu/errlist.c:737
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:123
-msgid "Directory not empty"
-msgstr "El directorio no está vacío"
+#: nis/nis_print.c:173
+msgid "Master Server :\n"
+msgstr "Servidor Maestro :\n"
-#. TRANS This means that the per-user limit on new process would be exceeded by
-#. TRANS an attempted @code{fork}. @xref{Limits on Resources}, for details on
-#. TRANS the @code{RLIMIT_NPROC} limit.
-#: stdio-common/../sysdeps/gnu/errlist.c:748
-msgid "Too many processes"
-msgstr "Demasiados procesos"
+# ¿Replicate?
+#: nis/nis_print.c:175
+msgid "Replicate :\n"
+msgstr "Replicado :\n"
-#. TRANS The file quota system is confused because there are too many users.
-#. TRANS @c This can probably happen in a GNU system when using NFS.
-#: stdio-common/../sysdeps/gnu/errlist.c:758
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:124
-msgid "Too many users"
-msgstr "Demasiados usuarios"
+#: nis/nis_print.c:176
+#, c-format
+msgid "\tName : %s\n"
+msgstr "\tNombre : %s\n"
-#. TRANS The user's disk quota was exceeded.
-#: stdio-common/../sysdeps/gnu/errlist.c:767
-msgid "Disk quota exceeded"
-msgstr "Se ha excedido la cuota de disco"
+#: nis/nis_print.c:177
+msgid "\tPublic Key : "
+msgstr "\tClave Pública : "
-# ?? sugerencias ?
-# Habrá que traducir el "handle" de alguna forma... sv
-# No veo porqué. em
-# ¿No puede un fichero tener varios `handles'
-# y que unos estén bloqueados y otros no? sv
-# En efecto la traducción es incorrecta, el uso de file handle
-# en vez de file descriptor, debe ser porque nos referimos a ficheros
-# compartidos con NFS. Al igual que no se bloquean, sino que se stalan :)
-#
-# Suggestion: stale->vencido. No me gusta "bloqueado" porque el
-# remedio necesita una acción, y "bloqueado" sugiere esperar.
-# No me gusta "fichero" simplemente, pues el fichero estará perfectamente
-# bien; lo que se venció es el "handle" o sea el número o nombre que
-# nos da acceso al fichero. Habrá que traducir el "handle", como dijo sv.
-# -jtobey
-#
-# Muy bien, he buscado "stale" y por lo que parece es algo que "caduca"
-# o que "vence", como las letras comerciales. Me he decidido por "en desuso".
-#
-#. TRANS Stale NFS file handle. This indicates an internal confusion in the NFS
-#. TRANS system which is due to file system rearrangements on the server host.
-#. TRANS Repairing this condition usually requires unmounting and remounting
-#. TRANS the NFS file system on the local host.
-#: stdio-common/../sysdeps/gnu/errlist.c:779
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:181
-msgid "Stale NFS file handle"
-msgstr "`handle' de fichero NFS en desuso"
+#: nis/nis_print.c:181
+msgid "None.\n"
+msgstr "Ninguno.\n"
-#. TRANS An attempt was made to NFS-mount a remote file system with a file name that
-#. TRANS already specifies an NFS-mounted file.
-#. TRANS (This is an error on some operating systems, but we expect it to work
-#. TRANS properly on the GNU system, making this error code impossible.)
-#: stdio-common/../sysdeps/gnu/errlist.c:791
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:96
-msgid "Object is remote"
-msgstr "El objeto es remoto"
+#: nis/nis_print.c:184
+#, c-format
+msgid "Diffie-Hellmann (%d bits)\n"
+msgstr "Diffie-Hellmann (%d bits)\n"
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:800
-msgid "RPC struct is bad"
-msgstr "la estructura RPC es incorrecta"
+#: nis/nis_print.c:189
+#, c-format
+msgid "RSA (%d bits)\n"
+msgstr "RSA (%d bits)\n"
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:809
-msgid "RPC version wrong"
-msgstr "versión de RPC incorrecta"
+# Véase "Investigación y Ciencia" sv
+#: nis/nis_print.c:192
+msgid "Kerberos.\n"
+msgstr "Cerbero.\n"
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:818
-msgid "RPC program not available"
-msgstr "Programa RPC no disponible"
+#: nis/nis_print.c:195
+#, c-format
+msgid "Unknown (type = %d, bits = %d)\n"
+msgstr "Desconocido (tipo = %d, bits = %d)\n"
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:827
-msgid "RPC program version wrong"
-msgstr "Versión del programa RPC incorrecta"
+#: nis/nis_print.c:206
+#, c-format
+msgid "\tUniversal addresses (%u)\n"
+msgstr "\tDirección universal (%u)\n"
-# ## qué horror
-# ## Pues mira, quizá añadiendo dos puntos después del RPC mejoraría algo:
-# ## "RPC: procedimiento erróneo..." sv
-# FIXME -> Comunicarlo al autor.
-# En inglés podría quedar también mejor.
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:836
-msgid "RPC bad procedure for program"
-msgstr "RPC: procedimiento erróneo para el programa"
+#: nis/nis_print.c:228
+msgid "Time to live : "
+msgstr "Tiempo de vida : "
-# Ojo: ¿Solamente los ficheros se pueden bloquear?
-# Propondría: "No quedan bloqueos disponibles" o algo así. sv
-#
-# Efectivamente puede que tengas razón, pero ...
-# los dispositivos en UNIX son siempre ficheros /dev :) em
-#
-# Lo sé, lo sé, pero: Cuando bloqueas /dev/cua3, ¿dices que estás bloqueando un
-# fichero o que estás bloqueando el módem, que es un dispositivo? sv
-# Decir ficheros podría traer equívocos, por más que formalmente todos
-# lo sean. sv
-#
-# ¿Y qué se te ocurre?, ¿poner bloquear ficheros/dispositivos? em
-#
-# ( Pues mira, no estaría mal. sv )
-#
-# no quedan bloqueos me parece que no colabora a entender nada. em
-# Miro la versión alemana.
-# ??? ¿locks? ¿cómo diablos?
-#. TRANS No locks available. This is used by the file locking facilities; see
-#. TRANS @ref{File Locks}. This error is never generated by the GNU system, but
-#. TRANS it can result from an operation to an NFS server running another
-#. TRANS operating system.
-#: stdio-common/../sysdeps/gnu/errlist.c:848
-msgid "No locks available"
-msgstr "No se pueden bloquear más ficheros"
+#: nis/nis_print.c:230
+msgid "Default Access rights :\n"
+msgstr "Derechos de acceso predeterminados :\n"
-#. TRANS Inappropriate file type or format. The file was the wrong type for the
-#. TRANS operation, or a data file had the wrong format.
-#. TRANS
-#. TRANS On some systems @code{chmod} returns this error if you try to set the
-#. TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}.
-#: stdio-common/../sysdeps/gnu/errlist.c:861
-msgid "Inappropriate file type or format"
-msgstr "Formato o tipo de fichero no apropiado"
+#: nis/nis_print.c:239
+#, c-format
+msgid "\tType : %s\n"
+msgstr "\tTipo : %s\n"
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:870
-msgid "Authentication error"
-msgstr "Error de autentificación"
+#: nis/nis_print.c:240
+msgid "\tAccess rights: "
+msgstr "\tDerechos de acceso: "
-#. TRANS ???
-#: stdio-common/../sysdeps/gnu/errlist.c:879
-msgid "Need authenticator"
-msgstr "Se necesita un autentificador"
+#: nis/nis_print.c:254
+msgid "Group Flags :"
+msgstr "Opciones de Grupo :"
-#. TRANS Function not implemented. This indicates that the function called is
-#. TRANS not implemented at all, either in the C library itself or in the
-#. TRANS operating system. When you get this error, you can be sure that this
-#. TRANS particular function will always fail with @code{ENOSYS} unless you
-#. TRANS install a new version of the C library or the operating system.
-#: stdio-common/../sysdeps/gnu/errlist.c:892
-msgid "Function not implemented"
-msgstr "Función no implementada"
+#: nis/nis_print.c:257
+msgid ""
+"\n"
+"Group Members :\n"
+msgstr ""
+"\n"
+"Miembros del Grupo :\n"
-#. TRANS Not supported. A function returns this error when certain parameter
-#. TRANS values are valid, but the functionality they request is not available.
-#. TRANS This can mean that the function does not implement a particular command
-#. TRANS or option value or flag bit at all. For functions that operate on some
-#. TRANS object given in a parameter, such as a file descriptor or a port, it
-#. TRANS might instead mean that only @emph{that specific object} (file
-#. TRANS descriptor, port, etc.) is unable to support the other parameters given;
-#. TRANS different file descriptors might support different ranges of parameter
-#. TRANS values.
-#. TRANS
-#. TRANS If the entire function is not available at all in the implementation,
-#. TRANS it returns @code{ENOSYS} instead.
-#: stdio-common/../sysdeps/gnu/errlist.c:912
-msgid "Not supported"
-msgstr "No soportado"
+#: nis/nis_print.c:269
+#, c-format
+msgid "Table Type : %s\n"
+msgstr "Tipo de Tabla : %s\n"
-#. TRANS While decoding a multibyte character the function came along an invalid
-#. TRANS or an incomplete sequence of bytes or the given wide character is invalid.
-#: stdio-common/../sysdeps/gnu/errlist.c:922
-msgid "Invalid or incomplete multibyte or wide character"
-msgstr "El carácter multibyte o extendido está incompleto o es inválido"
+#: nis/nis_print.c:270
+#, c-format
+msgid "Number of Columns : %d\n"
+msgstr "Número de Columnas : %d\n"
-# Habrá que ver a qué se refiere.
-#
-# Si le pones el "es", ponle el "La" al principio.
-# O no le pongas ninguno de los dos, si no es realmente necesario.
-# Creo que no es malo que una oración no tenga verbo, pero si lo tiene
-# debe ser una oración completa. Me explico:
-# 1 "operación no válida" sería admisible.
-# 2 "operación no es válida" suena completamente a indio (inadmisible).
-# 3 "la operación no es válida" es mucho mejor que 2, pero no siempre
-# es mejor que 1. sv
-#
-# En este caso, creo que sobran el "La" y el "es". Por eso le he quitado
-# el "es". sv
-#. TRANS In the GNU system, servers supporting the @code{term} protocol return
-#. TRANS this error for certain operations when the caller is not in the
-#. TRANS foreground process group of the terminal. Users do not usually see this
-#. TRANS error because functions such as @code{read} and @code{write} translate
-#. TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control},
-#. TRANS for information on process groups and these signals.
-#: stdio-common/../sysdeps/gnu/errlist.c:936
-msgid "Inappropriate operation for background process"
-msgstr "Operación no válida para un proceso en segundo plano"
+#: nis/nis_print.c:271
+#, c-format
+msgid "Character Separator : %c\n"
+msgstr "Separador de Caracteres : %c\n"
-# Requiescant in pace. ¿de verdad lo vas a dejar así? :-) sv
-# Creí que el traductor eras tú. cuídate, oye.
-# Lo siento pero no se me ocurre nada en su lugar. sv
-#
-# Tengo que mirar los fuentes, de esto y de muchas otras cosas
-# todo esta en mi disco duro en mi ordenador roto. em
-#
-# Uds. han usado "terminado" para "killed"... ¿qué les parece
-# "Se terminó el traductor"? -jtobey
-#
-# Muy bien, pero lo pongo en pretérito perfecto. sv
-#
-#. TRANS In the GNU system, opening a file returns this error when the file is
-#. TRANS translated by a program and the translator program dies while starting
-#. TRANS up, before it has connected to the file.
-#: stdio-common/../sysdeps/gnu/errlist.c:947
-msgid "Translator died"
-msgstr "El traductor ha terminado"
+#: nis/nis_print.c:272
+#, c-format
+msgid "Search Path : %s\n"
+msgstr "Ruta de búsqueda : %s\n"
-#. TRANS The experienced user will know what is wrong.
-#. TRANS @c This error code is a joke. Its perror text is part of the joke.
-#. TRANS @c Don't change it.
-#: stdio-common/../sysdeps/gnu/errlist.c:958
-msgid "?"
-msgstr "?"
+#: nis/nis_print.c:273
+msgid "Columns :\n"
+msgstr "Columnas :\n"
-# ?? Ni idea de como traducir esto
-# "Ciertamente expiraste durante este tiempo" em
-# this time es esta *vez* Pero como no acabo de verle el sentido a la frase
-# prefiero que no corramos el riesgo. sv
-# Sin fuentes no se puede hacer. Cogeré la traducción de Ulrich Drepper
-# al alemán, no sé cómo no se me había ocurrido antes. em
-# Muy buena idea. Suerte que tenemos un coordinador que sabe alemán :-) sv
-# El problema es que la 1.10.1 no esta disponible todavía. Le he mandado un
-# mail para que me envíe lo que tenga hecho. em
-# Ok, traducido exactamente igual que lo tiene Jochen. Es ist keine Schuld
-# von mir wenn es gar nicht stimmt.
-#
-# Sugerencia: "Ahora sí que te lo has cargado". sv+
-# (Preguntar a nuestros amigos americanos si se entiende).
-# (Es que me suena que "blew" no es muy fino, por eso romper es
-# demasiado suave).
-#
-#. TRANS You did @strong{what}?
-#: stdio-common/../sysdeps/gnu/errlist.c:967
-msgid "You really blew it this time"
-msgstr "Esta vez sí que lo has roto"
+#: nis/nis_print.c:276
+#, c-format
+msgid "\t[%d]\tName : %s\n"
+msgstr "\t[%d]\tNombre : %s\n"
-# ¿qué diablos es esto?, esperemos a tener las fuentes
-# estupendo, este error parece mostrarse en dos ocasiones
-# - Macro: int EIEIO
-# Go home and have a glass of warm, dairy-fresh milk.
-# Jochen tambien lo traduce así. em
-#
-# Okay. Since you are dying to know, I'll tell you.
-# This is a joke, obviously. There is a children's song which begins,
-# "Old McDonald had a farm, e-i-e-i-o." Every time I see the (real)
-# errno macro EIO, I think about that song. Probably most of my
-# compatriots who program on Unix do, too. One of them must have stayed
-# up a little too late one night and decided to add it to Hurd or Glibc.
-# Whoever did it should be castigated, but it made me laugh.
-# --jtobey@channel1.com
-#
-# "bought the farm" means "died". -jtobey
-#
-# Bueno, pues después de pensarlo mucho, he seguido el ejemplo de la
-# traducción francesa (traducción libre). sv
-#. TRANS Go home and have a glass of warm, dairy-fresh milk.
-#: stdio-common/../sysdeps/gnu/errlist.c:976
-msgid "Computer bought the farm"
-msgstr "Anda, vete a casa y tómate un vasito de leche"
+#: nis/nis_print.c:278
+msgid "\t\tAttributes : "
+msgstr "\t\tAtributos : "
-#. TRANS This error code has no purpose.
-#: stdio-common/../sysdeps/gnu/errlist.c:985
-msgid "Gratuitous error"
-msgstr "Error injustificado"
+#: nis/nis_print.c:280
+msgid "\t\tAccess Rights : "
+msgstr "\t\tDerechos de Acceso : "
-#: stdio-common/../sysdeps/gnu/errlist.c:993
-msgid "Bad message"
-msgstr "Mensaje erróneo"
+#: nis/nis_print.c:290
+msgid "Linked Object Type : "
+msgstr "Tipo de objeto enlazado : "
-#: stdio-common/../sysdeps/gnu/errlist.c:1001
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:66
-msgid "Identifier removed"
-msgstr "El identificador se ha eliminado"
+#: nis/nis_print.c:292
+#, c-format
+msgid "Linked to : %s\n"
+msgstr "Enlazado a : %s\n"
-# FUZZY em+
-# No tengo ni idea de qué es un HOP
-# este error, que ya lo vi en errno no
-# lo encuentro documentado
-# "Hop" es "saltito", por ej. un enlace directo que es parte de la ruta
-# entre dos máquinas. --jtobey
-#: stdio-common/../sysdeps/gnu/errlist.c:1009
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:104
-msgid "Multihop attempted"
-msgstr "Se ha intentado un `multihop'"
+#: nis/nis_print.c:302
+#, c-format
+msgid "\tEntry data of type %s\n"
+msgstr "\tEntrada de tipo %s\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1017
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:91
-msgid "No data available"
-msgstr "No hay datos disponibles"
+#: nis/nis_print.c:305
+#, c-format
+msgid "\t[%u] - [%u bytes] "
+msgstr "\t[%u] - [%u bytes] "
-#: stdio-common/../sysdeps/gnu/errlist.c:1025
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:97
-msgid "Link has been severed"
-msgstr "El enlace se ha cortado"
+#: nis/nis_print.c:308
+msgid "Encrypted data\n"
+msgstr "Datos cifrados\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1033
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:65
-msgid "No message of desired type"
-msgstr "Ningún mensaje del tipo deseado"
+#: nis/nis_print.c:310
+msgid "Binary data\n"
+msgstr "Datos binarios\n"
-# FIXME: Este mensaje debería ser igual al anterior. sv
-#: stdio-common/../sysdeps/gnu/errlist.c:1041
-msgid "Out of streams resources"
-msgstr "Alcanzado el límite de recursos de `streams'"
+#: nis/nis_print.c:326
+#, c-format
+msgid "Object Name : %s\n"
+msgstr "Nombre del Objeto : %s\n"
-# FUZZY
-# Tal vez "de flujo", pero no sé si me atrevo... sv
-#: stdio-common/../sysdeps/gnu/errlist.c:1049
-msgid "Device not a stream"
-msgstr "El dispositivo no es un `stream'"
+#: nis/nis_print.c:327
+#, c-format
+msgid "Directory : %s\n"
+msgstr "Directorio : %s\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1057
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:109
-msgid "Value too large for defined data type"
-msgstr "Valor demasiado grande para el tipo de datos definido"
+#: nis/nis_print.c:328
+#, c-format
+msgid "Owner : %s\n"
+msgstr "Propietario : %s\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1065
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:101
-msgid "Protocol error"
-msgstr "Error de protocolo"
+#: nis/nis_print.c:329
+#, c-format
+msgid "Group : %s\n"
+msgstr "Grupo : %s\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1073
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:92
-msgid "Timer expired"
-msgstr "El temporizador llegó al final"
+#: nis/nis_print.c:330
+msgid "Access Rights : "
+msgstr "Derechos de acceso : "
-#. TRANS Operation canceled; an asynchronous operation was canceled before it
-#. TRANS completed. @xref{Asynchronous I/O}. When you call @code{aio_cancel},
-#. TRANS the normal result is for the operations affected to complete with this
-#. TRANS error; @pxref{Cancel AIO Operations}.
-#: stdio-common/../sysdeps/gnu/errlist.c:1085
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:77
-msgid "Operation canceled"
-msgstr "Operación cancelada"
+#: nis/nis_print.c:332
+#, c-format
+msgid ""
+"\n"
+"Time to Live : "
+msgstr ""
+"\n"
+"Tiempo de Vida : "
-# FUZZY
-#: stdio-common/../sysdeps/gnu/errlist.c:1093
-msgid "Interrupted system call should be restarted"
-msgstr "La llamada al sistema interrumpida debería volverse a iniciar"
+#: nis/nis_print.c:335
+#, c-format
+msgid "Creation Time : %s"
+msgstr "Fecha de creación : %s"
-#: stdio-common/../sysdeps/gnu/errlist.c:1101
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:67
-msgid "Channel number out of range"
-msgstr "Número de canal fuera de rango"
+#: nis/nis_print.c:337
+#, c-format
+msgid "Mod. Time : %s"
+msgstr "Fecha de modificación: %s"
-#: stdio-common/../sysdeps/gnu/errlist.c:1109
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:68
-msgid "Level 2 not synchronized"
-msgstr "Nivel 2 no sincronizado"
+#: nis/nis_print.c:338
+msgid "Object Type : "
+msgstr "Tipo del Objeto : "
-#: stdio-common/../sysdeps/gnu/errlist.c:1117
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:69
-msgid "Level 3 halted"
-msgstr "Nivel 3 detenido"
+#: nis/nis_print.c:358
+#, c-format
+msgid " Data Length = %u\n"
+msgstr " Longitud de los datos = %u\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1125
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:70
-msgid "Level 3 reset"
-msgstr "Nivel 3 restablecido"
+#: nis/nis_print.c:372
+#, c-format
+msgid "Status : %s\n"
+msgstr "Estado : %s\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1133
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:71
-msgid "Link number out of range"
-msgstr "Número de enlace fuera de rango"
+#: nis/nis_print.c:373
+#, c-format
+msgid "Number of objects : %u\n"
+msgstr "Número de objetos : %u\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1141
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:72
-msgid "Protocol driver not attached"
-msgstr "Protocolo no disponible"
+# Tal vez habría que poner núm en vez de #. sv
+#: nis/nis_print.c:377
+#, c-format
+msgid "Object #%d:\n"
+msgstr "Objeto #%d:\n"
-# FIXME: ¿No sería más bien CSI structures?
-#: stdio-common/../sysdeps/gnu/errlist.c:1149
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:73
-msgid "No CSI structure available"
-msgstr "No quedan estructuras CSI disponibles"
+#: nis/nis_print_group_entry.c:117
+#, c-format
+msgid "Group entry for \"%s.%s\" group:\n"
+msgstr "Entrada de grupo para el grupo \"%s.%s\"\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1157
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:74
-msgid "Level 2 halted"
-msgstr "Nivel 2 detenido"
+#: nis/nis_print_group_entry.c:125
+msgid " Explicit members:\n"
+msgstr " Miembros explícitos:\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1165
-msgid "Invalid exchange"
-msgstr "Intercambio inválido"
+#: nis/nis_print_group_entry.c:130
+msgid " No explicit members\n"
+msgstr " No hay ningún miembro explícito\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1173
-msgid "Invalid request descriptor"
-msgstr "El descriptor de fichero solicitado es erróneo"
+#: nis/nis_print_group_entry.c:133
+msgid " Implicit members:\n"
+msgstr " Miembros implícitos:\n"
-# FUZZY em+
-#: stdio-common/../sysdeps/gnu/errlist.c:1181
-msgid "Exchange full"
-msgstr "Intercambio lleno"
+#: nis/nis_print_group_entry.c:138
+msgid " No implicit members\n"
+msgstr " No hay ningún miembro implícito\n"
-# FUZZY
-# anode o catode :), qué diablos ? em+
-#
-# Pongo esto provisionalmente, en electricidad se usan los términos
-# ánodo y cátodo para los polos positivo y negativo, pero no sé
-# si esto será lo mismo.
-# De cualquier forma, mantengo el FUZZY por si sale algo mejor. sv+
-#: stdio-common/../sysdeps/gnu/errlist.c:1189
-msgid "No anode"
-msgstr "No hay ningún ánodo"
+#: nis/nis_print_group_entry.c:141
+msgid " Recursive members:\n"
+msgstr " Miembros recursivos:\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1197
-msgid "Invalid request code"
-msgstr "Código de petición incorrecto"
+#: nis/nis_print_group_entry.c:146
+msgid " No recursive members\n"
+msgstr " No hay ningún miembro recursivo\n"
-# ¿Ranura no válida?, creo que no hay traducción para slot :) em+
-# Antes: `slot' incorrecto
-#: stdio-common/../sysdeps/gnu/errlist.c:1205
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:85
-msgid "Invalid slot"
-msgstr "Ranura inválida"
+#: nis/nis_print_group_entry.c:149
+msgid " Explicit nonmembers:\n"
+msgstr " No-miembros explícitos:\n"
-# FUZZY em+
-#: stdio-common/../sysdeps/gnu/errlist.c:1213
-msgid "File locking deadlock error"
-msgstr "error `deadlock' de bloqueo de ficheros"
+#: nis/nis_print_group_entry.c:154
+msgid " No explicit nonmembers\n"
+msgstr " No hay ningún no-miembro explícito\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1221
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:87
-msgid "Bad font file format"
-msgstr "Formato de fichero fuente incorrecto"
+#: nis/nis_print_group_entry.c:157
+msgid " Implicit nonmembers:\n"
+msgstr " No-miembros implícitos:\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1229
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:94
-msgid "Machine is not on the network"
-msgstr "La máquina no está en red"
+#: nis/nis_print_group_entry.c:162
+msgid " No implicit nonmembers\n"
+msgstr " No hay ningún no-miembro implícito\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1237
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:95
-msgid "Package not installed"
-msgstr "El paquete no está instalado"
+#: nis/nis_print_group_entry.c:165
+msgid " Recursive nonmembers:\n"
+msgstr " No miembros recursivos:\n"
-# FUZZY
-# Lo dejo fuzzy aposta, a ver qué se os ocurre em+
-# Pues mira, advertencia es warning, advertise es anunciar.
-# De momento lo cambio. sv
-#: stdio-common/../sysdeps/gnu/errlist.c:1245
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:98
-msgid "Advertise error"
-msgstr "Error de anuncio"
+#: nis/nis_print_group_entry.c:170
+msgid " No recursive nonmembers\n"
+msgstr " No hay ningún no miembro recursivo\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1253
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:99
-msgid "Srmount error"
-msgstr "Error de `srmount'"
+#: nis/nss_nisplus/nisplus-publickey.c:101
+#: nis/nss_nisplus/nisplus-publickey.c:183
+#, c-format
+msgid "DES entry for netname %s not unique\n"
+msgstr "La entrada DES para el nombre %s no es única\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1261
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:100
-msgid "Communication error on send"
-msgstr "Error de comunicación al enviar"
+#: nis/nss_nisplus/nisplus-publickey.c:220
+#, c-format
+msgid "netname2user: missing group id list in `%s'"
+msgstr "netname2user: falta la lista de ids de grupo en `%s'"
-#: stdio-common/../sysdeps/gnu/errlist.c:1269
-msgid "RFS specific error"
-msgstr "error específico de RFS"
+#: nis/nss_nisplus/nisplus-publickey.c:302
+#: nis/nss_nisplus/nisplus-publickey.c:308
+#: nis/nss_nisplus/nisplus-publickey.c:373
+#: nis/nss_nisplus/nisplus-publickey.c:382
+#, c-format
+msgid "netname2user: (nis+ lookup): %s\n"
+msgstr "netname2user: (búsqueda nis+): %s\n"
-#: stdio-common/../sysdeps/gnu/errlist.c:1277
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:110
-msgid "Name not unique on network"
-msgstr "El nombre no es único en la red"
+#: nis/nss_nisplus/nisplus-publickey.c:321
+#, c-format
+msgid "netname2user: DES entry for %s in directory %s not unique"
+msgstr "netname2user: la entrada DES para %s en el directorio %s no es única"
-#: stdio-common/../sysdeps/gnu/errlist.c:1285
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:111
-msgid "File descriptor in bad state"
-msgstr "Descriptor de fichero en mal estado"
+#: nis/nss_nisplus/nisplus-publickey.c:339
+#, c-format
+msgid "netname2user: principal name `%s' too long"
+msgstr "netname2user: el nombre principal `%s' es demasiado largo"
-#: stdio-common/../sysdeps/gnu/errlist.c:1293
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:112
-msgid "Remote address changed"
-msgstr "La dirección remota ha cambiado"
+#: nis/nss_nisplus/nisplus-publickey.c:395
+#, c-format
+msgid "netname2user: LOCAL entry for %s in directory %s not unique"
+msgstr "netname2user: la entrada LOCAL para %s en el directorio %s no es única"
-#: stdio-common/../sysdeps/gnu/errlist.c:1301
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:113
-msgid "Can not access a needed shared library"
-msgstr "No se puede acceder a una biblioteca compartida necesaria"
+#: nis/nss_nisplus/nisplus-publickey.c:402
+msgid "netname2user: should not have uid 0"
+msgstr "netname2user: no debería tener uid 0"
-#: stdio-common/../sysdeps/gnu/errlist.c:1309
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:114
-msgid "Accessing a corrupted shared library"
-msgstr "Accediendo a una biblioteca compartida que está corrompida"
+#: nis/ypclnt.c:836
+msgid "Request arguments bad"
+msgstr "Los argumentos de la petición son incorrectos"
-#: stdio-common/../sysdeps/gnu/errlist.c:1317
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:115
-msgid ".lib section in a.out corrupted"
-msgstr "la sección .lib en el a.out está corrompida"
+#: nis/ypclnt.c:839
+msgid "RPC failure on NIS operation"
+msgstr "Fallo RPC en una operación NIS"
-# Suggestion: "enlazar demasiadas bibliotecas en el ejecutable"
-# "link in" es verbo transitivo. --jtobey@channel1.com
-# Muy bien, me como lo del ejecutable para no alargar demasiado
-# el mensaje, pues creo que por el contexto el usuario sabrá a qué
-# se refiere. De paso, lo pongo en pasado (se intentaron) porque
-# es un error sobre algo que ya ha ocurrido (el intento fallido). sv
-#: stdio-common/../sysdeps/gnu/errlist.c:1325
-msgid "Attempting to link in too many shared libraries"
-msgstr "Se intentaron enlazar demasiadas bibliotecas compartidas"
+#: nis/ypclnt.c:842
+msgid "Can't bind to server which serves this domain"
+msgstr "Ha fallado la llamada a bind() con el servidor que sirve a este dominio"
-#: stdio-common/../sysdeps/gnu/errlist.c:1333
-msgid "Cannot exec a shared library directly"
-msgstr "No se puede ejecutar una biblioteca compartida directamente"
+#: nis/ypclnt.c:845
+msgid "No such map in server's domain"
+msgstr "No existe esa tabla en el dominio del servidor"
-# FUZZY FUZZY
-# ¡ Esto no hay quien lo traduzca ! em+
-#: stdio-common/../sysdeps/gnu/errlist.c:1341
-msgid "Streams pipe error"
-msgstr "Error de tubería de `streams'"
+#: nis/ypclnt.c:848
+msgid "No such key in map"
+msgstr "No existe esta clave en la tabla"
-# FUZZY
-# O me cojo otras traducciones o ando perdido em+
-#: stdio-common/../sysdeps/gnu/errlist.c:1349
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:165
-msgid "Structure needs cleaning"
-msgstr "La estructura necesita una limpieza"
+#: nis/ypclnt.c:851
+msgid "Internal NIS error"
+msgstr "Error interno de NIS"
-#: stdio-common/../sysdeps/gnu/errlist.c:1357
-msgid "Not a XENIX named type file"
-msgstr "No es un fichero XENIX del tipo `named'"
+#: nis/ypclnt.c:854
+msgid "Local resource allocation failure"
+msgstr "La asignación de recursos locales ha fallado"
-#: stdio-common/../sysdeps/gnu/errlist.c:1365
-msgid "No XENIX semaphores available"
-msgstr "No quedan semáforos XENIX disponibles"
+#: nis/ypclnt.c:857
+msgid "No more records in map database"
+msgstr "No hay más registros en la base de datos"
-# FUZZY em+
-# ¿Será esto un `named pipe'? ¿cómo se traduce?
-#: stdio-common/../sysdeps/gnu/errlist.c:1373
-msgid "Is a named type file"
-msgstr "Es un fichero de tipo `named'"
+#: nis/ypclnt.c:860
+msgid "Can't communicate with portmapper"
+msgstr "No se puede comunicar con el asignador de puertos"
-#: stdio-common/../sysdeps/gnu/errlist.c:1381
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:170
-msgid "Remote I/O error"
-msgstr "Error de E/S en la máquina remota"
+#: nis/ypclnt.c:863
+msgid "Can't communicate with ypbind"
+msgstr "No se puede establecer comunicación con `ypbind'"
-#: stdio-common/../sysdeps/gnu/errlist.c:1389
-msgid "No medium found"
-msgstr "No se ha encontrado el medio"
+#: nis/ypclnt.c:866
+msgid "Can't communicate with ypserv"
+msgstr "No se puede establecer comunicación con `ypserv'"
-#: stdio-common/../sysdeps/gnu/errlist.c:1397
-msgid "Wrong medium type"
-msgstr "Tipo de medio erróneo"
+#: nis/ypclnt.c:869
+msgid "Local domain name not set"
+msgstr "No se ha establecido el nombre del dominio local"
-#: stdio-common/../sysdeps/unix/siglist.c:26
-msgid "Signal 0"
-msgstr "Señal 0"
+#: nis/ypclnt.c:872
+msgid "NIS map database is bad"
+msgstr "La base de datos de la tabla NIS no es correcta"
-# ???, siempre lo he usado como trap, nunca encontramos la palabra
-# y es una señal estándar Unix, así que no creo conveniente traducirla
-#: stdio-common/../sysdeps/unix/siglist.c:32
-msgid "IOT trap"
-msgstr "`trap' de IOT"
+#: nis/ypclnt.c:875
+msgid "NIS client/server version mismatch - can't supply service"
+msgstr ""
+"Discordancia en las versiones de NIS del cliente y el servidor.\n"
+"No se puede suministrar el servicio."
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:30
-msgid "Error 0"
-msgstr "Error 0"
+#: nis/ypclnt.c:881
+msgid "Database is busy"
+msgstr "La base de datos está ocupada"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:31
-#: nis/nis_error.c:40
-msgid "Not owner"
-msgstr "No es el propietario"
+#: nis/ypclnt.c:884
+msgid "Unknown NIS error code"
+msgstr "Error de NIS desconocido"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:35
-msgid "I/O error"
-msgstr "Error de E/S"
+# Suggestion: Como es "internal" deberías poner "interno" para
+# indicar que el bug está en la biblioteca y no necesariamente
+# en el programa. Es lo que más importa dar a entender. Propongo
+# "Error interno en ypbind" -jtobey
+# De acuerdo.
+# [ Antes decía ... la llamada a bind para el servicio de páginas amarillas ]
+# Un poco demasiado explicativo. sv
+#: nis/ypclnt.c:924
+msgid "Internal ypbind error"
+msgstr "Error interno en ypbind"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:37
-msgid "Arg list too long"
-msgstr "La lista de argumentos es demasiado larga"
+# FUZZY
+#: nis/ypclnt.c:927
+msgid "Domain not bound"
+msgstr "No se pudo conectar con el dominio"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:39
-msgid "Bad file number"
-msgstr "Número de fichero erróneo"
+#: nis/ypclnt.c:930
+msgid "System resource allocation failure"
+msgstr "Fallo en la asignación de recursos del sistema"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:42
-msgid "Not enough space"
-msgstr "No hay espacio suficiente"
+#: nis/ypclnt.c:933
+msgid "Unknown ypbind error"
+msgstr "Error desconocido en la llamada a `ypbind()'"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:46
-msgid "Device busy"
-msgstr "Dispositivo ocupado"
+#: nis/ypclnt.c:974
+msgid "yp_update: cannot convert host to netname\n"
+msgstr "yp_update: no se puede convertir el nombre del `host' a nombre de red\n"
-# ??? ver esto.
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:48
-msgid "Cross-device link"
-msgstr "Enlace cruzado entre dispositivos"
+#: nis/ypclnt.c:992
+msgid "yp_update: cannot get server address\n"
+msgstr "yp_update: no se puede encontrar la dirección del servidor\n"
-# Sugerencia: Desbordamiento de fecha. (?) sv+
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:53
-msgid "File table overflow"
-msgstr "Desbordamiento de la tabla de ficheros"
+#: nscd/aicache.c:83 nscd/hstcache.c:492
+#, c-format
+msgid "Haven't found \"%s\" in hosts cache!"
+msgstr "No se ha encontrado \"%s\" en el caché de `hosts'"
-# fuentes
-# Sugerencia: Argumento numérico. sv
-#
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:63
-msgid "Argument out of domain"
-msgstr "Argumento fuera del dominio"
+#: nscd/aicache.c:85 nscd/hstcache.c:494
+#, c-format
+msgid "Reloading \"%s\" in hosts cache!"
+msgstr "Recargando \"%s\" en el caché de hosts"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:64
-msgid "Result too large"
-msgstr "Resultado demasiado grande"
+#: nscd/cache.c:150
+#, c-format
+msgid "add new entry \"%s\" of type %s for %s to cache%s"
+msgstr "añade nueva entrada \"%s\" de tipo %s para %s al caché%s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:75
-msgid "Deadlock situation detected/avoided"
-msgstr "Situación de bloqueo detectada/evitada"
+#: nscd/cache.c:152
+msgid " (first)"
+msgstr " (primero)"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:76
-msgid "No record locks available"
-msgstr "No hay ningún bloqueo de registro disponible"
+#: nscd/cache.c:276 nscd/connections.c:861
+#, c-format
+msgid "cannot stat() file `%s': %s"
+msgstr "no se puede ejecutar stat() sobre el fichero `%s': %s"
-# FIXME: Disc or Disk?
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:79
-msgid "Disc quota exceeded"
-msgstr "Se ha excedido la cuota de disco"
+#: nscd/cache.c:318
+#, c-format
+msgid "pruning %s cache; time %ld"
+msgstr "limpiando %s caché; tiempo %ld"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:80
-msgid "Bad exchange descriptor"
-msgstr "Descriptor de intercambio erróneo"
+#: nscd/cache.c:347
+#, c-format
+msgid "considering %s entry \"%s\", timeout %<PRIu64>"
+msgstr "considerando la entrada %s \"%s\", tiempo límite %<PRIu64>"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:81
-msgid "Bad request descriptor"
-msgstr "Descriptor de petición erróneo"
+#: nscd/connections.c:565
+#, c-format
+msgid "invalid persistent database file \"%s\": %s"
+msgstr "fichero de base de datos persistente inválido \"%s\": %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:82
-msgid "Message tables full"
-msgstr "Tablas de mensajes llenas"
+#: nscd/connections.c:573
+msgid "uninitialized header"
+msgstr "cabecera no inicializada"
-# Pregunta: ¿Qué es eso de un Anode? sv
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:83
-msgid "Anode table overflow"
-msgstr "Desbordamiento de tabla de ánodos"
+#: nscd/connections.c:578
+msgid "header size does not match"
+msgstr "el tamaño de la cabecera no coincide"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:84
-msgid "Bad request code"
-msgstr "Código de petición erróneo"
+#: nscd/connections.c:588
+msgid "file size does not match"
+msgstr "el tamaño del fichero no coincide"
-# FUZZY em+
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:86
-msgid "File locking deadlock"
-msgstr "`deadlock' de bloqueo de ficheros"
+#: nscd/connections.c:605
+msgid "verification failed"
+msgstr "falló la verificación"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:88
-msgid "Error 58"
-msgstr "Error 58"
+#: nscd/connections.c:619
+#, c-format
+msgid "suggested size of table for database %s larger than the persistent database's table"
+msgstr "el tamaño sugerido de tabla para la base de datos %s es más grande que la tabla de la base de datos persistente"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:89
-msgid "Error 59"
-msgstr "Error 59"
+#: nscd/connections.c:630 nscd/connections.c:715
+#, c-format
+msgid "cannot create read-only descriptor for \"%s\"; no mmap"
+msgstr "no se puede crear descriptor de sólo lectura para \"%s\"; no hay mmap"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:90
-msgid "Not a stream device"
-msgstr "No es un dispositivo de flujo"
+#: nscd/connections.c:646
+#, c-format
+msgid "cannot access '%s'"
+msgstr "no se puede acceder a '%s'"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:93
-msgid "Out of stream resources"
-msgstr "Alcanzado el límite de recursos de `streams'"
+#: nscd/connections.c:694
+#, c-format
+msgid "database for %s corrupted or simultaneously used; remove %s manually if necessary and restart"
+msgstr "la base de datos %s está corrupta o se está usando simultáneamente; borre %s manualmente si fuera necesario y reinicie"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:102
-msgid "Error 72"
-msgstr "Error 72"
+#: nscd/connections.c:701
+#, c-format
+msgid "cannot create %s; no persistent database used"
+msgstr "no se puede crear %s; no se ha utilizado una base de datos persistente"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:103
-msgid "Error 73"
-msgstr "Error 73"
+#: nscd/connections.c:704
+#, c-format
+msgid "cannot create %s; no sharing possible"
+msgstr "no se puede crear %s; no es posible la compartición"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:105
-msgid "Error 75"
-msgstr "Error 75"
+#: nscd/connections.c:775
+#, c-format
+msgid "cannot write to database file %s: %s"
+msgstr "no se puede escribir al fichero de datos %s: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:106
-msgid "Error 76"
-msgstr "Error 76"
+#: nscd/connections.c:814
+#, c-format
+msgid "cannot set socket to close on exec: %s; disabling paranoia mode"
+msgstr "no se puede establecer el `socket' para cerrar en ejecutación: %s; se desactiva el modo paranoia"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:107
-msgid "Not a data message"
-msgstr "No es un mensaje de datos"
+#: nscd/connections.c:897
+#, c-format
+msgid "cannot open socket: %s"
+msgstr "no se puede abrir el `socket': %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:116
-msgid "Attempting to link in more shared libraries than system limit"
-msgstr "Se intentaron enlazar más bibliotecas compartidas que el límite del sistema"
+#: nscd/connections.c:917
+#, c-format
+msgid "cannot change socket to nonblocking mode: %s"
+msgstr "no se puede cambiar el `socket' a modo no bloqueante: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:117
-msgid "Can not exec a shared library directly"
-msgstr "No se puede ejecutar una biblioteca compartida directamente"
+#: nscd/connections.c:925
+#, c-format
+msgid "cannot set socket to close on exec: %s"
+msgstr "no se puede establecer el `socket' para que se cierre en ejecución: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:118
-msgid "Illegal byte sequence"
-msgstr "Sucesión de bytes ilegal"
+#: nscd/connections.c:938
+#, c-format
+msgid "cannot enable socket to accept connections: %s"
+msgstr "no se puede activar el `socket' para aceptar conexiones: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:119
-msgid "Operation not applicable"
-msgstr "Operación no aplicable"
+#: nscd/connections.c:1039
+#, c-format
+msgid "provide access to FD %d, for %s"
+msgstr "proporciona acceso al descriptor de fichero %d, para %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:120
-msgid "Number of symbolic links encountered during path name traversal exceeds MAXSYMLINKS"
+#: nscd/connections.c:1051
+#, c-format
+msgid "cannot handle old request version %d; current version is %d"
msgstr ""
-"El número de enlaces simbólicos encontrados al atravesar la ruta es mayor que\n"
-"MAXSYMLINKS"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:121
-msgid "Error 91"
-msgstr "Error 91"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:122
-msgid "Error 92"
-msgstr "Error 92"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:129
-msgid "Option not supported by protocol"
-msgstr "Opción no soportada por el protocolo"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:130
-msgid "Error 100"
-msgstr "Error 100"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:131
-msgid "Error 101"
-msgstr "Error 101"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:132
-msgid "Error 102"
-msgstr "Error 102"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:133
-msgid "Error 103"
-msgstr "Error 103"
-
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:134
-msgid "Error 104"
-msgstr "Error 104"
+"no se pueden manejar peticiones de la versión %d, la versión\n"
+"actual es %d"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:135
-msgid "Error 105"
-msgstr "Error 105"
+#: nscd/connections.c:1073
+#, c-format
+msgid "request from %ld not handled due to missing permission"
+msgstr "la petición de %ld no ha sido atendida por falta de permisos"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:136
-msgid "Error 106"
-msgstr "Error 106"
+#: nscd/connections.c:1078
+#, c-format
+msgid "request from '%s' [%ld] not handled due to missing permission"
+msgstr "la petición de '%s' [%ld] no ha sido atendida por falta de permisos"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:137
-msgid "Error 107"
-msgstr "Error 107"
+#: nscd/connections.c:1083
+msgid "request not handled due to missing permission"
+msgstr "la petición no ha sido atendida por falta de permisos"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:138
-msgid "Error 108"
-msgstr "Error 108"
+#: nscd/connections.c:1121 nscd/connections.c:1174
+#, c-format
+msgid "cannot write result: %s"
+msgstr "no se puede escribir el resultado: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:139
-msgid "Error 109"
-msgstr "Error 109"
+#: nscd/connections.c:1257
+#, c-format
+msgid "error getting caller's id: %s"
+msgstr "error al obtener el id de los llamantes: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:140
-msgid "Error 110"
-msgstr "Error 110"
+#: nscd/connections.c:1316
+#, c-format
+msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode"
+msgstr "no se puede abrir /proc/self/cmdline: %s; se desactiva el modo paranoia"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:141
-msgid "Error 111"
-msgstr "Error 111"
+#: nscd/connections.c:1330
+#, c-format
+msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode"
+msgstr "no se puede leer /proc/self/cmdline: %s; se desactiva el modo paranoia"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:142
-msgid "Error 112"
-msgstr "Error 112"
+#: nscd/connections.c:1370
+#, c-format
+msgid "cannot change to old UID: %s; disabling paranoia mode"
+msgstr "no se puede cambiar al UID antiguo: %s; se desactiva el modo paranoia"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:143
-msgid "Error 113"
-msgstr "Error 113"
+#: nscd/connections.c:1380
+#, c-format
+msgid "cannot change to old GID: %s; disabling paranoia mode"
+msgstr "no se puede cambiar al GID antiguo: %s; se desactiva el modo paranoia"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:144
-msgid "Error 114"
-msgstr "Error 114"
+#: nscd/connections.c:1393
+#, c-format
+msgid "cannot change to old working directory: %s; disabling paranoia mode"
+msgstr "no se puede cambiar al directorio de trabajo antiguo: %s; se desactiva el modo paranoia"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:145
-msgid "Error 115"
-msgstr "Error 115"
+#: nscd/connections.c:1439
+#, c-format
+msgid "re-exec failed: %s; disabling paranoia mode"
+msgstr "falló la re-ejecución: %s; se desactiva el modo paranoia"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:146
-msgid "Error 116"
-msgstr "Error 116"
+#: nscd/connections.c:1448
+#, c-format
+msgid "cannot change current working directory to \"/\": %s"
+msgstr "no se puede cambiar el directorio de trabajo a \"/\": %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:147
-msgid "Error 117"
-msgstr "Error 117"
+#: nscd/connections.c:1641
+#, c-format
+msgid "short read while reading request: %s"
+msgstr "lectura insuficiente mientras se leía la petición: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:148
-msgid "Error 118"
-msgstr "Error 118"
+#: nscd/connections.c:1674
+#, c-format
+msgid "key length in request too long: %d"
+msgstr "la longitud de la clave en la petición es demasiado larga: %d"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:149
-msgid "Error 119"
-msgstr "Error 119"
+#: nscd/connections.c:1687
+#, c-format
+msgid "short read while reading request key: %s"
+msgstr "se acabaron los datos mientras se leía la clave de petición: %s"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:152
-msgid "Operation not supported on transport endpoint"
-msgstr "La operación no está soportada en el otro extremo de la conexión"
+#: nscd/connections.c:1696
+#, c-format
+msgid "handle_request: request received (Version = %d) from PID %ld"
+msgstr "handle_request: petición recibida (Versión = %d) del PID %ld"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:154
-msgid "Address family not supported by protocol family"
-msgstr "Esta familia de direcciones no está soportada por la familia del protocolo"
+#: nscd/connections.c:1701
+#, c-format
+msgid "handle_request: request received (Version = %d)"
+msgstr "handle_request: petición recibida (Versión = %d)"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:159
-msgid "Network dropped connection because of reset"
-msgstr "La conexión de red se perdió debido a su reinicialización"
+#: nscd/connections.c:1901 nscd/connections.c:2099
+#, c-format
+msgid "disabled inotify after read error %d"
+msgstr "se desactiva `inotify' después de un error de lectura %d"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:166
-msgid "Error 136"
-msgstr "Error 136"
+#: nscd/connections.c:2228
+msgid "could not initialize conditional variable"
+msgstr "no se pudo inicializar la variable condicional"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:167
-msgid "Not a name file"
-msgstr "No es un fichero de tipo `name'"
+#: nscd/connections.c:2236
+msgid "could not start clean-up thread; terminating"
+msgstr "no se pudo iniciar el hilo de limpieza; terminando"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:168
-msgid "Not available"
-msgstr "No disponible"
+#: nscd/connections.c:2250
+msgid "could not start any worker thread; terminating"
+msgstr "no se pudo iniciar ningún hilo de trabajo; terminando"
-# FUZZY em+
-# ¿Será esto un `named pipe'? ¿cómo se traduce?
-# FIXME: ¿No será "named"? sv
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:169
-msgid "Is a name file"
-msgstr "Es un fichero de tipo `name'"
+#: nscd/connections.c:2301 nscd/connections.c:2302 nscd/connections.c:2319
+#: nscd/connections.c:2328 nscd/connections.c:2346 nscd/connections.c:2357
+#: nscd/connections.c:2368
+#, c-format
+msgid "Failed to run nscd as user '%s'"
+msgstr "Fallo al ejecutar nscd como usuario `%s'"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:171
-msgid "Reserved for future use"
-msgstr "Reservado para uso futuro"
+#: nscd/connections.c:2320
+#, c-format
+msgid "initial getgrouplist failed"
+msgstr "falló el `getgrouplist' inicial"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:172
-msgid "Error 142"
-msgstr "Error 142"
+#: nscd/connections.c:2329
+#, c-format
+msgid "getgrouplist failed"
+msgstr "falló `getgrouplist'"
-#: stdio-common/../sysdeps/unix/sysv/sysv4/solaris2/sparc/errlist.c:173
-msgid "Cannot send after socket shutdown"
-msgstr "No se puede enviar después de la destrucción del `socket'"
+#: nscd/connections.c:2347
+#, c-format
+msgid "setgroups failed"
+msgstr "falló `setgroups'"
-#: stdio-common/psignal.c:63
+#: nscd/grpcache.c:383 nscd/hstcache.c:439 nscd/initgrcache.c:406
+#: nscd/pwdcache.c:378 nscd/servicescache.c:332
#, c-format
-msgid "%s%sUnknown signal %d\n"
-msgstr "%s%sSeñal desconocida %d\n"
+msgid "short write in %s: %s"
+msgstr "escritura insuficiente en %s: %s"
-#: dlfcn/dlinfo.c:51
-msgid "RTLD_SELF used in code not dynamically loaded"
-msgstr "Se ha usado RTLD_SELF en una parte del código que no se cargó dinámicamente"
+#: nscd/grpcache.c:428 nscd/initgrcache.c:78
+#, c-format
+msgid "Haven't found \"%s\" in group cache!"
+msgstr "No se ha encontrado \"%s\" en el caché de grupos"
-#: dlfcn/dlinfo.c:61
-msgid "unsupported dlinfo request"
-msgstr "Petición dlinfo no admitida"
+#: nscd/grpcache.c:430 nscd/initgrcache.c:80
+#, c-format
+msgid "Reloading \"%s\" in group cache!"
+msgstr "Recargando \"%s\" en el caché de grupos"
-#: malloc/mcheck.c:346
-msgid "memory is consistent, library is buggy\n"
-msgstr "la memoria es consistente, la biblioteca tiene un bicho\n"
+#: nscd/grpcache.c:509
+#, c-format
+msgid "Invalid numeric gid \"%s\"!"
+msgstr "¡gid numérico inválido \"%s\"!"
-#: malloc/mcheck.c:349
-msgid "memory clobbered before allocated block\n"
-msgstr "memoria alterada antes del bloque de memoria asignado\n"
+#: nscd/mem.c:431
+#, c-format
+msgid "freed %zu bytes in %s cache"
+msgstr "se han liberado %zu bytes en la caché %s"
-#: malloc/mcheck.c:352
-msgid "memory clobbered past end of allocated block\n"
-msgstr "memoria alterada pasado el final del bloque de memoria asignado\n"
+#: nscd/mem.c:574
+#, c-format
+msgid "no more memory for database '%s'"
+msgstr "no hay más memoria para la base de datos '%s'"
-#: malloc/mcheck.c:355
-msgid "block freed twice\n"
-msgstr "bloque liberado dos veces\n"
+#: nscd/nscd.c:101
+msgid "Read configuration data from NAME"
+msgstr "Lee datos de configuración de NOMBRE"
-# Revisar lo de bogus. creo que es eso.
-#: malloc/mcheck.c:358
-msgid "bogus mcheck_status, library is buggy\n"
-msgstr "valor de mcheck_status incorrecto, la biblioteca tiene un bicho\n"
+#: nscd/nscd.c:103
+msgid "Do not fork and display messages on the current tty"
+msgstr "No se divide y muestra los mensajes en la terminal actual"
-# Supondremos que se trata de un imperativo. sv
-#: malloc/memusagestat.c:53
-msgid "Name output file"
-msgstr "Nombre el fichero de salida"
+#: nscd/nscd.c:104
+msgid "NUMBER"
+msgstr "NÚMERO"
-#: malloc/memusagestat.c:54
-msgid "Title string used in output graphic"
-msgstr "Se ha utilizado una cadena de título en la gráfica de salida"
+#: nscd/nscd.c:104
+msgid "Start NUMBER threads"
+msgstr "Comienza NÚMERO hilos"
-#: malloc/memusagestat.c:55
-msgid "Generate output linear to time (default is linear to number of function calls)"
-msgstr ""
-"Genera un resultado lineal en el tiempo (por omisión es lineal en el número\n"
-"de llamadas a función)"
+#: nscd/nscd.c:105
+msgid "Shut the server down"
+msgstr "Apagar el servidor"
-#: malloc/memusagestat.c:57
-msgid "Also draw graph for total memory consumption"
-msgstr "Dibuja también una gráfica del total de memoria consumida"
+#: nscd/nscd.c:106
+msgid "Print current configuration statistics"
+msgstr "Muestra estadísticas sobre la configuración actual"
-#: malloc/memusagestat.c:58
-msgid "make output graphic VALUE pixel wide"
-msgstr "hace que la salida gráfica tenga VALOR pixels de ancho"
+#: nscd/nscd.c:107
+msgid "TABLE"
+msgstr "TABLA"
-#: malloc/memusagestat.c:59
-msgid "make output graphic VALUE pixel high"
-msgstr "hace que la salida gráfica tenga VALOR pixels de alto"
+#: nscd/nscd.c:108
+msgid "Invalidate the specified cache"
+msgstr "Invalida la caché especificada"
-#: malloc/memusagestat.c:64
-msgid "Generate graphic from memory profiling data"
-msgstr "Genera un gráfico a partir de los datos de `profiling' de memoria"
+#: nscd/nscd.c:109
+msgid "TABLE,yes"
+msgstr "TABLA,sí"
-#: malloc/memusagestat.c:67
-msgid "DATAFILE [OUTFILE]"
-msgstr "FICHERODEDATOS [FICHERODESALIDA]"
+#: nscd/nscd.c:110
+msgid "Use separate cache for each user"
+msgstr "Utiliza una caché separada para cada usuario"
-#: string/strerror.c:43 posix/../sysdeps/posix/gai_strerror.c:57
-msgid "Unknown error"
-msgstr "Error desconocido"
+#: nscd/nscd.c:115
+msgid "Name Service Cache Daemon."
+msgstr "Daemon de Caché del Servicio de Nombres."
-#: string/strsignal.c:69
+#: nscd/nscd.c:147 nss/getent.c:952 nss/makedb.c:123
#, c-format
-msgid "Real-time signal %d"
-msgstr "Señal de tiempo real %d"
+msgid "wrong number of arguments"
+msgstr "número incorrecto de argumentos"
-#: string/strsignal.c:73
+#: nscd/nscd.c:157
#, c-format
-msgid "Unknown signal %d"
-msgstr "Señal desconocida %d"
+msgid "failure while reading configuration file; this is fatal"
+msgstr "fallo al leer el fichero de configuración; este error es fatal"
-#: timezone/zdump.c:176
+#: nscd/nscd.c:166
#, c-format
-msgid "%s: usage is %s [ --version ] [ -v ] [ -c cutoff ] zonename ...\n"
-msgstr "%s: el modo de empleo es %s [ --version ] [ -v ] [ -c cutoff ] nombrezona ...\n"
+msgid "already running"
+msgstr "ya está funcionando"
-#: timezone/zdump.c:269
-msgid "Error writing to standard output"
-msgstr "Error al escribir en la salida estándar"
+#: nscd/nscd.c:181 nscd/nscd.c:236
+#, c-format
+msgid "cannot fork"
+msgstr "no se puede hacer `fork'"
-#: timezone/zic.c:361
+#: nscd/nscd.c:244
#, c-format
-msgid "%s: Memory exhausted: %s\n"
-msgstr "%s: Memoria agotada: %s\n"
+msgid "cannot change current working directory to \"/\""
+msgstr "no se puede cambiar el directorio de trabajo a \"/\""
-#: timezone/zic.c:386 misc/error.c:129 misc/error.c:157
-msgid "Unknown system error"
-msgstr "Error del sistema desconocido"
+#: nscd/nscd.c:252
+msgid "Could not create log file"
+msgstr "No se pudo crear el fichero de registro"
-#: timezone/zic.c:420
+#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:174
#, c-format
-msgid "\"%s\", line %d: %s"
-msgstr "\"%s\", línea %d: %s"
+msgid "Only root is allowed to use this option!"
+msgstr "Solamente root puede usar esta opción"
-#: timezone/zic.c:423
+#: nscd/nscd.c:345
#, c-format
-msgid " (rule from \"%s\", line %d)"
-msgstr " (regla desde \"%s\", línea %d)"
-
-#: timezone/zic.c:435
-msgid "warning: "
-msgstr "atención: "
+msgid "'%s' is not a known database"
+msgstr "'%s' no es una base de datos conocida"
-# FIXME: Decir al autor que no use tabs. sv
-#: timezone/zic.c:445
+#: nscd/nscd.c:370 nscd/nscd_stat.c:193
#, c-format
-msgid ""
-"%s: usage is %s [ --version ] [ -s ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
-"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
-msgstr ""
-"%s: el modo de empleo es %s [ --version ] [ -s ] [ -v ] [ -l hora_local ] [ -p reglasposix ] \\\n"
-" [ -d directorio ] [ -L segundos_intercalares ] [ -y tipoaño ] [ fichero ... ]\n"
+msgid "write incomplete"
+msgstr "escritura incompleta"
-#: timezone/zic.c:492
+#: nscd/nscd.c:381
#, c-format
-msgid "%s: More than one -d option specified\n"
-msgstr "%s: La opción -d se ha especificado más de una vez\n"
+msgid "cannot read invalidate ACK"
+msgstr "no se puede leer el ACK de invalidación"
-#: timezone/zic.c:502
+#: nscd/nscd.c:387
#, c-format
-msgid "%s: More than one -l option specified\n"
-msgstr "%s: La opción -l se ha especificado más de una vez\n"
+msgid "invalidation failed"
+msgstr "fallo en la invalidación"
-#: timezone/zic.c:512
+#: nscd/nscd.c:397
#, c-format
-msgid "%s: More than one -p option specified\n"
-msgstr "%s: La opción -p se ha especificado más de una vez\n"
+msgid "secure services not implemented anymore"
+msgstr "los servicios seguros ya no están implementados"
-#: timezone/zic.c:522
+#: nscd/nscd_conf.c:57
#, c-format
-msgid "%s: More than one -y option specified\n"
-msgstr "%s: La opción -y se ha especificado más de una vez\n"
+msgid "database %s is not supported"
+msgstr "la base de datos %s no está soportada"
-#: timezone/zic.c:532
+#: nscd/nscd_conf.c:108
#, c-format
-msgid "%s: More than one -L option specified\n"
-msgstr "%s: La opción -L se ha especificado más de una vez\n"
+msgid "Parse error: %s"
+msgstr "Error de análisis: %s"
-#: timezone/zic.c:639
+#: nscd/nscd_conf.c:194
#, c-format
-msgid "%s: Can't unlink %s: %s\n"
-msgstr "%s: No se puede borrar %s: %s\n"
-
-#: timezone/zic.c:646
-msgid "hard link failed, symbolic link used"
-msgstr "el enlace duro falló, se usará un enlace simbólico"
+msgid "Must specify user name for server-user option"
+msgstr "Debe especificar un nombre de usuario para la opción `server-user'"
-#: timezone/zic.c:654
+#: nscd/nscd_conf.c:201
#, c-format
-msgid "%s: Can't link from %s to %s: %s\n"
-msgstr "%s: No se pudo crear un enlace de %s a %s: %s\n"
-
-#: timezone/zic.c:752 timezone/zic.c:754
-msgid "same rule name in multiple files"
-msgstr "mismo nombre de regla en varios ficheros"
-
-#: timezone/zic.c:795
-msgid "unruly zone"
-msgstr "zona sin reglas"
+msgid "Must specify user name for stat-user option"
+msgstr "Debe especificar un nombre de usuario para la opción `stat-user'"
-#: timezone/zic.c:802
+# Ãdem. 1984.
+#: nscd/nscd_conf.c:245
#, c-format
-msgid "%s in ruleless zone"
-msgstr "%s en una zona sin reglas"
-
-#: timezone/zic.c:823
-msgid "standard input"
-msgstr "entrada estándar"
+msgid "invalid value for 'reload-count': %u"
+msgstr "valor inválido para 'reload-count': %u"
-#: timezone/zic.c:828
+#: nscd/nscd_conf.c:260
#, c-format
-msgid "%s: Can't open %s: %s\n"
-msgstr "%s: No se puede abrir %s: %s\n"
-
-#: timezone/zic.c:839
-msgid "line too long"
-msgstr "línea demasiado larga"
-
-#: timezone/zic.c:859
-msgid "input line of unknown type"
-msgstr "línea de entrada de tipo desconocido"
+msgid "Must specify value for restart-interval option"
+msgstr "Debe especificar un valor para la opción `restart-interval'"
-# ¿¿cómo se dirá eso??, pregunto en spanglish
-#
-# diría que la porción "de años bisiestos" sobra. sv
-#
-# Mejor dejarlo bien clarito. Después de haberme enterado de
-# qué diablos era eso ;)
-#
-# En ningún sitio dice que la línea de ajuste sea "de años bisiestos"
-# Si pones algo que no viene en el original puedes acabar cambiando
-# el sentido.
-# O quitas lo de "de años bisiestos" o miras el código fuente
-# a ver si de verdad es un ajuste de años bisiestos o más bien de segundos
-# intercalares. En cualquier caso me parece que queda más largo añadiendo
-# eso. sv
-#
-# Otra cosa: "en un fichero que no es el de" -> "en un fichero que no es de"
-# (sin "el"). Si no, da a entender que sólo puede haber uno,
-# y el original no da a entender eso. sv
-#
-# Varias cosas, según he entendido los ajustes en segundo se llaman
-# indiferentemente 'segundos intercalares' o 'segundos bisiestos'
-# el ajuste en sí es un ajuste de años bisiestos ( no son exactamente
-# un día ) . Por lo tanto Leap ( año bisiesto ) line, son las líneas
-# que caracterizan al leap seconds file, que podríamos llamarlo fichero
-# de ajuste de años bisiestos, fichero intercalar o incluso bisiestifile
-# De todas maneras creo que lo cambio, este mensaje, si alguna vez tengo
-# la mala suerte de que me aparezca, me acoxonaría, tal y como está
-# redactado
-# Segundo, según he visto en la documentación, sólo existe un fichero
-# de leap lines, por eso pongo 'el'... em+
-#
-#: timezone/zic.c:875
+#: nscd/nscd_conf.c:274
#, c-format
-msgid "%s: Leap line in non leap seconds file %s\n"
-msgstr ""
-"%s: Línea de segundos intercalares en un fichero que no es el de\n"
-"ajuste de años bisiestos %s\n"
+msgid "Unknown option: %s %s %s"
+msgstr "Opción desconocida: %s %s %s"
-# Ídem. 1984.
-#: timezone/zic.c:882 timezone/zic.c:1297 timezone/zic.c:1322
+#: nscd/nscd_conf.c:287
#, c-format
-msgid "%s: panic: Invalid l_value %d\n"
-msgstr "%s: grave: valor_l %d inválido\n"
+msgid "cannot get current working directory: %s; disabling paranoia mode"
+msgstr "no se puede obtener el directorio actual: %s; se desactiva el modo paranoia"
-#: timezone/zic.c:890
+#: nscd/nscd_conf.c:307
#, c-format
-msgid "%s: Error reading %s\n"
-msgstr "%s: Error al leer %s\n"
+msgid "maximum file size for %s database too small"
+msgstr "el tamaño máximo de fichero para la base de datos %s es demasiado pequeño"
-#: timezone/zic.c:897
+#: nscd/nscd_stat.c:143
#, c-format
-msgid "%s: Error closing %s: %s\n"
-msgstr "%s: Error al cerrar %s: %s\n"
-
-#: timezone/zic.c:902
-msgid "expected continuation line not found"
-msgstr "la línea de continuación esperada no se encuentra"
-
-#: timezone/zic.c:958
-msgid "wrong number of fields on Rule line"
-msgstr "número incorrecto de argumentos en la línea de regla (Rule)"
-
-#: timezone/zic.c:962
-msgid "nameless rule"
-msgstr "regla sin nombre"
+msgid "cannot write statistics: %s"
+msgstr "no se pueden escribir las estadísticas: %s"
-#: timezone/zic.c:967
-msgid "invalid saved time"
-msgstr "la hora almacenada no es válida"
+#: nscd/nscd_stat.c:158
+msgid "yes"
+msgstr "sí"
-#: timezone/zic.c:986
-msgid "wrong number of fields on Zone line"
-msgstr "número de campos incorrecto en la línea de zona (Zone)"
+#: nscd/nscd_stat.c:159
+msgid "no"
+msgstr "no"
-#: timezone/zic.c:992
+#: nscd/nscd_stat.c:170
#, c-format
-msgid "\"Zone %s\" line and -l option are mutually exclusive"
-msgstr "la línea \"Zone %s\" y la opción -l son mutuamente excluyentes"
+msgid "Only root or %s is allowed to use this option!"
+msgstr "Solamente root o %s puede usar esta opción"
-#: timezone/zic.c:1000
+#: nscd/nscd_stat.c:181
#, c-format
-msgid "\"Zone %s\" line and -p option are mutually exclusive"
-msgstr "la línea \"Zone %s\" y la opción -p son mutuamente excluyentes"
+msgid "nscd not running!\n"
+msgstr "nscd no está en ejecución\n"
-#: timezone/zic.c:1012
+#: nscd/nscd_stat.c:205
#, c-format
-msgid "duplicate zone name %s (file \"%s\", line %d)"
-msgstr "nombre de zona %s duplicado (fichero \"%s\", línea %d)"
-
-#: timezone/zic.c:1028
-msgid "wrong number of fields on Zone continuation line"
-msgstr "número de campos incorrecto en la línea de continuación de zona (Zone)"
-
-#: timezone/zic.c:1068
-msgid "invalid UTC offset"
-msgstr "desplazamiento UTC inválido"
-
-#: timezone/zic.c:1071
-msgid "invalid abbreviation format"
-msgstr "formato de abreviatura incorrecto"
+msgid "cannot read statistics data"
+msgstr "no se pueden leer los datos de estadística"
-# VER
-#: timezone/zic.c:1097
-msgid "Zone continuation line end time is not after end time of previous line"
+#: nscd/nscd_stat.c:208
+#, c-format
+msgid ""
+"nscd configuration:\n"
+"\n"
+"%15d server debug level\n"
msgstr ""
-"La línea de continuación de la zona no está después del tiempo de final\n"
-"de la línea anterior"
-
-# En todas estas, yo pondría "número incorrecto de campos",
-# "número incorrecto de argumentos", etc.
-# creo que quedaría mucho mejor. sv
-# La mitad como tú dices, y la mitad como yo em
-#
-# Eso es que te da igual...
-# O es mejor como digo, o no es mejor.
-# Si es mejor, ponlo en todos los sitios. Y si no, en ninguno.
-# Yo creo que es mucho mejor poner "número incorrecto ..."
-# Si no, queda como "al revés". sv+
-#: timezone/zic.c:1124
-msgid "wrong number of fields on Leap line"
-msgstr "número incorrecto de campos en la línea de bisiesto (Leap)"
-
-#: timezone/zic.c:1133
-msgid "invalid leaping year"
-msgstr "año bisiesto inválido"
-
-#: timezone/zic.c:1148 timezone/zic.c:1252
-msgid "invalid month name"
-msgstr "nombre de mes incorrecto"
-
-#: timezone/zic.c:1161 timezone/zic.c:1374 timezone/zic.c:1388
-msgid "invalid day of month"
-msgstr "día del mes inválido"
+"configuración nscd:\n"
+"\n"
+"%15d nivel de depuración del servidor\n"
-#: timezone/zic.c:1166
-msgid "time before zero"
-msgstr "hora antes de cero"
+#: nscd/nscd_stat.c:232
+#, c-format
+msgid "%3ud %2uh %2um %2lus server runtime\n"
+msgstr "%3ud %2uh %2um %2lus tiempo de funcionamiento del servidor\n"
-#: timezone/zic.c:1170
-msgid "time too small"
-msgstr "tiempo demasiado pequeño"
+#: nscd/nscd_stat.c:235
+#, c-format
+msgid " %2uh %2um %2lus server runtime\n"
+msgstr " %2uh %2um %2lus tiempo de funcionamiento del servidor\n"
-#: timezone/zic.c:1174
-msgid "time too large"
-msgstr "tiempo demasiado grande"
+#: nscd/nscd_stat.c:237
+#, c-format
+msgid " %2um %2lus server runtime\n"
+msgstr " %2um %2lus tiempo de funcionamiento del servidor\n"
-#: timezone/zic.c:1178 timezone/zic.c:1281
-msgid "invalid time of day"
-msgstr "hora del día inválida"
+#: nscd/nscd_stat.c:239
+#, c-format
+msgid " %2lus server runtime\n"
+msgstr " %2lus tiempo de funcionamiento del servidor\n"
-#: timezone/zic.c:1197
-msgid "illegal CORRECTION field on Leap line"
-msgstr "El campo CORRECTION en la línea de año bisiesto es ilegal"
+#: nscd/nscd_stat.c:241
+#, c-format
+msgid ""
+"%15d current number of threads\n"
+"%15d maximum number of threads\n"
+"%15lu number of times clients had to wait\n"
+"%15s paranoia mode enabled\n"
+"%15lu restart internal\n"
+"%15u reload count\n"
+msgstr ""
+"%15d número actual de hilos\n"
+"%15d número máximo de hilos\n"
+"%15lu número de veces que los clientes tuvieron que esperar\n"
+"%15s modo paranoia activado\n"
+"%15lu reinicio interno\n"
+"%15u recarga contadores\n"
-#: timezone/zic.c:1201
-msgid "illegal Rolling/Stationary field on Leap line"
-msgstr "Campo Rolling/Stationary ilegal en la línea de año bisiesto"
+#: nscd/nscd_stat.c:276
+#, c-format
+msgid ""
+"\n"
+"%s cache:\n"
+"\n"
+"%15s cache is enabled\n"
+"%15s cache is persistent\n"
+"%15s cache is shared\n"
+"%15zu suggested size\n"
+"%15zu total data pool size\n"
+"%15zu used data pool size\n"
+"%15lu seconds time to live for positive entries\n"
+"%15lu seconds time to live for negative entries\n"
+"%15<PRIuMAX> cache hits on positive entries\n"
+"%15<PRIuMAX> cache hits on negative entries\n"
+"%15<PRIuMAX> cache misses on positive entries\n"
+"%15<PRIuMAX> cache misses on negative entries\n"
+"%15lu%% cache hit rate\n"
+"%15zu current number of cached values\n"
+"%15zu maximum number of cached values\n"
+"%15zu maximum chain length searched\n"
+"%15<PRIuMAX> number of delays on rdlock\n"
+"%15<PRIuMAX> number of delays on wrlock\n"
+"%15<PRIuMAX> memory allocations failed\n"
+"%15s check /etc/%s for changes\n"
+msgstr ""
+"\n"
+"%s caché:\n"
+"\n"
+"%15s caché activado\n"
+"%15s caché persistente\n"
+"%15s caché compartido\n"
+"%15zu tamaño sugerido\n"
+"%15zu tamaño total del almacén de datos\n"
+"%15zu tamaño usado del almacén de datos\n"
+"%15lu segundos de vida para las entradas positivas\n"
+"%15lu segundos de vida para las entradas negativas\n"
+"%15<PRIuMAX> aciertos de caché en las entradas positivas\n"
+"%15<PRIuMAX> aciertos de caché en las entradas negativas\n"
+"%15<PRIuMAX> fallos de caché en las entradas positivas\n"
+"%15<PRIuMAX> fallos de caché en las entradas negativas\n"
+"%15lu%% tasa de aciertos de caché\n"
+"%15zu número actual de valores en caché\n"
+"%15zu número máximo de valores en caché\n"
+"%15zu longitud maxima de la cadena buscada\n"
+"%15<PRIuMAX> número de retardos en rdlock\n"
+"%15<PRIuMAX> número de retardos en wrlock\n"
+"%15<PRIuMAX> fallos de asignación de memoria\n"
+"%15s compruebe /etc/%s para cambios\n"
-#: timezone/zic.c:1216
-msgid "wrong number of fields on Link line"
-msgstr "número incorrecto de campos en la línea de enlace (Link)"
+#: nscd/pwdcache.c:423
+#, c-format
+msgid "Haven't found \"%s\" in password cache!"
+msgstr "No se ha encontrado \"%s\" en el caché de contraseñas"
-#: timezone/zic.c:1220
-msgid "blank FROM field on Link line"
-msgstr "Campo FROM vacío en la línea `Link'"
+#: nscd/pwdcache.c:425
+#, c-format
+msgid "Reloading \"%s\" in password cache!"
+msgstr "Recargando \"%s\" en el caché de contraseñas"
-#: timezone/zic.c:1224
-msgid "blank TO field on Link line"
-msgstr "Campo TO vacío en la línea `Link'"
+#: nscd/pwdcache.c:506
+#, c-format
+msgid "Invalid numeric uid \"%s\"!"
+msgstr "¡uid numérico inválido \"%s\"!"
-#: timezone/zic.c:1301
-msgid "invalid starting year"
-msgstr "año de comienzo inválido"
+#: nscd/selinux.c:156
+#, c-format
+msgid "Failed opening connection to the audit subsystem: %m"
+msgstr "Fallo al abrir la conexión al subsistema de auditoría: %m"
-#: timezone/zic.c:1305
-msgid "starting year too low to be represented"
-msgstr "el año de comienzo es demasiado bajo para ser representado"
+#: nscd/selinux.c:177
+msgid "Failed to set keep-capabilities"
+msgstr "Fallo al establecer las capacidades que se mantienen"
-#: timezone/zic.c:1307
-msgid "starting year too high to be represented"
-msgstr "el año de comienzo es demasiado alto para ser representado"
+#: nscd/selinux.c:178 nscd/selinux.c:241
+#, c-format
+msgid "prctl(KEEPCAPS) failed"
+msgstr "Falló prctl(KEEPCAPS)"
-#: timezone/zic.c:1326
-msgid "invalid ending year"
-msgstr "año de final inválido"
+#: nscd/selinux.c:192
+msgid "Failed to initialize drop of capabilities"
+msgstr "Fallo al inicializar el abandono de capacidades"
-#: timezone/zic.c:1330
-msgid "ending year too low to be represented"
-msgstr "el año de final es demasiado bajo para ser representado"
+# ## Lo mismo con lstat. sv
+# Antes decía: No se pudo obtener información (lstat) del fichero .rhosts
+#: nscd/selinux.c:193
+#, c-format
+msgid "cap_init failed"
+msgstr "cap_init ha fallado"
-#: timezone/zic.c:1332
-msgid "ending year too high to be represented"
-msgstr "el año de final es demasiado alto para ser representado"
+#: nscd/selinux.c:214 nscd/selinux.c:231
+msgid "Failed to drop capabilities"
+msgstr "Fallo al abandonar capacidades"
-#: timezone/zic.c:1335
-msgid "starting year greater than ending year"
-msgstr "año de comienzo mayor que año de final"
+#: nscd/selinux.c:215 nscd/selinux.c:232
+#, c-format
+msgid "cap_set_proc failed"
+msgstr "cap_set_proc ha fallado"
-#: timezone/zic.c:1342
-msgid "typed single year"
-msgstr "tecleado un único año"
+#: nscd/selinux.c:240
+msgid "Failed to unset keep-capabilities"
+msgstr "Fallo al desactivar las capacidades que se mantienen"
-#: timezone/zic.c:1379
-msgid "invalid weekday name"
-msgstr "nombre del día de la semana incorrecto"
+#: nscd/selinux.c:256
+msgid "Failed to determine if kernel supports SELinux"
+msgstr "Fallo al determinar si el núcleo admite SELinux"
-#: timezone/zic.c:1494
+#: nscd/selinux.c:271
#, c-format
-msgid "%s: Can't remove %s: %s\n"
-msgstr "%s: No se puede eliminar %s: %s\n"
+msgid "Failed to start AVC thread"
+msgstr "Fallo al iniciar hilo AVC"
-#: timezone/zic.c:1504
+#: nscd/selinux.c:293
#, c-format
-msgid "%s: Can't create %s: %s\n"
-msgstr "%s: No se puede crear %s: %s\n"
+msgid "Failed to create AVC lock"
+msgstr "Fallo al crear bloqueo AVC"
-#: timezone/zic.c:1570
+#: nscd/selinux.c:333
#, c-format
-msgid "%s: Error writing %s\n"
-msgstr "%s: Error al escribir %s\n"
-
-# FUZZY
-#: timezone/zic.c:1760
-msgid "can't determine time zone abbreviation to use just after until time"
-msgstr ""
-"No se puede determinar la abreviación de zona horaria que se usará justo\n"
-"después"
+msgid "Failed to start AVC"
+msgstr "Fallo al iniciar AVC"
-#: timezone/zic.c:1803
-msgid "too many transitions?!"
-msgstr "¡¿demasiadas transiciones?!"
+#: nscd/selinux.c:335
+msgid "Access Vector Cache (AVC) started"
+msgstr "Access Vector Cache (AVC) iniciado"
-#: timezone/zic.c:1822
-msgid "internal error - addtype called with bad isdst"
-msgstr "error interno - se llamó a `addtype' con un `isdst' erróneo"
+#: nscd/selinux.c:356
+msgid "Error getting context of socket peer"
+msgstr "Error al obtener el contexto del `socket' remoto"
-#: timezone/zic.c:1826
-msgid "internal error - addtype called with bad ttisstd"
-msgstr "error interno - se llamó a `addtype' con un `ttisstd' erróneo"
+#: nscd/selinux.c:361
+msgid "Error getting context of nscd"
+msgstr "Error al obtener el contexto de nscd"
-#: timezone/zic.c:1830
-msgid "internal error - addtype called with bad ttisgmt"
-msgstr "error interno - se llamó a `addtype' con un `ttisgmt' erróneo"
+#: nscd/selinux.c:367
+msgid "Error getting sid from context"
+msgstr "Error al obtener sid del contexto"
-#: timezone/zic.c:1849
-msgid "too many local time types"
-msgstr "demasiados tipos de hora local"
+#: nscd/selinux.c:374
+msgid "compile-time support for database policy missing"
+msgstr "falta el soporte de tiempo de compilación para la base de datos de políticas"
-#: timezone/zic.c:1877
-msgid "too many leap seconds"
-msgstr "demasiados segundos intercalares"
-
-#: timezone/zic.c:1883
-msgid "repeated leap second moment"
-msgstr "segundo intercalar repetido"
-
-# # Otra opción, resultado incongruente al ejecutar la orden em
-#: timezone/zic.c:1935
-msgid "Wild result from command execution"
-msgstr "Resultado salvaje en la ejecución de la orden"
+#: nscd/selinux.c:407
+#, c-format
+msgid ""
+"\n"
+"SELinux AVC Statistics:\n"
+"\n"
+"%15u entry lookups\n"
+"%15u entry hits\n"
+"%15u entry misses\n"
+"%15u entry discards\n"
+"%15u CAV lookups\n"
+"%15u CAV hits\n"
+"%15u CAV probes\n"
+"%15u CAV misses\n"
+msgstr ""
+"\n"
+"Estadísticas de AVC de SELinux:\n"
+"\n"
+"%15u búsquedas de entradas\n"
+"%15u aciertos de entrada\n"
+"%15u fallos de entrada\n"
+"%15u entradas descartadas\n"
+"%15u búsquedas de CAV\n"
+"%15u aciertos de CAV\n"
+"%15u consultas de CAV\n"
+"%15u fallos de CAV\n"
-# FIXME: `%s'
-#: timezone/zic.c:1936
+#: nscd/servicescache.c:381
#, c-format
-msgid "%s: command was '%s', result was %d\n"
-msgstr "%s: la orden fue `%s', el resultado fue %d\n"
+msgid "Haven't found \"%s\" in services cache!"
+msgstr "No se ha encontrado \"%s\" en el caché de `services'"
-#: timezone/zic.c:2031
-msgid "Odd number of quotation marks"
-msgstr "Número impar de comillas"
+#: nscd/servicescache.c:383
+#, c-format
+msgid "Reloading \"%s\" in services cache!"
+msgstr "Recargando \"%s\" en el caché de services"
-# Sugerencia: Desbordamiento de fecha. (?) sv+
-#: timezone/zic.c:2051 timezone/zic.c:2070
-msgid "time overflow"
-msgstr "desbordamiento horario"
+#: nss/getent.c:54
+msgid "database [key ...]"
+msgstr "basededatos [clave ...]"
-# FIXME: non leap-year -> non-leap year.
-# A lo mejor si pones "veintinueve de febrero" o "29 de febrero"
-# se entiende mejor. no sé. sv
-# Si, estas pensando lo mismo que yo, 29 de febrero puede confundir, porque
-# en el fichero pondrá 2/29 em
-#: timezone/zic.c:2117
-msgid "use of 2/29 in non leap-year"
-msgstr "uso de 2/29 en un año no bisiesto"
+#: nss/getent.c:59
+msgid "Service configuration to be used"
+msgstr "Configuración del servicio"
-# ## Antes tenías: "no hay día en la regla de coincidencia de mes" sv
-# Esto debe tener algo que ver con la función menopausie() em
-# No se me había ocurrido... ¿Se te ocurre algo mejor, ahora que ya
-# sabemos lo que quiere decir? sv
-#: timezone/zic.c:2151
-msgid "no day in month matches rule"
-msgstr "ningún día del mes coincide con la regla"
+#: nss/getent.c:60
+msgid "disable IDN encoding"
+msgstr "desactiva la codificación IDN"
-#: timezone/zic.c:2175
-msgid "too many, or too long, time zone abbreviations"
-msgstr "demasiadas abreviaturas de zona horaria, o demasiado largas"
+#: nss/getent.c:65
+msgid "Get entries from administrative database."
+msgstr "Obtiene entradas de la base de datos administrativa."
-#: timezone/zic.c:2216
+#: nss/getent.c:149 nss/getent.c:479
#, c-format
-msgid "%s: Can't create directory %s: %s\n"
-msgstr "%s: No se puede crear el directorio %s: %s\n"
+msgid "Enumeration not supported on %s\n"
+msgstr "La enumeración no está soportada sobre %s\n"
-#: timezone/zic.c:2238
+#: nss/getent.c:866
#, c-format
-msgid "%s: %d did not sign extend correctly\n"
-msgstr "%s: %d no extendió el signo correctamente\n"
-
-#: posix/../sysdeps/generic/wordexp.c:1797
-msgid "parameter null or not set"
-msgstr "parámetro nulo o no establecido"
+msgid "Unknown database name"
+msgstr "Nombre de base de datos desconocido"
-#: posix/../sysdeps/posix/gai_strerror.c:31
-msgid "Address family for hostname not supported"
-msgstr "Esta familia de direcciones no está soportada para el `host'"
+#: nss/getent.c:896
+msgid "Supported databases:\n"
+msgstr "Bases de datos admitidas:\n"
-#: posix/../sysdeps/posix/gai_strerror.c:32
-msgid "Temporary failure in name resolution"
-msgstr "Fallo temporal en la resolución del nombre"
+#: nss/getent.c:962
+#, c-format
+msgid "Unknown database: %s\n"
+msgstr "Base de datos desconocida: %s\n"
-#: posix/../sysdeps/posix/gai_strerror.c:33
-msgid "Bad value for ai_flags"
-msgstr "Valor erróneo para ai_flags"
+#: nss/makedb.c:60
+msgid "Convert key to lower case"
+msgstr "Convierte la clave a minúsculas"
-#: posix/../sysdeps/posix/gai_strerror.c:34
-msgid "Non-recoverable failure in name resolution"
-msgstr "Fallo irrecuperable en la resolución del nombre"
+#: nss/makedb.c:63
+msgid "Do not print messages while building database"
+msgstr "No muestra ningún mensaje mientras construye la base de datos"
-#: posix/../sysdeps/posix/gai_strerror.c:35
-msgid "ai_family not supported"
-msgstr "No se admite ai_familiy"
+#: nss/makedb.c:65
+msgid "Print content of database file, one entry a line"
+msgstr "Muestra el contenido de un fichero de base de datos, una entrada por línea"
-#: posix/../sysdeps/posix/gai_strerror.c:36
-msgid "Memory allocation failure"
-msgstr "Fallo en la asignación de memoria"
+#: nss/makedb.c:70
+msgid "Create simple DB database from textual input."
+msgstr "Crea una base de datos DB simple a partir de una entrada de texto."
-#: posix/../sysdeps/posix/gai_strerror.c:37
-msgid "No address associated with hostname"
-msgstr "No existe ninguna dirección asociada al nombre"
+#: nss/makedb.c:73
+msgid ""
+"INPUT-FILE OUTPUT-FILE\n"
+"-o OUTPUT-FILE INPUT-FILE\n"
+"-u INPUT-FILE"
+msgstr ""
+"FICHERO-ENTRADA FICHERO-SALIDA\n"
+"-o FICHERO-SALIDA FICHERO-ENTRADA\n"
+"-u FICHERO-ENTRADA"
-#: posix/../sysdeps/posix/gai_strerror.c:38
-msgid "Name or service not known"
-msgstr "Nombre o servicio desconocido"
+#: nss/makedb.c:142
+#, c-format
+msgid "No usable database library found."
+msgstr "No se ha encontrado ninguna biblioteca de base de datos utilizable."
-#: posix/../sysdeps/posix/gai_strerror.c:39
-msgid "Servname not supported for ai_socktype"
-msgstr "No se admite servname para ai_socktype"
+#: nss/makedb.c:149
+#, c-format
+msgid "cannot open database file `%s': %s"
+msgstr "no se puede abrir el fichero de datos `%s': %s"
-#: posix/../sysdeps/posix/gai_strerror.c:40
-msgid "ai_socktype not supported"
-msgstr "No se admite ai_socktype"
+#: nss/makedb.c:151
+msgid "incorrectly formatted file"
+msgstr "fichero formateado incorrectamente"
-#: posix/../sysdeps/posix/gai_strerror.c:41
-msgid "System error"
-msgstr "Error del sistema"
+#: nss/makedb.c:331
+msgid "duplicate key"
+msgstr "clave duplicada"
-# Vale, pero muy poco más abajo has puesto "en curso", que me parece mejor. sv
-# Creo que prefiero dejar uno de cada. Se me ocurre si no cambiar el
-# de abajo también. em
-#: posix/../sysdeps/posix/gai_strerror.c:42
-msgid "Processing request in progress"
-msgstr "Se está procesando la petición"
+#: nss/makedb.c:337
+#, c-format
+msgid "while writing database file"
+msgstr "al escribir la base de datos"
-#: posix/../sysdeps/posix/gai_strerror.c:43
-msgid "Request canceled"
-msgstr "Petición cancelada"
+#: nss/makedb.c:348
+#, c-format
+msgid "problems while reading `%s'"
+msgstr "problemas mientras se leía `%s'"
-#: posix/../sysdeps/posix/gai_strerror.c:44
-msgid "Request not canceled"
-msgstr "Petición no cancelada"
+#: nss/makedb.c:368 nss/makedb.c:385
+#, c-format
+msgid "while reading database"
+msgstr "al leer el fichero de datos"
-#: posix/../sysdeps/posix/gai_strerror.c:45
-msgid "All requests done"
-msgstr "Realizadas todas las peticiones"
+#: posix/getconf.c:1036
+#, c-format
+msgid "Usage: %s [-v specification] variable_name [pathname]\n"
+msgstr "Modo de empleo: %s [-v especificación] nombre_de_variable [ruta]\n"
-#: posix/../sysdeps/posix/gai_strerror.c:46
-msgid "Interrupted by a signal"
-msgstr "Interrumpido por una señal"
+#: posix/getconf.c:1039
+#, c-format
+msgid " %s -a [pathname]\n"
+msgstr " %s -a [ruta]\n"
-#: posix/getconf.c:892
+#: posix/getconf.c:1115
#, c-format
-msgid "Usage: %s [-v specification] variable_name [pathname]\n"
-msgstr "Modo de empleo: %s [-v especificación] nombre_de_variable [ruta]\n"
+msgid ""
+"Usage: getconf [-v SPEC] VAR\n"
+" or: getconf [-v SPEC] PATH_VAR PATH\n"
+"\n"
+"Get the configuration value for variable VAR, or for variable PATH_VAR\n"
+"for path PATH. If SPEC is given, give values for compilation\n"
+"environment SPEC.\n"
+"\n"
+msgstr ""
+"Modo de empleo: getconf [-v ESP] VAR\n"
+" o bien: getconf [-v ESP] RUTA_VAR RUTA\n"
+"\n"
+"Obtiene el valor de configuración para la variable VAR, o para la\n"
+"variable RUTA_VAR para la ruta RUTA. Si se especifica ESP, se dan\n"
+"los valores para el entorno de compilación ESP.\n"
-#: posix/getconf.c:950
+#: posix/getconf.c:1173
#, c-format
msgid "unknown specification \"%s\""
-msgstr "especificación \"%s\" desconocida"
+msgstr "especificación \"%s\" desconocida"
+
+#: posix/getconf.c:1225
+#, c-format
+msgid "Couldn't execute %s"
+msgstr "No se pudo ejecutar %s"
-#: posix/getconf.c:979 posix/getconf.c:995
+#: posix/getconf.c:1269 posix/getconf.c:1285
msgid "undefined"
msgstr "sin definir"
-#: posix/getconf.c:1017
+#: posix/getconf.c:1307
#, c-format
msgid "Unrecognized variable `%s'"
msgstr "Variable no reconocida `%s'"
-#: posix/getopt.c:692 posix/getopt.c:711
+#: posix/getopt.c:594 posix/getopt.c:623
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: la opción `%s' es ambigua\n"
+msgid "%s: option '%s' is ambiguous; possibilities:"
+msgstr "%s: la opción '%s' es ambigua; posibilidades:"
-#: posix/getopt.c:744 posix/getopt.c:748
+#: posix/getopt.c:664 posix/getopt.c:668
#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
-msgstr "%s: la opción `--%s' no admite ningún argumento\n"
+msgstr "%s: la opción '--%s' no admite ningún argumento\n"
-#: posix/getopt.c:757 posix/getopt.c:762
+#: posix/getopt.c:677 posix/getopt.c:682
#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
-msgstr "%s: la opción `%c%s' no admite ningún argumento\n"
+msgstr "%s: la opción '%c%s' no admite ningún argumento\n"
-#: posix/getopt.c:807 posix/getopt.c:829 posix/getopt.c:1159
-#: posix/getopt.c:1181
+#: posix/getopt.c:725 posix/getopt.c:744
#, c-format
-msgid "%s: option '%s' requires an argument\n"
-msgstr "%s: la opción `%s' requiere un argumento\n"
+msgid "%s: option '--%s' requires an argument\n"
+msgstr "%s: la opción '--%s' requiere un argumento\n"
-#: posix/getopt.c:867 posix/getopt.c:870
+#: posix/getopt.c:782 posix/getopt.c:785
#, c-format
msgid "%s: unrecognized option '--%s'\n"
-msgstr "%s: opción no reconocida `--%s'\n"
+msgstr "%s: opción no reconocida '--%s'\n"
-#: posix/getopt.c:878 posix/getopt.c:881
+#: posix/getopt.c:793 posix/getopt.c:796
#, c-format
msgid "%s: unrecognized option '%c%s'\n"
-msgstr "%s: opción no reconocida `%c%s'\n"
+msgstr "%s: opción no reconocida '%c%s'\n"
-#: posix/getopt.c:936 posix/getopt.c:939
-#, c-format
-msgid "%s: illegal option -- '%c'\n"
-msgstr "%s: opción ilegal -- %c\n"
-
-# ¿Qué tiene de malo "inválida"? sv
-# Jopé, ¿y qué tiene de malo no válida?
-# usuario inválido tiene un doble sentido claro
-# ya que uso usuario no válido me parece bien usar
-# tambien opción no válida, aunque solo sea de vez
+# ¿Qué tiene de malo "inválida"? sv
+# Jopé, ¿y qué tiene de malo no válida?
+# usuario inválido tiene un doble sentido claro
+# ya que uso usuario no válido me parece bien usar
+# tambien opción no válida, aunque solo sea de vez
# en cuando em
#
-# Pues que *inválida* existe. Piensa en retroreferencia, por ejemplo.
-# Se puede poner retroreferencia porque significa referencia hacia atrás.
-# (Bueno, en este caso esa palabra se usa poco, pero inválida no). sv+
+# Pues que *inválida* existe. Piensa en retroreferencia, por ejemplo.
+# Se puede poner retroreferencia porque significa referencia hacia atrás.
+# (Bueno, en este caso esa palabra se usa poco, pero inválida no). sv+
#
-# Después de leer "1984", lo cambio.
-# Aquí y en todas partes. sv
+# Después de leer "1984", lo cambio.
+# Aquí y en todas partes. sv
#
-#: posix/getopt.c:945 posix/getopt.c:948
+#: posix/getopt.c:845 posix/getopt.c:848
#, c-format
msgid "%s: invalid option -- '%c'\n"
-msgstr "%s: opción inválida -- %c\n"
+msgstr "%s: opción inválida -- '%c'\n"
-#: posix/getopt.c:1003 posix/getopt.c:1022 posix/getopt.c:1234
-#: posix/getopt.c:1255
+#: posix/getopt.c:898 posix/getopt.c:915 posix/getopt.c:1123
+#: posix/getopt.c:1141
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
-msgstr "%s: la opción requiere un argumento --%c\n"
+msgstr "%s: la opción requiere un argumento -- '%c'\n"
-#: posix/getopt.c:1074 posix/getopt.c:1093
+#: posix/getopt.c:971 posix/getopt.c:987
#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
-msgstr "%s: la opción `-W %s' es ambigua\n"
+msgstr "%s: la opción '-W %s' es ambigua\n"
-#: posix/getopt.c:1117 posix/getopt.c:1138
+#: posix/getopt.c:1011 posix/getopt.c:1029
#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
-msgstr "%s: la opción `-W %s' no admite ningún argumento\n"
+msgstr "%s: la opción '-W %s' no admite ningún argumento\n"
-#: posix/regcomp.c:150
+#: posix/getopt.c:1050 posix/getopt.c:1068
+#, c-format
+msgid "%s: option '-W %s' requires an argument\n"
+msgstr "%s: la opción '-W %s' requiere un argumento\n"
+
+#: posix/regcomp.c:135
msgid "No match"
msgstr "No hay ninguna coincidencia"
-#: posix/regcomp.c:153
+#: posix/regcomp.c:138
msgid "Invalid regular expression"
-msgstr "La expresión regular es errónea"
+msgstr "La expresión regular es errónea"
-#: posix/regcomp.c:156
+#: posix/regcomp.c:141
msgid "Invalid collation character"
-msgstr "Carácter de unión inválido"
+msgstr "Carácter de unión inválido"
-#: posix/regcomp.c:159
+#: posix/regcomp.c:144
msgid "Invalid character class name"
-msgstr "Nombre de clase de carácter inválido"
+msgstr "Nombre de clase de carácter inválido"
-#: posix/regcomp.c:162
+#: posix/regcomp.c:147
msgid "Trailing backslash"
msgstr "Barra invertida extra al final `\\'"
-#: posix/regcomp.c:165
+#: posix/regcomp.c:150
msgid "Invalid back reference"
-msgstr "Referencia hacia atrás inválida"
+msgstr "Referencia hacia atrás inválida"
-#: posix/regcomp.c:168
+#: posix/regcomp.c:153
msgid "Unmatched [ or [^"
-msgstr "[ ó ^[ desemparejados"
+msgstr "[ ó ^[ desemparejados"
-#: posix/regcomp.c:171
+#: posix/regcomp.c:156
msgid "Unmatched ( or \\("
-msgstr "( ó \\( desemparejados"
+msgstr "( ó \\( desemparejados"
-#: posix/regcomp.c:174
+#: posix/regcomp.c:159
msgid "Unmatched \\{"
msgstr "\\{ desemparejado"
-#: posix/regcomp.c:177
+#: posix/regcomp.c:162
msgid "Invalid content of \\{\\}"
-msgstr "Contenido de \\{\\} inválido"
+msgstr "Contenido de \\{\\} inválido"
-#: posix/regcomp.c:180
+#: posix/regcomp.c:165
msgid "Invalid range end"
-msgstr "Final de rango inválido"
+msgstr "Final de rango inválido"
-#: posix/regcomp.c:183
+#: posix/regcomp.c:168
msgid "Memory exhausted"
msgstr "Memoria agotada"
-#: posix/regcomp.c:186
+#: posix/regcomp.c:171
msgid "Invalid preceding regular expression"
-msgstr "La expresión regular precedente es inválida"
+msgstr "La expresión regular precedente es inválida"
-#: posix/regcomp.c:189
+#: posix/regcomp.c:174
msgid "Premature end of regular expression"
-msgstr "Fin no esperado de la expresión regular"
+msgstr "Fin no esperado de la expresión regular"
-#: posix/regcomp.c:192
+#: posix/regcomp.c:177
msgid "Regular expression too big"
-msgstr "La expresión regular es demasiado grande"
+msgstr "La expresión regular es demasiado grande"
-#: posix/regcomp.c:195
+#: posix/regcomp.c:180
msgid "Unmatched ) or \\)"
-msgstr ") ó \\) desemparejados"
+msgstr ") ó \\) desemparejados"
-#: posix/regcomp.c:661
+#: posix/regcomp.c:680
msgid "No previous regular expression"
-msgstr "No existe ninguna expresión regular anterior"
+msgstr "No existe ninguna expresión regular anterior"
-#: argp/argp-help.c:224
-#, c-format
-msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
-msgstr "%.*s: El argumento ARGP_HELP_FMT requiere un valor"
-
-#: argp/argp-help.c:233
-#, c-format
-msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
-msgstr "%.*s: Parámetro ARGP_HELP_FMT desconocido"
-
-#: argp/argp-help.c:245
-#, c-format
-msgid "Garbage in ARGP_HELP_FMT: %s"
-msgstr "Inconsistencias en ARGP_HELP_FMT: %s"
-
-#: argp/argp-help.c:1205
-msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
-msgstr ""
-"Los argumentos obligatorios u opcionales para las opciones largas son\n"
-"también obligatorios u opcionales para las opciones cortas correspondientes."
-
-#: argp/argp-help.c:1592
-msgid "Usage:"
-msgstr "Modo de empleo:"
-
-#: argp/argp-help.c:1596
-msgid " or: "
-msgstr " o: "
-
-#: argp/argp-help.c:1608
-msgid " [OPTION...]"
-msgstr " [OPCIÓN...]"
-
-#: argp/argp-help.c:1635
-#, c-format
-msgid "Try `%s --help' or `%s --usage' for more information.\n"
-msgstr "Pruebe `%s --help' o `%s --usage' para más información.\n"
-
-#: argp/argp-help.c:1663
-#, c-format
-msgid "Report bugs to %s.\n"
-msgstr "Comunicar bichos a %s.\n"
-
-#: argp/argp-parse.c:115
-msgid "Give this help list"
-msgstr "Da esta lista de ayuda"
-
-#: argp/argp-parse.c:116
-msgid "Give a short usage message"
-msgstr "Da un mensaje corto de uso"
-
-#: argp/argp-parse.c:117
-msgid "Set the program name"
-msgstr "Establece el nombre del programa"
-
-#: argp/argp-parse.c:119
-msgid "Hang for SECS seconds (default 3600)"
-msgstr "Cuelga durante SECS segundos (por omisión, 3600)"
-
-#: argp/argp-parse.c:180
-msgid "Print program version"
-msgstr "Muestra la versión del programa"
-
-#: argp/argp-parse.c:196
-msgid "(PROGRAM ERROR) No version known!?"
-msgstr "(ERROR DEL PROGRAMA) ¿¡No se conoce ninguna versión!?"
-
-#: argp/argp-parse.c:672
-#, c-format
-msgid "%s: Too many arguments\n"
-msgstr "%s: Demasiados argumentos\n"
-
-#: argp/argp-parse.c:813
-msgid "(PROGRAM ERROR) Option should have been recognized!?"
-msgstr "(ERROR DEL PROGRAMA) ¿¡No se debería haber reconocido la opción!?"
+#: posix/wordexp.c:1832
+msgid "parameter null or not set"
+msgstr "parámetro nulo o no establecido"
# ??? resolvedor, determinador, investigador, solucionador ?
-# Me suena que quizá exista resolvedor. Habría que enterarse. sv
+# Me suena que quizá exista resolvedor. Habría que enterarse. sv
#: resolv/herror.c:68
msgid "Resolver Error 0 (no error)"
-msgstr "Error del determinador de nombres 0 (ningún error)"
+msgstr "Error del determinador de nombres 0 (ningún error)"
-# En el libro de Infovía traducen host por "anfitrión"
+# En el libro de Infovía traducen host por "anfitrión"
#: resolv/herror.c:69
msgid "Unknown host"
msgstr "`Host' desconocido"
@@ -4154,439 +4788,462 @@ msgstr "Error del servidor desconocido"
#: resolv/herror.c:72
msgid "No address associated with name"
-msgstr "No existe ninguna dirección asociada al nombre"
+msgstr "No existe ninguna dirección asociada al nombre"
# ??? lo mismo que arriba
-#: resolv/herror.c:108
+#: resolv/herror.c:107
msgid "Resolver internal error"
msgstr "Error interno del determinador de nombres"
-#: resolv/herror.c:111
+#: resolv/herror.c:110
msgid "Unknown resolver error"
msgstr "Error del determinador de nombres desconocido"
-#: resolv/res_hconf.c:147
-#, c-format
-msgid "%s: line %d: expected service, found `%s'\n"
-msgstr "%s: línea %d: se esperaba un servicio, se encontró `%s'\n"
-
-#: resolv/res_hconf.c:165
-#, c-format
-msgid "%s: line %d: cannot specify more than %d services"
-msgstr "%s: línea %d: no se pueden especificar más de %d servicios"
-
-#: resolv/res_hconf.c:191
-#, c-format
-msgid "%s: line %d: list delimiter not followed by keyword"
-msgstr "%s: línea %d: el delimitador de lista no está seguido por una palabra clave"
-
-# ¿Qué son dominios trim?
-#: resolv/res_hconf.c:231
+# ¿Qué son dominios trim?
+#: resolv/res_hconf.c:124
#, c-format
msgid "%s: line %d: cannot specify more than %d trim domains"
-msgstr "%s: línea %d: no se pueden especificar más de % dominios"
+msgstr "%s: línea %d: no se pueden especificar más de % dominios"
-#: resolv/res_hconf.c:256
+#: resolv/res_hconf.c:145
#, c-format
msgid "%s: line %d: list delimiter not followed by domain"
-msgstr "%s: línea %d: el delimitador de lista no está seguido por el dominio"
+msgstr "%s: línea %d: el delimitador de lista no está seguido por el dominio"
-#: resolv/res_hconf.c:319
+#: resolv/res_hconf.c:204
#, c-format
msgid "%s: line %d: expected `on' or `off', found `%s'\n"
-msgstr "%s: línea %d: se esperaba `on' o `off', se encontró `%s'\n"
+msgstr "%s: línea %d: se esperaba `on' o `off', se encontró `%s'\n"
-#: resolv/res_hconf.c:366
+#: resolv/res_hconf.c:247
#, c-format
msgid "%s: line %d: bad command `%s'\n"
-msgstr "%s: línea %d: orden errónea `%s'\n"
+msgstr "%s: línea %d: orden errónea `%s'\n"
-#: resolv/res_hconf.c:395
+#: resolv/res_hconf.c:282
#, c-format
msgid "%s: line %d: ignoring trailing garbage `%s'\n"
-msgstr "%s: línea %d: se descarta lo que sigue `%s'\n"
+msgstr "%s: línea %d: se descarta lo que sigue `%s'\n"
-#: nss/getent.c:51
-msgid "database [key ...]"
-msgstr "basededatos [clave ...]"
+#: stdio-common/psiginfo-data.h:2
+msgid "Illegal opcode"
+msgstr "Código de operación ilegal"
-#: nss/getent.c:56
-msgid "Service configuration to be used"
-msgstr "Configuración del servicio"
+#: stdio-common/psiginfo-data.h:3
+msgid "Illegal operand"
+msgstr "Operando ilegal"
-#: nss/getent.c:136 nss/getent.c:375
-#, c-format
-msgid "Enumeration not supported on %s\n"
-msgstr "La enumeración no está soportada sobre %s\n"
+#: stdio-common/psiginfo-data.h:4
+msgid "Illegal addressing mode"
+msgstr "Modo de direccionamiento ilegal"
-#: nss/getent.c:800
-msgid "getent - get entries from administrative database."
-msgstr "getent - obtiene entradas de la base de datos administrativa."
+#: stdio-common/psiginfo-data.h:5
+msgid "Illegal trap"
+msgstr "`trap' ilegal"
-#: nss/getent.c:801
-msgid "Supported databases:"
-msgstr "Bases de datos admitidas:"
+#: stdio-common/psiginfo-data.h:6
+msgid "Privileged opcode"
+msgstr "Código de operación privilegiado"
-#: nss/getent.c:858 nscd/nscd.c:131 nscd/nscd_nischeck.c:64
-msgid "wrong number of arguments"
-msgstr "número incorrecto de argumentos"
+#: stdio-common/psiginfo-data.h:7
+msgid "Privileged register"
+msgstr "Registro privilegiado"
-#: nss/getent.c:868
-#, c-format
-msgid "Unknown database: %s\n"
-msgstr "Base de datos desconocida: %s\n"
+#: stdio-common/psiginfo-data.h:8
+msgid "Coprocessor error"
+msgstr "Error del coprocesador"
+
+#: stdio-common/psiginfo-data.h:9
+msgid "Internal stack error"
+msgstr "Error interno de pila"
+
+#: stdio-common/psiginfo-data.h:12
+msgid "Integer divide by zero"
+msgstr "División entera por cero"
+
+#: stdio-common/psiginfo-data.h:13
+msgid "Integer overflow"
+msgstr "Desbordamiento entero"
+
+#: stdio-common/psiginfo-data.h:14
+msgid "Floating-point divide by zero"
+msgstr "División de coma flotante por cero"
+
+#: stdio-common/psiginfo-data.h:15
+msgid "Floating-point overflow"
+msgstr "Desbordamiento de coma flotante"
+
+#: stdio-common/psiginfo-data.h:16
+msgid "Floating-point underflow"
+msgstr "Subdesbordamiento de coma flotante"
+
+#: stdio-common/psiginfo-data.h:17
+msgid "Floating-poing inexact result"
+msgstr "Resultado inexacto de coma flotante"
+
+#: stdio-common/psiginfo-data.h:18
+msgid "Invalid floating-point operation"
+msgstr "Operación de coma flotante inválida"
+
+#: stdio-common/psiginfo-data.h:19
+msgid "Subscript out of range"
+msgstr "Subíndice fuera de rango"
+
+#: stdio-common/psiginfo-data.h:22
+msgid "Address not mapped to object"
+msgstr "Dirección no asignada al objeto"
+
+#: stdio-common/psiginfo-data.h:23
+msgid "Invalid permissions for mapped object"
+msgstr "Permisos inválidos para el objeto asignado"
+
+#: stdio-common/psiginfo-data.h:26
+msgid "Invalid address alignment"
+msgstr "Alineación de direcciones inválida"
+
+#: stdio-common/psiginfo-data.h:27
+msgid "Nonexisting physical address"
+msgstr "Dirección física inexistente"
+
+#: stdio-common/psiginfo-data.h:28
+msgid "Object-specific hardware error"
+msgstr "Error de hardware específico del objeto"
+
+#: stdio-common/psiginfo-data.h:31
+msgid "Process breakpoint"
+msgstr "Punto de parada/seguimiento del proceso"
+
+#: stdio-common/psiginfo-data.h:32
+msgid "Process trace trap"
+msgstr "Procesa el `trap' de seguimiento"
+
+#: stdio-common/psiginfo-data.h:35
+msgid "Child has exited"
+msgstr "El proceso hijo terminó"
+
+#: stdio-common/psiginfo-data.h:36
+msgid "Child has terminated abnormally and did not create a core file"
+msgstr "El proceso hijo ha terminado anormalmente y no creó un fichero `core'"
-#: debug/pcprofiledump.c:52
-msgid "Don't buffer output"
-msgstr "No hace pasar el resultado a través de un búfer"
+#: stdio-common/psiginfo-data.h:37
+msgid "Child hat terminated abnormally and created a core file"
+msgstr "El proceso hijo ha terminado y ha creado un fichero `core'"
-# Se admiten sugerencias. sv
-#: debug/pcprofiledump.c:57
-msgid "Dump information generated by PC profiling."
-msgstr "Información de volcado generada mediante `PC profiling'."
+#: stdio-common/psiginfo-data.h:38
+msgid "Traced child has trapped"
+msgstr "El proceso hijo seguido ha sido capturado"
-#: debug/pcprofiledump.c:60
-msgid "[FILE]"
-msgstr "[FICHERO]"
+#: stdio-common/psiginfo-data.h:39
+msgid "Child has stopped"
+msgstr "El proceso hijo se ha detenido"
-#: debug/pcprofiledump.c:100
-msgid "cannot open input file"
-msgstr "no se puede abrir el fichero de entrada"
+#: stdio-common/psiginfo-data.h:40
+msgid "Stopped child has continued"
+msgstr "El proceso hijo detenido ha continuado"
-#: debug/pcprofiledump.c:106
-msgid "cannot read header"
-msgstr "no se puede leer la cabecera"
+#: stdio-common/psiginfo-data.h:43
+msgid "Data input available"
+msgstr "Datos de entrada disponibles"
-#: debug/pcprofiledump.c:170
-msgid "invalid pointer size"
-msgstr "tamaño de puntero inválido"
+# Memoria intermedia me parece una traducción óptima.
+# Desgraciadamente no tengo ningún diccionario de Castellano
+# Enrique, creo que en español existe "búfer", míralo si puedes. sv
+# ¿Buffer? memoria intermedia.
+# A ver qué dice Iñaky... sv
+#: stdio-common/psiginfo-data.h:44
+msgid "Output buffers available"
+msgstr "Hay búfers de salida disponibles"
+
+#: stdio-common/psiginfo-data.h:45
+msgid "Input message available"
+msgstr "Mensaje de entrada disponible"
+
+#: stdio-common/psiginfo-data.h:46
+msgid "I/O error"
+msgstr "Error de E/S"
-#: inet/rcmd.c:163 inet/rcmd.c:166
-msgid "rcmd: Cannot allocate memory\n"
-msgstr "rcmd: No se puede asignar memoria\n"
+#: stdio-common/psiginfo-data.h:47
+msgid "High priority input available"
+msgstr "Entrada de alta prioridad disponible"
-#: inet/rcmd.c:185 inet/rcmd.c:188
-msgid "rcmd: socket: All ports in use\n"
-msgstr "rcmd: socket: Se están usando todos los puertos\n"
+#: stdio-common/psiginfo-data.h:48
+msgid "Device disconnected"
+msgstr "Dispositivo desconectado"
-#: inet/rcmd.c:222
-#, c-format
-msgid "connect to address %s: "
-msgstr "conexión a la dirección %s: "
+#: stdio-common/psiginfo.c:145
+msgid "Signal sent by kill()"
+msgstr "Señal enviada por kill()"
-#: inet/rcmd.c:240
-#, c-format
-msgid "Trying %s...\n"
-msgstr "Intentando %s...\n"
+#: stdio-common/psiginfo.c:148
+msgid "Signal sent by sigqueue()"
+msgstr "Señal enviada por sigqueue()"
-#: inet/rcmd.c:289
-#, c-format
-msgid "rcmd: write (setting up stderr): %m\n"
-msgstr "rcmd: write (activando la salida de error estándar): %m\n"
+#: stdio-common/psiginfo.c:151
+msgid "Signal generated by the expiration of a timer"
+msgstr "Señal generada por la expiración de un temporizador"
-#: inet/rcmd.c:310
-#, c-format
-msgid "rcmd: poll (setting up stderr): %m\n"
-msgstr "rcmd: poll (activando la salida de error estándar): %m\n"
+#: stdio-common/psiginfo.c:154
+msgid "Signal generated by the completion of an asynchronous I/O request"
+msgstr "Señal generada por la compleción de una petición de E/S asíncrona"
-# ¿en la configuración del servicio?, ¿del circuito?, ¿o dejarlo así?
-# Es de locos, estuve viendo las/los fuentes, preferí dejarlo así. em
-#: inet/rcmd.c:313
-msgid "poll: protocol failure in circuit setup\n"
-msgstr "poll: fallo de protocolo al configurar el circuito\n"
+#: stdio-common/psiginfo.c:158
+msgid "Signal generated by the arrival of a message on an empty message queue"
+msgstr "Señal generada por la llegada de un mensaje en una cola de mensajes vacía"
-# ??? lo mismo que arriba
-#: inet/rcmd.c:358
-msgid "socket: protocol failure in circuit setup\n"
-msgstr "socket: fallo de protocolo al configurar el circuito\n"
+#: stdio-common/psiginfo.c:163
+msgid "Signal sent by tkill()"
+msgstr "Señal enviada por tkill()"
-#: inet/rcmd.c:387
-#, c-format
-msgid "rcmd: %s: short read"
-msgstr "rcmd: %s: lectura insuficiente"
+#: stdio-common/psiginfo.c:168
+msgid "Signal generated by the completion of an asynchronous name lookup request"
+msgstr "Señal generada por la compleción de una petición de búsqueda de nombres asíncrona"
-# ## Lo mismo con lstat. sv
-# Antes decía: No se pudo obtener información (lstat) del fichero .rhosts
-#: inet/rcmd.c:549
-msgid "lstat failed"
-msgstr "lstat ha fallado"
-
-# Antes decía: .rhosts no es un fichero regular
-#: inet/rcmd.c:551
-msgid "not regular file"
-msgstr "no es un fichero regular"
+#: stdio-common/psiginfo.c:174
+msgid "Signal generated by the completion of an I/O request"
+msgstr "Señal generada por la compleción de una petición de E/S"
-#: inet/rcmd.c:556
-msgid "cannot open"
-msgstr "no se puede abrir"
+#: stdio-common/psiginfo.c:180
+msgid "Signal sent by the kernel"
+msgstr "Señal enviada por el núcleo"
-# ## Sugerencia: Añadir (fstat) después de información. sv
-# Antes decía: No se pudo obtener información (fstat) del fichero .rhosts
-#: inet/rcmd.c:558
-msgid "fstat failed"
-msgstr "fstat ha fallado"
-
-# Antes decía: El propietario del fichero .rhosts no es válido
-#: inet/rcmd.c:560
-msgid "bad owner"
-msgstr "propietario incorrecto"
+#: stdio-common/psiginfo.c:204
+#, c-format
+msgid "Unknown signal %d\n"
+msgstr "Señal desconocida %d\n"
-#: inet/rcmd.c:562
-msgid "writeable by other than owner"
-msgstr "puede ser modificado por otros además del propietario"
+#: stdio-common/psignal.c:51
+#, c-format
+msgid "%s%sUnknown signal %d\n"
+msgstr "%s%sSeñal desconocida %d\n"
-#: inet/rcmd.c:564
-msgid "hard linked somewhere"
-msgstr "hay un enlace duro en alguna parte"
+#: stdio-common/psignal.c:52
+msgid "Unknown signal"
+msgstr "Señal desconocida"
-#: inet/ruserpass.c:170 inet/ruserpass.c:193
-msgid "out of memory"
-msgstr "memoria agotada"
+#: string/_strerror.c:47 sysdeps/mach/_strerror.c:87
+msgid "Unknown error "
+msgstr "Error desconocido "
-# Supongo que se dice legible... sv
-#: inet/ruserpass.c:184
-msgid "Error: .netrc file is readable by others."
-msgstr "Error: el fichero .netrc es legible por otros usuarios."
+#: string/strerror.c:43
+msgid "Unknown error"
+msgstr "Error desconocido"
-#: inet/ruserpass.c:185
-msgid "Remove password or make file unreadable by others."
-msgstr "Elimine la contraseña o haga el fichero no legible por otros."
+#: string/strsignal.c:65
+#, c-format
+msgid "Real-time signal %d"
+msgstr "Señal de tiempo real %d"
-#: inet/ruserpass.c:277
+#: string/strsignal.c:69
#, c-format
-msgid "Unknown .netrc keyword %s"
-msgstr "Palabra clave %s desconocida en .netrc"
+msgid "Unknown signal %d"
+msgstr "Señal desconocida %d"
-#: sunrpc/auth_unix.c:115 sunrpc/auth_unix.c:118
-msgid "authunix_create: out of memory\n"
-msgstr "authunix_create: memoria agotada\n"
+#: sunrpc/auth_unix.c:113 sunrpc/clnt_tcp.c:125 sunrpc/clnt_udp.c:136
+#: sunrpc/clnt_unix.c:126 sunrpc/svc_tcp.c:173 sunrpc/svc_tcp.c:218
+#: sunrpc/svc_udp.c:147 sunrpc/svc_unix.c:174 sunrpc/svc_unix.c:215
+#: sunrpc/xdr.c:632 sunrpc/xdr.c:792 sunrpc/xdr_array.c:100
+#: sunrpc/xdr_rec.c:154 sunrpc/xdr_ref.c:79
+msgid "out of memory\n"
+msgstr "memoria agotada\n"
-# ??? mariscalización ?
-#: sunrpc/auth_unix.c:318
-msgid "auth_none.c - Fatal marshalling problem"
-msgstr "auth_none.c - Problema muy grave con autorización marshall"
+# ??? mariscalización ?
+#: sunrpc/auth_unix.c:351
+msgid "auth_unix.c: Fatal marshalling problem"
+msgstr "auth_unix.c: - Problema muy grave con autorización marshall"
-# FIXME: ¿¿No será major y minor??
-#: sunrpc/clnt_perr.c:118 sunrpc/clnt_perr.c:139
+# FIXME: ¿¿No será major y minor??
+#: sunrpc/clnt_perr.c:98 sunrpc/clnt_perr.c:114
#, c-format
-msgid "; low version = %lu, high version = %lu"
-msgstr "; versión menor = %lu, versión mayor = %lu"
+msgid "%s: %s; low version = %lu, high version = %lu"
+msgstr "%s: %s; versión menor = %lu, versión mayor = %lu"
-#: sunrpc/clnt_perr.c:125
-msgid "; why = "
-msgstr "; causa = "
+#: sunrpc/clnt_perr.c:105
+#, c-format
+msgid "%s: %s; why = %s\n"
+msgstr "%s: %s; causa = %s\n"
-#: sunrpc/clnt_perr.c:132
+#: sunrpc/clnt_perr.c:107
#, c-format
-msgid "(unknown authentication error - %d)"
-msgstr "(error de autentificación desconocido - %d)"
+msgid "%s: %s; why = (unknown authentication error - %d)\n"
+msgstr "%s: %s; causa = (error de autentificación desconocido - %d)\n"
-#: sunrpc/clnt_perr.c:177
+#: sunrpc/clnt_perr.c:156
msgid "RPC: Success"
msgstr "RPC: Conseguido"
-#: sunrpc/clnt_perr.c:180
+#: sunrpc/clnt_perr.c:159
msgid "RPC: Can't encode arguments"
msgstr "RPC: No se pudieron codificar los argumentos"
-# Si da el error es porque lo intentó descodificar
-# y no lo consiguió. Es decir, que lo intentó ( pasado )
+# Si da el error es porque lo intentó descodificar
+# y no lo consiguió. Es decir, que lo intentó ( pasado )
# En muchos de los mensajes de GNU se usa presente o pasado
# indiferentemente. Ya se sabe lo mal que les suena el pasado de can,
# sobre todo en frases afirmativas ( que no es el caso, pero bueno )
#
-#: sunrpc/clnt_perr.c:184
+#: sunrpc/clnt_perr.c:163
msgid "RPC: Can't decode result"
msgstr "RPC: No se pudo descodificar la respuesta"
# Sugerencia: No se puede enviar. (?) (no estoy muy seguro) sv
-#: sunrpc/clnt_perr.c:188
+#: sunrpc/clnt_perr.c:167
msgid "RPC: Unable to send"
msgstr "RPC: No se puede enviar"
# Me parece que incapaz expresa mejor lo que pasa. Intenta
# recibir, pero no puede. De la otra forma (no se puede recibir)
-# da la impresión de que ni siquiera se intenta
+# da la impresión de que ni siquiera se intenta
# A lo mejor es que ni siquiera puede intentarlo ... sv
# Me suena horrible lo de "Incapaz", lo cambio. sv
-#: sunrpc/clnt_perr.c:192
+#: sunrpc/clnt_perr.c:171
msgid "RPC: Unable to receive"
msgstr "RPC: No se puede recibir"
-#: sunrpc/clnt_perr.c:196
+#: sunrpc/clnt_perr.c:175
msgid "RPC: Timed out"
-msgstr "RPC: El tiempo expiró"
+msgstr "RPC: El tiempo expiró"
-#: sunrpc/clnt_perr.c:200
+#: sunrpc/clnt_perr.c:179
msgid "RPC: Incompatible versions of RPC"
msgstr "RPC: Versiones incompatibles de RPC"
-#: sunrpc/clnt_perr.c:204
+#: sunrpc/clnt_perr.c:183
msgid "RPC: Authentication error"
-msgstr "RPC: Error de autentificación"
+msgstr "RPC: Error de autentificación"
-#: sunrpc/clnt_perr.c:208
+#: sunrpc/clnt_perr.c:187
msgid "RPC: Program unavailable"
msgstr "RPC: Programa no disponible"
-#: sunrpc/clnt_perr.c:212
+#: sunrpc/clnt_perr.c:191
msgid "RPC: Program/version mismatch"
-msgstr "RPC: La versión del programa no coincide"
+msgstr "RPC: La versión del programa no coincide"
-# ??? prefiero añadir rpc otra vez,
-# parece que queda más claro cual es el error y son solo tres letras
+# ??? prefiero añadir rpc otra vez,
+# parece que queda más claro cual es el error y son solo tres letras
#
-# No sé lo que es el RPC, pero igual es un disparate "procedimiento rpc"
-# En estos casos, preferiría no añadir nada y no "arriesgar". sv
+# No sé lo que es el RPC, pero igual es un disparate "procedimiento rpc"
+# En estos casos, preferiría no añadir nada y no "arriesgar". sv
#
-# Está bien, por homogeneizar todo un poco lo quitaré. Pero que conste que
-# procedimiento rpc es perfectamente válido ( rcp: remote procedure call )
+# Está bien, por homogeneizar todo un poco lo quitaré. Pero que conste que
+# procedimiento rpc es perfectamente válido ( rcp: remote procedure call )
# em
#
-# Incluyo una cita de César Ballardini a ver qué te parece:
-# "no es necesario explicar la terminología obvia dentro de su contexto"
-# Creo que no hace falta poner rpc dos veces. El primero ya te avisa "de qué
+# Incluyo una cita de César Ballardini a ver qué te parece:
+# "no es necesario explicar la terminología obvia dentro de su contexto"
+# Creo que no hace falta poner rpc dos veces. El primero ya te avisa "de qué
# va el rollo". sv+
#
# Por cierto, unavailable es NO disponible. Lo cambio.
# Y quito el "rpc" sv+
-#: sunrpc/clnt_perr.c:216
+#: sunrpc/clnt_perr.c:195
msgid "RPC: Procedure unavailable"
msgstr "RPC: Procedimiento no disponible"
-#: sunrpc/clnt_perr.c:220
+#: sunrpc/clnt_perr.c:199
msgid "RPC: Server can't decode arguments"
msgstr "RPC: El servidor no puede descifrar los argumentos"
-#: sunrpc/clnt_perr.c:224
+#: sunrpc/clnt_perr.c:203
msgid "RPC: Remote system error"
msgstr "RPC: Error del sistema remoto"
-#: sunrpc/clnt_perr.c:228
+#: sunrpc/clnt_perr.c:207
msgid "RPC: Unknown host"
msgstr "RPC: `Host' desconocido"
-#: sunrpc/clnt_perr.c:232
+#: sunrpc/clnt_perr.c:211
msgid "RPC: Unknown protocol"
msgstr "RPC: Protocolo desconocido"
-#: sunrpc/clnt_perr.c:236
+#: sunrpc/clnt_perr.c:215
msgid "RPC: Port mapper failure"
msgstr "RPC: Fallo del asignador de puertos"
-#: sunrpc/clnt_perr.c:240
+#: sunrpc/clnt_perr.c:219
msgid "RPC: Program not registered"
msgstr "RPC: Programa no registrado"
-# ??? Falló, fracasó, pinchó ;-)
-#: sunrpc/clnt_perr.c:244
+# ??? Falló, fracasó, pinchó ;-)
+#: sunrpc/clnt_perr.c:223
msgid "RPC: Failed (unspecified error)"
-msgstr "RPC: Falló (error no especificado)"
+msgstr "RPC: Falló (error no especificado)"
-#: sunrpc/clnt_perr.c:285
+#: sunrpc/clnt_perr.c:264
msgid "RPC: (unknown error code)"
-msgstr "RPC: (código de error desconocido)"
+msgstr "RPC: (código de error desconocido)"
-#: sunrpc/clnt_perr.c:357
+#: sunrpc/clnt_perr.c:336
msgid "Authentication OK"
-msgstr "Autentificación válida"
+msgstr "Autentificación válida"
-#: sunrpc/clnt_perr.c:360
+#: sunrpc/clnt_perr.c:339
msgid "Invalid client credential"
-msgstr "Credenciales del cliente inválidas"
+msgstr "Credenciales del cliente inválidas"
-#: sunrpc/clnt_perr.c:364
+#: sunrpc/clnt_perr.c:343
msgid "Server rejected credential"
-msgstr "El servidor rechazó la credencial"
+msgstr "El servidor rechazó la credencial"
-#: sunrpc/clnt_perr.c:368
+#: sunrpc/clnt_perr.c:347
msgid "Invalid client verifier"
-msgstr "Verificación del cliente inválida"
+msgstr "Verificación del cliente inválida"
-#: sunrpc/clnt_perr.c:372
+#: sunrpc/clnt_perr.c:351
msgid "Server rejected verifier"
-msgstr "El servidor rechazó el verificador"
+msgstr "El servidor rechazó el verificador"
-#: sunrpc/clnt_perr.c:376
+#: sunrpc/clnt_perr.c:355
msgid "Client credential too weak"
msgstr "Las credenciales del cliente son poco fiables"
-#: sunrpc/clnt_perr.c:380
+#: sunrpc/clnt_perr.c:359
msgid "Invalid server verifier"
-msgstr "Verificación del servidor inválido"
+msgstr "Verificación del servidor inválido"
-#: sunrpc/clnt_perr.c:384
+#: sunrpc/clnt_perr.c:363
msgid "Failed (unspecified error)"
-msgstr "Falló (error no especificado)"
+msgstr "Falló (error no especificado)"
-#: sunrpc/clnt_raw.c:117
-msgid "clnt_raw.c - Fatal header serialization error."
-msgstr "clnt_raw.c - Error grave en la secuencia de cabecera."
+#: sunrpc/clnt_raw.c:115
+msgid "clnt_raw.c: fatal header serialization error"
+msgstr "clnt_raw.c: error grave en la secuencia de cabecera"
-#: sunrpc/clnt_tcp.c:134 sunrpc/clnt_tcp.c:137
-msgid "clnttcp_create: out of memory\n"
-msgstr "clnttcp_create: memoria agotada\n"
+#: sunrpc/pm_getmaps.c:77
+msgid "pmap_getmaps.c: rpc problem"
+msgstr "pmap_getmaps.c: problema de rpc"
-#: sunrpc/clnt_udp.c:141 sunrpc/clnt_udp.c:144
-msgid "clntudp_create: out of memory\n"
-msgstr "clntudp_create: memoria agotada\n"
-
-#: sunrpc/clnt_unix.c:131 sunrpc/clnt_unix.c:134
-msgid "clntunix_create: out of memory\n"
-msgstr "clntunix_create: memoria agotada\n"
-
-#: sunrpc/get_myaddr.c:78
-msgid "get_myaddress: ioctl (get interface configuration)"
-msgstr "get_myaddress: ioctl (lee la configuración del interfaz)"
-
-#: sunrpc/pm_getmaps.c:74
-msgid "pmap_getmaps rpc problem"
-msgstr "pmap_getmaps problema de rpc"
-
-#: sunrpc/pmap_clnt.c:72
-msgid "__get_myaddress: ioctl (get interface configuration)"
-msgstr "__get_myaddress: ioctl (lee la configuración del interfaz)"
-
-#: sunrpc/pmap_clnt.c:137
+#: sunrpc/pmap_clnt.c:127
msgid "Cannot register service"
msgstr "No se pudo registrar el servicio"
-#: sunrpc/pmap_rmt.c:190
-msgid "broadcast: ioctl (get interface configuration)"
-msgstr "broadcast: iotcl (lee la configuración del interfaz)"
-
-# Mejorando lo presente ( idea de Jochen )
-#: sunrpc/pmap_rmt.c:199
-msgid "broadcast: ioctl (get interface flags)"
-msgstr "broadcast: iotcl (lee las propiedades del interfaz)"
-
# He intentado mejorarlo un poco ...
#
-#: sunrpc/pmap_rmt.c:269
+#: sunrpc/pmap_rmt.c:243
msgid "Cannot create socket for broadcast rpc"
msgstr "No se puede crear `socket' para enviar un mensaje `broadcast' del rpc"
-#: sunrpc/pmap_rmt.c:276
+#: sunrpc/pmap_rmt.c:250
msgid "Cannot set socket option SO_BROADCAST"
-msgstr "No se pudo especificar la opción SO_BROADCAST para el `socket'"
+msgstr "No se pudo especificar la opción SO_BROADCAST para el `socket'"
-#: sunrpc/pmap_rmt.c:328
+#: sunrpc/pmap_rmt.c:302
msgid "Cannot send broadcast packet"
msgstr "No se pudo enviar el mensaje `broadcast'"
-# Pregunta: ¿Qué es poll?
-#: sunrpc/pmap_rmt.c:353
+# Pregunta: ¿Qué es poll?
+#: sunrpc/pmap_rmt.c:327
msgid "Broadcast poll problem"
msgstr "Problema en el `poll' del `broadcast'"
-#: sunrpc/pmap_rmt.c:366
+#: sunrpc/pmap_rmt.c:340
msgid "Cannot receive reply to broadcast"
msgstr "No se puede recibir la respuesta al `broadcast'"
#: sunrpc/rpc_main.c:288
#, c-format
msgid "%s: output would overwrite %s\n"
-msgstr "%s: la salida sobreescribiría %s\n"
+msgstr "%s: la salida sobreescribiría %s\n"
#: sunrpc/rpc_main.c:295
#, c-format
@@ -4606,2412 +5263,2240 @@ msgstr "no se puede encontrar el preprocesador de C: %s \n"
#: sunrpc/rpc_main.c:350
msgid "cannot find any C preprocessor (cpp)\n"
-msgstr "no se puede encontrar ningún preprocesador de C (cpp)\n"
+msgstr "no se puede encontrar ningún preprocesador de C (cpp)\n"
#: sunrpc/rpc_main.c:419
#, c-format
msgid "%s: C preprocessor failed with signal %d\n"
-msgstr "%s: El preprocesador de C falló con la señal %d\n"
+msgstr "%s: El preprocesador de C falló con la señal %d\n"
#: sunrpc/rpc_main.c:422
#, c-format
msgid "%s: C preprocessor failed with exit code %d\n"
-msgstr "%s: El preprocesador de C falló con un código de retorno %d\n"
+msgstr "%s: El preprocesador de C falló con un código de retorno %d\n"
#: sunrpc/rpc_main.c:462
#, c-format
-msgid "illegal nettype :`%s'\n"
-msgstr "tipodered ilegal :`%s'\n"
+msgid "illegal nettype: `%s'\n"
+msgstr "tipodered ilegal: `%s'\n"
-#: sunrpc/rpc_main.c:1104
+#: sunrpc/rpc_main.c:1128
#, c-format
msgid "rpcgen: too many defines\n"
msgstr "rpcgen: demasiados defines\n"
-#: sunrpc/rpc_main.c:1116
+#: sunrpc/rpc_main.c:1140
#, c-format
msgid "rpcgen: arglist coding error\n"
-msgstr "rpcgen: error de codificación de la lista de argumentos\n"
+msgstr "rpcgen: error de codificación de la lista de argumentos\n"
#. TRANS: the file will not be removed; this is an
#. TRANS: informative message.
-#: sunrpc/rpc_main.c:1149
+#: sunrpc/rpc_main.c:1173
#, c-format
msgid "file `%s' already exists and may be overwritten\n"
-msgstr "el fichero `%s' ya existe y podría ser sobreescrito\n"
+msgstr "el fichero `%s' ya existe y podría ser sobreescrito\n"
-#: sunrpc/rpc_main.c:1194
+#: sunrpc/rpc_main.c:1218
#, c-format
msgid "Cannot specify more than one input file!\n"
-msgstr "No se puede especificar más de un fichero de entrada\n"
+msgstr "No se puede especificar más de un fichero de entrada\n"
# Se admiten sugerencias para MT-safe. sv
-#: sunrpc/rpc_main.c:1364
+#: sunrpc/rpc_main.c:1392
+#, c-format
msgid "This implementation doesn't support newstyle or MT-safe code!\n"
-msgstr "¡Esta implementación no admite código de nuevo estilo o `MT-safe'!\n"
+msgstr "¡Esta implementación no admite código de nuevo estilo o `MT-safe'!\n"
-#: sunrpc/rpc_main.c:1373
+#: sunrpc/rpc_main.c:1401
#, c-format
msgid "Cannot use netid flag with inetd flag!\n"
-msgstr "No se puede usar la opción netid con la opción inetd\n"
+msgstr "No se puede usar la opción netid con la opción inetd\n"
-#: sunrpc/rpc_main.c:1385
+#: sunrpc/rpc_main.c:1413
+#, c-format
msgid "Cannot use netid flag without TIRPC!\n"
-msgstr "No se puede usar la opción netid sin TIRPC\n"
+msgstr "No se puede usar la opción netid sin TIRPC\n"
-#: sunrpc/rpc_main.c:1392
+#: sunrpc/rpc_main.c:1420
+#, c-format
msgid "Cannot use table flags with newstyle!\n"
msgstr "No se pueden usar las opciones de la tabla con el nuevo estilo\n"
-#: sunrpc/rpc_main.c:1411
+#: sunrpc/rpc_main.c:1439
#, c-format
msgid "\"infile\" is required for template generation flags.\n"
msgstr ""
-"se necesita un \"fichero_de_entrada\" para las opciones de generación\n"
+"se necesita un \"fichero_de_entrada\" para las opciones de generación\n"
"de plantillas\n"
-#: sunrpc/rpc_main.c:1416
+#: sunrpc/rpc_main.c:1444
#, c-format
msgid "Cannot have more than one file generation flag!\n"
-msgstr "No se puede tener más de una opción de generación de fichero\n"
+msgstr "No se puede tener más de una opción de generación de fichero\n"
-#: sunrpc/rpc_main.c:1425
+#: sunrpc/rpc_main.c:1453
#, c-format
msgid "usage: %s infile\n"
msgstr "modo de empleo: %s fichero_de_entrada\n"
-# Este mensaje tal vez habría que cortarlo por algún lado. sv
-#: sunrpc/rpc_main.c:1426
+# Este mensaje tal vez habría que cortarlo por algún lado. sv
+#: sunrpc/rpc_main.c:1454
#, c-format
msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
-msgstr "\t%s [-abkCLNTM][-Dnombre[=valor]] [-i tamaño] [-I [-K segundos]] [-Y camino] fichero_de_entrada\n"
+msgstr "\t%s [-abkCLNTM][-Dnombre[=valor]] [-i tamaño] [-I [-K segundos]] [-Y camino] fichero_de_entrada\n"
-# Y este también. sv
-#: sunrpc/rpc_main.c:1428
+# Y este también. sv
+#: sunrpc/rpc_main.c:1456
#, c-format
msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o fichero_de_salida] [fichero_de_entrada]\n"
-#: sunrpc/rpc_main.c:1430
+#: sunrpc/rpc_main.c:1458
#, c-format
msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
msgstr "\t%s [-s tipored]* [-o fichero_de_salida] [fichero_de_entrada]\n"
-#: sunrpc/rpc_main.c:1431
+#: sunrpc/rpc_main.c:1459
#, c-format
msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
msgstr "\t%s [-n netid]* [-o fichero_de_salida] [fichero_de_entrada]\n"
-#: sunrpc/rpc_scan.c:116
+#: sunrpc/rpc_main.c:1467
+#, c-format
+msgid "options:\n"
+msgstr "opciones:\n"
+
+#: sunrpc/rpc_main.c:1468
+#, c-format
+msgid "-a\t\tgenerate all files, including samples\n"
+msgstr "-a\t\tgenera todos los ficheros, incluyendo las muestras\n"
+
+#: sunrpc/rpc_main.c:1469
+#, c-format
+msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
+msgstr "-b\t\tmodo de compatibilidad hacia atrás (genera código para SunOS 4.1)\n"
+
+#: sunrpc/rpc_main.c:1470
+#, c-format
+msgid "-c\t\tgenerate XDR routines\n"
+msgstr "-c\t\tgenera rutinas XDR\n"
+
+#: sunrpc/rpc_main.c:1471
+#, c-format
+msgid "-C\t\tANSI C mode\n"
+msgstr "-C\t\tmodo ANSI C\n"
+
+#: sunrpc/rpc_main.c:1472
+#, c-format
+msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
+msgstr "-Dnombre[=valor]\tdefine un símbolo (igual que #define)\n"
+
+#: sunrpc/rpc_main.c:1473
+#, c-format
+msgid "-h\t\tgenerate header file\n"
+msgstr "-h\t\tgenera un fichero de cabecera\n"
+
+#: sunrpc/rpc_main.c:1474
+#, c-format
+msgid "-i size\t\tsize at which to start generating inline code\n"
+msgstr "-i tamaño\t\ttamaño en el que comienza a generar código `inline'\n"
+
+#: sunrpc/rpc_main.c:1475
+#, c-format
+msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
+msgstr "-I\t\tgenera código para soporte de inetd en el servidor (para SunOS 4.1)\n"
+
+# FIXME: Tendría que ser después de "segundos" segundos de inactividad
+#: sunrpc/rpc_main.c:1476
+#, c-format
+msgid "-K seconds\tserver exits after K seconds of inactivity\n"
+msgstr "-K segundos\tel servidor termina después de K segundos de inactividad\n"
+
+# Se admiten sugerencias para "stubs"
+#: sunrpc/rpc_main.c:1477
+#, c-format
+msgid "-l\t\tgenerate client side stubs\n"
+msgstr "-l\t\tgenera `stubs' para el lado del cliente\n"
+
+#: sunrpc/rpc_main.c:1478
+#, c-format
+msgid "-L\t\tserver errors will be printed to syslog\n"
+msgstr "-L\t\tlos errores del servidor se escribirán en syslog\n"
+
+#: sunrpc/rpc_main.c:1479
+#, c-format
+msgid "-m\t\tgenerate server side stubs\n"
+msgstr "-m\t\tgenera `stubs' para el lado del servidor\n"
+
+#: sunrpc/rpc_main.c:1480
+#, c-format
+msgid "-M\t\tgenerate MT-safe code\n"
+msgstr "-M\t\tgenera código multi-hilo seguro\n"
+
+#: sunrpc/rpc_main.c:1481
+#, c-format
+msgid "-n netid\tgenerate server code that supports named netid\n"
+msgstr "-n netid\tgenera código servidor que soporta netid nombrado\n"
+
+#: sunrpc/rpc_main.c:1482
+#, c-format
+msgid "-N\t\tsupports multiple arguments and call-by-value\n"
+msgstr "-N\t\tsoporta varios argumentos y llamada por valor\n"
+
+#: sunrpc/rpc_main.c:1483
+#, c-format
+msgid "-o outfile\tname of the output file\n"
+msgstr "-o fichero_de_salida\tnombre del fichero de salida\n"
+
+#: sunrpc/rpc_main.c:1484
+#, c-format
+msgid "-s nettype\tgenerate server code that supports named nettype\n"
+msgstr "-s nettype\tgenera código servidor que soporta nettype nombrado\n"
+
+#: sunrpc/rpc_main.c:1485
+#, c-format
+msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
+msgstr "-Sc\t\tgenera código cliente de muestra que usa procedimientos remotos\n"
+
+#: sunrpc/rpc_main.c:1486
+#, c-format
+msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
+msgstr "-Ss\t\tgenera código servidor de muestra que define procedimientos remotos\n"
+
+#: sunrpc/rpc_main.c:1487
+#, c-format
+msgid "-Sm \t\tgenerate makefile template \n"
+msgstr "-Sm \t\tgenera una plantilla de makefile\n"
+
+#: sunrpc/rpc_main.c:1488
+#, c-format
+msgid "-t\t\tgenerate RPC dispatch table\n"
+msgstr "-t\t\tgenera tabla de ejecución RPC\n"
+
+#: sunrpc/rpc_main.c:1489
+#, c-format
+msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
+msgstr "-T\t\tgenera código para soportar tablas de ejecución RPC\n"
+
+#: sunrpc/rpc_main.c:1490
+#, c-format
+msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
+msgstr "-Y ruta\t\tnombre del directorio donde encontrar el preprocesador de C (cpp)\n"
+
+#: sunrpc/rpc_scan.c:112
msgid "constant or identifier expected"
msgstr "se esperaba una constante o un identificador"
-#: sunrpc/rpc_scan.c:312
+#: sunrpc/rpc_scan.c:308
msgid "illegal character in file: "
-msgstr "carácter no válido en el fichero: "
+msgstr "carácter no válido en el fichero: "
-#: sunrpc/rpc_scan.c:351 sunrpc/rpc_scan.c:377
+#: sunrpc/rpc_scan.c:347 sunrpc/rpc_scan.c:373
msgid "unterminated string constant"
msgstr "constante de caracteres sin terminar"
-#: sunrpc/rpc_scan.c:383
+#: sunrpc/rpc_scan.c:379
msgid "empty char string"
-msgstr "cadena de caracteres vacía"
+msgstr "cadena de caracteres vacía"
-#: sunrpc/rpc_scan.c:525 sunrpc/rpc_scan.c:535
+#: sunrpc/rpc_scan.c:521 sunrpc/rpc_scan.c:531
msgid "preprocessor error"
msgstr "error del preprocesador"
-#: sunrpc/rpcinfo.c:237 sunrpc/rpcinfo.c:383
+#: sunrpc/rpcinfo.c:246 sunrpc/rpcinfo.c:392
#, c-format
msgid "program %lu is not available\n"
-msgstr "el programa %lu no está disponible\n"
+msgstr "el programa %lu no está disponible\n"
-#: sunrpc/rpcinfo.c:264 sunrpc/rpcinfo.c:310 sunrpc/rpcinfo.c:333
-#: sunrpc/rpcinfo.c:407 sunrpc/rpcinfo.c:453 sunrpc/rpcinfo.c:476
-#: sunrpc/rpcinfo.c:510
+#: sunrpc/rpcinfo.c:273 sunrpc/rpcinfo.c:319 sunrpc/rpcinfo.c:342
+#: sunrpc/rpcinfo.c:416 sunrpc/rpcinfo.c:462 sunrpc/rpcinfo.c:485
+#: sunrpc/rpcinfo.c:519
#, c-format
msgid "program %lu version %lu is not available\n"
-msgstr "el programa %lu versión %lu no está disponible\n"
+msgstr "el programa %lu versión %lu no está disponible\n"
-#: sunrpc/rpcinfo.c:515
+#: sunrpc/rpcinfo.c:524
#, c-format
msgid "program %lu version %lu ready and waiting\n"
-msgstr "el programa %lu versión %lu está listo y a la espera\n"
+msgstr "el programa %lu versión %lu está listo y a la espera\n"
-#: sunrpc/rpcinfo.c:556 sunrpc/rpcinfo.c:563
+#: sunrpc/rpcinfo.c:565 sunrpc/rpcinfo.c:572
msgid "rpcinfo: can't contact portmapper"
msgstr "rpcinfo: no se puede comunicar con el asignador de puertos"
-# No me gusta "programa rpc". El rpc debería sobrar por el contexto. sv
-# A ver qué te parece esto em+
-# Igual de raro: Te repito la frase de César: "No hay que explicar
-# la terminología dentro de su propio contexto".
-# Con lo fácil que es poner:
-# "No se ha registrado ningún programa remoto.\n" sv+
+# No me gusta "programa rpc". El rpc debería sobrar por el contexto. sv
+# A ver qué te parece esto em+
+# Igual de raro: Te repito la frase de César: "No hay que explicar
+# la terminología dentro de su propio contexto".
+# Con lo fácil que es poner:
+# "No se ha registrado ningún programa remoto.\n" sv+
#
# Demasiado complejo.
-# Antes decía:
-# No existe ningún procedimiento rpc registrado en la máquina remota.
+# Antes decía:
+# No existe ningún procedimiento rpc registrado en la máquina remota.
# Lo cambio. sv
-#: sunrpc/rpcinfo.c:570
+#: sunrpc/rpcinfo.c:579
msgid "No remote programs registered.\n"
-msgstr "No hay ningún programa remoto registrado.\n"
+msgstr "No hay ningún programa remoto registrado.\n"
-#: sunrpc/rpcinfo.c:574
+#: sunrpc/rpcinfo.c:583
msgid " program vers proto port\n"
msgstr " programa vers proto puerto\n"
# FUZZY. sv
-# Sugerencia: Borrar "señal". sv
+# Sugerencia: Borrar "señal". sv
# Sugerencia: Asegurarse de que a lo que se refiere es femenino. sv
-# Según los antiguos fuentes esto era una señal ( lo comprobé entonces )
-# de todas maneras queda pendiente de revisar con la versión alemana
+# Según los antiguos fuentes esto era una señal ( lo comprobé entonces )
+# de todas maneras queda pendiente de revisar con la versión alemana
# no quites el fuzzy em+
-#: sunrpc/rpcinfo.c:613
+#: sunrpc/rpcinfo.c:622
msgid "(unknown)"
-msgstr "(señal desconocida)"
+msgstr "(señal desconocida)"
-#: sunrpc/rpcinfo.c:637
+#: sunrpc/rpcinfo.c:646
#, c-format
msgid "rpcinfo: broadcast failed: %s\n"
-msgstr "rpcinfo: el `broadcast' no tuvo éxito: %s\n"
+msgstr "rpcinfo: el `broadcast' no tuvo éxito: %s\n"
-#: sunrpc/rpcinfo.c:658
+#: sunrpc/rpcinfo.c:667
msgid "Sorry. You are not root\n"
msgstr "Lo siento. Usted no es root\n"
-# FUZZY. Se podría añadir rpcinfo: al principio. sv
+# FUZZY. Se podría añadir rpcinfo: al principio. sv
# Estoy pensando en poner 'dar de baja' en vez de eso em+
-#: sunrpc/rpcinfo.c:665
+#: sunrpc/rpcinfo.c:674
#, c-format
msgid "rpcinfo: Could not delete registration for prog %s version %s\n"
-msgstr "rpcinfo: No se pudo borrar el registro para el programa %s versión %s\n"
+msgstr "rpcinfo: No se pudo borrar el registro para el programa %s versión %s\n"
# Sugerencia: numprogr -> numprog. sv
-# Sugerencia: numpuerto -> númpuerto. sv
-# Sugerencia: numprog -> númprog. sv
+# Sugerencia: numpuerto -> númpuerto. sv
+# Sugerencia: numprog -> númprog. sv
# OK, lo he cambiado en todo
-#: sunrpc/rpcinfo.c:674
+#: sunrpc/rpcinfo.c:683
msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
-msgstr "Modo de empleo: rpcinfo [ -n númpuerto ] -u host progrnúm [ numversión ]\n"
+msgstr "Modo de empleo: rpcinfo [ -n númpuerto ] -u host progrnúm [ numversión ]\n"
-#: sunrpc/rpcinfo.c:676
+#: sunrpc/rpcinfo.c:685
msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"
-msgstr " rpcinfo [ -n númpuerto ] -t host númprog [ númvers ]\n"
+msgstr " rpcinfo [ -n númpuerto ] -t host númprog [ númvers ]\n"
-#: sunrpc/rpcinfo.c:678
+#: sunrpc/rpcinfo.c:687
msgid " rpcinfo -p [ host ]\n"
msgstr " rpcinfo -p [ host ]\n"
-#: sunrpc/rpcinfo.c:679
+#: sunrpc/rpcinfo.c:688
msgid " rpcinfo -b prognum versnum\n"
-msgstr " rpcinfo -b númprog númvers\n"
+msgstr " rpcinfo -b númprog númvers\n"
-#: sunrpc/rpcinfo.c:680
+#: sunrpc/rpcinfo.c:689
msgid " rpcinfo -d prognum versnum\n"
-msgstr " rpcinfo -d númprog númvers\n"
+msgstr " rpcinfo -d númprog númvers\n"
-#: sunrpc/rpcinfo.c:695
+#: sunrpc/rpcinfo.c:714
#, c-format
msgid "rpcinfo: %s is unknown service\n"
msgstr "rpcinfo: el servicio `%s' es desconocido\n"
-#: sunrpc/rpcinfo.c:732
+#: sunrpc/rpcinfo.c:751
#, c-format
msgid "rpcinfo: %s is unknown host\n"
msgstr "rpcinfo: el `host' %s es desconocido\n"
-#: sunrpc/svc_run.c:76
+#: sunrpc/svc_run.c:71
+msgid "svc_run: - out of memory"
+msgstr "svc_run: - memoria agotada"
+
+#: sunrpc/svc_run.c:91
msgid "svc_run: - poll failed"
-msgstr "svc_run: - poll falló"
+msgstr "svc_run: - poll falló"
-#: sunrpc/svc_simple.c:87
+#: sunrpc/svc_simple.c:81
#, c-format
msgid "can't reassign procedure number %ld\n"
-msgstr "no se puede reasignar el número de procedimiento %ld\n"
+msgstr "no se puede reasignar el número de procedimiento %ld\n"
-#: sunrpc/svc_simple.c:96
+#: sunrpc/svc_simple.c:91
msgid "couldn't create an rpc server\n"
msgstr "no se pudo crear un servidor rpc\n"
-#: sunrpc/svc_simple.c:104
+#: sunrpc/svc_simple.c:99
#, c-format
msgid "couldn't register prog %ld vers %ld\n"
-msgstr "no se pudo registrar el programa %ld versión %ld\n"
+msgstr "no se pudo registrar el programa %ld versión %ld\n"
-#: sunrpc/svc_simple.c:111
+#: sunrpc/svc_simple.c:107
msgid "registerrpc: out of memory\n"
msgstr "registerrpc: memoria agotada\n"
-#: sunrpc/svc_simple.c:175
+#: sunrpc/svc_simple.c:168
#, c-format
msgid "trouble replying to prog %d\n"
msgstr "dificultades para responder al programa %d\n"
-#: sunrpc/svc_simple.c:183
+#: sunrpc/svc_simple.c:177
#, c-format
msgid "never registered prog %d\n"
msgstr "el programa %d no fue registrado nunca\n"
-#: sunrpc/svc_tcp.c:155
+#: sunrpc/svc_tcp.c:149
msgid "svc_tcp.c - tcp socket creation problem"
msgstr "svc_tcp.c - problema al crear el `socket' tcp"
-#: sunrpc/svc_tcp.c:170
+#: sunrpc/svc_tcp.c:164
msgid "svc_tcp.c - cannot getsockname or listen"
-msgstr "svc_tcp.c - fallo en la ejecución de `getsockname()' o `listen()'"
-
-#: sunrpc/svc_tcp.c:181 sunrpc/svc_tcp.c:184
-msgid "svctcp_create: out of memory\n"
-msgstr "svctcp_create: memoria agotada\n"
-
-#: sunrpc/svc_tcp.c:225 sunrpc/svc_tcp.c:228
-msgid "svc_tcp: makefd_xprt: out of memory\n"
-msgstr "svc_tcp: makefd_xprt: memoria agotada\n"
+msgstr "svc_tcp.c - fallo en la ejecución de `getsockname()' o `listen()'"
-#: sunrpc/svc_udp.c:128
+#: sunrpc/svc_udp.c:122
msgid "svcudp_create: socket creation problem"
msgstr "svcudp_create: problemas para crear el `socket'"
-#: sunrpc/svc_udp.c:142
+#: sunrpc/svc_udp.c:136
msgid "svcudp_create - cannot getsockname"
-msgstr "svcudp_create - fallo en la ejecución de `getsockname'"
+msgstr "svcudp_create - fallo en la ejecución de `getsockname'"
-#: sunrpc/svc_udp.c:154 sunrpc/svc_udp.c:157
-msgid "svcudp_create: out of memory\n"
-msgstr "svcudp_create: memoria agotada\n"
-
-#: sunrpc/svc_udp.c:182 sunrpc/svc_udp.c:185
+#: sunrpc/svc_udp.c:168
msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
-msgstr "svcudp_create: xp_pad es demasiado pequeño para IP_PKTINFO\n"
+msgstr "svcudp_create: xp_pad es demasiado pequeño para IP_PKTINFO\n"
-#: sunrpc/svc_udp.c:493
+#: sunrpc/svc_udp.c:476
msgid "enablecache: cache already enabled"
-msgstr "enablecache: el caché ya estaba activado"
+msgstr "enablecache: el caché ya estaba activado"
-# Se consultó a la lista sobre si era "la caché" o "el caché"
-# Parece ser indistinto, así que unas veces puede ser "la" y otras "el".
+# Se consultó a la lista sobre si era "la caché" o "el caché"
+# Parece ser indistinto, así que unas veces puede ser "la" y otras "el".
# dependiendo del caso (lo que mejor suene).
#
-#: sunrpc/svc_udp.c:499
+#: sunrpc/svc_udp.c:482
msgid "enablecache: could not allocate cache"
-msgstr "enablecache: no se pudo crear espacio para el caché"
+msgstr "enablecache: no se pudo crear espacio para el caché"
-#: sunrpc/svc_udp.c:507
+#: sunrpc/svc_udp.c:491
msgid "enablecache: could not allocate cache data"
-msgstr "enablecache: no se pudo crear espacio para los datos del caché"
+msgstr "enablecache: no se pudo crear espacio para los datos del caché"
-#: sunrpc/svc_udp.c:514
+#: sunrpc/svc_udp.c:499
msgid "enablecache: could not allocate cache fifo"
-msgstr "enablecache: no se pudo crear espacio para la pila del caché"
+msgstr "enablecache: no se pudo crear espacio para la pila del caché"
-#: sunrpc/svc_udp.c:550
+#: sunrpc/svc_udp.c:535
msgid "cache_set: victim not found"
-msgstr "cache_set: no se encontró el objetivo"
+msgstr "cache_set: no se encontró el objetivo"
-#: sunrpc/svc_udp.c:561
+#: sunrpc/svc_udp.c:546
msgid "cache_set: victim alloc failed"
-msgstr "cache_set: falló la asignación de espacio para el objetivo"
+msgstr "cache_set: falló la asignación de espacio para el objetivo"
-#: sunrpc/svc_udp.c:567
+#: sunrpc/svc_udp.c:553
msgid "cache_set: could not allocate new rpc_buffer"
-msgstr "cache_set: no se pudo asignar espacio para un nuevo búfer rpc"
+msgstr "cache_set: no se pudo asignar espacio para un nuevo búfer rpc"
-#: sunrpc/svc_unix.c:150
+#: sunrpc/svc_unix.c:148
msgid "svc_unix.c - AF_UNIX socket creation problem"
msgstr "svc_unix.c - problema al crear el `socket' AF_UNIX"
-#: sunrpc/svc_unix.c:166
+#: sunrpc/svc_unix.c:164
msgid "svc_unix.c - cannot getsockname or listen"
-msgstr "svc_unix.c - fallo en la ejecución de `getsockname()' o `listen()'"
-
-#: sunrpc/svc_unix.c:178 sunrpc/svc_unix.c:181
-msgid "svcunix_create: out of memory\n"
-msgstr "svcunix_create: memoria agotada\n"
+msgstr "svc_unix.c - fallo en la ejecución de `getsockname()' o `listen()'"
-#: sunrpc/svc_unix.c:222 sunrpc/svc_unix.c:225
-msgid "svc_unix: makefd_xprt: out of memory\n"
-msgstr "svc_unix: makefd_xprt: memoria agotada\n"
+# Habrá que mirar esto
+# Mirado, efectivamente esto es una señal que habrá
+# que dejarla con su nombre original ( entre paréntesis )
+#: sysdeps/generic/siglist.h:29 sysdeps/unix/siglist.c:27
+msgid "Hangup"
+msgstr "Colgar (hangup)"
-#: sunrpc/xdr.c:570 sunrpc/xdr.c:573
-msgid "xdr_bytes: out of memory\n"
-msgstr "xdr_bytes: memoria agotada\n"
+#: sysdeps/generic/siglist.h:30 sysdeps/unix/siglist.c:28
+msgid "Interrupt"
+msgstr "Interrupción"
-#: sunrpc/xdr.c:728 sunrpc/xdr.c:731
-msgid "xdr_string: out of memory\n"
-msgstr "xdr_string: memoria agotada\n"
+# Podría ser también "Abandonar" sv
+#: sysdeps/generic/siglist.h:31 sysdeps/unix/siglist.c:29
+msgid "Quit"
+msgstr "Abandona"
-#: sunrpc/xdr_array.c:111 sunrpc/xdr_array.c:114
-msgid "xdr_array: out of memory\n"
-msgstr "xdr_array: memoria agotada\n"
+# Se trata de una instrucción ilegal en el juego de instrucciones del 486
+# que provoca una "excepción".
+#: sysdeps/generic/siglist.h:32 sysdeps/unix/siglist.c:30
+msgid "Illegal instruction"
+msgstr "Instrucción ilegal"
-#: sunrpc/xdr_rec.c:158 sunrpc/xdr_rec.c:161
-msgid "xdrrec_create: out of memory\n"
-msgstr "xdrrec_create: memoria agotada\n"
+#: sysdeps/generic/siglist.h:33 sysdeps/unix/siglist.c:31
+msgid "Trace/breakpoint trap"
+msgstr "`trap' para punto de parada/seguimiento"
-#: sunrpc/xdr_ref.c:88 sunrpc/xdr_ref.c:91
-msgid "xdr_reference: out of memory\n"
-msgstr "xdr_reference: memoria agotada\n"
+#: sysdeps/generic/siglist.h:34
+msgid "Aborted"
+msgstr "Abortado"
-#: nis/nis_callback.c:189
-msgid "unable to free arguments"
-msgstr "no se pueden liberar los argumentos"
+#: sysdeps/generic/siglist.h:35 sysdeps/unix/siglist.c:34
+msgid "Floating point exception"
+msgstr "Excepción de coma flotante"
-#: nis/nis_error.c:30
-msgid "Probable success"
-msgstr "Éxito probable"
+# A quien se le ocurra `matar' un proceso, que especifique con qué señal.
+# En todo caso ` Terminado ( KILL ) ' sería apropiado. Ver fuentes
+#: sysdeps/generic/siglist.h:36 sysdeps/unix/siglist.c:35
+msgid "Killed"
+msgstr "Terminado (killed)"
-#: nis/nis_error.c:31
-msgid "Not found"
-msgstr "No se ha encontrado"
+#: sysdeps/generic/siglist.h:37 sysdeps/unix/siglist.c:36
+msgid "Bus error"
+msgstr "Error del bus"
-#: nis/nis_error.c:32
-msgid "Probably not found"
-msgstr "Probablemente no se encontró"
+# ¿De "segmento", o de "segmentación"? sv
+# De segmentación me parece incorrecto. La memoria ya estaba
+# segmentada, y se intentó acceder a un segmento
+# que no pertenece al programa. em
+# ¿Entonces dirías que está mal el original inglés? sv
+# No, en inglés siempre se ha dicho así. Siempre he traducido
+# Segmentation fault como violación de segmento. Consultémoslo,
+# es un mensaje que se ve demasiado a menudo em
+#: sysdeps/generic/siglist.h:38 sysdeps/unix/siglist.c:37
+msgid "Segmentation fault"
+msgstr "Violación de segmento"
-#: nis/nis_error.c:33
-msgid "Cache expired"
-msgstr "El caché ha expirado"
+# Vi traducido pipe como tubo en un libro sobre pc/dos, y me horrorizó
+# menos mal que venía siempre la palabra `pipe' al lado entrecomillada
+#
+# Este mensaje sale ahora cada vez que pulsas "q" cuando haces por ejemplo
+# cat loquesea | less
+# Sale *muy a menudo* y estoy harto, así que lo borro que ya está bien. sv
+#. TRANS Broken pipe; there is no process reading from the other end of a pipe.
+#. TRANS Every library function that returns this error code also generates a
+#. TRANS @code{SIGPIPE} signal; this signal terminates the program if not handled
+#. TRANS or blocked. Thus, your program will never actually see @code{EPIPE}
+#. TRANS unless it has handled or blocked @code{SIGPIPE}.
+#: sysdeps/generic/siglist.h:39 sysdeps/gnu/errlist.c:359
+#: sysdeps/unix/siglist.c:39
+msgid "Broken pipe"
+msgstr "Tubería rota"
-#: nis/nis_error.c:34
-msgid "NIS+ servers unreachable"
-msgstr "No se puede acceder a los servidores NIS+"
+#: sysdeps/generic/siglist.h:40 sysdeps/unix/siglist.c:40
+msgid "Alarm clock"
+msgstr "Temporizador"
-#: nis/nis_error.c:35
-msgid "Unknown object"
-msgstr "Objeto desconocido"
+#: sysdeps/generic/siglist.h:41 sysdeps/unix/siglist.c:41
+msgid "Terminated"
+msgstr "Terminado"
-#: nis/nis_error.c:36
-msgid "Server busy, try again"
-msgstr "El servidor está ocupado, inténtelo de nuevo"
+# ?? sigo pensando en una traducción para condición
+#: sysdeps/generic/siglist.h:42 sysdeps/unix/siglist.c:42
+msgid "Urgent I/O condition"
+msgstr "Condición urgente de E/S"
-#: nis/nis_error.c:37
-msgid "Generic system error"
-msgstr "Error del sistema genérico"
+#: sysdeps/generic/siglist.h:43 sysdeps/unix/siglist.c:43
+msgid "Stopped (signal)"
+msgstr "Parado (por una señal)"
-#: nis/nis_error.c:38
-msgid "First/next chain broken"
-msgstr "Cadena primero/siguiente rota"
+#: sysdeps/generic/siglist.h:44 sysdeps/unix/siglist.c:44
+msgid "Stopped"
+msgstr "Parado"
-#: nis/nis_error.c:41
-msgid "Name not served by this server"
-msgstr "Nombre no servido por este servidor"
+#: sysdeps/generic/siglist.h:45 sysdeps/unix/siglist.c:45
+msgid "Continued"
+msgstr "Continúa"
-#: nis/nis_error.c:42
-msgid "Server out of memory"
-msgstr "Memoria agotada en el servidor"
+#: sysdeps/generic/siglist.h:46 sysdeps/unix/siglist.c:46
+msgid "Child exited"
+msgstr "El proceso hijo terminó"
-#: nis/nis_error.c:43
-msgid "Object with same name exists"
-msgstr "Existe un objeto con el mismo nombre"
+# Perdonad que sea tan largo, pero es algo que nunca está de más
+# Creo que mejora al original ;)
+#: sysdeps/generic/siglist.h:47 sysdeps/unix/siglist.c:47
+msgid "Stopped (tty input)"
+msgstr "Parado (requiere entrada de terminal)"
-#: nis/nis_error.c:44
-msgid "Not master server for this domain"
-msgstr "No existe un servidor maestro para este dominio"
+# Perdonad que sea tan largo, pero es algo que nunca está de más
+# Creo que mejora al original ;)
+#: sysdeps/generic/siglist.h:48 sysdeps/unix/siglist.c:48
+msgid "Stopped (tty output)"
+msgstr "Parado (requiere salida por terminal)"
-#: nis/nis_error.c:45
-msgid "Invalid object for operation"
-msgstr "Objeto inválido para la operación"
+#: sysdeps/generic/siglist.h:49 sysdeps/unix/siglist.c:49
+msgid "I/O possible"
+msgstr "Operación de E/S permitida"
-#: nis/nis_error.c:46
-msgid "Malformed name, or illegal name"
-msgstr "Nombre mal escrito, o nombre ilegal"
+#: sysdeps/generic/siglist.h:50 sysdeps/unix/siglist.c:50
+msgid "CPU time limit exceeded"
+msgstr "Rebasado el límite de tiempo de CPU"
-#: nis/nis_error.c:47
-msgid "Unable to create callback"
-msgstr "No se puede crear la llamada de regreso"
+#: sysdeps/generic/siglist.h:51 sysdeps/unix/siglist.c:51
+msgid "File size limit exceeded"
+msgstr "Superado el límite de tamaño de fichero"
-# ¿callback?
-#: nis/nis_error.c:48
-msgid "Results sent to callback proc"
-msgstr "Resultados enviados al proceso de `callback'"
+#: sysdeps/generic/siglist.h:52 sysdeps/unix/siglist.c:52
+msgid "Virtual timer expired"
+msgstr "El temporizador virtual llegó al final"
-#: nis/nis_error.c:49
-msgid "Not found, no such name"
-msgstr "No se encontró, no existe ese nombre"
+# ¿No habría que traducir profile? sv
+# Miré los fuentes, y la última documentación de Glibc
+# No se me ocurre traducción para profile ( así se llamaba
+# en los viejos apple al disco duro de 5 Megas ) em
+# Pero esto no tiene nada que ver, ¿no?
+# "Profiling" es ejecutar un programa midiendo qué partes de él consumen
+# más tiempo. Creo recordar que esto tenía nombre en español, pero no
+# me acuerdo de cuál. sv
+# Gracias por la explicación, sé que era algo referente
+# al trace o debug de un programa. Miro a la alemana.
+#: sysdeps/generic/siglist.h:53 sysdeps/unix/siglist.c:53
+msgid "Profiling timer expired"
+msgstr "El tiempo de CPU expiró"
-#: nis/nis_error.c:50
-msgid "Name/entry isn't unique"
-msgstr "El par nombre/entrada no es único"
+#: sysdeps/generic/siglist.h:54 sysdeps/unix/siglist.c:54
+msgid "Window changed"
+msgstr "La ventana ha cambiado"
-# FIXME: ¿En qué se diferencia este del siguiente?
-#: nis/nis_error.c:51
-msgid "Modification failed"
-msgstr "Fallo en la modificación"
+#: sysdeps/generic/siglist.h:55 sysdeps/unix/siglist.c:56
+msgid "User defined signal 1"
+msgstr "Señal definida por el usuario 1"
-#: nis/nis_error.c:52
-msgid "Database for table does not exist"
-msgstr "No existe la base de datos para la tabla"
+#: sysdeps/generic/siglist.h:56 sysdeps/unix/siglist.c:57
+msgid "User defined signal 2"
+msgstr "Señal definida por el usuario 2"
-#: nis/nis_error.c:53
-msgid "Entry/table type mismatch"
-msgstr "Discordancia de tipo entrada/tabla"
+# ???, siempre lo he usado como trap, nunca encontramos la palabra
+# y es una señal estándar Unix, así que no creo conveniente traducirla
+#: sysdeps/generic/siglist.h:60 sysdeps/unix/siglist.c:33
+msgid "EMT trap"
+msgstr "`trap' de EMT"
-#: nis/nis_error.c:54
-msgid "Link points to illegal name"
-msgstr "En enlace apunta a un nombre ilegal"
+#: sysdeps/generic/siglist.h:63 sysdeps/unix/siglist.c:38
+msgid "Bad system call"
+msgstr "Llamada al sistema errónea"
-#: nis/nis_error.c:55
-msgid "Partial success"
-msgstr "Éxito parcial"
+#: sysdeps/generic/siglist.h:66
+msgid "Stack fault"
+msgstr "Fallo en la pila"
-#: nis/nis_error.c:56
-msgid "Too many attributes"
-msgstr "Demasiados atributos"
+#: sysdeps/generic/siglist.h:69
+msgid "Information request"
+msgstr "Petición de información"
-#: nis/nis_error.c:57
-msgid "Error in RPC subsystem"
-msgstr "Error en el subsistema RPC"
+#: sysdeps/generic/siglist.h:71
+msgid "Power failure"
+msgstr "Fallo de alimentación"
-#: nis/nis_error.c:58
-msgid "Missing or malformed attribute"
-msgstr "Falta un atributo o está mal escrito"
+#: sysdeps/generic/siglist.h:74 sysdeps/unix/siglist.c:55
+msgid "Resource lost"
+msgstr "Recurso perdido"
-#: nis/nis_error.c:59
-msgid "Named object is not searchable"
-msgstr "El objeto nombrado no es localizable"
+#. TRANS Operation not permitted; only the owner of the file (or other resource)
+#. TRANS or processes with special privileges can perform the operation.
+#: sysdeps/gnu/errlist.c:25
+msgid "Operation not permitted"
+msgstr "Operación no permitida"
-# ¿callback?
-#: nis/nis_error.c:60
-msgid "Error while talking to callback proc"
-msgstr "Error al hablar con el proceso de `callback'"
+# Sugerencia: No existe el proceso. sv
+# ¿Por qué?
+# Porque si "No such file or directory" se ha traducido por
+# "no existe el fichero o el directorio", está claro que si le dices un
+# proceso y te dice "no existe el proceso" se refiere al que
+# tú le has dicho y no a otro. sv
+#
+#. TRANS No process matches the specified process ID.
+#: sysdeps/gnu/errlist.c:45
+msgid "No such process"
+msgstr "No existe el proceso"
-#: nis/nis_error.c:61
-msgid "Non NIS+ namespace encountered"
-msgstr "Se ha encontrado un nombre de espacio que no es NIS+"
+#. TRANS Interrupted function call; an asynchronous signal occurred and prevented
+#. TRANS completion of the call. When this happens, you should try the call
+#. TRANS again.
+#. TRANS
+#. TRANS You can choose to have functions resume after a signal that is handled,
+#. TRANS rather than failing with @code{EINTR}; see @ref{Interrupted
+#. TRANS Primitives}.
+#: sysdeps/gnu/errlist.c:60
+msgid "Interrupted system call"
+msgstr "Llamada al sistema interrumpida"
-#: nis/nis_error.c:62
-msgid "Illegal object type for operation"
-msgstr "Objeto ilegal para la operación"
+#. TRANS Input/output error; usually used for physical read or write errors.
+#: sysdeps/gnu/errlist.c:69
+msgid "Input/output error"
+msgstr "Error de entrada/salida"
-# ¿pasado? sv
-#: nis/nis_error.c:63
-msgid "Passed object is not the same object on server"
-msgstr "El objeto pasado no es el mismo objeto que hay en el servidor"
+#. TRANS No such device or address. The system tried to use the device
+#. TRANS represented by a file you specified, and it couldn't find the device.
+#. TRANS This can mean that the device file was installed incorrectly, or that
+#. TRANS the physical device is missing or not correctly attached to the
+#. TRANS computer.
+#: sysdeps/gnu/errlist.c:82
+msgid "No such device or address"
+msgstr "No existe el dispositivo o la dirección"
-#: nis/nis_error.c:64
-msgid "Modify operation failed"
-msgstr "La operación de modificación ha fallado"
+#. TRANS Argument list too long; used when the arguments passed to a new program
+#. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a
+#. TRANS File}) occupy too much memory space. This condition never arises in the
+#. TRANS GNU system.
+#: sysdeps/gnu/errlist.c:94
+msgid "Argument list too long"
+msgstr "La lista de argumentos es demasiado larga"
-#: nis/nis_error.c:65
-msgid "Query illegal for named table"
-msgstr "Consulta ilegal para la tabla nombrada"
+#. TRANS Invalid executable file format. This condition is detected by the
+#. TRANS @code{exec} functions; see @ref{Executing a File}.
+#: sysdeps/gnu/errlist.c:104
+msgid "Exec format error"
+msgstr "Formato de ejecutable incorrecto"
-#: nis/nis_error.c:66
-msgid "Attempt to remove a non-empty table"
-msgstr "Se intentó eliminar una tabla no vacía"
+#. TRANS Bad file descriptor; for example, I/O on a descriptor that has been
+#. TRANS closed or reading from a descriptor open only for writing (or vice
+#. TRANS versa).
+#: sysdeps/gnu/errlist.c:115
+msgid "Bad file descriptor"
+msgstr "Descriptor de fichero erróneo"
-#: nis/nis_error.c:67
-msgid "Error in accessing NIS+ cold start file. Is NIS+ installed?"
-msgstr "Error al acceder al fichero de comienzo frio de NIS+. ¿Está NIS+ instalado?"
+#. TRANS There are no child processes. This error happens on operations that are
+#. TRANS supposed to manipulate child processes, when there aren't any processes
+#. TRANS to manipulate.
+#: sysdeps/gnu/errlist.c:126
+msgid "No child processes"
+msgstr "No hay ningún proceso hijo"
-#: nis/nis_error.c:68
-msgid "Full resync required for directory"
-msgstr "Se necesita una resincronización completa del directorio"
+# ¿Sugerencias? em
+# ¿Evitado? sv
+# Esperemos a ver la opinión de otro. em
+#
+# ¡Ya la tienen! Creo que hay que traducir (o al menos preservar) deadlock.
+# No diría "el recurso" porque aquí "resource deadlock" significa
+# "deadlock de recursos" y un deadlock siempre se trata de más de un
+# recurso. -jtobey
+#
+# Estupendo. sv
+#
+#. TRANS Deadlock avoided; allocating a system resource would have resulted in a
+#. TRANS deadlock situation. The system does not guarantee that it will notice
+#. TRANS all such situations. This error means you got lucky and the system
+#. TRANS noticed; it might just hang. @xref{File Locks}, for an example.
+#: sysdeps/gnu/errlist.c:138
+msgid "Resource deadlock avoided"
+msgstr "Se ha evitado un bloqueo de recursos"
-#: nis/nis_error.c:69
-msgid "NIS+ operation failed"
-msgstr "Falló la operación de NIS+"
+#. TRANS No memory available. The system cannot allocate more virtual memory
+#. TRANS because its capacity is full.
+#: sysdeps/gnu/errlist.c:148
+msgid "Cannot allocate memory"
+msgstr "No se pudo asignar memoria"
-#: nis/nis_error.c:70
-msgid "NIS+ service is unavailable or not installed"
-msgstr "El servicio NIS+ no está disponible o no está instalado"
+#. TRANS Bad address; an invalid pointer was detected.
+#. TRANS In the GNU system, this error never happens; you get a signal instead.
+#: sysdeps/gnu/errlist.c:167
+msgid "Bad address"
+msgstr "Dirección incorrecta"
-# ¿¿Qué demonios es esto?? sv
-#: nis/nis_error.c:71
-msgid "Yes, 42 is the meaning of life"
-msgstr "Sí, 42 es el significado de la vida"
+#. TRANS A file that isn't a block special file was given in a situation that
+#. TRANS requires one. For example, trying to mount an ordinary file as a file
+#. TRANS system in Unix gives this error.
+#: sysdeps/gnu/errlist.c:178
+msgid "Block device required"
+msgstr "Se requiere un dispositivo de bloques"
-#: nis/nis_error.c:72
-msgid "Unable to authenticate NIS+ server"
-msgstr "No se puede autentificar el servidor NIS+"
+#. TRANS Resource busy; a system resource that can't be shared is already in use.
+#. TRANS For example, if you try to delete a file that is the root of a currently
+#. TRANS mounted filesystem, you get this error.
+#: sysdeps/gnu/errlist.c:189
+msgid "Device or resource busy"
+msgstr "Dispositivo o recurso ocupado"
-#: nis/nis_error.c:73
-msgid "Unable to authenticate NIS+ client"
-msgstr "No se puede autentificar el cliente NIS+"
+#. TRANS File exists; an existing file was specified in a context where it only
+#. TRANS makes sense to specify a new file.
+#: sysdeps/gnu/errlist.c:199
+msgid "File exists"
+msgstr "El fichero ya existe"
-#: nis/nis_error.c:74
-msgid "No file space on server"
-msgstr "No queda espacio de ficheros en el servidor"
+# ??? ver esto.
+#. TRANS An attempt to make an improper link across file systems was detected.
+#. TRANS This happens not only when you use @code{link} (@pxref{Hard Links}) but
+#. TRANS also when you rename a file with @code{rename} (@pxref{Renaming Files}).
+#: sysdeps/gnu/errlist.c:210
+msgid "Invalid cross-device link"
+msgstr "Enlace cruzado entre dispositivos no permitido"
-#: nis/nis_error.c:75
-msgid "Unable to create process on server"
-msgstr "No se puede crear el proceso en el servidor"
+#. TRANS The wrong type of device was given to a function that expects a
+#. TRANS particular sort of device.
+#: sysdeps/gnu/errlist.c:220
+msgid "No such device"
+msgstr "No existe el dispositivo"
-#: nis/nis_error.c:76
-msgid "Master server busy, full dump rescheduled."
-msgstr "El servidor maestro está ocupado, el volcado completo se postpone."
+#. TRANS A file that isn't a directory was specified when a directory is required.
+#: sysdeps/gnu/errlist.c:229
+msgid "Not a directory"
+msgstr "No es un directorio"
-#: nis/nis_local_names.c:126
-#, c-format
-msgid "LOCAL entry for UID %d in directory %s not unique\n"
-msgstr "La entrada LOCAL para el UID %d en el directorio %s no es única\n"
+#. TRANS File is a directory; you cannot open a directory for writing,
+#. TRANS or create or remove hard links to it.
+#: sysdeps/gnu/errlist.c:239
+msgid "Is a directory"
+msgstr "Es un directorio"
-#: nis/nis_print.c:51
-msgid "UNKNOWN"
-msgstr "DESCONOCIDO"
+#. TRANS Invalid argument. This is used to indicate various kinds of problems
+#. TRANS with passing the wrong argument to a library function.
+#: sysdeps/gnu/errlist.c:249
+msgid "Invalid argument"
+msgstr "Argumento inválido"
-#: nis/nis_print.c:109
-msgid "BOGUS OBJECT\n"
-msgstr "OBJETO INVÁLIDO\n"
+#. TRANS The current process has too many files open and can't open any more.
+#. TRANS Duplicate descriptors do count toward this limit.
+#. TRANS
+#. TRANS In BSD and GNU, the number of open files is controlled by a resource
+#. TRANS limit that can usually be increased. If you get this error, you might
+#. TRANS want to increase the @code{RLIMIT_NOFILE} limit or make it unlimited;
+#. TRANS @pxref{Limits on Resources}.
+#: sysdeps/gnu/errlist.c:264
+msgid "Too many open files"
+msgstr "Demasiados ficheros abiertos"
-#: nis/nis_print.c:112
-msgid "NO OBJECT\n"
-msgstr "NO HAY NINGÚN OBJETO\n"
+#. TRANS There are too many distinct file openings in the entire system. Note
+#. TRANS that any number of linked channels count as just one file opening; see
+#. TRANS @ref{Linked Channels}. This error never occurs in the GNU system.
+#: sysdeps/gnu/errlist.c:275
+msgid "Too many open files in system"
+msgstr "Demasiados ficheros abiertos en el sistema"
-#: nis/nis_print.c:115
-msgid "DIRECTORY\n"
-msgstr "DIRECTORIO\n"
+#. TRANS Inappropriate I/O control operation, such as trying to set terminal
+#. TRANS modes on an ordinary file.
+#: sysdeps/gnu/errlist.c:285
+msgid "Inappropriate ioctl for device"
+msgstr "Función ioctl no apropiada para el dispositivo"
-#: nis/nis_print.c:118
-msgid "GROUP\n"
-msgstr "GRUPO\n"
+#. TRANS An attempt to execute a file that is currently open for writing, or
+#. TRANS write to a file that is currently being executed. Often using a
+#. TRANS debugger to run a program is considered having it open for writing and
+#. TRANS will cause this error. (The name stands for ``text file busy''.) This
+#. TRANS is not an error in the GNU system; the text is copied as necessary.
+#: sysdeps/gnu/errlist.c:298
+msgid "Text file busy"
+msgstr "El fichero de texto está ocupado"
-#: nis/nis_print.c:121
-msgid "TABLE\n"
-msgstr "TABLA\n"
+#. TRANS File too big; the size of a file would be larger than allowed by the system.
+#: sysdeps/gnu/errlist.c:307
+msgid "File too large"
+msgstr "Fichero demasiado grande"
-#: nis/nis_print.c:124
-msgid "ENTRY\n"
-msgstr "ENTRADA\n"
+#. TRANS No space left on device; write operation on a file failed because the
+#. TRANS disk is full.
+#: sysdeps/gnu/errlist.c:317
+msgid "No space left on device"
+msgstr "No queda espacio en el dispositivo"
-#: nis/nis_print.c:127
-msgid "LINK\n"
-msgstr "ENLACE\n"
+# ¿"seek" no era "desplazamiento"? sv
+# Según el contexto no se puede saber a qué se refiere
+# cambio ... por no permitida em+
+# Suggestion: "Llamada a lseek() inválida" -jtobey
+# Sí, bueno, esto lo hemos traducido otras veces por desplazamiento, así
+# que lo cambio (antes era "búsqueda no permitida").
+# Como hay varias funciones de desplazamiento creo que es mejor
+# no decantarse por ninguna en particular. sv
+#. TRANS Invalid seek operation (such as on a pipe).
+#: sysdeps/gnu/errlist.c:326
+msgid "Illegal seek"
+msgstr "Desplazamiento ilegal"
-#: nis/nis_print.c:130
-msgid "PRIVATE\n"
-msgstr "PRIVADO\n"
+#. TRANS An attempt was made to modify something on a read-only file system.
+#: sysdeps/gnu/errlist.c:335
+msgid "Read-only file system"
+msgstr "Sistema de ficheros de sólo lectura"
-#: nis/nis_print.c:133
-msgid "(Unknown object)\n"
-msgstr "(Objeto desconocido)\n"
+#. TRANS Too many links; the link count of a single file would become too large.
+#. TRANS @code{rename} can cause this error if the file being renamed already has
+#. TRANS as many links as it can take (@pxref{Renaming Files}).
+#: sysdeps/gnu/errlist.c:346
+msgid "Too many links"
+msgstr "Demasiados enlaces"
-#: nis/nis_print.c:166
-#, c-format
-msgid "Name : `%s'\n"
-msgstr "Nombre : `%s'\n"
+#. TRANS Domain error; used by mathematical functions when an argument value does
+#. TRANS not fall into the domain over which the function is defined.
+#: sysdeps/gnu/errlist.c:369
+msgid "Numerical argument out of domain"
+msgstr "Argumento numérico fuera del dominio de la función"
-#: nis/nis_print.c:167
-#, c-format
-msgid "Type : %s\n"
-msgstr "Tipo : %s\n"
+#. TRANS Range error; used by mathematical functions when the result value is
+#. TRANS not representable because of overflow or underflow.
+#: sysdeps/gnu/errlist.c:379
+msgid "Numerical result out of range"
+msgstr "Resultado numérico fuera de rango"
-#: nis/nis_print.c:172
-msgid "Master Server :\n"
-msgstr "Servidor Maestro :\n"
+#. TRANS Resource temporarily unavailable; the call might work if you try again
+#. TRANS later. The macro @code{EWOULDBLOCK} is another name for @code{EAGAIN};
+#. TRANS they are always the same in the GNU C library.
+#. TRANS
+#. TRANS This error can happen in a few different situations:
+#. TRANS
+#. TRANS @itemize @bullet
+#. TRANS @item
+#. TRANS An operation that would block was attempted on an object that has
+#. TRANS non-blocking mode selected. Trying the same operation again will block
+#. TRANS until some external condition makes it possible to read, write, or
+#. TRANS connect (whatever the operation). You can use @code{select} to find out
+#. TRANS when the operation will be possible; @pxref{Waiting for I/O}.
+#. TRANS
+#. TRANS @strong{Portability Note:} In many older Unix systems, this condition
+#. TRANS was indicated by @code{EWOULDBLOCK}, which was a distinct error code
+#. TRANS different from @code{EAGAIN}. To make your program portable, you should
+#. TRANS check for both codes and treat them the same.
+#. TRANS
+#. TRANS @item
+#. TRANS A temporary resource shortage made an operation impossible. @code{fork}
+#. TRANS can return this error. It indicates that the shortage is expected to
+#. TRANS pass, so your program can try the call again later and it may succeed.
+#. TRANS It is probably a good idea to delay for a few seconds before trying it
+#. TRANS again, to allow time for other processes to release scarce resources.
+#. TRANS Such shortages are usually fairly serious and affect the whole system,
+#. TRANS so usually an interactive program should report the error to the user
+#. TRANS and return to its command loop.
+#. TRANS @end itemize
+#: sysdeps/gnu/errlist.c:416
+msgid "Resource temporarily unavailable"
+msgstr "Recurso no disponible temporalmente"
-# ¿Replicate?
-#: nis/nis_print.c:174
-msgid "Replicate :\n"
-msgstr "Replicado :\n"
+#. TRANS In the GNU C library, this is another name for @code{EAGAIN} (above).
+#. TRANS The values are always the same, on every operating system.
+#. TRANS
+#. TRANS C libraries in many older Unix systems have @code{EWOULDBLOCK} as a
+#. TRANS separate error code.
+#: sysdeps/gnu/errlist.c:429
+msgid "Operation would block"
+msgstr "La operación se bloquearía"
-#: nis/nis_print.c:175
-#, c-format
-msgid "\tName : %s\n"
-msgstr "\tNombre : %s\n"
+#. TRANS An operation that cannot complete immediately was initiated on an object
+#. TRANS that has non-blocking mode selected. Some functions that must always
+#. TRANS block (such as @code{connect}; @pxref{Connecting}) never return
+#. TRANS @code{EAGAIN}. Instead, they return @code{EINPROGRESS} to indicate that
+#. TRANS the operation has begun and will take some time. Attempts to manipulate
+#. TRANS the object before the call completes return @code{EALREADY}. You can
+#. TRANS use the @code{select} function to find out when the pending operation
+#. TRANS has completed; @pxref{Waiting for I/O}.
+#: sysdeps/gnu/errlist.c:445
+msgid "Operation now in progress"
+msgstr "Operación en curso"
-#: nis/nis_print.c:176
-msgid "\tPublic Key : "
-msgstr "\tClave Pública : "
+# Vale, pero muy poco más abajo has puesto "en curso", que me parece mejor. sv
+# Creo que prefiero dejar uno de cada. Se me ocurre si no cambiar el
+# de abajo también. em
+#. TRANS An operation is already in progress on an object that has non-blocking
+#. TRANS mode selected.
+#: sysdeps/gnu/errlist.c:455
+msgid "Operation already in progress"
+msgstr "La operación ya se está llevando a cabo"
-#: nis/nis_print.c:180
-msgid "None.\n"
-msgstr "Ninguno.\n"
+#. TRANS A file that isn't a socket was specified when a socket is required.
+#: sysdeps/gnu/errlist.c:464
+msgid "Socket operation on non-socket"
+msgstr "Operación de `socket' en un `no-socket'"
-#: nis/nis_print.c:183
-#, c-format
-msgid "Diffie-Hellmann (%d bits)\n"
-msgstr "Diffie-Hellmann (%d bits)\n"
+#. TRANS The size of a message sent on a socket was larger than the supported
+#. TRANS maximum size.
+#: sysdeps/gnu/errlist.c:474
+msgid "Message too long"
+msgstr "Mensaje demasiado largo"
-#: nis/nis_print.c:188
-#, c-format
-msgid "RSA (%d bits)\n"
-msgstr "RSA (%d bits)\n"
+#. TRANS The socket type does not support the requested communications protocol.
+#: sysdeps/gnu/errlist.c:483
+msgid "Protocol wrong type for socket"
+msgstr "Tipo de protocolo incorrecto para el `socket'"
-# Véase "Investigación y Ciencia" sv
-#: nis/nis_print.c:191
-msgid "Kerberos.\n"
-msgstr "Cerbero.\n"
+#. TRANS You specified a socket option that doesn't make sense for the
+#. TRANS particular protocol being used by the socket. @xref{Socket Options}.
+#: sysdeps/gnu/errlist.c:493
+msgid "Protocol not available"
+msgstr "Protocolo no disponible"
-#: nis/nis_print.c:194
-#, c-format
-msgid "Unknown (type = %d, bits = %d)\n"
-msgstr "Desconocido (tipo = %d, bits = %d)\n"
+#. TRANS The socket domain does not support the requested communications protocol
+#. TRANS (perhaps because the requested protocol is completely invalid).
+#. TRANS @xref{Creating a Socket}.
+#: sysdeps/gnu/errlist.c:504
+msgid "Protocol not supported"
+msgstr "Protocolo no soportado"
-#: nis/nis_print.c:205
-#, c-format
-msgid "\tUniversal addresses (%u)\n"
-msgstr "\tDirección universal (%u)\n"
+#. TRANS The socket type is not supported.
+#: sysdeps/gnu/errlist.c:513
+msgid "Socket type not supported"
+msgstr "Tipo de `socket' no soportado"
-#: nis/nis_print.c:227
-msgid "Time to live : "
-msgstr "Tiempo de vida : "
+#. TRANS The operation you requested is not supported. Some socket functions
+#. TRANS don't make sense for all types of sockets, and others may not be
+#. TRANS implemented for all communications protocols. In the GNU system, this
+#. TRANS error can happen for many calls when the object does not support the
+#. TRANS particular operation; it is a generic indication that the server knows
+#. TRANS nothing to do for that call.
+#: sysdeps/gnu/errlist.c:527
+msgid "Operation not supported"
+msgstr "La operación no está soportada"
-#: nis/nis_print.c:229
-msgid "Default Access rights :\n"
-msgstr "Derechos de acceso predeterminados :\n"
+#. TRANS The socket communications protocol family you requested is not supported.
+#: sysdeps/gnu/errlist.c:536
+msgid "Protocol family not supported"
+msgstr "Familia de protocolos no soportada"
-#: nis/nis_print.c:238
-#, c-format
-msgid "\tType : %s\n"
-msgstr "\tTipo : %s\n"
+#. TRANS The address family specified for a socket is not supported; it is
+#. TRANS inconsistent with the protocol being used on the socket. @xref{Sockets}.
+#: sysdeps/gnu/errlist.c:546
+msgid "Address family not supported by protocol"
+msgstr "Esta familia de direcciones no está soportada por el protocolo"
-#: nis/nis_print.c:239
-msgid "\tAccess rights: "
-msgstr "\tDerechos de acceso: "
+#. TRANS The requested socket address is already in use. @xref{Socket Addresses}.
+#: sysdeps/gnu/errlist.c:555
+msgid "Address already in use"
+msgstr "La dirección ya se está usando"
-#: nis/nis_print.c:252
-msgid "Group Flags :"
-msgstr "Opciones de Grupo :"
+#. TRANS The requested socket address is not available; for example, you tried
+#. TRANS to give a socket a name that doesn't match the local host name.
+#. TRANS @xref{Socket Addresses}.
+#: sysdeps/gnu/errlist.c:566
+msgid "Cannot assign requested address"
+msgstr "No se puede asignar la dirección solicitada"
-#: nis/nis_print.c:255
-msgid ""
-"\n"
-"Group Members :\n"
-msgstr ""
-"\n"
-"Miembros del Grupo :\n"
+#. TRANS A socket operation failed because the network was down.
+#: sysdeps/gnu/errlist.c:575
+msgid "Network is down"
+msgstr "La red no está activa"
-#: nis/nis_print.c:266
-#, c-format
-msgid "Table Type : %s\n"
-msgstr "Tipo de Tabla : %s\n"
+# Este no me gusta. Preferiría poner "la red es inaccesible", o al menos
+# añadirle un "es": "Es imposible conectar con la red". sv
+# En muchos mensajes he puesto el 'Es' al principio, terminaremos hablando
+# como indios si no. em
+#
+# Mira un mensaje que he puesto más arriba a ver si estás de acuerdo con
+# mi definición de "indio". sv
+#
+# Después de que me haya salido este mensaje varias veces, lo cambio.
+# Antes decía "Es imposible conectar con la red", demasiado largo. sv
+#. TRANS A socket operation failed because the subnet containing the remote host
+#. TRANS was unreachable.
+#: sysdeps/gnu/errlist.c:585
+msgid "Network is unreachable"
+msgstr "La red es inaccesible"
-#: nis/nis_print.c:267
-#, c-format
-msgid "Number of Columns : %d\n"
-msgstr "Número de Columnas : %d\n"
+#. TRANS A network connection was reset because the remote host crashed.
+#: sysdeps/gnu/errlist.c:594
+msgid "Network dropped connection on reset"
+msgstr "La conexión de red se perdió al reinicializar"
-#: nis/nis_print.c:268
-#, c-format
-msgid "Character Separator : %c\n"
-msgstr "Separador de Caracteres : %c\n"
+#. TRANS A network connection was aborted locally.
+#: sysdeps/gnu/errlist.c:603
+msgid "Software caused connection abort"
+msgstr "El programa provocó el fin de la conexión"
-#: nis/nis_print.c:269
-#, c-format
-msgid "Search Path : %s\n"
-msgstr "Ruta de búsqueda : %s\n"
+# Se aceptan sugerencias alternativas para "peer"
+# ¿Qué tal "remote machine"? ;-)
+# Prefiero la traducción. -jtobey
+# La verdad es que no se me ocurre nada mejor, así que se queda así. sv
+#. TRANS A network connection was closed for reasons outside the control of the
+#. TRANS local host, such as by the remote machine rebooting or an unrecoverable
+#. TRANS protocol violation.
+#: sysdeps/gnu/errlist.c:614
+msgid "Connection reset by peer"
+msgstr "Conexión reinicializada por la máquina remota"
-#: nis/nis_print.c:270
-msgid "Columns :\n"
-msgstr "Columnas :\n"
+# Memoria intermedia me parece una traducción óptima.
+# Desgraciadamente no tengo ningún diccionario de Castellano
+# Enrique, creo que en español existe "búfer", míralo si puedes. sv
+# ¿Buffer? memoria intermedia.
+# A ver qué dice Iñaky... sv
+#. TRANS The kernel's buffers for I/O operations are all in use. In GNU, this
+#. TRANS error is always synonymous with @code{ENOMEM}; you may get one or the
+#. TRANS other from network operations.
+#: sysdeps/gnu/errlist.c:625
+msgid "No buffer space available"
+msgstr "No queda espacio para memoria intermedia"
-#: nis/nis_print.c:273
-#, c-format
-msgid "\t[%d]\tName : %s\n"
-msgstr "\t[%d]\tNombre : %s\n"
+#. TRANS You tried to connect a socket that is already connected.
+#. TRANS @xref{Connecting}.
+#: sysdeps/gnu/errlist.c:635
+msgid "Transport endpoint is already connected"
+msgstr "El otro extremo ya está conectado"
-#: nis/nis_print.c:275
-msgid "\t\tAttributes : "
-msgstr "\t\tAtributos : "
+#. TRANS The socket is not connected to anything. You get this error when you
+#. TRANS try to transmit data over a socket, without first specifying a
+#. TRANS destination for the data. For a connectionless socket (for datagram
+#. TRANS protocols, such as UDP), you get @code{EDESTADDRREQ} instead.
+#: sysdeps/gnu/errlist.c:647
+msgid "Transport endpoint is not connected"
+msgstr "El otro extremo de la conexión no está conectado"
-#: nis/nis_print.c:277
-msgid "\t\tAccess Rights : "
-msgstr "\t\tDerechos de Acceso : "
+#. TRANS No default destination address was set for the socket. You get this
+#. TRANS error when you try to transmit data over a connectionless socket,
+#. TRANS without first specifying a destination for the data with @code{connect}.
+#: sysdeps/gnu/errlist.c:658
+msgid "Destination address required"
+msgstr "Se debe especificar la dirección de destino"
-#: nis/nis_print.c:286
-msgid "Linked Object Type : "
-msgstr "Tipo de objeto enlazado : "
+#. TRANS The socket has already been shut down.
+#: sysdeps/gnu/errlist.c:667
+msgid "Cannot send after transport endpoint shutdown"
+msgstr "No se puede enviar tras la destrucción del punto de destino"
-#: nis/nis_print.c:288
-#, c-format
-msgid "Linked to : %s\n"
-msgstr "Enlazado a : %s\n"
+# FUZZY
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:676
+msgid "Too many references: cannot splice"
+msgstr "Demasiadas referencias: no se pueden solapar"
-#: nis/nis_print.c:297
-#, c-format
-msgid "\tEntry data of type %s\n"
-msgstr "\tEntrada de tipo %s\n"
+#. TRANS A socket operation with a specified timeout received no response during
+#. TRANS the timeout period.
+#: sysdeps/gnu/errlist.c:686
+msgid "Connection timed out"
+msgstr "Expiró el tiempo de conexión"
-#: nis/nis_print.c:300
-#, c-format
-msgid "\t[%u] - [%u bytes] "
-msgstr "\t[%u] - [%u bytes] "
+#. TRANS A remote host refused to allow the network connection (typically because
+#. TRANS it is not running the requested service).
+#: sysdeps/gnu/errlist.c:696
+msgid "Connection refused"
+msgstr "Conexión rehusada"
-#: nis/nis_print.c:303
-msgid "Encrypted data\n"
-msgstr "Datos cifrados\n"
+#. TRANS Too many levels of symbolic links were encountered in looking up a file name.
+#. TRANS This often indicates a cycle of symbolic links.
+#: sysdeps/gnu/errlist.c:706
+msgid "Too many levels of symbolic links"
+msgstr "Demasiados niveles de enlaces simbólicos"
-#: nis/nis_print.c:305
-msgid "Binary data\n"
-msgstr "Datos binarios\n"
+#. TRANS Filename too long (longer than @code{PATH_MAX}; @pxref{Limits for
+#. TRANS Files}) or host name too long (in @code{gethostname} or
+#. TRANS @code{sethostname}; @pxref{Host Identification}).
+#: sysdeps/gnu/errlist.c:717
+msgid "File name too long"
+msgstr "Nombre de fichero demasiado largo"
-#: nis/nis_print.c:320
-#, c-format
-msgid "Object Name : %s\n"
-msgstr "Nombre del Objeto : %s\n"
+# La palabra "host" es delicada.
+# En spanglish algunos la traducen por "anfitrión".
+#
+# Enrique considera equívoca la propia palabra host.
+# [ A un huésped también se le llama "host" ].
+#
+# En este fichero .po he decidido ser cauto y de momento la dejaré sin
+# traducir. De acuerdo con nuestra costumbre, cuando una palabra no nos
+# atrevemos a traducirla la encerramos entre apóstrofos: `host'
+#
+#. TRANS The remote host for a requested network connection is down.
+#: sysdeps/gnu/errlist.c:726
+msgid "Host is down"
+msgstr "El `host' no está operativo"
-#: nis/nis_print.c:321
-#, c-format
-msgid "Directory : %s\n"
-msgstr "Directorio : %s\n"
+#. TRANS The remote host for a requested network connection is not reachable.
+#: sysdeps/gnu/errlist.c:735
+msgid "No route to host"
+msgstr "No existe ninguna ruta hasta el `host'"
-#: nis/nis_print.c:322
-#, c-format
-msgid "Owner : %s\n"
-msgstr "Propietario : %s\n"
+#. TRANS Directory not empty, where an empty directory was expected. Typically,
+#. TRANS this error occurs when you are trying to delete a directory.
+#: sysdeps/gnu/errlist.c:745
+msgid "Directory not empty"
+msgstr "El directorio no está vacío"
-#: nis/nis_print.c:323
-#, c-format
-msgid "Group : %s\n"
-msgstr "Grupo : %s\n"
+#. TRANS This means that the per-user limit on new process would be exceeded by
+#. TRANS an attempted @code{fork}. @xref{Limits on Resources}, for details on
+#. TRANS the @code{RLIMIT_NPROC} limit.
+#: sysdeps/gnu/errlist.c:756
+msgid "Too many processes"
+msgstr "Demasiados procesos"
-#: nis/nis_print.c:324
-msgid "Access Rights : "
-msgstr "Derechos de acceso : "
+#. TRANS The file quota system is confused because there are too many users.
+#. TRANS @c This can probably happen in a GNU system when using NFS.
+#: sysdeps/gnu/errlist.c:766
+msgid "Too many users"
+msgstr "Demasiados usuarios"
-#: nis/nis_print.c:326
-#, c-format
-msgid ""
-"\n"
-"Time to Live : "
-msgstr ""
-"\n"
-"Tiempo de Vida : "
+#. TRANS The user's disk quota was exceeded.
+#: sysdeps/gnu/errlist.c:775
+msgid "Disk quota exceeded"
+msgstr "Se ha excedido la cuota de disco"
-#: nis/nis_print.c:329
-#, c-format
-msgid "Creation Time : %s"
-msgstr "Fecha de creación : %s"
+# ?? sugerencias ?
+# Habrá que traducir el "handle" de alguna forma... sv
+# No veo porqué. em
+# ¿No puede un fichero tener varios `handles'
+# y que unos estén bloqueados y otros no? sv
+# En efecto la traducción es incorrecta, el uso de file handle
+# en vez de file descriptor, debe ser porque nos referimos a ficheros
+# compartidos con NFS. Al igual que no se bloquean, sino que se stalan :)
+#
+# Suggestion: stale->vencido. No me gusta "bloqueado" porque el
+# remedio necesita una acción, y "bloqueado" sugiere esperar.
+# No me gusta "fichero" simplemente, pues el fichero estará perfectamente
+# bien; lo que se venció es el "handle" o sea el número o nombre que
+# nos da acceso al fichero. Habrá que traducir el "handle", como dijo sv.
+# -jtobey
+#
+# Muy bien, he buscado "stale" y por lo que parece es algo que "caduca"
+# o que "vence", como las letras comerciales. Me he decidido por "en desuso".
+#
+#. TRANS Stale NFS file handle. This indicates an internal confusion in the NFS
+#. TRANS system which is due to file system rearrangements on the server host.
+#. TRANS Repairing this condition usually requires unmounting and remounting
+#. TRANS the NFS file system on the local host.
+#: sysdeps/gnu/errlist.c:787
+msgid "Stale NFS file handle"
+msgstr "`handle' de fichero NFS en desuso"
-#: nis/nis_print.c:331
-#, c-format
-msgid "Mod. Time : %s"
-msgstr "Fecha de modificación: %s"
+#. TRANS An attempt was made to NFS-mount a remote file system with a file name that
+#. TRANS already specifies an NFS-mounted file.
+#. TRANS (This is an error on some operating systems, but we expect it to work
+#. TRANS properly on the GNU system, making this error code impossible.)
+#: sysdeps/gnu/errlist.c:799
+msgid "Object is remote"
+msgstr "El objeto es remoto"
-#: nis/nis_print.c:332
-msgid "Object Type : "
-msgstr "Tipo del Objeto : "
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:808
+msgid "RPC struct is bad"
+msgstr "la estructura RPC es incorrecta"
-#: nis/nis_print.c:352
-#, c-format
-msgid " Data Length = %u\n"
-msgstr " Longitud de los datos = %u\n"
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:817
+msgid "RPC version wrong"
+msgstr "versión de RPC incorrecta"
-#: nis/nis_print.c:365
-#, c-format
-msgid "Status : %s\n"
-msgstr "Estado : %s\n"
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:826
+msgid "RPC program not available"
+msgstr "Programa RPC no disponible"
-#: nis/nis_print.c:366
-#, c-format
-msgid "Number of objects : %u\n"
-msgstr "Número de objetos : %u\n"
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:835
+msgid "RPC program version wrong"
+msgstr "Versión del programa RPC incorrecta"
-# Tal vez habría que poner núm en vez de #. sv
-#: nis/nis_print.c:370
-#, c-format
-msgid "Object #%d:\n"
-msgstr "Objeto #%d:\n"
+# ## qué horror
+# ## Pues mira, quizá añadiendo dos puntos después del RPC mejoraría algo:
+# ## "RPC: procedimiento erróneo..." sv
+# FIXME -> Comunicarlo al autor.
+# En inglés podría quedar también mejor.
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:844
+msgid "RPC bad procedure for program"
+msgstr "RPC: procedimiento erróneo para el programa"
-#: nis/nis_print_group_entry.c:115
-#, c-format
-msgid "Group entry for \"%s.%s\" group:\n"
-msgstr "Entrada de grupo para el grupo \"%s.%s\"\n"
+# Ojo: ¿Solamente los ficheros se pueden bloquear?
+# Propondría: "No quedan bloqueos disponibles" o algo así. sv
+#
+# Efectivamente puede que tengas razón, pero ...
+# los dispositivos en UNIX son siempre ficheros /dev :) em
+#
+# Lo sé, lo sé, pero: Cuando bloqueas /dev/cua3, ¿dices que estás bloqueando un
+# fichero o que estás bloqueando el módem, que es un dispositivo? sv
+# Decir ficheros podría traer equívocos, por más que formalmente todos
+# lo sean. sv
+#
+# ¿Y qué se te ocurre?, ¿poner bloquear ficheros/dispositivos? em
+#
+# ( Pues mira, no estaría mal. sv )
+#
+# no quedan bloqueos me parece que no colabora a entender nada. em
+# Miro la versión alemana.
+# ??? ¿locks? ¿cómo diablos?
+#. TRANS No locks available. This is used by the file locking facilities; see
+#. TRANS @ref{File Locks}. This error is never generated by the GNU system, but
+#. TRANS it can result from an operation to an NFS server running another
+#. TRANS operating system.
+#: sysdeps/gnu/errlist.c:856
+msgid "No locks available"
+msgstr "No se pueden bloquear más ficheros"
-#: nis/nis_print_group_entry.c:123
-msgid " Explicit members:\n"
-msgstr " Miembros explícitos:\n"
+#. TRANS Inappropriate file type or format. The file was the wrong type for the
+#. TRANS operation, or a data file had the wrong format.
+#. TRANS
+#. TRANS On some systems @code{chmod} returns this error if you try to set the
+#. TRANS sticky bit on a non-directory file; @pxref{Setting Permissions}.
+#: sysdeps/gnu/errlist.c:869
+msgid "Inappropriate file type or format"
+msgstr "Formato o tipo de fichero no apropiado"
-#: nis/nis_print_group_entry.c:128
-msgid " No explicit members\n"
-msgstr " No hay ningún miembro explícito\n"
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:878
+msgid "Authentication error"
+msgstr "Error de autentificación"
-#: nis/nis_print_group_entry.c:131
-msgid " Implicit members:\n"
-msgstr " Miembros implícitos:\n"
+#. TRANS ???
+#: sysdeps/gnu/errlist.c:887
+msgid "Need authenticator"
+msgstr "Se necesita un autentificador"
-#: nis/nis_print_group_entry.c:136
-msgid " No implicit members\n"
-msgstr " No hay ningún miembro implícito\n"
+#. TRANS Function not implemented. This indicates that the function called is
+#. TRANS not implemented at all, either in the C library itself or in the
+#. TRANS operating system. When you get this error, you can be sure that this
+#. TRANS particular function will always fail with @code{ENOSYS} unless you
+#. TRANS install a new version of the C library or the operating system.
+#: sysdeps/gnu/errlist.c:900
+msgid "Function not implemented"
+msgstr "Función no implementada"
-#: nis/nis_print_group_entry.c:139
-msgid " Recursive members:\n"
-msgstr " Miembros recursivos:\n"
+#. TRANS Not supported. A function returns this error when certain parameter
+#. TRANS values are valid, but the functionality they request is not available.
+#. TRANS This can mean that the function does not implement a particular command
+#. TRANS or option value or flag bit at all. For functions that operate on some
+#. TRANS object given in a parameter, such as a file descriptor or a port, it
+#. TRANS might instead mean that only @emph{that specific object} (file
+#. TRANS descriptor, port, etc.) is unable to support the other parameters given;
+#. TRANS different file descriptors might support different ranges of parameter
+#. TRANS values.
+#. TRANS
+#. TRANS If the entire function is not available at all in the implementation,
+#. TRANS it returns @code{ENOSYS} instead.
+#: sysdeps/gnu/errlist.c:920
+msgid "Not supported"
+msgstr "No soportado"
-#: nis/nis_print_group_entry.c:144
-msgid " No recursive members\n"
-msgstr " No hay ningún miembro recursivo\n"
+#. TRANS While decoding a multibyte character the function came along an invalid
+#. TRANS or an incomplete sequence of bytes or the given wide character is invalid.
+#: sysdeps/gnu/errlist.c:930
+msgid "Invalid or incomplete multibyte or wide character"
+msgstr "El carácter multibyte o extendido está incompleto o es inválido"
-#: nis/nis_print_group_entry.c:147 nis/nis_print_group_entry.c:163
-msgid " Explicit nonmembers:\n"
-msgstr " No-miembros explícitos:\n"
+# Habrá que ver a qué se refiere.
+#
+# Si le pones el "es", ponle el "La" al principio.
+# O no le pongas ninguno de los dos, si no es realmente necesario.
+# Creo que no es malo que una oración no tenga verbo, pero si lo tiene
+# debe ser una oración completa. Me explico:
+# 1 "operación no válida" sería admisible.
+# 2 "operación no es válida" suena completamente a indio (inadmisible).
+# 3 "la operación no es válida" es mucho mejor que 2, pero no siempre
+# es mejor que 1. sv
+#
+# En este caso, creo que sobran el "La" y el "es". Por eso le he quitado
+# el "es". sv
+#. TRANS In the GNU system, servers supporting the @code{term} protocol return
+#. TRANS this error for certain operations when the caller is not in the
+#. TRANS foreground process group of the terminal. Users do not usually see this
+#. TRANS error because functions such as @code{read} and @code{write} translate
+#. TRANS it into a @code{SIGTTIN} or @code{SIGTTOU} signal. @xref{Job Control},
+#. TRANS for information on process groups and these signals.
+#: sysdeps/gnu/errlist.c:944
+msgid "Inappropriate operation for background process"
+msgstr "Operación no válida para un proceso en segundo plano"
-#: nis/nis_print_group_entry.c:152
-msgid " No explicit nonmembers\n"
-msgstr " No hay ningún no-miembro explícito\n"
+# Requiescant in pace. ¿de verdad lo vas a dejar así? :-) sv
+# Creí que el traductor eras tú. cuídate, oye.
+# Lo siento pero no se me ocurre nada en su lugar. sv
+#
+# Tengo que mirar los fuentes, de esto y de muchas otras cosas
+# todo esta en mi disco duro en mi ordenador roto. em
+#
+# Uds. han usado "terminado" para "killed"... ¿qué les parece
+# "Se terminó el traductor"? -jtobey
+#
+# Muy bien, pero lo pongo en pretérito perfecto. sv
+#
+#. TRANS In the GNU system, opening a file returns this error when the file is
+#. TRANS translated by a program and the translator program dies while starting
+#. TRANS up, before it has connected to the file.
+#: sysdeps/gnu/errlist.c:955
+msgid "Translator died"
+msgstr "El traductor ha terminado"
-#: nis/nis_print_group_entry.c:155
-msgid " Implicit nonmembers:\n"
-msgstr " No-miembros implícitos:\n"
+#. TRANS The experienced user will know what is wrong.
+#. TRANS @c This error code is a joke. Its perror text is part of the joke.
+#. TRANS @c Don't change it.
+#: sysdeps/gnu/errlist.c:966
+msgid "?"
+msgstr "?"
-#: nis/nis_print_group_entry.c:160
-msgid " No implicit nonmembers\n"
-msgstr " No hay ningún no-miembro implícito\n"
+# ?? Ni idea de como traducir esto
+# "Ciertamente expiraste durante este tiempo" em
+# this time es esta *vez* Pero como no acabo de verle el sentido a la frase
+# prefiero que no corramos el riesgo. sv
+# Sin fuentes no se puede hacer. Cogeré la traducción de Ulrich Drepper
+# al alemán, no sé cómo no se me había ocurrido antes. em
+# Muy buena idea. Suerte que tenemos un coordinador que sabe alemán :-) sv
+# El problema es que la 1.10.1 no esta disponible todavía. Le he mandado un
+# mail para que me envíe lo que tenga hecho. em
+# Ok, traducido exactamente igual que lo tiene Jochen. Es ist keine Schuld
+# von mir wenn es gar nicht stimmt.
+#
+# Sugerencia: "Ahora sí que te lo has cargado". sv+
+# (Preguntar a nuestros amigos americanos si se entiende).
+# (Es que me suena que "blew" no es muy fino, por eso romper es
+# demasiado suave).
+#
+#. TRANS You did @strong{what}?
+#: sysdeps/gnu/errlist.c:975
+msgid "You really blew it this time"
+msgstr "Esta vez sí que lo has roto"
-#: nis/nis_print_group_entry.c:168
-msgid " No recursive nonmembers\n"
-msgstr " No hay ningún no-miembro recursivo\n"
+# ¿qué diablos es esto?, esperemos a tener las fuentes
+# estupendo, este error parece mostrarse en dos ocasiones
+# - Macro: int EIEIO
+# Go home and have a glass of warm, dairy-fresh milk.
+# Jochen tambien lo traduce así. em
+#
+# Okay. Since you are dying to know, I'll tell you.
+# This is a joke, obviously. There is a children's song which begins,
+# "Old McDonald had a farm, e-i-e-i-o." Every time I see the (real)
+# errno macro EIO, I think about that song. Probably most of my
+# compatriots who program on Unix do, too. One of them must have stayed
+# up a little too late one night and decided to add it to Hurd or Glibc.
+# Whoever did it should be castigated, but it made me laugh.
+# --jtobey@channel1.com
+#
+# "bought the farm" means "died". -jtobey
+#
+# Bueno, pues después de pensarlo mucho, he seguido el ejemplo de la
+# traducción francesa (traducción libre). sv
+#. TRANS Go home and have a glass of warm, dairy-fresh milk.
+#: sysdeps/gnu/errlist.c:984
+msgid "Computer bought the farm"
+msgstr "Anda, vete a casa y tómate un vasito de leche"
-#: nis/nss_nisplus/nisplus-publickey.c:101
-#: nis/nss_nisplus/nisplus-publickey.c:182
-#, c-format
-msgid "DES entry for netname %s not unique\n"
-msgstr "La entrada DES para el nombre %s no es única\n"
+#. TRANS This error code has no purpose.
+#: sysdeps/gnu/errlist.c:993
+msgid "Gratuitous error"
+msgstr "Error injustificado"
-#: nis/nss_nisplus/nisplus-publickey.c:218
-#, c-format
-msgid "netname2user: missing group id list in `%s'."
-msgstr "netname2user: falta la lista de ids de grupo en `%s'."
+#: sysdeps/gnu/errlist.c:1001
+msgid "Bad message"
+msgstr "Mensaje erróneo"
-#: nis/nss_nisplus/nisplus-publickey.c:300
-#: nis/nss_nisplus/nisplus-publickey.c:306
-#: nis/nss_nisplus/nisplus-publickey.c:370
-#: nis/nss_nisplus/nisplus-publickey.c:379
-#, c-format
-msgid "netname2user: (nis+ lookup): %s\n"
-msgstr "netname2user: (búsqueda nis+): %s\n"
+#: sysdeps/gnu/errlist.c:1009
+msgid "Identifier removed"
+msgstr "El identificador se ha eliminado"
-#: nis/nss_nisplus/nisplus-publickey.c:319
-#, c-format
-msgid "netname2user: DES entry for %s in directory %s not unique"
-msgstr "netname2user: la entrada DES para %s en el directorio %s no es única"
+# FUZZY em+
+# No tengo ni idea de qué es un HOP
+# este error, que ya lo vi en errno no
+# lo encuentro documentado
+# "Hop" es "saltito", por ej. un enlace directo que es parte de la ruta
+# entre dos máquinas. --jtobey
+#: sysdeps/gnu/errlist.c:1017
+msgid "Multihop attempted"
+msgstr "Se ha intentado un `multihop'"
-#: nis/nss_nisplus/nisplus-publickey.c:337
-#, c-format
-msgid "netname2user: principal name `%s' too long"
-msgstr "netname2user: el nombre principal `%s' es demasiado largo"
+#: sysdeps/gnu/errlist.c:1025
+msgid "No data available"
+msgstr "No hay datos disponibles"
-#: nis/nss_nisplus/nisplus-publickey.c:392
-#, c-format
-msgid "netname2user: LOCAL entry for %s in directory %s not unique"
-msgstr "netname2user: la entrada LOCAL para %s en el directorio %s no es única"
+#: sysdeps/gnu/errlist.c:1033
+msgid "Link has been severed"
+msgstr "El enlace se ha cortado"
-#: nis/nss_nisplus/nisplus-publickey.c:399
-msgid "netname2user: should not have uid 0"
-msgstr "netname2user: no debería tener uid 0"
+#: sysdeps/gnu/errlist.c:1041
+msgid "No message of desired type"
+msgstr "Ningún mensaje del tipo deseado"
-#: nis/ypclnt.c:171
-#, c-format
-msgid "YPBINDPROC_DOMAIN: %s\n"
-msgstr "YPBINDPROC_DOMAIN: %s\n"
+# FIXME: Este mensaje debería ser igual al anterior. sv
+#: sysdeps/gnu/errlist.c:1049
+msgid "Out of streams resources"
+msgstr "Alcanzado el límite de recursos de `streams'"
-#: nis/ypclnt.c:780
-msgid "Request arguments bad"
-msgstr "Los argumentos de la petición son incorrectos"
+# FUZZY
+# Tal vez "de flujo", pero no sé si me atrevo... sv
+#: sysdeps/gnu/errlist.c:1057
+msgid "Device not a stream"
+msgstr "El dispositivo no es un `stream'"
-#: nis/ypclnt.c:782
-msgid "RPC failure on NIS operation"
-msgstr "Fallo RPC en una operación NIS"
+#: sysdeps/gnu/errlist.c:1065
+msgid "Value too large for defined data type"
+msgstr "Valor demasiado grande para el tipo de datos definido"
-#: nis/ypclnt.c:784
-msgid "Can't bind to server which serves this domain"
-msgstr "Ha fallado la llamada a bind() con el servidor que sirve a este dominio"
+#: sysdeps/gnu/errlist.c:1073
+msgid "Protocol error"
+msgstr "Error de protocolo"
-#: nis/ypclnt.c:786
-msgid "No such map in server's domain"
-msgstr "No existe esa tabla en el dominio del servidor"
+#: sysdeps/gnu/errlist.c:1081
+msgid "Timer expired"
+msgstr "El temporizador llegó al final"
-#: nis/ypclnt.c:788
-msgid "No such key in map"
-msgstr "No existe esta clave en la tabla"
+#. TRANS Operation canceled; an asynchronous operation was canceled before it
+#. TRANS completed. @xref{Asynchronous I/O}. When you call @code{aio_cancel},
+#. TRANS the normal result is for the operations affected to complete with this
+#. TRANS error; @pxref{Cancel AIO Operations}.
+#: sysdeps/gnu/errlist.c:1093
+msgid "Operation canceled"
+msgstr "Operación cancelada"
-#: nis/ypclnt.c:790
-msgid "Internal NIS error"
-msgstr "Error interno de NIS"
+# FUZZY
+#: sysdeps/gnu/errlist.c:1101
+msgid "Interrupted system call should be restarted"
+msgstr "La llamada al sistema interrumpida debería volverse a iniciar"
-#: nis/ypclnt.c:792
-msgid "Local resource allocation failure"
-msgstr "La asignación de recursos locales ha fallado"
+#: sysdeps/gnu/errlist.c:1109
+msgid "Channel number out of range"
+msgstr "Número de canal fuera de rango"
-#: nis/ypclnt.c:794
-msgid "No more records in map database"
-msgstr "No hay más registros en la base de datos"
+#: sysdeps/gnu/errlist.c:1117
+msgid "Level 2 not synchronized"
+msgstr "Nivel 2 no sincronizado"
-#: nis/ypclnt.c:796
-msgid "Can't communicate with portmapper"
-msgstr "No se puede comunicar con el asignador de puertos"
+#: sysdeps/gnu/errlist.c:1125
+msgid "Level 3 halted"
+msgstr "Nivel 3 detenido"
-#: nis/ypclnt.c:798
-msgid "Can't communicate with ypbind"
-msgstr "No se puede establecer comunicación con `ypbind'"
+#: sysdeps/gnu/errlist.c:1133
+msgid "Level 3 reset"
+msgstr "Nivel 3 restablecido"
-#: nis/ypclnt.c:800
-msgid "Can't communicate with ypserv"
-msgstr "No se puede establecer comunicación con `ypserv'"
+#: sysdeps/gnu/errlist.c:1141
+msgid "Link number out of range"
+msgstr "Número de enlace fuera de rango"
-#: nis/ypclnt.c:802
-msgid "Local domain name not set"
-msgstr "No se ha establecido el nombre del dominio local"
+#: sysdeps/gnu/errlist.c:1149
+msgid "Protocol driver not attached"
+msgstr "Protocolo no disponible"
-#: nis/ypclnt.c:804
-msgid "NIS map database is bad"
-msgstr "La base de datos de la tabla NIS no es correcta"
+# FIXME: ¿No sería más bien CSI structures?
+#: sysdeps/gnu/errlist.c:1157
+msgid "No CSI structure available"
+msgstr "No quedan estructuras CSI disponibles"
-#: nis/ypclnt.c:806
-msgid "NIS client/server version mismatch - can't supply service"
-msgstr ""
-"Discordancia en las versiones de NIS del cliente y el servidor.\n"
-"No se puede suministrar el servicio."
+#: sysdeps/gnu/errlist.c:1165
+msgid "Level 2 halted"
+msgstr "Nivel 2 detenido"
-#: nis/ypclnt.c:810
-msgid "Database is busy"
-msgstr "La base de datos está ocupada"
+#: sysdeps/gnu/errlist.c:1173
+msgid "Invalid exchange"
+msgstr "Intercambio inválido"
-#: nis/ypclnt.c:812
-msgid "Unknown NIS error code"
-msgstr "Error de NIS desconocido"
+#: sysdeps/gnu/errlist.c:1181
+msgid "Invalid request descriptor"
+msgstr "El descriptor de fichero solicitado es erróneo"
-# Suggestion: Como es "internal" deberías poner "interno" para
-# indicar que el bug está en la biblioteca y no necesariamente
-# en el programa. Es lo que más importa dar a entender. Propongo
-# "Error interno en ypbind" -jtobey
-# De acuerdo.
-# [ Antes decía ... la llamada a bind para el servicio de páginas amarillas ]
-# Un poco demasiado explicativo. sv
-#: nis/ypclnt.c:854
-msgid "Internal ypbind error"
-msgstr "Error interno en ypbind"
+# FUZZY em+
+#: sysdeps/gnu/errlist.c:1189
+msgid "Exchange full"
+msgstr "Intercambio lleno"
# FUZZY
-#: nis/ypclnt.c:856
-msgid "Domain not bound"
-msgstr "No se pudo conectar con el dominio"
+# anode o catode :), qué diablos ? em+
+#
+# Pongo esto provisionalmente, en electricidad se usan los términos
+# ánodo y cátodo para los polos positivo y negativo, pero no sé
+# si esto será lo mismo.
+# De cualquier forma, mantengo el FUZZY por si sale algo mejor. sv+
+#: sysdeps/gnu/errlist.c:1197
+msgid "No anode"
+msgstr "No hay ningún ánodo"
-#: nis/ypclnt.c:858
-msgid "System resource allocation failure"
-msgstr "Fallo en la asignación de recursos del sistema"
+#: sysdeps/gnu/errlist.c:1205
+msgid "Invalid request code"
+msgstr "Código de petición incorrecto"
-#: nis/ypclnt.c:860
-msgid "Unknown ypbind error"
-msgstr "Error desconocido en la llamada a `ypbind()'"
+# ¿Ranura no válida?, creo que no hay traducción para slot :) em+
+# Antes: `slot' incorrecto
+#: sysdeps/gnu/errlist.c:1213
+msgid "Invalid slot"
+msgstr "Ranura inválida"
-#: nis/ypclnt.c:899
-msgid "yp_update: cannot convert host to netname\n"
-msgstr "yp_update: no se puede convertir el nombre del `host' a nombre de red\n"
+# FUZZY em+
+#: sysdeps/gnu/errlist.c:1221
+msgid "File locking deadlock error"
+msgstr "error `deadlock' de bloqueo de ficheros"
-#: nis/ypclnt.c:911
-msgid "yp_update: cannot get server address\n"
-msgstr "yp_update: no se puede encontrar la dirección del servidor\n"
+#: sysdeps/gnu/errlist.c:1229
+msgid "Bad font file format"
+msgstr "Formato de fichero fuente incorrecto"
-#: nscd/cache.c:94
-msgid "while allocating hash table entry"
-msgstr "al asignar espacio para la entrada en la tabla `hash'"
+#: sysdeps/gnu/errlist.c:1237
+msgid "Machine is not on the network"
+msgstr "La máquina no está en red"
-#: nscd/cache.c:162 nscd/connections.c:184
-#, c-format
-msgid "cannot stat() file `%s': %s"
-msgstr "no se puede ejecutar stat() sobre el fichero `%s': %s"
+#: sysdeps/gnu/errlist.c:1245
+msgid "Package not installed"
+msgstr "El paquete no está instalado"
-#: nscd/connections.c:150
-msgid "Cannot run nscd in secure mode as unprivileged user"
-msgstr "No se puede ejecutar nscd en modo seguro como usuario no privilegiado"
+# FUZZY
+# Lo dejo fuzzy aposta, a ver qué se os ocurre em+
+# Pues mira, advertencia es warning, advertise es anunciar.
+# De momento lo cambio. sv
+#: sysdeps/gnu/errlist.c:1253
+msgid "Advertise error"
+msgstr "Error de anuncio"
-#: nscd/connections.c:172
-#, c-format
-msgid "while allocating cache: %s"
-msgstr "al asignar espacio para el caché: %s"
+#: sysdeps/gnu/errlist.c:1261
+msgid "Srmount error"
+msgstr "Error de `srmount'"
-#: nscd/connections.c:197
-#, c-format
-msgid "cannot open socket: %s"
-msgstr "no se puede abrir el `socket': %s"
+#: sysdeps/gnu/errlist.c:1269
+msgid "Communication error on send"
+msgstr "Error de comunicación al enviar"
-#: nscd/connections.c:215
-#, c-format
-msgid "cannot enable socket to accept connections: %s"
-msgstr "no se puede activar el `socket' para aceptar conexiones: %s"
+#: sysdeps/gnu/errlist.c:1277
+msgid "RFS specific error"
+msgstr "error específico de RFS"
-#: nscd/connections.c:260
-#, c-format
-msgid "cannot handle old request version %d; current version is %d"
-msgstr ""
-"no se pueden manejar peticiones de la versión %d, la versión\n"
-"actual es %d"
+#: sysdeps/gnu/errlist.c:1285
+msgid "Name not unique on network"
+msgstr "El nombre no es único en la red"
-#: nscd/connections.c:298 nscd/connections.c:324
-#, c-format
-msgid "cannot write result: %s"
-msgstr "no se puede escribir el resultado: %s"
+#: sysdeps/gnu/errlist.c:1293
+msgid "File descriptor in bad state"
+msgstr "Descriptor de fichero en mal estado"
-#: nscd/connections.c:392 nscd/connections.c:514
-#, c-format
-msgid "error getting caller's id: %s"
-msgstr "error al obtener el id de los llamantes: %s"
+#: sysdeps/gnu/errlist.c:1301
+msgid "Remote address changed"
+msgstr "La dirección remota ha cambiado"
-#: nscd/connections.c:485
-#, c-format
-msgid "while accepting connection: %s"
-msgstr "al aceptar la conexión: %s"
+#: sysdeps/gnu/errlist.c:1309
+msgid "Can not access a needed shared library"
+msgstr "No se puede acceder a una biblioteca compartida necesaria"
-#: nscd/connections.c:498
-#, c-format
-msgid "short read while reading request: %s"
-msgstr "lectura insuficiente mientras se leía la petición: %s"
+#: sysdeps/gnu/errlist.c:1317
+msgid "Accessing a corrupted shared library"
+msgstr "Accediendo a una biblioteca compartida que está corrompida"
-#: nscd/connections.c:542
-#, c-format
-msgid "key length in request too long: %d"
-msgstr "la longitud de la clave en la petición es demasiado larga: %d"
+#: sysdeps/gnu/errlist.c:1325
+msgid ".lib section in a.out corrupted"
+msgstr "la sección .lib en el a.out está corrompida"
-#: nscd/connections.c:556
-#, c-format
-msgid "short read while reading request key: %s"
-msgstr "se acabaron los datos mientras se leía la clave de petición: %s"
+# Suggestion: "enlazar demasiadas bibliotecas en el ejecutable"
+# "link in" es verbo transitivo. --jtobey@channel1.com
+# Muy bien, me como lo del ejecutable para no alargar demasiado
+# el mensaje, pues creo que por el contexto el usuario sabrá a qué
+# se refiere. De paso, lo pongo en pasado (se intentaron) porque
+# es un error sobre algo que ya ha ocurrido (el intento fallido). sv
+#: sysdeps/gnu/errlist.c:1333
+msgid "Attempting to link in too many shared libraries"
+msgstr "Se intentaron enlazar demasiadas bibliotecas compartidas"
-#: nscd/connections.c:566
-#, c-format
-msgid "handle_request: request received (Version = %d) from PID %ld"
-msgstr "handle_request: petición recibida (Versión = %d) del PID %ld"
+#: sysdeps/gnu/errlist.c:1341
+msgid "Cannot exec a shared library directly"
+msgstr "No se puede ejecutar una biblioteca compartida directamente"
-#: nscd/connections.c:571
-#, c-format
-msgid "handle_request: request received (Version = %d)"
-msgstr "handle_request: petición recibida (Versión = %d)"
+# FUZZY FUZZY
+# ¡ Esto no hay quien lo traduzca ! em+
+#: sysdeps/gnu/errlist.c:1349
+msgid "Streams pipe error"
+msgstr "Error de tubería de `streams'"
-#: nscd/connections.c:635 nscd/connections.c:636 nscd/connections.c:655
-#: nscd/connections.c:668 nscd/connections.c:674 nscd/connections.c:681
-#, c-format
-msgid "Failed to run nscd as user '%s'"
-msgstr "Fallo al ejecutar nscd como usuario `%s'"
+# FUZZY
+# O me cojo otras traducciones o ando perdido em+
+#: sysdeps/gnu/errlist.c:1357
+msgid "Structure needs cleaning"
+msgstr "La estructura necesita una limpieza"
-#: nscd/connections.c:656
-msgid "getgrouplist failed"
-msgstr "falló `getgrouplist'"
+#: sysdeps/gnu/errlist.c:1365
+msgid "Not a XENIX named type file"
+msgstr "No es un fichero XENIX del tipo `named'"
-#: nscd/connections.c:669
-msgid "setgroups failed"
-msgstr "falló `setgroups'"
+#: sysdeps/gnu/errlist.c:1373
+msgid "No XENIX semaphores available"
+msgstr "No quedan semáforos XENIX disponibles"
-#: nscd/grpcache.c:103 nscd/hstcache.c:111 nscd/pwdcache.c:109
-msgid "while allocating key copy"
-msgstr "al asignar espacio para la copia de la clave"
+# FUZZY em+
+# ¿Será esto un `named pipe'? ¿cómo se traduce?
+#: sysdeps/gnu/errlist.c:1381
+msgid "Is a named type file"
+msgstr "Es un fichero de tipo `named'"
-#: nscd/grpcache.c:153 nscd/hstcache.c:168 nscd/pwdcache.c:146
-msgid "while allocating cache entry"
-msgstr "al asignar espacio para la entrada en el caché"
+#: sysdeps/gnu/errlist.c:1389
+msgid "Remote I/O error"
+msgstr "Error de E/S en la máquina remota"
-#: nscd/grpcache.c:197 nscd/hstcache.c:283 nscd/pwdcache.c:193
-#, c-format
-msgid "short write in %s: %s"
-msgstr "escritura insuficiente en %s: %s"
+#: sysdeps/gnu/errlist.c:1397
+msgid "No medium found"
+msgstr "No se ha encontrado el medio"
-#: nscd/grpcache.c:219
-#, c-format
-msgid "Haven't found \"%s\" in group cache!"
-msgstr "No se ha encontrado \"%s\" en el caché de grupos"
+#: sysdeps/gnu/errlist.c:1405
+msgid "Wrong medium type"
+msgstr "Tipo de medio erróneo"
-#: nscd/grpcache.c:285
-#, c-format
-msgid "Invalid numeric gid \"%s\"!"
-msgstr "¡gid numérico inválido \"%s\"!"
+#: sysdeps/gnu/errlist.c:1413
+msgid "Required key not available"
+msgstr "La clave requerida no está disponible"
-#: nscd/grpcache.c:292
-#, c-format
-msgid "Haven't found \"%d\" in group cache!"
-msgstr "No se ha encontrado \"%d\" en el caché de grupo"
+#: sysdeps/gnu/errlist.c:1421
+msgid "Key has expired"
+msgstr "La clave ha caducado"
-#: nscd/hstcache.c:305 nscd/hstcache.c:371 nscd/hstcache.c:436
-#: nscd/hstcache.c:501
-#, c-format
-msgid "Haven't found \"%s\" in hosts cache!"
-msgstr "No se ha encontrado \"%s\" en el caché de `hosts'"
+#: sysdeps/gnu/errlist.c:1429
+msgid "Key has been revoked"
+msgstr "La clave ha sido revocada"
-#: nscd/nscd.c:89
-msgid "Read configuration data from NAME"
-msgstr "Lee datos de configuración de NOMBRE"
+#: sysdeps/gnu/errlist.c:1437
+msgid "Key was rejected by service"
+msgstr "La clave fue rechazada por el servicio"
-#: nscd/nscd.c:91
-msgid "Do not fork and display messages on the current tty"
-msgstr "No se divide y muestra los mensajes en la terminal actual"
+#: sysdeps/gnu/errlist.c:1445
+msgid "Owner died"
+msgstr "El propietario ha muerto"
-#: nscd/nscd.c:92
-msgid "NUMBER"
-msgstr "NÚMERO"
+#: sysdeps/gnu/errlist.c:1453
+msgid "State not recoverable"
+msgstr "El estado es irrecuperable"
-#: nscd/nscd.c:92
-msgid "Start NUMBER threads"
-msgstr "Comienza NÚMERO hilos"
+#: sysdeps/gnu/errlist.c:1461
+msgid "Operation not possible due to RF-kill"
+msgstr "Operación imposible por estar la radiofrecuencia desactivada"
-#: nscd/nscd.c:93
-msgid "Shut the server down"
-msgstr "Apagar el servidor"
+# ¿Qué demonios es esto?
+# ¿Error en el error del sistema desconocido? sv
+#: sysdeps/mach/_strerror.c:57
+msgid "Error in unknown error system: "
+msgstr "Error de sistema desconocido: "
-#: nscd/nscd.c:94
-msgid "Print current configuration statistic"
-msgstr "Muestra una estadística sobre la configuración actual"
+#: sysdeps/posix/gai_strerror-strs.h:1
+msgid "Address family for hostname not supported"
+msgstr "Esta familia de direcciones no está soportada para el `host'"
-#: nscd/nscd.c:95
-msgid "TABLE"
-msgstr "TABLA"
+#: sysdeps/posix/gai_strerror-strs.h:2
+msgid "Temporary failure in name resolution"
+msgstr "Fallo temporal en la resolución del nombre"
-#: nscd/nscd.c:96
-msgid "Invalidate the specified cache"
-msgstr "Invalida la caché especificada"
+#: sysdeps/posix/gai_strerror-strs.h:3
+msgid "Bad value for ai_flags"
+msgstr "Valor erróneo para ai_flags"
-#: nscd/nscd.c:97
-msgid "TABLE,yes"
-msgstr "TABLA,sí"
+#: sysdeps/posix/gai_strerror-strs.h:4
+msgid "Non-recoverable failure in name resolution"
+msgstr "Fallo irrecuperable en la resolución del nombre"
-#: nscd/nscd.c:97
-msgid "Use separate cache for each user"
-msgstr "Utiliza una caché separada para cada usuario"
+#: sysdeps/posix/gai_strerror-strs.h:5
+msgid "ai_family not supported"
+msgstr "No se admite ai_familiy"
-#: nscd/nscd.c:102
-msgid "Name Service Cache Daemon."
-msgstr "Daemon de Caché del Servicio de Nombres."
+#: sysdeps/posix/gai_strerror-strs.h:6
+msgid "Memory allocation failure"
+msgstr "Fallo en la asignación de memoria"
-#: nscd/nscd.c:141
-msgid "cannot read configuration file; this is fatal"
-msgstr "no se puede leer el fichero de configuración; este error es fatal"
+#: sysdeps/posix/gai_strerror-strs.h:7
+msgid "No address associated with hostname"
+msgstr "No existe ninguna dirección asociada al nombre"
-#: nscd/nscd.c:152
-msgid "already running"
-msgstr "ya está funcionando"
+#: sysdeps/posix/gai_strerror-strs.h:8
+msgid "Name or service not known"
+msgstr "Nombre o servicio desconocido"
-#: nscd/nscd.c:270 nscd/nscd.c:294 nscd/nscd_stat.c:132
-msgid "Only root is allowed to use this option!"
-msgstr "Solamente root puede usar esta opción"
+#: sysdeps/posix/gai_strerror-strs.h:9
+msgid "Servname not supported for ai_socktype"
+msgstr "No se admite servname para ai_socktype"
-#: nscd/nscd_conf.c:88
-#, c-format
-msgid "Parse error: %s"
-msgstr "Error de análisis: %s"
+#: sysdeps/posix/gai_strerror-strs.h:10
+msgid "ai_socktype not supported"
+msgstr "No se admite ai_socktype"
-#: nscd/nscd_conf.c:171
-#, c-format
-msgid "Could not create log file \"%s\""
-msgstr "No se pudo crear el fichero de registro \"%s\""
+#: sysdeps/posix/gai_strerror-strs.h:11
+msgid "System error"
+msgstr "Error del sistema"
-#: nscd/nscd_conf.c:187
-msgid "Must specify user name for server-user option"
-msgstr "Debe especificar un nombre de usuario para la opción `server-user'"
+# Vale, pero muy poco más abajo has puesto "en curso", que me parece mejor. sv
+# Creo que prefiero dejar uno de cada. Se me ocurre si no cambiar el
+# de abajo también. em
+#: sysdeps/posix/gai_strerror-strs.h:12
+msgid "Processing request in progress"
+msgstr "Se está procesando la petición"
-#: nscd/nscd_conf.c:194
-msgid "Must specify user name for stat-user option"
-msgstr "Debe especificar un nombre de usuario para la opción `stat-user'"
+#: sysdeps/posix/gai_strerror-strs.h:13
+msgid "Request canceled"
+msgstr "Petición cancelada"
-#: nscd/nscd_conf.c:205
-#, c-format
-msgid "Unknown option: %s %s %s"
-msgstr "Opción desconocida: %s %s %s"
+#: sysdeps/posix/gai_strerror-strs.h:14
+msgid "Request not canceled"
+msgstr "Petición no cancelada"
-#: nscd/nscd_stat.c:103
-#, c-format
-msgid "cannot write statistics: %s"
-msgstr "no se pueden escribir las estadísticas: %s"
+#: sysdeps/posix/gai_strerror-strs.h:15
+msgid "All requests done"
+msgstr "Realizadas todas las peticiones"
-#: nscd/nscd_stat.c:128
-#, c-format
-msgid "Only root or %s is allowed to use this option!"
-msgstr "Solamente root o %s puede usar esta opción"
+#: sysdeps/posix/gai_strerror-strs.h:16
+msgid "Interrupted by a signal"
+msgstr "Interrumpido por una señal"
-#: nscd/nscd_stat.c:139
-msgid "nscd not running!\n"
-msgstr "nscd no está en ejecución\n"
+#: sysdeps/posix/gai_strerror-strs.h:17
+msgid "Parameter string not correctly encoded"
+msgstr "Cadena de parámetros codificada incorrectamente"
-#: nscd/nscd_stat.c:150
-msgid "write incomplete"
-msgstr "escritura incompleta"
+#: sysdeps/unix/siglist.c:26
+msgid "Signal 0"
+msgstr "Señal 0"
-#: nscd/nscd_stat.c:162
-msgid "cannot read statistics data"
-msgstr "no se pueden leer los datos de estadística"
+# ???, siempre lo he usado como trap, nunca encontramos la palabra
+# y es una señal estándar Unix, así que no creo conveniente traducirla
+#: sysdeps/unix/siglist.c:32
+msgid "IOT trap"
+msgstr "`trap' de IOT"
+
+#: sysdeps/unix/sysv/linux/i386/readelflib.c:49
+#, c-format
+msgid "%s is for unknown machine %d.\n"
+msgstr "%s es para la máquina desconocida %d.\n"
-#: nscd/nscd_stat.c:165
+#: sysdeps/unix/sysv/linux/ia64/makecontext.c:63
+#, c-format
+msgid "makecontext: does not know how to handle more than 8 arguments\n"
+msgstr "makecontext: no sabe cómo manejar más de 8 argumentos\n"
+
+#: sysdeps/unix/sysv/linux/lddlibc4.c:61
#, c-format
msgid ""
-"nscd configuration:\n"
+"Usage: lddlibc4 FILE\n"
"\n"
-"%15d server debug level\n"
msgstr ""
-"configuración nscd:\n"
+"Modo de empleo: lddlibc4 FICHERO\n"
"\n"
-"%15d nivel de depuración del servidor\n"
-#: nscd/nscd_stat.c:189
+#: sysdeps/unix/sysv/linux/lddlibc4.c:82
#, c-format
-msgid "%3ud %2uh %2um %2lus server runtime\n"
-msgstr "%3ud %2uh %2um %2lus tiempo de funcionamiento del servidor\n"
+msgid "cannot open `%s'"
+msgstr "no se puede abrir `%s'"
-#: nscd/nscd_stat.c:192
+#: sysdeps/unix/sysv/linux/lddlibc4.c:86
#, c-format
-msgid " %2uh %2um %2lus server runtime\n"
-msgstr " %2uh %2um %2lus tiempo de funcionamiento del servidor\n"
+msgid "cannot read header from `%s'"
+msgstr "no se puede leer la cabecera de `%s'"
-#: nscd/nscd_stat.c:194
-#, c-format
-msgid " %2um %2lus server runtime\n"
-msgstr " %2um %2lus tiempo de funcionamiento del servidor\n"
+#: timezone/zdump.c:215
+msgid "lacks alphabetic at start"
+msgstr "no tiene caracteres alfabéticos al comienzo"
-#: nscd/nscd_stat.c:196
-#, c-format
-msgid " %2lus server runtime\n"
-msgstr " %2lus tiempo de funcionamiento del servidor\n"
+#: timezone/zdump.c:217
+msgid "has fewer than 3 alphabetics"
+msgstr "tiene menos de 3 caracteres alfabéticos"
-#: nscd/nscd_stat.c:198
-#, c-format
-msgid "%15lu number of times clients had to wait\n"
-msgstr "%15lu número de veces que los clientes tuvieron que esperar\n"
+#: timezone/zdump.c:219
+msgid "has more than 6 alphabetics"
+msgstr "tiene más de 6 caracteres alfabéticos"
-#: nscd/nscd_stat.c:213 nscd/nscd_stat.c:215
-msgid " no"
-msgstr " no"
+#: timezone/zdump.c:227
+msgid "differs from POSIX standard"
+msgstr "difiere del estándar POSIX"
-#: nscd/nscd_stat.c:213 nscd/nscd_stat.c:215
-msgid " yes"
-msgstr " si"
+#: timezone/zdump.c:233
+#, c-format
+msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
+msgstr "%s: atención: zona \"%s\" abreviatura \"%s\" %s\n"
-#: nscd/nscd_stat.c:221
+#: timezone/zdump.c:242
#, c-format
msgid ""
+"%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
"\n"
-"%s cache:\n"
-"\n"
-"%15s cache is enabled\n"
-"%15Zu suggested size\n"
-"%15lu seconds time to live for positive entries\n"
-"%15lu seconds time to live for negative entries\n"
-"%15lu cache hits on positive entries\n"
-"%15lu cache hits on negative entries\n"
-"%15lu cache misses on positive entries\n"
-"%15lu cache misses on negative entries\n"
-"%15lu%% cache hit rate\n"
-"%15lu current number of cached values\n"
-"%15lu maximum number of cached values\n"
-"%15lu maximum chain length searched\n"
-"%15lu number of delays on rdlock\n"
-"%15lu number of delays on wrlock\n"
-"%15s check /etc/%s for changes\n"
+"Report bugs to tz@elsie.nci.nih.gov.\n"
msgstr ""
+"%s: el modo de empleo es %s [ --version ] [ -v ] [ -c [añoinf,]añosup ] nombrezona ...\n"
"\n"
-"%s caché:\n"
-"\n"
-"%15s el caché está activado\n"
-"%15Zu tamaño sugerido\n"
-"%15lu segundos de vida para las entradas positivas\n"
-"%15lu segundos de vida para las entradas negativas\n"
-"%15lu aciertos de caché en las entradas positivas\n"
-"%15lu aciertos de caché en las entradas negativas\n"
-"%15lu fallos de caché en las entradas positivas\n"
-"%15lu fallos de caché en las entradas negativas\n"
-"%15lu%% tasa de aciertos de caché\n"
-"%15lu número actual de valores en caché\n"
-"%15lu número máximo de valores en caché\n"
-"%15lu longitud maxima de la cadena buscada\n"
-"%15lu número de retardos en rdlock\n"
-"%15lu número de retardos en wrlock\n"
-"%15s compruebe /etc/%s para cambios\n"
-
-#: nscd/pwdcache.c:215
-#, c-format
-msgid "Haven't found \"%s\" in password cache!"
-msgstr "No se ha encontrado \"%s\" en el caché de contraseñas"
-
-#: nscd/pwdcache.c:281
-#, c-format
-msgid "Invalid numeric uid \"%s\"!"
-msgstr "¡uid numérico inválido \"%s\"!"
+"Comunicar errores a tz@elsie.nci.nih.gov.\n"
-#: nscd/pwdcache.c:288
+#: timezone/zdump.c:311
#, c-format
-msgid "Haven't found \"%d\" in password cache!"
-msgstr "No se ha encontrado \"%d\" en el caché de contraseñas"
-
-#: elf/../sysdeps/generic/dl-sysdep.c:422
-msgid "cannot create capability list"
-msgstr "no se puede crear la lista de capacidades"
+msgid "%s: wild -c argument %s\n"
+msgstr "%s: argumento %s descabellado para -c\n"
-#: elf/../sysdeps/generic/readelflib.c:35
-#, c-format
-msgid "file %s is truncated\n"
-msgstr "el fichero %s está truncado\n"
+#: timezone/zdump.c:398
+msgid "Error writing to standard output"
+msgstr "Error al escribir en la salida estándar"
-#: elf/../sysdeps/generic/readelflib.c:67
+#: timezone/zdump.c:421
#, c-format
-msgid "%s is a 32 bit ELF file.\n"
-msgstr "%s es un fichero ELF de 32 bits.\n"
+msgid "%s: use of -v on system with floating time_t other than float or double\n"
+msgstr "%s: uso de -v en un sistema con time_t flotante distinto float o double\n"
-#: elf/../sysdeps/generic/readelflib.c:69
+#: timezone/zic.c:388
#, c-format
-msgid "%s is a 64 bit ELF file.\n"
-msgstr "%s es un fichero ELF de 64 bits.\n"
+msgid "%s: Memory exhausted: %s\n"
+msgstr "%s: Memoria agotada: %s\n"
-#: elf/../sysdeps/generic/readelflib.c:71
+#: timezone/zic.c:434
#, c-format
-msgid "Unknown ELFCLASS in file %s.\n"
-msgstr "ELFCLASS desconocido en el fichero %s.\n"
+msgid "\"%s\", line %d: %s"
+msgstr "\"%s\", línea %d: %s"
-#: elf/../sysdeps/generic/readelflib.c:78
+#: timezone/zic.c:437
#, c-format
-msgid "%s is not a shared object file (Type: %d).\n"
-msgstr "%s no es un fichero `shared object' (Tipo: %d).\n"
+msgid " (rule from \"%s\", line %d)"
+msgstr " (regla desde \"%s\", línea %d)"
-#: elf/../sysdeps/generic/readelflib.c:109
-msgid "more than one dynamic segment\n"
-msgstr "más de un segmento dinámico\n"
+#: timezone/zic.c:449
+msgid "warning: "
+msgstr "atención: "
-#: elf/../sysdeps/unix/sysv/linux/i386/readelflib.c:49
+# FIXME: Decir al autor que no use tabs. sv
+#: timezone/zic.c:459
#, c-format
-msgid "%s is for unknown machine %d.\n"
-msgstr "%s es para la máquina desconocida %d.\n"
-
-# FIXME: Falta ver si es niño o niña. sv
-#: elf/cache.c:70
-msgid "unknown"
-msgstr "desconocido/a"
+msgid ""
+"%s: usage is %s [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
+"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
+"\n"
+"Report bugs to tz@elsie.nci.nih.gov.\n"
+msgstr ""
+"%s: el modo de empleo es %s [ --version ] [ -v ] [ -l hora_local ] [ -p reglasposix ] \\\n"
+" [ -d directorio ] [ -L segundos_intercalares ] [ -y tipoaño ] [ fichero ... ]\n"
+"\n"
+"Comunicar errores a tz@elstz@elsie.nci.nih.gov.\n"
-#: elf/cache.c:111
-msgid "Unknown OS"
-msgstr "Sistema Operativo desconocido"
+#: timezone/zic.c:496
+msgid "wild compilation-time specification of zic_t"
+msgstr "especificación de zic_t en tiempo de compilación descabellada"
-#: elf/cache.c:116
+#: timezone/zic.c:515
#, c-format
-msgid ", OS ABI: %s %d.%d.%d"
-msgstr ", ABI del SO: %s %d.%d.%d"
+msgid "%s: More than one -d option specified\n"
+msgstr "%s: La opción -d se ha especificado más de una vez\n"
-#: elf/cache.c:142 elf/ldconfig.c:1078
+#: timezone/zic.c:525
#, c-format
-msgid "Can't open cache file %s\n"
-msgstr "No se puede abrir el fichero de caché %s\n"
-
-#: elf/cache.c:154
-msgid "mmap of cache file failed.\n"
-msgstr "falló la operación `mmap' sobre el fichero de caché.\n"
-
-#: elf/cache.c:158 elf/cache.c:168
-msgid "File is not a cache file.\n"
-msgstr "El fichero no es un fichero de caché.\n"
+msgid "%s: More than one -l option specified\n"
+msgstr "%s: La opción -l se ha especificado más de una vez\n"
-#: elf/cache.c:201 elf/cache.c:211
+#: timezone/zic.c:535
#, c-format
-msgid "%d libs found in cache `%s'\n"
-msgstr "%d bibliotecas se encontraron en la caché `%s'\n"
+msgid "%s: More than one -p option specified\n"
+msgstr "%s: La opción -p se ha especificado más de una vez\n"
-#: elf/cache.c:410
+#: timezone/zic.c:545
#, c-format
-msgid "Can't remove old temporary cache file %s"
-msgstr "No se puede borrar el fichero de caché temporal antiguo %s"
+msgid "%s: More than one -y option specified\n"
+msgstr "%s: La opción -y se ha especificado más de una vez\n"
-#: elf/cache.c:417
+#: timezone/zic.c:555
#, c-format
-msgid "Can't create temporary cache file %s"
-msgstr "No se puede crear el fichero temporal de caché %s"
-
-#: elf/cache.c:425 elf/cache.c:434 elf/cache.c:438
-msgid "Writing of cache data failed"
-msgstr "Falló la escritura de los datos de la caché"
+msgid "%s: More than one -L option specified\n"
+msgstr "%s: La opción -L se ha especificado más de una vez\n"
-# FIXME. Merge with previous message (?). sv
-#: elf/cache.c:442
-msgid "Writing of cache data failed."
-msgstr "Falló la escritura de los datos de la caché"
+#: timezone/zic.c:604
+msgid "link to link"
+msgstr "enlace a un enlace"
-#: elf/cache.c:449
-#, c-format
-msgid "Changing access rights of %s to %#o failed"
-msgstr "El cambio de los derechos de acceso de %s a %#o falló"
+#: timezone/zic.c:669
+msgid "hard link failed, symbolic link used"
+msgstr "el enlace duro falló, se usará un enlace simbólico"
-#: elf/cache.c:454
+#: timezone/zic.c:677
#, c-format
-msgid "Renaming of %s to %s failed"
-msgstr "Falló el renombramiento de %s a %s"
-
-#: elf/dl-close.c:128
-msgid "shared object not open"
-msgstr "el objeto compartido no está abierto"
-
-#: elf/dl-close.c:531 elf/dl-open.c:454
-msgid "TLS generation counter wrapped! Please send report with the 'glibcbug' script."
-msgstr ""
-"¡El contador de generaciones TLS ha vuelto a cero! Por favor envíe un informe\n"
-"con el script 'glibcbug'"
+msgid "%s: Can't link from %s to %s: %s\n"
+msgstr "%s: No se pudo crear un enlace de %s a %s: %s\n"
-#: elf/dl-deps.c:111 elf/dl-open.c:183
-msgid "DST not allowed in SUID/SGID programs"
-msgstr "No se permite DST en programas SUID/SGID"
+#: timezone/zic.c:749 timezone/zic.c:751
+msgid "same rule name in multiple files"
+msgstr "mismo nombre de regla en varios ficheros"
-# FIXME: Es casi el mismo mensaje de antes. sv
-#: elf/dl-deps.c:124
-msgid "empty dynamics string token substitution"
-msgstr "sustitución dinámica de un elemento por cadena vacía"
+#: timezone/zic.c:792
+msgid "unruly zone"
+msgstr "zona sin reglas"
-# Hmm, me suena que lo que es dinámica aquí es la cadena, no la sustitución.
-# FIXME: Consultarlo. sv
-#: elf/dl-deps.c:130
+#: timezone/zic.c:799
#, c-format
-msgid "cannot load auxiliary `%s' because of empty dynamic string token substitution\n"
-msgstr ""
-"no se puede cargar el `%s' auxiliar debido a la sustitución dinámica\n"
-"de un elemento por cadena vacía\n"
-
-#: elf/dl-deps.c:461
-msgid "cannot allocate dependency list"
-msgstr "no se pudo asignar espacio para la lista de dependencias"
-
-#: elf/dl-deps.c:494 elf/dl-deps.c:549
-msgid "cannot allocate symbol search list"
-msgstr "no se puede asignar espacio para la lista de búsqueda de los símbolos"
+msgid "%s in ruleless zone"
+msgstr "%s en una zona sin reglas"
-#: elf/dl-deps.c:534
-msgid "Filters not supported with LD_TRACE_PRELINKING"
-msgstr "No se admiten filtros con LD_TRACE_PRELINKING"
+#: timezone/zic.c:820
+msgid "standard input"
+msgstr "entrada estándar"
-# Véase "A bug's life".
-#: elf/dl-error.c:75
-msgid "DYNAMIC LINKER BUG!!!"
-msgstr "¡¡¡HAY UN BICHO EN EL ENLAZADOR DINÁMICO!!!"
+#: timezone/zic.c:825
+#, c-format
+msgid "%s: Can't open %s: %s\n"
+msgstr "%s: No se puede abrir %s: %s\n"
-#: elf/dl-error.c:108
-msgid "error while loading shared libraries"
-msgstr "error al cargar las bibliotecas compartidas"
+#: timezone/zic.c:836
+msgid "line too long"
+msgstr "línea demasiado larga"
-#: elf/dl-load.c:347
-msgid "cannot allocate name record"
-msgstr "no se puede asignar el registro del nombre"
+#: timezone/zic.c:856
+msgid "input line of unknown type"
+msgstr "línea de entrada de tipo desconocido"
-# He intentado mejorarlo un poco ...
+# ¿¿cómo se dirá eso??, pregunto en spanglish
#
-#: elf/dl-load.c:449 elf/dl-load.c:528 elf/dl-load.c:648 elf/dl-load.c:743
-msgid "cannot create cache for search path"
-msgstr "no se puede crear un caché para la ruta de búsqueda"
-
-#: elf/dl-load.c:551
-msgid "cannot create RUNPATH/RPATH copy"
-msgstr "no se puede crear una copia RUNPATH/RPATH"
-
-#: elf/dl-load.c:634
-msgid "cannot create search path array"
-msgstr "no se puede crear la matriz de la ruta de búsqueda"
-
-#: elf/dl-load.c:830
-msgid "cannot stat shared object"
-msgstr "no se puede efectuar `stat' sobre el objeto compartido"
-
-#: elf/dl-load.c:874
-msgid "cannot open zero fill device"
-msgstr "no se puede abrir el dispositivo de `zero fill'"
-
-#: elf/dl-load.c:883 elf/dl-load.c:1929
-msgid "cannot create shared object descriptor"
-msgstr "no se puede crear el descriptor del objeto compartido"
-
-#: elf/dl-load.c:902 elf/dl-load.c:1470 elf/dl-load.c:1553
-msgid "cannot read file data"
-msgstr "no se pueden leer los datos del fichero"
-
-#: elf/dl-load.c:946
-msgid "ELF load command alignment not page-aligned"
-msgstr "El alineamiento de la orden de carga ELF no está alineada a la página"
-
-#: elf/dl-load.c:953
-msgid "ELF load command address/offset not properly aligned"
-msgstr "La dirección/desplazamiento de la orden de carga ELF no está bien alineada"
-
-#: elf/dl-load.c:1037
-msgid "cannot allocate TLS data structures for initial thread"
-msgstr "no se pueden crear las estructuras de datos TLS para el hilo inicial"
-
-#: elf/dl-load.c:1061
-msgid "cannot handle TLS data"
-msgstr "no se pueden manejar los datos de TLS"
-
-#: elf/dl-load.c:1075
-msgid "object file has no loadable segments"
-msgstr "el fichero objeto no tiene segmentos cargables"
-
-#: elf/dl-load.c:1110
-msgid "failed to map segment from shared object"
-msgstr "fallo al asignar un segmento del objeto compartido"
-
-#: elf/dl-load.c:1135
-msgid "cannot dynamically load executable"
-msgstr "no se puede cargar el ejecutable dinámicamente"
-
-#: elf/dl-load.c:1191
-msgid "cannot change memory protections"
-msgstr "no se pueden cambiar las protecciones de memoria"
-
-#: elf/dl-load.c:1210
-msgid "cannot map zero-fill pages"
-msgstr "no se pueden asignar páginas de tipo `zero-fill'"
-
-#: elf/dl-load.c:1228
-msgid "cannot allocate memory for program header"
-msgstr "no se puede asignar memoria para la cabecera del programa"
-
-#: elf/dl-load.c:1259
-msgid "object file has no dynamic section"
-msgstr "el fichero objeto no tiene sección dinámica"
-
-#: elf/dl-load.c:1299
-msgid "shared object cannot be dlopen()ed"
-msgstr "no se puede efectuar dlopen() sobre el objeto compartido"
-
-#: elf/dl-load.c:1322
-msgid "cannot create searchlist"
-msgstr "no se puede crear la lista de búsqueda"
-
-#: elf/dl-load.c:1352
-msgid "cannot enable executable stack as shared object requires"
-msgstr "no se puede activar la pila ejecutable tal y como el objeto compartido necesita"
-
-#: elf/dl-load.c:1470
-msgid "file too short"
-msgstr "fichero demasiado corto"
-
-#: elf/dl-load.c:1493
-msgid "invalid ELF header"
-msgstr "cabecera ELF inválida"
-
-#: elf/dl-load.c:1502
-msgid "ELF file data encoding not big-endian"
-msgstr "La codificación de los datos del fichero ELF no es `big-endian'"
-
-#: elf/dl-load.c:1504
-msgid "ELF file data encoding not little-endian"
-msgstr "La codificación de los datos del fichero ELF no es `little-endian'"
-
-#: elf/dl-load.c:1508
-msgid "ELF file version ident does not match current one"
-msgstr "La identificación de versión del fichero ELF no encaja con la actual"
-
-#: elf/dl-load.c:1512
-msgid "ELF file OS ABI invalid"
-msgstr "ABI del OS del fichero ELF inválida"
-
-#: elf/dl-load.c:1514
-msgid "ELF file ABI version invalid"
-msgstr "Versión de ABI del fichero ELF inválida"
-
-#: elf/dl-load.c:1517
-msgid "internal error"
-msgstr "error interno"
-
-#: elf/dl-load.c:1524
-msgid "ELF file version does not match current one"
-msgstr "La versión del fichero ELF no coincide con la actual"
-
-#: elf/dl-load.c:1532
-msgid "ELF file's phentsize not the expected size"
-msgstr "El `phentsize' del fichero ELF no es el tamaño esperado"
-
-#: elf/dl-load.c:1538
-msgid "only ET_DYN and ET_EXEC can be loaded"
-msgstr "solamente pueden cargarse ET_DYN y ET_EXEC"
-
-#: elf/dl-load.c:1944
-msgid "cannot open shared object file"
-msgstr "no se puede abrir el fichero del objeto compartido"
-
-#: elf/dl-lookup.c:265 elf/dl-lookup.c:443
-msgid "relocation error"
-msgstr "error de relocalización"
-
-#: elf/dl-open.c:111
-msgid "cannot extend global scope"
-msgstr "no se puede extender el ámbito global"
-
-#: elf/dl-open.c:214
-msgid "empty dynamic string token substitution"
-msgstr "sustitución dinámica de un elemento por una cadena vacía"
-
-#: elf/dl-open.c:361 elf/dl-open.c:372
-msgid "cannot create scope list"
-msgstr "no se puede crear la lista de ámbito"
-
-#: elf/dl-open.c:434
-msgid "cannot create TLS data structures"
-msgstr "no se pueden crear las estructuras de datos TLS"
-
-#: elf/dl-open.c:496
-msgid "invalid mode for dlopen()"
-msgstr "modo inválido para dlopen()"
-
-#: elf/dl-reloc.c:57
-msgid "cannot allocate memory in static TLS block"
-msgstr "No se pudo asignar memoria en el bloque TLS estático"
-
-#: elf/dl-reloc.c:176
-msgid "cannot make segment writable for relocation"
-msgstr "no se puede hacer el segmento escribible para su relocalización"
-
-#: elf/dl-reloc.c:277
-#, c-format
-msgid "%s: profiler found no PLTREL in object %s\n"
-msgstr "%s el `profiler' no encontró ningún PLTREL en el objeto %s\n"
-
-#: elf/dl-reloc.c:289
+# diría que la porción "de años bisiestos" sobra. sv
+#
+# Mejor dejarlo bien clarito. Después de haberme enterado de
+# qué diablos era eso ;)
+#
+# En ningún sitio dice que la línea de ajuste sea "de años bisiestos"
+# Si pones algo que no viene en el original puedes acabar cambiando
+# el sentido.
+# O quitas lo de "de años bisiestos" o miras el código fuente
+# a ver si de verdad es un ajuste de años bisiestos o más bien de segundos
+# intercalares. En cualquier caso me parece que queda más largo añadiendo
+# eso. sv
+#
+# Otra cosa: "en un fichero que no es el de" -> "en un fichero que no es de"
+# (sin "el"). Si no, da a entender que sólo puede haber uno,
+# y el original no da a entender eso. sv
+#
+# Varias cosas, según he entendido los ajustes en segundo se llaman
+# indiferentemente 'segundos intercalares' o 'segundos bisiestos'
+# el ajuste en sí es un ajuste de años bisiestos ( no son exactamente
+# un día ) . Por lo tanto Leap ( año bisiesto ) line, son las líneas
+# que caracterizan al leap seconds file, que podríamos llamarlo fichero
+# de ajuste de años bisiestos, fichero intercalar o incluso bisiestifile
+# De todas maneras creo que lo cambio, este mensaje, si alguna vez tengo
+# la mala suerte de que me aparezca, me acoxonaría, tal y como está
+# redactado
+# Segundo, según he visto en la documentación, sólo existe un fichero
+# de leap lines, por eso pongo 'el'... em+
+#
+#: timezone/zic.c:872
#, c-format
-msgid "%s: profiler out of memory shadowing PLTREL of %s\n"
-msgstr "%s: el `profiler' se quedó sin memoria al ocultar el PLTREL de %s\n"
-
-# Se admiten sugerencias. sv
-#: elf/dl-reloc.c:304
-msgid "cannot restore segment prot after reloc"
-msgstr "no se puede restaurar el `prot' del segmento después de la relocalización"
-
-#: elf/dl-sym.c:74 elf/dl-sym.c:145
-msgid "RTLD_NEXT used in code not dynamically loaded"
-msgstr "Se ha usado RTLD_NEXT en una parte del código que no se cargó dinámicamente"
-
-#: elf/dl-version.c:303
-msgid "cannot allocate version reference table"
-msgstr "no se puede asignar espacio para la tabla de versiones de referencia"
-
-#: elf/ldconfig.c:122
-msgid "Print cache"
-msgstr "Muestra la caché"
-
-#: elf/ldconfig.c:123
-msgid "Generate verbose messages"
-msgstr "Genera mensajes explicativos"
-
-#: elf/ldconfig.c:124
-msgid "Don't build cache"
-msgstr "No crea caché"
-
-#: elf/ldconfig.c:125
-msgid "Don't generate links"
-msgstr "No genera enlaces"
-
-#: elf/ldconfig.c:126
-msgid "Change to and use ROOT as root directory"
-msgstr "Cambia a ROOT y lo utiliza como directorio raíz"
-
-#: elf/ldconfig.c:127
-msgid "Use CACHE as cache file"
-msgstr "Utiliza CACHE como fichero de caché"
-
-#: elf/ldconfig.c:128
-msgid "Use CONF as configuration file"
-msgstr "Utiliza CONF como fichero de configuración"
-
-#: elf/ldconfig.c:129
-msgid "Only process directories specified on the command line. Don't build cache."
+msgid "%s: Leap line in non leap seconds file %s\n"
msgstr ""
-"Procesa únicamente los directorios especificados en la línea de órdenes.\n"
-"No crea la caché."
-
-#: elf/ldconfig.c:130
-msgid "Manually link individual libraries."
-msgstr "Enlace bibliotecas individuales manualmente."
-
-#: elf/ldconfig.c:131
-msgid "Format to use: new, old or compat (default)"
-msgstr "Formato utilizado: new, old o compat (predeterminado)"
-
-# FIXME: Why So Many Uppercase Letters? sv
-#: elf/ldconfig.c:139
-msgid "Configure Dynamic Linker Run Time Bindings."
-msgstr "Configura las asociaciones de tiempo de ejecución del enlazador dinámico"
-
-#: elf/ldconfig.c:297
-#, c-format
-msgid "Path `%s' given more than once"
-msgstr "Se ha dado la ruta `%s' más de una vez"
-
-#: elf/ldconfig.c:341
-#, c-format
-msgid "%s is not a known library type"
-msgstr "%s no es un tipo de biblioteca conocido"
+"%s: Línea de segundos intercalares en un fichero que no es el de\n"
+"ajuste de años bisiestos %s\n"
-#: elf/ldconfig.c:361
+# Ãdem. 1984.
+#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338
#, c-format
-msgid "Can't stat %s"
-msgstr "No se puede efectuar `stat' sobre %s"
-
-#: elf/ldconfig.c:431
-#, c-format
-msgid "Can't stat %s\n"
-msgstr "No se puede efectuar `stat' sobre %s\n"
-
-#: elf/ldconfig.c:441
-#, c-format
-msgid "%s is not a symbolic link\n"
-msgstr "%s no es un enlace simbólico\n"
+msgid "%s: panic: Invalid l_value %d\n"
+msgstr "%s: grave: valor_l %d inválido\n"
-#: elf/ldconfig.c:460
+#: timezone/zic.c:887
#, c-format
-msgid "Can't unlink %s"
-msgstr "No se puede efectuar `unlink' sobre %s"
+msgid "%s: Error reading %s\n"
+msgstr "%s: Error al leer %s\n"
-#: elf/ldconfig.c:466
+#: timezone/zic.c:894
#, c-format
-msgid "Can't link %s to %s"
-msgstr "No se puede crear un enlace de %s a %s"
+msgid "%s: Error closing %s: %s\n"
+msgstr "%s: Error al cerrar %s: %s\n"
-#: elf/ldconfig.c:472
-msgid " (changed)\n"
-msgstr " (cambiado)\n"
+#: timezone/zic.c:899
+msgid "expected continuation line not found"
+msgstr "la línea de continuación esperada no se encuentra"
-#: elf/ldconfig.c:474
-msgid " (SKIPPED)\n"
-msgstr " (SALTADO)\n"
+# Sugerencia: Desbordamiento de fecha. (?) sv+
+#: timezone/zic.c:943 timezone/zic.c:2480 timezone/zic.c:2499
+msgid "time overflow"
+msgstr "desbordamiento horario"
-#: elf/ldconfig.c:529
-#, c-format
-msgid "Can't find %s"
-msgstr "No se encuentra %s"
+#: timezone/zic.c:947
+msgid "24:00 not handled by pre-1998 versions of zic"
+msgstr "24:00 no se puede tratar por versiones de zic anteriores a 1998"
-#: elf/ldconfig.c:545
-#, c-format
-msgid "Can't lstat %s"
-msgstr "No se puede efectuar `lstat' sobre %s"
+#: timezone/zic.c:950
+msgid "values over 24 hours not handled by pre-2007 versions of zic"
+msgstr "las versiones de zic anteriores a 2007 no manejan valores por encima de 24 horas"
-#: elf/ldconfig.c:552
-#, c-format
-msgid "Ignored file %s since it is not a regular file."
-msgstr "Descartado el fichero %s dado que no es un fichero regular."
+#: timezone/zic.c:963
+msgid "wrong number of fields on Rule line"
+msgstr "número incorrecto de argumentos en la línea de regla (Rule)"
-#: elf/ldconfig.c:560
-#, c-format
-msgid "No link created since soname could not be found for %s"
-msgstr "No se creó el enlace ya que no se encontró el soname para %s"
+#: timezone/zic.c:967
+msgid "nameless rule"
+msgstr "regla sin nombre"
-#: elf/ldconfig.c:651
-#, c-format
-msgid "Can't open directory %s"
-msgstr "No se puede abrir el directorio %s"
+#: timezone/zic.c:972
+msgid "invalid saved time"
+msgstr "la hora almacenada no es válida"
-#: elf/ldconfig.c:706 elf/ldconfig.c:753
-#, c-format
-msgid "Cannot lstat %s"
-msgstr "No se puede efectuar `lstat' sobre %s"
+#: timezone/zic.c:993
+msgid "wrong number of fields on Zone line"
+msgstr "número de campos incorrecto en la línea de zona (Zone)"
-#: elf/ldconfig.c:718
+#: timezone/zic.c:999
#, c-format
-msgid "Cannot stat %s"
-msgstr "No se puede efectuar `stat' sobre %s"
+msgid "\"Zone %s\" line and -l option are mutually exclusive"
+msgstr "la línea \"Zone %s\" y la opción -l son mutuamente excluyentes"
-#: elf/ldconfig.c:775 elf/readlib.c:92
+#: timezone/zic.c:1007
#, c-format
-msgid "Input file %s not found.\n"
-msgstr "No se encontró el fichero de entrada %s.\n"
+msgid "\"Zone %s\" line and -p option are mutually exclusive"
+msgstr "la línea \"Zone %s\" y la opción -p son mutuamente excluyentes"
-#: elf/ldconfig.c:826
+#: timezone/zic.c:1019
#, c-format
-msgid "libc5 library %s in wrong directory"
-msgstr "biblioteca libc5 %s en un directorio equivocado"
+msgid "duplicate zone name %s (file \"%s\", line %d)"
+msgstr "nombre de zona %s duplicado (fichero \"%s\", línea %d)"
-#: elf/ldconfig.c:829
-#, c-format
-msgid "libc6 library %s in wrong directory"
-msgstr "biblioteca libc6 %s en un directorio equivocado"
+#: timezone/zic.c:1035
+msgid "wrong number of fields on Zone continuation line"
+msgstr "número de campos incorrecto en la línea de continuación de zona (Zone)"
-#: elf/ldconfig.c:832
-#, c-format
-msgid "libc4 library %s in wrong directory"
-msgstr "biblioteca libc4 %s en un directorio equivocado"
+#: timezone/zic.c:1075
+msgid "invalid UTC offset"
+msgstr "desplazamiento UTC inválido"
-#: elf/ldconfig.c:859
-#, c-format
-msgid "libraries %s and %s in directory %s have same soname but different type."
-msgstr "las bibliotecas %s y %s en el directorio %s tienen el mismo soname pero distinto tipo."
+#: timezone/zic.c:1078
+msgid "invalid abbreviation format"
+msgstr "formato de abreviatura incorrecto"
-#: elf/ldconfig.c:962
-#, c-format
-msgid "Can't open configuration file %s"
-msgstr "No se puede abrir el fichero de configuración `%s'"
+# VER
+#: timezone/zic.c:1107
+msgid "Zone continuation line end time is not after end time of previous line"
+msgstr ""
+"La línea de continuación de la zona no está después del tiempo de final\n"
+"de la línea anterior"
-#: elf/ldconfig.c:1033
-#, c-format
-msgid "relative path `%s' used to build cache"
-msgstr "se usa el camino relativo `%s' para construir el caché"
+# En todas estas, yo pondría "número incorrecto de campos",
+# "número incorrecto de argumentos", etc.
+# creo que quedaría mucho mejor. sv
+# La mitad como tú dices, y la mitad como yo em
+#
+# Eso es que te da igual...
+# O es mejor como digo, o no es mejor.
+# Si es mejor, ponlo en todos los sitios. Y si no, en ninguno.
+# Yo creo que es mucho mejor poner "número incorrecto ..."
+# Si no, queda como "al revés". sv+
+#: timezone/zic.c:1135
+msgid "wrong number of fields on Leap line"
+msgstr "número incorrecto de campos en la línea de bisiesto (Leap)"
-#: elf/ldconfig.c:1057
-msgid "Can't chdir to /"
-msgstr "No se puede cambiar al directorio /"
+#: timezone/zic.c:1144
+msgid "invalid leaping year"
+msgstr "año bisiesto inválido"
-#: elf/ldconfig.c:1099
-#, c-format
-msgid "Can't open cache file directory %s\n"
-msgstr "No se puede leer el directorio de ficheros de caché %s\n"
+#: timezone/zic.c:1164 timezone/zic.c:1270
+msgid "invalid month name"
+msgstr "nombre de mes incorrecto"
-#: elf/readlib.c:98
-#, c-format
-msgid "Cannot fstat file %s.\n"
-msgstr "No se puede efectuar `fstat' sobre el fichero %s.\n"
+#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397
+msgid "invalid day of month"
+msgstr "día del mes inválido"
-#: elf/readlib.c:108
-#, c-format
-msgid "File %s is too small, not checked."
-msgstr "El fichero %s es demasiado pequeño, no se comprueba."
+#: timezone/zic.c:1182
+msgid "time before zero"
+msgstr "hora antes de cero"
-#: elf/readlib.c:117
-#, c-format
-msgid "Cannot mmap file %s.\n"
-msgstr "No se puede efectuar `mmap' sobre el fichero %s.\n"
+#: timezone/zic.c:1186
+msgid "time too small"
+msgstr "tiempo demasiado pequeño"
-#: elf/readlib.c:155
-#, c-format
-msgid "%s is not an ELF file - it has the wrong magic bytes at the start.\n"
-msgstr "%s no es un fichero ELF - tiene los bytes mágicos equivocados en el comienzo.\n"
+#: timezone/zic.c:1190
+msgid "time too large"
+msgstr "tiempo demasiado grande"
-#: elf/sprof.c:72
-msgid "Output selection:"
-msgstr "Selección del resultado:"
+#: timezone/zic.c:1194 timezone/zic.c:1299
+msgid "invalid time of day"
+msgstr "hora del día inválida"
-#: elf/sprof.c:74
-msgid "print list of count paths and their number of use"
-msgstr "muestra la lista de contadores de ruta y su número de uso"
+#: timezone/zic.c:1213
+msgid "illegal CORRECTION field on Leap line"
+msgstr "El campo CORRECTION en la línea de año bisiesto es ilegal"
-#: elf/sprof.c:76
-msgid "generate flat profile with counts and ticks"
-msgstr "genera un `profile' plano con contadores y `ticks'"
+#: timezone/zic.c:1218
+msgid "illegal Rolling/Stationary field on Leap line"
+msgstr "Campo Rolling/Stationary ilegal en la línea de año bisiesto"
-#: elf/sprof.c:77
-msgid "generate call graph"
-msgstr "genera el grafo de llamadas"
+#: timezone/zic.c:1234
+msgid "wrong number of fields on Link line"
+msgstr "número incorrecto de campos en la línea de enlace (Link)"
-# ¿profiling? sv
-#: elf/sprof.c:84
-msgid "Read and display shared object profiling data"
-msgstr "Lee y visualiza los datos de `profiling' del objeto compartido"
+#: timezone/zic.c:1238
+msgid "blank FROM field on Link line"
+msgstr "Campo FROM vacío en la línea `Link'"
-#: elf/sprof.c:87
-msgid "SHOBJ [PROFDATA]"
-msgstr "SHOBJ [DATOSPROF]"
+#: timezone/zic.c:1242
+msgid "blank TO field on Link line"
+msgstr "Campo TO vacío en la línea `Link'"
-#: elf/sprof.c:398
-#, c-format
-msgid "failed to load shared object `%s'"
-msgstr "fallo al cargar el objeto compartido `%s'"
+#: timezone/zic.c:1320
+msgid "invalid starting year"
+msgstr "año de comienzo inválido"
-#: elf/sprof.c:407
-msgid "cannot create internal descriptors"
-msgstr "no se pueden crear descriptores internos"
+#: timezone/zic.c:1342
+msgid "invalid ending year"
+msgstr "año de final inválido"
-#: elf/sprof.c:526
-#, c-format
-msgid "Reopening shared object `%s' failed"
-msgstr "La reapertura del objeto compartido `%s' falló"
+#: timezone/zic.c:1346
+msgid "starting year greater than ending year"
+msgstr "año de comienzo mayor que año de final"
-#: elf/sprof.c:534
-msgid "mapping of section headers failed"
-msgstr "falló la asignación de las cabeceras de sección"
+#: timezone/zic.c:1353
+msgid "typed single year"
+msgstr "tecleado un único año"
-# Estupendo, entre section, header, string y table hay 4! posibilidades...
-#: elf/sprof.c:544
-msgid "mapping of section header string table failed"
-msgstr "falló la asignación de la tabla de cadenas de cabeceras de sección"
+#: timezone/zic.c:1388
+msgid "invalid weekday name"
+msgstr "nombre del día de la semana incorrecto"
-# Duda: stripped.
-#: elf/sprof.c:564
+#: timezone/zic.c:1566
#, c-format
-msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
-msgstr "*** El fichero `%s' está `stripped': no es posible un análisis detallado\n"
-
-#: elf/sprof.c:594
-msgid "failed to load symbol data"
-msgstr "fallo al cargar los datos del símbolo"
-
-#: elf/sprof.c:664
-msgid "cannot load profiling data"
-msgstr "no se pueden cargar los datos de `profiling'"
-
-#: elf/sprof.c:673
-msgid "while stat'ing profiling data file"
-msgstr "al ejecutar `stat' sobre el fichero de datos de `profiling'"
+msgid "%s: Can't remove %s: %s\n"
+msgstr "%s: No se puede eliminar %s: %s\n"
-#: elf/sprof.c:681
+#: timezone/zic.c:1576
#, c-format
-msgid "profiling data file `%s' does not match shared object `%s'"
-msgstr ""
-"el fichero de datos para `profiling' %s no se corresponde con el\n"
-"objeto compartido `%s'"
-
-#: elf/sprof.c:692
-msgid "failed to mmap the profiling data file"
-msgstr "no se pudo hacer mmap con el fichero de datos de `profile'"
-
-# Se admiten sugerencias para el "profiling" sv.
-#: elf/sprof.c:700
-msgid "error while closing the profiling data file"
-msgstr "error al cerrar el fichero de datos de `profiling'"
-
-#: elf/sprof.c:709 elf/sprof.c:779
-msgid "cannot create internal descriptor"
-msgstr "no se puede crear un descriptor interno"
+msgid "%s: Can't create %s: %s\n"
+msgstr "%s: No se puede crear %s: %s\n"
-#: elf/sprof.c:755
+#: timezone/zic.c:1726
#, c-format
-msgid "`%s' is no correct profile data file for `%s'"
-msgstr "`%s' no es un fichero de datos para `profile' correcto para `%s'"
-
-#: elf/sprof.c:936 elf/sprof.c:988
-msgid "cannot allocate symbol data"
-msgstr "no se puede asignar espacio para los datos del símbolo"
-
-#~ msgid "shared object cannot be dlopen()ed: static TLS memory too small"
-#~ msgstr ""
-#~ "no se puede efectuar dlopen() sobre el objeto compartido: memoria estática TLS\n"
-#~ "demasiado pequeña"
-
-# FIXME: Decir al autor que no use tabs. sv
-#~ msgid "\t\t\t\t\t\t\t %s: value for field `%s' must be in range %d...%d"
-#~ msgstr "\t\t\t\t\t\t\t %s: el valor para el campo `%s' debe estar en el rango %d...%d"
-
-#~ msgid "Failed to look up user '%s' to run server as"
-#~ msgstr "Fallo al buscar el usuario '%s' para ejecutar el servidor"
-
-#~ msgid "no filename for profiling data given and shared object `%s' has no soname"
-#~ msgstr ""
-#~ "no se ha dado un nombre de fichero para los datos de `profiling'\n"
-#~ "y el objeto compartido `%s' no tiene soname"
-
-#~ msgid "%s: Error writing "
-#~ msgstr "%s: Error al escribir "
-
-#~ msgid "cannot load shared object file"
-#~ msgstr "no se puede cargar el objeto compartido"
-
-#~ msgid "cannot read locale directory `%s'"
-#~ msgstr "No se puede leer el directorio de locales %s"
-
-#~ msgid "neither original nor target encoding specified"
-#~ msgstr "no se ha especificado la codificación original ni la final"
-
-#~ msgid "original encoding not specified using `-f'"
-#~ msgstr "la codificación original no se ha especificado utilizando `-f'"
-
-#~ msgid "standard output"
-#~ msgstr "salida estándar"
-
-#~ msgid "target encoding not specified using `-t'"
-#~ msgstr "no se ha especificado la codificación final utilizando `-t'"
-
-#~ msgid " done\n"
-#~ msgstr " hecho\n"
-
-#~ msgid "%s: cannot get modification time"
-#~ msgstr "%s: no se puede obtener la fecha de modificación"
-
-#~ msgid "Computing table size for character classes might take a while..."
-#~ msgstr ""
-#~ "El cálculo del tamaño de la tabla de clases de caracteres podría tardar un\n"
-#~ "rato ..."
-
-# FUZZY
-# Collating, uff, lo he visto por lo menos 10 veces, en varios contextos
-# diferentes. Uno de ellos en el de comparaciones de strings en el DM de DB2.
-# Podría traducirse tambien como 'uniones' o 'emparejamientos' ... em+
-#~ msgid "Computing table size for collation information might take a while..."
-#~ msgstr ""
-#~ "El cálculo del tamaño de la tabla de información de secuencias podría tardar\n"
-#~ "un rato ..."
-
-#~ msgid "Convert key to lower case"
-#~ msgstr "Convierte la clave a minúsculas"
-
-#~ msgid "Create simple DB database from textual input."
-#~ msgstr "Crea una base de datos DB simple a partir de una entrada de texto."
-
-#~ msgid "Device not configured"
-#~ msgstr "Dispositivo no configurado"
-
-#~ msgid "Do not print messages while building database"
-#~ msgstr "No muestra ningún mensaje mientras construye la base de datos"
-
-#~ msgid ""
-#~ "INPUT-FILE OUTPUT-FILE\n"
-#~ "-o OUTPUT-FILE INPUT-FILE\n"
-#~ "-u INPUT-FILE"
-#~ msgstr ""
-#~ "FICHERO-ENTRADA FICHERO-SALIDA\n"
-#~ "-o FICHERO-SALIDA FICHERO-ENTRADA\n"
-#~ "-u FICHERO-ENTRADA"
-
-#~ msgid "Print content of database file, one entry a line"
-#~ msgstr "Muestra el contenido de un fichero de base de datos, una entrada por línea"
-
-# FUZZY
-# entries ? debe haber algo para eso
-# lo traducí antes como especificación, pero ... em+
-#~ msgid "`...' must only be used in `...' and `UNDEFINED' entries"
-#~ msgstr "`...' debe usarse únicamente en las entradas `...' y `UNDEFINED'"
-
-#~ msgid "`from' expected after first argument to `collating-element'"
-#~ msgstr "Se esperaba `from' después del primer argumento para `collating-element'"
-
-#~ msgid "`from' string in collation element declaration contains unknown character"
-#~ msgstr ""
-#~ "La cadena de caracteres `from' en la declaración de elemento de unión contiene\n"
-#~ "un carácter desconocido"
-
-#~ msgid "buffer overflow"
-#~ msgstr "desbordamiento de búfer"
+msgid "%s: Error writing %s\n"
+msgstr "%s: Error al escribir %s\n"
-#~ msgid "cannot insert collation element `%.*s'"
-#~ msgstr "no se puede insertar el elemento de unión `%.*s' "
+#: timezone/zic.c:2019
+msgid "no POSIX environment variable for zone"
+msgstr "no hay ninguna variable de entorno POSIX para la zona"
# FUZZY
-#~ msgid "cannot insert new collating symbol definition: %s"
-#~ msgstr "no se puede insertar la nueva definición para el símbolo de unión: %s"
-
-#~ msgid "cannot open database file `%s': %s"
-#~ msgstr "no se puede abrir el fichero de datos `%s': %s"
-
-#~ msgid "category data requested more than once: should not happen"
-#~ msgstr "categoría de datos reclamada más de una vez, no debería ocurrir"
-
-#, fuzzy
-#~ msgid "character L'%s' (index %Zd) in class `%s' must be in class `%s'"
-#~ msgstr "el carácter %s'%s' en la clase `%s' debe estar en la clase `%s'"
-
-#, fuzzy
-#~ msgid "character L'%s' (index %Zd) in class `%s' must not be in class `%s'"
-#~ msgstr "el carácter %s'%s' en la clase `%s' no debe estar en la clase `%s"
-
-#~ msgid "collation element `%.*s' appears more than once: ignore line"
-#~ msgstr "el elemento de unión `%.*s' aparece más de una vez: pasando por alto la línea"
-
-#~ msgid "collation symbol `%.*s' appears more than once: ignore line"
-#~ msgstr "símbolo de unión `%.*s' aparece más de una vez: descartando la línea"
-
-#~ msgid "collation symbol expected after `%s'"
-#~ msgstr "símbolo de unión esperado después de `%s'"
-
-#~ msgid "duplicate character name `%s'"
-#~ msgstr "nombre de carácter duplicado `%s'"
-
-#~ msgid "duplicate key"
-#~ msgstr "clave duplicada"
-
-#~ msgid "end point of ellipsis range is bigger then start"
-#~ msgstr "el punto de final para el rango de la elipsis es mayor que el de comienzo"
-
-#~ msgid "error while inserting collation element into hash table"
-#~ msgstr "error cuando se insertaba el elemento de unión en la tabla enlazada"
-
-#~ msgid "from-value of `collating-element' must be a string"
-#~ msgstr "el valor `from-value' del elemento de unión ha de ser una cadena de caracteres"
-
-#~ msgid "illegal character constant in string"
-#~ msgstr "carácter ilegal en la cadena"
-
-#~ msgid "illegal collation element"
-#~ msgstr "elemento de unión ilegal"
-
-#~ msgid "incorrectly formatted file"
-#~ msgstr "fichero formateado incorrectamente"
-
-#~ msgid "line after ellipsis must contain character definition"
-#~ msgstr "la línea de después de la elipsis tiene que contener una definición de carácter"
-
-#~ msgid "line before ellipsis does not contain definition for character constant"
-#~ msgstr ""
-#~ "la línea posterior a la elipsis no contiene una definición para una constante\n"
-#~ "de caracteres"
-
-#~ msgid "locale file `%s', used in `copy' statement, not found"
-#~ msgstr "fichero de locales `%s', que se usa en una orden `copy', no se encuentra"
-
-# ¿repertorio?
-#~ msgid "no repertoire map specified: cannot proceed"
-#~ msgstr "no se ha especificado ninguna asignación de repertorio: no se puede continuar"
-
-#~ msgid "no weight defined for symbol `%s'"
-#~ msgstr "no hay ningún peso definido para el símbolo `%s'"
-
-#~ msgid "problems while reading `%s'"
-#~ msgstr "problemas mientras se leía `%s'"
-
-#~ msgid "symbol for multicharacter collating element `%.*s' duplicates other symbol definition"
-#~ msgstr ""
-#~ "el símbolo para el elemento de unión multicarácter `%.*s' repite la definición\n"
-#~ "de otro símbolo"
-
-#~ msgid "symbol for multicharacter collating element `%.*s' duplicates symbol definition"
-#~ msgstr ""
-#~ "el símbolo para el elemento de unión multicarácter `%.*s' repite la definición\n"
-#~ "de otro símbolo"
+#: timezone/zic.c:2176
+msgid "can't determine time zone abbreviation to use just after until time"
+msgstr ""
+"No se puede determinar la abreviación de zona horaria que se usará justo\n"
+"después"
-#~ msgid "symbol for multicharacter collating element `%.*s' duplicates symbolic name in charset"
-#~ msgstr ""
-#~ "el símbolo para el elemento de unión multicarácter `%.*s' repite otro nombre\n"
-#~ "de símbolo en el conjunto de caracteres"
+#: timezone/zic.c:2222
+msgid "too many transitions?!"
+msgstr "¡¿demasiadas transiciones?!"
-#~ msgid "syntax error in `order_start' directive"
-#~ msgstr "error de sintaxis en la directiva `order_start'"
+#: timezone/zic.c:2241
+msgid "internal error - addtype called with bad isdst"
+msgstr "error interno - se llamó a `addtype' con un `isdst' erróneo"
-#~ msgid "syntax error in character class definition"
-#~ msgstr "error de sintaxis en el nombre de clase de carácter"
+#: timezone/zic.c:2245
+msgid "internal error - addtype called with bad ttisstd"
+msgstr "error interno - se llamó a `addtype' con un `ttisstd' erróneo"
-#~ msgid "syntax error in collating order definition"
-#~ msgstr "error de sintaxis en la definición del orden de unión"
+#: timezone/zic.c:2249
+msgid "internal error - addtype called with bad ttisgmt"
+msgstr "error interno - se llamó a `addtype' con un `ttisgmt' erróneo"
-#~ msgid "syntax error in collation definition"
-#~ msgstr "error de sintaxis en la definición de la unión"
+#: timezone/zic.c:2268
+msgid "too many local time types"
+msgstr "demasiados tipos de hora local"
-#~ msgid "syntax error in definition of LC_CTYPE category"
-#~ msgstr "error de sintaxis en una definición de categoría LC_CTYPE"
+#: timezone/zic.c:2272
+msgid "UTC offset out of range"
+msgstr "desplazamiento UTC fuera de rango"
-#~ msgid "syntax error in message locale definition"
-#~ msgstr "error de sintaxis en la definición de local para mensajes"
+#: timezone/zic.c:2300
+msgid "too many leap seconds"
+msgstr "demasiados segundos intercalares"
-#~ msgid "syntax error in monetary locale definition"
-#~ msgstr "error de sintaxis en la definición de local para moneda"
+#: timezone/zic.c:2306
+msgid "repeated leap second moment"
+msgstr "segundo intercalar repetido"
-#~ msgid "syntax error in numeric locale definition"
-#~ msgstr "error de sintaxis en la definición de local para números"
+# # Otra opción, resultado incongruente al ejecutar la orden em
+#: timezone/zic.c:2358
+msgid "Wild result from command execution"
+msgstr "Resultado salvaje en la ejecución de la orden"
-#~ msgid "syntax error in order specification"
-#~ msgstr "error de sintaxis en la especificación de orden"
+# FIXME: `%s'
+#: timezone/zic.c:2359
+#, c-format
+msgid "%s: command was '%s', result was %d\n"
+msgstr "%s: la orden fue `%s', el resultado fue %d\n"
-#~ msgid "syntax error in time locale definition"
-#~ msgstr "error de sintaxis en la definición de local para la hora"
+#: timezone/zic.c:2457
+msgid "Odd number of quotation marks"
+msgstr "Número impar de comillas"
-#~ msgid "too many character classes defined"
-#~ msgstr "demasiadas clases de caracteres definidas"
+# FIXME: non leap-year -> non-leap year.
+# A lo mejor si pones "veintinueve de febrero" o "29 de febrero"
+# se entiende mejor. no sé. sv
+# Si, estas pensando lo mismo que yo, 29 de febrero puede confundir, porque
+# en el fichero pondrá 2/29 em
+#: timezone/zic.c:2546
+msgid "use of 2/29 in non leap-year"
+msgstr "uso de 2/29 en un año no bisiesto"
-#~ msgid "too many weights"
-#~ msgstr "¡demasiados pesos!"
+#: timezone/zic.c:2581
+msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
+msgstr "la regla sobrepasa el comienzo/final del mes--no funcionará con versiones de zic anteriores a 2004"
-#~ msgid "two lines in a row containing `...' are not allowed"
-#~ msgstr "no están permitidas dos líneas en una misma fila con `...'"
+#: timezone/zic.c:2613
+msgid "time zone abbreviation lacks alphabetic at start"
+msgstr "la abreviatura de la zona horaria no comienza con un carácter alfabético"
-#~ msgid "unknown character in field `%s' of category `%s'"
-#~ msgstr "carácter no reconocido en el campo `%s' de la categoría `%s'"
+#: timezone/zic.c:2615
+msgid "time zone abbreviation has more than 3 alphabetics"
+msgstr "la abreviatura de la zona horaria tiene más de 3 caracteres alfabéticos"
-# FUZZY em+
-#~ msgid "unknown collation directive"
-#~ msgstr "la directiva de unión es desconocida"
-
-#~ msgid "unterminated weight name"
-#~ msgstr "nombre de peso sin terminar"
-
-#~ msgid "value for <%s> must lie between 1 and 4"
-#~ msgstr "el valor para <%s> debe estar entre 1 y 4"
-
-#~ msgid "while reading database"
-#~ msgstr "al leer el fichero de datos"
-
-#~ msgid "while writing database file"
-#~ msgstr "al escribir la base de datos"
-
-#~ msgid "symbol for multicharacter collating element `%.*s' duplicates other element definition"
-#~ msgstr ""
-#~ "el símbolo para el elemento de unión multicarácter `%.*s' repite la definición\n"
-#~ "de otro elemento"
-
-#~ msgid "Filesize limit exceeded"
-#~ msgstr "Superado el límite de tamaño de fichero"
-
-#~ msgid "Trace/BPT trap"
-#~ msgstr "`trap' para seguimiento/BPT"
-
-#~ msgid ""
-#~ "Usage: %s [OPTION]... -o OUTPUT-FILE [INPUT-FILE]...\n"
-#~ " %s [OPTION]... [OUTPUT-FILE [INPUT-FILE]...]\n"
-#~ "Mandatory arguments to long options are mandatory for short options too.\n"
-#~ " -H, --header=NAME create C header file NAME containing symbol definitions\n"
-#~ " -h, --help display this help and exit\n"
-#~ " --new do not use existing catalog, force new output file\n"
-#~ " -o, --output=NAME write output to file NAME\n"
-#~ " -V, --version output version information and exit\n"
-#~ "If INPUT-FILE is -, input is read from standard input. If OUTPUT-FILE\n"
-#~ "is -, output is written to standard output.\n"
-#~ msgstr ""
-#~ "Modo de empleo: %s [OPCIÓN]... -o FICHERO-SALIDA [FICHERO-ENTRADA]...\n"
-#~ " %s [OPCIÓN]... [FICHERO-SALIDA [FICHERO-ENTRADA]...]\n"
-#~ "Los argumentos obligatorios para las opciones largas son también obligatorios\n"
-#~ "para las opciones cortas.\n"
-#~ " -H, --header=NOMBRE crea el fichero NOMBRE de cabeceras C con las definiciones de\n"
-#~ " los símbolos\n"
-#~ " -h, --help muestra esta ayuda y finaliza\n"
-#~ " --new no usa el catálogo existente, crea un nuevo fichero\n"
-#~ " de salida\n"
-#~ " -o, --output=NOMBRE escribe el resultado en el fichero NOMBRE\n"
-#~ " -V, --version informa de la versión y finaliza\n"
-#~ "Si FICHERO-ENTRADA es -, la entrada se lee de la entrada estándar.\n"
-#~ "Si FICHERO-SALIDA es -, el resultado se escribe en la salida estándar.\n"
-
-#~ msgid ""
-#~ "Usage: %s [OPTION]... INPUT-FILE OUTPUT-FILE\n"
-#~ " %s [OPTION]... -o OUTPUT-FILE INPUT-FILE\n"
-#~ " %s [OPTION]... -u INPUT-FILE\n"
-#~ "Mandatory arguments to long options are mandatory for short options too.\n"
-#~ " -f, --fold-case convert key to lower case\n"
-#~ " -h, --help display this help and exit\n"
-#~ " -o, --output=NAME write output to file NAME\n"
-#~ " --quiet don't print messages while building database\n"
-#~ " -u, --undo print content of database file, one entry a line\n"
-#~ " -V, --version output version information and exit\n"
-#~ "If INPUT-FILE is -, input is read from standard input.\n"
-#~ msgstr ""
-#~ "Modo de empleo: %s [OPCIÓN]... FICHERO-ENTRADA FICHERO-SALIDA\n"
-#~ " %s [OPCIÓN]... -o FICHERO-SALIDA FICHERO-ENTRADA\n"
-#~ " %s [OPCIÓN]... -u FICHERO-ENTRADA\n"
-#~ "Los argumentos obligatorios para las opciones largas son también obligatorios\n"
-#~ "para las opciones cortas.\n"
-#~ " -f, --fold-case convierte las claves a minúsculas\n"
-#~ " -h, --help Muestra esta ayuda y finaliza\n"
-#~ " -o, --output=FICHERO escribe el resultado en el fichero FICHERO\n"
-#~ " --quiet no muestra mensajes al construir la base de datos\n"
-#~ " -u, --undo muestra el contenido del fichero de datos, una\n"
-#~ " entrada por línea\n"
-#~ " -V, --version informa de la versión y finaliza\n"
-#~ "Si FICHERO-ENTRADA es -, la entrada se lee de la entrada estándar.\n"
-
-#~ msgid ""
-#~ "Usage: %s [OPTION]... name\n"
-#~ "Mandatory arguments to long options are mandatory for short options too.\n"
-#~ " -c, --force create output even if warning messages were issued\n"
-#~ " -h, --help display this help and exit\n"
-#~ " -f, --charmap=FILE symbolic character names defined in FILE\n"
-#~ " -i, --inputfile=FILE source definitions are found in FILE\n"
-#~ " -u, --code-set-name=NAME specify code set for mapping ISO 10646 elements\n"
-#~ " -v, --verbose print more messages\n"
-#~ " -V, --version output version information and exit\n"
-#~ " --posix be strictly POSIX conform\n"
-#~ "\n"
-#~ "System's directory for character maps: %s\n"
-#~ " locale files : %s\n"
-#~ msgstr ""
-#~ "Modo de empleo: %s [OPCIÓN]... nombre\n"
-#~ "Los argumentos obligatorios para las opciones largas son también obligatorios\n"
-#~ "para las opciones cortas.\n"
-#~ " -c, --force crea el resultado incluso si existieron mensajes\n"
-#~ " de aviso\n"
-#~ " -h, --help muestra esta ayuda y finaliza\n"
-#~ " -f, --charmap=FICHERO los nombres símbólicos de caracteres se encuentran\n"
-#~ " en FICHERO\n"
-#~ " -i, --inputfile=FICHERO las definiciones fuente se encuentran en FICHERO\n"
-#~ " -u, --code-set-name=NOMBRE especifica el conjunto de códigos para asignar\n"
-#~ " los elementos ISO 10646\n"
-#~ " -v, --verbose incrementa el número de mensajes mostrados\n"
-#~ " -V, --version informa de la versión y finaliza\n"
-#~ " --posix atiende estrictamente las especificaciones POSIX\n"
-#~ "\n"
-#~ "Directorio del sistema para las tablas de caracteres:\n"
-#~ "%s\n"
-#~ " los ficheros de locales:\n"
-#~ "%s\n"
-
-#~ msgid ""
-#~ "Usage: %s [OPTION]... name\n"
-#~ "Mandatory arguments to long options are mandatory for short options too.\n"
-#~ " -h, --help display this help and exit\n"
-#~ " -V, --version output version information and exit\n"
-#~ "\n"
-#~ " -a, --all-locales write names of available locales\n"
-#~ " -m, --charmaps write names of available charmaps\n"
-#~ "\n"
-#~ " -c, --category-name write names of selected categories\n"
-#~ " -k, --keyword-name write names of selected keywords\n"
-#~ msgstr ""
-#~ "Modo de empleo: %s [OPCIÓN]... nombre\n"
-#~ "Los argumentos para las opciones largas son tambien obligatorios para las\n"
-#~ "opciones cortas.\n"
-#~ " -h, --help muestra esta ayuda y finaliza\n"
-#~ " -V, --version informa de la versión y finaliza\n"
-#~ "\n"
-#~ " -a, --all-locales muestra los nombres de todos los locales disponibles\n"
-#~ " -m, --charmaps muestra los nombres de todas las tablas de caracteres\n"
-#~ " disponibles\n"
-#~ "\n"
-#~ " -c, --category-name muestra los nombres de las categorías seleccionadas\n"
-#~ " -k, --keyword-name muestra los nombres de las palabras clave seleccionadas\n"
-
-#~ msgid "values for field `%s' in category `%s' must not be zero"
-#~ msgstr "el valor para el campo `%s' en la categoría `%s' no debe ser cero"
-
-#~ msgid "while opening UTMP file"
-#~ msgstr "al abrir el fichero UTMP"
-
-#~ msgid "YPBINDPROC_DOMAIN: No server for domain %s\n"
-#~ msgstr "YPBINDPROC_DOMAIN: No hay servidor para el dominio %s\n"
-
-#~ msgid "YPBINDPROC_DOMAIN: Resource allocation failure\n"
-#~ msgstr "YPBINDPROC_DOMAIN: Fallo en la asignación de recursos\n"
-
-#~ msgid "yp_all: clnttcp_create failed"
-#~ msgstr "yp_all: ha fallado la llamada a 'clnttcp_create()'"
-
-#~ msgid "character `%c' not defined while needed as default value"
-#~ msgstr "el carácter `%c' no está definido cuando se necesitó como valor por defecto"
-
-#~ msgid "couldn't do tcp_create\n"
-#~ msgstr "no se ha podido ejecutar tcp_create\n"
-
-#~ msgid "couldn't do udp_create\n"
-#~ msgstr "no se pudo ejecutar udp_create\n"
-
-#~ msgid "portmap CALLIT: cannot fork.\n"
-#~ msgstr "portmap CALLIT: llamada a fork() sin éxito\n"
-
-#~ msgid "portmap cannot create socket"
-#~ msgstr "el mapeador de puertos `portmap' no ha podido crear el `socket'"
-
-#~ msgid "run_svc returned unexpectedly\n"
-#~ msgstr "run_svc terminó inesperadamente\n"
-
-# A los "arrays" les digo matrices. Igual en América se dice de otra forma.
-# Creo que habría que consultarlo. SV.
-# Echando mano de los fuentes, está claro que se refiere a un array de
-# caracteres, ¿Cadena de caracteres?, si claro. EM
-# Pues no, puede ser ambas cosas, o un array de caracteres, o una cadena.
-# ¿por qué te comes la palabra "declaración"?
-# ¿Qué tal "esperada una declaración de `array'"? sv
-# Una declaración de array es> "char *a" por ejemplo. Lo que espera
-# es algo así>"pepe" , escrito en un fichero de texto, con toda
-# seguridad ( consulté los fuentes ) em
-# Creí que una declaración y una constante eran cosas distintas. sv
-# ¿Está mal el original inglés? sv
-# Desde luego que esta mal, o poco claro al menos. Estoy convencido
-# de que la traducción mejora una vez más al original. em
-#~ msgid "array declaration expected"
-#~ msgstr "esperado un array"
-
-#~ msgid "definition keyword expected"
-#~ msgstr "esperada una palabra clave"
-
-#~ msgid "expected '%s'"
-#~ msgstr "se esperaba `%s'"
-
-#~ msgid "expected '%s' or '%s'"
-#~ msgstr "se esperaba `%s' ó `%s' "
-
-#~ msgid "expected '%s', '%s' or '%s'"
-#~ msgstr "se esperaba `%s', `%s' ó `%s'"
-
-#~ msgid "expected type specifier"
-#~ msgstr "esperado especificador de tipo"
-
-#~ msgid "no array-of-pointer declarations -- use typedef"
-#~ msgstr "no existe ninguna declaración de array-of-pointer -- usar typedef"
-
-# "array" es "array"?
-# Lo miro con cuidado, los ficheros rpc_*.c de la libc son especialmente
-# complicados. Sí, creo que se refiere a los aliases de servicios rpc, y
-# efectivamente es un array de longitud variable. No se me ocurriría
-# traducirlo de otra forma, yo no lo entendería mejor que así.
-# otra vez está ausente la "declaración", ¿no habría que ponerla? sv
-# rpc_parse contiene las funciones para 'parsear' un fichero de config. em
-# Habrá que inventar algo para 'parsear' ... sv
-# Los alemanes dicen parsen, habe geparst em, quizá comprobar
-# sintaxis o interpretar ? ( parsear es ambas cosas juntas, no ? ) em
-# Creo que "examinar" podría valer, al menos para empezar. sv
-#
-# Sugerencia: "esperado un..." -> "se esperaba un..." sv
-#~ msgid "variable-length array declaration expected"
-#~ msgstr "esperado un array de longitud variable"
+#: timezone/zic.c:2617
+msgid "time zone abbreviation has too many alphabetics"
+msgstr "la abreviatura de la zona horaria tiene demasiados caracteres alfabéticos"
-#~ msgid "voids allowed only inside union and program definitions"
-#~ msgstr "voids sólo se permiten dentro de las definiciones de uniones y de programa"
+#: timezone/zic.c:2627
+msgid "time zone abbreviation differs from POSIX standard"
+msgstr "la abreviatura de la zona horaria difiere del estándar POSIX"
-# Probablemente la traducción de path sería algo así
-# como "ruta de búsqueda" sv
-# por cierto: ¿qué son los niveles de "remote"? sv
-# Niveles de profundidad ?, ver fuentes em ??
-#~ msgid "Too many levels of remote in path"
-#~ msgstr "Demasiados niveles en el `path'"
+#: timezone/zic.c:2639
+msgid "too many, or too long, time zone abbreviations"
+msgstr "demasiadas abreviaturas de zona horaria, o demasiado largas"
-#~ msgid "illegal result type"
-#~ msgstr "tipo resultante no válido"
+#: timezone/zic.c:2680
+#, c-format
+msgid "%s: Can't create directory %s: %s\n"
+msgstr "%s: No se puede crear el directorio %s: %s\n"
-#~ msgid "too many files!\n"
-#~ msgstr "¡demasiados ficheros!\n"
+#: timezone/zic.c:2702
+#, c-format
+msgid "%s: %d did not sign extend correctly\n"
+msgstr "%s: %d no extendió el signo correctamente\n"
diff --git a/po/it.po b/po/it.po
index 4334bc9004..deb4650678 100644
--- a/po/it.po
+++ b/po/it.po
@@ -1,18 +1,19 @@
# Italian translation of GNU libc.
-# Copyright (C) 1999, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2010, 2011 Free Software Foundation, Inc.
# This file is distributed under the same license as the glibc package.
#
# Marco d'Itri <md@linux.it>, 1999.
-# Sergio Zanchetta <primes2h@ubuntu.com>, 2010.
+# Sergio Zanchetta <primes2h@ubuntu.com>, 2010, 2011.
#
msgid ""
msgstr ""
-"Project-Id-Version: libc-2.11.1\n"
+"Project-Id-Version: libc-2.14\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-02-06 12:40-0800\n"
-"PO-Revision-Date: 2010-11-30 11:33+0100\n"
+"POT-Creation-Date: 2011-05-31 00:06-0400\n"
+"PO-Revision-Date: 2011-10-17 14:21+0200\n"
"Last-Translator: Sergio Zanchetta <primes2h@ubuntu.com>\n"
"Language-Team: Italian <tp@lists.linux.it>\n"
+"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
@@ -35,7 +36,7 @@ msgstr "Spazzatura in ARGP_HELP_FMT: %s"
#: argp/argp-help.c:1215
msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
-msgstr "Gli argomenti obbligatori o facoltativi per le opzioni lunghe lo sono anche per tutte le corrispondenti opzioni corte."
+msgstr "Gli argomenti obbligatori o facoltativi per le opzioni lunghe lo sono anche per tutte le relative opzioni corte."
#: argp/argp-help.c:1601
msgid "Usage:"
@@ -97,15 +98,19 @@ msgstr "%s: troppi argomenti\n"
msgid "(PROGRAM ERROR) Option should have been recognized!?"
msgstr "(ERRORE DEL PROGRAMMA) L'opzione avrebbe dovuto essere riconosciuta."
-#: assert/assert-perr.c:57
+#: assert/assert-perr.c:37
#, c-format
msgid "%s%s%s:%u: %s%sUnexpected error: %s.\n"
msgstr "%s%s%s:%u: %s%serrore inatteso: %s.\n"
-#: assert/assert.c:57
+#: assert/assert.c:105
#, c-format
-msgid "%s%s%s:%u: %s%sAssertion `%s' failed.\n"
-msgstr "%s%s%s:%u: %s%sasserzione \"%s\" non riuscita.\n"
+msgid ""
+"%s%s%s:%u: %s%sAssertion `%s' failed.\n"
+"%n"
+msgstr ""
+"%s%s%s:%u: %s%sasserzione \"%s\" non riuscita.\n"
+"%n"
#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:100 nss/makedb.c:61
msgid "NAME"
@@ -144,14 +149,13 @@ msgstr ""
"[FILE-OUTPUT [FILE-INPUT]...]"
#: catgets/gencat.c:232 debug/pcprofiledump.c:208 debug/xtrace.sh:58
-#: elf/ldconfig.c:302 elf/ldd.bash.in:56 elf/sln.c:86 elf/sprof.c:360
-#: iconv/iconv_prog.c:408 iconv/iconvconfig.c:380 locale/programs/locale.c:278
-#: locale/programs/localedef.c:371 login/programs/pt_chown.c:88
-#: malloc/memusage.sh:65 malloc/memusagestat.c:533 nscd/nscd.c:415
-#: nss/getent.c:842 nss/makedb.c:231 posix/getconf.c:1030
-#: sunrpc/rpc_main.c:1494 sunrpc/rpcinfo.c:699
+#: elf/ldconfig.c:302 elf/ldd.bash.in:56 elf/sln.c:86 elf/sotruss.ksh:49
+#: elf/sprof.c:371 iconv/iconv_prog.c:408 iconv/iconvconfig.c:380
+#: locale/programs/locale.c:278 locale/programs/localedef.c:371
+#: login/programs/pt_chown.c:92 malloc/memusage.sh:65
+#: malloc/memusagestat.c:539 nscd/nscd.c:415 nss/getent.c:918 nss/makedb.c:231
+#: posix/getconf.c:1122 sunrpc/rpc_main.c:1492 sunrpc/rpcinfo.c:691
#: sysdeps/unix/sysv/linux/lddlibc4.c:62
-#, c-format
msgid ""
"For bug reporting instructions, please see:\n"
"<http://www.gnu.org/software/libc/bugs.html>.\n"
@@ -160,11 +164,11 @@ msgstr ""
"<http://www.gnu.org/software/libc/bugs.html>.\n"
#: catgets/gencat.c:246 debug/pcprofiledump.c:222 debug/xtrace.sh:66
-#: elf/ldconfig.c:316 elf/ldd.bash.in:39 elf/sprof.c:375
+#: elf/ldconfig.c:316 elf/ldd.bash.in:39 elf/sotruss.ksh:76 elf/sprof.c:386
#: iconv/iconv_prog.c:423 iconv/iconvconfig.c:395 locale/programs/locale.c:293
-#: locale/programs/localedef.c:387 login/programs/pt_chown.c:59
-#: malloc/memusage.sh:73 malloc/memusagestat.c:551 nscd/nscd.c:429
-#: nss/getent.c:81 nss/makedb.c:245 posix/getconf.c:1012
+#: locale/programs/localedef.c:387 login/programs/pt_chown.c:63
+#: malloc/memusage.sh:73 malloc/memusagestat.c:557 nscd/nscd.c:429
+#: nss/getent.c:87 nss/makedb.c:245 posix/getconf.c:1104
#: sysdeps/unix/sysv/linux/lddlibc4.c:69
#, c-format
msgid ""
@@ -179,11 +183,11 @@ msgstr ""
# lf
#: catgets/gencat.c:251 debug/pcprofiledump.c:227 debug/xtrace.sh:70
-#: elf/ldconfig.c:321 elf/sprof.c:381 iconv/iconv_prog.c:428
+#: elf/ldconfig.c:321 elf/sprof.c:392 iconv/iconv_prog.c:428
#: iconv/iconvconfig.c:400 locale/programs/locale.c:298
#: locale/programs/localedef.c:392 malloc/memusage.sh:77
-#: malloc/memusagestat.c:556 nscd/nscd.c:434 nss/getent.c:86 nss/makedb.c:250
-#: posix/getconf.c:1017
+#: malloc/memusagestat.c:562 nscd/nscd.c:434 nss/getent.c:92 nss/makedb.c:250
+#: posix/getconf.c:1109
#, c-format
msgid "Written by %s.\n"
msgstr "Scritto da %s.\n"
@@ -202,7 +206,7 @@ msgstr "impossibile aprire il file di input \"%s\""
# lf
#: catgets/gencat.c:417 catgets/gencat.c:494
msgid "illegal set number"
-msgstr "numero di set illecito"
+msgstr "numero di set non consentito"
# lf
#: catgets/gencat.c:444
@@ -319,13 +323,13 @@ msgstr "dimensione puntatore non valida"
msgid "Usage: xtrace [OPTION]... PROGRAM [PROGRAMOPTION]...\\n"
msgstr "Uso: xtrace [OPZIONE]... PROGRAMMA [OPZIONEPROGRAMMA]...\\n"
-#: debug/xtrace.sh:33
-msgid "Try \\`xtrace --help' for more information.\\n"
-msgstr "Usare \\\"xtrace --help\" per ulteriori informazioni.\\n"
+#: debug/xtrace.sh:33 malloc/memusage.sh:27
+msgid "Try \\`%s --help' or `%s --usage' for more information.\\n"
+msgstr "Usare \\\"%s --help\" o \"%s --usage\" per ulteriori informazioni.\\n"
#: debug/xtrace.sh:39
-msgid "xtrace: option \\`$1' requires an argument.\\n"
-msgstr "xtrace: l'opzione \\\"$1\" richiede un argomento.\\n"
+msgid "%s: option '%s' requires an argument.\\n"
+msgstr "%s: l'opzione \"%s\" richiede un argomento\\n"
#: debug/xtrace.sh:46
msgid ""
@@ -406,7 +410,7 @@ msgstr "Sistema operativo sconosciuto"
msgid ", OS ABI: %s %d.%d.%d"
msgstr ", ABI del sistema operativo: %s %d.%d.%d"
-#: elf/cache.c:134 elf/ldconfig.c:1289
+#: elf/cache.c:134 elf/ldconfig.c:1305
#, c-format
msgid "Can't open cache file %s\n"
msgstr "Impossibile aprire il file di cache %s\n"
@@ -451,12 +455,12 @@ msgstr "Rinomina di %s a %s non riuscita"
# lf
#
-#: elf/dl-close.c:378 elf/dl-open.c:460
+#: elf/dl-close.c:387 elf/dl-open.c:397
msgid "cannot create scope list"
msgstr "impossibile creare l'elenco di ambito"
# lf
-#: elf/dl-close.c:725
+#: elf/dl-close.c:767
msgid "shared object not open"
msgstr "oggetto condiviso non aperto"
@@ -465,7 +469,7 @@ msgstr "oggetto condiviso non aperto"
msgid "DST not allowed in SUID/SGID programs"
msgstr "DST non consentito in programmi SUID/SGID"
-#: elf/dl-deps.c:127 elf/dl-open.c:282
+#: elf/dl-deps.c:127
msgid "empty dynamic string token substitution"
msgstr "sostituzione del token di stringa dinamica vuoto"
@@ -480,12 +484,12 @@ msgid "cannot allocate dependency list"
msgstr "impossibile allocare l'elenco delle dipendenze"
# lf
-#: elf/dl-deps.c:510 elf/dl-deps.c:565
+#: elf/dl-deps.c:514 elf/dl-deps.c:574
msgid "cannot allocate symbol search list"
msgstr "impossibile allocare l'elenco della ricerca simboli"
# lf
-#: elf/dl-deps.c:550
+#: elf/dl-deps.c:554
msgid "Filters not supported with LD_TRACE_PRELINKING"
msgstr "Filtri non supportati con LD_TRACE_PRELINKING"
@@ -511,239 +515,248 @@ msgid "internal error: symidx out of range of fptr table"
msgstr "errore interno: symidx fuori dall'intervallo della tabella fptr"
# lf
-#: elf/dl-load.c:372
+#: elf/dl-load.c:471
msgid "cannot allocate name record"
msgstr "impossibile allocare il record dei nomi"
# lf
-#: elf/dl-load.c:474 elf/dl-load.c:582 elf/dl-load.c:667 elf/dl-load.c:780
+#: elf/dl-load.c:548 elf/dl-load.c:664 elf/dl-load.c:749 elf/dl-load.c:862
msgid "cannot create cache for search path"
msgstr "impossibile creare la cache per il percorso di ricerca"
# lf
-#: elf/dl-load.c:565
+#: elf/dl-load.c:639
msgid "cannot create RUNPATH/RPATH copy"
msgstr "impossibile creare la copia di RUNPATH/RPATH"
# lf
-#: elf/dl-load.c:653
+#: elf/dl-load.c:735
msgid "cannot create search path array"
msgstr "impossibile creare l'array dei percorsi di ricerca"
# lf
-#: elf/dl-load.c:864
+#: elf/dl-load.c:931
msgid "cannot stat shared object"
msgstr "impossibile fare stat sull'oggetto condiviso"
-#: elf/dl-load.c:934
+#: elf/dl-load.c:1009
msgid "cannot open zero fill device"
msgstr "impossibile aprire il device riempito con zeri"
# lf
-#: elf/dl-load.c:979 elf/dl-load.c:2215
+#: elf/dl-load.c:1055 elf/dl-load.c:2313
msgid "cannot create shared object descriptor"
msgstr "impossibile creare il descrittore di oggetto condiviso"
# lf
-#: elf/dl-load.c:998 elf/dl-load.c:1647 elf/dl-load.c:1739
+#: elf/dl-load.c:1074 elf/dl-load.c:1730 elf/dl-load.c:1833
msgid "cannot read file data"
msgstr "impossibile leggere il file di dati"
# lf
-#: elf/dl-load.c:1042
+#: elf/dl-load.c:1120
msgid "ELF load command alignment not page-aligned"
msgstr "comando di caricamento ELF non allineato alla pagina"
# lf
-#: elf/dl-load.c:1049
+#: elf/dl-load.c:1127
msgid "ELF load command address/offset not properly aligned"
msgstr "indirizzo/offset del comando di caricamento ELF non propriamente allineato"
# lf
-#: elf/dl-load.c:1132
+#: elf/dl-load.c:1210
msgid "cannot allocate TLS data structures for initial thread"
msgstr "impossibile allocare strutture dati TLS per il thread iniziale"
# lf
-#: elf/dl-load.c:1155
+#: elf/dl-load.c:1233
msgid "cannot handle TLS data"
msgstr "impossibile gestire i dati TLS"
# lf
-#: elf/dl-load.c:1174
+#: elf/dl-load.c:1252
msgid "object file has no loadable segments"
msgstr "il file oggetto non presenta segmenti caricabili"
# lf
-#: elf/dl-load.c:1210
+#: elf/dl-load.c:1288
msgid "failed to map segment from shared object"
msgstr "mappatura del segmento dall'oggetto condiviso non riuscita"
# lf
-#: elf/dl-load.c:1236
+#: elf/dl-load.c:1314
msgid "cannot dynamically load executable"
msgstr "impossibile caricare dinamicamente l'eseguibile"
# lf
-#: elf/dl-load.c:1298
+#: elf/dl-load.c:1376
msgid "cannot change memory protections"
msgstr "impossibile cambiare le protezioni della memoria"
# lf
#
-#: elf/dl-load.c:1317
+#: elf/dl-load.c:1395
msgid "cannot map zero-fill pages"
msgstr "impossibile mappare le pagine riempite con zeri"
# lf
#
-#: elf/dl-load.c:1331
+#: elf/dl-load.c:1409
msgid "object file has no dynamic section"
msgstr "il file oggetto non presenta una sezione dinamica"
# lf
-#: elf/dl-load.c:1354
+#: elf/dl-load.c:1432
msgid "shared object cannot be dlopen()ed"
msgstr "impossibile eseguire dlopen() sull'oggetto condiviso"
# lf
-#: elf/dl-load.c:1367
+#: elf/dl-load.c:1445
msgid "cannot allocate memory for program header"
msgstr "impossibile allocare memoria per l'intestazione di programma"
-#: elf/dl-load.c:1384 elf/dl-open.c:218
+#: elf/dl-load.c:1462 elf/dl-open.c:180
msgid "invalid caller"
msgstr "chiamante non valido"
# lf
-#: elf/dl-load.c:1423
+#: elf/dl-load.c:1501
msgid "cannot enable executable stack as shared object requires"
msgstr "impossibile abilitare lo stack eseguibile come richiesto dall'oggetto condiviso"
-#: elf/dl-load.c:1436
+#: elf/dl-load.c:1514
msgid "cannot close file descriptor"
msgstr "impossibile chiudere il descrittore di file"
# lf
-#: elf/dl-load.c:1647
+#: elf/dl-load.c:1730
msgid "file too short"
msgstr "file troppo corto"
# lf
-#: elf/dl-load.c:1676
+#: elf/dl-load.c:1766
msgid "invalid ELF header"
msgstr "intestazione ELF non valida"
# lf
-#: elf/dl-load.c:1688
+#: elf/dl-load.c:1778
msgid "ELF file data encoding not big-endian"
msgstr "la codifica dati del file ELF non è big-endian"
# lf
-#: elf/dl-load.c:1690
+#: elf/dl-load.c:1780
msgid "ELF file data encoding not little-endian"
msgstr "la codifica dati del file ELF non è little-endian"
-#: elf/dl-load.c:1694
+#: elf/dl-load.c:1784
msgid "ELF file version ident does not match current one"
msgstr "l'identificatore di versione del file ELF non corrisponde a quello attuale"
-#: elf/dl-load.c:1698
+#: elf/dl-load.c:1788
msgid "ELF file OS ABI invalid"
msgstr "ABI del file ELF del sistema operativo non valido"
-#: elf/dl-load.c:1700
+#: elf/dl-load.c:1791
msgid "ELF file ABI version invalid"
msgstr "versione ABI del file ELF non valida"
+#: elf/dl-load.c:1794
+msgid "nonzero padding in e_ident"
+msgstr "riempimento con valori diversi da zero in e_ident"
+
# lf
-#: elf/dl-load.c:1703
+#: elf/dl-load.c:1797
msgid "internal error"
msgstr "errore interno"
-#: elf/dl-load.c:1710
+#: elf/dl-load.c:1804
msgid "ELF file version does not match current one"
msgstr "La versione del file ELF non corrisponde a quella attuale"
# lf
-#: elf/dl-load.c:1718
+#: elf/dl-load.c:1812
msgid "only ET_DYN and ET_EXEC can be loaded"
msgstr "è possibile caricare solo ET_DYN ed ET_EXEC"
-#: elf/dl-load.c:1724
+#: elf/dl-load.c:1818
msgid "ELF file's phentsize not the expected size"
msgstr "La phentsize del file ELF non corrisponde a quella attesa"
-#: elf/dl-load.c:2231
+#: elf/dl-load.c:2332
msgid "wrong ELF class: ELFCLASS64"
msgstr "classe ELF errata: ELFCLASS64"
-#: elf/dl-load.c:2232
+#: elf/dl-load.c:2333
msgid "wrong ELF class: ELFCLASS32"
msgstr "classe ELF errata: ELFCLASS32"
# lf
-#: elf/dl-load.c:2235
+#: elf/dl-load.c:2336
msgid "cannot open shared object file"
msgstr "impossibile aprire il file oggetto condiviso"
# lf
-#: elf/dl-lookup.c:356
+#: elf/dl-lookup.c:757
msgid "relocation error"
msgstr "errore di rilocazione"
-#: elf/dl-lookup.c:384
+#: elf/dl-lookup.c:785
msgid "symbol lookup error"
msgstr "errore nella ricerca del simbolo"
# ls
#
-#: elf/dl-open.c:114
+#: elf/dl-open.c:115
msgid "cannot extend global scope"
msgstr "impossibile estendere l'ambito globale"
-#: elf/dl-open.c:512
+#: elf/dl-open.c:440
msgid "TLS generation counter wrapped! Please report this."
-msgstr "contatore TLS di generazione interrotto. Segnalare questo problema."
+msgstr "contatore TLS di generazione azzerato. Segnalare questo problema."
+
+# lf
+#: elf/dl-open.c:462
+msgid "cannot load any more object with static TLS"
+msgstr "impossibile caricare altri oggetti con un TLS statico"
# ls
-#: elf/dl-open.c:549
+#: elf/dl-open.c:511
msgid "invalid mode for dlopen()"
msgstr "modo non valido per dlopen()"
-#: elf/dl-open.c:566
+#: elf/dl-open.c:528
msgid "no more namespaces available for dlmopen()"
msgstr "nessuno spazio dei nomi disponibile per dlmopen()"
-#: elf/dl-open.c:579
+#: elf/dl-open.c:547
msgid "invalid target namespace in dlmopen()"
msgstr "spazio dei nomi di destinazione non valido in dlmopen()"
# lf
-#: elf/dl-reloc.c:121
+#: elf/dl-reloc.c:120
msgid "cannot allocate memory in static TLS block"
msgstr "impossibile allocare memoria nel blocco statico TLS"
# lf
-#: elf/dl-reloc.c:211
+#: elf/dl-reloc.c:212
msgid "cannot make segment writable for relocation"
msgstr "impossibile rendere il segmento scrivibile per la rilocazione"
-#: elf/dl-reloc.c:277
+#: elf/dl-reloc.c:275
#, c-format
msgid "%s: no PLTREL found in object %s\n"
msgstr "%s: nessun PLTREL trovato nell'oggetto %s\n"
-#: elf/dl-reloc.c:288
+#: elf/dl-reloc.c:286
#, c-format
msgid "%s: out of memory to store relocation results for %s\n"
msgstr "%s: memoria esaurita per memorizzare i risultati della rilocazione per %s\n"
-#: elf/dl-reloc.c:304
+#: elf/dl-reloc.c:302
msgid "cannot restore segment prot after reloc"
msgstr "impossibile ripristinare la protezione del segmento dopo la rilocazione"
-#: elf/dl-reloc.c:329
+#: elf/dl-reloc.c:331
msgid "cannot apply additional memory protection after relocation"
msgstr "impossibile applicare una protezione supplementare della memoria dopo la rilocazione"
@@ -753,15 +766,19 @@ msgid "RTLD_NEXT used in code not dynamically loaded"
msgstr "RTLD_NEXT usato in codice caricato non dinamicamente"
# lf
-#: elf/dl-sysdep.c:481 elf/dl-sysdep.c:493
+#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
msgid "cannot create capability list"
msgstr "impossibile creare l'elenco di capacità"
# lf
-#: elf/dl-tls.c:864
+#: elf/dl-tls.c:861
msgid "cannot create TLS data structures"
msgstr "impossibile creare le strutture dati TLS"
+#: elf/dl-version.c:172
+msgid "version lookup error"
+msgstr "errore nella ricerca della versione"
+
# lf
#: elf/dl-version.c:303
msgid "cannot allocate version reference table"
@@ -784,12 +801,12 @@ msgstr "Non crea la cache"
# lf
#: elf/ldconfig.c:144
msgid "Don't generate links"
-msgstr "Non genera i collegamenti"
+msgstr "Non genera collegamenti"
# lf
#: elf/ldconfig.c:145
msgid "Change to and use ROOT as root directory"
-msgstr "Passa a ROOT come directory di root"
+msgstr "Passa a RADICE come directory di root"
#: elf/ldconfig.c:145
msgid "ROOT"
@@ -850,158 +867,158 @@ msgstr "Percorso \"%s\" fornito più di una volta"
msgid "%s is not a known library type"
msgstr "%s non è un tipo di libreria conosciuto"
-#: elf/ldconfig.c:404
+#: elf/ldconfig.c:407
#, c-format
msgid "Can't stat %s"
msgstr "Impossibile fare stat di %s"
-#: elf/ldconfig.c:478
+#: elf/ldconfig.c:481
#, c-format
msgid "Can't stat %s\n"
msgstr "Impossibile fare stat di %s\n"
# lf
-#: elf/ldconfig.c:488
+#: elf/ldconfig.c:491
#, c-format
msgid "%s is not a symbolic link\n"
msgstr "%s non è un collegamento simbolico\n"
# lf
-#: elf/ldconfig.c:507
+#: elf/ldconfig.c:510
#, c-format
msgid "Can't unlink %s"
msgstr "Impossibile eseguire l'unlink di %s"
# lf
#
-#: elf/ldconfig.c:513
+#: elf/ldconfig.c:516
#, c-format
msgid "Can't link %s to %s"
msgstr "Impossibile collegare %s a %s"
-#: elf/ldconfig.c:519
+#: elf/ldconfig.c:522
msgid " (changed)\n"
msgstr " (cambiato)\n"
-#: elf/ldconfig.c:521
+#: elf/ldconfig.c:524
msgid " (SKIPPED)\n"
msgstr " (SALTATO)\n"
-#: elf/ldconfig.c:576
+#: elf/ldconfig.c:579
#, c-format
msgid "Can't find %s"
msgstr "Impossibile trovare %s"
-#: elf/ldconfig.c:592 elf/ldconfig.c:765 elf/ldconfig.c:813 elf/ldconfig.c:847
+#: elf/ldconfig.c:595 elf/ldconfig.c:768 elf/ldconfig.c:827 elf/ldconfig.c:861
#, c-format
msgid "Cannot lstat %s"
msgstr "Impossibile fare lstat di %s"
# lf
-#: elf/ldconfig.c:599
+#: elf/ldconfig.c:602
#, c-format
msgid "Ignored file %s since it is not a regular file."
msgstr "File %s ignorato poiché non è un file normale."
# lf
#
-#: elf/ldconfig.c:608
+#: elf/ldconfig.c:611
#, c-format
msgid "No link created since soname could not be found for %s"
msgstr "Collegamenti non creati poiché non è stato possibile trovare il soname per %s"
-#: elf/ldconfig.c:691
+#: elf/ldconfig.c:694
#, c-format
msgid "Can't open directory %s"
msgstr "Impossibile aprire la directory %s"
-#: elf/ldconfig.c:779
-#, c-format
-msgid "Cannot stat %s"
-msgstr "Impossibile fare stat di %s"
-
-#: elf/ldconfig.c:834 elf/readlib.c:91
+#: elf/ldconfig.c:786 elf/ldconfig.c:848 elf/readlib.c:91
#, c-format
msgid "Input file %s not found.\n"
msgstr "File di input %s non trovato.\n"
+#: elf/ldconfig.c:793
+#, c-format
+msgid "Cannot stat %s"
+msgstr "Impossibile fare stat di %s"
+
# lf
-#: elf/ldconfig.c:908
+#: elf/ldconfig.c:922
#, c-format
msgid "libc5 library %s in wrong directory"
msgstr "libreria libc5 %s nella directory errata"
# lf
-#: elf/ldconfig.c:911
+#: elf/ldconfig.c:925
#, c-format
msgid "libc6 library %s in wrong directory"
msgstr "libreria libc6 %s nella directory errata"
# lf
-#: elf/ldconfig.c:914
+#: elf/ldconfig.c:928
#, c-format
msgid "libc4 library %s in wrong directory"
msgstr "libreria libc4 %s nella directory errata"
# lf
-#: elf/ldconfig.c:942
+#: elf/ldconfig.c:956
#, c-format
msgid "libraries %s and %s in directory %s have same soname but different type."
msgstr "le librerie %s e %s nella directory %s hanno lo stesso soname, ma di tipo differente."
-#: elf/ldconfig.c:1051
+#: elf/ldconfig.c:1065
#, c-format
msgid "Can't open configuration file %s"
msgstr "Impossibile aprire il file di configurazione %s"
-#: elf/ldconfig.c:1115
+#: elf/ldconfig.c:1129
#, c-format
msgid "%s:%u: bad syntax in hwcap line"
msgstr "%s:%u: sintassi non valida nella riga hwcap"
-#: elf/ldconfig.c:1121
+#: elf/ldconfig.c:1135
#, c-format
msgid "%s:%u: hwcap index %lu above maximum %u"
msgstr "%s:%u: indice hwcap %lu al di sopra del massimo %u"
-#: elf/ldconfig.c:1128 elf/ldconfig.c:1136
+#: elf/ldconfig.c:1142 elf/ldconfig.c:1150
#, c-format
msgid "%s:%u: hwcap index %lu already defined as %s"
msgstr "%s:%u: indice hwcap %lu già definito come %s"
-#: elf/ldconfig.c:1139
+#: elf/ldconfig.c:1153
#, c-format
msgid "%s:%u: duplicate hwcap %lu %s"
msgstr "%s:%u: hwcap %lu duplicato %s"
-#: elf/ldconfig.c:1161
+#: elf/ldconfig.c:1175
#, c-format
msgid "need absolute file name for configuration file when using -r"
msgstr "se viene usato -r è necessario un nome file assoluto per il file di configurazione"
-#: elf/ldconfig.c:1168 locale/programs/xmalloc.c:70 malloc/obstack.c:434
-#: malloc/obstack.c:436 posix/getconf.c:985 posix/getconf.c:1177
+#: elf/ldconfig.c:1182 locale/programs/xmalloc.c:70 malloc/obstack.c:434
+#: malloc/obstack.c:436 posix/getconf.c:1077 posix/getconf.c:1297
#, c-format
msgid "memory exhausted"
msgstr "memoria esaurita"
-#: elf/ldconfig.c:1198
+#: elf/ldconfig.c:1214
#, c-format
msgid "%s:%u: cannot read directory %s"
msgstr "%s:%u: impossibile leggere la directory %s"
# lf
-#: elf/ldconfig.c:1242
+#: elf/ldconfig.c:1258
#, c-format
msgid "relative path `%s' used to build cache"
msgstr "usato il percorso relativo \"%s\" per creare la cache"
-#: elf/ldconfig.c:1268
+#: elf/ldconfig.c:1284
#, c-format
msgid "Can't chdir to /"
msgstr "Impossibile fare chdir a /"
-#: elf/ldconfig.c:1310
+#: elf/ldconfig.c:1325
#, c-format
msgid "Can't open cache file directory %s\n"
msgstr "Impossibile aprire la directory del file di cache %s\n"
@@ -1052,7 +1069,7 @@ msgstr "argomenti relativi al file mancanti"
msgid "No such file or directory"
msgstr "File o directory non esistente"
-#: elf/ldd.bash.in:153 inet/rcmd.c:483
+#: elf/ldd.bash.in:153 inet/rcmd.c:488
msgid "not regular file"
msgstr "non è un file normale"
@@ -1070,7 +1087,7 @@ msgstr "uscito con codice d'uscita sconosciuto"
#: elf/ldd.bash.in:198
msgid "error: you do not have read permission for"
-msgstr "errore: permessi di lettura non sufficienti per"
+msgstr "errore: permessi di lettura mancanti per"
# lf
#: elf/readelflib.c:35
@@ -1170,6 +1187,66 @@ msgstr "%s: destinazione non valida: %s\n"
msgid "Invalid link from \"%s\" to \"%s\": %s\n"
msgstr "collegamento non valido da \"%s\" a \"%s\": %s\n"
+#: elf/sotruss.ksh:33
+#, sh-format
+msgid ""
+"Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n"
+" -F, --from FROMLIST trace calls from objects on FORMLIST\n"
+" -T, --to TOLIST trace calls to objects on TOLIST\n"
+"\n"
+" -e, --exit also show exits from the function calls\n"
+" -f, --follow trace child processes\n"
+" -o, --output FILENAME write output to FILENAME (or FILENAME.$PID in case\n"
+"\t\t\t -f is also used) instead of standard error\n"
+"\n"
+" --help print this help and exit\n"
+" --version print version information and exit"
+msgstr ""
+"Usage: sotruss [OPZIONi...] [--] ESEGUIBILE [OPZIONI-ESEGUIBILE...]\n"
+" -F, --from DAELENCO Traccia le chiamate dagli oggetti presenti nel DAELENCO\n"
+" -T, --to AELENCO Traccia le chiamate agli oggetti presenti nel AELENCO\n"
+"\n"
+" -e, --exit Mostra anche le uscite dalle chiamate alla funzione\n"
+" -f, --follow Traccia i processi figlio\n"
+" -o, --output NOMEFILE Scrive l'output su NOMEFILE (o NOMEFILE.$PID se viene\n"
+"\t\t\t usato anche -f) invece che sullo standard error\n"
+"\n"
+" --help Stampa questo aiuto ed esce\n"
+" --version Stampa le informazioni sulla versione ed esce"
+
+#: elf/sotruss.ksh:46
+msgid "Mandatory arguments to long options are also mandatory for any corresponding\\nshort options.\\n"
+msgstr "Gli argomenti obbligatori per le opzioni lunghe lo sono anche per tutte le relative\\nopzioni corte.\\n"
+
+#: elf/sotruss.ksh:56
+msgid "%s: option requires an argument -- '%s'\\n"
+msgstr "%s: l'opzione richiede un argomento -- \"%s\"\\n"
+
+#: elf/sotruss.ksh:57 elf/sotruss.ksh:68 elf/sotruss.ksh:134
+msgid "Try \\`%s --help' or \\`%s --usage' for more information.\\n"
+msgstr "Usare \\\"%s --help\" o \"%s --usage\" per ulteriori informazioni.\\n"
+
+#: elf/sotruss.ksh:62
+msgid "%s: option is ambiguous; possibilities:"
+msgstr "%s: l'opzione è ambigua; alternative:"
+
+# lf
+#: elf/sotruss.ksh:80
+msgid "Written by %s.\\n"
+msgstr "Scritto da %s.\\n"
+
+#: elf/sotruss.ksh:87
+msgid ""
+"Usage: %s [-ef] [-F FROMLIST] [-o FILENAME] [-T TOLIST] [--exit]\n"
+"\t [--follow] [--from FROMLIST] [--output FILENAME] [--to TOLIST]\\n"
+msgstr ""
+"Uso: %s [-ef] [-F DAELENCO] [-o NOMEFILE] [-T AELENCO] [--exit]\n"
+"\t [--follow] [--from DAELENCO] [--output NOMEFILE] [--to AELENCO]\\n"
+
+#: elf/sotruss.ksh:133
+msgid "%s: unrecognized option '%c%s'\\n"
+msgstr "%s: opzione non riconosciuta \"%c%s\"\\n"
+
# lf
#: elf/sprof.c:77
msgid "Output selection:"
@@ -1198,100 +1275,100 @@ msgid "SHOBJ [PROFDATA]"
msgstr "OGGCOND [DATIPROF]"
# lf
-#: elf/sprof.c:420
+#: elf/sprof.c:431
#, c-format
msgid "failed to load shared object `%s'"
msgstr "caricamento dell'oggetto condiviso \"%s\" non riuscito"
# lf
-#: elf/sprof.c:429
+#: elf/sprof.c:440
#, c-format
msgid "cannot create internal descriptors"
msgstr "impossibile creare descrittori interni"
# lf
-#: elf/sprof.c:548
+#: elf/sprof.c:559
#, c-format
msgid "Reopening shared object `%s' failed"
msgstr "Riapertura dell'oggetto condiviso \"%s\" non riuscita"
-#: elf/sprof.c:555 elf/sprof.c:649
+#: elf/sprof.c:566 elf/sprof.c:660
#, c-format
msgid "reading of section headers failed"
-msgstr "lettura degli header di sezione non riuscita"
+msgstr "lettura delle intestazioni di sezione non riuscita"
-#: elf/sprof.c:563 elf/sprof.c:657
+#: elf/sprof.c:574 elf/sprof.c:668
#, c-format
msgid "reading of section header string table failed"
-msgstr "lettura della tabella di stringhe degli header di sezione non riuscita"
+msgstr "lettura della tabella di stringhe delle intestazioni di sezione non riuscita"
-#: elf/sprof.c:589
+#: elf/sprof.c:600
#, c-format
msgid "*** Cannot read debuginfo file name: %m\n"
msgstr "*** Impossibile leggere il nome del file debuginfo: %m\n"
-#: elf/sprof.c:609
+#: elf/sprof.c:620
#, c-format
msgid "cannot determine file name"
msgstr "impossibile determinare il nome del file"
-#: elf/sprof.c:642
+#: elf/sprof.c:653
#, c-format
msgid "reading of ELF header failed"
msgstr "lettura dell'intestazione ELF non riuscita"
-#: elf/sprof.c:678
+#: elf/sprof.c:689
#, c-format
msgid "*** The file `%s' is stripped: no detailed analysis possible\n"
msgstr "*** Il file \"%s\" è stato rimosso: impossibile fare l'analisi dettagliata\n"
# lf
-#: elf/sprof.c:708
+#: elf/sprof.c:719
#, c-format
msgid "failed to load symbol data"
msgstr "caricamento dei dati dei simboli non riuscito"
# lf
-#: elf/sprof.c:775
+#: elf/sprof.c:784
#, c-format
msgid "cannot load profiling data"
msgstr "impossibile caricare i dati di profiling"
-#: elf/sprof.c:784
+#: elf/sprof.c:793
#, c-format
msgid "while stat'ing profiling data file"
msgstr "durante lo stat del relativo file"
-#: elf/sprof.c:792
+#: elf/sprof.c:801
#, c-format
msgid "profiling data file `%s' does not match shared object `%s'"
msgstr "il file di dati di profiling \"%s\" non ha corrispondenza con l'oggetto condiviso \"%s\""
# lf
-#: elf/sprof.c:803
+#: elf/sprof.c:812
#, c-format
msgid "failed to mmap the profiling data file"
msgstr "mmap sul file di dati di profiling non riuscito"
# lf
-#: elf/sprof.c:811
+#: elf/sprof.c:820
#, c-format
msgid "error while closing the profiling data file"
msgstr "errore durante la chiusura del file di dati di profiling"
# lf
-#: elf/sprof.c:820 elf/sprof.c:890
+#: elf/sprof.c:829 elf/sprof.c:927
#, c-format
msgid "cannot create internal descriptor"
msgstr "impossibile creare il descrittore interno"
# lf
-#: elf/sprof.c:866
+#: elf/sprof.c:903
#, c-format
msgid "`%s' is no correct profile data file for `%s'"
msgstr "\"%s\" non è il corretto file di dati profilo per \"%s\""
-#: elf/sprof.c:1047 elf/sprof.c:1105
+#: elf/sprof.c:1084 elf/sprof.c:1142
#, c-format
msgid "cannot allocate symbol data"
msgstr "impossibile allocare i dati dei simboli"
@@ -1383,7 +1460,7 @@ msgstr "Stampa informazioni di avanzamento"
#: iconv/iconv_prog.c:74
msgid "Convert encoding of given files from one encoding to another."
-msgstr "Converte in un'altra codifica quella dei file indicati."
+msgstr "Converte la codifica dei file indicati in un'altra."
# lf
#: iconv/iconv_prog.c:78
@@ -1509,71 +1586,71 @@ msgid "cannot generate output file"
msgstr "impossibile generare il file di output"
# lf
-#: inet/rcmd.c:157
+#: inet/rcmd.c:163
msgid "rcmd: Cannot allocate memory\n"
msgstr "rcmd: impossibile allocare memoria\n"
# lf
-#: inet/rcmd.c:172
+#: inet/rcmd.c:178
msgid "rcmd: socket: All ports in use\n"
msgstr "rcmd: socket: tutte le porte in uso\n"
# lf
-#: inet/rcmd.c:200
+#: inet/rcmd.c:206
#, c-format
msgid "connect to address %s: "
msgstr "connessione all'indirizzo %s: "
# lf
-#: inet/rcmd.c:213
+#: inet/rcmd.c:219
#, c-format
msgid "Trying %s...\n"
msgstr "Tentativo su %s...\n"
-#: inet/rcmd.c:249
+#: inet/rcmd.c:255
#, c-format
msgid "rcmd: write (setting up stderr): %m\n"
msgstr "rcmd: write (impostazione stderr): %m\n"
-#: inet/rcmd.c:265
+#: inet/rcmd.c:271
#, c-format
msgid "rcmd: poll (setting up stderr): %m\n"
msgstr "rcmd: poll (impostazione stderr): %m\n"
-#: inet/rcmd.c:268
+#: inet/rcmd.c:274
msgid "poll: protocol failure in circuit setup\n"
msgstr "poll: errore del protocollo nell'impostazione del circuito\n"
-#: inet/rcmd.c:301
+#: inet/rcmd.c:306
msgid "socket: protocol failure in circuit setup\n"
msgstr "socket: errore del protocollo nell'impostazione del circuito\n"
-#: inet/rcmd.c:325
+#: inet/rcmd.c:330
#, c-format
msgid "rcmd: %s: short read"
msgstr "rcmd: %s: lettura breve"
-#: inet/rcmd.c:481
+#: inet/rcmd.c:486
msgid "lstat failed"
msgstr "lstat non riuscita"
-#: inet/rcmd.c:488
+#: inet/rcmd.c:493
msgid "cannot open"
msgstr "impossibile aprire"
-#: inet/rcmd.c:490
+#: inet/rcmd.c:495
msgid "fstat failed"
msgstr "fstat non riuscita"
-#: inet/rcmd.c:492
+#: inet/rcmd.c:497
msgid "bad owner"
msgstr "proprietario errato"
-#: inet/rcmd.c:494
+#: inet/rcmd.c:499
msgid "writeable by other than owner"
msgstr "scrivibile da altri oltre che dal proprietario"
-#: inet/rcmd.c:496
+#: inet/rcmd.c:501
msgid "hard linked somewhere"
msgstr "collegato fisicamente da qualche parte"
@@ -1630,7 +1707,7 @@ msgstr "%s: <mb_cur_max> deve essere maggiore di <mb_cur_min>\n"
#: locale/programs/repertoire.c:174
#, c-format
msgid "syntax error in prolog: %s"
-msgstr "errore di sintassi in prolog: %s"
+msgstr "errore di sintassi nel prologo: %s"
# lf
#: locale/programs/charmap.c:358
@@ -1707,8 +1784,8 @@ msgid "no symbolic name given for end of range"
msgstr "nessun nome simbolico fornito per la fine dell'intervallo"
#: locale/programs/charmap.c:610 locale/programs/ld-address.c:602
-#: locale/programs/ld-collate.c:2767 locale/programs/ld-collate.c:3924
-#: locale/programs/ld-ctype.c:2232 locale/programs/ld-ctype.c:2984
+#: locale/programs/ld-collate.c:2769 locale/programs/ld-collate.c:3927
+#: locale/programs/ld-ctype.c:2257 locale/programs/ld-ctype.c:3009
#: locale/programs/ld-identification.c:452
#: locale/programs/ld-measurement.c:238 locale/programs/ld-messages.c:332
#: locale/programs/ld-monetary.c:943 locale/programs/ld-name.c:307
@@ -1735,8 +1812,8 @@ msgid "%s: error in state machine"
msgstr "%s: errore nella macchina a stati"
#: locale/programs/charmap.c:850 locale/programs/ld-address.c:618
-#: locale/programs/ld-collate.c:2764 locale/programs/ld-collate.c:4117
-#: locale/programs/ld-ctype.c:2229 locale/programs/ld-ctype.c:3001
+#: locale/programs/ld-collate.c:2766 locale/programs/ld-collate.c:4120
+#: locale/programs/ld-ctype.c:2254 locale/programs/ld-ctype.c:3026
#: locale/programs/ld-identification.c:468
#: locale/programs/ld-measurement.c:254 locale/programs/ld-messages.c:348
#: locale/programs/ld-monetary.c:959 locale/programs/ld-name.c:323
@@ -1759,7 +1836,7 @@ msgid "number of bytes for byte sequence of beginning and end of range not the s
msgstr "il numero di byte per la sequenza d'inizio e di fine dell'intervallo non sono gli stessi: %d contro %d"
# lf
-#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3044
+#: locale/programs/charmap.c:993 locale/programs/ld-collate.c:3046
#: locale/programs/repertoire.c:419
msgid "invalid names for character range"
msgstr "nomi non validi per l'intervallo di caratteri"
@@ -1782,8 +1859,8 @@ msgid "resulting bytes for range not representable."
msgstr "i byte risultanti per l'intervallo non sono rappresentabili."
# lf
-#: locale/programs/ld-address.c:135 locale/programs/ld-collate.c:1556
-#: locale/programs/ld-ctype.c:420 locale/programs/ld-identification.c:133
+#: locale/programs/ld-address.c:135 locale/programs/ld-collate.c:1558
+#: locale/programs/ld-ctype.c:421 locale/programs/ld-identification.c:133
#: locale/programs/ld-measurement.c:94 locale/programs/ld-messages.c:97
#: locale/programs/ld-monetary.c:194 locale/programs/ld-name.c:94
#: locale/programs/ld-numeric.c:98 locale/programs/ld-paper.c:91
@@ -1848,7 +1925,7 @@ msgid "%s: numeric country code `%d' not valid"
msgstr "%s: codice numerico di nazione \"%d\" non valido"
#: locale/programs/ld-address.c:510 locale/programs/ld-address.c:547
-#: locale/programs/ld-address.c:585 locale/programs/ld-ctype.c:2608
+#: locale/programs/ld-address.c:585 locale/programs/ld-ctype.c:2633
#: locale/programs/ld-identification.c:364
#: locale/programs/ld-measurement.c:221 locale/programs/ld-messages.c:301
#: locale/programs/ld-monetary.c:701 locale/programs/ld-monetary.c:736
@@ -1871,8 +1948,8 @@ msgstr "%s: campo \"%s\" dichiarato più di una volta"
msgid "%s: unknown character in field `%s'"
msgstr "%s: carattere sconosciuto nel campo \"%s\""
-#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:3922
-#: locale/programs/ld-ctype.c:2981 locale/programs/ld-identification.c:449
+#: locale/programs/ld-address.c:599 locale/programs/ld-collate.c:3925
+#: locale/programs/ld-ctype.c:3006 locale/programs/ld-identification.c:449
#: locale/programs/ld-measurement.c:235 locale/programs/ld-messages.c:330
#: locale/programs/ld-monetary.c:941 locale/programs/ld-name.c:305
#: locale/programs/ld-numeric.c:366 locale/programs/ld-paper.c:239
@@ -1881,12 +1958,12 @@ msgstr "%s: carattere sconosciuto nel campo \"%s\""
msgid "%s: incomplete `END' line"
msgstr "%s: riga \"END\" incompleta"
-#: locale/programs/ld-address.c:609 locale/programs/ld-collate.c:542
-#: locale/programs/ld-collate.c:594 locale/programs/ld-collate.c:890
-#: locale/programs/ld-collate.c:903 locale/programs/ld-collate.c:2733
-#: locale/programs/ld-collate.c:2754 locale/programs/ld-collate.c:4107
-#: locale/programs/ld-ctype.c:1960 locale/programs/ld-ctype.c:2219
-#: locale/programs/ld-ctype.c:2806 locale/programs/ld-ctype.c:2992
+#: locale/programs/ld-address.c:609 locale/programs/ld-collate.c:544
+#: locale/programs/ld-collate.c:596 locale/programs/ld-collate.c:892
+#: locale/programs/ld-collate.c:905 locale/programs/ld-collate.c:2735
+#: locale/programs/ld-collate.c:2756 locale/programs/ld-collate.c:4110
+#: locale/programs/ld-ctype.c:1985 locale/programs/ld-ctype.c:2244
+#: locale/programs/ld-ctype.c:2831 locale/programs/ld-ctype.c:3017
#: locale/programs/ld-identification.c:459
#: locale/programs/ld-measurement.c:245 locale/programs/ld-messages.c:339
#: locale/programs/ld-monetary.c:950 locale/programs/ld-name.c:314
@@ -1897,489 +1974,489 @@ msgid "%s: syntax error"
msgstr "%s: errore di sintassi"
# lf
-#: locale/programs/ld-collate.c:417
+#: locale/programs/ld-collate.c:419
#, c-format
msgid "`%.*s' already defined in charmap"
msgstr "\"%.*s\" già definito nella mappa caratteri"
-#: locale/programs/ld-collate.c:426
+#: locale/programs/ld-collate.c:428
#, c-format
msgid "`%.*s' already defined in repertoire"
msgstr "\"%.*s\" già definito nel repertorio"
-#: locale/programs/ld-collate.c:433
+#: locale/programs/ld-collate.c:435
#, c-format
msgid "`%.*s' already defined as collating symbol"
msgstr "\"%.*s\" già definito come simbolo di collazione"
-#: locale/programs/ld-collate.c:440
+#: locale/programs/ld-collate.c:442
#, c-format
msgid "`%.*s' already defined as collating element"
msgstr "\"%.*s\" già definito come elemento di collazione"
-#: locale/programs/ld-collate.c:471 locale/programs/ld-collate.c:497
+#: locale/programs/ld-collate.c:473 locale/programs/ld-collate.c:499
#, c-format
msgid "%s: `forward' and `backward' are mutually excluding each other"
msgstr "%s: \"forward\" e \"backward\" sono mutuamente esclusivi"
-#: locale/programs/ld-collate.c:481 locale/programs/ld-collate.c:507
-#: locale/programs/ld-collate.c:523
+#: locale/programs/ld-collate.c:483 locale/programs/ld-collate.c:509
+#: locale/programs/ld-collate.c:525
#, c-format
msgid "%s: `%s' mentioned more than once in definition of weight %d"
msgstr "%s: \"%s\" menzionato più di una volta nella definizione del peso %d"
-#: locale/programs/ld-collate.c:579
+#: locale/programs/ld-collate.c:581
#, c-format
msgid "%s: too many rules; first entry only had %d"
msgstr "%s: troppe regole; la prima voce ne aveva solo %d"
-#: locale/programs/ld-collate.c:615
+#: locale/programs/ld-collate.c:617
#, c-format
msgid "%s: not enough sorting rules"
msgstr "%s: regole di ordinamento non sufficienti"
# lf
-#: locale/programs/ld-collate.c:780
+#: locale/programs/ld-collate.c:782
#, c-format
msgid "%s: empty weight string not allowed"
msgstr "%s: stringa vuota del peso non consentita"
-#: locale/programs/ld-collate.c:875
+#: locale/programs/ld-collate.c:877
#, c-format
msgid "%s: weights must use the same ellipsis symbol as the name"
msgstr "%s: i pesi devono usare lo stesso simbolo ellissi del nome"
-#: locale/programs/ld-collate.c:931
+#: locale/programs/ld-collate.c:933
#, c-format
msgid "%s: too many values"
msgstr "%s: troppi valori"
# lf
-#: locale/programs/ld-collate.c:1051 locale/programs/ld-collate.c:1226
+#: locale/programs/ld-collate.c:1053 locale/programs/ld-collate.c:1228
#, c-format
msgid "order for `%.*s' already defined at %s:%Zu"
msgstr "ordine per \"%.*s\" già definito su %s:%Zu"
-#: locale/programs/ld-collate.c:1101
+#: locale/programs/ld-collate.c:1103
#, c-format
msgid "%s: the start and the end symbol of a range must stand for characters"
msgstr "%s: i simboli iniziale e finale di un intervallo devono rappresentare caratteri"
-#: locale/programs/ld-collate.c:1128
+#: locale/programs/ld-collate.c:1130
#, c-format
msgid "%s: byte sequences of first and last character must have the same length"
msgstr "%s: la sequenza di byte del primo e dell'ultimo carattere devono avere la stessa lunghezza"
-#: locale/programs/ld-collate.c:1170
+#: locale/programs/ld-collate.c:1172
#, c-format
msgid "%s: byte sequence of first character of range is not lower than that of the last character"
msgstr "%s: la sequenza di byte del primo carattere dell'intervallo non è più piccola di quella dell'ultimo carattere"
-#: locale/programs/ld-collate.c:1295
+#: locale/programs/ld-collate.c:1297
#, c-format
msgid "%s: symbolic range ellipsis must not directly follow `order_start'"
msgstr "%s: l'ellissi dell'intervallo simbolico non deve seguire direttamente \"order_start\""
-#: locale/programs/ld-collate.c:1299
+#: locale/programs/ld-collate.c:1301
#, c-format
msgid "%s: symbolic range ellipsis must not be directly followed by `order_end'"
msgstr "%s: l'ellissi dell'intervallo simbolico non deve essere seguita direttamente da \"order_end\""
-#: locale/programs/ld-collate.c:1319 locale/programs/ld-ctype.c:1477
+#: locale/programs/ld-collate.c:1321 locale/programs/ld-ctype.c:1502
#, c-format
msgid "`%s' and `%.*s' are not valid names for symbolic range"
msgstr "\"%s\" e \"%.*s\" non sono nomi validi per un intervallo simbolico"
-#: locale/programs/ld-collate.c:1369 locale/programs/ld-collate.c:3858
+#: locale/programs/ld-collate.c:1371 locale/programs/ld-collate.c:3861
#, c-format
msgid "%s: order for `%.*s' already defined at %s:%Zu"
msgstr "%s: ordine per \"%.*s\" già definito su %s:%Zu"
-#: locale/programs/ld-collate.c:1378
+#: locale/programs/ld-collate.c:1380
#, c-format
msgid "%s: `%s' must be a character"
msgstr "%s: \"%s\" deve essere un carattere"
-#: locale/programs/ld-collate.c:1573
+#: locale/programs/ld-collate.c:1575
#, c-format
msgid "%s: `position' must be used for a specific level in all sections or none"
msgstr "%s: \"position\" deve essere usato per uno specifico livello o in tutte le sezioni o in nessuna"
-#: locale/programs/ld-collate.c:1598
+#: locale/programs/ld-collate.c:1600
#, c-format
msgid "symbol `%s' not defined"
msgstr "simbolo \"%s\" non definito"
# lf
-#: locale/programs/ld-collate.c:1674 locale/programs/ld-collate.c:1780
+#: locale/programs/ld-collate.c:1676 locale/programs/ld-collate.c:1782
#, c-format
msgid "symbol `%s' has the same encoding as"
msgstr "il simbolo \"%s\" ha la stessa codifica di"
-#: locale/programs/ld-collate.c:1678 locale/programs/ld-collate.c:1784
+#: locale/programs/ld-collate.c:1680 locale/programs/ld-collate.c:1786
#, c-format
msgid "symbol `%s'"
msgstr "simbolo \"%s\""
# lf
-#: locale/programs/ld-collate.c:1826
+#: locale/programs/ld-collate.c:1828
#, c-format
msgid "no definition of `UNDEFINED'"
msgstr "nessuna definizione di \"UNDEFINED\""
-#: locale/programs/ld-collate.c:1855
+#: locale/programs/ld-collate.c:1857
#, c-format
msgid "too many errors; giving up"
msgstr "troppi errori; uscita"
-#: locale/programs/ld-collate.c:2659 locale/programs/ld-collate.c:4046
+#: locale/programs/ld-collate.c:2661 locale/programs/ld-collate.c:4049
#, c-format
msgid "%s: nested conditionals not supported"
msgstr "%s: le condizioni nidificate non sono supportate"
-#: locale/programs/ld-collate.c:2677
+#: locale/programs/ld-collate.c:2679
#, c-format
msgid "%s: more then one 'else'"
msgstr "%s: più di un \"else\""
# lf
-#: locale/programs/ld-collate.c:2852
+#: locale/programs/ld-collate.c:2854
#, c-format
msgid "%s: duplicate definition of `%s'"
msgstr "%s: definizione duplicata di \"%s\""
# lf
-#: locale/programs/ld-collate.c:2888
+#: locale/programs/ld-collate.c:2890
#, c-format
msgid "%s: duplicate declaration of section `%s'"
msgstr "%s: dichiarazione duplicata della sezione \"%s\""
-#: locale/programs/ld-collate.c:3024
+#: locale/programs/ld-collate.c:3026
#, c-format
msgid "%s: unknown character in collating symbol name"
msgstr "%s: carattere sconosciuto nel nome del simbolo di collazione"
-#: locale/programs/ld-collate.c:3153
+#: locale/programs/ld-collate.c:3155
#, c-format
msgid "%s: unknown character in equivalent definition name"
msgstr "%s: carattere sconosciuto nel nome della definizione equivalente"
-#: locale/programs/ld-collate.c:3164
+#: locale/programs/ld-collate.c:3166
#, c-format
msgid "%s: unknown character in equivalent definition value"
msgstr "%s carattere sconosciuto nel valore della definizione equivalente"
-#: locale/programs/ld-collate.c:3174
+#: locale/programs/ld-collate.c:3176
#, c-format
msgid "%s: unknown symbol `%s' in equivalent definition"
msgstr "%s: simbolo sconosciuto \"%s\" nella definizione equivalente"
-#: locale/programs/ld-collate.c:3183
+#: locale/programs/ld-collate.c:3185
msgid "error while adding equivalent collating symbol"
msgstr "errore durante l'aggiunta di un simbolo di collazione equivalente"
# lf
-#: locale/programs/ld-collate.c:3221
+#: locale/programs/ld-collate.c:3223
#, c-format
msgid "duplicate definition of script `%s'"
msgstr "definizione dello script \"%s\" duplicata"
-#: locale/programs/ld-collate.c:3269
+#: locale/programs/ld-collate.c:3271
#, c-format
msgid "%s: unknown section name `%.*s'"
msgstr "%s: nome della sezione sconosciuto \"%.*s\""
-#: locale/programs/ld-collate.c:3298
+#: locale/programs/ld-collate.c:3300
#, c-format
msgid "%s: multiple order definitions for section `%s'"
msgstr "%s: definizioni di ordine multiplo per la sezione \"%s\""
-#: locale/programs/ld-collate.c:3326
+#: locale/programs/ld-collate.c:3328
#, c-format
msgid "%s: invalid number of sorting rules"
msgstr "%s: numero di regole di ordinamento non valido"
-#: locale/programs/ld-collate.c:3353
+#: locale/programs/ld-collate.c:3355
#, c-format
msgid "%s: multiple order definitions for unnamed section"
msgstr "%s: definizioni multiple di ordinamento per la sezione senza nome"
-#: locale/programs/ld-collate.c:3407 locale/programs/ld-collate.c:3537
-#: locale/programs/ld-collate.c:3900
+#: locale/programs/ld-collate.c:3410 locale/programs/ld-collate.c:3540
+#: locale/programs/ld-collate.c:3903
#, c-format
msgid "%s: missing `order_end' keyword"
msgstr "%s: parola chiave \"order_end\" mancante"
-#: locale/programs/ld-collate.c:3470
+#: locale/programs/ld-collate.c:3473
#, c-format
msgid "%s: order for collating symbol %.*s not yet defined"
msgstr "%s: ordine non ancora definito per il simbolo di collazione %.*s"
-#: locale/programs/ld-collate.c:3488
+#: locale/programs/ld-collate.c:3491
#, c-format
msgid "%s: order for collating element %.*s not yet defined"
msgstr "%s: ordine non ancora definito per l'elemento di collazione %.*s"
-#: locale/programs/ld-collate.c:3499
+#: locale/programs/ld-collate.c:3502
#, c-format
msgid "%s: cannot reorder after %.*s: symbol not known"
msgstr "%s: impossibile riordinare dopo %.*s: simbolo sconosciuto"
-#: locale/programs/ld-collate.c:3551 locale/programs/ld-collate.c:3912
+#: locale/programs/ld-collate.c:3554 locale/programs/ld-collate.c:3915
#, c-format
msgid "%s: missing `reorder-end' keyword"
msgstr "%s: parola chiave \"reorder-end\" mancante"
-#: locale/programs/ld-collate.c:3585 locale/programs/ld-collate.c:3783
+#: locale/programs/ld-collate.c:3588 locale/programs/ld-collate.c:3786
#, c-format
msgid "%s: section `%.*s' not known"
msgstr "%s: sezione \"%.*s\" sconosciuta"
-#: locale/programs/ld-collate.c:3650
+#: locale/programs/ld-collate.c:3653
#, c-format
msgid "%s: bad symbol <%.*s>"
msgstr "%s: simbolo non valido <%.*s>"
-#: locale/programs/ld-collate.c:3846
+#: locale/programs/ld-collate.c:3849
#, c-format
msgid "%s: cannot have `%s' as end of ellipsis range"
msgstr "%s: impossibile avere \"%s\" come fine dell'intervallo con ellissi"
-#: locale/programs/ld-collate.c:3896
+#: locale/programs/ld-collate.c:3899
#, c-format
msgid "%s: empty category description not allowed"
msgstr "%s: descrizione vuota della categoria non consentita"
-#: locale/programs/ld-collate.c:3915
+#: locale/programs/ld-collate.c:3918
#, c-format
msgid "%s: missing `reorder-sections-end' keyword"
msgstr "%s: parola chiave \"reorder-sections-end\" mancante"
-#: locale/programs/ld-collate.c:4079
+#: locale/programs/ld-collate.c:4082
#, c-format
msgid "%s: '%s' without matching 'ifdef' or 'ifndef'"
msgstr "%s: \"%s\" senza il corrispondente \"ifdef\" o \"ifndef\""
-#: locale/programs/ld-collate.c:4097
+#: locale/programs/ld-collate.c:4100
#, c-format
msgid "%s: 'endif' without matching 'ifdef' or 'ifndef'"
msgstr "%s: \"endif\" senza il corrispondente \"ifdef\" o \"ifndef\""
-#: locale/programs/ld-ctype.c:439
+#: locale/programs/ld-ctype.c:440
#, c-format
msgid "No character set name specified in charmap"
msgstr "Nessun nome specificato per il set nella mappa caratteri"
-#: locale/programs/ld-ctype.c:468
+#: locale/programs/ld-ctype.c:469
#, c-format
msgid "character L'\\u%0*x' in class `%s' must be in class `%s'"
msgstr "il carattere L\"\\u%0*x\" nella classe \"%s\" deve stare nella classe \"%s\""
-#: locale/programs/ld-ctype.c:483
+#: locale/programs/ld-ctype.c:484
#, c-format
msgid "character L'\\u%0*x' in class `%s' must not be in class `%s'"
msgstr "il carattere L\"\\u%0*x\" nella classe \"%s\" non deve stare nella classe \"%s\""
-#: locale/programs/ld-ctype.c:497 locale/programs/ld-ctype.c:555
+#: locale/programs/ld-ctype.c:498 locale/programs/ld-ctype.c:556
#, c-format
msgid "internal error in %s, line %u"
msgstr "errore interno in %s, riga %u"
-#: locale/programs/ld-ctype.c:526
+#: locale/programs/ld-ctype.c:527
#, c-format
msgid "character '%s' in class `%s' must be in class `%s'"
msgstr "il carattere \"%s\" nella classe \"%s\" deve stare nella classe \"%s\""
-#: locale/programs/ld-ctype.c:542
+#: locale/programs/ld-ctype.c:543
#, c-format
msgid "character '%s' in class `%s' must not be in class `%s'"
msgstr "il carattere \"%s\" nella classe \"%s\" non deve stare nella classe \"%s\""
-#: locale/programs/ld-ctype.c:572 locale/programs/ld-ctype.c:610
+#: locale/programs/ld-ctype.c:573 locale/programs/ld-ctype.c:611
#, c-format
msgid "<SP> character not in class `%s'"
msgstr "Il carattere <SP> non è nella classe \"%s\""
-#: locale/programs/ld-ctype.c:584 locale/programs/ld-ctype.c:621
+#: locale/programs/ld-ctype.c:585 locale/programs/ld-ctype.c:622
#, c-format
msgid "<SP> character must not be in class `%s'"
msgstr "Il carattere <SP> non deve stare nella classe \"%s\""
-#: locale/programs/ld-ctype.c:599
+#: locale/programs/ld-ctype.c:600
#, c-format
msgid "character <SP> not defined in character map"
msgstr "carattere <SP> non definito nella mappa caratteri"
-#: locale/programs/ld-ctype.c:714
+#: locale/programs/ld-ctype.c:736
#, c-format
msgid "`digit' category has not entries in groups of ten"
msgstr "la categoria \"digit\" non contiene voci a gruppi di dieci"
-#: locale/programs/ld-ctype.c:763
+#: locale/programs/ld-ctype.c:785
#, c-format
msgid "no input digits defined and none of the standard names in the charmap"
msgstr "nessuna cifra di input definita e nessuno dei nomi standard nella mappa caratteri"
-#: locale/programs/ld-ctype.c:828
+#: locale/programs/ld-ctype.c:850
#, c-format
msgid "not all characters used in `outdigit' are available in the charmap"
msgstr "non tutti i caratteri usati in \"outdigit\" sono disponibili nella mappa caratteri"
-#: locale/programs/ld-ctype.c:845
+#: locale/programs/ld-ctype.c:867
#, c-format
msgid "not all characters used in `outdigit' are available in the repertoire"
msgstr "non tutti i caratteri usati in \"outdigit\" sono disponibili nel repertorio"
-#: locale/programs/ld-ctype.c:1245
+#: locale/programs/ld-ctype.c:1270
#, c-format
msgid "character class `%s' already defined"
msgstr "classe di caratteri \"%s\" già definita"
-#: locale/programs/ld-ctype.c:1251
+#: locale/programs/ld-ctype.c:1276
#, c-format
msgid "implementation limit: no more than %Zd character classes allowed"
msgstr "limite di implementazione: non sono permesse più di %Zd classi di carattere"
-#: locale/programs/ld-ctype.c:1277
+#: locale/programs/ld-ctype.c:1302
#, c-format
msgid "character map `%s' already defined"
msgstr "mappa caratteri \"%s\" già definita"
-#: locale/programs/ld-ctype.c:1283
+#: locale/programs/ld-ctype.c:1308
#, c-format
msgid "implementation limit: no more than %d character maps allowed"
msgstr "limite di implementazione: non sono ammesse più di %d mappe caratteri"
-#: locale/programs/ld-ctype.c:1548 locale/programs/ld-ctype.c:1673
-#: locale/programs/ld-ctype.c:1779 locale/programs/ld-ctype.c:2471
-#: locale/programs/ld-ctype.c:3467
+#: locale/programs/ld-ctype.c:1573 locale/programs/ld-ctype.c:1698
+#: locale/programs/ld-ctype.c:1804 locale/programs/ld-ctype.c:2496
+#: locale/programs/ld-ctype.c:3492
#, c-format
msgid "%s: field `%s' does not contain exactly ten entries"
msgstr "%s: il campo \"%s\" non contiene esattamente dieci voci"
-#: locale/programs/ld-ctype.c:1576 locale/programs/ld-ctype.c:2150
+#: locale/programs/ld-ctype.c:1601 locale/programs/ld-ctype.c:2175
#, c-format
msgid "to-value <U%0*X> of range is smaller than from-value <U%0*X>"
msgstr "Il valore <U%0*X> \"fino a\" dell'intervallo è più piccolo del valore <U%0*X> \"da\""
-#: locale/programs/ld-ctype.c:1703
+#: locale/programs/ld-ctype.c:1728
msgid "start and end character sequence of range must have the same length"
msgstr "la sequenza di caratteri iniziale e finale dell'intervallo devono avere la stessa lunghezza"
-#: locale/programs/ld-ctype.c:1710
+#: locale/programs/ld-ctype.c:1735
msgid "to-value character sequence is smaller than from-value sequence"
msgstr "Il valore \"fino a\" della sequenza di caratteri è più piccolo del valore \"da\" della sequenza"
-#: locale/programs/ld-ctype.c:2070 locale/programs/ld-ctype.c:2121
+#: locale/programs/ld-ctype.c:2095 locale/programs/ld-ctype.c:2146
msgid "premature end of `translit_ignore' definition"
msgstr "fine prematura della definizione di \"translit_ignore\""
-#: locale/programs/ld-ctype.c:2076 locale/programs/ld-ctype.c:2127
-#: locale/programs/ld-ctype.c:2169
+#: locale/programs/ld-ctype.c:2101 locale/programs/ld-ctype.c:2152
+#: locale/programs/ld-ctype.c:2194
msgid "syntax error"
msgstr "errore di sintassi"
-#: locale/programs/ld-ctype.c:2303
+#: locale/programs/ld-ctype.c:2328
#, c-format
msgid "%s: syntax error in definition of new character class"
msgstr "%s: errore di sintassi nella definizione della nuova classe di caratteri"
-#: locale/programs/ld-ctype.c:2318
+#: locale/programs/ld-ctype.c:2343
#, c-format
msgid "%s: syntax error in definition of new character map"
msgstr "%s: errore di sintassi nella definizione della nuova mappa di caratteri"
-#: locale/programs/ld-ctype.c:2493
+#: locale/programs/ld-ctype.c:2518
msgid "ellipsis range must be marked by two operands of same type"
msgstr "l'intervallo con ellissi deve essere marcato da due operandi dello stesso tipo"
-#: locale/programs/ld-ctype.c:2502
+#: locale/programs/ld-ctype.c:2527
msgid "with symbolic name range values the absolute ellipsis `...' must not be used"
msgstr "con nomi simbolici come valori dell'intervallo non deve essere usata l'ellissi assoluta \"...\""
-#: locale/programs/ld-ctype.c:2517
+#: locale/programs/ld-ctype.c:2542
msgid "with UCS range values one must use the hexadecimal symbolic ellipsis `..'"
msgstr "con valori UCS per l'intervallo, deve essere usata l'ellissi simbolica esadecimale \"..\""
-#: locale/programs/ld-ctype.c:2531
+#: locale/programs/ld-ctype.c:2556
msgid "with character code range values one must use the absolute ellipsis `...'"
msgstr "con codici carattere come valori dell'intervallo deve essere usata l'ellissi assoluta \"...\""
# lf
-#: locale/programs/ld-ctype.c:2682
+#: locale/programs/ld-ctype.c:2707
#, c-format
msgid "duplicated definition for mapping `%s'"
msgstr "definizione duplicata per la mappatura \"%s\""
# lf
-#: locale/programs/ld-ctype.c:2768 locale/programs/ld-ctype.c:2912
+#: locale/programs/ld-ctype.c:2793 locale/programs/ld-ctype.c:2937
#, c-format
msgid "%s: `translit_start' section does not end with `translit_end'"
msgstr "%s: la sezione \"translit_start\" non termina con \"translit_end\""
-#: locale/programs/ld-ctype.c:2863
+#: locale/programs/ld-ctype.c:2888
#, c-format
msgid "%s: duplicate `default_missing' definition"
msgstr "%s: definizione duplicata di \"default_missing\""
# lf
-#: locale/programs/ld-ctype.c:2868
+#: locale/programs/ld-ctype.c:2893
msgid "previous definition was here"
msgstr "la definizione precedente era qui"
# lf
-#: locale/programs/ld-ctype.c:2890
+#: locale/programs/ld-ctype.c:2915
#, c-format
msgid "%s: no representable `default_missing' definition found"
msgstr "%s: nessuna definizione \"default_missing\" rappresentabile trovata"
-#: locale/programs/ld-ctype.c:3043 locale/programs/ld-ctype.c:3127
-#: locale/programs/ld-ctype.c:3147 locale/programs/ld-ctype.c:3168
-#: locale/programs/ld-ctype.c:3189 locale/programs/ld-ctype.c:3210
-#: locale/programs/ld-ctype.c:3231 locale/programs/ld-ctype.c:3271
-#: locale/programs/ld-ctype.c:3292 locale/programs/ld-ctype.c:3359
-#: locale/programs/ld-ctype.c:3401 locale/programs/ld-ctype.c:3426
+#: locale/programs/ld-ctype.c:3068 locale/programs/ld-ctype.c:3152
+#: locale/programs/ld-ctype.c:3172 locale/programs/ld-ctype.c:3193
+#: locale/programs/ld-ctype.c:3214 locale/programs/ld-ctype.c:3235
+#: locale/programs/ld-ctype.c:3256 locale/programs/ld-ctype.c:3296
+#: locale/programs/ld-ctype.c:3317 locale/programs/ld-ctype.c:3384
+#: locale/programs/ld-ctype.c:3426 locale/programs/ld-ctype.c:3451
#, c-format
msgid "%s: character `%s' not defined while needed as default value"
msgstr "%s: carattere \"%s\" non definito nonostante sia necessario come valore predefinito"
# lf
-#: locale/programs/ld-ctype.c:3048 locale/programs/ld-ctype.c:3132
-#: locale/programs/ld-ctype.c:3152 locale/programs/ld-ctype.c:3173
-#: locale/programs/ld-ctype.c:3194 locale/programs/ld-ctype.c:3215
-#: locale/programs/ld-ctype.c:3236 locale/programs/ld-ctype.c:3276
-#: locale/programs/ld-ctype.c:3297 locale/programs/ld-ctype.c:3364
+#: locale/programs/ld-ctype.c:3073 locale/programs/ld-ctype.c:3157
+#: locale/programs/ld-ctype.c:3177 locale/programs/ld-ctype.c:3198
+#: locale/programs/ld-ctype.c:3219 locale/programs/ld-ctype.c:3240
+#: locale/programs/ld-ctype.c:3261 locale/programs/ld-ctype.c:3301
+#: locale/programs/ld-ctype.c:3322 locale/programs/ld-ctype.c:3389
#, c-format
msgid "%s: character `%s' in charmap not representable with one byte"
msgstr "%s: carattere \"%s\" nella mappa caratteri non rappresentabile con un byte"
# lf
-#: locale/programs/ld-ctype.c:3408 locale/programs/ld-ctype.c:3433
+#: locale/programs/ld-ctype.c:3433 locale/programs/ld-ctype.c:3458
#, c-format
msgid "%s: character `%s' needed as default value not representable with one byte"
msgstr "%s: carattere \"%s\" necessario come valore predefinito non rappresentabile con un byte"
-#: locale/programs/ld-ctype.c:3489
+#: locale/programs/ld-ctype.c:3514
#, c-format
msgid "no output digits defined and none of the standard names in the charmap"
msgstr "nessuna cifra di output definita e nessun nome standard nella mappa caratteri"
-#: locale/programs/ld-ctype.c:3780
+#: locale/programs/ld-ctype.c:3805
#, c-format
msgid "%s: transliteration data from locale `%s' not available"
msgstr "%s: dati di traslitterazione dalla localizzazione \"%s\" non disponibili"
-#: locale/programs/ld-ctype.c:3881
+#: locale/programs/ld-ctype.c:3906
#, c-format
msgid "%s: table for class \"%s\": %lu bytes\n"
msgstr "%s: tabella per la classe \"%s\": %lu byte\n"
-#: locale/programs/ld-ctype.c:3950
+#: locale/programs/ld-ctype.c:3975
#, c-format
msgid "%s: table for map \"%s\": %lu bytes\n"
msgstr "%s: tabella per la mappa \"%s\": %lu byte\n"
-#: locale/programs/ld-ctype.c:4083
+#: locale/programs/ld-ctype.c:4108
#, c-format
msgid "%s: table for width: %lu bytes\n"
msgstr "%s: tabella per la larghezza: %lu byte\n"
@@ -2568,7 +2645,7 @@ msgstr "nome simbolico non terminato"
# lf
#: locale/programs/linereader.c:623
msgid "illegal escape sequence at end of string"
-msgstr "sequenza di escape illecita alla fine della stringa"
+msgstr "sequenza di escape non consentita alla fine della stringa"
#: locale/programs/linereader.c:627 locale/programs/linereader.c:855
msgid "unterminated string"
@@ -2576,7 +2653,7 @@ msgstr "stringa non terminata"
#: locale/programs/linereader.c:669
msgid "non-symbolic character value should not be used"
-msgstr "non dovrebbe essere usato un carattere non simbolico"
+msgstr "non dovrebbe essere usato un valore non simbolico per il carattere"
#: locale/programs/linereader.c:816
#, c-format
@@ -2588,6 +2665,12 @@ msgstr "il simbolo \"%.*s\" non è nella mappa caratteri"
msgid "symbol `%.*s' not in repertoire map"
msgstr "il simbolo \"%.*s\" non è nella mappa dei repertori"
+# lf
+#: locale/programs/locale-spec.c:131
+#, c-format
+msgid "unknown name \"%s\""
+msgstr "nome sconosciuto \"%s\""
+
#: locale/programs/locale.c:74
msgid "System information:"
msgstr "Informazioni di sistema:"
@@ -2766,13 +2849,13 @@ msgstr "impossibile scrivere i file di output in \"%s\""
#, c-format
msgid ""
"System's directory for character maps : %s\n"
-" repertoire maps: %s\n"
-" locale path : %s\n"
+"\t\t repertoire maps: %s\n"
+"\t\t locale path : %s\n"
"%s"
msgstr ""
-"Directory di sistema per le mappe caratteri : %s\n"
-" mappe di repertorio: %s\n"
-" percorso della localizzazione : %s\n"
+"Directory di sistema per le mappe caratteri : %s\n"
+"\t\t mappe di repertorio : %s\n"
+"\t\t percorso localizzazioni: %s\n"
"%s"
#: locale/programs/localedef.c:567
@@ -2785,132 +2868,137 @@ msgstr "dipendenze circolari nelle definizioni delle localizzazioni"
msgid "cannot add already read locale `%s' a second time"
msgstr "impossibile aggiungere una seconda volta la localizzazione \"%s\" già letta"
-#: locale/programs/locarchive.c:88 locale/programs/locarchive.c:261
+#: locale/programs/locarchive.c:92 locale/programs/locarchive.c:338
#, c-format
msgid "cannot create temporary file"
msgstr "impossibile creare il file temporaneo"
-#: locale/programs/locarchive.c:118 locale/programs/locarchive.c:307
+#: locale/programs/locarchive.c:122 locale/programs/locarchive.c:384
#, c-format
msgid "cannot initialize archive file"
msgstr "impossibile inizializzare il file d'archivio"
-#: locale/programs/locarchive.c:125 locale/programs/locarchive.c:314
+#: locale/programs/locarchive.c:129 locale/programs/locarchive.c:391
#, c-format
msgid "cannot resize archive file"
msgstr "impossibile ridimensionare il file d'archivio"
-#: locale/programs/locarchive.c:134 locale/programs/locarchive.c:323
-#: locale/programs/locarchive.c:527
+#: locale/programs/locarchive.c:152 locale/programs/locarchive.c:414
+#: locale/programs/locarchive.c:633
#, c-format
msgid "cannot map archive header"
msgstr "impossibile mappare l'intestazione dell'archivio"
-#: locale/programs/locarchive.c:156
+#: locale/programs/locarchive.c:174
#, c-format
msgid "failed to create new locale archive"
msgstr "creazione del nuovo archivio di localizzazione non riuscita"
-#: locale/programs/locarchive.c:168
+#: locale/programs/locarchive.c:186
#, c-format
msgid "cannot change mode of new locale archive"
msgstr "impossibile cambiare il modo del nuovo archivio di localizzazione"
-#: locale/programs/locarchive.c:255
+#: locale/programs/locarchive.c:285
+#, c-format
+msgid "cannot read data from locale archive"
+msgstr "impossibile leggere dati dall'archivio delle localizzazioni"
+
+#: locale/programs/locarchive.c:318
#, c-format
msgid "cannot map locale archive file"
msgstr "impossibile mappare il file di localizzazione dell'archivio"
-#: locale/programs/locarchive.c:331
+#: locale/programs/locarchive.c:422
#, c-format
msgid "cannot lock new archive"
-msgstr "impossibile eseguire il lock del nuovo archivio"
+msgstr "impossibile fare il lock del nuovo archivio"
-#: locale/programs/locarchive.c:396
+#: locale/programs/locarchive.c:488
#, c-format
msgid "cannot extend locale archive file"
msgstr "impossibile estendere il file di localizzazione dell'archivio"
-#: locale/programs/locarchive.c:405
+#: locale/programs/locarchive.c:497
#, c-format
msgid "cannot change mode of resized locale archive"
msgstr "impossibile cambiare il modo dell'archivio di localizzazione ridimensionato"
-#: locale/programs/locarchive.c:413
+#: locale/programs/locarchive.c:505
#, c-format
msgid "cannot rename new archive"
msgstr "impossibile rinominare il nuovo archivio"
-#: locale/programs/locarchive.c:466
+#: locale/programs/locarchive.c:558
#, c-format
msgid "cannot open locale archive \"%s\""
msgstr "impossibile aprire l'archivio delle localizzazioni \"%s\""
-#: locale/programs/locarchive.c:471
+#: locale/programs/locarchive.c:563
#, c-format
msgid "cannot stat locale archive \"%s\""
msgstr "impossibile fare stat dell'archivio di localizzazione \"%s\""
-#: locale/programs/locarchive.c:490
+#: locale/programs/locarchive.c:582
#, c-format
msgid "cannot lock locale archive \"%s\""
msgstr "impossibile fare il lock dell'archivio di localizzazione \"%s\""
-#: locale/programs/locarchive.c:513
+#: locale/programs/locarchive.c:605
#, c-format
msgid "cannot read archive header"
msgstr "impossibile leggere l'intestazione dell'archivio"
-#: locale/programs/locarchive.c:573
+#: locale/programs/locarchive.c:680
#, c-format
msgid "locale '%s' already exists"
msgstr "la localizzazione \"%s\" esiste già"
-#: locale/programs/locarchive.c:804 locale/programs/locarchive.c:819
-#: locale/programs/locarchive.c:831 locale/programs/locarchive.c:843
+#: locale/programs/locarchive.c:942 locale/programs/locarchive.c:957
+#: locale/programs/locarchive.c:969 locale/programs/locarchive.c:981
#: locale/programs/locfile.c:344
#, c-format
msgid "cannot add to locale archive"
msgstr "impossibile aggiungere all'archivio delle localizzazioni"
# lf
-#: locale/programs/locarchive.c:998
+#: locale/programs/locarchive.c:1139
#, c-format
msgid "locale alias file `%s' not found"
msgstr "file alias \"%s\" di localizzazione non trovato"
-#: locale/programs/locarchive.c:1142
+#: locale/programs/locarchive.c:1289
#, c-format
msgid "Adding %s\n"
msgstr "Aggiunta di %s\n"
-#: locale/programs/locarchive.c:1148
+#: locale/programs/locarchive.c:1295
#, c-format
msgid "stat of \"%s\" failed: %s: ignored"
msgstr "stat di \"%s\" non riuscita: %s: ignorato"
-#: locale/programs/locarchive.c:1154
+#: locale/programs/locarchive.c:1301
#, c-format
msgid "\"%s\" is no directory; ignored"
msgstr "\"%s\" non è una directory; ignorato"
# lf
-#: locale/programs/locarchive.c:1161
+#: locale/programs/locarchive.c:1308
#, c-format
msgid "cannot open directory \"%s\": %s: ignored"
msgstr "impossibile aprire la directory \"%s\": %s: ignorato"
-#: locale/programs/locarchive.c:1233
+#: locale/programs/locarchive.c:1380
#, c-format
msgid "incomplete set of locale files in \"%s\""
msgstr "set incompleto di file di localizzazione in \"%s\""
-#: locale/programs/locarchive.c:1297
+#: locale/programs/locarchive.c:1444
#, c-format
msgid "cannot read all files in \"%s\": ignored"
msgstr "impossibile leggere tutti i file in \"%s\": ignorato"
-#: locale/programs/locarchive.c:1367
+#: locale/programs/locarchive.c:1514
#, c-format
msgid "locale \"%s\" not in archive"
msgstr "la localizzazione \"%s\" non è nell'archivio"
@@ -2978,12 +3066,12 @@ msgstr "impossibile salvare la nuova mappa dei repertori"
msgid "repertoire map file `%s' not found"
msgstr "file della mappa dei repertori \"%s\" non trovato"
-#: login/programs/pt_chown.c:74
+#: login/programs/pt_chown.c:78
#, c-format
msgid "Set the owner, group and access permission of the slave pseudo terminal corresponding to the master pseudo terminal passed on file descriptor `%d'. This is the helper program for the `grantpt' function. It is not intended to be run directly from the command line.\n"
msgstr "Imposta il proprietario, il gruppo e i permessi d'accesso dello pseudo terminale \"slave\" corrispondente allo pseudo terminale \"master\" trasmesso al descrittore di file \"%d\". Questo è il programma d'aiuto per la funzione \"grantpt\". Non è predisposto per essere eseguito direttamente da riga di comando.\n"
-#: login/programs/pt_chown.c:84
+#: login/programs/pt_chown.c:88
#, c-format
msgid ""
"The owner is set to the current user, the group is set to `%s', and the access permission is set to `%o'.\n"
@@ -2994,44 +3082,40 @@ msgstr ""
"\n"
"%s"
-#: login/programs/pt_chown.c:161
+#: login/programs/pt_chown.c:192
#, c-format
msgid "too many arguments"
msgstr "troppi parametri"
-#: login/programs/pt_chown.c:169
+#: login/programs/pt_chown.c:200
#, c-format
msgid "needs to be installed setuid `root'"
msgstr "è necessario installarlo con setuid \"root\""
-#: malloc/mcheck.c:330
+#: malloc/mcheck.c:350
msgid "memory is consistent, library is buggy\n"
msgstr "la memoria è consistente, la libreria contiene bug\n"
-#: malloc/mcheck.c:333
+#: malloc/mcheck.c:353
msgid "memory clobbered before allocated block\n"
msgstr "memoria danneggiata prima dei blocchi allocati\n"
-#: malloc/mcheck.c:336
+#: malloc/mcheck.c:356
msgid "memory clobbered past end of allocated block\n"
msgstr "memoria danneggiata dopo la fine dei blocchi allocati\n"
# lf
-#: malloc/mcheck.c:339
+#: malloc/mcheck.c:359
msgid "block freed twice\n"
msgstr "blocco liberato due volte\n"
-#: malloc/mcheck.c:342
+#: malloc/mcheck.c:362
msgid "bogus mcheck_status, library is buggy\n"
msgstr "mcheck_status inesistente, la libreria contiene bug\n"
-#: malloc/memusage.sh:27
-msgid "Try \\`memusage --help' for more information."
-msgstr "Usare \\\"memusage --help\" per ulteriori informazioni."
-
#: malloc/memusage.sh:33
-msgid "memusage: option \\`$1' requires an argument"
-msgstr "memusage: l'opzione \\\"$1\" richiede un argomento"
+msgid "%s: option '%s' requires an argument\\n"
+msgstr "%s: l'opzione \"%s\" richiede un argomento\\n"
#: malloc/memusage.sh:39
msgid ""
@@ -3090,14 +3174,14 @@ msgstr ""
#: malloc/memusage.sh:101
msgid ""
"Syntax: memusage [--data=FILE] [--progname=NAME] [--png=FILE] [--unbuffered]\n"
-" [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
-" [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
-" PROGRAM [PROGRAMOPTION]..."
+"\t [--buffer=SIZE] [--no-timer] [--time-based] [--total]\n"
+"\t [--title=STRING] [--x-size=SIZE] [--y-size=SIZE]\n"
+"\t PROGRAM [PROGRAMOPTION]..."
msgstr ""
"Sintassi: memusage [--data=FILE] [--progname=NOME] [--png=FILE] [--unbuffered]\n"
-" [--buffer=DIM] [--no-timer] [--time-based] [--total]\n"
-" [--title=STRINGA] [--x-size=DIMX] [--y-size=DIMY]\n"
-" PROGRAMMA [OPZIONEPROGRAMMA]..."
+"\t [--buffer=DIM] [--no-timer] [--time-based] [--total]\n"
+"\t [--title=STRINGA] [--x-size=DIMX] [--y-size=DIMY]\n"
+"\t PROGRAMMA [OPZIONEPROGRAMMA]..."
#: malloc/memusage.sh:193
msgid "memusage: option \\`${1##*=}' is ambiguous"
@@ -3155,7 +3239,7 @@ msgid "unable to free arguments"
msgstr "impossibile liberare argomenti"
# lf
-#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:133
+#: nis/nis_error.h:1 nis/ypclnt.c:833 nis/ypclnt.c:921 posix/regcomp.c:132
#: sysdeps/gnu/errlist.c:20
msgid "Success"
msgstr "Successo"
@@ -3238,7 +3322,7 @@ msgstr "Oggetto non valido per l'operazione"
# lf
#: nis/nis_error.h:18
msgid "Malformed name, or illegal name"
-msgstr "Nome malformato o illecito"
+msgstr "Nome malformato o non consentito"
# lf
#: nis/nis_error.h:19
@@ -3272,7 +3356,7 @@ msgstr "I tipi di voce/tabella non corrispondono"
#: nis/nis_error.h:26
msgid "Link points to illegal name"
-msgstr "Il link punta a un nome illecito"
+msgstr "Il collegamento punta a un nome non consentito"
# ls
#: nis/nis_error.h:27
@@ -3309,7 +3393,7 @@ msgstr "Riscontrato un namespace non NIS+"
# lf
#: nis/nis_error.h:34
msgid "Illegal object type for operation"
-msgstr "Tipo di oggetto illecito per l'operazione"
+msgstr "Tipo di oggetto non consentito per l'operazione"
# lf
#: nis/nis_error.h:35
@@ -3322,7 +3406,7 @@ msgstr "Operazione di modifica non riuscita"
#: nis/nis_error.h:37
msgid "Query illegal for named table"
-msgstr "Interrogazione illecita per la tabella nominata"
+msgstr "Interrogazione non consentita per la tabella nominata"
# lf
#: nis/nis_error.h:38
@@ -3642,7 +3726,7 @@ msgstr "Numero di oggetti : %u\n"
#: nis/nis_print.c:377
#, c-format
msgid "Object #%d:\n"
-msgstr "Oggetto #%d:\n"
+msgstr "Oggetto n° %d:\n"
#: nis/nis_print_group_entry.c:117
#, c-format
@@ -3846,12 +3930,12 @@ msgstr "yp_update: impossibile convertire l'host in netname\n"
msgid "yp_update: cannot get server address\n"
msgstr "yp_update: impossibile ottenere l'indirizzo del server\n"
-#: nscd/aicache.c:82 nscd/hstcache.c:481
+#: nscd/aicache.c:83 nscd/hstcache.c:492
#, c-format
msgid "Haven't found \"%s\" in hosts cache!"
msgstr "\"%s\" non trovato nella cache degli host."
-#: nscd/aicache.c:84 nscd/hstcache.c:483
+#: nscd/aicache.c:85 nscd/hstcache.c:494
#, c-format
msgid "Reloading \"%s\" in hosts cache!"
msgstr "Ricaricamento di \"%s\" nella cache degli host."
@@ -3866,195 +3950,195 @@ msgid " (first)"
msgstr " (prima)"
# lf
-#: nscd/cache.c:286 nscd/connections.c:866
+#: nscd/cache.c:276 nscd/connections.c:861
#, c-format
msgid "cannot stat() file `%s': %s"
msgstr "impossibile fare stat() sul file \"%s\": %s"
-#: nscd/cache.c:328
+#: nscd/cache.c:318
#, c-format
msgid "pruning %s cache; time %ld"
msgstr "pulizia della cache di %s; tempo %ld"
-#: nscd/cache.c:357
+#: nscd/cache.c:347
#, c-format
msgid "considering %s entry \"%s\", timeout %<PRIu64>"
msgstr "considerata la voce di %s \"%s\", timeout %<PRIu64>"
-#: nscd/connections.c:570
+#: nscd/connections.c:565
#, c-format
msgid "invalid persistent database file \"%s\": %s"
msgstr "file \"%s\" del database persistente non valido: %s"
-#: nscd/connections.c:578
+#: nscd/connections.c:573
msgid "uninitialized header"
msgstr "intestazione non inizializzata"
-#: nscd/connections.c:583
+#: nscd/connections.c:578
msgid "header size does not match"
msgstr "la dimensione dell'intestazione non corrisponde"
-#: nscd/connections.c:593
+#: nscd/connections.c:588
msgid "file size does not match"
msgstr "la dimensione del file non corrisponde"
-#: nscd/connections.c:610
+#: nscd/connections.c:605
msgid "verification failed"
msgstr "verifica non riuscita"
-#: nscd/connections.c:624
+#: nscd/connections.c:619
#, c-format
msgid "suggested size of table for database %s larger than the persistent database's table"
-msgstr "dimensione suggerita della tabella per il database %s più larga della tabella del database persistente"
+msgstr "dimensione suggerita della tabella per il database %s più grande della tabella del database persistente"
-#: nscd/connections.c:635 nscd/connections.c:720
+#: nscd/connections.c:630 nscd/connections.c:715
#, c-format
msgid "cannot create read-only descriptor for \"%s\"; no mmap"
msgstr "impossibile creare descrittori in sola lettura per \"%s\"; nessun nmap"
-#: nscd/connections.c:651
+#: nscd/connections.c:646
#, c-format
msgid "cannot access '%s'"
msgstr "impossibile accedere a \"%s\""
-#: nscd/connections.c:699
+#: nscd/connections.c:694
#, c-format
msgid "database for %s corrupted or simultaneously used; remove %s manually if necessary and restart"
msgstr "database per %s corrotto o utilizzato simultaneamente; se necessario rimuovere manualmente %s e riavviare"
-#: nscd/connections.c:706
+#: nscd/connections.c:701
#, c-format
msgid "cannot create %s; no persistent database used"
msgstr "impossibile creare %s; nessun database persistente utilizzato"
-#: nscd/connections.c:709
+#: nscd/connections.c:704
#, c-format
msgid "cannot create %s; no sharing possible"
msgstr "impossibile creare %s; nessuna condivisione possibile"
-#: nscd/connections.c:780
+#: nscd/connections.c:775
#, c-format
msgid "cannot write to database file %s: %s"
msgstr "impossibile scrivere sul file di database %s: %s"
-#: nscd/connections.c:819
+#: nscd/connections.c:814
#, c-format
msgid "cannot set socket to close on exec: %s; disabling paranoia mode"
msgstr "impossibile impostare il socket da chiudere dopo una exec: %s; modalità paranoia disabilitata"
# lf
-#: nscd/connections.c:902
+#: nscd/connections.c:897
#, c-format
msgid "cannot open socket: %s"
msgstr "impossibile aprire il socket: %s"
-#: nscd/connections.c:922
+#: nscd/connections.c:917
#, c-format
msgid "cannot change socket to nonblocking mode: %s"
msgstr "impossibile passare alla modalità non bloccante per il socket: %s"
-#: nscd/connections.c:930
+#: nscd/connections.c:925
#, c-format
msgid "cannot set socket to close on exec: %s"
msgstr "impossibile impostare il socket da chiudere dopo una exec: %s"
# lf
-#: nscd/connections.c:943
+#: nscd/connections.c:938
#, c-format
msgid "cannot enable socket to accept connections: %s"
msgstr "impossibile abilitare il socket per accettare le connessioni: %s"
-#: nscd/connections.c:1043
+#: nscd/connections.c:1039
#, c-format
msgid "provide access to FD %d, for %s"
msgstr "fornisce l'accesso a %d FD, per %s"
# lf
-#: nscd/connections.c:1055
+#: nscd/connections.c:1051
#, c-format
msgid "cannot handle old request version %d; current version is %d"
msgstr "impossibile gestire vecchie richieste in versione %d: la versione attuale è %d"
-#: nscd/connections.c:1077
+#: nscd/connections.c:1073
#, c-format
msgid "request from %ld not handled due to missing permission"
msgstr "richiesta da %ld non gestita a causa di permessi mancanti"
-#: nscd/connections.c:1082
+#: nscd/connections.c:1078
#, c-format
msgid "request from '%s' [%ld] not handled due to missing permission"
msgstr "richiesta da \"%s\" [%ld] non gestita a causa di permessi mancanti"
-#: nscd/connections.c:1087
+#: nscd/connections.c:1083
msgid "request not handled due to missing permission"
msgstr "richiesta non gestita a causa di permessi mancanti"
# lf
-#: nscd/connections.c:1125 nscd/connections.c:1178
+#: nscd/connections.c:1121 nscd/connections.c:1174
#, c-format
msgid "cannot write result: %s"
msgstr "impossibile scrivere il risultato: %s"
-#: nscd/connections.c:1261
+#: nscd/connections.c:1257
#, c-format
msgid "error getting caller's id: %s"
msgstr "errore durante l'acquisizione dell'id del chiamante: %s"
-#: nscd/connections.c:1320
+#: nscd/connections.c:1316
#, c-format
msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode"
msgstr "impossibile aprire /proc/self/cmdline: %s; modalità paranoia disabilitata"
-#: nscd/connections.c:1334
+#: nscd/connections.c:1330
#, c-format
msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode"
msgstr "impossibile leggere /proc/self/cmdline: %s; modalità paranoia disabilitata"
-#: nscd/connections.c:1374
+#: nscd/connections.c:1370
#, c-format
msgid "cannot change to old UID: %s; disabling paranoia mode"
msgstr "impossibile ripristinare l'UID precedente: %s; modalità paranoia disabilitata"
-#: nscd/connections.c:1384
+#: nscd/connections.c:1380
#, c-format
msgid "cannot change to old GID: %s; disabling paranoia mode"
msgstr "impossibile ripristinare il GID precedente: %s; modalità paranoia disabilitata"
-#: nscd/connections.c:1397
+#: nscd/connections.c:1393
#, c-format
msgid "cannot change to old working directory: %s; disabling paranoia mode"
msgstr "impossibile ritornare alla directory di lavoro precedente: %s; modalità paranoia disabilitata"
-#: nscd/connections.c:1429
+#: nscd/connections.c:1439
#, c-format
msgid "re-exec failed: %s; disabling paranoia mode"
msgstr "re-exec non riuscita: %s; modalità paranoia disabilitata"
-#: nscd/connections.c:1438
+#: nscd/connections.c:1448
#, c-format
msgid "cannot change current working directory to \"/\": %s"
msgstr "impossibile cambiare l'attuale directory di lavoro in \"/\": %s"
# ls
-#: nscd/connections.c:1644
+#: nscd/connections.c:1641
#, c-format
msgid "short read while reading request: %s"
msgstr "lettura breve nella lettura della richiesta: %s"
# lf
-#: nscd/connections.c:1677
+#: nscd/connections.c:1674
#, c-format
msgid "key length in request too long: %d"
msgstr "lunghezza troppo lunga della chiave nella richiesta: %d"
# lf
-#: nscd/connections.c:1690
+#: nscd/connections.c:1687
#, c-format
msgid "short read while reading request key: %s"
msgstr "lettura breve nella lettura della chiave richiesta: %s"
# lf
-#: nscd/connections.c:1699
+#: nscd/connections.c:1696
#, c-format
msgid "handle_request: request received (Version = %d) from PID %ld"
msgstr "handle_request: ricevuta richiesta (versione = %d) dal PID %ld"
@@ -4062,82 +4146,82 @@ msgstr "handle_request: ricevuta richiesta (versione = %d) dal PID %ld"
# lf
#
# credo che version sia una parola chiave...
-#: nscd/connections.c:1704
+#: nscd/connections.c:1701
#, c-format
msgid "handle_request: request received (Version = %d)"
msgstr "handle_request: ricevuta richiesta (Version = %d)"
-#: nscd/connections.c:1903 nscd/connections.c:2101
+#: nscd/connections.c:1901 nscd/connections.c:2099
#, c-format
msgid "disabled inotify after read error %d"
msgstr "inotify disabilitato dopo un errore di lettura %d"
-#: nscd/connections.c:2230
+#: nscd/connections.c:2228
msgid "could not initialize conditional variable"
msgstr "impossibile inizializzare la variabile condizionale"
-#: nscd/connections.c:2238
+#: nscd/connections.c:2236
msgid "could not start clean-up thread; terminating"
msgstr "impossibile avviare il thread di pulizia; arresto"
-#: nscd/connections.c:2252
+#: nscd/connections.c:2250
msgid "could not start any worker thread; terminating"
msgstr "impossibile avviare thread di tipo worker; arresto"
# lf
-#: nscd/connections.c:2303 nscd/connections.c:2304 nscd/connections.c:2321
-#: nscd/connections.c:2330 nscd/connections.c:2348 nscd/connections.c:2359
-#: nscd/connections.c:2370
+#: nscd/connections.c:2301 nscd/connections.c:2302 nscd/connections.c:2319
+#: nscd/connections.c:2328 nscd/connections.c:2346 nscd/connections.c:2357
+#: nscd/connections.c:2368
#, c-format
msgid "Failed to run nscd as user '%s'"
msgstr "Esecuzione di nscd come utente \"%s\" non riuscita"
-#: nscd/connections.c:2322
+#: nscd/connections.c:2320
#, c-format
msgid "initial getgrouplist failed"
msgstr "getgrouplist iniziale non riuscita"
# lf
-#: nscd/connections.c:2331
+#: nscd/connections.c:2329
#, c-format
msgid "getgrouplist failed"
msgstr "getgrouplist non riuscita"
# lf
-#: nscd/connections.c:2349
+#: nscd/connections.c:2347
#, c-format
msgid "setgroups failed"
msgstr "setgroups non riuscita"
# lf
-#: nscd/grpcache.c:395 nscd/hstcache.c:430 nscd/initgrcache.c:416
-#: nscd/pwdcache.c:400 nscd/servicescache.c:343
+#: nscd/grpcache.c:383 nscd/hstcache.c:439 nscd/initgrcache.c:406
+#: nscd/pwdcache.c:378 nscd/servicescache.c:332
#, c-format
msgid "short write in %s: %s"
msgstr "scrittura breve in %s: %s"
-#: nscd/grpcache.c:438 nscd/initgrcache.c:78
+#: nscd/grpcache.c:428 nscd/initgrcache.c:78
#, c-format
msgid "Haven't found \"%s\" in group cache!"
msgstr "\"%s\" non trovato nella cache dei gruppi."
-#: nscd/grpcache.c:440 nscd/initgrcache.c:80
+#: nscd/grpcache.c:430 nscd/initgrcache.c:80
#, c-format
msgid "Reloading \"%s\" in group cache!"
msgstr "Ricaricamento di \"%s\" nella cache dei gruppi."
# lf
-#: nscd/grpcache.c:517
+#: nscd/grpcache.c:509
#, c-format
msgid "Invalid numeric gid \"%s\"!"
msgstr "GID numerico \"%s\" non valido."
-#: nscd/mem.c:457
+#: nscd/mem.c:431
#, c-format
msgid "freed %zu bytes in %s cache"
msgstr "liberati %zu byte nella cache %s"
-#: nscd/mem.c:594
+#: nscd/mem.c:574
#, c-format
msgid "no more memory for database '%s'"
msgstr "memoria esaurita per il database \"%s\""
@@ -4191,7 +4275,7 @@ msgstr "Usa una cache separata per ciascun utente"
msgid "Name Service Cache Daemon."
msgstr "Demone di cache dei nomi di servizio (NSCD)."
-#: nscd/nscd.c:147 nss/getent.c:876 nss/makedb.c:123
+#: nscd/nscd.c:147 nss/getent.c:952 nss/makedb.c:123
#, c-format
msgid "wrong number of arguments"
msgstr "numero di argomenti errato"
@@ -4220,7 +4304,7 @@ msgstr "Impossibile cambiare l'attuale directory di lavoro a \"/\""
msgid "Could not create log file"
msgstr "Impossibile creare il file di registro"
-#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:172
+#: nscd/nscd.c:305 nscd/nscd.c:330 nscd/nscd_stat.c:174
#, c-format
msgid "Only root is allowed to use this option!"
msgstr "Solo l'utente root ha il permesso per usare questa opzione."
@@ -4230,7 +4314,7 @@ msgstr "Solo l'utente root ha il permesso per usare questa opzione."
msgid "'%s' is not a known database"
msgstr "\"%s\" non è un database conosciuto"
-#: nscd/nscd.c:370 nscd/nscd_stat.c:191
+#: nscd/nscd.c:370 nscd/nscd_stat.c:193
#, c-format
msgid "write incomplete"
msgstr "scrittura incompleta"
@@ -4295,35 +4379,35 @@ msgstr "impossibile acquisire l'attuale cartella di lavoro: %s; modalità parano
msgid "maximum file size for %s database too small"
msgstr "dimensione massima del file per il database %s troppo piccola"
-#: nscd/nscd_stat.c:141
+#: nscd/nscd_stat.c:143
#, c-format
msgid "cannot write statistics: %s"
msgstr "impossibile scrivere le statistiche: %s"
-#: nscd/nscd_stat.c:156
+#: nscd/nscd_stat.c:158
msgid "yes"
msgstr "sì"
-#: nscd/nscd_stat.c:157
+#: nscd/nscd_stat.c:159
msgid "no"
msgstr "no"
-#: nscd/nscd_stat.c:168
+#: nscd/nscd_stat.c:170
#, c-format
msgid "Only root or %s is allowed to use this option!"
msgstr "Solo l'utente root o %s ha il permesso per usare questa opzione."
-#: nscd/nscd_stat.c:179
+#: nscd/nscd_stat.c:181
#, c-format
msgid "nscd not running!\n"
msgstr "nscd non è in esecuzione.\n"
-#: nscd/nscd_stat.c:203
+#: nscd/nscd_stat.c:205
#, c-format
msgid "cannot read statistics data"
msgstr "impossibile leggere i dati statistici"
-#: nscd/nscd_stat.c:206
+#: nscd/nscd_stat.c:208
#, c-format
msgid ""
"nscd configuration:\n"
@@ -4334,27 +4418,27 @@ msgstr ""
"\n"
"%15d livello di debug del server\n"
-#: nscd/nscd_stat.c:230
+#: nscd/nscd_stat.c:232
#, c-format
msgid "%3ud %2uh %2um %2lus server runtime\n"
msgstr "%3ug %2uo %2um %2lus runtime del server\n"
-#: nscd/nscd_stat.c:233
+#: nscd/nscd_stat.c:235
#, c-format
msgid " %2uh %2um %2lus server runtime\n"
msgstr " %2uo %2um %2lus runtime del server\n"
-#: nscd/nscd_stat.c:235
+#: nscd/nscd_stat.c:237
#, c-format
msgid " %2um %2lus server runtime\n"
msgstr " %2um %2lus runtime del server\n"
-#: nscd/nscd_stat.c:237
+#: nscd/nscd_stat.c:239
#, c-format
msgid " %2lus server runtime\n"
msgstr " %2lus runtime del server\n"
-#: nscd/nscd_stat.c:239
+#: nscd/nscd_stat.c:241
#, c-format
msgid ""
"%15d current number of threads\n"
@@ -4362,14 +4446,16 @@ msgid ""
"%15lu number of times clients had to wait\n"
"%15s paranoia mode enabled\n"
"%15lu restart internal\n"
+"%15u reload count\n"
msgstr ""
-"%15d numero di thread correnti\n"
-"%15d numero massimo di thread\n"
-"%15lu numero di volte che il client è rimasto in attesa\n"
-"%15s modalità paranoia attiva\n"
-"%15lu riavvii interni\n"
+"%15d numero di thread correnti\n"
+"%15d numero massimo di thread\n"
+"%15lu numero di volte che il client è rimasto in attesa\n"
+"%15s modalità paranoia attiva\n"
+"%15lu riavvii interni\n"
+"%15u totale ricaricamenti\n"
-#: nscd/nscd_stat.c:273
+#: nscd/nscd_stat.c:276
#, c-format
msgid ""
"\n"
@@ -4403,8 +4489,8 @@ msgstr ""
"%15s la cache è persistente\n"
"%15s la cache è condivisa\n"
"%15zu dimensione suggerita\n"
-"%15zu dimensione totale della pila dati\n"
-"%15zu dimensione usata della pila dati\n"
+"%15zu dimensione totale del gruppo di dati\n"
+"%15zu dimensione usata del gruppo di dati\n"
"%15lu tempo di validità in secondi per voci positive\n"
"%15lu tempo di validità in secondi per voci negative\n"
"%15<PRIuMAX> richieste alla cache ricevute per gli elementi positivi\n"
@@ -4420,18 +4506,18 @@ msgstr ""
"%15<PRIuMAX> allocazioni di memoria non riuscite\n"
"%15s controllare /etc/%s per le modifiche\n"
-#: nscd/pwdcache.c:443
+#: nscd/pwdcache.c:423
#, c-format
msgid "Haven't found \"%s\" in password cache!"
msgstr "\"%s\" non trovato nella cache delle password."
-#: nscd/pwdcache.c:445
+#: nscd/pwdcache.c:425
#, c-format
msgid "Reloading \"%s\" in password cache!"
msgstr "Ricaricamento di \"%s\" nella cache delle password."
# lf
-#: nscd/pwdcache.c:523
+#: nscd/pwdcache.c:506
#, c-format
msgid "Invalid numeric uid \"%s\"!"
msgstr "UID numerico \"%s\" non valido."
@@ -4497,7 +4583,7 @@ msgstr "Access Vector Cache (AVC) avviato"
#: nscd/selinux.c:356
msgid "Error getting context of socket peer"
-msgstr "Errore nell'ottenere il contesto del peer del socket"
+msgstr "Errore nell'ottenere il contesto del corrispondente del socket"
#: nscd/selinux.c:361
msgid "Error getting context of nscd"
@@ -4538,50 +4624,54 @@ msgstr ""
"%15u richieste di CAV esaminate\n"
"%15u richieste di CAV perse\n"
-#: nscd/servicescache.c:390
+#: nscd/servicescache.c:381
#, c-format
msgid "Haven't found \"%s\" in services cache!"
msgstr "\"%s\" non trovato nella cache dei servizi."
-#: nscd/servicescache.c:392
+#: nscd/servicescache.c:383
#, c-format
msgid "Reloading \"%s\" in services cache!"
msgstr "Ricaricamento di \"%s\" nella cache dei servizi."
-#: nss/getent.c:52
+#: nss/getent.c:54
msgid "database [key ...]"
msgstr "database [chiave ...]"
-#: nss/getent.c:57
+#: nss/getent.c:59
msgid "Service configuration to be used"
msgstr "Configurazione da usare del servizio"
-#: nss/getent.c:62
+#: nss/getent.c:60
+msgid "disable IDN encoding"
+msgstr "disabilita codifica IDN"
+
+#: nss/getent.c:65
msgid "Get entries from administrative database."
msgstr "Ottiene voci da un database amministrativo."
-#: nss/getent.c:143 nss/getent.c:408
+#: nss/getent.c:149 nss/getent.c:479
#, c-format
msgid "Enumeration not supported on %s\n"
msgstr "Enumerazione non supportata su %s\n"
-#: nss/getent.c:794
+#: nss/getent.c:866
#, c-format
msgid "Unknown database name"
msgstr "Nome del database sconosciuto"
-#: nss/getent.c:820
+#: nss/getent.c:896
msgid "Supported databases:\n"
msgstr "Database supportati:\n"
-#: nss/getent.c:886
+#: nss/getent.c:962
#, c-format
msgid "Unknown database: %s\n"
msgstr "Database sconosciuto: %s\n"
#: nss/makedb.c:60
msgid "Convert key to lower case"
-msgstr "Converte i tasti a lettere minuscole"
+msgstr "Converte la chiave in lettere minuscole"
#: nss/makedb.c:63
msgid "Do not print messages while building database"
@@ -4639,17 +4729,17 @@ msgid "while reading database"
msgstr "durante la lettura del database"
# lf
-#: posix/getconf.c:945
+#: posix/getconf.c:1036
#, c-format
msgid "Usage: %s [-v specification] variable_name [pathname]\n"
msgstr "Uso: %s [-v specifica] nome_variabile [nome_percorso]\n"
-#: posix/getconf.c:948
+#: posix/getconf.c:1039
#, c-format
msgid " %s -a [pathname]\n"
msgstr " %s -a [nomepercorso]\n"
-#: posix/getconf.c:1023
+#: posix/getconf.c:1115
#, c-format
msgid ""
"Usage: getconf [-v SPEC] VAR\n"
@@ -4669,152 +4759,156 @@ msgstr ""
"\n"
# lf
-#: posix/getconf.c:1081
+#: posix/getconf.c:1173
#, c-format
msgid "unknown specification \"%s\""
msgstr "specifica sconosciuta \"%s\""
-#: posix/getconf.c:1109
+#: posix/getconf.c:1225
#, c-format
msgid "Couldn't execute %s"
msgstr "Impossibile eseguire %s"
# lf
-#: posix/getconf.c:1149 posix/getconf.c:1165
+#: posix/getconf.c:1269 posix/getconf.c:1285
msgid "undefined"
msgstr "non definito"
# lf
-#: posix/getconf.c:1187
+#: posix/getconf.c:1307
#, c-format
msgid "Unrecognized variable `%s'"
msgstr "Variabile \"%s\" non riconosciuta"
-#: posix/getopt.c:570 posix/getopt.c:586
+#: posix/getopt.c:594 posix/getopt.c:623
#, c-format
-msgid "%s: option '%s' is ambiguous\n"
-msgstr "%s: l'opzione \"%s\" è ambigua\n"
+msgid "%s: option '%s' is ambiguous; possibilities:"
+msgstr "%s: l'opzione \"%s\" è ambigua; alternative:"
-#: posix/getopt.c:619 posix/getopt.c:623
+#: posix/getopt.c:664 posix/getopt.c:668
#, c-format
msgid "%s: option '--%s' doesn't allow an argument\n"
msgstr "%s: l'opzione \"--%s\" non ammette argomenti\n"
-#: posix/getopt.c:632 posix/getopt.c:637
+#: posix/getopt.c:677 posix/getopt.c:682
#, c-format
msgid "%s: option '%c%s' doesn't allow an argument\n"
msgstr "%s: l'opzione \"%c%s\" non ammette argomenti\n"
-#: posix/getopt.c:680 posix/getopt.c:699 posix/getopt.c:1002
-#: posix/getopt.c:1021
+#: posix/getopt.c:725 posix/getopt.c:744
#, c-format
-msgid "%s: option '%s' requires an argument\n"
+msgid "%s: option '--%s' requires an argument\n"
msgstr "%s: l'opzione \"%s\" richiede un argomento\n"
-#: posix/getopt.c:737 posix/getopt.c:740
+#: posix/getopt.c:782 posix/getopt.c:785
#, c-format
msgid "%s: unrecognized option '--%s'\n"
msgstr "%s: opzione non riconosciuta \"--%s\"\n"
-#: posix/getopt.c:748 posix/getopt.c:751
+#: posix/getopt.c:793 posix/getopt.c:796
#, c-format
msgid "%s: unrecognized option '%c%s'\n"
msgstr "%s: opzione non riconosciuta \"%c%s\"\n"
-#: posix/getopt.c:800 posix/getopt.c:803
+#: posix/getopt.c:845 posix/getopt.c:848
#, c-format
msgid "%s: invalid option -- '%c'\n"
msgstr "%s: opzione non valida -- \"%c\"\n"
-#: posix/getopt.c:853 posix/getopt.c:870 posix/getopt.c:1073
-#: posix/getopt.c:1091
+#: posix/getopt.c:898 posix/getopt.c:915 posix/getopt.c:1123
+#: posix/getopt.c:1141
#, c-format
msgid "%s: option requires an argument -- '%c'\n"
msgstr "%s: l'opzione richiede un argomento -- \"%c\"\n"
-#: posix/getopt.c:923 posix/getopt.c:939
+#: posix/getopt.c:971 posix/getopt.c:987
#, c-format
msgid "%s: option '-W %s' is ambiguous\n"
msgstr "%s: l'opzione \"-W %s\" è ambigua\n"
-#: posix/getopt.c:963 posix/getopt.c:981
+#: posix/getopt.c:1011 posix/getopt.c:1029
#, c-format
msgid "%s: option '-W %s' doesn't allow an argument\n"
msgstr "%s: l'opzione \"-W %s\" non ammette argomenti\n"
+#: posix/getopt.c:1050 posix/getopt.c:1068
+#, c-format
+msgid "%s: option '-W %s' requires an argument\n"
+msgstr "%s: l'opzione \"-W %s\" richiede un argomento\n"
+
# lf
-#: posix/regcomp.c:136
+#: posix/regcomp.c:135
msgid "No match"
msgstr "Nessuna corrispondenza"
# lf
-#: posix/regcomp.c:139
+#: posix/regcomp.c:138
msgid "Invalid regular expression"
msgstr "Espressione regolare non valida"
# lf
-#: posix/regcomp.c:142
+#: posix/regcomp.c:141
msgid "Invalid collation character"
msgstr "Carattere di collazione non valido"
# lf
-#: posix/regcomp.c:145
+#: posix/regcomp.c:144
msgid "Invalid character class name"
msgstr "Nome della classe di caratteri non valido"
-#: posix/regcomp.c:148
+#: posix/regcomp.c:147
msgid "Trailing backslash"
msgstr "Carattere \"backslash\" alla fine della riga"
-#: posix/regcomp.c:151
+#: posix/regcomp.c:150
msgid "Invalid back reference"
msgstr "Riferimento all'indietro non valido"
-#: posix/regcomp.c:154
+#: posix/regcomp.c:153
msgid "Unmatched [ or [^"
msgstr "[ o [^ senza corrispondenza"
-#: posix/regcomp.c:157
+#: posix/regcomp.c:156
msgid "Unmatched ( or \\("
msgstr "( o \\( senza corrispondenza"
-#: posix/regcomp.c:160
+#: posix/regcomp.c:159
msgid "Unmatched \\{"
msgstr "\\{ senza corrispondenza"
-#: posix/regcomp.c:163
+#: posix/regcomp.c:162
msgid "Invalid content of \\{\\}"
msgstr "Contenuto di \\{\\} non valido"
-#: posix/regcomp.c:166
+#: posix/regcomp.c:165
msgid "Invalid range end"
msgstr "Fine dell'intervallo non valida"
-#: posix/regcomp.c:169
+#: posix/regcomp.c:168
msgid "Memory exhausted"
msgstr "Memoria esaurita"
-#: posix/regcomp.c:172
+#: posix/regcomp.c:171
msgid "Invalid preceding regular expression"
msgstr "Espressione regolare precedente non valida"
# lf
-#: posix/regcomp.c:175
+#: posix/regcomp.c:174
msgid "Premature end of regular expression"
msgstr "Fine prematura dell'espressione regolare"
# lf
-#: posix/regcomp.c:178
+#: posix/regcomp.c:177
msgid "Regular expression too big"
msgstr "Espressione regolare troppo grande"
# lf
-#: posix/regcomp.c:181
+#: posix/regcomp.c:180
msgid "Unmatched ) or \\)"
msgstr ") o \\) senza corrispondenza"
# lf
-#: posix/regcomp.c:681
+#: posix/regcomp.c:680
msgid "No previous regular expression"
msgstr "Nessuna espressione regolare precedente"
@@ -4860,7 +4954,7 @@ msgstr "Errore sconosciuto del risolutore"
#: resolv/res_hconf.c:124
#, c-format
msgid "%s: line %d: cannot specify more than %d trim domains"
-msgstr "%s: riga %d: impossibile specificare più di %d domini(o) eliminato/i"
+msgstr "%s: riga %d: impossibile specificare più di %d domini(o) da eliminare"
#: resolv/res_hconf.c:145
#, c-format
@@ -4882,6 +4976,199 @@ msgstr "%s: riga %d: comando \"%s\" errato\n"
msgid "%s: line %d: ignoring trailing garbage `%s'\n"
msgstr "%s: riga %d: spazzatura ignorata alla fine della riga \"%s\"\n"
+# lf
+#: stdio-common/psiginfo-data.h:2
+msgid "Illegal opcode"
+msgstr "Opcode non consentito"
+
+# lf
+#: stdio-common/psiginfo-data.h:3
+msgid "Illegal operand"
+msgstr "Operando non consentito"
+
+#: stdio-common/psiginfo-data.h:4
+msgid "Illegal addressing mode"
+msgstr "Modalità di indirizzamento non consentita"
+
+# lf
+#: stdio-common/psiginfo-data.h:5
+msgid "Illegal trap"
+msgstr "Trap non consentito"
+
+#: stdio-common/psiginfo-data.h:6
+msgid "Privileged opcode"
+msgstr "Opcode privilegiato"
+
+#: stdio-common/psiginfo-data.h:7
+msgid "Privileged register"
+msgstr "Registro privilegiato"
+
+#: stdio-common/psiginfo-data.h:8
+msgid "Coprocessor error"
+msgstr "Errore del coprocessore"
+
+# lf
+#: stdio-common/psiginfo-data.h:9
+msgid "Internal stack error"
+msgstr "Errore dello stack interno"
+
+#: stdio-common/psiginfo-data.h:12
+msgid "Integer divide by zero"
+msgstr "Intero diviso per zero"
+
+#: stdio-common/psiginfo-data.h:13
+msgid "Integer overflow"
+msgstr "Overflow dell'intero"
+
+#: stdio-common/psiginfo-data.h:14
+msgid "Floating-point divide by zero"
+msgstr "Virgola mobile diviso per zero"
+
+#: stdio-common/psiginfo-data.h:15
+msgid "Floating-point overflow"
+msgstr "Overflow del virgola mobile"
+
+#: stdio-common/psiginfo-data.h:16
+msgid "Floating-point underflow"
+msgstr "Underflow del virgola mobile"
+
+#: stdio-common/psiginfo-data.h:17
+msgid "Floating-poing inexact result"
+msgstr "Risultato inesatto del virgola mobile"
+
+# lf
+#: stdio-common/psiginfo-data.h:18
+msgid "Invalid floating-point operation"
+msgstr "Operazione in virgola mobile non valida"
+
+# lf
+#: stdio-common/psiginfo-data.h:19
+msgid "Subscript out of range"
+msgstr "Pedice fuori dall'intervallo"
+
+#: stdio-common/psiginfo-data.h:22
+msgid "Address not mapped to object"
+msgstr "Indirizzo non mappato sull'oggetto"
+
+#: stdio-common/psiginfo-data.h:23
+msgid "Invalid permissions for mapped object"
+msgstr "Permessi non validi per l'oggetto mappato"
+
+# lf
+#: stdio-common/psiginfo-data.h:26
+msgid "Invalid address alignment"
+msgstr "Allineamento non valido dell'indirizzo"
+
+#: stdio-common/psiginfo-data.h:27
+msgid "Nonexisting physical address"
+msgstr "Indirizzo fisico non esistente"
+
+#: stdio-common/psiginfo-data.h:28
+msgid "Object-specific hardware error"
+msgstr "Errore hardware specifico per l'oggetto"
+
+#: stdio-common/psiginfo-data.h:31
+msgid "Process breakpoint"
+msgstr "Punto di interruzione del processo"
+
+#: stdio-common/psiginfo-data.h:32
+msgid "Process trace trap"
+msgstr "Trace trap del processo"
+
+#: stdio-common/psiginfo-data.h:35
+msgid "Child has exited"
+msgstr "Il processo figlio è uscito"
+
+#: stdio-common/psiginfo-data.h:36
+msgid "Child has terminated abnormally and did not create a core file"
+msgstr "Il processo figlio è terminato in modo anomalo e non ha creato un file core"
+
+#: stdio-common/psiginfo-data.h:37
+msgid "Child hat terminated abnormally and created a core file"
+msgstr "Il processo figlio è terminato in modo anomalo e ha creato un file core"
+
+#: stdio-common/psiginfo-data.h:38
+msgid "Traced child has trapped"
+msgstr "Rilevato un trace trap nel processo figlio"
+
+#: stdio-common/psiginfo-data.h:39
+msgid "Child has stopped"
+msgstr "Il processo figlio si è fermato"
+
+#: stdio-common/psiginfo-data.h:40
+msgid "Stopped child has continued"
+msgstr "Il processo figlio fermato è proseguito"
+
+# lf
+#: stdio-common/psiginfo-data.h:43
+msgid "Data input available"
+msgstr "Dati di input disponibili"
+
+# lf
+#: stdio-common/psiginfo-data.h:44
+msgid "Output buffers available"
+msgstr "Buffer di output disponibile"
+
+# lf
+#: stdio-common/psiginfo-data.h:45
+msgid "Input message available"
+msgstr "Messaggio di input disponibile"
+
+# lf
+#: stdio-common/psiginfo-data.h:46
+msgid "I/O error"
+msgstr "Errore di I/O"
+
+# lf
+#: stdio-common/psiginfo-data.h:47
+msgid "High priority input available"
+msgstr "Input ad alta priorità disponibile"
+
+#: stdio-common/psiginfo-data.h:48
+msgid "Device disconnected"
+msgstr "Dispositivo disconnesso"
+
+#: stdio-common/psiginfo.c:145
+msgid "Signal sent by kill()"
+msgstr "Segnale inviato da kill()"
+
+#: stdio-common/psiginfo.c:148
+msgid "Signal sent by sigqueue()"
+msgstr "Segnale inviato da sigqueue()"
+
+#: stdio-common/psiginfo.c:151
+msgid "Signal generated by the expiration of a timer"
+msgstr "Segnale generato dalla scadenza di un timer"
+
+#: stdio-common/psiginfo.c:154
+msgid "Signal generated by the completion of an asynchronous I/O request"
+msgstr "Segnale generato dal completamento di una richiesta asincrona di I/O"
+
+#: stdio-common/psiginfo.c:158
+msgid "Signal generated by the arrival of a message on an empty message queue"
+msgstr "Segnale generato dall'arrivo di un messaggio su una coda vuota"
+
+#: stdio-common/psiginfo.c:163
+msgid "Signal sent by tkill()"
+msgstr "Segnale inviato da tkill()"
+
+#: stdio-common/psiginfo.c:168
+msgid "Signal generated by the completion of an asynchronous name lookup request"
+msgstr "Segnale generato dal completamento di una richiesta asincrona di ricerca del nome"
+
+#: stdio-common/psiginfo.c:174
+msgid "Signal generated by the completion of an I/O request"
+msgstr "Segnale generato dal completamento di una richiesta di I/O"
+
+#: stdio-common/psiginfo.c:180
+msgid "Signal sent by the kernel"
+msgstr "Segnale inviato dal kernel"
+
+#: stdio-common/psiginfo.c:204
+#, c-format
+msgid "Unknown signal %d\n"
+msgstr "Segnale %d sconosciuto\n"
+
#: stdio-common/psignal.c:51
#, c-format
msgid "%s%sUnknown signal %d\n"
@@ -4892,7 +5179,7 @@ msgid "Unknown signal"
msgstr "Segnale sconosciuto"
# lf
-#: string/_strerror.c:45 sysdeps/mach/_strerror.c:87
+#: string/_strerror.c:47 sysdeps/mach/_strerror.c:87
msgid "Unknown error "
msgstr "Errore sconosciuto "
@@ -4910,630 +5197,630 @@ msgstr "Segnale real-time %d"
msgid "Unknown signal %d"
msgstr "Segnale %d sconosciuto"
-#: sunrpc/auth_unix.c:114 sunrpc/clnt_tcp.c:131 sunrpc/clnt_udp.c:143
-#: sunrpc/clnt_unix.c:128 sunrpc/svc_tcp.c:179 sunrpc/svc_tcp.c:218
-#: sunrpc/svc_udp.c:153 sunrpc/svc_unix.c:176 sunrpc/svc_unix.c:215
-#: sunrpc/xdr.c:566 sunrpc/xdr.c:718 sunrpc/xdr_array.c:106
-#: sunrpc/xdr_rec.c:156 sunrpc/xdr_ref.c:85
+#: sunrpc/auth_unix.c:113 sunrpc/clnt_tcp.c:125 sunrpc/clnt_udp.c:136
+#: sunrpc/clnt_unix.c:126 sunrpc/svc_tcp.c:173 sunrpc/svc_tcp.c:218
+#: sunrpc/svc_udp.c:147 sunrpc/svc_unix.c:174 sunrpc/svc_unix.c:215
+#: sunrpc/xdr.c:632 sunrpc/xdr.c:792 sunrpc/xdr_array.c:100
+#: sunrpc/xdr_rec.c:154 sunrpc/xdr_ref.c:79
msgid "out of memory\n"
msgstr "memoria esaurita\n"
-#: sunrpc/auth_unix.c:350
+#: sunrpc/auth_unix.c:351
msgid "auth_unix.c: Fatal marshalling problem"
msgstr "auth_unix.c: problema fatale di marshalling"
-#: sunrpc/clnt_perr.c:105 sunrpc/clnt_perr.c:121
+#: sunrpc/clnt_perr.c:98 sunrpc/clnt_perr.c:114
#, c-format
msgid "%s: %s; low version = %lu, high version = %lu"
msgstr "%s: %s; versione inferiore = %lu, versione superiore = %lu"
-#: sunrpc/clnt_perr.c:112
+#: sunrpc/clnt_perr.c:105
#, c-format
msgid "%s: %s; why = %s\n"
msgstr "%s: %s; motivo = %s\n"
-#: sunrpc/clnt_perr.c:114
+#: sunrpc/clnt_perr.c:107
#, c-format
msgid "%s: %s; why = (unknown authentication error - %d)\n"
msgstr "%s: %s; motivo = (errore di autenticazione sconosciuto - %d)\n"
# lf
-#: sunrpc/clnt_perr.c:159
+#: sunrpc/clnt_perr.c:156
msgid "RPC: Success"
msgstr "RPC: successo"
# lf
-#: sunrpc/clnt_perr.c:162
+#: sunrpc/clnt_perr.c:159
msgid "RPC: Can't encode arguments"
msgstr "RPC: impossibile codificare gli argomenti"
# lf
-#: sunrpc/clnt_perr.c:166
+#: sunrpc/clnt_perr.c:163
msgid "RPC: Can't decode result"
msgstr "RPC: impossibile decodificare il risultato"
# lf
-#: sunrpc/clnt_perr.c:170
+#: sunrpc/clnt_perr.c:167
msgid "RPC: Unable to send"
msgstr "RPC: impossibile inviare"
# lf
-#: sunrpc/clnt_perr.c:174
+#: sunrpc/clnt_perr.c:171
msgid "RPC: Unable to receive"
msgstr "RPC: impossibile ricevere"
# lf
-#: sunrpc/clnt_perr.c:178
+#: sunrpc/clnt_perr.c:175
msgid "RPC: Timed out"
msgstr "RPC: tempo scaduto"
# lf
-#: sunrpc/clnt_perr.c:182
+#: sunrpc/clnt_perr.c:179
msgid "RPC: Incompatible versions of RPC"
msgstr "RPC: versione di RPC non compatibile"
# lf
-#: sunrpc/clnt_perr.c:186
+#: sunrpc/clnt_perr.c:183
msgid "RPC: Authentication error"
msgstr "RPC: errore di autenticazione"
# lf
-#: sunrpc/clnt_perr.c:190
+#: sunrpc/clnt_perr.c:187
msgid "RPC: Program unavailable"
msgstr "RPC: programma non disponibile"
# lf
-#: sunrpc/clnt_perr.c:194
+#: sunrpc/clnt_perr.c:191
msgid "RPC: Program/version mismatch"
msgstr "RPC: programma/versione non corrispondente"
# lf
-#: sunrpc/clnt_perr.c:198
+#: sunrpc/clnt_perr.c:195
msgid "RPC: Procedure unavailable"
msgstr "RPC: procedura non disponibile"
# lf
-#: sunrpc/clnt_perr.c:202
+#: sunrpc/clnt_perr.c:199
msgid "RPC: Server can't decode arguments"
msgstr "RCP: argomenti non decodificabili dal server"
# lf
-#: sunrpc/clnt_perr.c:206
+#: sunrpc/clnt_perr.c:203
msgid "RPC: Remote system error"
msgstr "RPC: errore di sistema remoto"
# lf
-#: sunrpc/clnt_perr.c:210
+#: sunrpc/clnt_perr.c:207
msgid "RPC: Unknown host"
msgstr "RPC: host sconosciuto"
# lf
-#: sunrpc/clnt_perr.c:214
+#: sunrpc/clnt_perr.c:211
msgid "RPC: Unknown protocol"
msgstr "RPC: protocollo sconosciuto"
# lf
-#: sunrpc/clnt_perr.c:218
+#: sunrpc/clnt_perr.c:215
msgid "RPC: Port mapper failure"
msgstr "RPC: errore del portmapper"
# lf
-#: sunrpc/clnt_perr.c:222
+#: sunrpc/clnt_perr.c:219
msgid "RPC: Program not registered"
msgstr "RPC: programma non registrato"
# lf
-#: sunrpc/clnt_perr.c:226
+#: sunrpc/clnt_perr.c:223
msgid "RPC: Failed (unspecified error)"
msgstr "RPC: non riuscito (errore non specificato)"
# lf
-#: sunrpc/clnt_perr.c:267
+#: sunrpc/clnt_perr.c:264
msgid "RPC: (unknown error code)"
msgstr "RPC: (codice di errore sconosciuto)"
-#: sunrpc/clnt_perr.c:330
+#: sunrpc/clnt_perr.c:336
msgid "Authentication OK"
msgstr "Autenticazione OK"
# lf
-#: sunrpc/clnt_perr.c:333
+#: sunrpc/clnt_perr.c:339
msgid "Invalid client credential"
msgstr "Credenziali del client non valide"
# lf
-#: sunrpc/clnt_perr.c:337
+#: sunrpc/clnt_perr.c:343
msgid "Server rejected credential"
msgstr "Credenziali rifiutate dal server"
# lf
-#: sunrpc/clnt_perr.c:341
+#: sunrpc/clnt_perr.c:347
msgid "Invalid client verifier"
msgstr "Verificatore del client non valido"
# lf
-#: sunrpc/clnt_perr.c:345
+#: sunrpc/clnt_perr.c:351
msgid "Server rejected verifier"
msgstr "Verificatore rifiutato dal server"
-#: sunrpc/clnt_perr.c:349
+#: sunrpc/clnt_perr.c:355
msgid "Client credential too weak"
-msgstr "Credenziale del client troppo debole"
+msgstr "Credenziali del client troppo debole"
# lf
-#: sunrpc/clnt_perr.c:353
+#: sunrpc/clnt_perr.c:359
msgid "Invalid server verifier"
msgstr "Verificatore del server non valido"
-#: sunrpc/clnt_perr.c:357
+#: sunrpc/clnt_perr.c:363
msgid "Failed (unspecified error)"
msgstr "Non riuscita (errore non specificato)"
-#: sunrpc/clnt_raw.c:117
+#: sunrpc/clnt_raw.c:115
msgid "clnt_raw.c: fatal header serialization error"
-msgstr "clnt_raw.c: errore fatale di serializzazione dell'header"
+msgstr "clnt_raw.c: errore fatale di serializzazione dell'intestazione"
-#: sunrpc/pm_getmaps.c:83
+#: sunrpc/pm_getmaps.c:77
msgid "pmap_getmaps.c: rpc problem"
msgstr "pmap_getmaps.c: problema di rpc"
-#: sunrpc/pmap_clnt.c:129
+#: sunrpc/pmap_clnt.c:127
msgid "Cannot register service"
msgstr "Impossibile registrare il servizio"
-#: sunrpc/pmap_rmt.c:248
+#: sunrpc/pmap_rmt.c:243
msgid "Cannot create socket for broadcast rpc"
msgstr "Impossibile creare il socket per l'rpc broadcast"
-#: sunrpc/pmap_rmt.c:255
+#: sunrpc/pmap_rmt.c:250
msgid "Cannot set socket option SO_BROADCAST"
msgstr "Impossibile impostare l'opzione SO_BROADCAST del socket"
-#: sunrpc/pmap_rmt.c:307
+#: sunrpc/pmap_rmt.c:302
msgid "Cannot send broadcast packet"
msgstr "Impossibile inviare il pacchetto broadcast"
-#: sunrpc/pmap_rmt.c:332
+#: sunrpc/pmap_rmt.c:327
msgid "Broadcast poll problem"
msgstr "Problema di poll del broadcast"
-#: sunrpc/pmap_rmt.c:345
+#: sunrpc/pmap_rmt.c:340
msgid "Cannot receive reply to broadcast"
msgstr "Impossibile ricevere una risposta al messaggio broadcast"
-#: sunrpc/rpc_main.c:290
+#: sunrpc/rpc_main.c:288
#, c-format
msgid "%s: output would overwrite %s\n"
msgstr "%s: l'output sovrascriverebbe %s\n"
-#: sunrpc/rpc_main.c:297
+#: sunrpc/rpc_main.c:295
#, c-format
msgid "%s: unable to open %s: %m\n"
msgstr "%s: impossibile aprire %s: %m\n"
-#: sunrpc/rpc_main.c:309
+#: sunrpc/rpc_main.c:307
#, c-format
msgid "%s: while writing output %s: %m"
msgstr "%s: nella scrittura dell'output %s: %m"
# lf
-#: sunrpc/rpc_main.c:344
+#: sunrpc/rpc_main.c:342
#, c-format
msgid "cannot find C preprocessor: %s \n"
msgstr "impossibile trovare il preprocessore C: %s \n"
# lf
-#: sunrpc/rpc_main.c:352
+#: sunrpc/rpc_main.c:350
msgid "cannot find any C preprocessor (cpp)\n"
msgstr "impossibile trovare un preprocessore C (cpp)\n"
-#: sunrpc/rpc_main.c:421
+#: sunrpc/rpc_main.c:419
#, c-format
msgid "%s: C preprocessor failed with signal %d\n"
msgstr "%s: errore del preprocessore C con segnale %d\n"
-#: sunrpc/rpc_main.c:424
+#: sunrpc/rpc_main.c:422
#, c-format
msgid "%s: C preprocessor failed with exit code %d\n"
msgstr "%s: errore del preprocessore C con codice di uscita %d\n"
-#: sunrpc/rpc_main.c:464
+#: sunrpc/rpc_main.c:462
#, c-format
msgid "illegal nettype: `%s'\n"
-msgstr "nettype illecito: \"%s\"\n"
+msgstr "nettype non consentito: \"%s\"\n"
-#: sunrpc/rpc_main.c:1130
+#: sunrpc/rpc_main.c:1128
#, c-format
msgid "rpcgen: too many defines\n"
msgstr "rpcgen: troppi define\n"
-#: sunrpc/rpc_main.c:1142
+#: sunrpc/rpc_main.c:1140
#, c-format
msgid "rpcgen: arglist coding error\n"
msgstr "rpcgen: errore di codifica arglist\n"
#. TRANS: the file will not be removed; this is an
#. TRANS: informative message.
-#: sunrpc/rpc_main.c:1175
+#: sunrpc/rpc_main.c:1173
#, c-format
msgid "file `%s' already exists and may be overwritten\n"
-msgstr "il file \"%s\" esiste già è può essere sovrascritto\n"
+msgstr "il file \"%s\" esiste già e può essere sovrascritto\n"
-#: sunrpc/rpc_main.c:1220
+#: sunrpc/rpc_main.c:1218
#, c-format
msgid "Cannot specify more than one input file!\n"
msgstr "Impossibile specificare più di un file di input.\n"
-#: sunrpc/rpc_main.c:1394
+#: sunrpc/rpc_main.c:1392
#, c-format
msgid "This implementation doesn't support newstyle or MT-safe code!\n"
msgstr "Questa implementazione non supporta codice newstyle o MT-safe.\n"
-#: sunrpc/rpc_main.c:1403
+#: sunrpc/rpc_main.c:1401
#, c-format
msgid "Cannot use netid flag with inetd flag!\n"
msgstr "Impossibile usare il flag netid con il flag inetd.\n"
-#: sunrpc/rpc_main.c:1415
+#: sunrpc/rpc_main.c:1413
#, c-format
msgid "Cannot use netid flag without TIRPC!\n"
msgstr "Impossibile usare il flag netid senza TIRPC.\n"
-#: sunrpc/rpc_main.c:1422
+#: sunrpc/rpc_main.c:1420
#, c-format
msgid "Cannot use table flags with newstyle!\n"
msgstr "Impossibile usare il flag della tabella con newstyle.\n"
-#: sunrpc/rpc_main.c:1441
+#: sunrpc/rpc_main.c:1439
#, c-format
msgid "\"infile\" is required for template generation flags.\n"
msgstr "\"filein\" è necessario per i flag di generazione del modello.\n"
-#: sunrpc/rpc_main.c:1446
+#: sunrpc/rpc_main.c:1444
#, c-format
msgid "Cannot have more than one file generation flag!\n"
msgstr "Impossibile avere più di un flag di generazione del file.\n"
-#: sunrpc/rpc_main.c:1455
+#: sunrpc/rpc_main.c:1453
#, c-format
msgid "usage: %s infile\n"
msgstr "uso: %s filein\n"
-#: sunrpc/rpc_main.c:1456
+#: sunrpc/rpc_main.c:1454
#, c-format
msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
msgstr "\t%s [-abkCLNTM][-Dnome[=valore]] [-i dimensione] [-I [-K secondi]] [-Y percorso] filein\n"
-#: sunrpc/rpc_main.c:1458
+#: sunrpc/rpc_main.c:1456
#, c-format
msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o fileout] [filein]\n"
-#: sunrpc/rpc_main.c:1460
+#: sunrpc/rpc_main.c:1458
#, c-format
msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
msgstr "\t%s [-s nettype]* [-o fileout] [filein]\n"
-#: sunrpc/rpc_main.c:1461
+#: sunrpc/rpc_main.c:1459
#, c-format
msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
msgstr "\t%s [-n netid]* [-o fileout] [filein]\n"
-#: sunrpc/rpc_main.c:1469
+#: sunrpc/rpc_main.c:1467
#, c-format
msgid "options:\n"
msgstr "opzioni:\n"
-#: sunrpc/rpc_main.c:1470
+#: sunrpc/rpc_main.c:1468
#, c-format
msgid "-a\t\tgenerate all files, including samples\n"
msgstr "-a\t\tGenera tutti i file, inclusi i campioni\n"
-#: sunrpc/rpc_main.c:1471
+#: sunrpc/rpc_main.c:1469
#, c-format
msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
msgstr "-b\t\tModo di compatibilità retroattiva (genera codice per SunOS 4.1)\n"
-#: sunrpc/rpc_main.c:1472
+#: sunrpc/rpc_main.c:1470
#, c-format
msgid "-c\t\tgenerate XDR routines\n"
msgstr "-c\t\tGenera le routine XDR\n"
-#: sunrpc/rpc_main.c:1473
+#: sunrpc/rpc_main.c:1471
#, c-format
msgid "-C\t\tANSI C mode\n"
msgstr "-C\t\tModalità ANSI C\n"
-#: sunrpc/rpc_main.c:1474
+#: sunrpc/rpc_main.c:1472
#, c-format
msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
msgstr "-Dnome[=valore]\tDefinisce un simbolo (come #define)\n"
-#: sunrpc/rpc_main.c:1475
+#: sunrpc/rpc_main.c:1473
#, c-format
msgid "-h\t\tgenerate header file\n"
msgstr "-h\t\tGenera il file di intestazione\n"
-#: sunrpc/rpc_main.c:1476
+#: sunrpc/rpc_main.c:1474
#, c-format
msgid "-i size\t\tsize at which to start generating inline code\n"
msgstr "-i size\t\tDimensione alla quale iniziare a generare codice inline\n"
-#: sunrpc/rpc_main.c:1477
+#: sunrpc/rpc_main.c:1475
#, c-format
msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
msgstr "-I\t\tGenera il codice per il supporto inetd nel server (per SunOS 4.1)\n"
-#: sunrpc/rpc_main.c:1478
+#: sunrpc/rpc_main.c:1476
#, c-format
msgid "-K seconds\tserver exits after K seconds of inactivity\n"
msgstr "-K secondi\tIl server esce dopo K secondi di inattività\n"
-#: sunrpc/rpc_main.c:1479
+#: sunrpc/rpc_main.c:1477
#, c-format
msgid "-l\t\tgenerate client side stubs\n"
msgstr "-l\t\tGenera gli stub del client\n"
-#: sunrpc/rpc_main.c:1480
+#: sunrpc/rpc_main.c:1478
#, c-format
msgid "-L\t\tserver errors will be printed to syslog\n"
msgstr "-L\t\tStampa gli errori del server in syslog\n"
-#: sunrpc/rpc_main.c:1481
+#: sunrpc/rpc_main.c:1479
#, c-format
msgid "-m\t\tgenerate server side stubs\n"
msgstr "-m\t\tGenera gli stub del server\n"
-#: sunrpc/rpc_main.c:1482
+#: sunrpc/rpc_main.c:1480
#, c-format
msgid "-M\t\tgenerate MT-safe code\n"
msgstr "-M\t\tGenera codice MT-safe\n"
-#: sunrpc/rpc_main.c:1483
+#: sunrpc/rpc_main.c:1481
#, c-format
msgid "-n netid\tgenerate server code that supports named netid\n"
msgstr "-n netid\tGenera codice server che supporti netid con nome\n"
-#: sunrpc/rpc_main.c:1484
+#: sunrpc/rpc_main.c:1482
#, c-format
msgid "-N\t\tsupports multiple arguments and call-by-value\n"
msgstr "-N\t\tSupporta argomenti multipli e call-by-value\n"
-#: sunrpc/rpc_main.c:1485
+#: sunrpc/rpc_main.c:1483
#, c-format
msgid "-o outfile\tname of the output file\n"
msgstr "-o fileout\tNome del file di output\n"
-#: sunrpc/rpc_main.c:1486
+#: sunrpc/rpc_main.c:1484
#, c-format
msgid "-s nettype\tgenerate server code that supports named nettype\n"
msgstr "-s nettype\tGenera codice server che supporti nettype con nome\n"
-#: sunrpc/rpc_main.c:1487
+#: sunrpc/rpc_main.c:1485
#, c-format
msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
msgstr "-Sc\t\tGenera codice client campione che usa procedure remote\n"
-#: sunrpc/rpc_main.c:1488
+#: sunrpc/rpc_main.c:1486
#, c-format
msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
msgstr "-Ss\t\tGenera codice server campione che definisce procedure remote\n"
-#: sunrpc/rpc_main.c:1489
+#: sunrpc/rpc_main.c:1487
#, c-format
msgid "-Sm \t\tgenerate makefile template \n"
msgstr "-Sm \t\tGenera un modello di makefile \n"
-#: sunrpc/rpc_main.c:1490
+#: sunrpc/rpc_main.c:1488
#, c-format
msgid "-t\t\tgenerate RPC dispatch table\n"
msgstr "-t\t\tGenera la tabella di dispatch RPC\n"
-#: sunrpc/rpc_main.c:1491
+#: sunrpc/rpc_main.c:1489
#, c-format
msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
msgstr "-T\t\tGenera codice per supportare le tabelle di dispatch RPC\n"
-#: sunrpc/rpc_main.c:1492
+#: sunrpc/rpc_main.c:1490
#, c-format
msgid "-Y path\t\tdirectory name to find C preprocessor (cpp)\n"
msgstr "-Y path\t\tNome della directory in cui si trova il preprocessore C (cpp)\n"
-#: sunrpc/rpc_scan.c:114
+#: sunrpc/rpc_scan.c:112
msgid "constant or identifier expected"
msgstr "attesa una costante o un identificatore"
-#: sunrpc/rpc_scan.c:310
+#: sunrpc/rpc_scan.c:308
msgid "illegal character in file: "
-msgstr "carattere illecito nel file: "
+msgstr "carattere non consentito nel file: "
-#: sunrpc/rpc_scan.c:349 sunrpc/rpc_scan.c:375
+#: sunrpc/rpc_scan.c:347 sunrpc/rpc_scan.c:373
msgid "unterminated string constant"
msgstr "costante di tipo stringa non terminata"
-#: sunrpc/rpc_scan.c:381
+#: sunrpc/rpc_scan.c:379
msgid "empty char string"
msgstr "stringa di caratteri vuota"
-#: sunrpc/rpc_scan.c:523 sunrpc/rpc_scan.c:533
+#: sunrpc/rpc_scan.c:521 sunrpc/rpc_scan.c:531
msgid "preprocessor error"
msgstr "errore del preprocessore"
-#: sunrpc/rpcinfo.c:254 sunrpc/rpcinfo.c:400
+#: sunrpc/rpcinfo.c:246 sunrpc/rpcinfo.c:392
#, c-format
msgid "program %lu is not available\n"
msgstr "il programma %lu non è disponibile\n"
-#: sunrpc/rpcinfo.c:281 sunrpc/rpcinfo.c:327 sunrpc/rpcinfo.c:350
-#: sunrpc/rpcinfo.c:424 sunrpc/rpcinfo.c:470 sunrpc/rpcinfo.c:493
-#: sunrpc/rpcinfo.c:527
+#: sunrpc/rpcinfo.c:273 sunrpc/rpcinfo.c:319 sunrpc/rpcinfo.c:342
+#: sunrpc/rpcinfo.c:416 sunrpc/rpcinfo.c:462 sunrpc/rpcinfo.c:485
+#: sunrpc/rpcinfo.c:519
#, c-format
msgid "program %lu version %lu is not available\n"
msgstr "il programma %lu versione %lu non è disponibile\n"
-#: sunrpc/rpcinfo.c:532
+#: sunrpc/rpcinfo.c:524
#, c-format
msgid "program %lu version %lu ready and waiting\n"
msgstr "programma %lu versione %lu pronto e in attesa\n"
# lf
-#: sunrpc/rpcinfo.c:573 sunrpc/rpcinfo.c:580
+#: sunrpc/rpcinfo.c:565 sunrpc/rpcinfo.c:572
msgid "rpcinfo: can't contact portmapper"
msgstr "rcpinfo: impossibile contattare il portmapper"
# ls
-#: sunrpc/rpcinfo.c:587
+#: sunrpc/rpcinfo.c:579
msgid "No remote programs registered.\n"
msgstr "Nessun programma remoto registrato.\n"
-#: sunrpc/rpcinfo.c:591
+#: sunrpc/rpcinfo.c:583
msgid " program vers proto port\n"
msgstr " programma vers proto porta\n"
-#: sunrpc/rpcinfo.c:630
+#: sunrpc/rpcinfo.c:622
msgid "(unknown)"
msgstr "(sconosciuto)"
-#: sunrpc/rpcinfo.c:654
+#: sunrpc/rpcinfo.c:646
#, c-format
msgid "rpcinfo: broadcast failed: %s\n"
msgstr "rpcinfo: broadcast non riuscito: %s\n"
-#: sunrpc/rpcinfo.c:675
+#: sunrpc/rpcinfo.c:667
msgid "Sorry. You are not root\n"
msgstr "Non si è root.\n"
-#: sunrpc/rpcinfo.c:682
+#: sunrpc/rpcinfo.c:674
#, c-format
msgid "rpcinfo: Could not delete registration for prog %s version %s\n"
msgstr "rpcinfo: impossibile eliminare la registrazione per il programma %s versione %s\n"
# lf
-#: sunrpc/rpcinfo.c:691
+#: sunrpc/rpcinfo.c:683
msgid "Usage: rpcinfo [ -n portnum ] -u host prognum [ versnum ]\n"
msgstr "Uso: rpcinfo [ -n numporta ] -t host numprog [ numvers ]\n"
# lf
-#: sunrpc/rpcinfo.c:693
+#: sunrpc/rpcinfo.c:685
msgid " rpcinfo [ -n portnum ] -t host prognum [ versnum ]\n"
msgstr " rpcinfo [ -n numporta ] -t host numprog [ numvers ]\n"
-#: sunrpc/rpcinfo.c:695
+#: sunrpc/rpcinfo.c:687
msgid " rpcinfo -p [ host ]\n"
msgstr " rpcinfo -p [ host ]\n"
# lf
-#: sunrpc/rpcinfo.c:696
+#: sunrpc/rpcinfo.c:688
msgid " rpcinfo -b prognum versnum\n"
msgstr " rpcinfo -b numprog numvers\n"
# lf
-#: sunrpc/rpcinfo.c:697
+#: sunrpc/rpcinfo.c:689
msgid " rpcinfo -d prognum versnum\n"
msgstr " rpcinfo -d numprog numvers\n"
# lf
-#: sunrpc/rpcinfo.c:722
+#: sunrpc/rpcinfo.c:714
#, c-format
msgid "rpcinfo: %s is unknown service\n"
msgstr "rcpinfo: %s è un servizio sconosciuto\n"
# lf
-#: sunrpc/rpcinfo.c:759
+#: sunrpc/rpcinfo.c:751
#, c-format
msgid "rpcinfo: %s is unknown host\n"
msgstr "rcpinfo: %s è un host sconosciuto\n"
-#: sunrpc/svc_run.c:70
+#: sunrpc/svc_run.c:71
msgid "svc_run: - out of memory"
msgstr "svc_run: - memoria esaurita"
-#: sunrpc/svc_run.c:90
+#: sunrpc/svc_run.c:91
msgid "svc_run: - poll failed"
msgstr "svc_run: - poll non riuscita"
-#: sunrpc/svc_simple.c:87
+#: sunrpc/svc_simple.c:81
#, c-format
msgid "can't reassign procedure number %ld\n"
msgstr "impossibile riassegnare il numero di procedura %ld\n"
# lf
-#: sunrpc/svc_simple.c:97
+#: sunrpc/svc_simple.c:91
msgid "couldn't create an rpc server\n"
msgstr "impossibile creare un server rcp\n"
-#: sunrpc/svc_simple.c:105
+#: sunrpc/svc_simple.c:99
#, c-format
msgid "couldn't register prog %ld vers %ld\n"
msgstr "impossibile registrare il prog %ld vers %ld\n"
-#: sunrpc/svc_simple.c:113
+#: sunrpc/svc_simple.c:107
msgid "registerrpc: out of memory\n"
msgstr "registerrpc: memoria esaurita\n"
-#: sunrpc/svc_simple.c:173
+#: sunrpc/svc_simple.c:168
#, c-format
msgid "trouble replying to prog %d\n"
msgstr "problemi replicando al prog %d\n"
-#: sunrpc/svc_simple.c:182
+#: sunrpc/svc_simple.c:177
#, c-format
msgid "never registered prog %d\n"
msgstr "prog %d mai registrato\n"
-#: sunrpc/svc_tcp.c:155
+#: sunrpc/svc_tcp.c:149
msgid "svc_tcp.c - tcp socket creation problem"
msgstr "svc_tcp.c - problema nella creazione del socket tcp"
-#: sunrpc/svc_tcp.c:170
+#: sunrpc/svc_tcp.c:164
msgid "svc_tcp.c - cannot getsockname or listen"
msgstr "svc_tcp.c - impossibile eseguire getsockname o listen"
-#: sunrpc/svc_udp.c:128
+#: sunrpc/svc_udp.c:122
msgid "svcudp_create: socket creation problem"
msgstr "svcudp_create: problema nella creazione del socket"
-#: sunrpc/svc_udp.c:142
+#: sunrpc/svc_udp.c:136
msgid "svcudp_create - cannot getsockname"
msgstr "svcudp_create - impossibile eseguire getsockname"
-#: sunrpc/svc_udp.c:175
+#: sunrpc/svc_udp.c:168
msgid "svcudp_create: xp_pad is too small for IP_PKTINFO\n"
msgstr "svcudp_create: xp_pad è troppo piccolo per IP_PKTINFO\n"
-#: sunrpc/svc_udp.c:475
+#: sunrpc/svc_udp.c:476
msgid "enablecache: cache already enabled"
msgstr "enablecache: cache già abilitata"
-#: sunrpc/svc_udp.c:481
+#: sunrpc/svc_udp.c:482
msgid "enablecache: could not allocate cache"
msgstr "enablecache: impossibile allocare la cache"
-#: sunrpc/svc_udp.c:490
+#: sunrpc/svc_udp.c:491
msgid "enablecache: could not allocate cache data"
msgstr "enablecache: impossibile allocare i dati della cache"
-#: sunrpc/svc_udp.c:498
+#: sunrpc/svc_udp.c:499
msgid "enablecache: could not allocate cache fifo"
msgstr "enablecache: impossibile allocare la coda fifo della cache"
-#: sunrpc/svc_udp.c:533
+#: sunrpc/svc_udp.c:535
msgid "cache_set: victim not found"
-msgstr "cache_set: victim cache non trovata"
+msgstr "cache_set: victim non trovato"
-#: sunrpc/svc_udp.c:544
+#: sunrpc/svc_udp.c:546
msgid "cache_set: victim alloc failed"
-msgstr "cache_set: allocazione della victim cache non riuscita"
+msgstr "cache_set: allocazione di victim non riuscita"
-#: sunrpc/svc_udp.c:551
+#: sunrpc/svc_udp.c:553
msgid "cache_set: could not allocate new rpc_buffer"
msgstr "cache_set: impossibile allocare il nuovo rpc_buffer"
-#: sunrpc/svc_unix.c:150
+#: sunrpc/svc_unix.c:148
msgid "svc_unix.c - AF_UNIX socket creation problem"
msgstr "svc_unix.c - problema nella creazione del socket AF_UNIX"
-#: sunrpc/svc_unix.c:166
+#: sunrpc/svc_unix.c:164
msgid "svc_unix.c - cannot getsockname or listen"
msgstr "svc_unix.c - impossibile eseguire getsockname o listen"
@@ -5547,7 +5834,7 @@ msgstr "Interruzione"
#: sysdeps/generic/siglist.h:31 sysdeps/unix/siglist.c:29
msgid "Quit"
-msgstr "Uscita (con core dump)"
+msgstr "Uscita"
#: sysdeps/generic/siglist.h:32 sysdeps/unix/siglist.c:30
msgid "Illegal instruction"
@@ -5607,11 +5894,11 @@ msgstr "Condizione di I/O urgente"
#: sysdeps/generic/siglist.h:43 sysdeps/unix/siglist.c:43
msgid "Stopped (signal)"
-msgstr "Fermato"
+msgstr "Fermato (segnale)"
#: sysdeps/generic/siglist.h:44 sysdeps/unix/siglist.c:44
msgid "Stopped"
-msgstr "Fermato (da terminale)"
+msgstr "Fermato"
#: sysdeps/generic/siglist.h:45 sysdeps/unix/siglist.c:45
msgid "Continued"
@@ -5623,11 +5910,11 @@ msgstr "Uscita del processo figlio"
#: sysdeps/generic/siglist.h:47 sysdeps/unix/siglist.c:47
msgid "Stopped (tty input)"
-msgstr "Fermato (input tty)"
+msgstr "Fermato (input da terminale)"
#: sysdeps/generic/siglist.h:48 sysdeps/unix/siglist.c:48
msgid "Stopped (tty output)"
-msgstr "Fermato (output tty)"
+msgstr "Fermato (output da terminale)"
# lf
#: sysdeps/generic/siglist.h:49 sysdeps/unix/siglist.c:49
@@ -5701,7 +5988,7 @@ msgstr "Operazione non permessa"
#. TRANS No process matches the specified process ID.
#: sysdeps/gnu/errlist.c:45
msgid "No such process"
-msgstr "Nessun processo corrispondente"
+msgstr "Nessun processo corrisponde"
# lf
#. TRANS Interrupted function call; an asynchronous signal occurred and prevented
@@ -5729,7 +6016,7 @@ msgstr "Errore di input/output"
#. TRANS computer.
#: sysdeps/gnu/errlist.c:82
msgid "No such device or address"
-msgstr "Nessun device o indirizzo corrispondente"
+msgstr "Device o indirizzo non esistente"
#. TRANS Argument list too long; used when the arguments passed to a new program
#. TRANS being executed with one of the @code{exec} functions (@pxref{Executing a
@@ -5816,7 +6103,7 @@ msgstr "Collegamento tra dispositivi non valido"
#. TRANS particular sort of device.
#: sysdeps/gnu/errlist.c:220
msgid "No such device"
-msgstr "Nessun device di questo tipo"
+msgstr "Nessun device corrisponde"
# lf
#. TRANS A file that isn't a directory was specified when a directory is required.
@@ -5890,7 +6177,7 @@ msgstr "Spazio esaurito sul device"
#. TRANS Invalid seek operation (such as on a pipe).
#: sysdeps/gnu/errlist.c:326
msgid "Illegal seek"
-msgstr "Operazione di seek illecita"
+msgstr "Operazione di seek non consentita"
# lf
#. TRANS An attempt was made to modify something on a read-only file system.
@@ -5961,7 +6248,7 @@ msgstr "Risorsa temporaneamente non disponibile"
#. TRANS separate error code.
#: sysdeps/gnu/errlist.c:429
msgid "Operation would block"
-msgstr "L'operazione si bloccherà"
+msgstr "L'operazione si bloccherebbe"
# lf
#. TRANS An operation that cannot complete immediately was initiated on an object
@@ -6207,7 +6494,7 @@ msgstr "Quota disco superata"
#. TRANS the NFS file system on the local host.
#: sysdeps/gnu/errlist.c:787
msgid "Stale NFS file handle"
-msgstr "gestione del file NFS interrotta"
+msgstr "Gestione del file NFS interrotta"
# lf
#. TRANS An attempt was made to NFS-mount a remote file system with a file name that
@@ -6540,7 +6827,7 @@ msgstr "Accesso a una libreria condivisa danneggiata"
#: sysdeps/gnu/errlist.c:1325
msgid ".lib section in a.out corrupted"
-msgstr "sezione .lib in a.out danneggiata"
+msgstr "Sezione .lib in a.out danneggiata"
#: sysdeps/gnu/errlist.c:1333
msgid "Attempting to link in too many shared libraries"
@@ -6613,6 +6900,11 @@ msgstr "Proprietario terminato"
msgid "State not recoverable"
msgstr "Stato non recuperabile"
+# lf
+#: sysdeps/gnu/errlist.c:1461
+msgid "Operation not possible due to RF-kill"
+msgstr "Operazione non possibile a causa di un RF-kill"
+
#: sysdeps/mach/_strerror.c:57
msgid "Error in unknown error system: "
msgstr "Errore nel sistema di errore sconosciuto: "
@@ -6742,42 +7034,48 @@ msgstr "impossibile aprire \"%s\""
msgid "cannot read header from `%s'"
msgstr "impossibile leggere l'intestazione da \"%s\""
-#: timezone/zdump.c:210
+#: timezone/zdump.c:215
msgid "lacks alphabetic at start"
msgstr "manca un carattere alfabetico all'inizio"
-#: timezone/zdump.c:212
+#: timezone/zdump.c:217
msgid "has fewer than 3 alphabetics"
msgstr "ha meno di 3 caratteri alfabetici"
-#: timezone/zdump.c:214
+#: timezone/zdump.c:219
msgid "has more than 6 alphabetics"
msgstr "ha più di 6 caratteri alfabetici"
-#: timezone/zdump.c:222
+#: timezone/zdump.c:227
msgid "differs from POSIX standard"
msgstr "differisce dagli standard POSIX"
-#: timezone/zdump.c:228
+#: timezone/zdump.c:233
#, c-format
msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
msgstr "%s: attenzione: fuso orario \"%s\" abbreviazione \"%s\" %s\n"
-#: timezone/zdump.c:279
+#: timezone/zdump.c:242
#, c-format
-msgid "%s: usage is %s [ --version ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
-msgstr "%s: l'uso è %s [ --version ] [ -v ] [ -c [annoinf,]annosup ] nomefuso ...\n"
+msgid ""
+"%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n"
+"\n"
+"Report bugs to tz@elsie.nci.nih.gov.\n"
+msgstr ""
+"%s: l'uso è %s [ --version ] [ --help ] [ -v ] [ -c [annoinf,]annosup ] nomefuso ...\n"
+"\n"
+"Segnalare i bug a tz@elsie.nci.nih.gov.\n"
-#: timezone/zdump.c:296
+#: timezone/zdump.c:311
#, c-format
msgid "%s: wild -c argument %s\n"
msgstr "%s: argomento di -c errato %s\n"
-#: timezone/zdump.c:387
+#: timezone/zdump.c:398
msgid "Error writing to standard output"
msgstr "Errore di scrittura sullo standard output"
-#: timezone/zdump.c:410
+#: timezone/zdump.c:421
#, c-format
msgid "%s: use of -v on system with floating time_t other than float or double\n"
msgstr "%s: uso di -v in un sistema con time_t variabile non float o double\n"
@@ -6805,368 +7103,372 @@ msgstr "avviso: "
#: timezone/zic.c:459
#, c-format
msgid ""
-"%s: usage is %s [ --version ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
+"%s: usage is %s [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n"
"\t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n"
+"\n"
+"Report bugs to tz@elsie.nci.nih.gov.\n"
msgstr ""
-"%s: l'uso è %s [ --version ] [ -v ] [ -l orariolocale ] [ -p regoleposix ] \\\n"
+"%s: l'uso è %s [ --version ] [ --help ] [ -v ] [ -l orariolocale ] [ -p regoleposix ] \\\n"
"\t[ -d directory ] [ -L secondiintercalari ] [ -y yearistype ] [ nomefile ... ]\n"
+"\n"
+"Segnalare i bug a tz@elsie.nci.nih.gov.\n"
-#: timezone/zic.c:494
+#: timezone/zic.c:496
msgid "wild compilation-time specification of zic_t"
msgstr "specifica del tempo di compilazione di zic_t errata"
-#: timezone/zic.c:511
+#: timezone/zic.c:515
#, c-format
msgid "%s: More than one -d option specified\n"
msgstr "%s: è stata specificata più di una opzione -d\n"
-#: timezone/zic.c:521
+#: timezone/zic.c:525
#, c-format
msgid "%s: More than one -l option specified\n"
msgstr "%s: è stata specificata più di una opzione -l\n"
-#: timezone/zic.c:531
+#: timezone/zic.c:535
#, c-format
msgid "%s: More than one -p option specified\n"
msgstr "%s: è stata specificata più di una opzione -p\n"
-#: timezone/zic.c:541
+#: timezone/zic.c:545
#, c-format
msgid "%s: More than one -y option specified\n"
msgstr "%s: è stata specificata più di una opzione -y\n"
-#: timezone/zic.c:551
+#: timezone/zic.c:555
#, c-format
msgid "%s: More than one -L option specified\n"
msgstr "%s: è stata specificata più di una opzione -L\n"
-#: timezone/zic.c:600
+#: timezone/zic.c:604
msgid "link to link"
msgstr "collegamento a un collegamento"
# lf
-#: timezone/zic.c:665
+#: timezone/zic.c:669
msgid "hard link failed, symbolic link used"
msgstr "collegamento fisico fallito, usato il collegamento simbolico"
# lf
-#: timezone/zic.c:673
+#: timezone/zic.c:677
#, c-format
msgid "%s: Can't link from %s to %s: %s\n"
msgstr "%s: impossibile creare un collegamento da %s a %s: %s\n"
# lf
-#: timezone/zic.c:745 timezone/zic.c:747
+#: timezone/zic.c:749 timezone/zic.c:751
msgid "same rule name in multiple files"
msgstr "stesso nome della regola in file multipli"
# lf
-#: timezone/zic.c:788
+#: timezone/zic.c:792
msgid "unruly zone"
msgstr "fuso orario senza regole"
-#: timezone/zic.c:795
+#: timezone/zic.c:799
#, c-format
msgid "%s in ruleless zone"
msgstr "%s in un fuso orario senza regole"
-#: timezone/zic.c:816
+#: timezone/zic.c:820
msgid "standard input"
msgstr "standard input"
-#: timezone/zic.c:821
+#: timezone/zic.c:825
#, c-format
msgid "%s: Can't open %s: %s\n"
msgstr "%s: impossibile aprire %s: %s\n"
# lf
-#: timezone/zic.c:832
+#: timezone/zic.c:836
msgid "line too long"
msgstr "riga troppo lunga"
# lf
-#: timezone/zic.c:852
+#: timezone/zic.c:856
msgid "input line of unknown type"
msgstr "riga di input di tipo sconosciuto"
-#: timezone/zic.c:868
+#: timezone/zic.c:872
#, c-format
msgid "%s: Leap line in non leap seconds file %s\n"
msgstr "%s: riga \"Leap\" in un file che non è di secondi intercalari %s\n"
-#: timezone/zic.c:875 timezone/zic.c:1312 timezone/zic.c:1334
+#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338
#, c-format
msgid "%s: panic: Invalid l_value %d\n"
msgstr "%s: errore fatale: l_value %d non valido\n"
-#: timezone/zic.c:883
+#: timezone/zic.c:887
#, c-format
msgid "%s: Error reading %s\n"
msgstr "%s: errore nel leggere %s\n"
-#: timezone/zic.c:890
+#: timezone/zic.c:894
#, c-format
msgid "%s: Error closing %s: %s\n"
msgstr "%s: errore nel chiudere %s: %s\n"
# lf
-#: timezone/zic.c:895
+#: timezone/zic.c:899
msgid "expected continuation line not found"
msgstr "continuazione di riga attesa ma non trovata"
-#: timezone/zic.c:939 timezone/zic.c:2476 timezone/zic.c:2495
+#: timezone/zic.c:943 timezone/zic.c:2480 timezone/zic.c:2499
msgid "time overflow"
msgstr "overflow dell'orario"
-#: timezone/zic.c:943
+#: timezone/zic.c:947
msgid "24:00 not handled by pre-1998 versions of zic"
msgstr "24:00 non gestito dalle versioni di zic precedenti al 1998"
-#: timezone/zic.c:946
+#: timezone/zic.c:950
msgid "values over 24 hours not handled by pre-2007 versions of zic"
msgstr "i valori oltre le 24 ore non sono gestiti dalle versioni di zic precedenti al 2007"
# lf
-#: timezone/zic.c:959
+#: timezone/zic.c:963
msgid "wrong number of fields on Rule line"
msgstr "numero di campi errato nella riga \"Rule\""
# lf
-#: timezone/zic.c:963
+#: timezone/zic.c:967
msgid "nameless rule"
msgstr "regola senza nome"
-#: timezone/zic.c:968
+#: timezone/zic.c:972
msgid "invalid saved time"
-msgstr "Ora legale non valida"
+msgstr "orario memorizzato non valido"
# lf
-#: timezone/zic.c:989
+#: timezone/zic.c:993
msgid "wrong number of fields on Zone line"
msgstr "numero di campi errato nella riga \"Zone\""
-#: timezone/zic.c:995
+#: timezone/zic.c:999
#, c-format
msgid "\"Zone %s\" line and -l option are mutually exclusive"
msgstr "La riga \"Zone %s\" e l'opzione -l sono mutuamente esclusive"
-#: timezone/zic.c:1003
+#: timezone/zic.c:1007
#, c-format
msgid "\"Zone %s\" line and -p option are mutually exclusive"
msgstr "La riga \"Zone %s\" e l'opzione -p sono mutuamente esclusive"
# ls
-#: timezone/zic.c:1015
+#: timezone/zic.c:1019
#, c-format
msgid "duplicate zone name %s (file \"%s\", line %d)"
msgstr "nome del fuso %s duplicato (file \"%s\", riga %d)"
# lf
-#: timezone/zic.c:1031
+#: timezone/zic.c:1035
msgid "wrong number of fields on Zone continuation line"
msgstr "numero di campi errato nella continuazione di riga di \"Zone\""
# lf
-#: timezone/zic.c:1071
+#: timezone/zic.c:1075
msgid "invalid UTC offset"
msgstr "scostamento da UTC non valido"
# ls
-#: timezone/zic.c:1074
+#: timezone/zic.c:1078
msgid "invalid abbreviation format"
msgstr "formato di abbreviazione non valido"
-#: timezone/zic.c:1103
+#: timezone/zic.c:1107
msgid "Zone continuation line end time is not after end time of previous line"
msgstr "L'orario finale del fuso nella continuazione di riga non è successivo all'orario finale della riga precedente"
# lf
-#: timezone/zic.c:1131
+#: timezone/zic.c:1135
msgid "wrong number of fields on Leap line"
msgstr "numero di campi errato nella riga \"Leap\""
-#: timezone/zic.c:1140
+#: timezone/zic.c:1144
msgid "invalid leaping year"
msgstr "anno bisestile non valido"
# lf
-#: timezone/zic.c:1160 timezone/zic.c:1266
+#: timezone/zic.c:1164 timezone/zic.c:1270
msgid "invalid month name"
msgstr "nome di mese non valido"
# lf
-#: timezone/zic.c:1173 timezone/zic.c:1379 timezone/zic.c:1393
+#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397
msgid "invalid day of month"
msgstr "giorno del mese non valido"
-#: timezone/zic.c:1178
+#: timezone/zic.c:1182
msgid "time before zero"
msgstr "orario prima di zero"
-#: timezone/zic.c:1182
+#: timezone/zic.c:1186
msgid "time too small"
msgstr "orario troppo piccolo"
-#: timezone/zic.c:1186
+#: timezone/zic.c:1190
msgid "time too large"
msgstr "orario troppo grande"
-#: timezone/zic.c:1190 timezone/zic.c:1295
+#: timezone/zic.c:1194 timezone/zic.c:1299
msgid "invalid time of day"
msgstr "ora giornaliera non valida"
# lf
-#: timezone/zic.c:1209
+#: timezone/zic.c:1213
msgid "illegal CORRECTION field on Leap line"
-msgstr "campo CORRECTION illecito nella riga \"Leap\""
+msgstr "campo CORRECTION non consentito nella riga \"Leap\""
# lf
-#: timezone/zic.c:1214
+#: timezone/zic.c:1218
msgid "illegal Rolling/Stationary field on Leap line"
-msgstr "campo Rolling/Stationary illecito nella riga \"Leap\""
+msgstr "campo Rolling/Stationary non consentito nella riga \"Leap\""
# lf
-#: timezone/zic.c:1230
+#: timezone/zic.c:1234
msgid "wrong number of fields on Link line"
msgstr "numero di campi errato nella riga \"Link\""
# lf
-#: timezone/zic.c:1234
+#: timezone/zic.c:1238
msgid "blank FROM field on Link line"
msgstr "campo FROM vuoto nella riga \"Link\""
# lf
-#: timezone/zic.c:1238
+#: timezone/zic.c:1242
msgid "blank TO field on Link line"
msgstr "campo TO vuoto nella riga Link"
# lf
#
# o significa "inizio dell'anno" ??
-#: timezone/zic.c:1316
+#: timezone/zic.c:1320
msgid "invalid starting year"
msgstr "anno di inizio non valido"
-#: timezone/zic.c:1338
+#: timezone/zic.c:1342
msgid "invalid ending year"
msgstr "anno di fine non valido"
-#: timezone/zic.c:1342
+#: timezone/zic.c:1346
msgid "starting year greater than ending year"
msgstr "anno di inizio più grande dell'anno di fine"
-#: timezone/zic.c:1349
+#: timezone/zic.c:1353
msgid "typed single year"
msgstr "digitato un singolo anno"
# lf
-#: timezone/zic.c:1384
+#: timezone/zic.c:1388
msgid "invalid weekday name"
msgstr "nome del giorno della settimana non valido"
-#: timezone/zic.c:1562
+#: timezone/zic.c:1566
#, c-format
msgid "%s: Can't remove %s: %s\n"
msgstr "%s: impossibile rimuovere %s: %s\n"
-#: timezone/zic.c:1572
+#: timezone/zic.c:1576
#, c-format
msgid "%s: Can't create %s: %s\n"
msgstr "%s: impossibile creare %s: %s\n"
-#: timezone/zic.c:1722
+#: timezone/zic.c:1726
#, c-format
msgid "%s: Error writing %s\n"
msgstr "%s: errore nello scrivere %s\n"
-#: timezone/zic.c:2015
+#: timezone/zic.c:2019
msgid "no POSIX environment variable for zone"
msgstr "nessuna variable d'ambiente POSIX per il fuso orario"
-#: timezone/zic.c:2172
+#: timezone/zic.c:2176
msgid "can't determine time zone abbreviation to use just after until time"
msgstr "impossibile determinare l'abbreviazione del fuso orario da usare subito dopo l'orario raggiunto"
# ls
-#: timezone/zic.c:2218
+#: timezone/zic.c:2222
msgid "too many transitions?!"
msgstr "troppe transizioni."
-#: timezone/zic.c:2237
+#: timezone/zic.c:2241
msgid "internal error - addtype called with bad isdst"
msgstr "errore interno - chiamata addtype con isdst errata"
-#: timezone/zic.c:2241
+#: timezone/zic.c:2245
msgid "internal error - addtype called with bad ttisstd"
msgstr "errore interno - chiamata addtype con ttisstd errata"
-#: timezone/zic.c:2245
+#: timezone/zic.c:2249
msgid "internal error - addtype called with bad ttisgmt"
msgstr "errore interno - chiamata addtype con ttisgmt errata"
-#: timezone/zic.c:2264
+#: timezone/zic.c:2268
msgid "too many local time types"
msgstr "troppi tipi di orari locali"
-#: timezone/zic.c:2268
+#: timezone/zic.c:2272
msgid "UTC offset out of range"
msgstr "scostamento da UTC fuori dall'intervallo"
-#: timezone/zic.c:2296
+#: timezone/zic.c:2300
msgid "too many leap seconds"
msgstr "troppi secondi intercalari"
-#: timezone/zic.c:2302
+#: timezone/zic.c:2306
msgid "repeated leap second moment"
msgstr "secondo intercalare ripetuto"
-#: timezone/zic.c:2354
+#: timezone/zic.c:2358
msgid "Wild result from command execution"
msgstr "Risultato bizzarro dall'esecuzione del comando"
-#: timezone/zic.c:2355
+#: timezone/zic.c:2359
#, c-format
msgid "%s: command was '%s', result was %d\n"
msgstr "%s: il comando era \"%s\", il risultato %d\n"
-#: timezone/zic.c:2453
+#: timezone/zic.c:2457
msgid "Odd number of quotation marks"
msgstr "Numero dispari di apici"
-#: timezone/zic.c:2542
+#: timezone/zic.c:2546
msgid "use of 2/29 in non leap-year"
-msgstr "Usato 29/2 in un anno non bisestile"
+msgstr "usato 29/2 in un anno non bisestile"
-#: timezone/zic.c:2577
+#: timezone/zic.c:2581
msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
msgstr "la regola che agisce prima dell'inizio/fine del mese non funzionerà con le versioni pre-2004 di zic"
-#: timezone/zic.c:2609
+#: timezone/zic.c:2613
msgid "time zone abbreviation lacks alphabetic at start"
msgstr "manca un carattere alfabetico iniziale all'abbreviazione del fuso orario"
-#: timezone/zic.c:2611
+#: timezone/zic.c:2615
msgid "time zone abbreviation has more than 3 alphabetics"
msgstr "l'abbreviazione del fuso orario ha più di 3 caratteri alfabetici"
-#: timezone/zic.c:2613
+#: timezone/zic.c:2617
msgid "time zone abbreviation has too many alphabetics"
msgstr "l'abbreviazione del fuso orario ha troppi caratteri alfabetici"
-#: timezone/zic.c:2623
+#: timezone/zic.c:2627
msgid "time zone abbreviation differs from POSIX standard"
msgstr "l'abbreviazione del fuso orario è diversa dagli standard POSIX"
-#: timezone/zic.c:2635
+#: timezone/zic.c:2639
msgid "too many, or too long, time zone abbreviations"
msgstr "le abbreviazioni del fuso orario sono troppe o troppo lunghe"
-#: timezone/zic.c:2676
+#: timezone/zic.c:2680
#, c-format
msgid "%s: Can't create directory %s: %s\n"
msgstr "%s: impossibile creare la directory %s: %s\n"
-#: timezone/zic.c:2698
+#: timezone/zic.c:2702
#, c-format
msgid "%s: %d did not sign extend correctly\n"
msgstr "%s: %d non ha esteso correttamente il segno\n"
diff --git a/po/ja.po b/po/ja.po
index 787d280f95..2188ccf9ef 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: libc 2.14\n"
"POT-Creation-Date: 2011-05-31 00:06-0400\n"
-"PO-Revision-Date: 2011-10-08 09:53+0900\n"
+"PO-Revision-Date: 2011-10-08 23:43+0900\n"
"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
"Language: ja\n"
@@ -19,12 +19,12 @@ msgstr ""
#: argp/argp-help.c:228
#, c-format
msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
-msgstr "%.*s: ARGP_HELP_FMT パラメータã«ã¯å€¤ãŒå¿…è¦ã§ã™"
+msgstr "%.*s: ARGP_HELP_FMT パラメーターã«ã¯å€¤ãŒå¿…è¦ã§ã™"
#: argp/argp-help.c:238
#, c-format
msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
-msgstr "%.*s: ä¸æ˜Žãª ARGP_HELP_FMT パラメータã§ã™"
+msgstr "%.*s: ä¸æ˜Žãª ARGP_HELP_FMT パラメーターã§ã™"
#: argp/argp-help.c:251
#, c-format
@@ -108,11 +108,11 @@ msgstr ""
#: catgets/gencat.c:110 catgets/gencat.c:114 nscd/nscd.c:100 nss/makedb.c:61
msgid "NAME"
-msgstr "åå‰"
+msgstr "NAME"
#: catgets/gencat.c:111
msgid "Create C header file NAME containing symbol definitions"
-msgstr "シンボル定義をå«ã‚“ã  C ヘッダファイル NAME を作æˆã™ã‚‹"
+msgstr "シンボル定義をå«ã‚“ã  C ヘッダーファイル NAME を作æˆã™ã‚‹"
#: catgets/gencat.c:113
msgid "Do not use existing catalog, force new output file"
@@ -266,7 +266,7 @@ msgstr "エスケープ文字を決定ã§ãã¾ã›ã‚“"
#: debug/pcprofiledump.c:53
msgid "Don't buffer output"
-msgstr "出力をãƒãƒƒãƒ•ã‚¡ã—ã¾ã›ã‚“"
+msgstr "出力をãƒãƒƒãƒ•ã‚¡ãƒ¼ã—ã¾ã›ã‚“"
#: debug/pcprofiledump.c:58
msgid "Dump information generated by PC profiling."
@@ -284,7 +284,7 @@ msgstr "入力ファイルを開ã‘ã¾ã›ã‚“"
#: debug/pcprofiledump.c:115
#, c-format
msgid "cannot read header"
-msgstr "ヘッダを読ã¿è¾¼ã‚ã¾ã›ã‚“"
+msgstr "ヘッダーを読ã¿è¾¼ã‚ã¾ã›ã‚“"
#: debug/pcprofiledump.c:179
#, c-format
@@ -462,19 +462,19 @@ msgstr "共有ライブラリã®ãƒ­ãƒ¼ãƒ‰ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ"
#: elf/dl-fptr.c:88
msgid "cannot map pages for fdesc table"
-msgstr "ファイル記述å­è¡¨ç”¨ã®ãƒšãƒ¼ã‚¸ã‚’マップ出æ¥ã¾ã›ã‚“"
+msgstr "ãƒ•ã‚¡ã‚¤ãƒ«è¨˜è¿°å­ (fdesc) 表用ã®ãƒšãƒ¼ã‚¸ã‚’マップã§ãã¾ã›ã‚“"
#: elf/dl-fptr.c:192
msgid "cannot map pages for fptr table"
-msgstr "ファイルãƒã‚¤ãƒ³ã‚¿è¡¨ç”¨ã®ãƒšãƒ¼ã‚¸ã‚’マップ出æ¥ã¾ã›ã‚“"
+msgstr "ファイルãƒã‚¤ãƒ³ã‚¿ (fptr) 表用ã®ãƒšãƒ¼ã‚¸ã‚’マップã§ãã¾ã›ã‚“"
#: elf/dl-fptr.c:221
msgid "internal error: symidx out of range of fptr table"
-msgstr "内部エラー: ファイルãƒã‚¤ãƒ³ã‚¿è¡¨ã®ã‚·ãƒ³ãƒœãƒ«ç´¢å¼•ãŒç¯„囲外ã§ã™"
+msgstr "内部エラー: ファイルãƒã‚¤ãƒ³ã‚¿ (fptr) 表ã®ã‚·ãƒ³ãƒœãƒ«ç´¢å¼•ãŒç¯„囲外ã§ã™"
#: elf/dl-load.c:471
msgid "cannot allocate name record"
-msgstr "åå‰ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’é…置出æ¥ã¾ã›ã‚“"
+msgstr "åå‰ãƒ¬ã‚³ãƒ¼ãƒ‰ã‚’é…ç½®ã§ãã¾ã›ã‚“"
#: elf/dl-load.c:548 elf/dl-load.c:664 elf/dl-load.c:749 elf/dl-load.c:862
msgid "cannot create cache for search path"
@@ -490,7 +490,7 @@ msgstr "探索パスé…列を作æˆã§ãã¾ã›ã‚“"
#: elf/dl-load.c:931
msgid "cannot stat shared object"
-msgstr "共有オブジェクトã®çŠ¶æ…‹å–å¾— (stat) ãŒå‡ºæ¥ã¾ã›ã‚“"
+msgstr "共有オブジェクトã®çŠ¶æ…‹å–å¾— (stat) ãŒã§ãã¾ã›ã‚“"
#: elf/dl-load.c:1009
msgid "cannot open zero fill device"
@@ -514,7 +514,7 @@ msgstr "ELF ロードコマンドã®ã‚¢ãƒ‰ãƒ¬ã‚¹/オフセットãŒé©åˆ‡ã«æ•´å
#: elf/dl-load.c:1210
msgid "cannot allocate TLS data structures for initial thread"
-msgstr "åˆæœŸã‚¹ãƒ¬ãƒƒãƒ‰ç”¨ã® TLS データ構造体ãŒé…置出æ¥ã¾ã›ã‚“"
+msgstr "åˆæœŸã‚¹ãƒ¬ãƒƒãƒ‰ç”¨ã® TLS データ構造体ãŒé…ç½®ã§ãã¾ã›ã‚“"
#: elf/dl-load.c:1233
msgid "cannot handle TLS data"
@@ -550,7 +550,7 @@ msgstr "共有オブジェクト㯠dlopen() ã§ãã¾ã›ã‚“"
#: elf/dl-load.c:1445
msgid "cannot allocate memory for program header"
-msgstr "プログラムヘッダ用ã®ãƒ¡ãƒ¢ãƒªã‚’é…置出æ¥ã¾ã›ã‚“"
+msgstr "プログラムヘッダー用ã®ãƒ¡ãƒ¢ãƒªã‚’é…ç½®ã§ãã¾ã›ã‚“"
#: elf/dl-load.c:1462 elf/dl-open.c:180
msgid "invalid caller"
@@ -570,7 +570,7 @@ msgstr "ファイルãŒå°ã•ã™ãŽã¾ã™"
#: elf/dl-load.c:1766
msgid "invalid ELF header"
-msgstr "無効㪠ELF ヘッダã§ã™"
+msgstr "無効㪠ELF ヘッダーã§ã™"
#: elf/dl-load.c:1778
msgid "ELF file data encoding not big-endian"
@@ -688,7 +688,7 @@ msgstr "コード内ã§ä½¿ç”¨ã•ã‚Œã¦ã„ã‚‹ RTLD_NEXT ã‚’å‹•çš„ã«ãƒ­ãƒ¼ãƒ‰å‡ºæ
#: elf/dl-sysdep.c:488 elf/dl-sysdep.c:500
msgid "cannot create capability list"
-msgstr "能力リストを作æˆã§ãã¾ã›ã‚“"
+msgstr "権é™ãƒªã‚¹ãƒˆã‚’作æˆã§ãã¾ã›ã‚“"
#: elf/dl-tls.c:861
msgid "cannot create TLS data structures"
@@ -1094,6 +1094,17 @@ msgid ""
" --help print this help and exit\n"
" --version print version information and exit"
msgstr ""
+"Usage: sotruss [OPTION...] [--] EXECUTABLE [EXECUTABLE-OPTION...]\n"
+" -F, --from FROMLIST FORMLIST ã®ã‚ªãƒ–ジェクトã‹ã‚‰ã®å‘¼ã³å‡ºã—をトレースã™ã‚‹\n"
+" -T, --to TOLIST TOLIST ã®ã‚ªãƒ–ジェクトã¸ã®å‘¼ã³å‡ºã—をトレースã™ã‚‹\n"
+"\n"
+" -e, --exit 関数呼ã³å‡ºã—ã‹ã‚‰ã®çµ‚了も表示ã™ã‚‹\n"
+" -f, --follow å­ãƒ—ロセスもトレースã™ã‚‹\n"
+" -o, --output FILENAME 出力を標準出力ã®ä»£ã‚ã‚Šã« FILENAME (-f も使用ã•ã‚ŒãŸ\n"
+"\t\t\t å ´åˆã¯ FILENAME.$PID) ã¸æ›¸ã込む\n"
+"\n"
+" --help ã“ã®ãƒ˜ãƒ«ãƒ—メッセージを表示ã—ã¦çµ‚了ã™ã‚‹\n"
+" --version ãƒãƒ¼ã‚¸ãƒ§ãƒ³æƒ…報を表示ã—ã¦çµ‚了ã™ã‚‹"
#: elf/sotruss.ksh:46
msgid "Mandatory arguments to long options are also mandatory for any corresponding\\nshort options.\\n"
@@ -1169,12 +1180,12 @@ msgstr "共有オブジェクト `%s' ã®å†ã‚ªãƒ¼ãƒ—ンã«å¤±æ•—ã—ã¾ã—ãŸ"
#: elf/sprof.c:566 elf/sprof.c:660
#, c-format
msgid "reading of section headers failed"
-msgstr "セクションヘッダã®èª­ã¿è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸ"
+msgstr "セクションヘッダーã®èª­ã¿è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: elf/sprof.c:574 elf/sprof.c:668
#, c-format
msgid "reading of section header string table failed"
-msgstr "セクションヘッダ文字列表ã®èª­ã¿è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸ"
+msgstr "セクションヘッダー文字列表ã®èª­ã¿è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: elf/sprof.c:600
#, c-format
@@ -1189,7 +1200,7 @@ msgstr "ファイルåを決定ã§ãã¾ã›ã‚“"
#: elf/sprof.c:653
#, c-format
msgid "reading of ELF header failed"
-msgstr "ELF ヘッダã®èª­ã¿è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸ"
+msgstr "ELF ヘッダーã®èª­ã¿è¾¼ã¿ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: elf/sprof.c:689
#, c-format
@@ -2627,7 +2638,7 @@ msgid "cannot write output files to `%s'"
msgstr "出力ファイル `%s' ã¸æ›¸ãè¾¼ã‚ã¾ã›ã‚“"
#: locale/programs/localedef.c:366
-#, fuzzy, c-format
+#, c-format
msgid ""
"System's directory for character maps : %s\n"
"\t\t repertoire maps: %s\n"
@@ -2668,7 +2679,7 @@ msgstr "書庫ファイルã®ã‚µã‚¤ã‚ºå¤‰æ›´ã¯å‡ºæ¥ã¾ã›ã‚“"
#: locale/programs/locarchive.c:633
#, c-format
msgid "cannot map archive header"
-msgstr "書庫ヘッダをマップ出æ¥ã¾ã›ã‚“"
+msgstr "書庫ヘッダーをマップ出æ¥ã¾ã›ã‚“"
#: locale/programs/locarchive.c:174
#, c-format
@@ -2728,7 +2739,7 @@ msgstr "ロケール書庫 \"%s\" をロックã§ãã¾ã›ã‚“"
#: locale/programs/locarchive.c:605
#, c-format
msgid "cannot read archive header"
-msgstr "書庫ヘッダを読ã¿è¾¼ã‚ã¾ã›ã‚“"
+msgstr "書庫ヘッダーを読ã¿è¾¼ã‚ã¾ã›ã‚“"
#: locale/programs/locarchive.c:680
#, c-format
@@ -2846,7 +2857,7 @@ msgstr "レパートリマップファイル `%s' ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“"
#: login/programs/pt_chown.c:78
#, c-format
msgid "Set the owner, group and access permission of the slave pseudo terminal corresponding to the master pseudo terminal passed on file descriptor `%d'. This is the helper program for the `grantpt' function. It is not intended to be run directly from the command line.\n"
-msgstr ""
+msgstr "スレーブ疑似端末ã®æ‰€æœ‰è€…ã€ã‚°ãƒ«ãƒ¼ãƒ—ã€ã‚¢ã‚¯ã‚»ã‚¹æ¨©ã‚’ã€ãƒ•ã‚¡ã‚¤ãƒ«è¨˜è¿°å­ `%d' ã¨ã—ã¦æ¸¡ã•ã‚ŒãŸãƒžã‚¹ã‚¿ãƒ¼ç–‘似端末ã«åˆã‚ã›ã¦è¨­å®šã—ã¾ã™ã€‚ã“れ㯠`grantpt' 関数用ã®è£œåŠ©ãƒ—ログラムã§ã™ã€‚コマンドラインã‹ã‚‰ç›´æŽ¥å®Ÿè¡Œã™ã‚‹ã‚ˆã†ã«ã¯æ„図ã•ã‚Œã¦ã„ã¾ã›ã‚“。\n"
#: login/programs/pt_chown.c:88
#, c-format
@@ -3033,7 +3044,7 @@ msgstr "キャッシュãŒç ´æ£„ã•ã‚Œã¾ã—ãŸ"
#: nis/nis_error.h:6
msgid "NIS+ servers unreachable"
-msgstr "NIS+ サーãƒã«åˆ°é”ã—ã¾ã›ã‚“"
+msgstr "NIS+ サーãƒãƒ¼ã«åˆ°é”ã—ã¾ã›ã‚“"
#: nis/nis_error.h:7
msgid "Unknown object"
@@ -3041,7 +3052,7 @@ msgstr "ä¸æ˜Žãªã‚ªãƒ–ジェクトã§ã™"
#: nis/nis_error.h:8
msgid "Server busy, try again"
-msgstr "サーãƒãŒãƒ“ジー状態ã§ã™ã€‚å†è©¦è¡Œã—ã¦ãã ã•ã„"
+msgstr "サーãƒãƒ¼ãŒãƒ“ジー状態ã§ã™ã€‚å†è©¦è¡Œã—ã¦ãã ã•ã„"
#: nis/nis_error.h:9
msgid "Generic system error"
@@ -3066,7 +3077,7 @@ msgstr "åå‰ã¯ã“ã®ã‚µãƒ¼ãƒãƒ¼ã§ç®¡ç†ã•ã‚Œã¦ã„ã¾ã›ã‚“"
#: nis/nis_error.h:14
msgid "Server out of memory"
-msgstr "サーãƒã®ãƒ¡ãƒ¢ãƒªãŒè¶³ã‚Šã¾ã›ã‚“"
+msgstr "サーãƒãƒ¼ã®ãƒ¡ãƒ¢ãƒªãŒè¶³ã‚Šã¾ã›ã‚“"
#: nis/nis_error.h:15
msgid "Object with same name exists"
@@ -3074,7 +3085,7 @@ msgstr "åŒã˜åå‰ã‚’æŒã¤ã‚ªãƒ–ジェクトãŒå­˜åœ¨ã—ã¾ã™"
#: nis/nis_error.h:16
msgid "Not master server for this domain"
-msgstr "ã“ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ãƒžã‚¹ã‚¿ãƒ¼ã‚µãƒ¼ãƒã§ã¯ã‚ã‚Šã¾ã›ã‚“"
+msgstr "ã“ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã®ãƒžã‚¹ã‚¿ãƒ¼ã‚µãƒ¼ãƒãƒ¼ã§ã¯ã‚ã‚Šã¾ã›ã‚“"
#: nis/nis_error.h:17
msgid "Invalid object for operation"
@@ -3150,7 +3161,7 @@ msgstr "æ“作ã«å¯¾ã™ã‚‹ä¸æ­£ãªã‚ªãƒ–ジェクト型ã§ã™"
#: nis/nis_error.h:35
msgid "Passed object is not the same object on server"
-msgstr "渡ã•ã‚ŒãŸã‚ªãƒ–ジェクトã¯ã‚µãƒ¼ãƒä¸Šã®ã‚ªãƒ–ジェクトã¨åŒã˜ã§ã¯ã‚ã‚Šã¾ã›ã‚“"
+msgstr "渡ã•ã‚ŒãŸã‚ªãƒ–ジェクトã¯ã‚µãƒ¼ãƒãƒ¼ä¸Šã®ã‚ªãƒ–ジェクトã¨åŒã˜ã§ã¯ã‚ã‚Šã¾ã›ã‚“"
#: nis/nis_error.h:36
msgid "Modify operation failed"
@@ -3186,7 +3197,7 @@ msgstr "ã¯ã„ã€42ã¯ç”Ÿå­˜æœŸé–“ã®å¹³å‡ã§ã™"
#: nis/nis_error.h:44
msgid "Unable to authenticate NIS+ server"
-msgstr "NIS+ サーãƒã‚’èªè¨¼ã§ãã¾ã›ã‚“"
+msgstr "NIS+ サーãƒãƒ¼ã‚’èªè¨¼ã§ãã¾ã›ã‚“"
#: nis/nis_error.h:45
msgid "Unable to authenticate NIS+ client"
@@ -3194,15 +3205,15 @@ msgstr "NIS+ クライアントをèªè¨¼ã§ãã¾ã›ã‚“"
#: nis/nis_error.h:46
msgid "No file space on server"
-msgstr "サーãƒã«ãƒ•ã‚¡ã‚¤ãƒ«ç”¨ã®é ˜åŸŸãŒã‚ã‚Šã¾ã›ã‚“"
+msgstr "サーãƒãƒ¼ã«ãƒ•ã‚¡ã‚¤ãƒ«ç”¨ã®é ˜åŸŸãŒã‚ã‚Šã¾ã›ã‚“"
#: nis/nis_error.h:47
msgid "Unable to create process on server"
-msgstr "サーãƒä¸Šã«ãƒ—ロセスを作æˆã§ãã¾ã›ã‚“"
+msgstr "サーãƒãƒ¼ä¸Šã«ãƒ—ロセスを作æˆã§ãã¾ã›ã‚“"
#: nis/nis_error.h:48
msgid "Master server busy, full dump rescheduled."
-msgstr "マスターサーãƒãŒãƒ“ジーã§ã™ã€ãƒ•ãƒ«ãƒ€ãƒ³ãƒ—ã¯å†ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚Œã¾ã—ãŸã€‚"
+msgstr "マスターサーãƒãƒ¼ãŒãƒ“ジーã§ã™ã€ãƒ•ãƒ«ãƒ€ãƒ³ãƒ—ã¯å†ã‚¹ã‚±ã‚¸ãƒ¥ãƒ¼ãƒ«ã•ã‚Œã¾ã—ãŸã€‚"
#: nis/nis_local_names.c:122
#, c-format
@@ -3261,7 +3272,7 @@ msgstr "åž‹ : %s\n"
#: nis/nis_print.c:173
msgid "Master Server :\n"
-msgstr "マスターサーãƒ:\n"
+msgstr "マスターサーãƒãƒ¼:\n"
#: nis/nis_print.c:175
msgid "Replicate :\n"
@@ -3565,11 +3576,11 @@ msgstr "NIS æ“作ã«é–¢ã™ã‚‹ RPC ãŒå¤±æ•—ã—ã¾ã—ãŸ"
#: nis/ypclnt.c:842
msgid "Can't bind to server which serves this domain"
-msgstr "ã“ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’扱ã†ã‚µãƒ¼ãƒã¸ãƒã‚¤ãƒ³ãƒ‰ã§ãã¾ã›ã‚“"
+msgstr "ã“ã®ãƒ‰ãƒ¡ã‚¤ãƒ³ã‚’扱ã†ã‚µãƒ¼ãƒãƒ¼ã¸ãƒã‚¤ãƒ³ãƒ‰ã§ãã¾ã›ã‚“"
#: nis/ypclnt.c:845
msgid "No such map in server's domain"
-msgstr "サーãƒãƒ‰ãƒ¡ã‚¤ãƒ³ã«ãã®ã‚ˆã†ãªãƒžãƒƒãƒ—ã¯ã‚ã‚Šã¾ã›ã‚“"
+msgstr "サーãƒãƒ¼ãƒ‰ãƒ¡ã‚¤ãƒ³ã«ãã®ã‚ˆã†ãªãƒžãƒƒãƒ—ã¯ã‚ã‚Šã¾ã›ã‚“"
#: nis/ypclnt.c:848
msgid "No such key in map"
@@ -3609,7 +3620,7 @@ msgstr "NIS マップデータベースãŒé–“é•ã£ã¦ã„ã¾ã™"
#: nis/ypclnt.c:875
msgid "NIS client/server version mismatch - can't supply service"
-msgstr "NIS クライアントã¨ã‚µãƒ¼ãƒã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä¸€è‡´ã—ã¾ã›ã‚“。サービスをæä¾›ã§ãã¾ã›ã‚“"
+msgstr "NIS クライアントã¨ã‚µãƒ¼ãƒãƒ¼ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ãŒä¸€è‡´ã—ã¾ã›ã‚“。サービスをæä¾›ã§ãã¾ã›ã‚“"
#: nis/ypclnt.c:881
msgid "Database is busy"
@@ -3641,7 +3652,7 @@ msgstr "yp_update: ホストをãƒãƒƒãƒˆåã¸å¤‰æ›ã§ãã¾ã›ã‚“\n"
#: nis/ypclnt.c:992
msgid "yp_update: cannot get server address\n"
-msgstr "yp_update: サーãƒã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å–å¾—ã§ãã¾ã›ã‚“\n"
+msgstr "yp_update: サーãƒãƒ¼ã‚¢ãƒ‰ãƒ¬ã‚¹ã‚’å–å¾—ã§ãã¾ã›ã‚“\n"
#: nscd/aicache.c:83 nscd/hstcache.c:492
#, c-format
@@ -3670,7 +3681,7 @@ msgstr "ファイル `%s' ã‚’ stat() ã§ãã¾ã›ã‚“: %s"
#: nscd/cache.c:318
#, c-format
msgid "pruning %s cache; time %ld"
-msgstr ""
+msgstr "%s キャッシュを切り詰ã‚ã¦ã„ã¾ã™ã€‚時間 %ld"
#: nscd/cache.c:347
#, c-format
@@ -3684,11 +3695,11 @@ msgstr "無効ãªæ°¸ç¶šçš„データベースファイル \"%s\" ã§ã™: %s"
#: nscd/connections.c:573
msgid "uninitialized header"
-msgstr "åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„ヘッダã§ã™"
+msgstr "åˆæœŸåŒ–ã•ã‚Œã¦ã„ãªã„ヘッダーã§ã™"
#: nscd/connections.c:578
msgid "header size does not match"
-msgstr "ヘッダサイズãŒä¸€è‡´ã—ã¾ã›ã‚“"
+msgstr "ヘッダーサイズãŒä¸€è‡´ã—ã¾ã›ã‚“"
#: nscd/connections.c:588
msgid "file size does not match"
@@ -3736,7 +3747,7 @@ msgstr "データベースファイル %s ã¸æ›¸ãè¾¼ã‚ã¾ã›ã‚“: %s"
#: nscd/connections.c:814
#, c-format
msgid "cannot set socket to close on exec: %s; disabling paranoia mode"
-msgstr ""
+msgstr "ソケットを実行時ã«é–‰ã˜ã‚‹ã‚ˆã†ã«è¨­å®šã§ãã¾ã›ã‚“: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/connections.c:897
#, c-format
@@ -3751,7 +3762,7 @@ msgstr "ソケットをéžãƒ–ロッキングモードã«å¤‰æ›´ã§ãã¾ã›ã‚“: %
#: nscd/connections.c:925
#, c-format
msgid "cannot set socket to close on exec: %s"
-msgstr ""
+msgstr "ソケットを実行時ã«é–‰ã˜ã‚‹ã‚ˆã†ã«è¨­å®šã§ãã¾ã›ã‚“: %s"
#: nscd/connections.c:938
#, c-format
@@ -3761,7 +3772,7 @@ msgstr "接続をå—ã‘付ã‘るソケットを有効ã«ã§ãã¾ã›ã‚“: %s"
#: nscd/connections.c:1039
#, c-format
msgid "provide access to FD %d, for %s"
-msgstr ""
+msgstr "ãƒ•ã‚¡ã‚¤ãƒ«è¨˜è¿°å­ %d ã¸ã®ã‚¢ã‚¯ã‚»ã‚¹ã‚’æä¾›ã—ã¾ã™ (%s 用)"
#: nscd/connections.c:1051
#, c-format
@@ -3795,32 +3806,32 @@ msgstr "呼ã³å‡ºã—å…ƒ ID ã®å–得時ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: %s"
#: nscd/connections.c:1316
#, c-format
msgid "cannot open /proc/self/cmdline: %s; disabling paranoia mode"
-msgstr ""
+msgstr "/proc/self/cmdline ã‚’é–‹ã‘ã¾ã›ã‚“: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/connections.c:1330
#, c-format
msgid "cannot read /proc/self/cmdline: %s; disabling paranoia mode"
-msgstr ""
+msgstr "/proc/self/cmdline を読ã¿è¾¼ã‚ã¾ã›ã‚“: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/connections.c:1370
#, c-format
msgid "cannot change to old UID: %s; disabling paranoia mode"
-msgstr ""
+msgstr "å¤ã„ UID ã¸å¤‰æ›´ã§ãã¾ã›ã‚“: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/connections.c:1380
#, c-format
msgid "cannot change to old GID: %s; disabling paranoia mode"
-msgstr ""
+msgstr "å¤ã„ GID ã«å¤‰æ›´ã§ãã¾ã›ã‚“: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/connections.c:1393
#, c-format
msgid "cannot change to old working directory: %s; disabling paranoia mode"
-msgstr ""
+msgstr "å¤ã„作業ディレクトリã«ç§»å‹•ã§ãã¾ã›ã‚“: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/connections.c:1439
#, c-format
msgid "re-exec failed: %s; disabling paranoia mode"
-msgstr ""
+msgstr "å†å®Ÿè¡Œã«å¤±æ•—ã—ã¾ã—ãŸ: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/connections.c:1448
#, c-format
@@ -3830,27 +3841,27 @@ msgstr "ç¾åœ¨ã®ä½œæ¥­ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã‚’ \"/\" ã«å¤‰æ›´ã§ãã¾ã›ã‚“: %s"
#: nscd/connections.c:1641
#, c-format
msgid "short read while reading request: %s"
-msgstr "リクエスト: %s を読込ã¿ä¸­ã®çŸ­ã„読込ã¿ã§ã™"
+msgstr "読ã¿è¾¼ã¿è¦æ±‚より短ã„読ã¿è¾¼ã¿ã§ã™: %s"
#: nscd/connections.c:1674
#, c-format
msgid "key length in request too long: %d"
-msgstr "リクエストã«å«ã¾ã‚Œã‚‹ã‚­ãƒ¼é•·ãŒé•·ã™ãŽã¾ã™: %d"
+msgstr "è¦æ±‚ã«å«ã¾ã‚Œã‚‹ã‚­ãƒ¼é•·ãŒé•·ã™ãŽã¾ã™: %d"
#: nscd/connections.c:1687
#, c-format
msgid "short read while reading request key: %s"
-msgstr "リクエストキー: %s を読込ã¿ä¸­ã®çŸ­ã„読込ã¿ã§ã™"
+msgstr "è¦æ±‚キーã®èª­ã¿è¾¼ã¿ã‚ˆã‚ŠçŸ­ã„読ã¿è¾¼ã¿ã§ã™: %s"
#: nscd/connections.c:1696
#, c-format
msgid "handle_request: request received (Version = %d) from PID %ld"
-msgstr "handle_request: リクエストãŒåˆ°ç€ (ãƒãƒ¼ã‚¸ãƒ§ãƒ³ = %d) é€ä¿¡PID %ld"
+msgstr "handle_request: è¦æ±‚ã‚’å—ã‘å–ã‚Šã¾ã—㟠(ãƒãƒ¼ã‚¸ãƒ§ãƒ³ = %d) é€ä¿¡PID %ld"
#: nscd/connections.c:1701
#, c-format
msgid "handle_request: request received (Version = %d)"
-msgstr "handle_request: è¦æ±‚ãŒåˆ°ç€ (ãƒãƒ¼ã‚¸ãƒ§ãƒ³ = %d)"
+msgstr "handle_request: è¦æ±‚ã‚’å—ã‘å–ã‚Šã¾ã—㟠(ãƒãƒ¼ã‚¸ãƒ§ãƒ³ = %d)"
#: nscd/connections.c:1901 nscd/connections.c:2099
#, c-format
@@ -3859,11 +3870,11 @@ msgstr "読ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼ %d ãŒç™ºç”Ÿã—ãŸãŸã‚ inotify を無効ã«ã—ã
#: nscd/connections.c:2228
msgid "could not initialize conditional variable"
-msgstr ""
+msgstr "æ¡ä»¶å¤‰æ•°ã‚’åˆæœŸåŒ–ã§ãã¾ã›ã‚“ã§ã—ãŸ"
#: nscd/connections.c:2236
msgid "could not start clean-up thread; terminating"
-msgstr ""
+msgstr "クリーンアップスレッドを開始ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚終了ã—ã¾ã™"
#: nscd/connections.c:2250
msgid "could not start any worker thread; terminating"
@@ -3874,7 +3885,7 @@ msgstr "作業スレッドを全ã開始ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚終了ã—ã¾
#: nscd/connections.c:2368
#, c-format
msgid "Failed to run nscd as user '%s'"
-msgstr "ユーザ '%s' 㧠nscd を実行ã™ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—ãŸ"
+msgstr "ユーザー '%s' 㧠nscd を実行ã™ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: nscd/connections.c:2320
#, c-format
@@ -3940,7 +3951,7 @@ msgstr "NUMBERスレッドã§èµ·å‹•ã™ã‚‹"
#: nscd/nscd.c:105
msgid "Shut the server down"
-msgstr "サーãƒã‚’終了ã™ã‚‹"
+msgstr "サーãƒãƒ¼ã‚’終了ã™ã‚‹"
#: nscd/nscd.c:106
msgid "Print current configuration statistics"
@@ -4063,7 +4074,7 @@ msgstr "ä¸æ˜Žãªã‚ªãƒ—ションã§ã™: %s %s %s"
#: nscd/nscd_conf.c:287
#, c-format
msgid "cannot get current working directory: %s; disabling paranoia mode"
-msgstr ""
+msgstr "ç¾åœ¨ã®ä½œæ¥­ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªãƒ¼ã‚’å–å¾—ã§ãã¾ã›ã‚“: %s; paranoia モードを無効ã«ã—ã¦ã„ã¾ã™"
#: nscd/nscd_conf.c:307
#, c-format
@@ -4107,27 +4118,27 @@ msgid ""
msgstr ""
"nscd 設定:\n"
"\n"
-"%15d サーãƒãƒ‡ãƒãƒƒã‚°ãƒ¬ãƒ™ãƒ«\n"
+"%15d サーãƒãƒ¼ãƒ‡ãƒãƒƒã‚°ãƒ¬ãƒ™ãƒ«\n"
#: nscd/nscd_stat.c:232
#, c-format
msgid "%3ud %2uh %2um %2lus server runtime\n"
-msgstr "%3ud %2uh %2um %2lus サーム実行時間\n"
+msgstr "%3ud %2uh %2um %2lus サーãƒãƒ¼ 実行時間\n"
#: nscd/nscd_stat.c:235
#, c-format
msgid " %2uh %2um %2lus server runtime\n"
-msgstr " %2uh %2um %2lus サーム実行時間\n"
+msgstr " %2uh %2um %2lus サーãƒãƒ¼ 実行時間\n"
#: nscd/nscd_stat.c:237
#, c-format
msgid " %2um %2lus server runtime\n"
-msgstr " %2um %2lus サーム実行時間\n"
+msgstr " %2um %2lus サーãƒãƒ¼ 実行時間\n"
#: nscd/nscd_stat.c:239
#, c-format
msgid " %2lus server runtime\n"
-msgstr " %2lus サーム実行時間\n"
+msgstr " %2lus サーãƒãƒ¼ 実行時間\n"
#: nscd/nscd_stat.c:241
#, c-format
@@ -4142,7 +4153,7 @@ msgstr ""
"%15d ç¾åœ¨ã®ã‚¹ãƒ¬ãƒƒãƒ‰æ•°\n"
"%15d 最大スレッド数\n"
"%15lu クライアントãŒå¾…æ©Ÿã—ãªã‘ã‚Œã°ãªã‚‰ãªã‹ã£ãŸå›žæ•°\n"
-"%15s paranoia mode enabled\n"
+"%15s paranoia モードãŒæœ‰åŠ¹ã‹ã©ã†ã‹\n"
"%15lu 内部å†èµ·å‹•\n"
"%15u å†èµ·å‹•å›žæ•°\n"
@@ -4228,7 +4239,7 @@ msgstr "prctl(KEEPCAPS) ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: nscd/selinux.c:192
msgid "Failed to initialize drop of capabilities"
-msgstr ""
+msgstr "権é™ã‚’å–り除ã„ã¦åˆæœŸåŒ–ã™ã‚‹ã®ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: nscd/selinux.c:193
#, c-format
@@ -4237,7 +4248,7 @@ msgstr "cap_init ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: nscd/selinux.c:214 nscd/selinux.c:231
msgid "Failed to drop capabilities"
-msgstr ""
+msgstr "権é™ã‚’å–り除ãã®ã«å¤±æ•—ã—ã¾ã—ãŸ"
#: nscd/selinux.c:215 nscd/selinux.c:232
#, c-format
@@ -4273,7 +4284,7 @@ msgstr "Access Vector Cache (AVC) ãŒé–‹å§‹ã•ã‚Œã¾ã—ãŸ"
#: nscd/selinux.c:356
msgid "Error getting context of socket peer"
-msgstr ""
+msgstr "ソケット対å‘ã®ã‚³ãƒ³ãƒ†ã‚­ã‚¹ãƒˆå–得中ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ"
#: nscd/selinux.c:361
msgid "Error getting context of nscd"
@@ -4439,6 +4450,12 @@ msgid ""
"environment SPEC.\n"
"\n"
msgstr ""
+"使用法: getconf [-v SPEC] VAR\n"
+"ã¾ãŸã¯: getconf [-v SPEC] PATH_VAR PATH\n"
+"\n"
+"変数 VAR (ã¾ãŸã¯ PATH ã®å¤‰æ•° PATH_VAR) ã®è¨­å®šå€¤ã‚’å–å¾—ã—ã¾ã™ã€‚\n"
+"SPEC ãŒæŒ‡å®šã•ã‚ŒãŸå ´åˆã€ã‚³ãƒ³ãƒ‘イル環境 SPEC ã®å€¤ã‚’å–å¾—ã—ã¾ã™ã€‚\n"
+"\n"
#: posix/getconf.c:1173
#, c-format
@@ -4460,9 +4477,9 @@ msgid "Unrecognized variable `%s'"
msgstr "èªè­˜ã§ããªã„変数 `%s' ã§ã™"
#: posix/getopt.c:594 posix/getopt.c:623
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '%s' is ambiguous; possibilities:"
-msgstr "%s: オプション '%s' ã¯æ›–昧ã§ã™\n"
+msgstr "%s: オプション '%s' ã¯æ›–昧ã§ã™:次ã®ã‚‚ã®ãŒå¯èƒ½ã§ã™:"
#: posix/getopt.c:664 posix/getopt.c:668
#, c-format
@@ -4475,7 +4492,7 @@ msgid "%s: option '%c%s' doesn't allow an argument\n"
msgstr "%s: オプション '%c%s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n"
#: posix/getopt.c:725 posix/getopt.c:744
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '--%s' requires an argument\n"
msgstr "%s: オプション '--%s' ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n"
@@ -4511,9 +4528,9 @@ msgid "%s: option '-W %s' doesn't allow an argument\n"
msgstr "%s: オプション '-W %s' ã¯å¼•æ•°ã‚’å–ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“\n"
#: posix/getopt.c:1050 posix/getopt.c:1068
-#, fuzzy, c-format
+#, c-format
msgid "%s: option '-W %s' requires an argument\n"
-msgstr "%s: オプション '--%s' ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n"
+msgstr "%s: オプション '-W %s' ã¯å¼•æ•°ãŒå¿…è¦ã§ã™\n"
#: posix/regcomp.c:135
msgid "No match"
@@ -4601,7 +4618,7 @@ msgstr "ホストåã®è§£æ±ºã«å¤±æ•—ã—ã¾ã—ãŸ"
#: resolv/herror.c:71
msgid "Unknown server error"
-msgstr "ä¸æ˜Žãªã‚µãƒ¼ãƒã‚¨ãƒ©ãƒ¼ã§ã™"
+msgstr "ä¸æ˜Žãªã‚µãƒ¼ãƒãƒ¼ã‚¨ãƒ©ãƒ¼ã§ã™"
#: resolv/herror.c:72
msgid "No address associated with name"
@@ -4641,200 +4658,180 @@ msgid "%s: line %d: ignoring trailing garbage `%s'\n"
msgstr "%s: è¡Œ %d: 後ã«æ®‹ã£ãŸã‚´ãƒŸ `%s' を無視ã—ã¾ã™\n"
#: stdio-common/psiginfo-data.h:2
-#, fuzzy
msgid "Illegal opcode"
-msgstr "ä¸æ­£ãªã‚·ãƒ¼ã‚¯ã§ã™"
+msgstr "ä¸æ­£ãªå‘½ä»¤ã‚³ãƒ¼ãƒ‰ã§ã™"
#: stdio-common/psiginfo-data.h:3
-#, fuzzy
msgid "Illegal operand"
-msgstr "ä¸æ­£ãªã‚·ãƒ¼ã‚¯ã§ã™"
+msgstr "ä¸æ­£ãªå‘½ä»¤è¢«æ¼”ç®—å­ã§ã™"
#: stdio-common/psiginfo-data.h:4
msgid "Illegal addressing mode"
-msgstr ""
+msgstr "ä¸æ­£ãªã‚¢ãƒ‰ãƒ¬ãƒƒã‚·ãƒ³ã‚°ãƒ¢ãƒ¼ãƒ‰ã§ã™"
#: stdio-common/psiginfo-data.h:5
-#, fuzzy
msgid "Illegal trap"
-msgstr "ä¸æ­£ãªã‚·ãƒ¼ã‚¯ã§ã™"
+msgstr "ä¸æ­£ãªãƒˆãƒ©ãƒƒãƒ—ã§ã™"
#: stdio-common/psiginfo-data.h:6
msgid "Privileged opcode"
-msgstr ""
+msgstr "特権命令コードã§ã™"
#: stdio-common/psiginfo-data.h:7
msgid "Privileged register"
-msgstr ""
+msgstr "特権レジスターã§ã™"
#: stdio-common/psiginfo-data.h:8
-#, fuzzy
msgid "Coprocessor error"
-msgstr "プリプロセッサエラー"
+msgstr "コプロセッサーエラーã§ã™"
#: stdio-common/psiginfo-data.h:9
-#, fuzzy
msgid "Internal stack error"
-msgstr "NIS 内部エラー"
+msgstr "内部スタックエラーã§ã™"
#: stdio-common/psiginfo-data.h:12
msgid "Integer divide by zero"
-msgstr ""
+msgstr "æ•´æ•°ã® 0ã«ã‚ˆã‚‹é™¤ç®—ã§ã™"
#: stdio-common/psiginfo-data.h:13
-#, fuzzy
msgid "Integer overflow"
-msgstr "時間オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼"
+msgstr "æ•´æ•°ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã§ã™"
#: stdio-common/psiginfo-data.h:14
-#, fuzzy
msgid "Floating-point divide by zero"
-msgstr "浮動å°æ•°ç‚¹ä¾‹å¤–"
+msgstr "浮動å°æ•°ã® 0 ã«ã‚ˆã‚‹é™¤ç®—ã§ã™"
#: stdio-common/psiginfo-data.h:15
-#, fuzzy
msgid "Floating-point overflow"
-msgstr "浮動å°æ•°ç‚¹ä¾‹å¤–"
+msgstr "浮動å°æ•°ã®ã‚ªãƒ¼ãƒãƒ¼ãƒ•ãƒ­ãƒ¼ã§ã™"
#: stdio-common/psiginfo-data.h:16
-#, fuzzy
msgid "Floating-point underflow"
-msgstr "浮動å°æ•°ç‚¹ä¾‹å¤–"
+msgstr "浮動å°æ•°ã®ã‚¢ãƒ³ãƒ€ãƒ¼ãƒ•ãƒ­ãƒ¼ã§ã™"
#: stdio-common/psiginfo-data.h:17
-#, fuzzy
msgid "Floating-poing inexact result"
-msgstr "浮動å°æ•°ç‚¹ä¾‹å¤–"
+msgstr "浮動å°æ•°ã®æ­£ã—ããªã„çµæžœã§ã™"
#: stdio-common/psiginfo-data.h:18
-#, fuzzy
msgid "Invalid floating-point operation"
-msgstr "æ“作ã«å¯¾ã™ã‚‹ç„¡åŠ¹ãªã‚ªãƒ–ジェクトã§ã™"
+msgstr "無効ãªæµ®å‹•å°æ•°ã®æ“作命令ã§ã™"
#: stdio-common/psiginfo-data.h:19
-#, fuzzy
msgid "Subscript out of range"
-msgstr "範囲外ã®æ–‡å­—"
+msgstr "æ·»ãˆå­—ãŒç¯„囲外ã§ã™"
#: stdio-common/psiginfo-data.h:22
msgid "Address not mapped to object"
-msgstr ""
+msgstr "アドレスãŒã‚ªãƒ–ジェクトã«ãƒžãƒƒãƒ—ã•ã‚Œã¦ã„ã¾ã›ã‚“"
#: stdio-common/psiginfo-data.h:23
msgid "Invalid permissions for mapped object"
-msgstr ""
+msgstr "マップã•ã‚ŒãŸã‚ªãƒ–ジェクトã«å¯¾ã™ã‚‹ç„¡åŠ¹ãªã‚¢ã‚¯ã‚»ã‚¹æ¨©é™ã§ã™"
#: stdio-common/psiginfo-data.h:26
-#, fuzzy
msgid "Invalid address alignment"
-msgstr "無効ãªå¼•æ•°ã§ã™"
+msgstr "無効ãªã‚¢ãƒ‰ãƒ¬ã‚¹æ•´åˆ—ã§ã™"
#: stdio-common/psiginfo-data.h:27
msgid "Nonexisting physical address"
-msgstr ""
+msgstr "存在ã—ãªã„物ç†ã‚¢ãƒ‰ãƒ¬ã‚¹ã§ã™"
#: stdio-common/psiginfo-data.h:28
msgid "Object-specific hardware error"
-msgstr ""
+msgstr "オブジェクト特有ã®ãƒãƒ¼ãƒ‰ã‚¦ã‚§ã‚¢ã‚¨ãƒ©ãƒ¼ã§ã™"
#: stdio-common/psiginfo-data.h:31
-#, fuzzy
msgid "Process breakpoint"
-msgstr "Trace/breakpoint trap"
+msgstr "プロセスã®ãƒ–レークãƒã‚¤ãƒ³ãƒˆã§ã™"
#: stdio-common/psiginfo-data.h:32
msgid "Process trace trap"
-msgstr ""
+msgstr "プロセスã®ãƒˆãƒ¬ãƒ¼ã‚¹ãƒˆãƒ©ãƒƒãƒ—ã§ã™"
#: stdio-common/psiginfo-data.h:35
-#, fuzzy
msgid "Child has exited"
-msgstr "å­ãƒ—ロセス終了"
+msgstr "å­ãƒ—ロセスãŒçµ‚了ã—ã¾ã—ãŸ"
#: stdio-common/psiginfo-data.h:36
msgid "Child has terminated abnormally and did not create a core file"
-msgstr ""
+msgstr "å­ãƒ—ロセスãŒç•°å¸¸çµ‚了ã—ã¾ã—ãŸã€‚コアファイルã¯ä½œæˆã•ã‚Œã¾ã›ã‚“ã§ã—ãŸ"
#: stdio-common/psiginfo-data.h:37
msgid "Child hat terminated abnormally and created a core file"
-msgstr ""
+msgstr "å­ãƒ—ロセスãŒç•°å¸¸çµ‚了ã—ã¾ã—ãŸã€‚コアファイルãŒä½œæˆã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo-data.h:38
msgid "Traced child has trapped"
-msgstr ""
+msgstr "追跡ã—ã¦ã„ã‚‹å­ãƒ—ロセスãŒãƒˆãƒ©ãƒƒãƒ—ã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo-data.h:39
-#, fuzzy
msgid "Child has stopped"
-msgstr "å­ãƒ—ロセス終了"
+msgstr "å­ãƒ—ロセスãŒä¸­æ–­ã—ã¾ã—ãŸ"
#: stdio-common/psiginfo-data.h:40
msgid "Stopped child has continued"
-msgstr ""
+msgstr "中断ã—ã¦ã„ãŸå­ãƒ—ロセスãŒå†é–‹ã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo-data.h:43
-#, fuzzy
msgid "Data input available"
-msgstr "利用å¯èƒ½ãªãƒ‡ãƒ¼ã‚¿ãŒã‚ã‚Šã¾ã›ã‚“"
+msgstr "データ入力ãŒä½¿ç”¨å¯èƒ½ã§ã™"
#: stdio-common/psiginfo-data.h:44
-#, fuzzy
msgid "Output buffers available"
-msgstr "利用å¯èƒ½ãªç©ºããƒãƒƒãƒ•ã‚¡ãŒã‚ã‚Šã¾ã›ã‚“"
+msgstr "出力ãƒãƒƒãƒ•ã‚¡ãƒ¼ãŒä½¿ç”¨å¯èƒ½ã§ã™"
#: stdio-common/psiginfo-data.h:45
-#, fuzzy
msgid "Input message available"
-msgstr "利用å¯èƒ½ãªç©ºããƒãƒƒãƒ•ã‚¡ãŒã‚ã‚Šã¾ã›ã‚“"
+msgstr "入力メッセージãŒä½¿ç”¨å¯èƒ½ã§ã™"
#: stdio-common/psiginfo-data.h:46
msgid "I/O error"
-msgstr "I/Oエラー"
+msgstr "I/Oエラーã§ã™"
#: stdio-common/psiginfo-data.h:47
-#, fuzzy
msgid "High priority input available"
-msgstr "RPCプログラムã¯åˆ©ç”¨ã§ãã¾ã›ã‚“"
+msgstr "高優先度入力ãŒä½¿ç”¨å¯èƒ½ã§ã™"
#: stdio-common/psiginfo-data.h:48
msgid "Device disconnected"
-msgstr ""
+msgstr "デãƒã‚¤ã‚¹ãŒåˆ‡æ–­ã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:145
msgid "Signal sent by kill()"
-msgstr ""
+msgstr "kill() ã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒé€ã‚‰ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:148
msgid "Signal sent by sigqueue()"
-msgstr ""
+msgstr "sigqueue() ã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒé€ã‚‰ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:151
msgid "Signal generated by the expiration of a timer"
-msgstr ""
+msgstr "タイマーã®æ™‚間切れã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒç”Ÿæˆã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:154
msgid "Signal generated by the completion of an asynchronous I/O request"
-msgstr ""
+msgstr "éžåŒæœŸ I/O è¦æ±‚ã®å®Œäº†ã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒç”Ÿæˆã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:158
msgid "Signal generated by the arrival of a message on an empty message queue"
-msgstr ""
+msgstr "空ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ã‚­ãƒ¥ãƒ¼ã«ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒåˆ°ç€ã—ãŸã“ã¨ã«ã‚ˆã‚Šã‚·ã‚°ãƒŠãƒ«ãŒç”Ÿæˆã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:163
msgid "Signal sent by tkill()"
-msgstr ""
+msgstr "tkill() ã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒé€ã‚‰ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:168
msgid "Signal generated by the completion of an asynchronous name lookup request"
-msgstr ""
+msgstr "éžåŒæœŸåå‰è§£æ±ºè¦æ±‚ã®å®Œäº†ã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒç”Ÿæˆã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:174
msgid "Signal generated by the completion of an I/O request"
-msgstr ""
+msgstr "I/O è¦æ±‚ã®å®Œäº†ã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒç”Ÿæˆã•ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:180
msgid "Signal sent by the kernel"
-msgstr ""
+msgstr "カーãƒãƒ«ã«ã‚ˆã£ã¦ã‚·ã‚°ãƒŠãƒ«ãŒé€ã‚‰ã‚Œã¾ã—ãŸ"
#: stdio-common/psiginfo.c:204
#, c-format
@@ -4941,7 +4938,7 @@ msgstr "RPC: 手続ããŒåˆ©ç”¨ã§ãã¾ã›ã‚“"
#: sunrpc/clnt_perr.c:199
msgid "RPC: Server can't decode arguments"
-msgstr "RPC: サーãƒãŒå¼•æ•°ã‚’デコードã§ãã¾ã›ã‚“"
+msgstr "RPC: サーãƒãƒ¼ãŒå¼•æ•°ã‚’デコードã§ãã¾ã›ã‚“"
#: sunrpc/clnt_perr.c:203
msgid "RPC: Remote system error"
@@ -4981,7 +4978,7 @@ msgstr "無効ãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã®ä¿¡ä»»ã§ã™"
#: sunrpc/clnt_perr.c:343
msgid "Server rejected credential"
-msgstr "サーãƒãŒè¨¼æ˜Žã‚’æ‹’å¦ã—ã¾ã—ãŸ"
+msgstr "サーãƒãƒ¼ãŒè¨¼æ˜Žã‚’æ‹’å¦ã—ã¾ã—ãŸ"
#: sunrpc/clnt_perr.c:347
msgid "Invalid client verifier"
@@ -4989,7 +4986,7 @@ msgstr "無効ãªã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆç¢ºèªã§ã™"
#: sunrpc/clnt_perr.c:351
msgid "Server rejected verifier"
-msgstr "サーãƒãŒç¢ºèªã‚’æ‹’å¦ã—ã¾ã—ãŸ"
+msgstr "サーãƒãƒ¼ãŒç¢ºèªã‚’æ‹’å¦ã—ã¾ã—ãŸ"
#: sunrpc/clnt_perr.c:355
msgid "Client credential too weak"
@@ -5005,7 +5002,7 @@ msgstr "失敗ã—ã¾ã—ãŸ(原因ä¸ç‰¹å®šã®ã‚¨ãƒ©ãƒ¼)"
#: sunrpc/clnt_raw.c:115
msgid "clnt_raw.c: fatal header serialization error"
-msgstr ""
+msgstr "clnt_raw.c: 致命的ãªãƒ˜ãƒƒãƒ€ãƒ¼ã‚·ãƒªã‚¢ãƒ«åŒ–エラーãŒç™ºç”Ÿã—ã¾ã—ãŸ"
#: sunrpc/pm_getmaps.c:77
msgid "pmap_getmaps.c: rpc problem"
@@ -5119,7 +5116,7 @@ msgstr "æ–°å½¢å¼ã‚’ã‚‚ã¤ãƒ†ãƒ¼ãƒ–ルフラグã¯ä½¿ãˆã¾ã›ã‚“!\n"
#: sunrpc/rpc_main.c:1439
#, c-format
msgid "\"infile\" is required for template generation flags.\n"
-msgstr "テンプレート生æˆãƒ•ãƒ©ã‚°ã«ã¯\"入力ファイル\"ãŒå¿…è¦ã§ã™.\n"
+msgstr "テンプレート生æˆãƒ•ãƒ©ã‚°ã«ã¯\"infile\"ãŒå¿…è¦ã§ã™.\n"
#: sunrpc/rpc_main.c:1444
#, c-format
@@ -5129,107 +5126,107 @@ msgstr "ファイル生æˆãƒ•ãƒ©ã‚°ã¯è¤‡æ•°æŒ‡å®šã§ãã¾ã›ã‚“!\n"
#: sunrpc/rpc_main.c:1453
#, c-format
msgid "usage: %s infile\n"
-msgstr "使用法: %s 入力ファイル\n"
+msgstr "使用法: %s infile\n"
#: sunrpc/rpc_main.c:1454
#, c-format
msgid "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
-msgstr "\t%s [-abkCLNTM][-Dåå‰[=値]] [-i サイズ] [-I [-K 秒数]] [-Y パス] 入力ファイル\n"
+msgstr "\t%s [-abkCLNTM][-Dname[=value]] [-i size] [-I [-K seconds]] [-Y path] infile\n"
#: sunrpc/rpc_main.c:1456
#, c-format
msgid "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
-msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o 出力ファイル] [入力ファイル]\n"
+msgstr "\t%s [-c | -h | -l | -m | -t | -Sc | -Ss | -Sm] [-o outfile] [infile]\n"
#: sunrpc/rpc_main.c:1458
#, c-format
msgid "\t%s [-s nettype]* [-o outfile] [infile]\n"
-msgstr "\t%s [-s ãƒãƒƒãƒˆã‚¿ã‚¤ãƒ—]* [-o 出力ファイル] [入力ファイル]\n"
+msgstr "\t%s [-s nettype]* [-o outfile] [infile]\n"
#: sunrpc/rpc_main.c:1459
#, c-format
msgid "\t%s [-n netid]* [-o outfile] [infile]\n"
-msgstr "\t%s [-n netid]* [-o 出力ファイル] [入力ファイル]\n"
+msgstr "\t%s [-n netid]* [-o outfile] [infile]\n"
#: sunrpc/rpc_main.c:1467
#, c-format
msgid "options:\n"
-msgstr ""
+msgstr "オプション:\n"
#: sunrpc/rpc_main.c:1468
#, c-format
msgid "-a\t\tgenerate all files, including samples\n"
-msgstr ""
+msgstr "-a\t\tã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ« (サンプルをå«ã‚€) を生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1469
#, c-format
msgid "-b\t\tbackward compatibility mode (generates code for SunOS 4.1)\n"
-msgstr ""
+msgstr "-b\t\t後方互æ›æ€§ãƒ¢ãƒ¼ãƒ‰ (SunOS 4.1 用ã®ã‚³ãƒ¼ãƒ‰ã‚’生æˆ)\n"
#: sunrpc/rpc_main.c:1470
#, c-format
msgid "-c\t\tgenerate XDR routines\n"
-msgstr ""
+msgstr "-c\t\tXDR ルーãƒãƒ³ã‚’生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1471
#, c-format
msgid "-C\t\tANSI C mode\n"
-msgstr ""
+msgstr "-C\t\tANSI C モード\n"
#: sunrpc/rpc_main.c:1472
#, c-format
msgid "-Dname[=value]\tdefine a symbol (same as #define)\n"
-msgstr ""
+msgstr "-Dname[=value]\tシンボルを定義ã™ã‚‹ (#define ã¨åŒæ§˜)\n"
#: sunrpc/rpc_main.c:1473
#, c-format
msgid "-h\t\tgenerate header file\n"
-msgstr ""
+msgstr "-h\t\tヘッダーファイルを生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1474
#, c-format
msgid "-i size\t\tsize at which to start generating inline code\n"
-msgstr ""
+msgstr "-i size\t\tインラインコードを生æˆé–‹å§‹ã™ã‚‹ã‚µã‚¤ã‚ºã‚’ size ã«ã™ã‚‹\n"
#: sunrpc/rpc_main.c:1475
#, c-format
msgid "-I\t\tgenerate code for inetd support in server (for SunOS 4.1)\n"
-msgstr ""
+msgstr "-I\t\tサーãƒãƒ¼ã§ inetd サãƒãƒ¼ãƒˆç”¨ã®ã‚³ãƒ¼ãƒ‰ã‚’生æˆã™ã‚‹ (SunOS 4.1 用)\n"
#: sunrpc/rpc_main.c:1476
#, c-format
msgid "-K seconds\tserver exits after K seconds of inactivity\n"
-msgstr ""
+msgstr "-K seconds\tK 秒間活動ãŒãªã‘ã‚Œã°ã‚µãƒ¼ãƒãƒ¼ã‚’終了ã™ã‚‹\n"
#: sunrpc/rpc_main.c:1477
#, c-format
msgid "-l\t\tgenerate client side stubs\n"
-msgstr ""
+msgstr "-l\t\tクライアントå´ã‚¹ã‚¿ãƒ–を生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1478
#, c-format
msgid "-L\t\tserver errors will be printed to syslog\n"
-msgstr ""
+msgstr "-L\t\tサーãƒãƒ¼ã®ã‚¨ãƒ©ãƒ¼ã‚’ syslog ã«å‡ºåŠ›ã™ã‚‹\n"
#: sunrpc/rpc_main.c:1479
#, c-format
msgid "-m\t\tgenerate server side stubs\n"
-msgstr ""
+msgstr "-m\t\tサーãƒãƒ¼å´ã‚¹ã‚¿ãƒ–を生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1480
#, c-format
msgid "-M\t\tgenerate MT-safe code\n"
-msgstr ""
+msgstr "-M\t\tマルãƒã‚¹ãƒ¬ãƒƒãƒ‰ã‚»ãƒ¼ãƒ•ãªã‚³ãƒ¼ãƒ‰ã‚’生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1481
#, c-format
msgid "-n netid\tgenerate server code that supports named netid\n"
-msgstr ""
+msgstr "-n netid\tnetid ã¨ã„ã†åå‰ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã‚³ãƒ¼ãƒ‰ã‚’生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1482
#, c-format
msgid "-N\t\tsupports multiple arguments and call-by-value\n"
-msgstr ""
+msgstr "-N\t\t複数ã®å¼•æ•°ã¨å€¤å‘¼ã³å‡ºã—をサãƒãƒ¼ãƒˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1483
#, c-format
@@ -5239,32 +5236,32 @@ msgstr "-o outfile\t出力ファイルã®åå‰ã‚’設定ã™ã‚‹\n"
#: sunrpc/rpc_main.c:1484
#, c-format
msgid "-s nettype\tgenerate server code that supports named nettype\n"
-msgstr ""
+msgstr "-s nettype\tnettype ã¨ã„ã†åå‰ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã‚³ãƒ¼ãƒ‰ã‚’生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1485
#, c-format
msgid "-Sc\t\tgenerate sample client code that uses remote procedures\n"
-msgstr ""
+msgstr "-Sc\t\tリモート手続ãを使用ã™ã‚‹ã‚¯ãƒ©ã‚¤ã‚¢ãƒ³ãƒˆã‚³ãƒ¼ãƒ‰ã®ã‚µãƒ³ãƒ—ルを生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1486
#, c-format
msgid "-Ss\t\tgenerate sample server code that defines remote procedures\n"
-msgstr ""
+msgstr "-Ss\t\tリモート手続ãを定義ã™ã‚‹ã‚µãƒ¼ãƒãƒ¼ã‚³ãƒ¼ãƒ‰ã®ã‚µãƒ³ãƒ—ルを生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1487
#, c-format
msgid "-Sm \t\tgenerate makefile template \n"
-msgstr ""
+msgstr "-Sm \t\tmakefile ã®ãƒ†ãƒ³ãƒ—レートを生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1488
#, c-format
msgid "-t\t\tgenerate RPC dispatch table\n"
-msgstr ""
+msgstr "-t\t\tRPC ディスパッãƒè¡¨ã‚’生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1489
#, c-format
msgid "-T\t\tgenerate code to support RPC dispatch tables\n"
-msgstr ""
+msgstr "-T\t\tRPC ディスパッãƒè¡¨ã‚’サãƒãƒ¼ãƒˆã™ã‚‹ãŸã‚ã®ã‚³ãƒ¼ãƒ‰ã‚’生æˆã™ã‚‹\n"
#: sunrpc/rpc_main.c:1490
#, c-format
@@ -5385,7 +5382,7 @@ msgstr "手続ãç•ªå· %ld ã‚’å†å‰²ã‚Šå½“ã¦ã§ãã¾ã›ã‚“\n"
#: sunrpc/svc_simple.c:91
msgid "couldn't create an rpc server\n"
-msgstr "RPCサーãƒã‚’作æˆã§ãã¾ã›ã‚“ã§ã—ãŸ\n"
+msgstr "RPCサーãƒãƒ¼ã‚’作æˆã§ãã¾ã›ã‚“ã§ã—ãŸ\n"
#: sunrpc/svc_simple.c:99
#, c-format
@@ -6434,9 +6431,8 @@ msgid "State not recoverable"
msgstr "状態ã®å¾©å¸°ãŒå‡ºæ¥ã¾ã›ã‚“"
#: sysdeps/gnu/errlist.c:1461
-#, fuzzy
msgid "Operation not possible due to RF-kill"
-msgstr "æ“作ã¯é©ç”¨ã§ãã¾ã›ã‚“"
+msgstr "RF-kill ã®ãŸã‚æ“作ã¯ä¸å¯èƒ½ã§ã™"
#: sysdeps/mach/_strerror.c:57
msgid "Error in unknown error system: "
@@ -6456,7 +6452,7 @@ msgstr "ai_flags ã«å¯¾ã™ã‚‹èª¤ã£ãŸå€¤ã§ã™"
#: sysdeps/posix/gai_strerror-strs.h:4
msgid "Non-recoverable failure in name resolution"
-msgstr "åå‰è§£æ±ºã§ãƒªã‚«ãƒãƒªã§ããªã„失敗ãŒç™ºç”Ÿã—ã¾ã—ãŸ"
+msgstr "åå‰è§£æ±ºã§å›žå¾©ã§ããªã„失敗ãŒç™ºç”Ÿã—ã¾ã—ãŸ"
#: sysdeps/posix/gai_strerror-strs.h:5
msgid "ai_family not supported"
@@ -6545,28 +6541,28 @@ msgstr "`%s'ã‚’é–‹ã‘ã¾ã›ã‚“"
#: sysdeps/unix/sysv/linux/lddlibc4.c:86
#, c-format
msgid "cannot read header from `%s'"
-msgstr "`%s'ã®ãƒ˜ãƒƒãƒ€ã‚’読ã‚ã¾ã›ã‚“"
+msgstr "`%s'ã®ãƒ˜ãƒƒãƒ€ãƒ¼ã‚’読ã‚ã¾ã›ã‚“"
#: timezone/zdump.c:215
msgid "lacks alphabetic at start"
-msgstr ""
+msgstr "開始文字ãŒã‚¢ãƒ«ãƒ•ã‚¡ãƒ™ãƒƒãƒˆã§ã¯ã‚ã‚Šã¾ã›ã‚“"
#: timezone/zdump.c:217
msgid "has fewer than 3 alphabetics"
-msgstr ""
+msgstr "アルファベット㌠3 文字より少ãªã„ã§ã™"
#: timezone/zdump.c:219
msgid "has more than 6 alphabetics"
-msgstr ""
+msgstr "アルファベット㌠6 文字を超ãˆã¦ã„ã¾ã™"
#: timezone/zdump.c:227
msgid "differs from POSIX standard"
-msgstr ""
+msgstr "POSIX 標準ã¨ç•°ãªã‚Šã¾ã™"
#: timezone/zdump.c:233
#, c-format
msgid "%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"
-msgstr ""
+msgstr "%s: 警告: ゾーン \"%s\" çœç•¥å½¢ \"%s\" %s\n"
#: timezone/zdump.c:242
#, c-format
@@ -6675,12 +6671,12 @@ msgstr "複数ファイルã«åŒã˜ãƒ«ãƒ¼ãƒ«åãŒã‚ã‚Šã¾ã™"
#: timezone/zic.c:792
msgid "unruly zone"
-msgstr "unruly zone"
+msgstr ""
#: timezone/zic.c:799
#, c-format
msgid "%s in ruleless zone"
-msgstr "%s in ruleless zone"
+msgstr ""
#: timezone/zic.c:820
msgid "standard input"
@@ -6697,7 +6693,7 @@ msgstr "è¡ŒãŒé•·ã™ãŽã¾ã™"
#: timezone/zic.c:856
msgid "input line of unknown type"
-msgstr "ä¸æ˜Žãªå½¢å¼ã®å…¥åŠ›ãƒ©ã‚¤ãƒ³è¡Œã§ã™"
+msgstr "ä¸æ˜Žãªå½¢å¼ã®å…¥åŠ›è¡Œã§ã™"
#: timezone/zic.c:872
#, c-format
@@ -6707,17 +6703,17 @@ msgstr "%s: é–秒ファイルã§ãªã„ファイル %s ã« Leap è¡ŒãŒã‚ã‚Šã¾ã
#: timezone/zic.c:879 timezone/zic.c:1316 timezone/zic.c:1338
#, c-format
msgid "%s: panic: Invalid l_value %d\n"
-msgstr "%s: パニック: ä¸å½“㪠l_value(%d)ã§ã™\n"
+msgstr "%s: パニック: 無効㪠l_value %d ã§ã™\n"
#: timezone/zic.c:887
#, c-format
msgid "%s: Error reading %s\n"
-msgstr "%s: %sã®èª­ã¿è¾¼ã¿ã‚¨ãƒ©ãƒ¼\n"
+msgstr "%s: %s を読ã¿è¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ\n"
#: timezone/zic.c:894
#, c-format
msgid "%s: Error closing %s: %s\n"
-msgstr "%s: %sをクローズ中ã«ã‚¨ãƒ©ãƒ¼: %s\n"
+msgstr "%s: %s ã‚’é–‰ã˜ã¦ã„ã‚‹é–“ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ: %s\n"
#: timezone/zic.c:899
msgid "expected continuation line not found"
@@ -6729,11 +6725,11 @@ msgstr "時間オーãƒãƒ¼ãƒ•ãƒ­ãƒ¼"
#: timezone/zic.c:947
msgid "24:00 not handled by pre-1998 versions of zic"
-msgstr ""
+msgstr "1998 以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® zic ã§ã¯ 24:00 ã¯æ‰±ãˆã¾ã›ã‚“"
#: timezone/zic.c:950
msgid "values over 24 hours not handled by pre-2007 versions of zic"
-msgstr ""
+msgstr "2007 以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® zic ã§ã¯24時間を超ãˆã‚‹å€¤ã¯æ‰±ãˆã¾ã›ã‚“"
#: timezone/zic.c:963
msgid "wrong number of fields on Rule line"
@@ -6772,11 +6768,11 @@ msgstr "Zone continuationè¡Œã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™"
#: timezone/zic.c:1075
msgid "invalid UTC offset"
-msgstr "ä¸å½“ãªUTCオフセット"
+msgstr "無効ãªUTCオフセットã§ã™"
#: timezone/zic.c:1078
msgid "invalid abbreviation format"
-msgstr "ä¸å½“ãªçœç•¥å½¢"
+msgstr "無効ãªçœç•¥å½¢ã§ã™"
#: timezone/zic.c:1107
msgid "Zone continuation line end time is not after end time of previous line"
@@ -6788,15 +6784,15 @@ msgstr "Leapè¡Œã®ãƒ•ã‚£ãƒ¼ãƒ«ãƒ‰æ•°ãŒé–“é•ã£ã¦ã„ã¾ã™"
#: timezone/zic.c:1144
msgid "invalid leaping year"
-msgstr "ä¸å½“ãªã†ã‚‹ã†å¹´ã§ã™"
+msgstr "無効ãªã†ã‚‹ã†å¹´ã§ã™"
#: timezone/zic.c:1164 timezone/zic.c:1270
msgid "invalid month name"
-msgstr "ä¸å½“ãªæœˆåã§ã™"
+msgstr "無効ãªãªæœˆåã§ã™"
#: timezone/zic.c:1177 timezone/zic.c:1383 timezone/zic.c:1397
msgid "invalid day of month"
-msgstr "ä¸å½“ãª1ヶ月中ã®æ—¥ã«ã¡ã§ã™"
+msgstr "一月ã‚ãŸã‚Šã®æ—¥ã«ã¡ãŒç„¡åŠ¹ã§ã™"
#: timezone/zic.c:1182
msgid "time before zero"
@@ -6812,7 +6808,7 @@ msgstr "時刻ãŒå¤§ãã™ãŽã¾ã™"
#: timezone/zic.c:1194 timezone/zic.c:1299
msgid "invalid time of day"
-msgstr "1日辺りã®æ™‚é–“ãŒä¸æ­£"
+msgstr "1æ—¥ã‚ãŸã‚Šã®æ™‚é–“ãŒç„¡åŠ¹ã§ã™"
#: timezone/zic.c:1213
msgid "illegal CORRECTION field on Leap line"
@@ -6836,11 +6832,11 @@ msgstr "Link 行㮠TO フィールドãŒç©ºæ¬„ã§ã™"
#: timezone/zic.c:1320
msgid "invalid starting year"
-msgstr "ä¸å½“ãªé–‹å§‹å¹´"
+msgstr "無効ãªé–‹å§‹å¹´ã§ã™"
#: timezone/zic.c:1342
msgid "invalid ending year"
-msgstr "ä¸å½“ãªçµ‚了年"
+msgstr "無効ãªçµ‚了年ã§ã™"
#: timezone/zic.c:1346
msgid "starting year greater than ending year"
@@ -6848,11 +6844,11 @@ msgstr "開始年ãŒçµ‚了年より大ãããªã£ã¦ã„ã¾ã™"
#: timezone/zic.c:1353
msgid "typed single year"
-msgstr "typed single year"
+msgstr ""
#: timezone/zic.c:1388
msgid "invalid weekday name"
-msgstr "ãŠã‹ã—ãªæ›œæ—¥å"
+msgstr "無効ãªæ›œæ—¥åã§ã™"
#: timezone/zic.c:1566
#, c-format
@@ -6867,7 +6863,7 @@ msgstr "%s: %sを作æˆã§ãã¾ã›ã‚“: %s\n"
#: timezone/zic.c:1726
#, c-format
msgid "%s: Error writing %s\n"
-msgstr "%s: %sã®æ›¸ãè¾¼ã¿ã‚¨ãƒ©ãƒ¼ã§ã™\n"
+msgstr "%s: %s を書ãè¾¼ã¿ä¸­ã«ã‚¨ãƒ©ãƒ¼ãŒç™ºç”Ÿã—ã¾ã—ãŸ\n"
#: timezone/zic.c:2019
msgid "no POSIX environment variable for zone"
@@ -6924,11 +6920,11 @@ msgstr "クォートã™ã‚‹ãƒžãƒ¼ã‚¯ãŒå¥‡æ•°å€‹åˆ†ã—ã‹ã‚ã‚Šã¾ã›ã‚“"
#: timezone/zic.c:2546
msgid "use of 2/29 in non leap-year"
-msgstr "é–å¹´ã§ã¯ãªã„ã®ã«2/29を使ã£ã¦ã„ã¾ã™"
+msgstr "ã†ã‚‹ã†å¹´ã§ã¯ãªã„ã®ã«2/29を使ã£ã¦ã„ã¾ã™"
#: timezone/zic.c:2581
msgid "rule goes past start/end of month--will not work with pre-2004 versions of zic"
-msgstr ""
+msgstr "月ã®é–‹å§‹ã¨çµ‚了ã§éŽåŽ»ã«ã•ã‹ã®ã¼ã£ã¦ã„るルールã§ã™ -- 2004 以å‰ã®ãƒãƒ¼ã‚¸ãƒ§ãƒ³ã® zic ã§ã¯å‹•ä½œã—ã¾ã›ã‚“"
#: timezone/zic.c:2613
msgid "time zone abbreviation lacks alphabetic at start"
diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c
index 18a6667609..72bd3ee856 100644
--- a/posix/fnmatch_loop.c
+++ b/posix/fnmatch_loop.c
@@ -412,7 +412,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
# endif
- idx = findidx (&cp);
+ idx = findidx (&cp, 1);
if (idx != 0)
{
/* We found a table entry. Now see whether the
@@ -422,7 +422,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used)
int32_t idx2;
const UCHAR *np = (const UCHAR *) n;
- idx2 = findidx (&np);
+ idx2 = findidx (&np, string_end - n);
if (idx2 != 0
&& (idx >> 24) == (idx2 >> 24)
&& len == weights[idx2 & 0xffffff])
diff --git a/posix/regcomp.c b/posix/regcomp.c
index b238c08225..34ee845081 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2007,2009,2010 Free Software Foundation, Inc.
+ Copyright (C) 2002-2007,2009,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -3409,19 +3409,18 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name)
_NL_COLLATE_EXTRAMB);
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
- idx1 = findidx (&cp);
- if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+ idx1 = findidx (&cp, -1);
+ if (BE (idx1 == 0 || *cp != '\0', 0))
/* This isn't a valid character. */
return REG_ECOLLATE;
/* Build single byte matcing table for this equivalence class. */
- char_buf[1] = (unsigned char) '\0';
len = weights[idx1 & 0xffffff];
for (ch = 0; ch < SBC_MAX; ++ch)
{
char_buf[0] = ch;
cp = char_buf;
- idx2 = findidx (&cp);
+ idx2 = findidx (&cp, 1);
/*
idx2 = table[ch];
*/
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
index 47dbc6b007..70a271fe08 100644
--- a/posix/regex_internal.c
+++ b/posix/regex_internal.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2006, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2002-2006, 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -741,16 +741,18 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
unsigned char buf[6];
size_t mbclen;
+ const unsigned char *pp = p;
if (BE (pstr->trans != NULL, 0))
{
int i = mlen < 6 ? mlen : 6;
while (--i >= 0)
buf[i] = pstr->trans[p[i]];
+ pp = buf;
}
/* XXX Don't use mbrtowc, we know which conversion
to use (UTF-8 -> UCS4). */
memset (&cur_state, 0, sizeof (cur_state));
- mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+ mbclen = __mbrtowc (&wc2, (const char *) pp, mlen,
&cur_state);
if (raw + offset - p <= mbclen
&& mbclen < (size_t) -2)
@@ -871,7 +873,7 @@ re_string_peek_byte_case (const re_string_t *pstr, int idx)
}
static unsigned char
-internal_function __attribute ((pure))
+internal_function
re_string_fetch_byte_case (re_string_t *pstr)
{
if (BE (!pstr->mbs_allocated, 1))
diff --git a/posix/regex_internal.h b/posix/regex_internal.h
index 65a9905860..1e4e16772e 100644
--- a/posix/regex_internal.h
+++ b/posix/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2002-2005, 2007, 2008, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -744,7 +744,6 @@ re_string_elem_size_at (const re_string_t *pstr, int idx)
# ifdef _LIBC
const unsigned char *p, *extra;
const int32_t *table, *indirect;
- int32_t tmp;
# include <locale/weight.h>
uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
@@ -756,7 +755,7 @@ re_string_elem_size_at (const re_string_t *pstr, int idx)
indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
_NL_COLLATE_INDIRECTMB);
p = pstr->mbs + idx;
- tmp = findidx (&p);
+ findidx (&p, pstr->len - idx);
return p - pstr->mbs - idx;
}
else
diff --git a/posix/regexec.c b/posix/regexec.c
index 9e0c56599e..3ea810bb95 100644
--- a/posix/regexec.c
+++ b/posix/regexec.c
@@ -3924,7 +3924,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, int node_idx,
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
indirect = (const int32_t *)
_NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
- int32_t idx = findidx (&cp);
+ int32_t idx = findidx (&cp, elem_len);
if (idx > 0)
for (i = 0; i < cset->nequiv_classes; ++i)
{
diff --git a/posix/sys/wait.h b/posix/sys/wait.h
index 6d7f0684c1..a5fd58f9d2 100644
--- a/posix/sys/wait.h
+++ b/posix/sys/wait.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007,2009,2010
+/* Copyright (C) 1991-1994,1996-2001,2003,2004,2005,2007,2009,2010,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -167,13 +167,13 @@ struct rusage;
WUNTRACED bit is set in OPTIONS, return status for stopped children;
otherwise don't. */
extern __pid_t wait3 (__WAIT_STATUS __stat_loc, int __options,
- struct rusage * __usage) __THROW;
+ struct rusage * __usage) __THROWNL;
#endif
#ifdef __USE_BSD
/* PID is like waitpid. Other args are like wait3. */
extern __pid_t wait4 (__pid_t __pid, __WAIT_STATUS __stat_loc, int __options,
- struct rusage *__usage) __THROW;
+ struct rusage *__usage) __THROWNL;
#endif /* Use BSD. */
diff --git a/posix/tst-rfc3484-2.c b/posix/tst-rfc3484-2.c
index bf5f6cff7e..298fe6695c 100644
--- a/posix/tst-rfc3484-2.c
+++ b/posix/tst-rfc3484-2.c
@@ -21,6 +21,12 @@ __check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
void
attribute_hidden
+__free_in6ai (struct in6addrinfo *ai)
+{
+}
+
+void
+attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
diff --git a/posix/tst-rfc3484-3.c b/posix/tst-rfc3484-3.c
index 8eba74e48e..701f534bb1 100644
--- a/posix/tst-rfc3484-3.c
+++ b/posix/tst-rfc3484-3.c
@@ -21,6 +21,12 @@ __check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
void
attribute_hidden
+__free_in6ai (struct in6addrinfo *ai)
+{
+}
+
+void
+attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
diff --git a/posix/tst-rfc3484.c b/posix/tst-rfc3484.c
index 26835cf8b2..f77dc4c2cb 100644
--- a/posix/tst-rfc3484.c
+++ b/posix/tst-rfc3484.c
@@ -21,6 +21,12 @@ __check_pf (bool *p1, bool *p2, struct in6addrinfo **in6ai, size_t *in6ailen)
void
attribute_hidden
+__free_in6ai (struct in6addrinfo *ai)
+{
+}
+
+void
+attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
diff --git a/posix/unistd.h b/posix/unistd.h
index 9b416979c4..01fb64a4dc 100644
--- a/posix/unistd.h
+++ b/posix/unistd.h
@@ -776,7 +776,7 @@ extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
/* Clone the calling process, creating an exact copy.
Return -1 for errors, 0 to the new process,
and the process ID of the new process to the old process. */
-extern __pid_t fork (void) __THROW;
+extern __pid_t fork (void) __THROWNL;
#if (defined __USE_XOPEN_EXTENDED && !defined __USE_XOPEN2K8) \
|| defined __USE_BSD
diff --git a/resolv/getaddrinfo_a.c b/resolv/getaddrinfo_a.c
index f6af3aa45a..6f4ad8d816 100644
--- a/resolv/getaddrinfo_a.c
+++ b/resolv/getaddrinfo_a.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
@@ -125,8 +125,8 @@ getaddrinfo_a (int mode, struct gaicb *list[], int ent, struct sigevent *sig)
while (total > 0)
{
#ifdef DONT_NEED_GAI_MISC_COND
- int result;
- GAI_MISC_WAIT (result, total, NULL, 1);
+ int not_used __attribute__ ((unused));
+ GAI_MISC_WAIT (not_used, total, NULL, 1);
#else
pthread_cond_wait (&cond, &__gai_requests_mutex);
#endif
diff --git a/resolv/gethnamaddr.c b/resolv/gethnamaddr.c
index 5cf660a8d4..a8ccf1fd3a 100644
--- a/resolv/gethnamaddr.c
+++ b/resolv/gethnamaddr.c
@@ -585,7 +585,7 @@ gethostbyname2(name, af)
}
if (!isdigit(*cp) && *cp != '.')
break;
- }
+ }
if ((isxdigit(name[0]) && strchr(name, ':') != NULL) ||
name[0] == ':')
for (cp = name;; ++cp) {
@@ -787,7 +787,7 @@ _sethtent(f)
int f;
{
if (!hostf)
- hostf = fopen(_PATH_HOSTS, "r" );
+ hostf = fopen(_PATH_HOSTS, "rce" );
else
rewind(hostf);
stayopen = f;
@@ -810,7 +810,7 @@ _gethtent()
register char *cp, **q;
int af, len;
- if (!hostf && !(hostf = fopen(_PATH_HOSTS, "r" ))) {
+ if (!hostf && !(hostf = fopen(_PATH_HOSTS, "rce" ))) {
__set_h_errno (NETDB_INTERNAL);
return (NULL);
}
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index 7b167bb3bf..6f831ec6b8 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -307,7 +307,7 @@ do_init (void)
if (hconf_name == NULL)
hconf_name = _PATH_HOSTCONF;
- fp = fopen (hconf_name, "rc");
+ fp = fopen (hconf_name, "rce");
if (fp)
{
/* No threads using this stream. */
diff --git a/resolv/res_init.c b/resolv/res_init.c
index 73caaa4c5e..c58c763841 100644
--- a/resolv/res_init.c
+++ b/resolv/res_init.c
@@ -233,7 +233,7 @@ __res_vinit(res_state statp, int preinit) {
(line[sizeof(name) - 1] == ' ' || \
line[sizeof(name) - 1] == '\t'))
- if ((fp = fopen(_PATH_RESCONF, "rc")) != NULL) {
+ if ((fp = fopen(_PATH_RESCONF, "rce")) != NULL) {
/* No threads use this stream. */
__fsetlocking (fp, FSETLOCKING_BYCALLER);
/* read the config file */
diff --git a/resolv/res_query.c b/resolv/res_query.c
index 2f7cfaa4b7..947c6513a2 100644
--- a/resolv/res_query.c
+++ b/resolv/res_query.c
@@ -602,7 +602,7 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) {
if (statp->options & RES_NOALIASES)
return (NULL);
file = getenv("HOSTALIASES");
- if (file == NULL || (fp = fopen(file, "r")) == NULL)
+ if (file == NULL || (fp = fopen(file, "rce")) == NULL)
return (NULL);
setbuf(fp, NULL);
buf[sizeof(buf) - 1] = '\0';
diff --git a/scripts/check-local-headers.sh b/scripts/check-local-headers.sh
index b73078d364..62831ddda1 100755
--- a/scripts/check-local-headers.sh
+++ b/scripts/check-local-headers.sh
@@ -29,7 +29,7 @@ exec ${AWK} -v includedir="$includedir" '
BEGIN {
status = 0
exclude = "^" includedir \
- "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h)"
+ "/(asm[-/]|linux/|selinux/|gd|nss3/|sys/capability\\.h|libaudit\\.h)"
}
/^[^ ]/ && $1 ~ /.*:/ { obj = $1 }
{
diff --git a/scripts/list-sources.sh b/scripts/list-sources.sh
index 41c8b9eadd..53b6f7f0ee 100755
--- a/scripts/list-sources.sh
+++ b/scripts/list-sources.sh
@@ -9,23 +9,7 @@ case $# in
*) echo >&2 "Usage: $0 [top_srcdir]"; exit 2 ;;
esac
-if [ -r CVS/Entries ]; then
-
- ${CVS:-cvs} status 2>&1 | ${AWK:-awk} '
-NF >= 2 && $(NF - 1) == "Examining" { dir = $NF }
-$1 == "File:" { print (dir == ".") ? $2 : (dir "/" $2) }'
- exit $?
-
-elif [ -r .svn/entries ]; then
-
- ${SVN:-svn} ls -R | sed '/\/$/d'
- exit $?
-
-elif [ -r MT/options ]; then
-
- exec ${MONOTONE:-monotone} list known
-
-elif [ -r .git/HEAD ]; then
+if [ -r .git/HEAD ]; then
exec ${GIT:-git} ls-files
diff --git a/setjmp/bits/setjmp2.h b/setjmp/bits/setjmp2.h
index b2f8efac4c..ad65d25970 100644
--- a/setjmp/bits/setjmp2.h
+++ b/setjmp/bits/setjmp2.h
@@ -1,5 +1,5 @@
/* Checking macros for setjmp functions.
- Copyright (C) 2009 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2011 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
@@ -23,18 +23,18 @@
/* Variant of the longjmp functions which perform some sanity checking. */
#ifdef __REDIRECT_NTH
-extern void __REDIRECT_NTH (longjmp,
- (struct __jmp_buf_tag __env[1], int __val),
- __longjmp_chk) __attribute__ ((__noreturn__));
-extern void __REDIRECT_NTH (_longjmp,
- (struct __jmp_buf_tag __env[1], int __val),
- __longjmp_chk) __attribute__ ((__noreturn__));
-extern void __REDIRECT_NTH (siglongjmp,
- (struct __jmp_buf_tag __env[1], int __val),
- __longjmp_chk) __attribute__ ((__noreturn__));
+extern void __REDIRECT_NTHNL (longjmp,
+ (struct __jmp_buf_tag __env[1], int __val),
+ __longjmp_chk) __attribute__ ((__noreturn__));
+extern void __REDIRECT_NTHNL (_longjmp,
+ (struct __jmp_buf_tag __env[1], int __val),
+ __longjmp_chk) __attribute__ ((__noreturn__));
+extern void __REDIRECT_NTHNL (siglongjmp,
+ (struct __jmp_buf_tag __env[1], int __val),
+ __longjmp_chk) __attribute__ ((__noreturn__));
#else
extern void __longjmp_chk (struct __jmp_buf_tag __env[1], int __val),
- __THROW __attribute__ ((__noreturn__));
+ __THROWNL __attribute__ ((__noreturn__));
# define longjmp __longjmp_chk
# define _longjmp __longjmp_chk
# define siglongjmp __longjmp_chk
diff --git a/setjmp/setjmp.h b/setjmp/setjmp.h
index 3bc382ff1e..fd57ab645b 100644
--- a/setjmp/setjmp.h
+++ b/setjmp/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1999,2001,2002,2007,2009 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999,2001,2002,2007,2009,2011 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
@@ -50,19 +50,19 @@ typedef struct __jmp_buf_tag jmp_buf[1];
/* Store the calling environment in ENV, also saving the signal mask.
Return 0. */
-extern int setjmp (jmp_buf __env) __THROW;
+extern int setjmp (jmp_buf __env) __THROWNL;
__END_NAMESPACE_STD
/* Store the calling environment in ENV, also saving the
signal mask if SAVEMASK is nonzero. Return 0.
This is the internal name for `sigsetjmp'. */
-extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROW;
+extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;
#ifndef __FAVOR_BSD
/* Store the calling environment in ENV, not saving the signal mask.
Return 0. */
-extern int _setjmp (struct __jmp_buf_tag __env[1]) __THROW;
+extern int _setjmp (struct __jmp_buf_tag __env[1]) __THROWNL;
/* Do not save the signal mask. This is equivalent to the `_setjmp'
BSD function. */
@@ -80,7 +80,7 @@ __BEGIN_NAMESPACE_STD
/* Jump to the environment saved in ENV, making the
`setjmp' call there return VAL, or 1 if VAL is 0. */
extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
- __THROW __attribute__ ((__noreturn__));
+ __THROWNL __attribute__ ((__noreturn__));
__END_NAMESPACE_STD
@@ -89,7 +89,7 @@ __END_NAMESPACE_STD
the signal mask. But it is how ENV was saved that determines whether
`longjmp' restores the mask; `_longjmp' is just an alias. */
extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
- __THROW __attribute__ ((__noreturn__));
+ __THROWNL __attribute__ ((__noreturn__));
#endif
@@ -108,7 +108,7 @@ typedef struct __jmp_buf_tag sigjmp_buf[1];
Restore the signal mask if that sigsetjmp call saved it.
This is just an alias `longjmp'. */
extern void siglongjmp (sigjmp_buf __env, int __val)
- __THROW __attribute__ ((__noreturn__));
+ __THROWNL __attribute__ ((__noreturn__));
#endif /* Use POSIX. */
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index 753a5ac150..952886b69e 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -1640,9 +1640,9 @@ do_positional:
/* Array with information about the needed arguments. This has to
be dynamically extensible. */
size_t nspecs = 0;
- size_t nspecs_max = 32; /* A more or less arbitrary start value. */
- struct printf_spec *specs
- = alloca (nspecs_max * sizeof (struct printf_spec));
+ /* A more or less arbitrary start value. */
+ size_t nspecs_size = 32 * sizeof (struct printf_spec);
+ struct printf_spec *specs = alloca (nspecs_size);
/* The number of arguments the format string requests. This will
determine the size of the array needed to store the argument
@@ -1679,15 +1679,14 @@ do_positional:
for (f = lead_str_end; *f != L_('\0'); f = specs[nspecs++].next_fmt)
{
- if (nspecs >= nspecs_max)
+ if (nspecs * sizeof (*specs) >= nspecs_size)
{
/* Extend the array of format specifiers. */
struct printf_spec *old = specs;
- specs = extend_alloca (specs, nspecs_max,
- 2 * nspecs_max * sizeof (*specs));
+ specs = extend_alloca (specs, nspecs_size, 2 * nspecs_size);
/* Copy the old array's elements to the new space. */
- memmove (specs, old, nspecs * sizeof (struct printf_spec));
+ memmove (specs, old, nspecs * sizeof (*specs));
}
/* Parse the format specifier. */
diff --git a/stdlib/strtod_l.c b/stdlib/strtod_l.c
index b3380fdba3..f24d4de73b 100644
--- a/stdlib/strtod_l.c
+++ b/stdlib/strtod_l.c
@@ -1513,6 +1513,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
assert (numsize == densize);
for (i = numsize; i > 0; --i)
num[i] = num[i - 1];
+ num[0] = 0;
}
den[densize] = 0;
@@ -1557,6 +1558,7 @@ ____STRTOF_INTERNAL (nptr, endptr, group, loc)
n0 = num[densize] = num[densize - 1];
for (i = densize - 1; i > 0; --i)
num[i] = num[i - 1];
+ num[0] = 0;
got_limb;
}
diff --git a/stdlib/ucontext.h b/stdlib/ucontext.h
index ee6f594f07..abeb6471da 100644
--- a/stdlib/ucontext.h
+++ b/stdlib/ucontext.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2011 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
@@ -29,15 +29,15 @@
__BEGIN_DECLS
/* Get user context and store it in variable pointed to by UCP. */
-extern int getcontext (ucontext_t *__ucp) __THROW;
+extern int getcontext (ucontext_t *__ucp) __THROWNL;
/* Set user context from information of variable pointed to by UCP. */
-extern int setcontext (__const ucontext_t *__ucp) __THROW;
+extern int setcontext (__const ucontext_t *__ucp) __THROWNL;
/* Save current context in context variable pointed to by OUCP and set
context from variable pointed to by UCP. */
extern int swapcontext (ucontext_t *__restrict __oucp,
- __const ucontext_t *__restrict __ucp) __THROW;
+ __const ucontext_t *__restrict __ucp) __THROWNL;
/* Manipulate user context UCP to continue with calling functions FUNC
and the ARGC-1 parameters following ARGC when the context is used
diff --git a/string/Makefile b/string/Makefile
index ab100244df..459cf810ff 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -50,7 +50,7 @@ strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
strlen strncmp strncpy strpbrk strrchr strspn memmem \
strstr strcasestr strnlen strcasecmp strncasecmp \
- strncat
+ strncat rawmemchr strchrnul
tests := tester inl-tester noinl-tester testcopy test-ffs \
tst-strlen stratcliff tst-svc tst-inlcall \
bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
diff --git a/string/memrchr.c b/string/memrchr.c
index 21662b1bd7..498a4376ea 100644
--- a/string/memrchr.c
+++ b/string/memrchr.c
@@ -63,7 +63,12 @@
/* Search no more than N bytes of S for C. */
__ptr_t
-__memrchr (s, c_in, n)
+#ifndef MEMRCHR
+__memrchr
+#else
+MEMRCHR
+#endif
+ (s, c_in, n)
const __ptr_t s;
int c_in;
size_t n;
@@ -205,6 +210,8 @@ __memrchr (s, c_in, n)
return 0;
}
-#ifdef weak_alias
+#ifndef MEMRCHR
+# ifdef weak_alias
weak_alias (__memrchr, memrchr)
+# endif
#endif
diff --git a/string/stratcliff.c b/string/stratcliff.c
index 5165be2d13..5176409c5b 100644
--- a/string/stratcliff.c
+++ b/string/stratcliff.c
@@ -1,5 +1,5 @@
/* Test for string function add boundaries of usable memory.
- Copyright (C) 1996,1997,1999-2003,2007,2009,2010
+ Copyright (C) 1996,1997,1999-2003,2007,2009,2010,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -240,7 +240,7 @@ do_test (void)
}
}
- /* This function only exists for single-byte characters. */
+ /* These functions only exist for single-byte characters. */
#ifndef WCSTEST
/* rawmemchr test */
for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
@@ -261,6 +261,37 @@ do_test (void)
adr[middle] = L('T');
}
}
+
+ /* memrchr test */
+ for (outer = nchars - 1; outer >= MAX (0, nchars - 128); --outer)
+ {
+ for (middle = MAX (outer, nchars - 64); middle < nchars; ++middle)
+ {
+ adr[middle] = L('V');
+
+ CHAR *cp = memrchr (&adr[outer], L('V'), nchars - outer);
+
+ if (cp - &adr[outer] != middle - outer)
+ {
+ printf ("%s flunked for outer = %d, middle = %d\n",
+ STRINGIFY (memrchr), outer, middle);
+ result = 1;
+ }
+
+ adr[middle] = L('T');
+ }
+ }
+ for (outer = nchars; outer >= MAX (0, nchars - 128); --outer)
+ {
+ CHAR *cp = memrchr (&adr[outer], L('V'), nchars - outer);
+
+ if (cp != NULL)
+ {
+ printf ("%s flunked for outer = %d\n",
+ STRINGIFY (memrchr), outer);
+ result = 1;
+ }
+ }
#endif
/* strcpy/wcscpy test */
diff --git a/string/strcoll_l.c b/string/strcoll_l.c
index d8d11392e3..fb77d08238 100644
--- a/string/strcoll_l.c
+++ b/string/strcoll_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-1997,2002,2004,2007,2010 Free Software Foundation, Inc.
+/* Copyright (C) 1995-1997,2002,2004,2007,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -205,7 +205,7 @@ STRCOLL (s1, s2, l)
while (*us1 != L('\0'))
{
- int32_t tmp = findidx (&us1);
+ int32_t tmp = findidx (&us1, -1);
rule1arr[idx1max] = tmp >> 24;
idx1arr[idx1max] = tmp & 0xffffff;
idx1cnt = idx1max++;
@@ -267,7 +267,7 @@ STRCOLL (s1, s2, l)
while (*us2 != L('\0'))
{
- int32_t tmp = findidx (&us2);
+ int32_t tmp = findidx (&us2, -1);
rule2arr[idx2max] = tmp >> 24;
idx2arr[idx2max] = tmp & 0xffffff;
idx2cnt = idx2max++;
diff --git a/string/strnlen.c b/string/strnlen.c
index 454257b2bc..d083ec29e6 100644
--- a/string/strnlen.c
+++ b/string/strnlen.c
@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 1991,1993,1997,2000,2001,2005 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1993, 1997, 2000, 2001, 2005, 2011 Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>.
Based on strlen written by Torbjorn Granlund (tege@sics.se),
@@ -26,12 +26,17 @@
/* Find the length of S, but scan at most MAXLEN characters. If no
'\0' terminator is found in that many characters, return MAXLEN. */
+
+#ifdef STRNLEN
+# define __strnlen STRNLEN
+#endif
+
size_t
__strnlen (const char *str, size_t maxlen)
{
const char *char_ptr, *end_ptr = str + maxlen;
const unsigned long int *longword_ptr;
- unsigned long int longword, magic_bits, himagic, lomagic;
+ unsigned long int longword, himagic, lomagic;
if (maxlen == 0)
return 0;
@@ -65,14 +70,12 @@ __strnlen (const char *str, size_t maxlen)
The 1-bits make sure that carries propagate to the next 0-bit.
The 0-bits provide holes for carries to fall into. */
- magic_bits = 0x7efefeffL;
himagic = 0x80808080L;
lomagic = 0x01010101L;
if (sizeof (longword) > 4)
{
/* 64-bit version of the magic. */
/* Do the shift in two steps to avoid a warning if long has 32 bits. */
- magic_bits = ((0x7efefefeL << 16) << 16) | 0xfefefeffL;
himagic = ((himagic << 16) << 16) | himagic;
lomagic = ((lomagic << 16) << 16) | lomagic;
}
@@ -157,5 +160,7 @@ __strnlen (const char *str, size_t maxlen)
char_ptr = end_ptr;
return char_ptr - str;
}
+#ifndef STRNLEN
weak_alias (__strnlen, strnlen)
+#endif
libc_hidden_def (strnlen)
diff --git a/string/strxfrm_l.c b/string/strxfrm_l.c
index 220253c4d6..b06556dfbd 100644
--- a/string/strxfrm_l.c
+++ b/string/strxfrm_l.c
@@ -176,7 +176,7 @@ STRXFRM (STRING_TYPE *dest, const STRING_TYPE *src, size_t n, __locale_t l)
idxmax = 0;
do
{
- int32_t tmp = findidx (&usrc);
+ int32_t tmp = findidx (&usrc, -1);
rulearr[idxmax] = tmp >> 24;
idxarr[idxmax] = tmp & 0xffffff;
diff --git a/string/test-memcmp.c b/string/test-memcmp.c
index 4675bd9eaa..5447c69f3a 100644
--- a/string/test-memcmp.c
+++ b/string/test-memcmp.c
@@ -1,5 +1,5 @@
/* Test and measure memcmp functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
Added wmemcmp support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011.
@@ -29,10 +29,24 @@
# define MEMCPY wmemcpy
# define SIMPLE_MEMCMP simple_wmemcmp
# define CHAR wchar_t
-# define MAX_CHAR 256000
-# define UCHAR uint32_t
+# define UCHAR wchar_t
# define CHARBYTES 4
+# define CHAR__MIN WCHAR_MIN
+# define CHAR__MAX WCHAR_MAX
+int
+simple_wmemcmp (const wchar_t *s1, const wchar_t *s2, size_t n)
+{
+ int ret = 0;
+ /* Warning!
+ wmemcmp has to use SIGNED comparison for elements.
+ memcmp has to use UNSIGNED comparison for elemnts.
+ */
+ while (n-- && (ret = *s1 < *s2 ? -1 : *s1 == *s2 ? 0 : 1) == 0) {s1++; s2++;}
+ return ret;
+}
#else
+# include <limits.h>
+
# define MEMCMP memcmp
# define MEMCPY memcpy
# define SIMPLE_MEMCMP simple_memcmp
@@ -40,18 +54,20 @@
# define MAX_CHAR 255
# define UCHAR unsigned char
# define CHARBYTES 1
-#endif
-
-typedef int (*proto_t) (const CHAR *, const CHAR *, size_t);
+# define CHAR__MIN CHAR_MIN
+# define CHAR__MAX CHAR_MAX
int
-SIMPLE_MEMCMP (const CHAR *s1, const CHAR *s2, size_t n)
+simple_memcmp (const char *s1, const char *s2, size_t n)
{
int ret = 0;
- while (n-- && (ret = *(UCHAR *) s1++ - *(UCHAR *) s2++) == 0);
+ while (n-- && (ret = *(unsigned char *) s1++ - *(unsigned char *) s2++) == 0);
return ret;
}
+#endif
+
+typedef int (*proto_t) (const CHAR *, const CHAR *, size_t);
IMPL (SIMPLE_MEMCMP, 0)
IMPL (MEMCMP, 1)
@@ -121,7 +137,7 @@ do_test (size_t align1, size_t align2, size_t len, int exp_result)
s2 = (CHAR *) (buf2 + align2);
for (i = 0; i < len; i++)
- s1[i] = s2[i] = 1 + (23 << ((CHARBYTES - 1) * 8)) * i % MAX_CHAR;
+ s1[i] = s2[i] = 1 + (23 << ((CHARBYTES - 1) * 8)) * i % CHAR__MAX;
s1[len] = align1;
s2[len] = align2;
@@ -412,8 +428,8 @@ check1 (void)
s2[99] = 1;
s1[100] = 116;
s2[100] = 116;
- s1[101] = -13;
- s2[101] = -13;
+ s1[101] = CHAR__MIN;
+ s2[101] = CHAR__MAX;
s1[102] = -109;
s2[102] = -109;
s1[103] = 1;
@@ -434,8 +450,8 @@ check1 (void)
s2[110] = -109;
s1[111] = 1;
s2[111] = 1;
- s1[112] = 20;
- s2[112] = 20;
+ s1[112] = CHAR__MAX;
+ s2[112] = CHAR__MIN;
s1[113] = -13;
s2[113] = -13;
s1[114] = -109;
@@ -444,9 +460,12 @@ check1 (void)
s2[115] = 1;
n = 116;
- exp_result = SIMPLE_MEMCMP (s1, s2, n);
- FOR_EACH_IMPL (impl, 0)
- check_result (impl, s1, s2, n, exp_result);
+ for (size_t i = 0; i < n; i++)
+ {
+ exp_result = SIMPLE_MEMCMP (s1 + i, s2 + i, n - i);
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1 + i, s2 + i, n - i, exp_result);
+ }
}
int
diff --git a/string/test-rawmemchr.c b/string/test-rawmemchr.c
new file mode 100644
index 0000000000..58c1b158f3
--- /dev/null
+++ b/string/test-rawmemchr.c
@@ -0,0 +1,189 @@
+/* Test and measure memchr functions.
+ Copyright (C) 1999,2002,2003,2005,2009,2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Jakub Jelinek <jakub@redhat.com>, 1999.
+
+ 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 <assert.h>
+
+#define TEST_MAIN
+#include "test-string.h"
+
+typedef char *(*proto_t) (const char *, int);
+char *simple_rawmemchr (const char *, int);
+
+IMPL (simple_rawmemchr, 0)
+IMPL (rawmemchr, 1)
+
+char *
+simple_rawmemchr (const char *s, int c)
+{
+ while (1)
+ if (*s++ == (char) c)
+ return (char *) s - 1;
+ return NULL;
+}
+
+static void
+do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
+{
+ char *res = CALL (impl, s, c);
+ if (res != exp_res)
+ {
+ error (0, 0, "Wrong result in function %s %p %p", impl->name,
+ res, exp_res);
+ ret = 1;
+ return;
+ }
+
+ if (HP_TIMING_AVAIL)
+ {
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
+ size_t i;
+
+ for (i = 0; i < 32; ++i)
+ {
+ HP_TIMING_NOW (start);
+ CALL (impl, s, c);
+ HP_TIMING_NOW (stop);
+ HP_TIMING_BEST (best_time, start, stop);
+ }
+
+ printf ("\t%zd", (size_t) best_time);
+ }
+}
+
+static void
+do_test (size_t align, size_t pos, size_t len, int seek_char)
+{
+ size_t i;
+ char *result;
+
+ align &= 7;
+ if (align + len >= page_size)
+ return;
+
+ for (i = 0; i < len; ++i)
+ {
+ buf1[align + i] = 1 + 23 * i % 127;
+ if (buf1[align + i] == seek_char)
+ buf1[align + i] = seek_char + 1;
+ }
+ buf1[align + len] = 0;
+
+ assert (pos < len);
+
+ buf1[align + pos] = seek_char;
+ buf1[align + len] = -seek_char;
+ result = (char *) (buf1 + align + pos);
+
+ if (HP_TIMING_AVAIL)
+ printf ("Length %4zd, alignment %2zd:", pos, align);
+
+ FOR_EACH_IMPL (impl, 0)
+ do_one_test (impl, (char *) (buf1 + align), seek_char, result);
+
+ if (HP_TIMING_AVAIL)
+ putchar ('\n');
+}
+
+static void
+do_random_tests (void)
+{
+ size_t i, j, n, align, pos, len;
+ int seek_char;
+ char *result;
+ unsigned char *p = buf1 + page_size - 512;
+
+ for (n = 0; n < ITERATIONS; n++)
+ {
+ align = random () & 15;
+ pos = random () & 511;
+ if (pos + align >= 512)
+ pos = 511 - align - (random () & 7);
+ len = random () & 511;
+ if (len + align >= 512)
+ len = 512 - align - (random () & 7);
+ if (pos >= len)
+ continue;
+ seek_char = random () & 255;
+ j = len + align + 64;
+ if (j > 512)
+ j = 512;
+
+ for (i = 0; i < j; i++)
+ {
+ if (i == pos + align)
+ p[i] = seek_char;
+ else
+ {
+ p[i] = random () & 255;
+ if (i < pos + align && p[i] == seek_char)
+ p[i] = seek_char + 13;
+ }
+ }
+
+ assert (pos < len);
+ size_t r = random ();
+ if ((r & 31) == 0)
+ len = ~(uintptr_t) (p + align) - ((r >> 5) & 31);
+ result = (char *) (p + pos + align);
+
+ FOR_EACH_IMPL (impl, 1)
+ if (CALL (impl, (char *) (p + align), seek_char) != result)
+ {
+ error (0, 0, "Iteration %zd - wrong result in function %s (%zd, %d, %zd, %zd) %p != %p, p %p",
+ n, impl->name, align, seek_char, len, pos,
+ CALL (impl, (char *) (p + align), seek_char),
+ result, p);
+ ret = 1;
+ }
+ }
+}
+
+int
+test_main (void)
+{
+ size_t i;
+
+ test_init ();
+
+ printf ("%20s", "");
+ FOR_EACH_IMPL (impl, 0)
+ printf ("\t%s", impl->name);
+ putchar ('\n');
+
+ for (i = 1; i < 7; ++i)
+ {
+ do_test (0, 16 << i, 2048, 23);
+ do_test (i, 64, 256, 23);
+ do_test (0, 16 << i, 2048, 0);
+ do_test (i, 64, 256, 0);
+ }
+ for (i = 1; i < 32; ++i)
+ {
+ do_test (0, i, i + 1, 23);
+ do_test (0, i, i + 1, 0);
+ }
+
+ do_random_tests ();
+ return ret;
+}
+
+#include "../test-skeleton.c"
diff --git a/string/test-strchr.c b/string/test-strchr.c
index cf25b449d9..a46ee82c1d 100644
--- a/string/test-strchr.c
+++ b/string/test-strchr.c
@@ -1,7 +1,8 @@
-/* Test and measure strchr functions.
- Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
+/* Test and measure STRCHR functions.
+ Copyright (C) 1999, 2002, 2003, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
+ Added wcschr support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -21,42 +22,72 @@
#define TEST_MAIN
#include "test-string.h"
-typedef char *(*proto_t) (const char *, int);
-char *simple_strchr (const char *, int);
-char *stupid_strchr (const char *, int);
-
-IMPL (stupid_strchr, 0)
-IMPL (simple_strchr, 0)
-IMPL (strchr, 1)
-
-char *
-simple_strchr (const char *s, int c)
+#ifndef WIDE
+# ifdef USE_FOR_STRCHRNUL
+# define STRCHR strchrnul
+# define stupid_STRCHR stupid_STRCHRNUL
+# define simple_STRCHR simple_STRCHRNUL
+# else
+# define STRCHR strchr
+# endif
+# define STRLEN strlen
+# define CHAR char
+# define BIG_CHAR CHAR_MAX
+# define MIDDLE_CHAR 127
+# define SMALL_CHAR 23
+# define UCHAR unsigned char
+#else
+# include <wchar.h>
+# define STRCHR wcschr
+# define STRLEN wcslen
+# define CHAR wchar_t
+# define BIG_CHAR WCHAR_MAX
+# define MIDDLE_CHAR 1121
+# define SMALL_CHAR 851
+# define UCHAR wchar_t
+#endif
+
+#ifdef USE_FOR_STRCHRNUL
+# define NULLRET(endptr) endptr
+#else
+# define NULLRET(endptr) NULL
+#endif
+
+
+typedef CHAR *(*proto_t) (const CHAR *, int);
+
+CHAR *
+simple_STRCHR (const CHAR *s, int c)
{
- for (; *s != (char) c; ++s)
+ for (; *s != (CHAR) c; ++s)
if (*s == '\0')
- return NULL;
- return (char *) s;
+ return NULLRET ((CHAR *) s);
+ return (CHAR *) s;
}
-char *
-stupid_strchr (const char *s, int c)
+CHAR *
+stupid_STRCHR (const CHAR *s, int c)
{
- size_t n = strlen (s) + 1;
+ size_t n = STRLEN (s) + 1;
while (n--)
- if (*s++ == (char) c)
- return (char *) s - 1;
- return NULL;
+ if (*s++ == (CHAR) c)
+ return (CHAR *) s - 1;
+ return NULLRET ((CHAR *) s - 1);
}
+IMPL (stupid_STRCHR, 0)
+IMPL (simple_STRCHR, 0)
+IMPL (STRCHR, 1)
+
static void
-do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
+do_one_test (impl_t *impl, const CHAR *s, int c, const CHAR *exp_res)
{
- char *res = CALL (impl, s, c);
+ CHAR *res = CALL (impl, s, c);
if (res != exp_res)
{
- error (0, 0, "Wrong result in function %s %p %p", impl->name,
- res, exp_res);
+ error (0, 0, "Wrong result in function %s %#x %p %p", impl->name,
+ c, res, exp_res);
ret = 1;
return;
}
@@ -82,37 +113,43 @@ do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
static void
do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
+/* For wcschr: align here means align not in bytes,
+ but in wchar_ts, in bytes it will equal to align * (sizeof (wchar_t))
+ len for wcschr here isn't in bytes but it's number of wchar_t symbols. */
{
size_t i;
- char *result;
-
- align &= 7;
- if (align + len >= page_size)
+ CHAR *result;
+ CHAR *buf = (CHAR *) buf1;
+ align &= 15;
+ if ((align + len) * sizeof (CHAR) >= page_size)
return;
for (i = 0; i < len; ++i)
{
- buf1[align + i] = 32 + 23 * i % (max_char - 32);
- if (buf1[align + i] == seek_char)
- buf1[align + i] = seek_char + 1;
+ buf[align + i] = 32 + 23 * i % max_char;
+ if (buf[align + i] == seek_char)
+ buf[align + i] = seek_char + 1;
+ else if (buf[align + i] == 0)
+ buf[align + i] = 1;
}
- buf1[align + len] = 0;
+ buf[align + len] = 0;
if (pos < len)
{
- buf1[align + pos] = seek_char;
- result = (char *) (buf1 + align + pos);
+ buf[align + pos] = seek_char;
+ result = buf + align + pos;
}
else if (seek_char == 0)
- result = (char *) (buf1 + align + len);
+ result = buf + align + len;
else
- result = NULL;
+ result = NULLRET (buf + align + len);
if (HP_TIMING_AVAIL)
- printf ("Length %4zd, alignment %2zd:", pos, align);
+ printf ("Length %4zd, alignment in bytes %2zd:",
+ pos, align * sizeof (CHAR));
FOR_EACH_IMPL (impl, 0)
- do_one_test (impl, (char *) (buf1 + align), seek_char, result);
+ do_one_test (impl, buf + align, seek_char, result);
if (HP_TIMING_AVAIL)
putchar ('\n');
@@ -123,27 +160,31 @@ do_random_tests (void)
{
size_t i, j, n, align, pos, len;
int seek_char;
- char *result;
- unsigned char *p = buf1 + page_size - 512;
+ CHAR *result;
+ UCHAR *p = (UCHAR *) (buf1 + page_size - 512 * sizeof (CHAR));
for (n = 0; n < ITERATIONS; n++)
{
+ /* For wcschr: align here means align not in bytes, but in wchar_ts,
+ in bytes it will equal to align * (sizeof (wchar_t)). */
align = random () & 15;
pos = random () & 511;
seek_char = random () & 255;
if (pos + align >= 511)
pos = 510 - align - (random () & 7);
+ /* len for wcschr here isn't in bytes but it's number of wchar_t
+ symbols. */
len = random () & 511;
if ((pos == len && seek_char)
|| (pos > len && (random () & 1)))
len = pos + 1 + (random () & 7);
if (len + align >= 512)
- len = 511 - align - (random () & 7);
+ len = 511 - align - (random () & 7);
if (pos == len && seek_char)
len = pos + 1;
j = (pos > len ? pos : len) + align + 64;
if (j > 512)
- j = 512;
+ j = 512;
for (i = 0; i < j; i++)
{
@@ -166,18 +207,19 @@ do_random_tests (void)
}
if (pos <= len)
- result = (char *) (p + pos + align);
+ result = (CHAR *) (p + pos + align);
else if (seek_char == 0)
- result = (char *) (p + len + align);
+ result = (CHAR *) (p + len + align);
else
- result = NULL;
+ result = NULLRET ((CHAR *) (p + len + align));
FOR_EACH_IMPL (impl, 1)
- if (CALL (impl, (char *) (p + align), seek_char) != result)
+ if (CALL (impl, (CHAR *) (p + align), seek_char) != result)
{
- error (0, 0, "Iteration %zd - wrong result in function %s (%zd, %d, %zd, %zd) %p != %p, p %p",
- n, impl->name, align, seek_char, len, pos,
- CALL (impl, (char *) (p + align), seek_char), result, p);
+ error (0, 0, "Iteration %zd - wrong result in function \
+ %s (align in bytes: %zd, seek_char: %d, len: %zd, pos: %zd) %p != %p, p %p",
+ n, impl->name, align * sizeof (CHAR), seek_char, len, pos,
+ CALL (impl, (CHAR *) (p + align), seek_char), result, p);
ret = 1;
}
}
@@ -197,38 +239,38 @@ test_main (void)
for (i = 1; i < 8; ++i)
{
- do_test (0, 16 << i, 2048, 23, 127);
- do_test (i, 16 << i, 2048, 23, 127);
+ do_test (0, 16 << i, 2048, SMALL_CHAR, MIDDLE_CHAR);
+ do_test (i, 16 << i, 2048, SMALL_CHAR, MIDDLE_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (i, 64, 256, 23, 127);
- do_test (i, 64, 256, 23, 255);
+ do_test (i, 64, 256, SMALL_CHAR, MIDDLE_CHAR);
+ do_test (i, 64, 256, SMALL_CHAR, BIG_CHAR);
}
for (i = 0; i < 32; ++i)
{
- do_test (0, i, i + 1, 23, 127);
- do_test (0, i, i + 1, 23, 255);
+ do_test (0, i, i + 1, SMALL_CHAR, MIDDLE_CHAR);
+ do_test (0, i, i + 1, SMALL_CHAR, BIG_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (0, 16 << i, 2048, 0, 127);
- do_test (i, 16 << i, 2048, 0, 127);
+ do_test (0, 16 << i, 2048, 0, MIDDLE_CHAR);
+ do_test (i, 16 << i, 2048, 0, MIDDLE_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (i, 64, 256, 0, 127);
- do_test (i, 64, 256, 0, 255);
+ do_test (i, 64, 256, 0, MIDDLE_CHAR);
+ do_test (i, 64, 256, 0, BIG_CHAR);
}
for (i = 0; i < 32; ++i)
{
- do_test (0, i, i + 1, 0, 127);
- do_test (0, i, i + 1, 0, 255);
+ do_test (0, i, i + 1, 0, MIDDLE_CHAR);
+ do_test (0, i, i + 1, 0, BIG_CHAR);
}
do_random_tests ();
diff --git a/string/test-strchrnul.c b/string/test-strchrnul.c
new file mode 100644
index 0000000000..9836af6ddd
--- /dev/null
+++ b/string/test-strchrnul.c
@@ -0,0 +1,2 @@
+#define USE_FOR_STRCHRNUL 1
+#include "test-strchr.c"
diff --git a/string/test-strcmp.c b/string/test-strcmp.c
index b8d85dca79..12942446c9 100644
--- a/string/test-strcmp.c
+++ b/string/test-strcmp.c
@@ -1,5 +1,5 @@
-/* Test and measure STRCMP functions.
- Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
+/* Test and measure strcmp and wcscmp functions.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
Added wcscmp support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011.
@@ -23,7 +23,6 @@
#include "test-string.h"
#ifdef WIDE
-# include <inttypes.h>
# include <wchar.h>
# define L(str) L##str
@@ -34,13 +33,56 @@
# define SIMPLE_STRCMP simple_wcscmp
# define STUPID_STRCMP stupid_wcscmp
# define CHAR wchar_t
-# define UCHAR uint32_t
+# define UCHAR wchar_t
# define CHARBYTES 4
# define CHARBYTESLOG 2
# define CHARALIGN __alignof__ (CHAR)
# define MIDCHAR 0x7fffffff
# define LARGECHAR 0xfffffffe
+# define CHAR__MAX WCHAR_MAX
+# define CHAR__MIN WCHAR_MIN
+
+/* Wcscmp uses signed semantics for comparison, not unsigned */
+/* Avoid using substraction since possible overflow */
+
+int
+simple_wcscmp (const wchar_t *s1, const wchar_t *s2)
+{
+ wchar_t c1, c2;
+ do
+ {
+ c1 = *s1++;
+ c2 = *s2++;
+ if (c2 == L'\0')
+ return c1 - c2;
+ }
+ while (c1 == c2);
+
+ return c1 < c2 ? -1 : 1;
+}
+
+int
+stupid_wcscmp (const wchar_t *s1, const wchar_t *s2)
+{
+ size_t ns1 = wcslen (s1) + 1;
+ size_t ns2 = wcslen (s2) + 1;
+ size_t n = ns1 < ns2 ? ns1 : ns2;
+ int ret = 0;
+
+ wchar_t c1, c2;
+
+ while (n--) {
+ c1 = *s1++;
+ c2 = *s2++;
+ if ((ret = c1 < c2 ? -1 : c1 == c2 ? 0 : 1) != 0)
+ break;
+ }
+ return ret;
+}
+
#else
+# include <limits.h>
+
# define L(str) str
# define STRCMP strcmp
# define STRCPY strcpy
@@ -55,31 +97,35 @@
# define CHARALIGN 1
# define MIDCHAR 0x7f
# define LARGECHAR 0xfe
-#endif
-typedef int (*proto_t) (const CHAR *, const CHAR *);
+# define CHAR__MAX CHAR_MAX
+# define CHAR__MIN CHAR_MIN
+/* Strcmp uses unsigned semantics for comparison. */
int
-SIMPLE_STRCMP (const CHAR *s1, const CHAR *s2)
+simple_strcmp (const char *s1, const char *s2)
{
int ret;
- while ((ret = *(UCHAR *) s1 - *(UCHAR *) s2++) == 0 && *s1++);
+ while ((ret = *(unsigned char *) s1 - *(unsigned char*) s2++) == 0 && *s1++);
return ret;
}
int
-STUPID_STRCMP (const CHAR *s1, const CHAR *s2)
+stupid_strcmp (const char *s1, const char *s2)
{
- size_t ns1 = STRLEN (s1) + 1;
- size_t ns2 = STRLEN (s2) + 1;
+ size_t ns1 = strlen (s1) + 1;
+ size_t ns2 = strlen (s2) + 1;
size_t n = ns1 < ns2 ? ns1 : ns2;
int ret = 0;
while (n--)
- if ((ret = *(UCHAR *) s1++ - *(UCHAR *) s2++) != 0)
+ if ((ret = *(unsigned char *) s1++ - *(unsigned char *) s2++) != 0)
break;
return ret;
}
+#endif
+
+typedef int (*proto_t) (const CHAR *, const CHAR *);
IMPL (STUPID_STRCMP, 1)
IMPL (SIMPLE_STRCMP, 1)
@@ -177,14 +223,16 @@ do_test (size_t align1, size_t align2, size_t len, int max_char,
static void
do_random_tests (void)
{
- for (size_t a = 0; a < CHARBYTES; a += CHARALIGN)
- for (size_t b = 0; b < CHARBYTES; b += CHARALIGN)
- {
- UCHAR *p1 = (UCHAR *) (buf1 + page_size - 512 * CHARBYTES - a);
- UCHAR *p2 = (UCHAR *) (buf2 + page_size - 512 * CHARBYTES - b);
+ UCHAR *p1 = (UCHAR *) (buf1 + page_size - 512 * CHARBYTES);
+ UCHAR *p2 = (UCHAR *) (buf2 + page_size - 512 * CHARBYTES);
for (size_t n = 0; n < ITERATIONS; n++)
{
+ /* for wcscmp case align1 and align2 mean here alignment
+ in wchar_t symbols, it equal 4*k alignment in bytes, we
+ don't check other alignments like for example
+ p1 = (wchar_t *)(buf1 + 1)
+ because it's wrong using of wchar_t type. */
size_t align1 = random () & 31;
size_t align2;
if (random () & 1)
@@ -230,7 +278,7 @@ do_random_tests (void)
}
int result = 0;
- MEMCPY ((CHAR *) (p2 + align2), (CHAR *) (p1 + align1), pos);
+ MEMCPY (p2 + align2, p1 + align1, pos);
if (pos < len1)
{
if (p2[align2 + pos] == p1[align1 + pos])
@@ -258,13 +306,12 @@ do_random_tests (void)
|| (r < 0 && result >= 0)
|| (r > 0 && result <= 0))
{
- error (0, 0, "Iteration %zd - wrong result in function %s (%zd, %zd, %zd, %zd, %zd) %d != %d, p1 %p p2 %p",
+ error (0, 0, "Iteration %zd - wrong result in function %s (align in bytes: %zd, align in bytes: %zd, len1: %zd, len2: %zd, pos: %zd) %d != %d, p1 %p p2 %p",
n, impl->name, (size_t) (p1 + align1) & 63, (size_t) (p1 + align2) & 63, len1, len2, pos, r, result, p1, p2);
ret = 1;
}
}
- }
- }
+ }
}
static void
@@ -276,14 +323,31 @@ check (void)
STRCPY(s1, L("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrs"));
STRCPY(s2, L("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijkLMNOPQRSTUV"));
+ /* Check correct working for negatives values */
+
+ s1[0] = 1;
+ s2[0] = 1;
+ s1[1] = 1;
+ s2[1] = 1;
+ s1[2] = -1;
+ s2[2] = 3;
+ s1[3] = 0;
+ s2[3] = -1;
+
+ /* Check possible overflow bug, actual more for wcscmp */
+
+ s1[7] = CHAR__MIN;
+ s2[7] = CHAR__MAX;
+
size_t l1 = STRLEN (s1);
size_t l2 = STRLEN (s2);
+
for (size_t i1 = 0; i1 < l1; i1++)
for (size_t i2 = 0; i2 < l2; i2++)
{
- int exp_result = SIMPLE_STRCMP (s1 + i1, s2 + i2);
- FOR_EACH_IMPL (impl, 0)
- check_result (impl, s1 + i1, s2 + i2, exp_result);
+ int exp_result = SIMPLE_STRCMP (s1 + i1, s2 + i2);
+ FOR_EACH_IMPL (impl, 0)
+ check_result (impl, s1 + i1, s2 + i2, exp_result);
}
}
diff --git a/string/test-strcpy.c b/string/test-strcpy.c
index 6a2ea2510e..01a46de3c3 100644
--- a/string/test-strcpy.c
+++ b/string/test-strcpy.c
@@ -1,7 +1,8 @@
/* Test and measure strcpy functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
+ Added wcscpy support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -18,29 +19,55 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifdef WIDE
+# include <wchar.h>
+# define CHAR wchar_t
+# define UCHAR wchar_t
+# define BIG_CHAR WCHAR_MAX
+# define SMALL_CHAR 1273
+# define STRCMP wcscmp
+# define MEMCMP wmemcmp
+# define MEMSET wmemset
+#else
+# define CHAR char
+# define UCHAR unsigned char
+# define BIG_CHAR CHAR_MAX
+# define SMALL_CHAR 127
+# define STRCMP strcmp
+# define MEMCMP memcmp
+# define MEMSET memset
+#endif
+
#ifndef STRCPY_RESULT
# define STRCPY_RESULT(dst, len) dst
# define TEST_MAIN
# include "test-string.h"
+# ifndef WIDE
+# define SIMPLE_STRCPY simple_strcpy
+# define STRCPY strcpy
+# else
+# define SIMPLE_STRCPY simple_wcscpy
+# define STRCPY wcscpy
+# endif
-char *simple_strcpy (char *, const char *);
+CHAR *SIMPLE_STRCPY (CHAR *, const CHAR *);
-IMPL (simple_strcpy, 0)
-IMPL (strcpy, 1)
+IMPL (SIMPLE_STRCPY, 0)
+IMPL (STRCPY, 1)
-char *
-simple_strcpy (char *dst, const char *src)
+CHAR *
+SIMPLE_STRCPY (CHAR *dst, const CHAR *src)
{
- char *ret = dst;
+ CHAR *ret = dst;
while ((*dst++ = *src++) != '\0');
return ret;
}
#endif
-typedef char *(*proto_t) (char *, const char *);
+typedef CHAR *(*proto_t) (CHAR *, const CHAR *);
static void
-do_one_test (impl_t *impl, char *dst, const char *src,
+do_one_test (impl_t *impl, CHAR *dst, const CHAR *src,
size_t len __attribute__((unused)))
{
if (CALL (impl, dst, src) != STRCPY_RESULT (dst, len))
@@ -51,7 +78,7 @@ do_one_test (impl_t *impl, char *dst, const char *src,
return;
}
- if (strcmp (dst, src) != 0)
+ if (STRCMP (dst, src) != 0)
{
error (0, 0, "Wrong result in function %s dst \"%s\" src \"%s\"",
impl->name, dst, src);
@@ -82,25 +109,27 @@ static void
do_test (size_t align1, size_t align2, size_t len, int max_char)
{
size_t i;
- char *s1, *s2;
-
+ CHAR *s1, *s2;
+/* For wcscpy: align1 and align2 here mean alignment not in bytes,
+ but in wchar_ts, in bytes it will equal to align * (sizeof (wchar_t))
+ len for wcschr here isn't in bytes but it's number of wchar_t symbols. */
align1 &= 7;
- if (align1 + len >= page_size)
+ if ((align1 + len) * sizeof(CHAR) >= page_size)
return;
align2 &= 7;
- if (align2 + len >= page_size)
+ if ((align2 + len) * sizeof(CHAR) >= page_size)
return;
- s1 = (char *) (buf1 + align1);
- s2 = (char *) (buf2 + align2);
+ s1 = (CHAR *) (buf1) + align1;
+ s2 = (CHAR *) (buf2) + align2;
for (i = 0; i < len; i++)
s1[i] = 32 + 23 * i % (max_char - 32);
s1[len] = 0;
if (HP_TIMING_AVAIL)
- printf ("Length %4zd, alignment %2zd/%2zd:", len, align1, align2);
+ printf ("Length %4zd, alignments in bytes %2zd/%2zd:", len, align1 * sizeof(CHAR), align2 * sizeof(CHAR));
FOR_EACH_IMPL (impl, 0)
do_one_test (impl, s2, s1, len);
@@ -113,15 +142,21 @@ static void
do_random_tests (void)
{
size_t i, j, n, align1, align2, len;
- unsigned char *p1 = buf1 + page_size - 512;
- unsigned char *p2 = buf2 + page_size - 512;
- unsigned char *res;
+ UCHAR *p1 = (UCHAR *) (buf1 + page_size) - 512;
+ UCHAR *p2 = (UCHAR *) (buf2 + page_size) - 512;
+ UCHAR *res;
for (n = 0; n < ITERATIONS; n++)
{
- align1 = random () & 31;
+ /* For wcsrchr: align1 and align2 here mean align not in bytes,
+ but in wchar_ts, in bytes it will equal to align * (sizeof
+ (wchar_t)). For strrchr we need to check all alignments from
+ 0 to 63 since some assembly implementations have separate
+ prolog for alignments more 48. */
+
+ align1 = random () & (63 / sizeof(CHAR));
if (random () & 1)
- align2 = random () & 31;
+ align2 = random () & (63 / sizeof(CHAR));
else
align2 = align1 + (random () & 24);
len = random () & 511;
@@ -139,17 +174,16 @@ do_random_tests (void)
p1[i] = 0;
else
{
- p1[i] = random () & 255;
+ p1[i] = random () & BIG_CHAR;
if (i >= align1 && i < len + align1 && !p1[i])
- p1[i] = (random () & 127) + 3;
+ p1[i] = (random () & SMALL_CHAR) + 3;
}
}
FOR_EACH_IMPL (impl, 1)
{
- memset (p2 - 64, '\1', 512 + 64);
- res = (unsigned char *) CALL (impl, (char *) (p2 + align2),
- (char *) (p1 + align1));
+ MEMSET (p2 - 64, '\1', 512 + 64);
+ res = (UCHAR *) CALL (impl, (CHAR *) (p2 + align2), (CHAR *) (p1 + align1));
if (res != STRCPY_RESULT (p2 + align2, len))
{
error (0, 0, "Iteration %zd - wrong result in function %s (%zd, %zd, %zd) %p != %p",
@@ -177,7 +211,7 @@ do_random_tests (void)
break;
}
}
- if (memcmp (p1 + align1, p2 + align2, len + 1))
+ if (MEMCMP (p1 + align1, p2 + align2, len + 1))
{
error (0, 0, "Iteration %zd - different strings, %s (%zd, %zd, %zd)",
n, impl->name, align1, align2, len);
@@ -201,24 +235,24 @@ test_main (void)
for (i = 0; i < 16; ++i)
{
- do_test (0, 0, i, 127);
- do_test (0, 0, i, 255);
- do_test (0, i, i, 127);
- do_test (i, 0, i, 255);
+ do_test (0, 0, i, SMALL_CHAR);
+ do_test (0, 0, i, BIG_CHAR);
+ do_test (0, i, i, SMALL_CHAR);
+ do_test (i, 0, i, BIG_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (0, 0, 8 << i, 127);
- do_test (8 - i, 2 * i, 8 << i, 127);
+ do_test (0, 0, 8 << i, SMALL_CHAR);
+ do_test (8 - i, 2 * i, 8 << i, SMALL_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (i, 2 * i, 8 << i, 127);
- do_test (2 * i, i, 8 << i, 255);
- do_test (i, i, 8 << i, 127);
- do_test (i, i, 8 << i, 255);
+ do_test (i, 2 * i, 8 << i, SMALL_CHAR);
+ do_test (2 * i, i, 8 << i, BIG_CHAR);
+ do_test (i, i, 8 << i, SMALL_CHAR);
+ do_test (i, i, 8 << i, BIG_CHAR);
}
do_random_tests ();
diff --git a/string/test-string.h b/string/test-string.h
index e384940469..8bfafdff0f 100644
--- a/string/test-string.h
+++ b/string/test-string.h
@@ -1,5 +1,5 @@
/* Test and measure string and memory functions.
- Copyright (C) 1999, 2002, 2004, 2008, 2011 Free Software Foundation, Inc.
+ Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -45,6 +45,7 @@ extern impl_t __start_impls[], __stop_impls[];
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
+#include <sys/param.h>
#include <unistd.h>
#include <fcntl.h>
#include <error.h>
diff --git a/string/test-strlen.c b/string/test-strlen.c
index e01befbf46..f12d3ba9d3 100644
--- a/string/test-strlen.c
+++ b/string/test-strlen.c
@@ -1,7 +1,8 @@
-/* Test and measure strlen functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Test and measure STRLEN functions.
+ Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
+ Added wcslen support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -21,31 +22,43 @@
#define TEST_MAIN
#include "test-string.h"
-typedef size_t (*proto_t) (const char *);
-size_t simple_strlen (const char *);
-size_t builtin_strlen (const char *);
+#ifndef WIDE
+# define STRLEN strlen
+# define CHAR char
+# define MAX_CHAR CHAR_MAX
+#else
+# include <wchar.h>
+# define STRLEN wcslen
+# define CHAR wchar_t
+# define MAX_CHAR WCHAR_MAX
+#endif
-IMPL (simple_strlen, 0)
-IMPL (builtin_strlen, 0)
-IMPL (strlen, 1)
+typedef size_t (*proto_t) (const CHAR *);
size_t
-simple_strlen (const char *s)
+simple_STRLEN (const CHAR *s)
{
- const char *p;
+ const CHAR *p;
for (p = s; *p; ++p);
return p - s;
}
+#ifndef WIDE
size_t
-builtin_strlen (const char *p)
+builtin_strlen (const CHAR *p)
{
return __builtin_strlen (p);
}
+IMPL (builtin_strlen, 0)
+#endif
+
+IMPL (simple_STRLEN, 0)
+IMPL (STRLEN, 1)
+
static void
-do_one_test (impl_t *impl, const char *s, size_t exp_len)
+do_one_test (impl_t *impl, const CHAR *s, size_t exp_len)
{
size_t len = CALL (impl, s);
if (len != exp_len)
@@ -76,23 +89,25 @@ do_one_test (impl_t *impl, const char *s, size_t exp_len)
}
static void
-do_test (size_t align, size_t len, int max_char)
+do_test (size_t align, size_t len)
{
size_t i;
- align &= 7;
- if (align + len >= page_size)
+ align &= 63;
+ if (align + sizeof(CHAR) * len >= page_size)
return;
+ CHAR *buf = (CHAR *) (buf1);
+
for (i = 0; i < len; ++i)
- buf1[align + i] = 1 + 7 * i % max_char;
- buf1[align + len] = 0;
+ buf[align + i] = 1 + 11111 * i % MAX_CHAR;
+ buf[align + len] = 0;
if (HP_TIMING_AVAIL)
printf ("Length %4zd, alignment %2zd:", len, align);
FOR_EACH_IMPL (impl, 0)
- do_one_test (impl, (char *) (buf1 + align), len);
+ do_one_test (impl, (CHAR *) (buf + align), len);
if (HP_TIMING_AVAIL)
putchar ('\n');
@@ -102,7 +117,7 @@ static void
do_random_tests (void)
{
size_t i, j, n, align, len;
- unsigned char *p = buf1 + page_size - 512;
+ CHAR *p = (CHAR *) (buf1 + page_size - 512 * sizeof(CHAR));
for (n = 0; n < ITERATIONS; n++)
{
@@ -127,10 +142,10 @@ do_random_tests (void)
}
FOR_EACH_IMPL (impl, 1)
- if (CALL (impl, (char *) (p + align)) != len)
+ if (CALL (impl, (CHAR *) (p + align)) != len)
{
error (0, 0, "Iteration %zd - wrong result in function %s (%zd) %zd != %zd, p %p",
- n, impl->name, align, CALL (impl, (char *) (p + align)),
+ n, impl->name, align, CALL (impl, (CHAR *) (p + align)),
len, p);
ret = 1;
}
@@ -149,28 +164,20 @@ test_main (void)
printf ("\t%s", impl->name);
putchar ('\n');
- for (i = 1; i < 8; ++i)
- do_test (0, i, 127);
-
- for (i = 1; i < 8; ++i)
- do_test (i, i, 127);
-
- for (i = 2; i <= 10; ++i)
- {
- do_test (0, 1 << i, 127);
- do_test (1, 1 << i, 127);
- }
-
- for (i = 1; i < 8; ++i)
- do_test (0, i, 255);
+ /* Checking with only 4 * N alignments for wcslen, other alignments are wrong for wchar_t type arrays*/
for (i = 1; i < 8; ++i)
- do_test (i, i, 255);
+ {
+ do_test (sizeof(CHAR) * i, i);
+ do_test (0, i);
+ }
- for (i = 2; i <= 10; ++i)
+ for (i = 2; i <= 12; ++i)
{
- do_test (0, 1 << i, 255);
- do_test (1, 1 << i, 255);
+ do_test (0, 1 << i);
+ do_test (sizeof(CHAR) * 7, 1 << i);
+ do_test (sizeof(CHAR) * i, 1 << i);
+ do_test (sizeof(CHAR) * i, (size_t)((1 << i) / 1.5));
}
do_random_tests ();
diff --git a/string/test-strrchr.c b/string/test-strrchr.c
index 92e8ab1bb1..484c2f302a 100644
--- a/string/test-strrchr.c
+++ b/string/test-strrchr.c
@@ -1,7 +1,9 @@
-/* Test and measure strrchr functions.
- Copyright (C) 1999, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Test and measure STRCHR functions.
+ Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
+ Added wcsrrchr support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>,
+ 2011.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -21,28 +23,45 @@
#define TEST_MAIN
#include "test-string.h"
-typedef char *(*proto_t) (const char *, int);
-char *simple_strrchr (const char *, int);
-
-IMPL (simple_strrchr, 0)
-IMPL (strrchr, 1)
-
-char *
-simple_strrchr (const char *s, int c)
+#ifdef WIDE
+# include <wchar.h>
+# define SIMPLE_STRRCHR simple_wcsrchr
+# define STRRCHR wcsrchr
+# define CHAR wchar_t
+# define UCHAR wchar_t
+# define BIG_CHAR WCHAR_MAX
+# define SMALL_CHAR 1273
+#else
+# define SIMPLE_STRRCHR simple_strrchr
+# define STRRCHR strrchr
+# define CHAR char
+# define UCHAR unsigned char
+# define BIG_CHAR CHAR_MAX
+# define SMALL_CHAR 127
+#endif
+
+typedef CHAR *(*proto_t) (const CHAR *, int);
+CHAR *SIMPLE_STRRCHR (const CHAR *, int);
+
+IMPL (SIMPLE_STRRCHR, 0)
+IMPL (STRRCHR, 1)
+
+CHAR *
+SIMPLE_STRRCHR (const CHAR *s, int c)
{
- const char *ret = NULL;
+ const CHAR *ret = NULL;
for (; *s != '\0'; ++s)
- if (*s == (char) c)
+ if (*s == (CHAR) c)
ret = s;
- return (char *) (c == '\0' ? s : ret);
+ return (CHAR *) (c == '\0' ? s : ret);
}
static void
-do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
+do_one_test (impl_t *impl, const CHAR *s, int c, CHAR *exp_res)
{
- char *res = CALL (impl, s, c);
+ CHAR *res = CALL (impl, s, c);
if (res != exp_res)
{
error (0, 0, "Wrong result in function %s %p %p", impl->name,
@@ -72,41 +91,45 @@ do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
static void
do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
+/* For wcsrchr: align here means align not in bytes,
+ but in wchar_ts, in bytes it will equal to align * (sizeof (wchar_t))
+ len for wcschr here isn't in bytes but it's number of wchar_t symbols. */
{
size_t i;
- char *result;
+ CHAR *result;
+ CHAR *buf = (CHAR *) buf1;
align &= 7;
- if (align + len >= page_size)
+ if ( (align + len) * sizeof(CHAR) >= page_size)
return;
for (i = 0; i < len; ++i)
{
- buf1[align + i] = random () & max_char;
- if (!buf1[align + i])
- buf1[align + i] = random () & max_char;
- if (!buf1[align + i])
- buf1[align + i] = 1;
- if ((i > pos || pos >= len) && buf1[align + i] == seek_char)
- buf1[align + i] = seek_char + 10 + (random () & 15);
+ buf[align + i] = (random () * random ()) & max_char;
+ if (!buf[align + i])
+ buf[align + i] = (random () * random ()) & max_char;
+ if (!buf[align + i])
+ buf[align + i] = 1;
+ if ((i > pos || pos >= len) && buf[align + i] == seek_char)
+ buf[align + i] = seek_char + 10 + (random () & 15);
}
- buf1[align + len] = 0;
+ buf[align + len] = 0;
if (pos < len)
{
- buf1[align + pos] = seek_char;
- result = (char *) (buf1 + align + pos);
+ buf[align + pos] = seek_char;
+ result = (CHAR *) (buf + align + pos);
}
else if (seek_char == 0)
- result = (char *) (buf1 + align + len);
+ result = (CHAR *) (buf + align + len);
else
result = NULL;
if (HP_TIMING_AVAIL)
- printf ("Length %4zd, alignment %2zd:", pos, align);
+ printf ("Length %4zd, alignment in bytes %2zd:", pos, align * sizeof(CHAR));
FOR_EACH_IMPL (impl, 0)
- do_one_test (impl, (char *) (buf1 + align), seek_char, result);
+ do_one_test (impl, (CHAR *) (buf + align), seek_char, result);
if (HP_TIMING_AVAIL)
putchar ('\n');
@@ -117,20 +140,27 @@ do_random_tests (void)
{
size_t i, j, n, align, pos, len;
int seek_char;
- char *result;
- unsigned char *p = buf1 + page_size - 512;
+ CHAR *result;
+ UCHAR *p = (UCHAR *) (buf1 + page_size) - 512;
for (n = 0; n < ITERATIONS; n++)
{
- align = random () & 15;
+ align = random () & (63 / sizeof(CHAR));
+ /* For wcsrchr: align here means align not in bytes, but in wchar_ts,
+ in bytes it will equal to align * (sizeof (wchar_t)).
+ For strrchr we need to check all alignments from 0 to 63 since
+ some assembly implementations have separate prolog for alignments
+ more 48. */
pos = random () & 511;
if (pos + align >= 511)
pos = 510 - align - (random () & 7);
len = random () & 511;
+ /* len for wcschr here isn't in bytes but it's number of wchar_t
+ symbols. */
if (pos >= len)
len = pos + (random () & 7);
if (len + align >= 512)
- len = 511 - align - (random () & 7);
+ len = 511 - align - (random () & 7);
seek_char = random () & 255;
if (seek_char && pos == len)
{
@@ -141,7 +171,7 @@ do_random_tests (void)
}
j = len + align + 64;
if (j > 512)
- j = 512;
+ j = 512;
for (i = 0; i < j; i++)
{
@@ -165,18 +195,18 @@ do_random_tests (void)
}
if (pos <= len)
- result = (char *) (p + pos + align);
+ result = (CHAR *) (p + pos + align);
else if (seek_char == 0)
- result = (char *) (p + len + align);
+ result = (CHAR *) (p + len + align);
else
result = NULL;
FOR_EACH_IMPL (impl, 1)
- if (CALL (impl, (char *) (p + align), seek_char) != result)
+ if (CALL (impl, (CHAR *) (p + align), seek_char) != result)
{
error (0, 0, "Iteration %zd - wrong result in function %s (%zd, %d, %zd, %zd) %p != %p, p %p",
n, impl->name, align, seek_char, len, pos,
- CALL (impl, (char *) (p + align), seek_char), result, p);
+ CALL (impl, (CHAR *) (p + align), seek_char), result, p);
ret = 1;
}
}
@@ -196,38 +226,38 @@ test_main (void)
for (i = 1; i < 8; ++i)
{
- do_test (0, 16 << i, 2048, 23, 127);
- do_test (i, 16 << i, 2048, 23, 127);
+ do_test (0, 16 << i, 2048, 23, SMALL_CHAR);
+ do_test (i, 16 << i, 2048, 23, SMALL_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (i, 64, 256, 23, 127);
- do_test (i, 64, 256, 23, 255);
+ do_test (i, 64, 256, 23, SMALL_CHAR);
+ do_test (i, 64, 256, 23, BIG_CHAR);
}
for (i = 0; i < 32; ++i)
{
- do_test (0, i, i + 1, 23, 127);
- do_test (0, i, i + 1, 23, 255);
+ do_test (0, i, i + 1, 23, SMALL_CHAR);
+ do_test (0, i, i + 1, 23, BIG_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (0, 16 << i, 2048, 0, 127);
- do_test (i, 16 << i, 2048, 0, 127);
+ do_test (0, 16 << i, 2048, 0, SMALL_CHAR);
+ do_test (i, 16 << i, 2048, 0, SMALL_CHAR);
}
for (i = 1; i < 8; ++i)
{
- do_test (i, 64, 256, 0, 127);
- do_test (i, 64, 256, 0, 255);
+ do_test (i, 64, 256, 0, SMALL_CHAR);
+ do_test (i, 64, 256, 0, BIG_CHAR);
}
for (i = 0; i < 32; ++i)
{
- do_test (0, i, i + 1, 0, 127);
- do_test (0, i, i + 1, 0, 255);
+ do_test (0, i, i + 1, 0, SMALL_CHAR);
+ do_test (0, i, i + 1, 0, BIG_CHAR);
}
do_random_tests ();
diff --git a/sunrpc/clnt_tcp.c b/sunrpc/clnt_tcp.c
index 7cfbe9e8dd..d1fc43dbfd 100644
--- a/sunrpc/clnt_tcp.c
+++ b/sunrpc/clnt_tcp.c
@@ -364,6 +364,8 @@ static bool_t
clnttcp_control (CLIENT *cl, int request, char *info)
{
struct ct_data *ct = (struct ct_data *) cl->cl_private;
+ u_long *mcall_ptr;
+ u_long ul;
switch (request)
@@ -393,11 +395,24 @@ clnttcp_control (CLIENT *cl, int request, char *info)
* first element in the call structure *.
* This will get the xid of the PREVIOUS call
*/
+#if 0
+ /* This original code has aliasing issues. */
*(u_long *)info = ntohl (*(u_long *)ct->ct_mcall);
+#else
+ mcall_ptr = (u_long *)ct->ct_mcall;
+ ul = ntohl (*mcall_ptr);
+ memcpy (info, &ul, sizeof (ul));
+#endif
break;
case CLSET_XID:
/* This will set the xid of the NEXT call */
+#if 0
+ /* This original code has aliasing issues. */
*(u_long *)ct->ct_mcall = htonl (*(u_long *)info - 1);
+#else
+ ul = ntohl (*(u_long *)info - 1);
+ memcpy (ct->ct_mcall, &ul, sizeof (ul));
+#endif
/* decrement by 1 as clnttcp_call() increments once */
break;
case CLGET_VERS:
diff --git a/sunrpc/clnt_udp.c b/sunrpc/clnt_udp.c
index babee9abfd..294e13a58c 100644
--- a/sunrpc/clnt_udp.c
+++ b/sunrpc/clnt_udp.c
@@ -473,8 +473,7 @@ send_again:
/* see if reply transaction id matches sent id.
Don't do this if we only wait for a replay */
if (xargs != NULL
- && (*((u_int32_t *) (cu->cu_inbuf))
- != *((u_int32_t *) (cu->cu_outbuf))))
+ && memcmp (cu->cu_inbuf, cu->cu_outbuf, sizeof (u_int32_t)) != 0)
continue;
/* we now assume we have the proper reply */
break;
diff --git a/sunrpc/clnt_unix.c b/sunrpc/clnt_unix.c
index 62dc8c604b..282127bb8b 100644
--- a/sunrpc/clnt_unix.c
+++ b/sunrpc/clnt_unix.c
@@ -338,7 +338,8 @@ static bool_t
clntunix_control (CLIENT *cl, int request, char *info)
{
struct ct_data *ct = (struct ct_data *) cl->cl_private;
-
+ u_long *mcall_ptr;
+ u_long ul;
switch (request)
{
@@ -366,11 +367,24 @@ clntunix_control (CLIENT *cl, int request, char *info)
* first element in the call structure *.
* This will get the xid of the PREVIOUS call
*/
+#if 0
+ /* This original code has aliasing issues. */
*(u_long *) info = ntohl (*(u_long *)ct->ct_mcall);
+#else
+ mcall_ptr = (u_long *)ct->ct_mcall;
+ ul = ntohl (*mcall_ptr);
+ memcpy (info, &ul, sizeof (ul));
+#endif
break;
case CLSET_XID:
/* This will set the xid of the NEXT call */
+#if 0
+ /* This original code has aliasing issues. */
*(u_long *) ct->ct_mcall = htonl (*(u_long *)info - 1);
+#else
+ ul = ntohl (*(u_long *)info - 1);
+ memcpy (ct->ct_mcall, &ul, sizeof (ul));
+#endif
/* decrement by 1 as clntunix_call() increments once */
break;
case CLGET_VERS:
diff --git a/sunrpc/rpc_prot.c b/sunrpc/rpc_prot.c
index b19dff7656..9a23cc1b02 100644
--- a/sunrpc/rpc_prot.c
+++ b/sunrpc/rpc_prot.c
@@ -214,7 +214,7 @@ rejected (enum reject_stat rjct_stat,
{
switch (rjct_stat)
{
- case RPC_VERSMISMATCH:
+ case RPC_MISMATCH:
error->re_status = RPC_VERSMISMATCH;
return;
case AUTH_ERROR:
diff --git a/sysdeps/generic/dl-hash.h b/sysdeps/generic/dl-hash.h
index 243ae14b51..e0db00edc3 100644
--- a/sysdeps/generic/dl-hash.h
+++ b/sysdeps/generic/dl-hash.h
@@ -1,5 +1,5 @@
/* Compute hash value for given string according to ELF standard.
- Copyright (C) 1995,1996,1997,1998,2003,2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-1998,2003,2005,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -25,46 +25,47 @@
first five operations no overflow is possible so we optimized it a
bit. */
static unsigned int
+__attribute__ ((unused))
_dl_elf_hash (const char *name_arg)
{
const unsigned char *name = (const unsigned char *) name_arg;
- unsigned long int hash = 0;
- if (*name != '\0')
+ unsigned long int hash = *name;
+ if (hash != 0 && name[1] != '\0')
{
- hash = *name++;
- if (*name != '\0')
+ hash = (hash << 4) + name[1];
+ if (name[2] != '\0')
{
- hash = (hash << 4) + *name++;
- if (*name != '\0')
+ hash = (hash << 4) + name[2];
+ if (name[3] != '\0')
{
- hash = (hash << 4) + *name++;
- if (*name != '\0')
+ hash = (hash << 4) + name[3];
+ if (name[4] != '\0')
{
- hash = (hash << 4) + *name++;
- if (*name != '\0')
+ hash = (hash << 4) + name[4];
+ name += 5;
+ while (*name != '\0')
{
+ unsigned long int hi;
hash = (hash << 4) + *name++;
- while (*name != '\0')
- {
- unsigned long int hi;
- hash = (hash << 4) + *name++;
- hi = hash & 0xf0000000;
+ hi = hash & 0xf0000000;
- /* The algorithm specified in the ELF ABI is as
- follows:
+ /* The algorithm specified in the ELF ABI is as
+ follows:
- if (hi != 0)
- hash ^= hi >> 24;
+ if (hi != 0)
+ hash ^= hi >> 24;
- hash &= ~hi;
+ hash &= ~hi;
- But the following is equivalent and a lot
- faster, especially on modern processors. */
+ But the following is equivalent and a lot
+ faster, especially on modern processors. */
- hash ^= hi;
- hash ^= hi >> 24;
- }
+ hash ^= hi >> 24;
}
+
+ /* Second part of the modified formula. This
+ operation can be lifted outside the loop. */
+ hash &= 0x0fffffff;
}
}
}
diff --git a/sysdeps/generic/dwarf2.h b/sysdeps/generic/dwarf2.h
index 9fca4c00e0..26ceef68c0 100644
--- a/sysdeps/generic/dwarf2.h
+++ b/sysdeps/generic/dwarf2.h
@@ -1,6 +1,6 @@
/* Declarations and definitions of codes relating to the DWARF2 symbolic
debugging information format.
- Copyright (C) 1992, 1993, 1995, 1996, 1997, 2000
+ Copyright (C) 1992, 1993, 1995, 1996, 1997, 2000, 2011
Free Software Foundation, Inc.
Contributed by Gary Funck (gary@intrepid.com). Derived from the
DWARF 1 implementation written by Ron Guilmette (rfg@monkeys.com).
@@ -22,6 +22,9 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifndef _DWARF2_H
+#define _DWARF2_H 1
+
/* This file is derived from the DWARF specification (a public document)
Revision 2.0.0 (July 27, 1993) developed by the UNIX International
Programming Languages Special Interest Group (UI/PLSIG) and distributed
@@ -31,6 +34,7 @@
/* This file is shared between GCC and GDB, and should not contain
prototypes. */
+#ifndef __ASSEMBLER__
/* Tag names and codes. */
enum dwarf_tag
@@ -560,6 +564,7 @@ enum dwarf_macinfo_record_type
DW_MACINFO_vendor_ext = 255
};
+#endif /* !ASSEMBLER */
/* @@@ For use with GNU frame unwind information. */
@@ -583,3 +588,5 @@ enum dwarf_macinfo_record_type
#define DW_EH_PE_aligned 0x50
#define DW_EH_PE_indirect 0x80
+
+#endif /* dwarf2.h */
diff --git a/sysdeps/generic/sysdep.h b/sysdeps/generic/sysdep.h
index 54884d9afe..eecbd731f6 100644
--- a/sysdeps/generic/sysdep.h
+++ b/sysdeps/generic/sysdep.h
@@ -1,5 +1,6 @@
/* Generic asm macros used on many machines.
- Copyright (C) 1991,92,93,96,98,2002,2003,2009 Free Software Foundation, Inc.
+ Copyright (C) 1991-1993,96,98,2002,2003,2009,2011
+ 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
@@ -20,19 +21,19 @@
#ifndef C_LABEL
/* Define a macro we can use to construct the asm name for a C symbol. */
-#ifdef NO_UNDERSCORES
-#ifdef __STDC__
-#define C_LABEL(name) name##:
-#else
-#define C_LABEL(name) name/**/:
-#endif
-#else
-#ifdef __STDC__
-#define C_LABEL(name) _##name##:
-#else
-#define C_LABEL(name) _/**/name/**/:
-#endif
-#endif
+# ifdef NO_UNDERSCORES
+# ifdef __STDC__
+# define C_LABEL(name) name##:
+# else
+# define C_LABEL(name) name/**/:
+# endif
+# else
+# ifdef __STDC__
+# define C_LABEL(name) _##name##:
+# else
+# define C_LABEL(name) _/**/name/**/:
+# endif
+# endif
#endif
@@ -40,15 +41,17 @@
/* Mark the end of function named SYM. This is used on some platforms
to generate correct debugging information. */
# ifndef END
-# define END(sym)
+# define END(sym)
# endif
# ifndef JUMPTARGET
-# define JUMPTARGET(sym) sym
+# define JUMPTARGET(sym) sym
# endif
+#endif
/* Makros to generate eh_frame unwind information. */
-# ifdef HAVE_ASM_CFI_DIRECTIVES
+#ifdef HAVE_ASM_CFI_DIRECTIVES
+# ifdef __ASSEMBLER__
# define cfi_startproc .cfi_startproc
# define cfi_endproc .cfi_endproc
# define cfi_def_cfa(reg, off) .cfi_def_cfa reg, off
@@ -67,29 +70,9 @@
# define cfi_window_save .cfi_window_save
# define cfi_personality(enc, exp) .cfi_personality enc, exp
# define cfi_lsda(enc, exp) .cfi_lsda enc, exp
-# else
-# define cfi_startproc
-# define cfi_endproc
-# define cfi_def_cfa(reg, off)
-# define cfi_def_cfa_register(reg)
-# define cfi_def_cfa_offset(off)
-# define cfi_adjust_cfa_offset(off)
-# define cfi_offset(reg, off)
-# define cfi_rel_offset(reg, off)
-# define cfi_register(r1, r2)
-# define cfi_return_column(reg)
-# define cfi_restore(reg)
-# define cfi_same_value(reg)
-# define cfi_undefined(reg)
-# define cfi_remember_state
-# define cfi_restore_state
-# define cfi_window_save
-# define cfi_personality(enc, exp)
-# define cfi_lsda(enc, exp)
-# endif
-#else /* ! ASSEMBLER */
-# ifdef HAVE_ASM_CFI_DIRECTIVES
+# else /* ! ASSEMBLER */
+
# define CFI_STRINGIFY(Name) CFI_STRINGIFY2 (Name)
# define CFI_STRINGIFY2(Name) #Name
# define CFI_STARTPROC ".cfi_startproc"
@@ -124,43 +107,27 @@
".cfi_personality " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
# define CFI_LSDA(enc, exp) \
".cfi_lsda " CFI_STRINGIFY(enc) "," CFI_STRINGIFY(exp)
-# else
-# define CFI_STARTPROC
-# define CFI_ENDPROC
-# define CFI_DEF_CFA(reg, off)
-# define CFI_DEF_CFA_REGISTER(reg)
-# define CFI_DEF_CFA_OFFSET(off)
-# define CFI_ADJUST_CFA_OFFSET(off)
-# define CFI_OFFSET(reg, off)
-# define CFI_REL_OFFSET(reg, off)
-# define CFI_REGISTER(r1, r2)
-# define CFI_RETURN_COLUMN(reg)
-# define CFI_RESTORE(reg)
-# define CFI_UNDEFINED(reg)
-# define CFI_REMEMBER_STATE
-# define CFI_RESTORE_STATE
-# define CFI_WINDOW_SAVE
-# define CFI_PERSONALITY(enc, exp)
-# define CFI_LSDA(enc, exp)
# endif
-#endif /* __ASSEMBLER__ */
+#else
+
+# define CFI_STARTPROC
+# define CFI_ENDPROC
+# define CFI_DEF_CFA(reg, off)
+# define CFI_DEF_CFA_REGISTER(reg)
+# define CFI_DEF_CFA_OFFSET(off)
+# define CFI_ADJUST_CFA_OFFSET(off)
+# define CFI_OFFSET(reg, off)
+# define CFI_REL_OFFSET(reg, off)
+# define CFI_REGISTER(r1, r2)
+# define CFI_RETURN_COLUMN(reg)
+# define CFI_RESTORE(reg)
+# define CFI_UNDEFINED(reg)
+# define CFI_REMEMBER_STATE
+# define CFI_RESTORE_STATE
+# define CFI_WINDOW_SAVE
+# define CFI_PERSONALITY(enc, exp)
+# define CFI_LSDA(enc, exp)
+#endif
-/* Values used for encoding parameter of cfi_personality and cfi_lsda. */
-#define DW_EH_PE_absptr 0x00
-#define DW_EH_PE_omit 0xff
-#define DW_EH_PE_uleb128 0x01
-#define DW_EH_PE_udata2 0x02
-#define DW_EH_PE_udata4 0x03
-#define DW_EH_PE_udata8 0x04
-#define DW_EH_PE_sleb128 0x09
-#define DW_EH_PE_sdata2 0x0a
-#define DW_EH_PE_sdata4 0x0b
-#define DW_EH_PE_sdata8 0x0c
-#define DW_EH_PE_signed 0x08
-#define DW_EH_PE_pcrel 0x10
-#define DW_EH_PE_textrel 0x20
-#define DW_EH_PE_datarel 0x30
-#define DW_EH_PE_funcrel 0x40
-#define DW_EH_PE_aligned 0x50
-#define DW_EH_PE_indirect 0x80
+#include "dwarf2.h"
diff --git a/sysdeps/i386/bits/byteswap.h b/sysdeps/i386/bits/byteswap.h
index c246ae86c6..ddfb785c6e 100644
--- a/sysdeps/i386/bits/byteswap.h
+++ b/sysdeps/i386/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2006, 2007, 2008, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -109,15 +109,15 @@ __bswap_32 (unsigned int __bsx)
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
-#define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ull) >> 56) \
- | (((x) & 0x00ff000000000000ull) >> 40) \
- | (((x) & 0x0000ff0000000000ull) >> 24) \
- | (((x) & 0x000000ff00000000ull) >> 8) \
- | (((x) & 0x00000000ff000000ull) << 8) \
- | (((x) & 0x0000000000ff0000ull) << 24) \
- | (((x) & 0x000000000000ff00ull) << 40) \
- | (((x) & 0x00000000000000ffull) << 56))
+# define __bswap_constant_64(x) \
+ (__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56)))
# define __bswap_64(x) \
(__extension__ \
diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure
index 050ec11b8b..5d6f2b8b93 100644
--- a/sysdeps/i386/configure
+++ b/sysdeps/i386/configure
@@ -371,6 +371,29 @@ if test $libc_cv_cc_avx = yes; then
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FMA4 support" >&5
+$as_echo_n "checking for FMA4 support... " >&6; }
+if ${libc_cv_cc_fma4+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ if { ac_try='${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ libc_cv_cc_fma4=yes
+else
+ libc_cv_cc_fma4=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_fma4" >&5
+$as_echo "$libc_cv_cc_fma4" >&6; }
+if test $libc_cv_cc_fma4 = yes; then
+ $as_echo "#define HAVE_FMA4_SUPPORT 1" >>confdefs.h
+
+fi
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mno-vzeroupper support" >&5
$as_echo_n "checking for -mno-vzeroupper support... " >&6; }
if ${libc_cv_cc_novzeroupper+:} false; then :
diff --git a/sysdeps/i386/configure.in b/sysdeps/i386/configure.in
index 67fd1d7df1..5a9840e16c 100644
--- a/sysdeps/i386/configure.in
+++ b/sysdeps/i386/configure.in
@@ -67,6 +67,17 @@ if test $libc_cv_cc_avx = yes; then
AC_DEFINE(HAVE_AVX_SUPPORT)
fi
+dnl Check if -mfma4 works.
+AC_CACHE_CHECK(for FMA4 support, libc_cv_cc_fma4, [dnl
+if AC_TRY_COMMAND([${CC-cc} -mfma4 -xc /dev/null -S -o /dev/null]); then
+ libc_cv_cc_fma4=yes
+else
+ libc_cv_cc_fma4=no
+fi])
+if test $libc_cv_cc_fma4 = yes; then
+ AC_DEFINE(HAVE_FMA4_SUPPORT)
+fi
+
dnl Check if -mno-vzeroupper works.
AC_CACHE_CHECK(for -mno-vzeroupper support, libc_cv_cc_novzeroupper, [dnl
if AC_TRY_COMMAND([${CC-cc} -mno-vzeroupper -xc /dev/null -S -o /dev/null]); then
diff --git a/sysdeps/i386/fpu/bits/fenv.h b/sysdeps/i386/fpu/bits/fenv.h
index ef3fcb3840..8c00771cce 100644
--- a/sysdeps/i386/fpu/bits/fenv.h
+++ b/sysdeps/i386/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2000, 2011 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
@@ -88,3 +88,51 @@ fenv_t;
/* Floating-point environment where none of the exception is masked. */
# define FE_NOMASK_ENV ((__const fenv_t *) -2)
#endif
+
+
+#ifdef __USE_EXTERN_INLINES
+__BEGIN_DECLS
+
+/* Optimized versions. */
+extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
+__extern_inline int
+__NTH (feraiseexcept (int __excepts))
+{
+ if (__builtin_constant_p (__excepts)
+ && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
+ {
+ if ((FE_INVALID & __excepts) != 0)
+ {
+ /* One example of a invalid operation is 0.0 / 0.0. */
+ float __f = 0.0;
+
+# ifdef __SSE_MATH__
+ __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
+# else
+ __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait"
+ : "=t" (__f) : "0" (__f));
+# endif
+ (void) &__f;
+ }
+ if ((FE_DIVBYZERO & __excepts) != 0)
+ {
+ float __f = 1.0;
+ float __g = 0.0;
+
+# ifdef __SSE_MATH__
+ __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
+# else
+ __asm__ __volatile__ ("fdivp %%st(1), %%st; fwait"
+ : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
+# endif
+ (void) &__f;
+ }
+
+ return 0;
+ }
+
+ return __feraiseexcept_renamed (__excepts);
+}
+
+__END_DECLS
+#endif
diff --git a/sysdeps/i386/fpu/e_acos.S b/sysdeps/i386/fpu/e_acos.S
index b9d07b1091..d3505baf07 100644
--- a/sysdeps/i386/fpu/e_acos.S
+++ b/sysdeps/i386/fpu/e_acos.S
@@ -19,3 +19,4 @@ ENTRY(__ieee754_acos)
fpatan /* atan (sqrt(1 - x^2) / x) */
ret
END (__ieee754_acos)
+strong_alias (__ieee754_acos, __acos_finite)
diff --git a/sysdeps/i386/fpu/e_acosf.S b/sysdeps/i386/fpu/e_acosf.S
index 50b13fd1bd..6a843a51dd 100644
--- a/sysdeps/i386/fpu/e_acosf.S
+++ b/sysdeps/i386/fpu/e_acosf.S
@@ -20,3 +20,4 @@ ENTRY(__ieee754_acosf)
fpatan
ret
END (__ieee754_acosf)
+strong_alias (__ieee754_acosf, __acosf_finite)
diff --git a/sysdeps/i386/fpu/e_acosh.S b/sysdeps/i386/fpu/e_acosh.S
index 62a232471f..fc65c295c5 100644
--- a/sysdeps/i386/fpu/e_acosh.S
+++ b/sysdeps/i386/fpu/e_acosh.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -21,12 +21,12 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -101,3 +101,4 @@ ENTRY(__ieee754_acosh)
fdiv %st, %st(0)
ret
END(__ieee754_acosh)
+strong_alias (__ieee754_acosh, __acosh_finite)
diff --git a/sysdeps/i386/fpu/e_acoshf.S b/sysdeps/i386/fpu/e_acoshf.S
index 1906c60578..b55004b62d 100644
--- a/sysdeps/i386/fpu/e_acoshf.S
+++ b/sysdeps/i386/fpu/e_acoshf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -21,12 +21,12 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -101,3 +101,4 @@ ENTRY(__ieee754_acoshf)
fdiv %st, %st(0)
ret
END(__ieee754_acoshf)
+strong_alias (__ieee754_acoshf, __acoshf_finite)
diff --git a/sysdeps/i386/fpu/e_acoshl.S b/sysdeps/i386/fpu/e_acoshl.S
index c7b548d25a..76bc0d7521 100644
--- a/sysdeps/i386/fpu/e_acoshl.S
+++ b/sysdeps/i386/fpu/e_acoshl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arcsinh.
- Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -21,12 +21,12 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
/* Please note that we use double value for 1.0. This number
has an exact representation and so we don't get accuracy
problems. The advantage is that the code is simpler. */
@@ -108,3 +108,4 @@ ENTRY(__ieee754_acoshl)
fdiv %st, %st(0)
ret
END(__ieee754_acoshl)
+strong_alias (__ieee754_acoshl, __acoshl_finite)
diff --git a/sysdeps/i386/fpu/e_acosl.c b/sysdeps/i386/fpu/e_acosl.c
index 0c3e03945a..ec516ffca9 100644
--- a/sysdeps/i386/fpu/e_acosl.c
+++ b/sysdeps/i386/fpu/e_acosl.c
@@ -23,3 +23,4 @@ __ieee754_acosl (long double x)
: "=t" (res) : "0" (x) : "st(1)");
return res;
}
+strong_alias (__ieee754_acosl, __acosl_finite)
diff --git a/sysdeps/i386/fpu/e_asin.S b/sysdeps/i386/fpu/e_asin.S
index 945e308245..a17e922b6d 100644
--- a/sysdeps/i386/fpu/e_asin.S
+++ b/sysdeps/i386/fpu/e_asin.S
@@ -18,3 +18,4 @@ ENTRY(__ieee754_asin)
fpatan
ret
END (__ieee754_asin)
+strong_alias (__ieee754_asin, __asin_finite)
diff --git a/sysdeps/i386/fpu/e_asinf.S b/sysdeps/i386/fpu/e_asinf.S
index d450e9a740..5c1065dd4d 100644
--- a/sysdeps/i386/fpu/e_asinf.S
+++ b/sysdeps/i386/fpu/e_asinf.S
@@ -19,3 +19,4 @@ ENTRY(__ieee754_asinf)
fpatan
ret
END (__ieee754_asinf)
+strong_alias (__ieee754_asinf, __asinf_finite)
diff --git a/sysdeps/i386/fpu/e_atan2.S b/sysdeps/i386/fpu/e_atan2.S
index 8df04e485e..e76f8e2a78 100644
--- a/sysdeps/i386/fpu/e_atan2.S
+++ b/sysdeps/i386/fpu/e_atan2.S
@@ -13,3 +13,4 @@ ENTRY(__ieee754_atan2)
fpatan
ret
END (__ieee754_atan2)
+strong_alias (__ieee754_atan2, __atan2_finite)
diff --git a/sysdeps/i386/fpu/e_atan2f.S b/sysdeps/i386/fpu/e_atan2f.S
index fc6621f183..9ffa6373be 100644
--- a/sysdeps/i386/fpu/e_atan2f.S
+++ b/sysdeps/i386/fpu/e_atan2f.S
@@ -13,3 +13,4 @@ ENTRY(__ieee754_atan2f)
fpatan
ret
END (__ieee754_atan2f)
+strong_alias (__ieee754_atan2f, __atan2f_finite)
diff --git a/sysdeps/i386/fpu/e_atan2l.c b/sysdeps/i386/fpu/e_atan2l.c
index 19a2a60621..9f88bfcc08 100644
--- a/sysdeps/i386/fpu/e_atan2l.c
+++ b/sysdeps/i386/fpu/e_atan2l.c
@@ -16,3 +16,4 @@ __ieee754_atan2l (long double y, long double x)
return res;
}
+strong_alias (__ieee754_atan2l, __atan2l_finite)
diff --git a/sysdeps/i386/fpu/e_atanh.S b/sysdeps/i386/fpu/e_atanh.S
index 3566ec6eff..d7e53a2882 100644
--- a/sysdeps/i386/fpu/e_atanh.S
+++ b/sysdeps/i386/fpu/e_atanh.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arctanh function.
- Copyright (C) 1996, 1999, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -114,3 +114,4 @@ ENTRY(__ieee754_atanh)
6: fldl 4(%esp)
ret
END(__ieee754_atanh)
+strong_alias (__ieee754_atanh, __atanh_finite)
diff --git a/sysdeps/i386/fpu/e_atanhf.S b/sysdeps/i386/fpu/e_atanhf.S
index 10ce6aed9e..00ad9142f2 100644
--- a/sysdeps/i386/fpu/e_atanhf.S
+++ b/sysdeps/i386/fpu/e_atanhf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arctanh function.
- Copyright (C) 1996, 1999, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2005, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -107,3 +107,4 @@ ENTRY(__ieee754_atanhf)
5: flds 4(%esp)
ret
END(__ieee754_atanhf)
+strong_alias (__ieee754_atanhf, __atanhf_finite)
diff --git a/sysdeps/i386/fpu/e_atanhl.S b/sysdeps/i386/fpu/e_atanhl.S
index 8618c3fb35..cc70e73f4b 100644
--- a/sysdeps/i386/fpu/e_atanhl.S
+++ b/sysdeps/i386/fpu/e_atanhl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of arctanh function.
- Copyright (C) 1996, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1999, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -118,3 +118,4 @@ ENTRY(__ieee754_atanhl)
6: fldt 4(%esp)
ret
END(__ieee754_atanhl)
+strong_alias (__ieee754_atanhl, __atanhl_finite)
diff --git a/sysdeps/i386/fpu/e_exp.S b/sysdeps/i386/fpu/e_exp.S
index 4a75fa1d1c..2c331d9ed6 100644
--- a/sysdeps/i386/fpu/e_exp.S
+++ b/sysdeps/i386/fpu/e_exp.S
@@ -5,7 +5,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_exp.S,v 1.7 1996/07/03 17:31:28 jtc Exp $")
/* e^x = 2^(x * log2(e)) */
ENTRY(__ieee754_exp)
@@ -39,3 +38,19 @@ ENTRY(__ieee754_exp)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp)
+
+
+ENTRY(__exp_finite)
+ fldl2e
+ fmull 4(%esp) /* x * log2(e) */
+ fld %st
+ frndint /* int(x * log2(e)) */
+ fsubr %st,%st(1) /* fract(x * log2(e)) */
+ fxch
+ f2xm1 /* 2^(fract(x * log2(e))) - 1 */
+ fld1
+ faddp /* 2^(fract(x * log2(e))) */
+ fscale /* e^x */
+ fstp %st(1)
+ ret
+END(__exp_finite)
diff --git a/sysdeps/i386/fpu/e_exp10.S b/sysdeps/i386/fpu/e_exp10.S
index 6bfcdbb723..1e32b07848 100644
--- a/sysdeps/i386/fpu/e_exp10.S
+++ b/sysdeps/i386/fpu/e_exp10.S
@@ -36,3 +36,4 @@ ENTRY(__ieee754_exp10)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp10)
+strong_alias (__ieee754_exp10, __exp10_finite)
diff --git a/sysdeps/i386/fpu/e_exp10f.S b/sysdeps/i386/fpu/e_exp10f.S
index 4791b99afa..614496415e 100644
--- a/sysdeps/i386/fpu/e_exp10f.S
+++ b/sysdeps/i386/fpu/e_exp10f.S
@@ -4,7 +4,7 @@
#include <machine/asm.h>
-/* e^x = 2^(x * log2(10)) */
+/* 10^x = 2^(x * log2(10)) */
ENTRY(__ieee754_exp10f)
flds 4(%esp)
/* I added the following ugly construct because exp(+-Inf) resulted
@@ -36,3 +36,4 @@ ENTRY(__ieee754_exp10f)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp10f)
+strong_alias (__ieee754_exp10f, __exp10f_finite)
diff --git a/sysdeps/i386/fpu/e_exp10l.S b/sysdeps/i386/fpu/e_exp10l.S
index 71f0da792d..04ec8001d9 100644
--- a/sysdeps/i386/fpu/e_exp10l.S
+++ b/sysdeps/i386/fpu/e_exp10l.S
@@ -4,7 +4,7 @@
#include <machine/asm.h>
-/* e^x = 2^(x * log2l(10)) */
+/* 10^x = 2^(x * log2l(10)) */
ENTRY(__ieee754_exp10l)
fldt 4(%esp)
/* I added the following ugly construct because expl(+-Inf) resulted
@@ -36,3 +36,4 @@ ENTRY(__ieee754_exp10l)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp10l)
+strong_alias (__ieee754_exp10l, __exp10l_finite)
diff --git a/sysdeps/i386/fpu/e_exp2.S b/sysdeps/i386/fpu/e_exp2.S
index 778c0c0eb6..f802cf8b98 100644
--- a/sysdeps/i386/fpu/e_exp2.S
+++ b/sysdeps/i386/fpu/e_exp2.S
@@ -35,3 +35,4 @@ ENTRY(__ieee754_exp2)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp2)
+strong_alias (__ieee754_exp2, __exp2_finite)
diff --git a/sysdeps/i386/fpu/e_exp2f.S b/sysdeps/i386/fpu/e_exp2f.S
index c2d1af1af1..f867d0d472 100644
--- a/sysdeps/i386/fpu/e_exp2f.S
+++ b/sysdeps/i386/fpu/e_exp2f.S
@@ -35,3 +35,4 @@ ENTRY(__ieee754_exp2f)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp2f)
+strong_alias (__ieee754_exp2f, __exp2f_finite)
diff --git a/sysdeps/i386/fpu/e_exp2l.S b/sysdeps/i386/fpu/e_exp2l.S
index fa1fdc9236..203dd0078d 100644
--- a/sysdeps/i386/fpu/e_exp2l.S
+++ b/sysdeps/i386/fpu/e_exp2l.S
@@ -35,3 +35,4 @@ ENTRY(__ieee754_exp2l)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp2l)
+strong_alias (__ieee754_exp2l, __exp2l_finite)
diff --git a/sysdeps/i386/fpu/e_expf.S b/sysdeps/i386/fpu/e_expf.S
index 5fd49b89fd..4e4f6a0df7 100644
--- a/sysdeps/i386/fpu/e_expf.S
+++ b/sysdeps/i386/fpu/e_expf.S
@@ -6,7 +6,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
/* e^x = 2^(x * log2(e)) */
ENTRY(__ieee754_expf)
@@ -40,3 +39,19 @@ ENTRY(__ieee754_expf)
fldz /* Set result to 0. */
2: ret
END (__ieee754_expf)
+
+
+ENTRY(__expf_finite)
+ fldl2e
+ fmuls 4(%esp) /* x * log2(e) */
+ fld %st
+ frndint /* int(x * log2(e)) */
+ fsubr %st,%st(1) /* fract(x * log2(e)) */
+ fxch
+ f2xm1 /* 2^(fract(x * log2(e))) - 1 */
+ fld1
+ faddp /* 2^(fract(x * log2(e))) */
+ fscale /* e^x */
+ fstp %st(1)
+ ret
+END(__expf_finite)
diff --git a/sysdeps/i386/fpu/e_expl.c b/sysdeps/i386/fpu/e_expl.c
index 2240ceac47..8dc9581f70 100644
--- a/sysdeps/i386/fpu/e_expl.c
+++ b/sysdeps/i386/fpu/e_expl.c
@@ -63,7 +63,7 @@ __ieee754_expl (long double x)
"fld1\n\t" /* 4 1.0 */
"faddp\n\t" /* 3 2^(fract(x * log2(e))) */
"fstp %%st(1)\n\t" /* 2 */
- "fscale\n\t" /* 2 scale factor is st(1); e^x */
+ "fscale\n\t" /* 2 scale factor is st(1); e^x */
"fstp %%st(1)\n\t" /* 1 */
"fstp %%st(1)\n\t" /* 0 */
"jmp 2f\n\t"
@@ -75,3 +75,4 @@ __ieee754_expl (long double x)
: "=t" (res) : "0" (x), "m" (c0), "m" (c1) : "ax", "dx");
return res;
}
+strong_alias (__ieee754_expl, __expl_finite)
diff --git a/sysdeps/i386/fpu/e_fmod.S b/sysdeps/i386/fpu/e_fmod.S
index 4cf6e92054..26b3acc392 100644
--- a/sysdeps/i386/fpu/e_fmod.S
+++ b/sysdeps/i386/fpu/e_fmod.S
@@ -5,8 +5,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_fmod.S,v 1.4 1995/05/08 23:47:56 jtc Exp $")
-
ENTRY(__ieee754_fmod)
fldl 12(%esp)
fldl 4(%esp)
@@ -17,3 +15,4 @@ ENTRY(__ieee754_fmod)
fstp %st(1)
ret
END (__ieee754_fmod)
+strong_alias (__ieee754_fmod, __fmod_finite)
diff --git a/sysdeps/i386/fpu/e_fmodf.S b/sysdeps/i386/fpu/e_fmodf.S
index bbce40976d..ece4d98427 100644
--- a/sysdeps/i386/fpu/e_fmodf.S
+++ b/sysdeps/i386/fpu/e_fmodf.S
@@ -6,8 +6,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
ENTRY(__ieee754_fmodf)
flds 8(%esp)
flds 4(%esp)
@@ -18,3 +16,4 @@ ENTRY(__ieee754_fmodf)
fstp %st(1)
ret
END(__ieee754_fmodf)
+strong_alias (__ieee754_fmodf, __fmodf_finite)
diff --git a/sysdeps/i386/fpu/e_fmodl.c b/sysdeps/i386/fpu/e_fmodl.c
index c7c9a60456..49700ae8f6 100644
--- a/sysdeps/i386/fpu/e_fmodl.c
+++ b/sysdeps/i386/fpu/e_fmodl.c
@@ -20,3 +20,4 @@ __ieee754_fmodl (long double x, long double y)
: "=t" (res) : "0" (x), "u" (y) : "ax", "st(1)");
return res;
}
+strong_alias (__ieee754_fmodl, __fmodl_finite)
diff --git a/sysdeps/i386/fpu/e_hypot.S b/sysdeps/i386/fpu/e_hypot.S
index 0435857309..0baa011d18 100644
--- a/sysdeps/i386/fpu/e_hypot.S
+++ b/sysdeps/i386/fpu/e_hypot.S
@@ -1,5 +1,5 @@
/* Compute the hypothenuse of X and Y.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -58,5 +58,6 @@ ENTRY(__ieee754_hypot)
fxch
5: fstp %st(1)
jmp 2b
-
+
END(__ieee754_hypot)
+strong_alias (__ieee754_hypot, __hypot_finite)
diff --git a/sysdeps/i386/fpu/e_hypotf.S b/sysdeps/i386/fpu/e_hypotf.S
index 5967dae215..eb95d6ee99 100644
--- a/sysdeps/i386/fpu/e_hypotf.S
+++ b/sysdeps/i386/fpu/e_hypotf.S
@@ -1,5 +1,5 @@
/* Compute the hypothenuse of X and Y.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -58,5 +58,6 @@ ENTRY(__ieee754_hypotf)
fxch
5: fstp %st(1)
jmp 2b
-
+
END(__ieee754_hypotf)
+strong_alias (__ieee754_hypotf, __hypotf_finite)
diff --git a/sysdeps/i386/fpu/e_log.S b/sysdeps/i386/fpu/e_log.S
index ce55b72292..a2e4d89a40 100644
--- a/sysdeps/i386/fpu/e_log.S
+++ b/sysdeps/i386/fpu/e_log.S
@@ -7,14 +7,12 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_log.S,v 1.4 1995/05/08 23:48:39 jtc Exp $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -27,9 +25,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -64,3 +62,22 @@ ENTRY(__ieee754_log)
fstp %st(1)
ret
END (__ieee754_log)
+
+ENTRY(__log_finite)
+ fldln2 // log(2)
+ fldl 4(%esp) // x : log(2)
+#ifdef PIC
+ LOAD_PIC_REG (dx)
+#endif
+ fld %st // x : x : log(2)
+ fsubl MO(one) // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fcompl MO(limit) // x-1 : x : log(2)
+ fnstsw // x-1 : x : log(2)
+ andb $0x45, %ah
+ jz 2b
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ ret
+END(__log_finite)
diff --git a/sysdeps/i386/fpu/e_log10.S b/sysdeps/i386/fpu/e_log10.S
index 525f08c96d..9d24d74024 100644
--- a/sysdeps/i386/fpu/e_log10.S
+++ b/sysdeps/i386/fpu/e_log10.S
@@ -7,14 +7,12 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_log10.S,v 1.4 1995/05/08 23:49:24 jtc Exp $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -27,9 +25,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -64,3 +62,4 @@ ENTRY(__ieee754_log10)
fstp %st(1)
ret
END (__ieee754_log10)
+strong_alias (__ieee754_log10, __log10_finite)
diff --git a/sysdeps/i386/fpu/e_log10f.S b/sysdeps/i386/fpu/e_log10f.S
index da5069d583..38a4833d1a 100644
--- a/sysdeps/i386/fpu/e_log10f.S
+++ b/sysdeps/i386/fpu/e_log10f.S
@@ -8,14 +8,12 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -28,9 +26,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -65,3 +63,4 @@ ENTRY(__ieee754_log10f)
fstp %st(1)
ret
END (__ieee754_log10f)
+strong_alias (__ieee754_log10f, __log10f_finite)
diff --git a/sysdeps/i386/fpu/e_log10l.S b/sysdeps/i386/fpu/e_log10l.S
index 3811516be5..88b309d539 100644
--- a/sysdeps/i386/fpu/e_log10l.S
+++ b/sysdeps/i386/fpu/e_log10l.S
@@ -9,14 +9,12 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -29,9 +27,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -66,3 +64,4 @@ ENTRY(__ieee754_log10l)
fstp %st(1)
ret
END(__ieee754_log10l)
+strong_alias (__ieee754_log10l, __log10l_finite)
diff --git a/sysdeps/i386/fpu/e_log2.S b/sysdeps/i386/fpu/e_log2.S
index d80bf80239..88aee7f3ca 100644
--- a/sysdeps/i386/fpu/e_log2.S
+++ b/sysdeps/i386/fpu/e_log2.S
@@ -9,11 +9,11 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -26,9 +26,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -63,3 +63,4 @@ ENTRY(__ieee754_log2)
fstp %st(1)
ret
END (__ieee754_log2)
+strong_alias (__ieee754_log2, __log2_finite)
diff --git a/sysdeps/i386/fpu/e_log2f.S b/sysdeps/i386/fpu/e_log2f.S
index 9eb7b2a826..20144875fd 100644
--- a/sysdeps/i386/fpu/e_log2f.S
+++ b/sysdeps/i386/fpu/e_log2f.S
@@ -9,11 +9,11 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -26,9 +26,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -63,3 +63,4 @@ ENTRY(__ieee754_log2f)
fstp %st(1)
ret
END (__ieee754_log2f)
+strong_alias (__ieee754_log2f, __log2f_finite)
diff --git a/sysdeps/i386/fpu/e_log2l.S b/sysdeps/i386/fpu/e_log2l.S
index 9de08f5de1..bc79dea2da 100644
--- a/sysdeps/i386/fpu/e_log2l.S
+++ b/sysdeps/i386/fpu/e_log2l.S
@@ -9,11 +9,11 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -26,9 +26,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -63,3 +63,4 @@ ENTRY(__ieee754_log2l)
fstp %st(1)
ret
END (__ieee754_log2l)
+strong_alias (__ieee754_log2l, __log2l_finite)
diff --git a/sysdeps/i386/fpu/e_logf.S b/sysdeps/i386/fpu/e_logf.S
index cd4538b594..1992cc2f82 100644
--- a/sysdeps/i386/fpu/e_logf.S
+++ b/sysdeps/i386/fpu/e_logf.S
@@ -8,14 +8,12 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_log.S,v 1.4 1995/05/08 23:48:39 jtc Exp $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -28,9 +26,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -65,3 +63,22 @@ ENTRY(__ieee754_logf)
fstp %st(1)
ret
END (__ieee754_logf)
+
+ENTRY(__logf_finite)
+ fldln2 // log(2)
+ flds 4(%esp) // x : log(2)
+#ifdef PIC
+ LOAD_PIC_REG (dx)
+#endif
+ fld %st // x : x : log(2)
+ fsubl MO(one) // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fcompl MO(limit) // x-1 : x : log(2)
+ fnstsw // x-1 : x : log(2)
+ andb $0x45, %ah
+ jz 2b
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ ret
+END(__logf_finite)
diff --git a/sysdeps/i386/fpu/e_logl.S b/sysdeps/i386/fpu/e_logl.S
index 551dcf1e46..bfb72a30e9 100644
--- a/sysdeps/i386/fpu/e_logl.S
+++ b/sysdeps/i386/fpu/e_logl.S
@@ -7,15 +7,13 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -28,9 +26,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##@GOTOFF(%edx)
+# define MO(op) op##@GOTOFF(%edx)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -65,3 +63,22 @@ ENTRY(__ieee754_logl)
fstp %st(1)
ret
END (__ieee754_logl)
+
+ENTRY(__logl_finite)
+ fldln2 // log(2)
+ fldt 4(%esp) // x : log(2)
+#ifdef PIC
+ LOAD_PIC_REG (dx)
+#endif
+ fld %st // x : x : log(2)
+ fsubl MO(one) // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fcompl MO(limit) // x-1 : x : log(2)
+ fnstsw // x-1 : x : log(2)
+ andb $0x45, %ah
+ jz 2b
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ ret
+END(__logl_finite)
diff --git a/sysdeps/i386/fpu/e_pow.S b/sysdeps/i386/fpu/e_pow.S
index 792f926902..dccc677520 100644
--- a/sysdeps/i386/fpu/e_pow.S
+++ b/sysdeps/i386/fpu/e_pow.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of pow function.
- Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2007
+ Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2007, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -22,12 +22,27 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
+ .p2align 3
+ ASM_TYPE_DIRECTIVE(one,@object)
+one: .double 1.0
+ ASM_SIZE_DIRECTIVE(one)
+ ASM_TYPE_DIRECTIVE(limit,@object)
+limit: .double 0.29
+ ASM_SIZE_DIRECTIVE(limit)
+ ASM_TYPE_DIRECTIVE(p63,@object)
+p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
+ ASM_SIZE_DIRECTIVE(p63)
- .align ALIGNARG(4)
+#ifdef __ELF__
+ .section .rodata.cst16,"aM",@progbits,16
+#else
+ .text
+#endif
+ .p2align 3
ASM_TYPE_DIRECTIVE(infinity,@object)
inf_zero:
infinity:
@@ -43,22 +58,13 @@ minfinity:
mzero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
ASM_SIZE_DIRECTIVE(minf_mzero)
- ASM_TYPE_DIRECTIVE(one,@object)
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
-limit: .double 0.29
- ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p63,@object)
-p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
- ASM_SIZE_DIRECTIVE(p63)
#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
+# define MO(op) op##@GOTOFF(%ecx)
+# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
+# define MO(op) op
+# define MOX(op,x,f) op(,x,f)
#endif
.text
@@ -360,3 +366,4 @@ ENTRY(__ieee754_pow)
ret
END(__ieee754_pow)
+strong_alias (__ieee754_pow, __pow_finite)
diff --git a/sysdeps/i386/fpu/e_powf.S b/sysdeps/i386/fpu/e_powf.S
index c91545418d..99c95bbdf9 100644
--- a/sysdeps/i386/fpu/e_powf.S
+++ b/sysdeps/i386/fpu/e_powf.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of pow function.
- Copyright (C) 1996, 1997, 1999, 2001, 2004, 2005, 2007
+ Copyright (C) 1996, 1997, 1999, 2001, 2004, 2005, 2007, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -22,12 +22,27 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
+ .p2align 3
+ ASM_TYPE_DIRECTIVE(one,@object)
+one: .double 1.0
+ ASM_SIZE_DIRECTIVE(one)
+ ASM_TYPE_DIRECTIVE(limit,@object)
+limit: .double 0.29
+ ASM_SIZE_DIRECTIVE(limit)
+ ASM_TYPE_DIRECTIVE(p31,@object)
+p31: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x41
+ ASM_SIZE_DIRECTIVE(p31)
- .align ALIGNARG(4)
+#ifdef __ELF__
+ .section .rodata.cst16,"aM",@progbits,16
+#else
+ .text
+#endif
+ .p2align 3
ASM_TYPE_DIRECTIVE(infinity,@object)
inf_zero:
infinity:
@@ -43,22 +58,13 @@ minfinity:
mzero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
ASM_SIZE_DIRECTIVE(minf_mzero)
- ASM_TYPE_DIRECTIVE(one,@object)
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
-limit: .double 0.29
- ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p31,@object)
-p31: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x41
- ASM_SIZE_DIRECTIVE(p31)
#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
+# define MO(op) op##@GOTOFF(%ecx)
+# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
+# define MO(op) op
+# define MOX(op,x,f) op(,x,f)
#endif
.text
@@ -348,3 +354,4 @@ ENTRY(__ieee754_powf)
ret
END(__ieee754_powf)
+strong_alias (__ieee754_powf, __powf_finite)
diff --git a/sysdeps/i386/fpu/e_powl.S b/sysdeps/i386/fpu/e_powl.S
index 6215496207..34ace3576b 100644
--- a/sysdeps/i386/fpu/e_powl.S
+++ b/sysdeps/i386/fpu/e_powl.S
@@ -1,5 +1,5 @@
/* ix87 specific implementation of pow function.
- Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2007
+ Copyright (C) 1996, 1997, 1998, 1999, 2001, 2004, 2005, 2007, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -22,12 +22,27 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
+ .p2align 3
+ ASM_TYPE_DIRECTIVE(one,@object)
+one: .double 1.0
+ ASM_SIZE_DIRECTIVE(one)
+ ASM_TYPE_DIRECTIVE(limit,@object)
+limit: .double 0.29
+ ASM_SIZE_DIRECTIVE(limit)
+ ASM_TYPE_DIRECTIVE(p63,@object)
+p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
+ ASM_SIZE_DIRECTIVE(p63)
- .align ALIGNARG(4)
+#ifdef __ELF__
+ .section .rodata.cst16,"aM",@progbits,16
+#else
+ .text
+#endif
+ .p2align 3
ASM_TYPE_DIRECTIVE(infinity,@object)
inf_zero:
infinity:
@@ -43,22 +58,13 @@ minfinity:
mzero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
ASM_SIZE_DIRECTIVE(minf_mzero)
- ASM_TYPE_DIRECTIVE(one,@object)
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
-limit: .double 0.29
- ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p63,@object)
-p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
- ASM_SIZE_DIRECTIVE(p63)
#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
+# define MO(op) op##@GOTOFF(%ecx)
+# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
+# define MO(op) op
+# define MOX(op,x,f) op(,x,f)
#endif
.text
@@ -360,3 +366,4 @@ ENTRY(__ieee754_powl)
ret
END(__ieee754_powl)
+strong_alias (__ieee754_powl, __powl_finite)
diff --git a/sysdeps/i386/fpu/e_remainder.S b/sysdeps/i386/fpu/e_remainder.S
index 2f43cb894c..f7867aa90b 100644
--- a/sysdeps/i386/fpu/e_remainder.S
+++ b/sysdeps/i386/fpu/e_remainder.S
@@ -5,8 +5,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_remainder.S,v 1.4 1995/05/08 23:49:37 jtc Exp $")
-
ENTRY(__ieee754_remainder)
fldl 12(%esp)
fldl 4(%esp)
@@ -17,3 +15,4 @@ ENTRY(__ieee754_remainder)
fstp %st(1)
ret
END (__ieee754_remainder)
+strong_alias (__ieee754_remainder, __remainder_finite)
diff --git a/sysdeps/i386/fpu/e_remainderf.S b/sysdeps/i386/fpu/e_remainderf.S
index 79f821993b..cfd390bc69 100644
--- a/sysdeps/i386/fpu/e_remainderf.S
+++ b/sysdeps/i386/fpu/e_remainderf.S
@@ -5,8 +5,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_remainderf.S,v 1.2 1995/05/08 23:49:47 jtc Exp $")
-
ENTRY(__ieee754_remainderf)
flds 8(%esp)
flds 4(%esp)
@@ -17,3 +15,4 @@ ENTRY(__ieee754_remainderf)
fstp %st(1)
ret
END (__ieee754_remainderf)
+strong_alias (__ieee754_remainderf, __remainderf_finite)
diff --git a/sysdeps/i386/fpu/e_remainderl.S b/sysdeps/i386/fpu/e_remainderl.S
index 5f50b626a2..5ec23a37a3 100644
--- a/sysdeps/i386/fpu/e_remainderl.S
+++ b/sysdeps/i386/fpu/e_remainderl.S
@@ -7,8 +7,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
ENTRY(__ieee754_remainderl)
fldt 16(%esp)
fldt 4(%esp)
@@ -19,3 +17,4 @@ ENTRY(__ieee754_remainderl)
fstp %st(1)
ret
END (__ieee754_remainderl)
+strong_alias (__ieee754_remainderl, __remainderl_finite)
diff --git a/sysdeps/i386/fpu/e_scalb.S b/sysdeps/i386/fpu/e_scalb.S
index 7e334a3611..0f3ec96196 100644
--- a/sysdeps/i386/fpu/e_scalb.S
+++ b/sysdeps/i386/fpu/e_scalb.S
@@ -7,8 +7,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_scalb.S,v 1.4 1995/05/08 23:49:52 jtc Exp $")
-
#ifdef __ELF__
.section .rodata
#else
@@ -20,18 +18,17 @@ RCSID("$NetBSD: e_scalb.S,v 1.4 1995/05/08 23:49:52 jtc Exp $")
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-minus_zero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(zero_nan)
#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
+# define MO(op) op##@GOTOFF(%ecx)
+# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
+# define MO(op) op
+# define MOX(op,x,f) op(,x,f)
#endif
.text
@@ -100,3 +97,4 @@ ENTRY(__ieee754_scalb)
fdiv %st
ret
END(__ieee754_scalb)
+strong_alias (__ieee754_scalb, __scalb_finite)
diff --git a/sysdeps/i386/fpu/e_scalbf.S b/sysdeps/i386/fpu/e_scalbf.S
index e99ee92cb0..d11ca66d19 100644
--- a/sysdeps/i386/fpu/e_scalbf.S
+++ b/sysdeps/i386/fpu/e_scalbf.S
@@ -8,8 +8,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
.section .rodata
#else
@@ -21,18 +19,17 @@ RCSID("$NetBSD: $")
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-minus_zero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(zero_nan)
#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
+# define MO(op) op##@GOTOFF(%ecx)
+# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
+# define MO(op) op
+# define MOX(op,x,f) op(,x,f)
#endif
@@ -102,3 +99,4 @@ ENTRY(__ieee754_scalbf)
fdiv %st
ret
END(__ieee754_scalbf)
+strong_alias (__ieee754_scalbf, __scalbf_finite)
diff --git a/sysdeps/i386/fpu/e_scalbl.S b/sysdeps/i386/fpu/e_scalbl.S
index 3f67d0befb..d8b2169714 100644
--- a/sysdeps/i386/fpu/e_scalbl.S
+++ b/sysdeps/i386/fpu/e_scalbl.S
@@ -9,8 +9,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
.section .rodata
#else
@@ -22,18 +20,17 @@ RCSID("$NetBSD: $")
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-minus_zero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(zero_nan)
#ifdef PIC
-#define MO(op) op##@GOTOFF(%ecx)
-#define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
+# define MO(op) op##@GOTOFF(%ecx)
+# define MOX(op,x,f) op##@GOTOFF(%ecx,x,f)
#else
-#define MO(op) op
-#define MOX(op,x,f) op(,x,f)
+# define MO(op) op
+# define MOX(op,x,f) op(,x,f)
#endif
.text
@@ -102,3 +99,4 @@ ENTRY(__ieee754_scalbl)
fdiv %st
ret
END(__ieee754_scalbl)
+strong_alias (__ieee754_scalbl, __scalbl_finite)
diff --git a/sysdeps/i386/fpu/e_sqrt.S b/sysdeps/i386/fpu/e_sqrt.S
index 6f253d51aa..1054ba4532 100644
--- a/sysdeps/i386/fpu/e_sqrt.S
+++ b/sysdeps/i386/fpu/e_sqrt.S
@@ -5,10 +5,9 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_sqrt.S,v 1.4 1995/05/08 23:49:57 jtc Exp $")
-
ENTRY(__ieee754_sqrt)
fldl 4(%esp)
fsqrt
ret
END (__ieee754_sqrt)
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/i386/fpu/e_sqrtf.S b/sysdeps/i386/fpu/e_sqrtf.S
index 5ce1ad0544..6f7e4b015f 100644
--- a/sysdeps/i386/fpu/e_sqrtf.S
+++ b/sysdeps/i386/fpu/e_sqrtf.S
@@ -5,10 +5,9 @@
#include <machine/asm.h>
-RCSID("$NetBSD: e_sqrtf.S,v 1.2 1995/05/08 23:50:14 jtc Exp $")
-
ENTRY(__ieee754_sqrtf)
flds 4(%esp)
fsqrt
ret
END (__ieee754_sqrtf)
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/i386/fpu/e_sqrtl.c b/sysdeps/i386/fpu/e_sqrtl.c
index 85f61bb385..41bcd7eeb7 100644
--- a/sysdeps/i386/fpu/e_sqrtl.c
+++ b/sysdeps/i386/fpu/e_sqrtl.c
@@ -7,6 +7,7 @@
#include <math_private.h>
+#undef __ieee754_sqrtl
long double
__ieee754_sqrtl (long double x)
{
@@ -16,3 +17,4 @@ __ieee754_sqrtl (long double x)
return res;
}
+strong_alias (__ieee754_sqrtl, __sqrtl_finite)
diff --git a/sysdeps/i386/fpu/fgetexcptflg.c b/sysdeps/i386/fpu/fgetexcptflg.c
index 5f60511b61..1a0e6df63e 100644
--- a/sysdeps/i386/fpu/fgetexcptflg.c
+++ b/sysdeps/i386/fpu/fgetexcptflg.c
@@ -1,5 +1,5 @@
/* Store current representation for exceptions.
- Copyright (C) 1997,99,2000,01 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01,11 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -19,7 +19,10 @@
02111-1307 USA. */
#include <fenv.h>
-#include <bp-sym.h>
+#include <unistd.h>
+#include <ldsodefs.h>
+#include <dl-procinfo.h>
+
int
__fegetexceptflag (fexcept_t *flagp, int excepts)
@@ -31,6 +34,17 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
*flagp = temp & excepts & FE_ALL_EXCEPT;
+ /* If the CPU supports SSE, we clear the MXCSR as well. */
+ if ((GLRO(dl_hwcap) & HWCAP_I386_XMM) != 0)
+ {
+ unsigned int sse_exc;
+
+ /* Get the current MXCSR. */
+ __asm__ ("stmxcsr %0" : "=m" (*&sse_exc));
+
+ *flagp |= sse_exc & excepts & FE_ALL_EXCEPT;
+ }
+
/* Success. */
return 0;
}
@@ -38,7 +52,7 @@ __fegetexceptflag (fexcept_t *flagp, int excepts)
#include <shlib-compat.h>
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_2)
strong_alias (__fegetexceptflag, __old_fegetexceptflag)
-compat_symbol (libm, BP_SYM (__old_fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_1);
+compat_symbol (libm, __old_fegetexceptflag, fegetexceptflag, GLIBC_2_1);
#endif
-versioned_symbol (libm, BP_SYM (__fegetexceptflag), BP_SYM (fegetexceptflag), GLIBC_2_2);
+versioned_symbol (libm, __fegetexceptflag, fegetexceptflag, GLIBC_2_2);
diff --git a/sysdeps/i386/fpu/math_private.h b/sysdeps/i386/fpu/math_private.h
index a426788ef1..8a51851377 100644
--- a/sysdeps/i386/fpu/math_private.h
+++ b/sysdeps/i386/fpu/math_private.h
@@ -1,16 +1,17 @@
#ifndef _MATH_PRIVATE_H
#define math_opt_barrier(x) \
-({ __typeof(x) __x; \
+({ __typeof (x) __x; \
__asm ("" : "=t" (__x) : "0" (x)); \
__x; })
#define math_force_eval(x) \
do \
{ \
+ __typeof (x) __x = (x); \
if (sizeof (x) <= sizeof (double)) \
- __asm __volatile ("" : : "m" (x)); \
+ __asm __volatile ("" : : "m" (__x)); \
else \
- __asm __volatile ("" : : "f" (x)); \
+ __asm __volatile ("" : : "f" (__x)); \
} \
while (0)
diff --git a/sysdeps/i386/i686/fpu/e_log.S b/sysdeps/i386/i686/fpu/e_log.S
new file mode 100644
index 0000000000..73060b088c
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/e_log.S
@@ -0,0 +1,29 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ *
+ * Adapted for i686 instructions.
+ */
+
+#include <machine/asm.h>
+
+
+ .text
+ENTRY(__ieee754_log)
+ fldln2 // log(2)
+ fldl 4(%esp) // x : log(2)
+ fucomi %st
+ jp 3f
+ fyl2x // log(x)
+ ret
+
+3: fstp %st(1)
+ ret
+END (__ieee754_log)
+
+ENTRY(__log_finite)
+ fldln2 // log(2)
+ fldl 4(%esp) // x : log(2)
+ fyl2x // log(x)
+ ret
+END(__log_finite)
diff --git a/sysdeps/i386/i686/fpu/e_logf.S b/sysdeps/i386/i686/fpu/e_logf.S
new file mode 100644
index 0000000000..6fd39d50d3
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/e_logf.S
@@ -0,0 +1,30 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ * Adapted for float by Ulrich Drepper <drepper@cygnus.com>.
+ *
+ * Adapted for i686 instructions.
+ */
+
+#include <machine/asm.h>
+
+
+ .text
+ENTRY(__ieee754_logf)
+ fldln2 // log(2)
+ flds 4(%esp) // x : log(2)
+ fucomi %st
+ jp 3f
+ fyl2x // log(x)
+ ret
+
+3: fstp %st(1)
+ ret
+END (__ieee754_logf)
+
+ENTRY(__logf_finite)
+ fldln2 // log(2)
+ flds 4(%esp) // x : log(2)
+ fyl2x // log(x)
+ ret
+END(__logf_finite)
diff --git a/sysdeps/i386/i686/fpu/e_logl.S b/sysdeps/i386/i686/fpu/e_logl.S
new file mode 100644
index 0000000000..4e79a5a4b5
--- /dev/null
+++ b/sysdeps/i386/i686/fpu/e_logl.S
@@ -0,0 +1,81 @@
+/*
+ * Written by J.T. Conklin <jtc@netbsd.org>.
+ * Public domain.
+ *
+ * Adapted for `long double' by Ulrich Drepper <drepper@cygnus.com>.
+ * Changed to use fyl2xp1 for values near 1, <drepper@cygnus.com>.
+ * Adapted for i686 instructions.
+ */
+
+#include <machine/asm.h>
+
+#ifdef __ELF__
+ .section .rodata.cst8,"aM",@progbits,8
+#else
+ .text
+#endif
+ .p2align 3
+ ASM_TYPE_DIRECTIVE(one,@object)
+one: .double 1.0
+ ASM_SIZE_DIRECTIVE(one)
+ /* It is not important that this constant is precise. It is only
+ a value which is known to be on the safe side for using the
+ fyl2xp1 instruction. */
+ ASM_TYPE_DIRECTIVE(limit,@object)
+limit: .double 0.29
+ ASM_SIZE_DIRECTIVE(limit)
+
+
+#ifdef PIC
+# define MO(op) op##@GOTOFF(%edx)
+#else
+# define MO(op) op
+#endif
+
+ .text
+ENTRY(__ieee754_logl)
+ fldln2 // log(2)
+ fldt 4(%esp) // x : log(2)
+ fucomi %st
+ jp 3f
+#ifdef PIC
+ LOAD_PIC_REG (dx)
+#endif
+ fld %st // x : x : log(2)
+ fsubl MO(one) // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fld MO(limit) // 0.29 : |x-1| : x-1 : x : log(2)
+ fcomip %st(1) // |x-1| : x-1 : x : log(2)
+ fstp %st(0) // x-1 : x : log(2)
+ jc 2f
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ ret
+
+2: fstp %st(0) // x : log(2)
+ fyl2x // log(x)
+ ret
+
+3: fstp %st(1)
+ ret
+END (__ieee754_logl)
+
+ENTRY(__logl_finite)
+ fldln2 // log(2)
+ fldt 4(%esp) // x : log(2)
+#ifdef PIC
+ LOAD_PIC_REG (dx)
+#endif
+ fld %st // x : x : log(2)
+ fsubl MO(one) // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fld MO(limit) // 0.29 : |x-1| : x-1 : x : log(2)
+ fcomip %st(1) // |x-1| : x-1 : x : log(2)
+ fstp %st(0) // x-1 : x : log(2)
+ jc 2b
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ ret
+END(__logl_finite)
diff --git a/sysdeps/i386/i686/multiarch/Makefile b/sysdeps/i386/i686/multiarch/Makefile
index c89ae92472..b764e5b825 100644
--- a/sysdeps/i386/i686/multiarch/Makefile
+++ b/sysdeps/i386/i686/multiarch/Makefile
@@ -4,6 +4,7 @@ gen-as-const-headers += ifunc-defines.sym
endif
ifeq ($(subdir),string)
+gen-as-const-headers += locale-defines.sym
sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \
memmove-ssse3 memcpy-ssse3-rep mempcpy-ssse3-rep \
memmove-ssse3-rep bcopy-ssse3 bcopy-ssse3-rep \
@@ -15,7 +16,13 @@ sysdep_routines += bzero-sse2 memset-sse2 memcpy-ssse3 mempcpy-ssse3 \
strncpy-sse2 stpcpy-sse2 stpncpy-sse2 strcat-ssse3 \
strcat-sse2 strncat-ssse3 strncat-sse2 strncat-c \
strchr-sse2 strrchr-sse2 strchr-sse2-bsf strrchr-sse2-bsf \
- wcscmp-sse2 wcscmp-c
+ memchr-sse2 memchr-sse2-bsf \
+ memrchr-sse2 memrchr-sse2-bsf memrchr-c \
+ rawmemchr-sse2 rawmemchr-sse2-bsf \
+ strnlen-sse2 strnlen-c \
+ strcasecmp_l-c strcasecmp-c strcasecmp_l-ssse3 \
+ strncase_l-c strncase-c strncase_l-ssse3 \
+ strcasecmp_l-sse4 strncase_l-sse4
ifeq (yes,$(config-cflags-sse4))
sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c
CFLAGS-varshift.c += -msse4
@@ -28,6 +35,12 @@ CFLAGS-strcasestr-nonascii.c += -msse4
endif
endif
+ifeq ($(subdir),wcsmbs)
+sysdep_routines += wcscmp-sse2 wcscmp-c wcslen-sse2 wcslen-c \
+ wmemcmp-sse4 wmemcmp-ssse3 wmemcmp-c wcschr-sse2 \
+ wcschr-c wcsrchr-sse2 wcsrchr-c wcscpy-ssse3 wcscpy-c
+endif
+
ifeq (mathyes,$(subdir)$(config-cflags-avx))
libm-sysdep_routines += s_fma-fma s_fmaf-fma
CFLAGS-s_fma-fma.c += -mavx -mfpmath=sse
diff --git a/sysdeps/i386/i686/multiarch/locale-defines.sym b/sysdeps/i386/i686/multiarch/locale-defines.sym
new file mode 100644
index 0000000000..aebff9a4f9
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/locale-defines.sym
@@ -0,0 +1,11 @@
+#include <locale/localeinfo.h>
+#include <langinfo.h>
+#include <stddef.h>
+
+--
+
+LOCALE_T___LOCALES offsetof (struct __locale_struct, __locales)
+LC_CTYPE
+_NL_CTYPE_NONASCII_CASE
+LOCALE_DATA_VALUES offsetof (struct __locale_data, values)
+SIZEOF_VALUES sizeof (((struct __locale_data *) 0)->values[0])
diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S
new file mode 100644
index 0000000000..115a2192a8
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/memchr-sse2-bsf.S
@@ -0,0 +1,497 @@
+/* Optimized memchr with sse2
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+
+# include <sysdep.h>
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+
+# define PARMS 4
+# define STR1 PARMS
+# define STR2 STR1+4
+
+# ifndef USE_AS_RAWMEMCHR
+# define LEN STR2+4
+# define RETURN POP(%edi); ret; CFI_PUSH(%edi);
+# endif
+
+# ifndef MEMCHR
+# define MEMCHR __memchr_sse2_bsf
+# endif
+
+ .text
+ENTRY (MEMCHR)
+
+ mov STR1(%esp), %ecx
+ movd STR2(%esp), %xmm1
+
+# ifndef USE_AS_RAWMEMCHR
+ mov LEN(%esp), %edx
+ test %edx, %edx
+ jz L(return_null_1)
+# endif
+ mov %ecx, %eax
+
+ punpcklbw %xmm1, %xmm1
+ punpcklbw %xmm1, %xmm1
+
+ and $63, %ecx
+ pshufd $0, %xmm1, %xmm1
+
+ cmp $48, %ecx
+ ja L(crosscache)
+
+ movdqu (%eax), %xmm0
+ pcmpeqb %xmm1, %xmm0
+/* Check if there is a match. */
+ pmovmskb %xmm0, %ecx
+ test %ecx, %ecx
+ je L(unaligned_no_match_1)
+/* Check which byte is a match. */
+ bsf %ecx, %ecx
+
+# ifndef USE_AS_RAWMEMCHR
+ sub %ecx, %edx
+ jbe L(return_null_1)
+# endif
+ add %ecx, %eax
+ ret
+
+ .p2align 4
+L(unaligned_no_match_1):
+# ifndef USE_AS_RAWMEMCHR
+ sub $16, %edx
+ jbe L(return_null_1)
+ PUSH (%edi)
+ lea 16(%eax), %edi
+ and $15, %eax
+ and $-16, %edi
+ add %eax, %edx
+# else
+ lea 16(%eax), %edx
+ and $-16, %edx
+# endif
+ jmp L(loop_prolog)
+
+ .p2align 4
+L(return_null_1):
+ xor %eax, %eax
+ ret
+
+# ifndef USE_AS_RAWMEMCHR
+ CFI_POP (%edi)
+# endif
+
+ .p2align 4
+L(crosscache):
+/* Handle unaligned string. */
+
+# ifndef USE_AS_RAWMEMCHR
+ PUSH (%edi)
+ mov %eax, %edi
+ and $15, %ecx
+ and $-16, %edi
+ movdqa (%edi), %xmm0
+# else
+ mov %eax, %edx
+ and $15, %ecx
+ and $-16, %edx
+ movdqa (%edx), %xmm0
+# endif
+ pcmpeqb %xmm1, %xmm0
+/* Check if there is a match. */
+ pmovmskb %xmm0, %eax
+/* Remove the leading bytes. */
+ sar %cl, %eax
+ test %eax, %eax
+ je L(unaligned_no_match)
+/* Check which byte is a match. */
+ bsf %eax, %eax
+
+# ifndef USE_AS_RAWMEMCHR
+ sub %eax, %edx
+ jbe L(return_null)
+ add %edi, %eax
+ add %ecx, %eax
+ RETURN
+# else
+ add %edx, %eax
+ add %ecx, %eax
+ ret
+# endif
+
+ .p2align 4
+L(unaligned_no_match):
+# ifndef USE_AS_RAWMEMCHR
+ sub $16, %edx
+ add %ecx, %edx
+ jle L(return_null)
+ add $16, %edi
+# else
+ add $16, %edx
+# endif
+
+ .p2align 4
+/* Loop start on aligned string. */
+L(loop_prolog):
+# ifndef USE_AS_RAWMEMCHR
+ sub $64, %edx
+ jbe L(exit_loop)
+ movdqa (%edi), %xmm0
+# else
+ movdqa (%edx), %xmm0
+# endif
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 16(%edi), %xmm2
+# else
+ movdqa 16(%edx), %xmm2
+# endif
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 32(%edi), %xmm3
+# else
+ movdqa 32(%edx), %xmm3
+# endif
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 48(%edi), %xmm4
+# else
+ movdqa 48(%edx), %xmm4
+# endif
+ pcmpeqb %xmm1, %xmm4
+
+# ifndef USE_AS_RAWMEMCHR
+ add $64, %edi
+# else
+ add $64, %edx
+# endif
+ pmovmskb %xmm4, %eax
+ test %eax, %eax
+ jnz L(matches0)
+
+# ifndef USE_AS_RAWMEMCHR
+ test $0x3f, %edi
+# else
+ test $0x3f, %edx
+# endif
+ jz L(align64_loop)
+
+# ifndef USE_AS_RAWMEMCHR
+ sub $64, %edx
+ jbe L(exit_loop)
+ movdqa (%edi), %xmm0
+# else
+ movdqa (%edx), %xmm0
+# endif
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 16(%edi), %xmm2
+# else
+ movdqa 16(%edx), %xmm2
+# endif
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 32(%edi), %xmm3
+# else
+ movdqa 32(%edx), %xmm3
+# endif
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 48(%edi), %xmm3
+# else
+ movdqa 48(%edx), %xmm3
+# endif
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+
+# ifndef USE_AS_RAWMEMCHR
+ add $64, %edi
+# else
+ add $64, %edx
+# endif
+ test %eax, %eax
+ jnz L(matches0)
+
+# ifndef USE_AS_RAWMEMCHR
+ mov %edi, %ecx
+ and $-64, %edi
+ and $63, %ecx
+ add %ecx, %edx
+# else
+ and $-64, %edx
+# endif
+
+ .p2align 4
+L(align64_loop):
+# ifndef USE_AS_RAWMEMCHR
+ sub $64, %edx
+ jbe L(exit_loop)
+ movdqa (%edi), %xmm0
+ movdqa 16(%edi), %xmm2
+ movdqa 32(%edi), %xmm3
+ movdqa 48(%edi), %xmm4
+# else
+ movdqa (%edx), %xmm0
+ movdqa 16(%edx), %xmm2
+ movdqa 32(%edx), %xmm3
+ movdqa 48(%edx), %xmm4
+# endif
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm1, %xmm2
+ pcmpeqb %xmm1, %xmm3
+ pcmpeqb %xmm1, %xmm4
+
+ pmaxub %xmm0, %xmm3
+ pmaxub %xmm2, %xmm4
+ pmaxub %xmm3, %xmm4
+ pmovmskb %xmm4, %eax
+
+# ifndef USE_AS_RAWMEMCHR
+ add $64, %edi
+# else
+ add $64, %edx
+# endif
+
+ test %eax, %eax
+ jz L(align64_loop)
+
+# ifndef USE_AS_RAWMEMCHR
+ sub $64, %edi
+# else
+ sub $64, %edx
+# endif
+
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches)
+
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 32(%edi), %xmm3
+# else
+ movdqa 32(%edx), %xmm3
+# endif
+
+ pcmpeqb %xmm1, %xmm3
+
+# ifndef USE_AS_RAWMEMCHR
+ pcmpeqb 48(%edi), %xmm1
+# else
+ pcmpeqb 48(%edx), %xmm1
+# endif
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ pmovmskb %xmm1, %eax
+ bsf %eax, %eax
+
+# ifndef USE_AS_RAWMEMCHR
+ lea 48(%edi, %eax), %eax
+ RETURN
+# else
+ lea 48(%edx, %eax), %eax
+ ret
+# endif
+
+# ifndef USE_AS_RAWMEMCHR
+ .p2align 4
+L(exit_loop):
+ add $64, %edx
+ cmp $32, %edx
+ jbe L(exit_loop_32)
+
+ movdqa (%edi), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches)
+
+ movdqa 16(%edi), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+ movdqa 32(%edi), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches32_1)
+ cmp $48, %edx
+ jbe L(return_null)
+
+ pcmpeqb 48(%edi), %xmm1
+ pmovmskb %xmm1, %eax
+ test %eax, %eax
+ jnz L(matches48_1)
+ xor %eax, %eax
+ RETURN
+
+ .p2align 4
+L(exit_loop_32):
+ movdqa (%edi), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches_1)
+ cmp $16, %edx
+ jbe L(return_null)
+
+ pcmpeqb 16(%edi), %xmm1
+ pmovmskb %xmm1, %eax
+ test %eax, %eax
+ jnz L(matches16_1)
+ xor %eax, %eax
+ RETURN
+# endif
+ .p2align 4
+L(matches0):
+ bsf %eax, %eax
+# ifndef USE_AS_RAWMEMCHR
+ lea -16(%eax, %edi), %eax
+ RETURN
+# else
+ lea -16(%eax, %edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(matches):
+ bsf %eax, %eax
+# ifndef USE_AS_RAWMEMCHR
+ add %edi, %eax
+ RETURN
+# else
+ add %edx, %eax
+ ret
+# endif
+
+ .p2align 4
+L(matches16):
+ bsf %eax, %eax
+# ifndef USE_AS_RAWMEMCHR
+ lea 16(%eax, %edi), %eax
+ RETURN
+# else
+ lea 16(%eax, %edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(matches32):
+ bsf %eax, %eax
+# ifndef USE_AS_RAWMEMCHR
+ lea 32(%eax, %edi), %eax
+ RETURN
+# else
+ lea 32(%eax, %edx), %eax
+ ret
+# endif
+
+# ifndef USE_AS_RAWMEMCHR
+ .p2align 4
+L(matches_1):
+ bsf %eax, %eax
+ sub %eax, %edx
+ jbe L(return_null)
+
+ add %edi, %eax
+ RETURN
+
+ .p2align 4
+L(matches16_1):
+ sub $16, %edx
+ bsf %eax, %eax
+ sub %eax, %edx
+ jbe L(return_null)
+
+ lea 16(%edi, %eax), %eax
+ RETURN
+
+ .p2align 4
+L(matches32_1):
+ sub $32, %edx
+ bsf %eax, %eax
+ sub %eax, %edx
+ jbe L(return_null)
+
+ lea 32(%edi, %eax), %eax
+ RETURN
+
+ .p2align 4
+L(matches48_1):
+ sub $48, %edx
+ bsf %eax, %eax
+ sub %eax, %edx
+ jbe L(return_null)
+
+ lea 48(%edi, %eax), %eax
+ RETURN
+# endif
+ .p2align 4
+L(return_null):
+ xor %eax, %eax
+# ifndef USE_AS_RAWMEMCHR
+ RETURN
+# else
+ ret
+# endif
+
+END (MEMCHR)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/memchr-sse2.S b/sysdeps/i386/i686/multiarch/memchr-sse2.S
new file mode 100644
index 0000000000..63d1d5d7bf
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/memchr-sse2.S
@@ -0,0 +1,706 @@
+/* Optimized memchr with sse2 without bsf
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+
+# include <sysdep.h>
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+
+# ifndef USE_AS_RAWMEMCHR
+# define ENTRANCE PUSH(%edi);
+# define PARMS 8
+# define RETURN POP(%edi); ret; CFI_PUSH(%edi);
+# else
+# define ENTRANCE
+# define PARMS 4
+# endif
+
+# define STR1 PARMS
+# define STR2 STR1+4
+
+# ifndef USE_AS_RAWMEMCHR
+# define LEN STR2+4
+# endif
+
+# ifndef MEMCHR
+# define MEMCHR __memchr_sse2
+# endif
+
+ atom_text_section
+ENTRY (MEMCHR)
+ ENTRANCE
+ mov STR1(%esp), %ecx
+ movd STR2(%esp), %xmm1
+# ifndef USE_AS_RAWMEMCHR
+ mov LEN(%esp), %edx
+ test %edx, %edx
+ jz L(return_null)
+# endif
+
+ punpcklbw %xmm1, %xmm1
+# ifndef USE_AS_RAWMEMCHR
+ mov %ecx, %edi
+# else
+ mov %ecx, %edx
+# endif
+ punpcklbw %xmm1, %xmm1
+
+ and $63, %ecx
+ pshufd $0, %xmm1, %xmm1
+ cmp $48, %ecx
+ ja L(crosscache)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqu (%edi), %xmm0
+# else
+ movdqu (%edx), %xmm0
+# endif
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+# ifndef USE_AS_RAWMEMCHR
+ jnz L(match_case2_prolog)
+
+ sub $16, %edx
+ jbe L(return_null)
+ lea 16(%edi), %edi
+ and $15, %ecx
+ and $-16, %edi
+ add %ecx, %edx
+# else
+ jnz L(match_case1_prolog)
+ lea 16(%edx), %edx
+ and $-16, %edx
+# endif
+ jmp L(loop_prolog)
+
+ .p2align 4
+L(crosscache):
+ and $15, %ecx
+# ifndef USE_AS_RAWMEMCHR
+ and $-16, %edi
+ movdqa (%edi), %xmm0
+# else
+ and $-16, %edx
+ movdqa (%edx), %xmm0
+# endif
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ sar %cl, %eax
+ test %eax, %eax
+
+# ifndef USE_AS_RAWMEMCHR
+ jnz L(match_case2_prolog1)
+ lea -16(%edx), %edx
+ add %ecx, %edx
+ jle L(return_null)
+ lea 16(%edi), %edi
+# else
+ jnz L(match_case1_prolog1)
+ lea 16(%edx), %edx
+# endif
+
+ .p2align 4
+L(loop_prolog):
+# ifndef USE_AS_RAWMEMCHR
+ sub $64, %edx
+ jbe L(exit_loop)
+ movdqa (%edi), %xmm0
+# else
+ movdqa (%edx), %xmm0
+# endif
+ pcmpeqb %xmm1, %xmm0
+ xor %ecx, %ecx
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 16(%edi), %xmm2
+# else
+ movdqa 16(%edx), %xmm2
+# endif
+ pcmpeqb %xmm1, %xmm2
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 32(%edi), %xmm3
+# else
+ movdqa 32(%edx), %xmm3
+# endif
+ pcmpeqb %xmm1, %xmm3
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 48(%edi), %xmm4
+# else
+ movdqa 48(%edx), %xmm4
+# endif
+ pcmpeqb %xmm1, %xmm4
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm4, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ lea 64(%edi), %edi
+ sub $64, %edx
+ jbe L(exit_loop)
+
+ movdqa (%edi), %xmm0
+# else
+ lea 64(%edx), %edx
+ movdqa (%edx), %xmm0
+# endif
+ pcmpeqb %xmm1, %xmm0
+ xor %ecx, %ecx
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 16(%edi), %xmm2
+# else
+ movdqa 16(%edx), %xmm2
+# endif
+ pcmpeqb %xmm1, %xmm2
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 32(%edi), %xmm3
+# else
+ movdqa 32(%edx), %xmm3
+# endif
+ pcmpeqb %xmm1, %xmm3
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 48(%edi), %xmm4
+# else
+ movdqa 48(%edx), %xmm4
+# endif
+ pcmpeqb %xmm1, %xmm4
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm4, %eax
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ lea 64(%edi), %edi
+ mov %edi, %ecx
+ and $-64, %edi
+ and $63, %ecx
+ add %ecx, %edx
+# else
+ lea 64(%edx), %edx
+ and $-64, %edx
+# endif
+
+ .p2align 4
+L(align64_loop):
+
+# ifndef USE_AS_RAWMEMCHR
+ sub $64, %edx
+ jbe L(exit_loop)
+ movdqa (%edi), %xmm0
+ movdqa 16(%edi), %xmm2
+ movdqa 32(%edi), %xmm3
+ movdqa 48(%edi), %xmm4
+# else
+ movdqa (%edx), %xmm0
+ movdqa 16(%edx), %xmm2
+ movdqa 32(%edx), %xmm3
+ movdqa 48(%edx), %xmm4
+# endif
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm1, %xmm2
+ pcmpeqb %xmm1, %xmm3
+ pcmpeqb %xmm1, %xmm4
+
+ pmaxub %xmm0, %xmm3
+ pmaxub %xmm2, %xmm4
+ pmaxub %xmm3, %xmm4
+# ifndef USE_AS_RAWMEMCHR
+ add $64, %edi
+# else
+ add $64, %edx
+# endif
+ pmovmskb %xmm4, %eax
+
+ test %eax, %eax
+ jz L(align64_loop)
+
+# ifndef USE_AS_RAWMEMCHR
+ sub $64, %edi
+# else
+ sub $64, %edx
+# endif
+
+ pmovmskb %xmm0, %eax
+ xor %ecx, %ecx
+ test %eax, %eax
+ jnz L(match_case1)
+
+ pmovmskb %xmm2, %eax
+ lea 16(%ecx), %ecx
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ movdqa 32(%edi), %xmm3
+# else
+ movdqa 32(%edx), %xmm3
+# endif
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ lea 16(%ecx), %ecx
+ test %eax, %eax
+ jnz L(match_case1)
+
+# ifndef USE_AS_RAWMEMCHR
+ pcmpeqb 48(%edi), %xmm1
+# else
+ pcmpeqb 48(%edx), %xmm1
+# endif
+ pmovmskb %xmm1, %eax
+ lea 16(%ecx), %ecx
+
+ .p2align 4
+L(match_case1):
+# ifndef USE_AS_RAWMEMCHR
+ add %ecx, %edi
+# else
+L(match_case1_prolog1):
+ add %ecx, %edx
+L(match_case1_prolog):
+# endif
+ test %al, %al
+ jz L(match_case1_high)
+ mov %al, %cl
+ and $15, %cl
+ jz L(match_case1_8)
+ test $0x01, %al
+ jnz L(ExitCase1_1)
+ test $0x02, %al
+ jnz L(ExitCase1_2)
+ test $0x04, %al
+ jnz L(ExitCase1_3)
+# ifndef USE_AS_RAWMEMCHR
+ lea 3(%edi), %eax
+ RETURN
+# else
+ lea 3(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(match_case1_8):
+ test $0x10, %al
+ jnz L(ExitCase1_5)
+ test $0x20, %al
+ jnz L(ExitCase1_6)
+ test $0x40, %al
+ jnz L(ExitCase1_7)
+# ifndef USE_AS_RAWMEMCHR
+ lea 7(%edi), %eax
+ RETURN
+# else
+ lea 7(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(match_case1_high):
+ mov %ah, %ch
+ and $15, %ch
+ jz L(match_case1_high_8)
+ test $0x01, %ah
+ jnz L(ExitCase1_9)
+ test $0x02, %ah
+ jnz L(ExitCase1_10)
+ test $0x04, %ah
+ jnz L(ExitCase1_11)
+# ifndef USE_AS_RAWMEMCHR
+ lea 11(%edi), %eax
+ RETURN
+# else
+ lea 11(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(match_case1_high_8):
+ test $0x10, %ah
+ jnz L(ExitCase1_13)
+ test $0x20, %ah
+ jnz L(ExitCase1_14)
+ test $0x40, %ah
+ jnz L(ExitCase1_15)
+# ifndef USE_AS_RAWMEMCHR
+ lea 15(%edi), %eax
+ RETURN
+# else
+ lea 15(%edx), %eax
+ ret
+# endif
+
+# ifndef USE_AS_RAWMEMCHR
+ .p2align 4
+L(exit_loop):
+ add $64, %edx
+
+ movdqa (%edi), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ xor %ecx, %ecx
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(match_case2)
+ cmp $16, %edx
+ jbe L(return_null)
+
+ movdqa 16(%edi), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(match_case2)
+ cmp $32, %edx
+ jbe L(return_null)
+
+ movdqa 32(%edi), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(match_case2)
+ cmp $48, %edx
+ jbe L(return_null)
+
+ pcmpeqb 48(%edi), %xmm1
+ lea 16(%ecx), %ecx
+ pmovmskb %xmm1, %eax
+ test %eax, %eax
+ jnz L(match_case2)
+
+ xor %eax, %eax
+ RETURN
+# endif
+
+ .p2align 4
+L(ExitCase1_1):
+# ifndef USE_AS_RAWMEMCHR
+ mov %edi, %eax
+ RETURN
+# else
+ mov %edx, %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_2):
+# ifndef USE_AS_RAWMEMCHR
+ lea 1(%edi), %eax
+ RETURN
+# else
+ lea 1(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_3):
+# ifndef USE_AS_RAWMEMCHR
+ lea 2(%edi), %eax
+ RETURN
+# else
+ lea 2(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_5):
+# ifndef USE_AS_RAWMEMCHR
+ lea 4(%edi), %eax
+ RETURN
+# else
+ lea 4(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_6):
+# ifndef USE_AS_RAWMEMCHR
+ lea 5(%edi), %eax
+ RETURN
+# else
+ lea 5(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_7):
+# ifndef USE_AS_RAWMEMCHR
+ lea 6(%edi), %eax
+ RETURN
+# else
+ lea 6(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_9):
+# ifndef USE_AS_RAWMEMCHR
+ lea 8(%edi), %eax
+ RETURN
+# else
+ lea 8(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_10):
+# ifndef USE_AS_RAWMEMCHR
+ lea 9(%edi), %eax
+ RETURN
+# else
+ lea 9(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_11):
+# ifndef USE_AS_RAWMEMCHR
+ lea 10(%edi), %eax
+ RETURN
+# else
+ lea 10(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_13):
+# ifndef USE_AS_RAWMEMCHR
+ lea 12(%edi), %eax
+ RETURN
+# else
+ lea 12(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_14):
+# ifndef USE_AS_RAWMEMCHR
+ lea 13(%edi), %eax
+ RETURN
+# else
+ lea 13(%edx), %eax
+ ret
+# endif
+
+ .p2align 4
+L(ExitCase1_15):
+# ifndef USE_AS_RAWMEMCHR
+ lea 14(%edi), %eax
+ RETURN
+# else
+ lea 14(%edx), %eax
+ ret
+# endif
+
+# ifndef USE_AS_RAWMEMCHR
+ .p2align 4
+L(match_case2):
+ sub %ecx, %edx
+L(match_case2_prolog1):
+ add %ecx, %edi
+L(match_case2_prolog):
+ test %al, %al
+ jz L(match_case2_high)
+ mov %al, %cl
+ and $15, %cl
+ jz L(match_case2_8)
+ test $0x01, %al
+ jnz L(ExitCase2_1)
+ test $0x02, %al
+ jnz L(ExitCase2_2)
+ test $0x04, %al
+ jnz L(ExitCase2_3)
+ sub $4, %edx
+ jb L(return_null)
+ lea 3(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(match_case2_8):
+ test $0x10, %al
+ jnz L(ExitCase2_5)
+ test $0x20, %al
+ jnz L(ExitCase2_6)
+ test $0x40, %al
+ jnz L(ExitCase2_7)
+ sub $8, %edx
+ jb L(return_null)
+ lea 7(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(match_case2_high):
+ mov %ah, %ch
+ and $15, %ch
+ jz L(match_case2_high_8)
+ test $0x01, %ah
+ jnz L(ExitCase2_9)
+ test $0x02, %ah
+ jnz L(ExitCase2_10)
+ test $0x04, %ah
+ jnz L(ExitCase2_11)
+ sub $12, %edx
+ jb L(return_null)
+ lea 11(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(match_case2_high_8):
+ test $0x10, %ah
+ jnz L(ExitCase2_13)
+ test $0x20, %ah
+ jnz L(ExitCase2_14)
+ test $0x40, %ah
+ jnz L(ExitCase2_15)
+ sub $16, %edx
+ jb L(return_null)
+ lea 15(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_1):
+ mov %edi, %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_2):
+ sub $2, %edx
+ jb L(return_null)
+ lea 1(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_3):
+ sub $3, %edx
+ jb L(return_null)
+ lea 2(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_5):
+ sub $5, %edx
+ jb L(return_null)
+ lea 4(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_6):
+ sub $6, %edx
+ jb L(return_null)
+ lea 5(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_7):
+ sub $7, %edx
+ jb L(return_null)
+ lea 6(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_9):
+ sub $9, %edx
+ jb L(return_null)
+ lea 8(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_10):
+ sub $10, %edx
+ jb L(return_null)
+ lea 9(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_11):
+ sub $11, %edx
+ jb L(return_null)
+ lea 10(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_13):
+ sub $13, %edx
+ jb L(return_null)
+ lea 12(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_14):
+ sub $14, %edx
+ jb L(return_null)
+ lea 13(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(ExitCase2_15):
+ sub $15, %edx
+ jb L(return_null)
+ lea 14(%edi), %eax
+ RETURN
+# endif
+
+ .p2align 4
+L(return_null):
+ xor %eax, %eax
+# ifndef USE_AS_RAWMEMCHR
+ RETURN
+# else
+ ret
+# endif
+
+END (MEMCHR)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/memchr.S b/sysdeps/i386/i686/multiarch/memchr.S
new file mode 100644
index 0000000000..163a83e17b
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/memchr.S
@@ -0,0 +1,99 @@
+/* Multiple versions of memchr
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+ .text
+ENTRY(__memchr)
+ .type __memchr, @gnu_indirect_function
+ pushl %ebx
+ CFI_PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+
+1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx)
+ jz 3f
+
+ leal __memchr_sse2@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+
+ CFI_PUSH (%ebx)
+
+2: leal __memchr_ia32@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+
+ CFI_PUSH (%ebx)
+
+3: leal __memchr_sse2_bsf@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+END(__memchr)
+
+weak_alias(__memchr, memchr)
+
+# undef ENTRY
+# define ENTRY(name) \
+ .type __memchr_ia32, @function; \
+ .globl __memchr_ia32; \
+ .p2align 4; \
+ __memchr_ia32: cfi_startproc; \
+ CALL_MCOUNT
+# undef END
+# define END(name) \
+ cfi_endproc; .size __memchr_ia32, .-__memchr_ia32
+
+# undef libc_hidden_builtin_def
+/* IFUNC doesn't work with the hidden functions in shared library since
+ they will be called without setting up EBX needed for PLT which is
+ used by IFUNC. */
+# define libc_hidden_builtin_def(name) \
+ .globl __GI_memchr; __GI_memchr = __memchr_ia32
+
+#endif
+#include "../../memchr.S"
diff --git a/sysdeps/i386/i686/multiarch/memcmp-sse4.S b/sysdeps/i386/i686/multiarch/memcmp-sse4.S
index b1ed778f1f..1f5dbc15cb 100644
--- a/sysdeps/i386/i686/multiarch/memcmp-sse4.S
+++ b/sysdeps/i386/i686/multiarch/memcmp-sse4.S
@@ -1,5 +1,5 @@
-/* memcmp with SSE4.2
- Copyright (C) 2010 Free Software Foundation, Inc.
+/* memcmp with SSE4.2, wmemcmp with SSE4.2
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -20,84 +20,97 @@
#ifndef NOT_IN_libc
-#include <sysdep.h>
-#include "asm-syntax.h"
+# include <sysdep.h>
-#ifndef MEMCMP
-# define MEMCMP __memcmp_sse4_2
-#endif
+# ifndef MEMCMP
+# define MEMCMP __memcmp_sse4_2
+# endif
-#define CFI_PUSH(REG) \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (REG, 0)
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
-#define CFI_POP(REG) \
- cfi_adjust_cfa_offset (-4); \
- cfi_restore (REG)
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
-#define PUSH(REG) pushl REG; CFI_PUSH (REG)
-#define POP(REG) popl REG; CFI_POP (REG)
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
-#define PARMS 4
-#define BLK1 PARMS
-#define BLK2 BLK1+4
-#define LEN BLK2+4
-#define RETURN POP (%ebx); ret; CFI_PUSH (%ebx)
+# define PARMS 4
+# define BLK1 PARMS
+# define BLK2 BLK1 + 4
+# define LEN BLK2 + 4
+# define RETURN POP (%ebx); ret; CFI_PUSH (%ebx)
-#ifdef SHARED
-# define JMPTBL(I, B) I - B
+# ifdef SHARED
+# define JMPTBL(I, B) I - B
/* Load an entry in a jump table into EBX and branch to it. TABLE is a
- jump table with relative offsets. INDEX is a register contains the
- index into the jump table. SCALE is the scale of INDEX. */
-# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
- /* We first load PC into EBX. */ \
- call __i686.get_pc_thunk.bx; \
- /* Get the address of the jump table. */ \
- addl $(TABLE - .), %ebx; \
- /* Get the entry and convert the relative offset to the \
- absolute address. */ \
- addl (%ebx,INDEX,SCALE), %ebx; \
- /* We loaded the jump table and adjuested EDX/ESI. Go. */ \
- jmp *%ebx
-
- .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
- .globl __i686.get_pc_thunk.bx
- .hidden __i686.get_pc_thunk.bx
- ALIGN (4)
- .type __i686.get_pc_thunk.bx,@function
-__i686.get_pc_thunk.bx:
- movl (%esp), %ebx
- ret
-#else
-# define JMPTBL(I, B) I
+ jump table with relative offsets. INDEX is a register contains the
+ index into the jump table. SCALE is the scale of INDEX. */
+
+# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
+/* We first load PC into EBX. */ \
+ call __i686.get_pc_thunk.bx; \
+/* Get the address of the jump table. */ \
+ addl $(TABLE - .), %ebx; \
+/* Get the entry and convert the relative offset to the \
+ absolute address. */ \
+ addl (%ebx,INDEX,SCALE), %ebx; \
+/* We loaded the jump table and adjuested EDX/ESI. Go. */ \
+ jmp *%ebx
+# else
+# define JMPTBL(I, B) I
/* Load an entry in a jump table into EBX and branch to it. TABLE is a
- jump table with relative offsets. INDEX is a register contains the
- index into the jump table. SCALE is the scale of INDEX. */
-# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
- jmp *TABLE(,INDEX,SCALE)
-#endif
+ jump table with relative offsets. INDEX is a register contains the
+ index into the jump table. SCALE is the scale of INDEX. */
+# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
+ jmp *TABLE(,INDEX,SCALE)
+# endif
+
+
+/* Warning!
+ wmemcmp has to use SIGNED comparison for elements.
+ memcmp has to use UNSIGNED comparison for elemnts.
+*/
.section .text.sse4.2,"ax",@progbits
ENTRY (MEMCMP)
movl BLK1(%esp), %eax
movl BLK2(%esp), %edx
movl LEN(%esp), %ecx
+
+# ifdef USE_AS_WMEMCMP
+ shl $2, %ecx
+ test %ecx, %ecx
+ jz L(return0)
+# else
cmp $1, %ecx
jbe L(less1bytes)
+# endif
+
pxor %xmm0, %xmm0
cmp $64, %ecx
ja L(64bytesormore)
cmp $8, %ecx
- PUSH (%ebx)
+
+# ifndef USE_AS_WMEMCMP
+ PUSH (%ebx)
+ jb L(less8bytes)
+# else
jb L(less8bytes)
+ PUSH (%ebx)
+# endif
+
add %ecx, %edx
add %ecx, %eax
BRANCH_TO_JMPTBL_ENTRY(L(table_64bytes), %ecx, 4)
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(less8bytes):
mov (%eax), %bl
cmpb (%edx), %bl
@@ -141,22 +154,49 @@ L(less8bytes):
mov 6(%eax), %bl
cmpb 6(%edx), %bl
je L(0bytes)
+
L(nonzero):
- POP (%ebx)
+ POP (%ebx)
mov $1, %eax
ja L(above)
neg %eax
L(above):
ret
CFI_PUSH (%ebx)
+# endif
- ALIGN (4)
+ .p2align 4
L(0bytes):
- POP (%ebx)
+ POP (%ebx)
xor %eax, %eax
ret
- ALIGN (4)
+# ifdef USE_AS_WMEMCMP
+
+/* for wmemcmp, case N == 1 */
+
+ .p2align 4
+L(less8bytes):
+ mov (%eax), %ecx
+ cmp (%edx), %ecx
+ je L(return0)
+ mov $1, %eax
+ jg L(find_diff_bigger)
+ neg %eax
+ ret
+
+ .p2align 4
+L(find_diff_bigger):
+ ret
+
+ .p2align 4
+L(return0):
+ xor %eax, %eax
+ ret
+# endif
+
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(less1bytes):
jb L(0bytesend)
movzbl (%eax), %eax
@@ -164,14 +204,14 @@ L(less1bytes):
sub %edx, %eax
ret
- ALIGN (4)
+ .p2align 4
L(0bytesend):
xor %eax, %eax
ret
-
- ALIGN (4)
+# endif
+ .p2align 4
L(64bytesormore):
- PUSH (%ebx)
+ PUSH (%ebx)
mov %ecx, %ebx
mov $64, %ecx
sub $64, %ebx
@@ -208,7 +248,14 @@ L(64bytesormore_loop):
add %ecx, %eax
BRANCH_TO_JMPTBL_ENTRY(L(table_64bytes), %ecx, 4)
- ALIGN (4)
+# ifdef USE_AS_WMEMCMP
+
+/* Label needs only for table_64bytes filling */
+L(unreal_case):
+/* no code here */
+
+# endif
+ .p2align 4
L(find_16diff):
sub $16, %ecx
L(find_32diff):
@@ -218,9 +265,9 @@ L(find_48diff):
L(find_64diff):
add %ecx, %edx
add %ecx, %eax
- jmp L(16bytes)
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(16bytes):
mov -16(%eax), %ecx
mov -16(%edx), %ebx
@@ -243,8 +290,30 @@ L(4bytes):
mov $0, %eax
jne L(find_diff)
RETURN
+# else
+ .p2align 4
+L(16bytes):
+ mov -16(%eax), %ecx
+ cmp -16(%edx), %ecx
+ jne L(find_diff)
+L(12bytes):
+ mov -12(%eax), %ecx
+ cmp -12(%edx), %ecx
+ jne L(find_diff)
+L(8bytes):
+ mov -8(%eax), %ecx
+ cmp -8(%edx), %ecx
+ jne L(find_diff)
+L(4bytes):
+ mov -4(%eax), %ecx
+ cmp -4(%edx), %ecx
+ mov $0, %eax
+ jne L(find_diff)
+ RETURN
+# endif
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(49bytes):
movdqu -49(%eax), %xmm1
movdqu -49(%edx), %xmm2
@@ -285,7 +354,7 @@ L(5bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(50bytes):
mov $-50, %ebx
movdqu -50(%eax), %xmm1
@@ -330,7 +399,7 @@ L(2bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(51bytes):
mov $-51, %ebx
movdqu -51(%eax), %xmm1
@@ -378,8 +447,8 @@ L(1bytes):
mov $0, %eax
jne L(end)
RETURN
-
- ALIGN (4)
+# endif
+ .p2align 4
L(52bytes):
movdqu -52(%eax), %xmm1
movdqu -52(%edx), %xmm2
@@ -402,13 +471,18 @@ L(20bytes):
ptest %xmm2, %xmm0
jnc L(less16bytes)
mov -4(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -4(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -4(%edx), %ecx
+# endif
mov $0, %eax
jne L(find_diff)
RETURN
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(53bytes):
movdqu -53(%eax), %xmm1
movdqu -53(%edx), %xmm2
@@ -440,7 +514,7 @@ L(21bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(54bytes):
movdqu -54(%eax), %xmm1
movdqu -54(%edx), %xmm2
@@ -476,7 +550,7 @@ L(22bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(55bytes):
movdqu -55(%eax), %xmm1
movdqu -55(%edx), %xmm2
@@ -513,8 +587,8 @@ L(23bytes):
mov $0, %eax
jne L(end)
RETURN
-
- ALIGN (4)
+# endif
+ .p2align 4
L(56bytes):
movdqu -56(%eax), %xmm1
movdqu -56(%edx), %xmm2
@@ -538,18 +612,27 @@ L(24bytes):
jnc L(less16bytes)
mov -8(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -8(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -8(%edx), %ecx
+# endif
jne L(find_diff)
mov -4(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -4(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -4(%edx), %ecx
+# endif
mov $0, %eax
jne L(find_diff)
RETURN
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(57bytes):
movdqu -57(%eax), %xmm1
movdqu -57(%edx), %xmm2
@@ -585,7 +668,7 @@ L(25bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(58bytes):
movdqu -58(%eax), %xmm1
movdqu -58(%edx), %xmm2
@@ -627,7 +710,7 @@ L(26bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(59bytes):
movdqu -59(%eax), %xmm1
movdqu -59(%edx), %xmm2
@@ -668,8 +751,8 @@ L(27bytes):
mov $0, %eax
jne L(end)
RETURN
-
- ALIGN (4)
+# endif
+ .p2align 4
L(60bytes):
movdqu -60(%eax), %xmm1
movdqu -60(%edx), %xmm2
@@ -691,22 +774,38 @@ L(28bytes):
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
+
mov -12(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -12(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -12(%edx), %ecx
+# endif
jne L(find_diff)
+
mov -8(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -8(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -8(%edx), %ecx
+# endif
jne L(find_diff)
+
mov -4(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -4(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -4(%edx), %ecx
+# endif
mov $0, %eax
jne L(find_diff)
RETURN
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(61bytes):
movdqu -61(%eax), %xmm1
movdqu -61(%edx), %xmm2
@@ -749,7 +848,7 @@ L(29bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(62bytes):
movdqu -62(%eax), %xmm1
movdqu -62(%edx), %xmm2
@@ -792,7 +891,7 @@ L(30bytes):
jne L(end)
RETURN
- ALIGN (4)
+ .p2align 4
L(63bytes):
movdqu -63(%eax), %xmm1
movdqu -63(%edx), %xmm2
@@ -838,8 +937,9 @@ L(31bytes):
mov $0, %eax
jne L(end)
RETURN
+# endif
- ALIGN (4)
+ .p2align 4
L(64bytes):
movdqu -64(%eax), %xmm1
movdqu -64(%edx), %xmm2
@@ -863,28 +963,45 @@ L(32bytes):
jnc L(less16bytes)
mov -16(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -16(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -16(%edx), %ecx
+# endif
jne L(find_diff)
mov -12(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -12(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -12(%edx), %ecx
+# endif
jne L(find_diff)
mov -8(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -8(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -8(%edx), %ecx
+# endif
jne L(find_diff)
mov -4(%eax), %ecx
+# ifndef USE_AS_WMEMCMP
mov -4(%edx), %ebx
cmp %ebx, %ecx
+# else
+ cmp -4(%edx), %ecx
+# endif
mov $0, %eax
jne L(find_diff)
RETURN
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(less16bytes):
add %ebx, %eax
add %ebx, %edx
@@ -910,9 +1027,35 @@ L(less16bytes):
mov $0, %eax
jne L(find_diff)
RETURN
+# else
+ .p2align 4
+L(less16bytes):
+ add %ebx, %eax
+ add %ebx, %edx
+
+ mov (%eax), %ecx
+ cmp (%edx), %ecx
+ jne L(find_diff)
+
+ mov 4(%eax), %ecx
+ cmp 4(%edx), %ecx
+ jne L(find_diff)
+
+ mov 8(%eax), %ecx
+ cmp 8(%edx), %ecx
+ jne L(find_diff)
+
+ mov 12(%eax), %ecx
+ cmp 12(%edx), %ecx
+
+ mov $0, %eax
+ jne L(find_diff)
+ RETURN
+# endif
- ALIGN (4)
+ .p2align 4
L(find_diff):
+# ifndef USE_AS_WMEMCMP
cmpb %bl, %cl
jne L(end)
cmp %bx, %cx
@@ -923,17 +1066,29 @@ L(find_diff):
jne L(end)
cmp %bx, %cx
L(end):
- POP (%ebx)
+ POP (%ebx)
mov $1, %eax
ja L(bigger)
neg %eax
L(bigger):
ret
+# else
+ POP (%ebx)
+ mov $1, %eax
+ jg L(bigger)
+ neg %eax
+ ret
+
+ .p2align 4
+L(bigger):
+ ret
+# endif
END (MEMCMP)
.section .rodata.sse4.2,"a",@progbits
- ALIGN (2)
+ .p2align 2
.type L(table_64bytes), @object
+# ifndef USE_AS_WMEMCMP
L(table_64bytes):
.int JMPTBL (L(0bytes), L(table_64bytes))
.int JMPTBL (L(1bytes), L(table_64bytes))
@@ -1000,5 +1155,72 @@ L(table_64bytes):
.int JMPTBL (L(62bytes), L(table_64bytes))
.int JMPTBL (L(63bytes), L(table_64bytes))
.int JMPTBL (L(64bytes), L(table_64bytes))
- .size L(table_64bytes), .-L(table_64bytes)
+# else
+L(table_64bytes):
+ .int JMPTBL (L(0bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(4bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(8bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(12bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(16bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(20bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(24bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(28bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(32bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(36bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(40bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(44bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(48bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(52bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(56bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(60bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(64bytes), L(table_64bytes))
+# endif
#endif
diff --git a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
index 2e0d15fe55..eab85c1de1 100644
--- a/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/memcmp-ssse3.S
@@ -1,5 +1,5 @@
-/* memcmp with SSSE3
- Copyright (C) 2010 Free Software Foundation, Inc.
+/* memcmp with SSSE3, wmemcmp with SSSE3
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -20,47 +20,64 @@
#ifndef NOT_IN_libc
-#include <sysdep.h>
-#include "asm-syntax.h"
+# include <sysdep.h>
-#ifndef MEMCMP
-# define MEMCMP __memcmp_ssse3
-#endif
+# ifndef MEMCMP
+# define MEMCMP __memcmp_ssse3
+# endif
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
-#define CFI_PUSH(REG) \
- cfi_adjust_cfa_offset (4); \
- cfi_rel_offset (REG, 0)
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
-#define CFI_POP(REG) \
- cfi_adjust_cfa_offset (-4); \
- cfi_restore (REG)
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
-#define PUSH(REG) pushl REG; CFI_PUSH (REG)
-#define POP(REG) popl REG; CFI_POP (REG)
+# define PARMS 4
+# define BLK1 PARMS
+# define BLK2 BLK1+4
+# define LEN BLK2+4
+# define RETURN_END POP (%edi); POP (%esi); POP (%ebx); ret
+# define RETURN RETURN_END; cfi_restore_state; cfi_remember_state
-#define PARMS 4
-#define BLK1 PARMS
-#define BLK2 BLK1+4
-#define LEN BLK2+4
-#define RETURN_END POP (%edi); POP (%esi); POP (%ebx); ret
-#define RETURN RETURN_END; cfi_restore_state; cfi_remember_state
+/* Warning!
+ wmemcmp has to use SIGNED comparison for elements.
+ memcmp has to use UNSIGNED comparison for elemnts.
+*/
- .section .text.ssse3,"ax",@progbits
+ atom_text_section
ENTRY (MEMCMP)
movl LEN(%esp), %ecx
+
+# ifdef USE_AS_WMEMCMP
+ shl $2, %ecx
+ test %ecx, %ecx
+ jz L(zero)
+# endif
+
movl BLK1(%esp), %eax
cmp $48, %ecx
movl BLK2(%esp), %edx
jae L(48bytesormore)
+
+# ifndef USE_AS_WMEMCMP
cmp $1, %ecx
jbe L(less1bytes)
- PUSH (%ebx)
+# endif
+
+ PUSH (%ebx)
add %ecx, %edx
add %ecx, %eax
jmp L(less48bytes)
- ALIGN (4)
- CFI_POP (%ebx)
+ CFI_POP (%ebx)
+
+# ifndef USE_AS_WMEMCMP
+ .p2align 4
L(less1bytes):
jb L(zero)
movb (%eax), %cl
@@ -71,29 +88,30 @@ L(less1bytes):
neg %eax
L(1bytesend):
ret
+# endif
- ALIGN (4)
+ .p2align 4
L(zero):
- mov $0, %eax
+ xor %eax, %eax
ret
- ALIGN (4)
+ .p2align 4
L(48bytesormore):
- PUSH (%ebx)
- PUSH (%esi)
- PUSH (%edi)
+ PUSH (%ebx)
+ PUSH (%esi)
+ PUSH (%edi)
cfi_remember_state
- movdqu (%eax), %xmm3
- movdqu (%edx), %xmm0
+ movdqu (%eax), %xmm3
+ movdqu (%edx), %xmm0
movl %eax, %edi
movl %edx, %esi
- pcmpeqb %xmm0, %xmm3
- pmovmskb %xmm3, %edx
+ pcmpeqb %xmm0, %xmm3
+ pmovmskb %xmm3, %edx
lea 16(%edi), %edi
- sub $0xffff, %edx
+ sub $0xffff, %edx
lea 16(%esi), %esi
- jnz L(less16bytes)
+ jnz L(less16bytes)
mov %edi, %edx
and $0xf, %edx
xor %edx, %edi
@@ -104,6 +122,7 @@ L(48bytesormore):
jz L(shr_0)
xor %edx, %esi
+# ifndef USE_AS_WMEMCMP
cmp $8, %edx
jae L(next_unaligned_table)
cmp $0, %edx
@@ -122,7 +141,7 @@ L(48bytesormore):
je L(shr_6)
jmp L(shr_7)
- ALIGN (4)
+ .p2align 2
L(next_unaligned_table):
cmp $8, %edx
je L(shr_8)
@@ -139,8 +158,17 @@ L(next_unaligned_table):
cmp $14, %edx
je L(shr_14)
jmp L(shr_15)
+# else
+ cmp $0, %edx
+ je L(shr_0)
+ cmp $4, %edx
+ je L(shr_4)
+ cmp $8, %edx
+ je L(shr_8)
+ jmp L(shr_12)
+# endif
- ALIGN (4)
+ .p2align 4
L(shr_0):
cmp $80, %ecx
jae L(shr_0_gobble)
@@ -159,13 +187,13 @@ L(shr_0):
lea (%ecx, %edi,1), %eax
lea (%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_0_gobble):
lea -48(%ecx), %ecx
movdqa (%esi), %xmm0
@@ -205,13 +233,14 @@ L(shr_0_gobble_loop_next):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea (%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# ifndef USE_AS_WMEMCMP
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_1):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -235,13 +264,13 @@ L(shr_1):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 1(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_1_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -288,14 +317,14 @@ L(shr_1_gobble_next):
lea (%ecx, %edi,1), %eax
lea 1(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_2):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -319,13 +348,13 @@ L(shr_2):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 2(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_2_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -372,13 +401,13 @@ L(shr_2_gobble_next):
lea (%ecx, %edi,1), %eax
lea 2(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_3):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -402,13 +431,13 @@ L(shr_3):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 3(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_3_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -455,13 +484,14 @@ L(shr_3_gobble_next):
lea (%ecx, %edi,1), %eax
lea 3(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# endif
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_4):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -485,13 +515,13 @@ L(shr_4):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 4(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_4_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -538,13 +568,14 @@ L(shr_4_gobble_next):
lea (%ecx, %edi,1), %eax
lea 4(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# ifndef USE_AS_WMEMCMP
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_5):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -568,13 +599,13 @@ L(shr_5):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 5(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_5_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -621,13 +652,13 @@ L(shr_5_gobble_next):
lea (%ecx, %edi,1), %eax
lea 5(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_6):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -651,13 +682,13 @@ L(shr_6):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 6(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_6_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -704,13 +735,13 @@ L(shr_6_gobble_next):
lea (%ecx, %edi,1), %eax
lea 6(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_7):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -734,13 +765,13 @@ L(shr_7):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 7(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_7_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -787,13 +818,14 @@ L(shr_7_gobble_next):
lea (%ecx, %edi,1), %eax
lea 7(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# endif
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_8):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -817,13 +849,13 @@ L(shr_8):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 8(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_8_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -870,13 +902,14 @@ L(shr_8_gobble_next):
lea (%ecx, %edi,1), %eax
lea 8(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# ifndef USE_AS_WMEMCMP
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_9):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -900,13 +933,13 @@ L(shr_9):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 9(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_9_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -953,13 +986,13 @@ L(shr_9_gobble_next):
lea (%ecx, %edi,1), %eax
lea 9(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_10):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -983,13 +1016,13 @@ L(shr_10):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 10(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_10_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -1036,13 +1069,13 @@ L(shr_10_gobble_next):
lea (%ecx, %edi,1), %eax
lea 10(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_11):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -1066,13 +1099,13 @@ L(shr_11):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 11(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_11_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -1119,13 +1152,14 @@ L(shr_11_gobble_next):
lea (%ecx, %edi,1), %eax
lea 11(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# endif
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_12):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -1149,13 +1183,13 @@ L(shr_12):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 12(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_12_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -1202,13 +1236,14 @@ L(shr_12_gobble_next):
lea (%ecx, %edi,1), %eax
lea 12(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# ifndef USE_AS_WMEMCMP
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_13):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -1232,13 +1267,13 @@ L(shr_13):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 13(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_13_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -1285,13 +1320,13 @@ L(shr_13_gobble_next):
lea (%ecx, %edi,1), %eax
lea 13(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_14):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -1315,13 +1350,13 @@ L(shr_14):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 14(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_14_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -1368,13 +1403,13 @@ L(shr_14_gobble_next):
lea (%ecx, %edi,1), %eax
lea 14(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_15):
cmp $80, %ecx
lea -48(%ecx), %ecx
@@ -1398,13 +1433,13 @@ L(shr_15):
jnz L(exit)
lea (%ecx, %edi,1), %eax
lea 15(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(shr_15_gobble):
sub $32, %ecx
movdqa 16(%esi), %xmm0
@@ -1451,13 +1486,14 @@ L(shr_15_gobble_next):
lea (%ecx, %edi,1), %eax
lea 15(%ecx, %esi,1), %edx
- POP (%edi)
- POP (%esi)
+ POP (%edi)
+ POP (%esi)
jmp L(less48bytes)
+# endif
cfi_restore_state
cfi_remember_state
- ALIGN (4)
+ .p2align 4
L(exit):
pmovmskb %xmm1, %ebx
sub $0xffff, %ebx
@@ -1465,9 +1501,12 @@ L(exit):
lea -16(%esi), %esi
lea -16(%edi), %edi
mov %ebx, %edx
+
L(first16bytes):
add %eax, %esi
L(less16bytes):
+
+# ifndef USE_AS_WMEMCMP
test %dl, %dl
jz L(next_24_bytes)
@@ -1492,61 +1531,61 @@ L(less16bytes):
test $0x40, %dl
jnz L(Byte22)
L(Byte23):
- movzbl -9(%edi), %eax
- movzbl -9(%esi), %edx
+ movzbl -9(%edi), %eax
+ movzbl -9(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(Byte16):
- movzbl -16(%edi), %eax
- movzbl -16(%esi), %edx
+ movzbl -16(%edi), %eax
+ movzbl -16(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(Byte17):
- movzbl -15(%edi), %eax
- movzbl -15(%esi), %edx
+ movzbl -15(%edi), %eax
+ movzbl -15(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(Byte18):
- movzbl -14(%edi), %eax
- movzbl -14(%esi), %edx
+ movzbl -14(%edi), %eax
+ movzbl -14(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(Byte19):
- movzbl -13(%edi), %eax
- movzbl -13(%esi), %edx
+ movzbl -13(%edi), %eax
+ movzbl -13(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(Byte20):
- movzbl -12(%edi), %eax
- movzbl -12(%esi), %edx
+ movzbl -12(%edi), %eax
+ movzbl -12(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(Byte21):
- movzbl -11(%edi), %eax
- movzbl -11(%esi), %edx
+ movzbl -11(%edi), %eax
+ movzbl -11(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(Byte22):
- movzbl -10(%edi), %eax
- movzbl -10(%esi), %edx
+ movzbl -10(%edi), %eax
+ movzbl -10(%esi), %edx
sub %edx, %eax
RETURN
- ALIGN (4)
+ .p2align 4
L(next_24_bytes):
lea 8(%edi), %edi
lea 8(%esi), %esi
@@ -1571,20 +1610,69 @@ L(next_24_bytes):
test $0x40, %dh
jnz L(Byte22)
- ALIGN (4)
+ .p2align 4
L(Byte31):
- movzbl -9(%edi), %eax
- movzbl -9(%esi), %edx
+ movzbl -9(%edi), %eax
+ movzbl -9(%esi), %edx
sub %edx, %eax
RETURN_END
+# else
+
+/* special for wmemcmp */
+ xor %eax, %eax
+ test %dl, %dl
+ jz L(next_two_double_words)
+ and $15, %dl
+ jz L(second_double_word)
+ mov -16(%edi), %eax
+ cmp -16(%esi), %eax
+ jne L(nequal)
+ RETURN
+
+ .p2align 4
+L(second_double_word):
+ mov -12(%edi), %eax
+ cmp -12(%esi), %eax
+ jne L(nequal)
+ RETURN
+
+ .p2align 4
+L(next_two_double_words):
+ and $15, %dh
+ jz L(fourth_double_word)
+ mov -8(%edi), %eax
+ cmp -8(%esi), %eax
+ jne L(nequal)
+ RETURN
+
+ .p2align 4
+L(fourth_double_word):
+ mov -4(%edi), %eax
+ cmp -4(%esi), %eax
+ jne L(nequal)
+ RETURN
+
+ .p2align 4
+L(nequal):
+ mov $1, %eax
+ jg L(nequal_bigger)
+ neg %eax
+ RETURN
+
+ .p2align 4
+L(nequal_bigger):
+ RETURN_END
+# endif
CFI_PUSH (%ebx)
- ALIGN (4)
+
+ .p2align 4
L(more8bytes):
cmp $16, %ecx
jae L(more16bytes)
cmp $8, %ecx
je L(8bytes)
+# ifndef USE_AS_WMEMCMP
cmp $9, %ecx
je L(9bytes)
cmp $10, %ecx
@@ -1598,13 +1686,17 @@ L(more8bytes):
cmp $14, %ecx
je L(14bytes)
jmp L(15bytes)
+# else
+ jmp L(12bytes)
+# endif
- ALIGN (4)
+ .p2align 4
L(more16bytes):
cmp $24, %ecx
jae L(more24bytes)
cmp $16, %ecx
je L(16bytes)
+# ifndef USE_AS_WMEMCMP
cmp $17, %ecx
je L(17bytes)
cmp $18, %ecx
@@ -1618,13 +1710,17 @@ L(more16bytes):
cmp $22, %ecx
je L(22bytes)
jmp L(23bytes)
+# else
+ jmp L(20bytes)
+# endif
- ALIGN (4)
+ .p2align 4
L(more24bytes):
cmp $32, %ecx
jae L(more32bytes)
cmp $24, %ecx
je L(24bytes)
+# ifndef USE_AS_WMEMCMP
cmp $25, %ecx
je L(25bytes)
cmp $26, %ecx
@@ -1638,13 +1734,17 @@ L(more24bytes):
cmp $30, %ecx
je L(30bytes)
jmp L(31bytes)
+# else
+ jmp L(28bytes)
+# endif
- ALIGN (4)
+ .p2align 4
L(more32bytes):
cmp $40, %ecx
jae L(more40bytes)
cmp $32, %ecx
je L(32bytes)
+# ifndef USE_AS_WMEMCMP
cmp $33, %ecx
je L(33bytes)
cmp $34, %ecx
@@ -1658,11 +1758,35 @@ L(more32bytes):
cmp $38, %ecx
je L(38bytes)
jmp L(39bytes)
+# else
+ jmp L(36bytes)
+# endif
+
+ .p2align 4
+L(less48bytes):
+ cmp $8, %ecx
+ jae L(more8bytes)
+# ifndef USE_AS_WMEMCMP
+ cmp $2, %ecx
+ je L(2bytes)
+ cmp $3, %ecx
+ je L(3bytes)
+ cmp $4, %ecx
+ je L(4bytes)
+ cmp $5, %ecx
+ je L(5bytes)
+ cmp $6, %ecx
+ je L(6bytes)
+ jmp L(7bytes)
+# else
+ jmp L(4bytes)
+# endif
- ALIGN (4)
+ .p2align 4
L(more40bytes):
cmp $40, %ecx
je L(40bytes)
+# ifndef USE_AS_WMEMCMP
cmp $41, %ecx
je L(41bytes)
cmp $42, %ecx
@@ -1677,23 +1801,7 @@ L(more40bytes):
je L(46bytes)
jmp L(47bytes)
- ALIGN (4)
-L(less48bytes):
- cmp $8, %ecx
- jae L(more8bytes)
- cmp $2, %ecx
- je L(2bytes)
- cmp $3, %ecx
- je L(3bytes)
- cmp $4, %ecx
- je L(4bytes)
- cmp $5, %ecx
- je L(5bytes)
- cmp $6, %ecx
- je L(6bytes)
- jmp L(7bytes)
-
- ALIGN (4)
+ .p2align 4
L(44bytes):
mov -44(%eax), %ecx
mov -44(%edx), %ebx
@@ -1750,11 +1858,64 @@ L(4bytes):
cmp %ebx, %ecx
mov $0, %eax
jne L(find_diff)
- POP (%ebx)
+ POP (%ebx)
+ ret
+ CFI_PUSH (%ebx)
+# else
+ .p2align 4
+L(44bytes):
+ mov -44(%eax), %ecx
+ cmp -44(%edx), %ecx
+ jne L(find_diff)
+L(40bytes):
+ mov -40(%eax), %ecx
+ cmp -40(%edx), %ecx
+ jne L(find_diff)
+L(36bytes):
+ mov -36(%eax), %ecx
+ cmp -36(%edx), %ecx
+ jne L(find_diff)
+L(32bytes):
+ mov -32(%eax), %ecx
+ cmp -32(%edx), %ecx
+ jne L(find_diff)
+L(28bytes):
+ mov -28(%eax), %ecx
+ cmp -28(%edx), %ecx
+ jne L(find_diff)
+L(24bytes):
+ mov -24(%eax), %ecx
+ cmp -24(%edx), %ecx
+ jne L(find_diff)
+L(20bytes):
+ mov -20(%eax), %ecx
+ cmp -20(%edx), %ecx
+ jne L(find_diff)
+L(16bytes):
+ mov -16(%eax), %ecx
+ cmp -16(%edx), %ecx
+ jne L(find_diff)
+L(12bytes):
+ mov -12(%eax), %ecx
+ cmp -12(%edx), %ecx
+ jne L(find_diff)
+L(8bytes):
+ mov -8(%eax), %ecx
+ cmp -8(%edx), %ecx
+ jne L(find_diff)
+L(4bytes):
+ mov -4(%eax), %ecx
+ xor %eax, %eax
+ cmp -4(%edx), %ecx
+ jne L(find_diff)
+ POP (%ebx)
ret
CFI_PUSH (%ebx)
+# endif
- ALIGN (4)
+# ifndef USE_AS_WMEMCMP
+
+ .p2align 4
L(45bytes):
mov -45(%eax), %ecx
mov -45(%edx), %ebx
@@ -1814,11 +1975,11 @@ L(5bytes):
cmp -1(%edx), %cl
mov $0, %eax
jne L(end)
- POP (%ebx)
+ POP (%ebx)
ret
CFI_PUSH (%ebx)
- ALIGN (4)
+ .p2align 4
L(46bytes):
mov -46(%eax), %ecx
mov -46(%edx), %ebx
@@ -1882,11 +2043,11 @@ L(2bytes):
cmp %bh, %ch
mov $0, %eax
jne L(end)
- POP (%ebx)
+ POP (%ebx)
ret
CFI_PUSH (%ebx)
- ALIGN (4)
+ .p2align 4
L(47bytes):
movl -47(%eax), %ecx
movl -47(%edx), %ebx
@@ -1953,11 +2114,11 @@ L(3bytes):
cmpb -1(%edx), %al
mov $0, %eax
jne L(end)
- POP (%ebx)
+ POP (%ebx)
ret
CFI_PUSH (%ebx)
- ALIGN (4)
+ .p2align 4
L(find_diff):
cmpb %bl, %cl
jne L(end)
@@ -1968,14 +2129,30 @@ L(find_diff):
cmp %bl, %cl
jne L(end)
cmp %bx, %cx
+
+ .p2align 4
L(end):
- POP (%ebx)
+ POP (%ebx)
mov $1, %eax
ja L(bigger)
neg %eax
L(bigger):
ret
+# else
-END (MEMCMP)
+/* for wmemcmp */
+ .p2align 4
+L(find_diff):
+ POP (%ebx)
+ mov $1, %eax
+ jg L(find_diff_bigger)
+ neg %eax
+ ret
+ .p2align 4
+L(find_diff_bigger):
+ ret
+
+# endif
+END (MEMCMP)
#endif
diff --git a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
index f64f8d2146..26471fc0e1 100644
--- a/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/memcpy-ssse3.S
@@ -1,5 +1,5 @@
/* memcpy with SSSE3
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -235,7 +235,7 @@ L(shl_0_end):
add %edi, %edx
add %edi, %eax
POP (%edi)
- BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd), %ecx, 4)
+ BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd_align), %ecx, 4)
CFI_PUSH (%edi)
L(shl_0_gobble):
@@ -385,7 +385,7 @@ L(shl_0_mem_less_32bytes):
L(shl_0_mem_less_16bytes):
add %ecx, %edx
add %ecx, %eax
- BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd), %ecx, 4)
+ BRANCH_TO_JMPTBL_ENTRY (L(table_48bytes_fwd_align), %ecx, 4)
cfi_restore_state
cfi_remember_state
@@ -1065,38 +1065,48 @@ L(shl_15_end):
ALIGN (4)
L(fwd_write_44bytes):
- movl -44(%eax), %ecx
- movl %ecx, -44(%edx)
-L(fwd_write_40bytes):
- movl -40(%eax), %ecx
- movl %ecx, -40(%edx)
+ movq -44(%eax), %xmm0
+ movq %xmm0, -44(%edx)
L(fwd_write_36bytes):
- movl -36(%eax), %ecx
- movl %ecx, -36(%edx)
-L(fwd_write_32bytes):
- movl -32(%eax), %ecx
- movl %ecx, -32(%edx)
+ movq -36(%eax), %xmm0
+ movq %xmm0, -36(%edx)
L(fwd_write_28bytes):
- movl -28(%eax), %ecx
- movl %ecx, -28(%edx)
-L(fwd_write_24bytes):
- movl -24(%eax), %ecx
- movl %ecx, -24(%edx)
+ movq -28(%eax), %xmm0
+ movq %xmm0, -28(%edx)
L(fwd_write_20bytes):
- movl -20(%eax), %ecx
- movl %ecx, -20(%edx)
-L(fwd_write_16bytes):
- movl -16(%eax), %ecx
- movl %ecx, -16(%edx)
+ movq -20(%eax), %xmm0
+ movq %xmm0, -20(%edx)
L(fwd_write_12bytes):
- movl -12(%eax), %ecx
- movl %ecx, -12(%edx)
-L(fwd_write_8bytes):
- movl -8(%eax), %ecx
- movl %ecx, -8(%edx)
+ movq -12(%eax), %xmm0
+ movq %xmm0, -12(%edx)
L(fwd_write_4bytes):
movl -4(%eax), %ecx
movl %ecx, -4(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_40bytes):
+ movq -40(%eax), %xmm0
+ movq %xmm0, -40(%edx)
+L(fwd_write_32bytes):
+ movq -32(%eax), %xmm0
+ movq %xmm0, -32(%edx)
+L(fwd_write_24bytes):
+ movq -24(%eax), %xmm0
+ movq %xmm0, -24(%edx)
+L(fwd_write_16bytes):
+ movq -16(%eax), %xmm0
+ movq %xmm0, -16(%edx)
+L(fwd_write_8bytes):
+ movq -8(%eax), %xmm0
+ movq %xmm0, -8(%edx)
L(fwd_write_0bytes):
#ifndef USE_AS_BCOPY
# ifdef USE_AS_MEMPCPY
@@ -1124,37 +1134,49 @@ L(fwd_write_5bytes):
ALIGN (4)
L(fwd_write_45bytes):
- movl -45(%eax), %ecx
- movl %ecx, -45(%edx)
-L(fwd_write_41bytes):
- movl -41(%eax), %ecx
- movl %ecx, -41(%edx)
+ movq -45(%eax), %xmm0
+ movq %xmm0, -45(%edx)
L(fwd_write_37bytes):
- movl -37(%eax), %ecx
- movl %ecx, -37(%edx)
-L(fwd_write_33bytes):
- movl -33(%eax), %ecx
- movl %ecx, -33(%edx)
+ movq -37(%eax), %xmm0
+ movq %xmm0, -37(%edx)
L(fwd_write_29bytes):
- movl -29(%eax), %ecx
- movl %ecx, -29(%edx)
-L(fwd_write_25bytes):
- movl -25(%eax), %ecx
- movl %ecx, -25(%edx)
+ movq -29(%eax), %xmm0
+ movq %xmm0, -29(%edx)
L(fwd_write_21bytes):
- movl -21(%eax), %ecx
- movl %ecx, -21(%edx)
-L(fwd_write_17bytes):
- movl -17(%eax), %ecx
- movl %ecx, -17(%edx)
+ movq -21(%eax), %xmm0
+ movq %xmm0, -21(%edx)
L(fwd_write_13bytes):
- movl -13(%eax), %ecx
- movl %ecx, -13(%edx)
-L(fwd_write_9bytes):
- movl -9(%eax), %ecx
- movl %ecx, -9(%edx)
+ movq -13(%eax), %xmm0
+ movq %xmm0, -13(%edx)
movl -5(%eax), %ecx
movl %ecx, -5(%edx)
+ movzbl -1(%eax), %ecx
+ movb %cl, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_41bytes):
+ movq -41(%eax), %xmm0
+ movq %xmm0, -41(%edx)
+L(fwd_write_33bytes):
+ movq -33(%eax), %xmm0
+ movq %xmm0, -33(%edx)
+L(fwd_write_25bytes):
+ movq -25(%eax), %xmm0
+ movq %xmm0, -25(%edx)
+L(fwd_write_17bytes):
+ movq -17(%eax), %xmm0
+ movq %xmm0, -17(%edx)
+L(fwd_write_9bytes):
+ movq -9(%eax), %xmm0
+ movq %xmm0, -9(%edx)
L(fwd_write_1bytes):
movzbl -1(%eax), %ecx
movb %cl, -1(%edx)
@@ -1169,38 +1191,50 @@ L(fwd_write_1bytes):
ALIGN (4)
L(fwd_write_46bytes):
- movl -46(%eax), %ecx
- movl %ecx, -46(%edx)
-L(fwd_write_42bytes):
- movl -42(%eax), %ecx
- movl %ecx, -42(%edx)
+ movq -46(%eax), %xmm0
+ movq %xmm0, -46(%edx)
L(fwd_write_38bytes):
- movl -38(%eax), %ecx
- movl %ecx, -38(%edx)
-L(fwd_write_34bytes):
- movl -34(%eax), %ecx
- movl %ecx, -34(%edx)
+ movq -38(%eax), %xmm0
+ movq %xmm0, -38(%edx)
L(fwd_write_30bytes):
- movl -30(%eax), %ecx
- movl %ecx, -30(%edx)
-L(fwd_write_26bytes):
- movl -26(%eax), %ecx
- movl %ecx, -26(%edx)
+ movq -30(%eax), %xmm0
+ movq %xmm0, -30(%edx)
L(fwd_write_22bytes):
- movl -22(%eax), %ecx
- movl %ecx, -22(%edx)
-L(fwd_write_18bytes):
- movl -18(%eax), %ecx
- movl %ecx, -18(%edx)
+ movq -22(%eax), %xmm0
+ movq %xmm0, -22(%edx)
L(fwd_write_14bytes):
- movl -14(%eax), %ecx
- movl %ecx, -14(%edx)
-L(fwd_write_10bytes):
- movl -10(%eax), %ecx
- movl %ecx, -10(%edx)
+ movq -14(%eax), %xmm0
+ movq %xmm0, -14(%edx)
L(fwd_write_6bytes):
movl -6(%eax), %ecx
movl %ecx, -6(%edx)
+ movzwl -2(%eax), %ecx
+ movw %cx, -2(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_42bytes):
+ movq -42(%eax), %xmm0
+ movq %xmm0, -42(%edx)
+L(fwd_write_34bytes):
+ movq -34(%eax), %xmm0
+ movq %xmm0, -34(%edx)
+L(fwd_write_26bytes):
+ movq -26(%eax), %xmm0
+ movq %xmm0, -26(%edx)
+L(fwd_write_18bytes):
+ movq -18(%eax), %xmm0
+ movq %xmm0, -18(%edx)
+L(fwd_write_10bytes):
+ movq -10(%eax), %xmm0
+ movq %xmm0, -10(%edx)
L(fwd_write_2bytes):
movzwl -2(%eax), %ecx
movw %cx, -2(%edx)
@@ -1215,38 +1249,52 @@ L(fwd_write_2bytes):
ALIGN (4)
L(fwd_write_47bytes):
- movl -47(%eax), %ecx
- movl %ecx, -47(%edx)
-L(fwd_write_43bytes):
- movl -43(%eax), %ecx
- movl %ecx, -43(%edx)
+ movq -47(%eax), %xmm0
+ movq %xmm0, -47(%edx)
L(fwd_write_39bytes):
- movl -39(%eax), %ecx
- movl %ecx, -39(%edx)
-L(fwd_write_35bytes):
- movl -35(%eax), %ecx
- movl %ecx, -35(%edx)
+ movq -39(%eax), %xmm0
+ movq %xmm0, -39(%edx)
L(fwd_write_31bytes):
- movl -31(%eax), %ecx
- movl %ecx, -31(%edx)
-L(fwd_write_27bytes):
- movl -27(%eax), %ecx
- movl %ecx, -27(%edx)
+ movq -31(%eax), %xmm0
+ movq %xmm0, -31(%edx)
L(fwd_write_23bytes):
- movl -23(%eax), %ecx
- movl %ecx, -23(%edx)
-L(fwd_write_19bytes):
- movl -19(%eax), %ecx
- movl %ecx, -19(%edx)
+ movq -23(%eax), %xmm0
+ movq %xmm0, -23(%edx)
L(fwd_write_15bytes):
- movl -15(%eax), %ecx
- movl %ecx, -15(%edx)
-L(fwd_write_11bytes):
- movl -11(%eax), %ecx
- movl %ecx, -11(%edx)
+ movq -15(%eax), %xmm0
+ movq %xmm0, -15(%edx)
L(fwd_write_7bytes):
movl -7(%eax), %ecx
movl %ecx, -7(%edx)
+ movzwl -3(%eax), %ecx
+ movzbl -1(%eax), %eax
+ movw %cx, -3(%edx)
+ movb %al, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_43bytes):
+ movq -43(%eax), %xmm0
+ movq %xmm0, -43(%edx)
+L(fwd_write_35bytes):
+ movq -35(%eax), %xmm0
+ movq %xmm0, -35(%edx)
+L(fwd_write_27bytes):
+ movq -27(%eax), %xmm0
+ movq %xmm0, -27(%edx)
+L(fwd_write_19bytes):
+ movq -19(%eax), %xmm0
+ movq %xmm0, -19(%edx)
+L(fwd_write_11bytes):
+ movq -11(%eax), %xmm0
+ movq %xmm0, -11(%edx)
L(fwd_write_3bytes):
movzwl -3(%eax), %ecx
movzbl -1(%eax), %eax
@@ -1259,6 +1307,356 @@ L(fwd_write_3bytes):
movl DEST(%esp), %eax
# endif
#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_40bytes_align):
+ movdqa -40(%eax), %xmm0
+ movdqa %xmm0, -40(%edx)
+L(fwd_write_24bytes_align):
+ movdqa -24(%eax), %xmm0
+ movdqa %xmm0, -24(%edx)
+L(fwd_write_8bytes_align):
+ movq -8(%eax), %xmm0
+ movq %xmm0, -8(%edx)
+L(fwd_write_0bytes_align):
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_32bytes_align):
+ movdqa -32(%eax), %xmm0
+ movdqa %xmm0, -32(%edx)
+L(fwd_write_16bytes_align):
+ movdqa -16(%eax), %xmm0
+ movdqa %xmm0, -16(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_5bytes_align):
+ movl -5(%eax), %ecx
+ movl -4(%eax), %eax
+ movl %ecx, -5(%edx)
+ movl %eax, -4(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_45bytes_align):
+ movdqa -45(%eax), %xmm0
+ movdqa %xmm0, -45(%edx)
+L(fwd_write_29bytes_align):
+ movdqa -29(%eax), %xmm0
+ movdqa %xmm0, -29(%edx)
+L(fwd_write_13bytes_align):
+ movq -13(%eax), %xmm0
+ movq %xmm0, -13(%edx)
+ movl -5(%eax), %ecx
+ movl %ecx, -5(%edx)
+ movzbl -1(%eax), %ecx
+ movb %cl, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_37bytes_align):
+ movdqa -37(%eax), %xmm0
+ movdqa %xmm0, -37(%edx)
+L(fwd_write_21bytes_align):
+ movdqa -21(%eax), %xmm0
+ movdqa %xmm0, -21(%edx)
+ movl -5(%eax), %ecx
+ movl %ecx, -5(%edx)
+ movzbl -1(%eax), %ecx
+ movb %cl, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_41bytes_align):
+ movdqa -41(%eax), %xmm0
+ movdqa %xmm0, -41(%edx)
+L(fwd_write_25bytes_align):
+ movdqa -25(%eax), %xmm0
+ movdqa %xmm0, -25(%edx)
+L(fwd_write_9bytes_align):
+ movq -9(%eax), %xmm0
+ movq %xmm0, -9(%edx)
+L(fwd_write_1bytes_align):
+ movzbl -1(%eax), %ecx
+ movb %cl, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_33bytes_align):
+ movdqa -33(%eax), %xmm0
+ movdqa %xmm0, -33(%edx)
+L(fwd_write_17bytes_align):
+ movdqa -17(%eax), %xmm0
+ movdqa %xmm0, -17(%edx)
+ movzbl -1(%eax), %ecx
+ movb %cl, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_46bytes_align):
+ movdqa -46(%eax), %xmm0
+ movdqa %xmm0, -46(%edx)
+L(fwd_write_30bytes_align):
+ movdqa -30(%eax), %xmm0
+ movdqa %xmm0, -30(%edx)
+L(fwd_write_14bytes_align):
+ movq -14(%eax), %xmm0
+ movq %xmm0, -14(%edx)
+L(fwd_write_6bytes_align):
+ movl -6(%eax), %ecx
+ movl %ecx, -6(%edx)
+ movzwl -2(%eax), %ecx
+ movw %cx, -2(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_38bytes_align):
+ movdqa -38(%eax), %xmm0
+ movdqa %xmm0, -38(%edx)
+L(fwd_write_22bytes_align):
+ movdqa -22(%eax), %xmm0
+ movdqa %xmm0, -22(%edx)
+ movl -6(%eax), %ecx
+ movl %ecx, -6(%edx)
+ movzwl -2(%eax), %ecx
+ movw %cx, -2(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_42bytes_align):
+ movdqa -42(%eax), %xmm0
+ movdqa %xmm0, -42(%edx)
+L(fwd_write_26bytes_align):
+ movdqa -26(%eax), %xmm0
+ movdqa %xmm0, -26(%edx)
+L(fwd_write_10bytes_align):
+ movq -10(%eax), %xmm0
+ movq %xmm0, -10(%edx)
+L(fwd_write_2bytes_align):
+ movzwl -2(%eax), %ecx
+ movw %cx, -2(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_34bytes_align):
+ movdqa -34(%eax), %xmm0
+ movdqa %xmm0, -34(%edx)
+L(fwd_write_18bytes_align):
+ movdqa -18(%eax), %xmm0
+ movdqa %xmm0, -18(%edx)
+ movzwl -2(%eax), %ecx
+ movw %cx, -2(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_47bytes_align):
+ movdqa -47(%eax), %xmm0
+ movdqa %xmm0, -47(%edx)
+L(fwd_write_31bytes_align):
+ movdqa -31(%eax), %xmm0
+ movdqa %xmm0, -31(%edx)
+L(fwd_write_15bytes_align):
+ movq -15(%eax), %xmm0
+ movq %xmm0, -15(%edx)
+L(fwd_write_7bytes_align):
+ movl -7(%eax), %ecx
+ movl %ecx, -7(%edx)
+ movzwl -3(%eax), %ecx
+ movzbl -1(%eax), %eax
+ movw %cx, -3(%edx)
+ movb %al, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_39bytes_align):
+ movdqa -39(%eax), %xmm0
+ movdqa %xmm0, -39(%edx)
+L(fwd_write_23bytes_align):
+ movdqa -23(%eax), %xmm0
+ movdqa %xmm0, -23(%edx)
+ movl -7(%eax), %ecx
+ movl %ecx, -7(%edx)
+ movzwl -3(%eax), %ecx
+ movzbl -1(%eax), %eax
+ movw %cx, -3(%edx)
+ movb %al, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_43bytes_align):
+ movdqa -43(%eax), %xmm0
+ movdqa %xmm0, -43(%edx)
+L(fwd_write_27bytes_align):
+ movdqa -27(%eax), %xmm0
+ movdqa %xmm0, -27(%edx)
+L(fwd_write_11bytes_align):
+ movq -11(%eax), %xmm0
+ movq %xmm0, -11(%edx)
+L(fwd_write_3bytes_align):
+ movzwl -3(%eax), %ecx
+ movzbl -1(%eax), %eax
+ movw %cx, -3(%edx)
+ movb %al, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_35bytes_align):
+ movdqa -35(%eax), %xmm0
+ movdqa %xmm0, -35(%edx)
+L(fwd_write_19bytes_align):
+ movdqa -19(%eax), %xmm0
+ movdqa %xmm0, -19(%edx)
+ movzwl -3(%eax), %ecx
+ movzbl -1(%eax), %eax
+ movw %cx, -3(%edx)
+ movb %al, -1(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_44bytes_align):
+ movdqa -44(%eax), %xmm0
+ movdqa %xmm0, -44(%edx)
+L(fwd_write_28bytes_align):
+ movdqa -28(%eax), %xmm0
+ movdqa %xmm0, -28(%edx)
+L(fwd_write_12bytes_align):
+ movq -12(%eax), %xmm0
+ movq %xmm0, -12(%edx)
+L(fwd_write_4bytes_align):
+ movl -4(%eax), %ecx
+ movl %ecx, -4(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(fwd_write_36bytes_align):
+ movdqa -36(%eax), %xmm0
+ movdqa %xmm0, -36(%edx)
+L(fwd_write_20bytes_align):
+ movdqa -20(%eax), %xmm0
+ movdqa %xmm0, -20(%edx)
+ movl -4(%eax), %ecx
+ movl %ecx, -4(%edx)
+#ifndef USE_AS_BCOPY
+# ifdef USE_AS_MEMPCPY
+ movl %edx, %eax
+# else
+ movl DEST(%esp), %eax
+# endif
+#endif
RETURN_END
cfi_restore_state
@@ -1330,35 +1728,20 @@ L(large_page_less_32bytes):
ALIGN (4)
L(bk_write_44bytes):
- movl 40(%eax), %ecx
- movl %ecx, 40(%edx)
-L(bk_write_40bytes):
- movl 36(%eax), %ecx
- movl %ecx, 36(%edx)
+ movq 36(%eax), %xmm0
+ movq %xmm0, 36(%edx)
L(bk_write_36bytes):
- movl 32(%eax), %ecx
- movl %ecx, 32(%edx)
-L(bk_write_32bytes):
- movl 28(%eax), %ecx
- movl %ecx, 28(%edx)
+ movq 28(%eax), %xmm0
+ movq %xmm0, 28(%edx)
L(bk_write_28bytes):
- movl 24(%eax), %ecx
- movl %ecx, 24(%edx)
-L(bk_write_24bytes):
- movl 20(%eax), %ecx
- movl %ecx, 20(%edx)
+ movq 20(%eax), %xmm0
+ movq %xmm0, 20(%edx)
L(bk_write_20bytes):
- movl 16(%eax), %ecx
- movl %ecx, 16(%edx)
-L(bk_write_16bytes):
- movl 12(%eax), %ecx
- movl %ecx, 12(%edx)
+ movq 12(%eax), %xmm0
+ movq %xmm0, 12(%edx)
L(bk_write_12bytes):
- movl 8(%eax), %ecx
- movl %ecx, 8(%edx)
-L(bk_write_8bytes):
- movl 4(%eax), %ecx
- movl %ecx, 4(%edx)
+ movq 4(%eax), %xmm0
+ movq %xmm0, 4(%edx)
L(bk_write_4bytes):
movl (%eax), %ecx
movl %ecx, (%edx)
@@ -1373,36 +1756,46 @@ L(bk_write_0bytes):
RETURN
ALIGN (4)
+L(bk_write_40bytes):
+ movq 32(%eax), %xmm0
+ movq %xmm0, 32(%edx)
+L(bk_write_32bytes):
+ movq 24(%eax), %xmm0
+ movq %xmm0, 24(%edx)
+L(bk_write_24bytes):
+ movq 16(%eax), %xmm0
+ movq %xmm0, 16(%edx)
+L(bk_write_16bytes):
+ movq 8(%eax), %xmm0
+ movq %xmm0, 8(%edx)
+L(bk_write_8bytes):
+ movq (%eax), %xmm0
+ movq %xmm0, (%edx)
+#ifndef USE_AS_BCOPY
+ movl DEST(%esp), %eax
+# ifdef USE_AS_MEMPCPY
+ movl LEN(%esp), %ecx
+ add %ecx, %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
L(bk_write_45bytes):
- movl 41(%eax), %ecx
- movl %ecx, 41(%edx)
-L(bk_write_41bytes):
- movl 37(%eax), %ecx
- movl %ecx, 37(%edx)
+ movq 37(%eax), %xmm0
+ movq %xmm0, 37(%edx)
L(bk_write_37bytes):
- movl 33(%eax), %ecx
- movl %ecx, 33(%edx)
-L(bk_write_33bytes):
- movl 29(%eax), %ecx
- movl %ecx, 29(%edx)
+ movq 29(%eax), %xmm0
+ movq %xmm0, 29(%edx)
L(bk_write_29bytes):
- movl 25(%eax), %ecx
- movl %ecx, 25(%edx)
-L(bk_write_25bytes):
- movl 21(%eax), %ecx
- movl %ecx, 21(%edx)
+ movq 21(%eax), %xmm0
+ movq %xmm0, 21(%edx)
L(bk_write_21bytes):
- movl 17(%eax), %ecx
- movl %ecx, 17(%edx)
-L(bk_write_17bytes):
- movl 13(%eax), %ecx
- movl %ecx, 13(%edx)
+ movq 13(%eax), %xmm0
+ movq %xmm0, 13(%edx)
L(bk_write_13bytes):
- movl 9(%eax), %ecx
- movl %ecx, 9(%edx)
-L(bk_write_9bytes):
- movl 5(%eax), %ecx
- movl %ecx, 5(%edx)
+ movq 5(%eax), %xmm0
+ movq %xmm0, 5(%edx)
L(bk_write_5bytes):
movl 1(%eax), %ecx
movl %ecx, 1(%edx)
@@ -1419,39 +1812,78 @@ L(bk_write_1bytes):
RETURN
ALIGN (4)
+L(bk_write_41bytes):
+ movq 33(%eax), %xmm0
+ movq %xmm0, 33(%edx)
+L(bk_write_33bytes):
+ movq 25(%eax), %xmm0
+ movq %xmm0, 25(%edx)
+L(bk_write_25bytes):
+ movq 17(%eax), %xmm0
+ movq %xmm0, 17(%edx)
+L(bk_write_17bytes):
+ movq 9(%eax), %xmm0
+ movq %xmm0, 9(%edx)
+L(bk_write_9bytes):
+ movq 1(%eax), %xmm0
+ movq %xmm0, 1(%edx)
+ movzbl (%eax), %ecx
+ movb %cl, (%edx)
+#ifndef USE_AS_BCOPY
+ movl DEST(%esp), %eax
+# ifdef USE_AS_MEMPCPY
+ movl LEN(%esp), %ecx
+ add %ecx, %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
L(bk_write_46bytes):
- movl 42(%eax), %ecx
- movl %ecx, 42(%edx)
-L(bk_write_42bytes):
- movl 38(%eax), %ecx
- movl %ecx, 38(%edx)
+ movq 38(%eax), %xmm0
+ movq %xmm0, 38(%edx)
L(bk_write_38bytes):
- movl 34(%eax), %ecx
- movl %ecx, 34(%edx)
-L(bk_write_34bytes):
- movl 30(%eax), %ecx
- movl %ecx, 30(%edx)
+ movq 30(%eax), %xmm0
+ movq %xmm0, 30(%edx)
L(bk_write_30bytes):
- movl 26(%eax), %ecx
- movl %ecx, 26(%edx)
-L(bk_write_26bytes):
- movl 22(%eax), %ecx
- movl %ecx, 22(%edx)
+ movq 22(%eax), %xmm0
+ movq %xmm0, 22(%edx)
L(bk_write_22bytes):
- movl 18(%eax), %ecx
- movl %ecx, 18(%edx)
-L(bk_write_18bytes):
- movl 14(%eax), %ecx
- movl %ecx, 14(%edx)
+ movq 14(%eax), %xmm0
+ movq %xmm0, 14(%edx)
L(bk_write_14bytes):
- movl 10(%eax), %ecx
- movl %ecx, 10(%edx)
-L(bk_write_10bytes):
- movl 6(%eax), %ecx
- movl %ecx, 6(%edx)
+ movq 6(%eax), %xmm0
+ movq %xmm0, 6(%edx)
L(bk_write_6bytes):
movl 2(%eax), %ecx
movl %ecx, 2(%edx)
+ movzwl (%eax), %ecx
+ movw %cx, (%edx)
+#ifndef USE_AS_BCOPY
+ movl DEST(%esp), %eax
+# ifdef USE_AS_MEMPCPY
+ movl LEN(%esp), %ecx
+ add %ecx, %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(bk_write_42bytes):
+ movq 34(%eax), %xmm0
+ movq %xmm0, 34(%edx)
+L(bk_write_34bytes):
+ movq 26(%eax), %xmm0
+ movq %xmm0, 26(%edx)
+L(bk_write_26bytes):
+ movq 18(%eax), %xmm0
+ movq %xmm0, 18(%edx)
+L(bk_write_18bytes):
+ movq 10(%eax), %xmm0
+ movq %xmm0, 10(%edx)
+L(bk_write_10bytes):
+ movq 2(%eax), %xmm0
+ movq %xmm0, 2(%edx)
L(bk_write_2bytes):
movzwl (%eax), %ecx
movw %cx, (%edx)
@@ -1466,38 +1898,52 @@ L(bk_write_2bytes):
ALIGN (4)
L(bk_write_47bytes):
- movl 43(%eax), %ecx
- movl %ecx, 43(%edx)
-L(bk_write_43bytes):
- movl 39(%eax), %ecx
- movl %ecx, 39(%edx)
+ movq 39(%eax), %xmm0
+ movq %xmm0, 39(%edx)
L(bk_write_39bytes):
- movl 35(%eax), %ecx
- movl %ecx, 35(%edx)
-L(bk_write_35bytes):
- movl 31(%eax), %ecx
- movl %ecx, 31(%edx)
+ movq 31(%eax), %xmm0
+ movq %xmm0, 31(%edx)
L(bk_write_31bytes):
- movl 27(%eax), %ecx
- movl %ecx, 27(%edx)
-L(bk_write_27bytes):
- movl 23(%eax), %ecx
- movl %ecx, 23(%edx)
+ movq 23(%eax), %xmm0
+ movq %xmm0, 23(%edx)
L(bk_write_23bytes):
- movl 19(%eax), %ecx
- movl %ecx, 19(%edx)
-L(bk_write_19bytes):
- movl 15(%eax), %ecx
- movl %ecx, 15(%edx)
+ movq 15(%eax), %xmm0
+ movq %xmm0, 15(%edx)
L(bk_write_15bytes):
- movl 11(%eax), %ecx
- movl %ecx, 11(%edx)
-L(bk_write_11bytes):
- movl 7(%eax), %ecx
- movl %ecx, 7(%edx)
+ movq 7(%eax), %xmm0
+ movq %xmm0, 7(%edx)
L(bk_write_7bytes):
movl 3(%eax), %ecx
movl %ecx, 3(%edx)
+ movzwl 1(%eax), %ecx
+ movw %cx, 1(%edx)
+ movzbl (%eax), %eax
+ movb %al, (%edx)
+#ifndef USE_AS_BCOPY
+ movl DEST(%esp), %eax
+# ifdef USE_AS_MEMPCPY
+ movl LEN(%esp), %ecx
+ add %ecx, %eax
+# endif
+#endif
+ RETURN
+
+ ALIGN (4)
+L(bk_write_43bytes):
+ movq 35(%eax), %xmm0
+ movq %xmm0, 35(%edx)
+L(bk_write_35bytes):
+ movq 27(%eax), %xmm0
+ movq %xmm0, 27(%edx)
+L(bk_write_27bytes):
+ movq 19(%eax), %xmm0
+ movq %xmm0, 19(%edx)
+L(bk_write_19bytes):
+ movq 11(%eax), %xmm0
+ movq %xmm0, 11(%edx)
+L(bk_write_11bytes):
+ movq 3(%eax), %xmm0
+ movq %xmm0, 3(%edx)
L(bk_write_3bytes):
movzwl 1(%eax), %ecx
movw %cx, 1(%edx)
@@ -1566,6 +2012,57 @@ L(table_48bytes_fwd):
.int JMPTBL (L(fwd_write_47bytes), L(table_48bytes_fwd))
ALIGN (2)
+L(table_48bytes_fwd_align):
+ .int JMPTBL (L(fwd_write_0bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_1bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_2bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_3bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_4bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_5bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_6bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_7bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_8bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_9bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_10bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_11bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_12bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_13bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_14bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_15bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_16bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_17bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_18bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_19bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_20bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_21bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_22bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_23bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_24bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_25bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_26bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_27bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_28bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_29bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_30bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_31bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_32bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_33bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_34bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_35bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_36bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_37bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_38bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_39bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_40bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_41bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_42bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_43bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_44bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_45bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_46bytes_align), L(table_48bytes_fwd_align))
+ .int JMPTBL (L(fwd_write_47bytes_align), L(table_48bytes_fwd_align))
+
+ ALIGN (2)
L(shl_table):
.int JMPTBL (L(shl_0), L(shl_table))
.int JMPTBL (L(shl_1), L(shl_table))
@@ -1658,22 +2155,14 @@ L(bk_write_64bytesless):
L(bk_write_more32bytes):
/* Copy 32 bytes at a time. */
sub $32, %ecx
- movl -4(%esi), %eax
- movl %eax, -4(%edx)
- movl -8(%esi), %eax
- movl %eax, -8(%edx)
- movl -12(%esi), %eax
- movl %eax, -12(%edx)
- movl -16(%esi), %eax
- movl %eax, -16(%edx)
- movl -20(%esi), %eax
- movl %eax, -20(%edx)
- movl -24(%esi), %eax
- movl %eax, -24(%edx)
- movl -28(%esi), %eax
- movl %eax, -28(%edx)
- movl -32(%esi), %eax
- movl %eax, -32(%edx)
+ movq -8(%esi), %xmm0
+ movq %xmm0, -8(%edx)
+ movq -16(%esi), %xmm0
+ movq %xmm0, -16(%edx)
+ movq -24(%esi), %xmm0
+ movq %xmm0, -24(%edx)
+ movq -32(%esi), %xmm0
+ movq %xmm0, -32(%edx)
sub $32, %edx
sub $32, %esi
diff --git a/sysdeps/i386/i686/multiarch/memrchr-c.c b/sysdeps/i386/i686/multiarch/memrchr-c.c
new file mode 100644
index 0000000000..44ec1a6ed9
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/memrchr-c.c
@@ -0,0 +1,7 @@
+#ifndef NOT_IN_libc
+# define MEMRCHR __memrchr_ia32
+# include <string.h>
+extern void *__memrchr_ia32 (const void *, int, size_t);
+#endif
+
+#include "string/memrchr.c"
diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S
new file mode 100644
index 0000000000..355d498e25
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/memrchr-sse2-bsf.S
@@ -0,0 +1,418 @@
+/* Optimized memrchr with sse2
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+
+# include <sysdep.h>
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+
+# define PARMS 4
+# define STR1 PARMS
+# define STR2 STR1+4
+# define LEN STR2+4
+
+# define MEMCHR __memrchr_sse2_bsf
+
+ .text
+ENTRY (MEMCHR)
+ mov STR1(%esp), %ecx
+ movd STR2(%esp), %xmm1
+ mov LEN(%esp), %edx
+
+ sub $16, %edx
+ jbe L(length_less16)
+
+ punpcklbw %xmm1, %xmm1
+ add %edx, %ecx
+ punpcklbw %xmm1, %xmm1
+
+ movdqu (%ecx), %xmm0
+ pshufd $0, %xmm1, %xmm1
+ pcmpeqb %xmm1, %xmm0
+
+/* Check if there is a match. */
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches0)
+
+ sub $64, %ecx
+ mov %ecx, %eax
+ and $15, %eax
+ jz L(loop_prolog)
+
+ add $16, %ecx
+ add $16, %edx
+ sub %eax, %ecx
+ sub %eax, %edx
+
+ .p2align 4
+/* Loop start on aligned string. */
+L(loop_prolog):
+ sub $64, %edx
+ jbe L(exit_loop)
+
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ movdqa 32(%ecx), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+ movdqa (%ecx), %xmm4
+ pcmpeqb %xmm1, %xmm4
+ pmovmskb %xmm4, %eax
+ test %eax, %eax
+ jnz L(matches0)
+
+ sub $64, %ecx
+ sub $64, %edx
+ jbe L(exit_loop)
+
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ movdqa 32(%ecx), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+ movdqa (%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches0)
+
+ mov %ecx, %eax
+ and $63, %eax
+ test %eax, %eax
+ jz L(align64_loop)
+
+ add $64, %ecx
+ add $64, %edx
+ sub %eax, %ecx
+ sub %eax, %edx
+
+ .p2align 4
+L(align64_loop):
+ sub $64, %ecx
+ sub $64, %edx
+ jbe L(exit_loop)
+
+ movdqa (%ecx), %xmm0
+ movdqa 16(%ecx), %xmm2
+ movdqa 32(%ecx), %xmm3
+ movdqa 48(%ecx), %xmm4
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm1, %xmm2
+ pcmpeqb %xmm1, %xmm3
+ pcmpeqb %xmm1, %xmm4
+
+ pmaxub %xmm3, %xmm0
+ pmaxub %xmm4, %xmm2
+ pmaxub %xmm0, %xmm2
+ pmovmskb %xmm2, %eax
+
+ test %eax, %eax
+ jz L(align64_loop)
+
+ pmovmskb %xmm4, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm2
+
+ pcmpeqb %xmm1, %xmm2
+ pcmpeqb (%ecx), %xmm1
+
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+ pmovmskb %xmm1, %eax
+ bsr %eax, %eax
+
+ add %ecx, %eax
+ ret
+
+ .p2align 4
+L(exit_loop):
+ add $64, %edx
+ cmp $32, %edx
+ jbe L(exit_loop_32)
+
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ movdqa 32(%ecx), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches16_1)
+ cmp $48, %edx
+ jbe L(return_null)
+
+ pcmpeqb (%ecx), %xmm1
+ pmovmskb %xmm1, %eax
+ test %eax, %eax
+ jnz L(matches0_1)
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(exit_loop_32):
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48_1)
+ cmp $16, %edx
+ jbe L(return_null)
+
+ pcmpeqb 32(%ecx), %xmm1
+ pmovmskb %xmm1, %eax
+ test %eax, %eax
+ jnz L(matches32_1)
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(matches0):
+ bsr %eax, %eax
+ add %ecx, %eax
+ ret
+
+ .p2align 4
+L(matches16):
+ bsr %eax, %eax
+ lea 16(%eax, %ecx), %eax
+ ret
+
+ .p2align 4
+L(matches32):
+ bsr %eax, %eax
+ lea 32(%eax, %ecx), %eax
+ ret
+
+ .p2align 4
+L(matches48):
+ bsr %eax, %eax
+ lea 48(%eax, %ecx), %eax
+ ret
+
+ .p2align 4
+L(matches0_1):
+ bsr %eax, %eax
+ sub $64, %edx
+ add %eax, %edx
+ jl L(return_null)
+ add %ecx, %eax
+ ret
+
+ .p2align 4
+L(matches16_1):
+ bsr %eax, %eax
+ sub $48, %edx
+ add %eax, %edx
+ jl L(return_null)
+ lea 16(%ecx, %eax), %eax
+ ret
+
+ .p2align 4
+L(matches32_1):
+ bsr %eax, %eax
+ sub $32, %edx
+ add %eax, %edx
+ jl L(return_null)
+ lea 32(%ecx, %eax), %eax
+ ret
+
+ .p2align 4
+L(matches48_1):
+ bsr %eax, %eax
+ sub $16, %edx
+ add %eax, %edx
+ jl L(return_null)
+ lea 48(%ecx, %eax), %eax
+ ret
+
+ .p2align 4
+L(return_null):
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(length_less16_offset0):
+ mov %dl, %cl
+ pcmpeqb (%eax), %xmm1
+
+ mov $1, %edx
+ sal %cl, %edx
+ sub $1, %edx
+ mov %edx, %ecx
+
+ pmovmskb %xmm1, %edx
+
+ and %ecx, %edx
+ test %edx, %edx
+ jz L(return_null)
+
+ bsr %edx, %ecx
+ add %ecx, %eax
+ ret
+
+ .p2align 4
+L(length_less16):
+ punpcklbw %xmm1, %xmm1
+ mov %ecx, %eax
+ punpcklbw %xmm1, %xmm1
+ add $16, %edx
+ jz L(return_null)
+
+ pshufd $0, %xmm1, %xmm1
+ and $15, %ecx
+ jz L(length_less16_offset0)
+
+ PUSH (%edi)
+ mov %cl, %dh
+ add %dl, %dh
+ and $-16, %eax
+
+ sub $16, %dh
+ ja L(length_less16_part2)
+
+ pcmpeqb (%eax), %xmm1
+ pmovmskb %xmm1, %edi
+
+ sar %cl, %edi
+ add %ecx, %eax
+ mov %dl, %cl
+
+ mov $1, %edx
+ sal %cl, %edx
+ sub $1, %edx
+
+ and %edx, %edi
+ test %edi, %edi
+ jz L(ret_null)
+
+ bsr %edi, %edi
+ add %edi, %eax
+ POP (%edi)
+ ret
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(length_less16_part2):
+ movdqa 16(%eax), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %edi
+
+ mov %cl, %ch
+
+ mov %dh, %cl
+ mov $1, %edx
+ sal %cl, %edx
+ sub $1, %edx
+
+ and %edx, %edi
+
+ test %edi, %edi
+ jnz L(length_less16_part2_return)
+
+ pcmpeqb (%eax), %xmm1
+ pmovmskb %xmm1, %edi
+
+ mov %ch, %cl
+ sar %cl, %edi
+ test %edi, %edi
+ jz L(ret_null)
+
+ bsr %edi, %edi
+ add %edi, %eax
+ xor %ch, %ch
+ add %ecx, %eax
+ POP (%edi)
+ ret
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(length_less16_part2_return):
+ bsr %edi, %edi
+ lea 16(%eax, %edi), %eax
+ POP (%edi)
+ ret
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(ret_null):
+ xor %eax, %eax
+ POP (%edi)
+ ret
+
+END (MEMCHR)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/memrchr-sse2.S b/sysdeps/i386/i686/multiarch/memrchr-sse2.S
new file mode 100644
index 0000000000..86a0cf961d
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/memrchr-sse2.S
@@ -0,0 +1,725 @@
+/* Optimized memrchr with sse2 without bsf
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+
+# include <sysdep.h>
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+
+# define PARMS 4
+# define STR1 PARMS
+# define STR2 STR1+4
+# define LEN STR2+4
+
+ atom_text_section
+ENTRY (__memrchr_sse2)
+ mov STR1(%esp), %ecx
+ movd STR2(%esp), %xmm1
+ mov LEN(%esp), %edx
+
+ sub $16, %edx
+ jbe L(length_less16)
+
+ punpcklbw %xmm1, %xmm1
+ add %edx, %ecx
+ punpcklbw %xmm1, %xmm1
+
+ movdqu (%ecx), %xmm0
+ pshufd $0, %xmm1, %xmm1
+ pcmpeqb %xmm1, %xmm0
+
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(exit_dispatch)
+
+ sub $64, %ecx
+ mov %ecx, %eax
+ and $15, %eax
+ jz L(loop_prolog)
+
+ lea 16(%ecx), %ecx
+ lea 16(%edx), %edx
+ sub %eax, %edx
+ and $-16, %ecx
+
+ .p2align 4
+/* Loop start on aligned string. */
+L(loop_prolog):
+ sub $64, %edx
+ jbe L(exit_loop)
+
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ movdqa 32(%ecx), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+ movdqa (%ecx), %xmm4
+ pcmpeqb %xmm1, %xmm4
+ pmovmskb %xmm4, %eax
+ test %eax, %eax
+ jnz L(exit_dispatch)
+
+ sub $64, %ecx
+ sub $64, %edx
+ jbe L(exit_loop)
+
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ movdqa 32(%ecx), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+ movdqa (%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(exit_dispatch)
+
+ mov %ecx, %eax
+ and $63, %eax
+ test %eax, %eax
+ jz L(align64_loop)
+
+ lea 64(%ecx), %ecx
+ lea 64(%edx), %edx
+ and $-64, %ecx
+ sub %eax, %edx
+
+ .p2align 4
+L(align64_loop):
+ sub $64, %ecx
+ sub $64, %edx
+ jbe L(exit_loop)
+
+ movdqa (%ecx), %xmm0
+ movdqa 16(%ecx), %xmm2
+ movdqa 32(%ecx), %xmm3
+ movdqa 48(%ecx), %xmm4
+
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb %xmm1, %xmm2
+ pcmpeqb %xmm1, %xmm3
+ pcmpeqb %xmm1, %xmm4
+
+ pmaxub %xmm3, %xmm0
+ pmaxub %xmm4, %xmm2
+ pmaxub %xmm0, %xmm2
+ pmovmskb %xmm2, %eax
+
+ test %eax, %eax
+ jz L(align64_loop)
+
+ pmovmskb %xmm4, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm2
+
+ pcmpeqb %xmm1, %xmm2
+ pcmpeqb (%ecx), %xmm1
+
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches16)
+
+ pmovmskb %xmm1, %eax
+ test %ah, %ah
+ jnz L(exit_dispatch_high)
+ mov %al, %dl
+ and $15 << 4, %dl
+ jnz L(exit_dispatch_8)
+ test $0x08, %al
+ jnz L(exit_4)
+ test $0x04, %al
+ jnz L(exit_3)
+ test $0x02, %al
+ jnz L(exit_2)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(exit_loop):
+ add $64, %edx
+ cmp $32, %edx
+ jbe L(exit_loop_32)
+
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48)
+
+ movdqa 32(%ecx), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %eax
+ test %eax, %eax
+ jnz L(matches32)
+
+ movdqa 16(%ecx), %xmm3
+ pcmpeqb %xmm1, %xmm3
+ pmovmskb %xmm3, %eax
+ test %eax, %eax
+ jnz L(matches16_1)
+ cmp $48, %edx
+ jbe L(return_null)
+
+ pcmpeqb (%ecx), %xmm1
+ pmovmskb %xmm1, %eax
+ test %eax, %eax
+ jnz L(matches0_1)
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(exit_loop_32):
+ movdqa 48(%ecx), %xmm0
+ pcmpeqb %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(matches48_1)
+ cmp $16, %edx
+ jbe L(return_null)
+
+ pcmpeqb 32(%ecx), %xmm1
+ pmovmskb %xmm1, %eax
+ test %eax, %eax
+ jnz L(matches32_1)
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(matches16):
+ lea 16(%ecx), %ecx
+ test %ah, %ah
+ jnz L(exit_dispatch_high)
+ mov %al, %dl
+ and $15 << 4, %dl
+ jnz L(exit_dispatch_8)
+ test $0x08, %al
+ jnz L(exit_4)
+ test $0x04, %al
+ jnz L(exit_3)
+ test $0x02, %al
+ jnz L(exit_2)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(matches32):
+ lea 32(%ecx), %ecx
+ test %ah, %ah
+ jnz L(exit_dispatch_high)
+ mov %al, %dl
+ and $15 << 4, %dl
+ jnz L(exit_dispatch_8)
+ test $0x08, %al
+ jnz L(exit_4)
+ test $0x04, %al
+ jnz L(exit_3)
+ test $0x02, %al
+ jnz L(exit_2)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(matches48):
+ lea 48(%ecx), %ecx
+
+ .p2align 4
+L(exit_dispatch):
+ test %ah, %ah
+ jnz L(exit_dispatch_high)
+ mov %al, %dl
+ and $15 << 4, %dl
+ jnz L(exit_dispatch_8)
+ test $0x08, %al
+ jnz L(exit_4)
+ test $0x04, %al
+ jnz L(exit_3)
+ test $0x02, %al
+ jnz L(exit_2)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(exit_dispatch_8):
+ test $0x80, %al
+ jnz L(exit_8)
+ test $0x40, %al
+ jnz L(exit_7)
+ test $0x20, %al
+ jnz L(exit_6)
+ lea 4(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_dispatch_high):
+ mov %ah, %dh
+ and $15 << 4, %dh
+ jnz L(exit_dispatch_high_8)
+ test $0x08, %ah
+ jnz L(exit_12)
+ test $0x04, %ah
+ jnz L(exit_11)
+ test $0x02, %ah
+ jnz L(exit_10)
+ lea 8(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_dispatch_high_8):
+ test $0x80, %ah
+ jnz L(exit_16)
+ test $0x40, %ah
+ jnz L(exit_15)
+ test $0x20, %ah
+ jnz L(exit_14)
+ lea 12(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_2):
+ lea 1(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_3):
+ lea 2(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_4):
+ lea 3(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_6):
+ lea 5(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_7):
+ lea 6(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_8):
+ lea 7(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_10):
+ lea 9(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_11):
+ lea 10(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_12):
+ lea 11(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_14):
+ lea 13(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_15):
+ lea 14(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_16):
+ lea 15(%ecx), %eax
+ ret
+
+ .p2align 4
+L(matches0_1):
+ lea -64(%edx), %edx
+
+ test %ah, %ah
+ jnz L(exit_dispatch_1_high)
+ mov %al, %ah
+ and $15 << 4, %ah
+ jnz L(exit_dispatch_1_8)
+ test $0x08, %al
+ jnz L(exit_1_4)
+ test $0x04, %al
+ jnz L(exit_1_3)
+ test $0x02, %al
+ jnz L(exit_1_2)
+ add $0, %edx
+ jl L(return_null)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(matches16_1):
+ lea -48(%edx), %edx
+ lea 16(%ecx), %ecx
+
+ test %ah, %ah
+ jnz L(exit_dispatch_1_high)
+ mov %al, %ah
+ and $15 << 4, %ah
+ jnz L(exit_dispatch_1_8)
+ test $0x08, %al
+ jnz L(exit_1_4)
+ test $0x04, %al
+ jnz L(exit_1_3)
+ test $0x02, %al
+ jnz L(exit_1_2)
+ add $0, %edx
+ jl L(return_null)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(matches32_1):
+ lea -32(%edx), %edx
+ lea 32(%ecx), %ecx
+
+ test %ah, %ah
+ jnz L(exit_dispatch_1_high)
+ mov %al, %ah
+ and $15 << 4, %ah
+ jnz L(exit_dispatch_1_8)
+ test $0x08, %al
+ jnz L(exit_1_4)
+ test $0x04, %al
+ jnz L(exit_1_3)
+ test $0x02, %al
+ jnz L(exit_1_2)
+ add $0, %edx
+ jl L(return_null)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(matches48_1):
+ lea -16(%edx), %edx
+ lea 48(%ecx), %ecx
+
+ .p2align 4
+L(exit_dispatch_1):
+ test %ah, %ah
+ jnz L(exit_dispatch_1_high)
+ mov %al, %ah
+ and $15 << 4, %ah
+ jnz L(exit_dispatch_1_8)
+ test $0x08, %al
+ jnz L(exit_1_4)
+ test $0x04, %al
+ jnz L(exit_1_3)
+ test $0x02, %al
+ jnz L(exit_1_2)
+ add $0, %edx
+ jl L(return_null)
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(exit_dispatch_1_8):
+ test $0x80, %al
+ jnz L(exit_1_8)
+ test $0x40, %al
+ jnz L(exit_1_7)
+ test $0x20, %al
+ jnz L(exit_1_6)
+ add $4, %edx
+ jl L(return_null)
+ lea 4(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_dispatch_1_high):
+ mov %ah, %al
+ and $15 << 4, %al
+ jnz L(exit_dispatch_1_high_8)
+ test $0x08, %ah
+ jnz L(exit_1_12)
+ test $0x04, %ah
+ jnz L(exit_1_11)
+ test $0x02, %ah
+ jnz L(exit_1_10)
+ add $8, %edx
+ jl L(return_null)
+ lea 8(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_dispatch_1_high_8):
+ test $0x80, %ah
+ jnz L(exit_1_16)
+ test $0x40, %ah
+ jnz L(exit_1_15)
+ test $0x20, %ah
+ jnz L(exit_1_14)
+ add $12, %edx
+ jl L(return_null)
+ lea 12(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_2):
+ add $1, %edx
+ jl L(return_null)
+ lea 1(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_3):
+ add $2, %edx
+ jl L(return_null)
+ lea 2(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_4):
+ add $3, %edx
+ jl L(return_null)
+ lea 3(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_6):
+ add $5, %edx
+ jl L(return_null)
+ lea 5(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_7):
+ add $6, %edx
+ jl L(return_null)
+ lea 6(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_8):
+ add $7, %edx
+ jl L(return_null)
+ lea 7(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_10):
+ add $9, %edx
+ jl L(return_null)
+ lea 9(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_11):
+ add $10, %edx
+ jl L(return_null)
+ lea 10(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_12):
+ add $11, %edx
+ jl L(return_null)
+ lea 11(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_14):
+ add $13, %edx
+ jl L(return_null)
+ lea 13(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_15):
+ add $14, %edx
+ jl L(return_null)
+ lea 14(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit_1_16):
+ add $15, %edx
+ jl L(return_null)
+ lea 15(%ecx), %eax
+ ret
+
+ .p2align 4
+L(return_null):
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(length_less16_offset0):
+ mov %dl, %cl
+ pcmpeqb (%eax), %xmm1
+
+ mov $1, %edx
+ sal %cl, %edx
+ sub $1, %edx
+
+ mov %eax, %ecx
+ pmovmskb %xmm1, %eax
+
+ and %edx, %eax
+ test %eax, %eax
+ jnz L(exit_dispatch)
+
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(length_less16):
+ punpcklbw %xmm1, %xmm1
+ add $16, %edx
+ je L(return_null)
+ punpcklbw %xmm1, %xmm1
+
+ mov %ecx, %eax
+ pshufd $0, %xmm1, %xmm1
+
+ and $15, %ecx
+ jz L(length_less16_offset0)
+
+ PUSH (%edi)
+
+ mov %cl, %dh
+ add %dl, %dh
+ and $-16, %eax
+
+ sub $16, %dh
+ ja L(length_less16_part2)
+
+ pcmpeqb (%eax), %xmm1
+ pmovmskb %xmm1, %edi
+
+ sar %cl, %edi
+ add %ecx, %eax
+ mov %dl, %cl
+
+ mov $1, %edx
+ sal %cl, %edx
+ sub $1, %edx
+
+ and %edx, %edi
+ test %edi, %edi
+ jz L(ret_null)
+
+ bsr %edi, %edi
+ add %edi, %eax
+ POP (%edi)
+ ret
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(length_less16_part2):
+ movdqa 16(%eax), %xmm2
+ pcmpeqb %xmm1, %xmm2
+ pmovmskb %xmm2, %edi
+
+ mov %cl, %ch
+
+ mov %dh, %cl
+ mov $1, %edx
+ sal %cl, %edx
+ sub $1, %edx
+
+ and %edx, %edi
+
+ test %edi, %edi
+ jnz L(length_less16_part2_return)
+
+ pcmpeqb (%eax), %xmm1
+ pmovmskb %xmm1, %edi
+
+ mov %ch, %cl
+ sar %cl, %edi
+ test %edi, %edi
+ jz L(ret_null)
+
+ bsr %edi, %edi
+ add %edi, %eax
+ xor %ch, %ch
+ add %ecx, %eax
+ POP (%edi)
+ ret
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(length_less16_part2_return):
+ bsr %edi, %edi
+ lea 16(%eax, %edi), %eax
+ POP (%edi)
+ ret
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(ret_null):
+ xor %eax, %eax
+ POP (%edi)
+ ret
+
+END (__memrchr_sse2)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/memrchr.S b/sysdeps/i386/i686/multiarch/memrchr.S
new file mode 100644
index 0000000000..8e5b2c50a2
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/memrchr.S
@@ -0,0 +1,79 @@
+/* Multiple versions of memrchr
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+ .text
+ENTRY(__memrchr)
+ .type __memrchr, @gnu_indirect_function
+ pushl %ebx
+ CFI_PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+
+1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx)
+ jz 3f
+
+ leal __memrchr_sse2@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+
+ CFI_PUSH (%ebx)
+
+2: leal __memrchr_ia32@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+
+ CFI_PUSH (%ebx)
+
+3: leal __memrchr_sse2_bsf@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+END(__memrchr)
+
+weak_alias(__memrchr, memrchr)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S b/sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S
new file mode 100644
index 0000000000..88c0e5776c
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/rawmemchr-sse2-bsf.S
@@ -0,0 +1,3 @@
+#define USE_AS_RAWMEMCHR
+#define MEMCHR __rawmemchr_sse2_bsf
+#include "memchr-sse2-bsf.S"
diff --git a/sysdeps/i386/i686/multiarch/rawmemchr-sse2.S b/sysdeps/i386/i686/multiarch/rawmemchr-sse2.S
new file mode 100644
index 0000000000..038c74896b
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/rawmemchr-sse2.S
@@ -0,0 +1,3 @@
+#define USE_AS_RAWMEMCHR
+#define MEMCHR __rawmemchr_sse2
+#include "memchr-sse2.S"
diff --git a/sysdeps/i386/i686/multiarch/rawmemchr.S b/sysdeps/i386/i686/multiarch/rawmemchr.S
new file mode 100644
index 0000000000..111f0dcf63
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/rawmemchr.S
@@ -0,0 +1,99 @@
+/* Multiple versions of rawmemchr
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+ .text
+ENTRY(__rawmemchr)
+ .type __rawmemchr, @gnu_indirect_function
+ pushl %ebx
+ CFI_PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+
+1: testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ testl $bit_Slow_BSF, FEATURE_OFFSET+index_Slow_BSF+__cpu_features@GOTOFF(%ebx)
+ jz 3f
+
+ leal __rawmemchr_sse2@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+
+ CFI_PUSH (%ebx)
+
+2: leal __rawmemchr_ia32@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+
+ CFI_PUSH (%ebx)
+
+3: leal __rawmemchr_sse2_bsf@GOTOFF(%ebx), %eax
+ popl %ebx
+ CFI_POP (%ebx)
+ ret
+END(__rawmemchr)
+
+weak_alias(__rawmemchr, rawmemchr)
+
+# undef ENTRY
+# define ENTRY(name) \
+ .type __rawmemchr_ia32, @function; \
+ .globl __rawmemchr_ia32; \
+ .p2align 4; \
+ __rawmemchr_ia32: cfi_startproc; \
+ CALL_MCOUNT
+# undef END
+# define END(name) \
+ cfi_endproc; .size __rawmemchr_ia32, .-__rawmemchr_ia32
+
+# undef libc_hidden_def
+/* IFUNC doesn't work with the hidden functions in shared library since
+ they will be called without setting up EBX needed for PLT which is
+ used by IFUNC. */
+# define libc_hidden_def(name) \
+ .globl __GI___rawmemchr; __GI___rawmemchr = __rawmemchr_ia32
+
+#endif
+#include "../../rawmemchr.S"
diff --git a/sysdeps/i386/i686/multiarch/rtld-strnlen.c b/sysdeps/i386/i686/multiarch/rtld-strnlen.c
new file mode 100644
index 0000000000..1aa5440644
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/rtld-strnlen.c
@@ -0,0 +1 @@
+#include <string/strnlen.c>
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp-c.c b/sysdeps/i386/i686/multiarch/strcasecmp-c.c
new file mode 100644
index 0000000000..753c6ec84a
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strcasecmp-c.c
@@ -0,0 +1,12 @@
+#include <string.h>
+
+extern __typeof (strcasecmp) __strcasecmp_nonascii;
+
+#define __strcasecmp __strcasecmp_nonascii
+#include <string/strcasecmp.c>
+
+strong_alias (__strcasecmp_nonascii, __strcasecmp_ia32)
+
+/* The needs of strcasecmp in libc are minimal, no need to go through
+ the IFUNC. */
+strong_alias (__strcasecmp_nonascii, __GI___strcasecmp)
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp.S b/sysdeps/i386/i686/multiarch/strcasecmp.S
new file mode 100644
index 0000000000..97603d884b
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strcasecmp.S
@@ -0,0 +1,68 @@
+/* Entry point for multi-version x86 strcasecmp.
+ Copyright (C) 2011 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifdef SHARED
+ .text
+ENTRY(__strcasecmp)
+ .type __strcasecmp, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __strcasecmp_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __strcasecmp_ssse3@GOTOFF(%ebx), %eax
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __strcasecmp_sse4_2@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (ebx)
+ ret
+END(__strcasecmp)
+#else
+ .text
+ENTRY(__strcasecmp)
+ .type __strcasecmp, @gnu_indirect_function
+ cmpl $0, KIND_OFFSET+__cpu_features
+ jne 1f
+ call __init_cpu_features
+1: leal __strcasecmp_ia32, %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features
+ jz 2f
+ leal __strcasecmp_ssse3, %eax
+#if 0
+ // XXX Temporarily
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
+ jz 2f
+ leal __strcasecmp_sse4_2, %eax
+#endif
+2: ret
+END(__strcasecmp)
+#endif
+
+weak_alias (__strcasecmp, strcasecmp)
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
new file mode 100644
index 0000000000..d10e872568
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strcasecmp_l-c.c
@@ -0,0 +1,11 @@
+#include <string.h>
+
+extern __typeof (strcasecmp_l) __strcasecmp_l_nonascii;
+
+#define __strcasecmp_l __strcasecmp_l_nonascii
+#define USE_IN_EXTENDED_LOCALE_MODEL 1
+#include <string/strcasecmp.c>
+
+/* The needs of strcasecmp in libc are minimal, no need to go through
+ the IFUNC. */
+strong_alias (__strcasecmp_l_nonascii, __GI___strcasecmp_l)
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l-sse4.S b/sysdeps/i386/i686/multiarch/strcasecmp_l-sse4.S
new file mode 100644
index 0000000000..411d4153f2
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strcasecmp_l-sse4.S
@@ -0,0 +1,2 @@
+#define USE_AS_STRCASECMP_L 1
+#include "strcmp-sse4.S"
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l-ssse3.S b/sysdeps/i386/i686/multiarch/strcasecmp_l-ssse3.S
new file mode 100644
index 0000000000..a22b93c518
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strcasecmp_l-ssse3.S
@@ -0,0 +1,2 @@
+#define USE_AS_STRCASECMP_L 1
+#include "strcmp-ssse3.S"
diff --git a/sysdeps/i386/i686/multiarch/strcasecmp_l.S b/sysdeps/i386/i686/multiarch/strcasecmp_l.S
new file mode 100644
index 0000000000..1322bd86da
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strcasecmp_l.S
@@ -0,0 +1,5 @@
+#define STRCMP __strcasecmp_l
+#define USE_AS_STRCASECMP_L
+#include "strcmp.S"
+
+weak_alias (__strcasecmp_l, strcasecmp_l)
diff --git a/sysdeps/i386/i686/multiarch/strcmp-sse4.S b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
index 0de0a113c0..c9e0317b60 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-sse4.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-sse4.S
@@ -1,5 +1,5 @@
/* strcmp with SSE4.2
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -34,33 +34,184 @@
#define PUSH(REG) pushl REG; CFI_PUSH (REG)
#define POP(REG) popl REG; CFI_POP (REG)
-#ifndef USE_AS_STRNCMP
+#ifdef USE_AS_STRNCMP
# ifndef STRCMP
-# define STRCMP __strcmp_sse4_2
+# define STRCMP __strncmp_sse4_2
# endif
-# define STR1 4
+# define STR1 8
# define STR2 STR1+4
-# define RETURN ret; .p2align 4
-#else
+# define CNT STR2+4
+# define RETURN POP (REM); ret; .p2align 4; CFI_PUSH (REM)
+# define REM %ebp
+#elif defined USE_AS_STRCASECMP_L
+# include "locale-defines.h"
# ifndef STRCMP
-# define STRCMP __strncmp_sse4_2
+# define STRCMP __strcasecmp_l_sse4_2
+# endif
+# ifdef PIC
+# define STR1 12
+# else
+# define STR1 8
+# endif
+# define STR2 STR1+4
+# define LOCALE 12 /* Loaded before the adjustement. */
+# ifdef PIC
+# define RETURN POP (%edi); POP (%ebx); ret; \
+ .p2align 4; CFI_PUSH (%ebx); CFI_PUSH (%edi)
+# else
+# define RETURN POP (%edi); ret; .p2align 4; CFI_PUSH (%edi)
+# endif
+# define NONASCII __strcasecmp_nonascii
+#elif defined USE_AS_STRNCASECMP_L
+# include "locale-defines.h"
+# ifndef STRCMP
+# define STRCMP __strncasecmp_l_sse4_2
+# endif
+# ifdef PIC
+# define STR1 16
+# else
+# define STR1 12
# endif
-# define STR1 8
# define STR2 STR1+4
# define CNT STR2+4
-# define RETURN POP (%ebp); ret; .p2align 4; CFI_PUSH (%ebp)
+# define LOCALE 16 /* Loaded before the adjustement. */
+# ifdef PIC
+# define RETURN POP (%edi); POP (REM); POP (%ebx); ret; \
+ .p2align 4; \
+ CFI_PUSH (%ebx); CFI_PUSH (REM); CFI_PUSH (%edi)
+# else
+# define RETURN POP (%edi); POP (REM); ret; \
+ .p2align 4; CFI_PUSH (REM); CFI_PUSH (%edi)
+# endif
+# define REM %ebp
+# define NONASCII __strncasecmp_nonascii
+#else
+# ifndef STRCMP
+# define STRCMP __strcmp_sse4_2
+# endif
+# define STR1 4
+# define STR2 STR1+4
+# define RETURN ret; .p2align 4
#endif
.section .text.sse4.2,"ax",@progbits
-ENTRY (STRCMP)
-#ifdef USE_AS_STRNCMP
- PUSH (%ebp)
+
+#ifdef USE_AS_STRCASECMP_L
+ENTRY (__strcasecmp_sse4_2)
+# ifdef PIC
+ PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
+# else
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
+# endif
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
+# else
+ movl (%eax), %eax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
+ jne __strcasecmp_nonascii
+ jmp L(ascii)
+END (__strcasecmp_sse4_2)
+#endif
+
+#ifdef USE_AS_STRNCASECMP_L
+ENTRY (__strncasecmp_sse4_2)
+# ifdef PIC
+ PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
+# else
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
+# endif
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
+# else
+ movl (%eax), %eax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
+ jne __strncasecmp_nonascii
+ jmp L(ascii)
+END (__strncasecmp_sse4_2)
+#endif
+
+ ENTRY (STRCMP)
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movl LOCALE(%esp), %eax
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
+# else
+ movl (%eax), %eax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
+ jne NONASCII
+
+# ifdef PIC
+ PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+# endif
+L(ascii):
+ .section .rodata.cst16,"aM",@progbits,16
+ .align 16
+.Lbelowupper:
+ .quad 0x4040404040404040
+ .quad 0x4040404040404040
+.Ltopupper:
+ .quad 0x5b5b5b5b5b5b5b5b
+ .quad 0x5b5b5b5b5b5b5b5b
+.Ltouppermask:
+ .quad 0x2020202020202020
+ .quad 0x2020202020202020
+ .previous
+
+# ifdef PIC
+# define UCLOW_reg .Lbelowupper@GOTOFF(%ebx)
+# define UCHIGH_reg .Ltopupper@GOTOFF(%ebx)
+# define LCQWORD_reg .Ltouppermask@GOTOFF(%ebx)
+# else
+# define UCLOW_reg .Lbelowupper
+# define UCHIGH_reg .Ltopupper
+# define LCQWORD_reg .Ltouppermask
+# endif
+#endif
+
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ PUSH (REM)
+#endif
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ PUSH (%edi)
#endif
mov STR1(%esp), %edx
mov STR2(%esp), %eax
-#ifdef USE_AS_STRNCMP
- movl CNT(%esp), %ebp
- test %ebp, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ movl CNT(%esp), REM
+ test REM, REM
je L(eq)
#endif
mov %dx, %cx
@@ -72,10 +223,40 @@ ENTRY (STRCMP)
and $0xfff, %ecx
cmp $0xff0, %ecx
ja L(first4bytes)
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# define TOLOWER(reg1, reg2) \
+ movdqa reg1, %xmm3; \
+ movdqa UCHIGH_reg, %xmm4; \
+ movdqa reg2, %xmm5; \
+ movdqa UCHIGH_reg, %xmm6; \
+ pcmpgtb UCLOW_reg, %xmm3; \
+ pcmpgtb reg1, %xmm4; \
+ pcmpgtb UCLOW_reg, %xmm5; \
+ pcmpgtb reg2, %xmm6; \
+ pand %xmm4, %xmm3; \
+ pand %xmm6, %xmm5; \
+ pand LCQWORD_reg, %xmm3; \
+ pand LCQWORD_reg, %xmm5; \
+ por %xmm3, reg1; \
+ por %xmm5, reg2
+
+ movdqu (%eax), %xmm1
+ TOLOWER (%xmm2, %xmm1)
+ movd %xmm2, %ecx
+ movd %xmm1, %edi
+ movdqa %xmm2, %xmm3
+ movdqa %xmm1, %xmm4
+ cmpl %edi, %ecx
+#else
+# define TOLOWER(reg1, reg)
+
movd %xmm2, %ecx
cmp (%eax), %ecx
+#endif
jne L(less4bytes)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
movdqu (%eax), %xmm1
+#endif
pxor %xmm2, %xmm1
pxor %xmm0, %xmm0
ptest %xmm1, %xmm0
@@ -84,113 +265,210 @@ ENTRY (STRCMP)
ptest %xmm2, %xmm0
jnc L(less16bytes)
-#ifdef USE_AS_STRNCMP
- sub $16, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, REM
jbe L(eq)
#endif
add $16, %edx
add $16, %eax
L(first4bytes):
movzbl (%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl (%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, (%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $1, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $1, REM
je L(eq)
#endif
movzbl 1(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 1(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 1(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $2, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $2, REM
je L(eq)
#endif
movzbl 2(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 2(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 2(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $3, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $3, REM
je L(eq)
#endif
movzbl 3(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 3(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 3(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $4, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $4, REM
je L(eq)
#endif
movzbl 4(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 4(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 4(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $5, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $5, REM
je L(eq)
#endif
movzbl 5(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 5(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 5(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $6, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $6, REM
je L(eq)
#endif
movzbl 6(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 6(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 6(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $7, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $7, REM
je L(eq)
#endif
movzbl 7(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 7(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 7(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- sub $8, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $8, REM
je L(eq)
#endif
add $8, %eax
add $8, %edx
- PUSH (%ebx)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
PUSH (%edi)
+#endif
PUSH (%esi)
-#ifdef USE_AS_STRNCMP
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
cfi_remember_state
#endif
mov %edx, %edi
mov %eax, %esi
xorl %eax, %eax
L(check_offset):
- movl %edi, %ebx
+ movl %edi, %edx
movl %esi, %ecx
- andl $0xfff, %ebx
+ andl $0xfff, %edx
andl $0xfff, %ecx
- cmpl %ebx, %ecx
- cmovl %ebx, %ecx
+ cmpl %edx, %ecx
+ cmovl %edx, %ecx
lea -0xff0(%ecx), %edx
sub %edx, %edi
sub %edx, %esi
@@ -199,11 +477,12 @@ L(check_offset):
L(loop):
movdqu (%esi,%edx), %xmm2
movdqu (%edi,%edx), %xmm1
+ TOLOWER (%xmm2, %xmm1)
pcmpistri $0x1a, %xmm2, %xmm1
jbe L(end)
-#ifdef USE_AS_STRNCMP
- sub $16, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, REM
jbe L(more16byteseq)
#endif
@@ -211,13 +490,22 @@ L(loop):
jle L(loop)
L(crosspage):
movzbl (%edi,%edx), %eax
- movzbl (%esi,%edx), %ebx
- subl %ebx, %eax
+ movzbl (%esi,%edx), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+# endif
+#endif
+ subl %ecx, %eax
jne L(ret)
- testl %ebx, %ebx
+ testl %ecx, %ecx
je L(ret)
-#ifdef USE_AS_STRNCMP
- sub $1, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $1, REM
jbe L(more16byteseq)
#endif
inc %edx
@@ -230,30 +518,44 @@ L(crosspage):
.p2align 4
L(end):
jnc L(ret)
-#ifdef USE_AS_STRNCMP
- sub %ecx, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub %ecx, REM
jbe L(more16byteseq)
#endif
- lea (%ecx,%edx), %ebx
- movzbl (%edi,%ebx), %eax
- movzbl (%esi,%ebx), %ecx
+ lea (%ecx,%edx), %ecx
+ movzbl (%edi,%ecx), %eax
+ movzbl (%esi,%ecx), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+# endif
+#endif
subl %ecx, %eax
L(ret):
POP (%esi)
POP (%edi)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ POP (REM)
+#endif
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
POP (%ebx)
-#ifdef USE_AS_STRNCMP
- POP (%ebp)
+# endif
#endif
ret
.p2align 4
-#ifdef USE_AS_STRNCMP
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
cfi_restore_state
L(more16byteseq):
POP (%esi)
+# ifdef USE_AS_STRNCMP
POP (%edi)
- POP (%ebx)
+# endif
#endif
L(eq):
xorl %eax, %eax
@@ -269,27 +571,45 @@ L(neq_bigger):
L(less16bytes):
add $0xfefefeff, %ecx
jnc L(less4bytes)
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movd %xmm3, %edi
+ xor %edi, %ecx
+#else
xor (%edx), %ecx
+#endif
or $0xfefefeff, %ecx
add $1, %ecx
jnz L(less4bytes)
-#ifdef USE_AS_STRNCMP
- cmp $4, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $4, REM
jbe L(eq)
#endif
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ psrldq $4, %xmm3
+ psrldq $4, %xmm4
+ movd %xmm3, %ecx
+ movd %xmm4, %edi
+ cmp %edi, %ecx
+ mov %ecx, %edi
+#else
mov 4(%edx), %ecx
cmp 4(%eax), %ecx
+#endif
jne L(more4bytes)
add $0xfefefeff, %ecx
jnc L(more4bytes)
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ xor %edi, %ecx
+#else
xor 4(%edx), %ecx
+#endif
or $0xfefefeff, %ecx
add $1, %ecx
jnz L(more4bytes)
-#ifdef USE_AS_STRNCMP
- sub $8, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $8, REM
jbe L(eq)
#endif
@@ -298,80 +618,176 @@ L(less16bytes):
L(less4bytes):
movzbl (%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl (%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, (%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $1, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $1, REM
je L(eq)
#endif
movzbl 1(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 1(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 1(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $2, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $2, REM
je L(eq)
#endif
movzbl 2(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 2(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 2(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $3, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $3, REM
je L(eq)
#endif
movzbl 3(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 3(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 3(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
L(more4bytes):
-#ifdef USE_AS_STRNCMP
- cmp $4, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $4, REM
je L(eq)
#endif
movzbl 4(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 4(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 4(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $5, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $5, REM
je L(eq)
#endif
movzbl 5(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 5(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 5(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $6, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $6, REM
je L(eq)
#endif
movzbl 6(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 6(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 6(%edx)
+#endif
jne L(neq)
cmpl $0, %ecx
je L(eq)
-#ifdef USE_AS_STRNCMP
- cmp $7, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $7, REM
je L(eq)
#endif
movzbl 7(%eax), %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movzbl 7(%edx), %edi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%edi,4), %edi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%edi,4), %edi
+# endif
+ cmpl %ecx, %edi
+#else
cmpb %cl, 7(%edx)
+#endif
jne L(neq)
jmp L(eq)
diff --git a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
index 607b69b6ff..cbba465504 100644
--- a/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/strcmp-ssse3.S
@@ -1,5 +1,5 @@
/* strcmp with SSSE3
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -34,43 +34,201 @@
#define PUSH(REG) pushl REG; CFI_PUSH (REG)
#define POP(REG) popl REG; CFI_POP (REG)
-#ifndef USE_AS_STRNCMP
+#ifdef USE_AS_STRNCMP
# ifndef STRCMP
-# define STRCMP __strcmp_ssse3
+# define STRCMP __strncmp_ssse3
# endif
-# define STR1 4
+# define STR1 8
# define STR2 STR1+4
-# define RETURN ret; .p2align 4
+# define CNT STR2+4
+# define RETURN POP (REM); ret; .p2align 4; CFI_PUSH (REM)
+# define UPDATE_STRNCMP_COUNTER \
+ /* calculate left number to compare */ \
+ mov $16, %esi; \
+ sub %ecx, %esi; \
+ cmp %esi, REM; \
+ jbe L(more8byteseq); \
+ sub %esi, REM
+# define FLAGS %ebx
+# define REM %ebp
+#elif defined USE_AS_STRCASECMP_L
+# include "locale-defines.h"
+# ifndef STRCMP
+# define STRCMP __strcasecmp_l_ssse3
+# endif
+# ifdef PIC
+# define STR1 8
+# else
+# define STR1 4
+# endif
+# define STR2 STR1+4
+# define LOCALE 12 /* Loaded before the adjustement. */
+# ifdef PIC
+# define RETURN POP (%ebx); ret; .p2align 4; CFI_PUSH (%ebx)
+# else
+# define RETURN ret; .p2align 4
+# endif
# define UPDATE_STRNCMP_COUNTER
-#else
+# define FLAGS (%esp)
+# define NONASCII __strcasecmp_nonascii
+#elif defined USE_AS_STRNCASECMP_L
+# include "locale-defines.h"
# ifndef STRCMP
-# define STRCMP __strncmp_ssse3
+# define STRCMP __strncasecmp_l_ssse3
+# endif
+# ifdef PIC
+# define STR1 12
+# else
+# define STR1 8
# endif
-# define STR1 8
# define STR2 STR1+4
# define CNT STR2+4
-# define RETURN POP (%ebp); ret; .p2align 4; CFI_PUSH (%ebp)
+# define LOCALE 16 /* Loaded before the adjustement. */
+# ifdef PIC
+# define RETURN POP (REM); POP (%ebx); ret; \
+ .p2align 4; CFI_PUSH (%ebx); CFI_PUSH (REM)
+# else
+# define RETURN POP (REM); ret; .p2align 4; CFI_PUSH (REM)
+# endif
# define UPDATE_STRNCMP_COUNTER \
/* calculate left number to compare */ \
mov $16, %esi; \
sub %ecx, %esi; \
- cmp %esi, %ebp; \
+ cmp %esi, REM; \
jbe L(more8byteseq); \
- sub %esi, %ebp
+ sub %esi, REM
+# define FLAGS (%esp)
+# define REM %ebp
+# define NONASCII __strncasecmp_nonascii
+#else
+# ifndef STRCMP
+# define STRCMP __strcmp_ssse3
+# endif
+# define STR1 4
+# define STR2 STR1+4
+# define RETURN ret; .p2align 4
+# define UPDATE_STRNCMP_COUNTER
+# define FLAGS %ebx
#endif
.section .text.ssse3,"ax",@progbits
+
+#ifdef USE_AS_STRCASECMP_L
+ENTRY (__strcasecmp_ssse3)
+# ifdef PIC
+ PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
+# else
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
+# endif
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
+# else
+ movl (%eax), %eax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
+ jne __strcasecmp_nonascii
+ jmp L(ascii)
+END (__strcasecmp_ssse3)
+#endif
+
+#ifdef USE_AS_STRNCASECMP_L
+ENTRY (__strncasecmp_ssse3)
+# ifdef PIC
+ PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ movl __libc_tsd_LOCALE@GOTNTPOFF(%ebx), %eax
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ addl %gs:0, %eax
+ movl (%eax), %eax
+# else
+ movl %gs:(%eax), %eax
+# endif
+# else
+# ifdef NO_TLS_DIRECT_SEG_REFS
+ movl %gs:0, %eax
+ movl __libc_tsd_LOCALE@NTPOFF(%eax), %eax
+# else
+ movl %gs:__libc_tsd_LOCALE@NTPOFF, %eax
+# endif
+# endif
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
+# else
+ movl (%eax), %eax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
+ jne __strncasecmp_nonascii
+ jmp L(ascii)
+END (__strncasecmp_ssse3)
+#endif
+
ENTRY (STRCMP)
-#ifdef USE_AS_STRNCMP
- PUSH (%ebp)
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movl LOCALE(%esp), %eax
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movl LOCALE_T___LOCALES+LC_CTYPE*4(%eax), %eax
+# else
+ movl (%eax), %eax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%eax)
+ jne NONASCII
+
+# ifdef PIC
+ PUSH (%ebx)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+# endif
+L(ascii):
+ .section .rodata.cst16,"aM",@progbits,16
+ .align 16
+.Lbelowupper:
+ .quad 0x4040404040404040
+ .quad 0x4040404040404040
+.Ltopupper:
+ .quad 0x5b5b5b5b5b5b5b5b
+ .quad 0x5b5b5b5b5b5b5b5b
+.Ltouppermask:
+ .quad 0x2020202020202020
+ .quad 0x2020202020202020
+ .previous
+
+# ifdef PIC
+# define UCLOW_reg .Lbelowupper@GOTOFF(%ebx)
+# define UCHIGH_reg .Ltopupper@GOTOFF(%ebx)
+# define LCQWORD_reg .Ltouppermask@GOTOFF(%ebx)
+# else
+# define UCLOW_reg .Lbelowupper
+# define UCHIGH_reg .Ltopupper
+# define LCQWORD_reg .Ltouppermask
+# endif
#endif
+
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ PUSH (REM)
+#endif
+
movl STR1(%esp), %edx
movl STR2(%esp), %eax
-#ifdef USE_AS_STRNCMP
- movl CNT(%esp), %ebp
- cmp $16, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ movl CNT(%esp), REM
+ cmp $16, REM
jb L(less16bytes_sncmp)
-#else
+#elif !defined USE_AS_STRCASECMP_L
movzbl (%eax), %ecx
cmpb %cl, (%edx)
jne L(neq)
@@ -135,15 +293,35 @@ ENTRY (STRCMP)
movlpd (%edx), %xmm2
movhpd 8(%eax), %xmm1
movhpd 8(%edx), %xmm2
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# define TOLOWER(reg1, reg2) \
+ movdqa reg1, %xmm5; \
+ movdqa reg2, %xmm7; \
+ movdqa UCHIGH_reg, %xmm6; \
+ pcmpgtb UCLOW_reg, %xmm5; \
+ pcmpgtb UCLOW_reg, %xmm7; \
+ pcmpgtb reg1, %xmm6; \
+ pand %xmm6, %xmm5; \
+ movdqa UCHIGH_reg, %xmm6; \
+ pcmpgtb reg2, %xmm6; \
+ pand %xmm6, %xmm7; \
+ pand LCQWORD_reg, %xmm5; \
+ por %xmm5, reg1; \
+ pand LCQWORD_reg, %xmm7; \
+ por %xmm7, reg2
+ TOLOWER (%xmm1, %xmm2)
+#else
+# define TOLOWER(reg1, reg2)
+#endif
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
psubb %xmm0, %xmm1
pmovmskb %xmm1, %ecx
sub $0xffff, %ecx
jnz L(less16bytes)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(eq)
#endif
add $16, %eax
@@ -151,10 +329,16 @@ ENTRY (STRCMP)
L(crosspage):
- PUSH (%ebx)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ PUSH (FLAGS)
+#endif
PUSH (%edi)
PUSH (%esi)
-#ifdef USE_AS_STRNCMP
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ pushl $0
+ cfi_adjust_cfa_offset (4)
+#endif
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
cfi_remember_state
#endif
@@ -164,11 +348,13 @@ L(crosspage):
and $0xf, %edi
xor %ecx, %eax
xor %edi, %edx
- xor %ebx, %ebx
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ xor FLAGS, FLAGS
+#endif
cmp %edi, %ecx
je L(ashr_0)
ja L(bigger)
- or $0x20, %ebx
+ orl $0x20, FLAGS
xchg %edx, %eax
xchg %ecx, %edi
L(bigger):
@@ -218,7 +404,13 @@ L(ashr_0):
movdqa (%eax), %xmm1
pxor %xmm0, %xmm0
pcmpeqb %xmm1, %xmm0
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ movdqa (%edx), %xmm2
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm2, %xmm1
+#else
pcmpeqb (%edx), %xmm1
+#endif
psubb %xmm0, %xmm1
pmovmskb %xmm1, %edi
shr %cl, %esi
@@ -227,23 +419,29 @@ L(ashr_0):
mov %ecx, %edi
jne L(less32bytes)
UPDATE_STRNCMP_COUNTER
- mov $0x10, %ebx
+ movl $0x10, FLAGS
mov $0x10, %ecx
pxor %xmm0, %xmm0
.p2align 4
L(loop_ashr_0):
movdqa (%eax, %ecx), %xmm1
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
movdqa (%edx, %ecx), %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
+#else
+ pcmpeqb %xmm1, %xmm0
+ pcmpeqb (%edx, %ecx), %xmm1
+#endif
psubb %xmm0, %xmm1
pmovmskb %xmm1, %esi
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -262,6 +460,7 @@ L(ashr_1):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $15, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -276,7 +475,7 @@ L(ashr_1):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $1, %ebx
+ orl $1, FLAGS
lea 1(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -292,6 +491,7 @@ L(gobble_ashr_1):
movdqa %xmm2, %xmm4
palignr $1, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -299,9 +499,9 @@ L(gobble_ashr_1):
pmovmskb %xmm1, %esi
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -316,6 +516,7 @@ L(gobble_ashr_1):
movdqa %xmm2, %xmm4
palignr $1, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -324,9 +525,9 @@ L(gobble_ashr_1):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -340,8 +541,8 @@ L(nibble_ashr_1):
test $0xfffe, %esi
jnz L(ashr_1_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $15, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $15, REM
jbe L(ashr_1_exittail)
#endif
pxor %xmm0, %xmm0
@@ -368,6 +569,7 @@ L(ashr_2):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $14, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -382,7 +584,7 @@ L(ashr_2):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $2, %ebx
+ orl $2, FLAGS
lea 2(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -398,6 +600,7 @@ L(gobble_ashr_2):
movdqa %xmm2, %xmm4
palignr $2, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -406,9 +609,9 @@ L(gobble_ashr_2):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -422,6 +625,7 @@ L(gobble_ashr_2):
movdqa %xmm2, %xmm4
palignr $2, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -430,9 +634,9 @@ L(gobble_ashr_2):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -446,8 +650,8 @@ L(nibble_ashr_2):
test $0xfffc, %esi
jnz L(ashr_2_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $14, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $14, REM
jbe L(ashr_2_exittail)
#endif
@@ -475,6 +679,7 @@ L(ashr_3):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $13, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -489,7 +694,7 @@ L(ashr_3):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $3, %ebx
+ orl $3, FLAGS
lea 3(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -505,6 +710,7 @@ L(gobble_ashr_3):
movdqa %xmm2, %xmm4
palignr $3, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -513,9 +719,9 @@ L(gobble_ashr_3):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -529,6 +735,7 @@ L(gobble_ashr_3):
movdqa %xmm2, %xmm4
palignr $3, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -537,9 +744,9 @@ L(gobble_ashr_3):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -553,8 +760,8 @@ L(nibble_ashr_3):
test $0xfff8, %esi
jnz L(ashr_3_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $13, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $13, REM
jbe L(ashr_3_exittail)
#endif
pxor %xmm0, %xmm0
@@ -581,6 +788,7 @@ L(ashr_4):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $12, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -595,7 +803,7 @@ L(ashr_4):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $4, %ebx
+ orl $4, FLAGS
lea 4(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -611,6 +819,7 @@ L(gobble_ashr_4):
movdqa %xmm2, %xmm4
palignr $4, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -619,9 +828,9 @@ L(gobble_ashr_4):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -636,6 +845,7 @@ L(gobble_ashr_4):
movdqa %xmm2, %xmm4
palignr $4, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -644,9 +854,9 @@ L(gobble_ashr_4):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -661,8 +871,8 @@ L(nibble_ashr_4):
test $0xfff0, %esi
jnz L(ashr_4_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $12, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $12, REM
jbe L(ashr_4_exittail)
#endif
@@ -690,6 +900,7 @@ L(ashr_5):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $11, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -704,7 +915,7 @@ L(ashr_5):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $5, %ebx
+ orl $5, FLAGS
lea 5(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -720,6 +931,7 @@ L(gobble_ashr_5):
movdqa %xmm2, %xmm4
palignr $5, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -728,9 +940,9 @@ L(gobble_ashr_5):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -744,6 +956,7 @@ L(gobble_ashr_5):
movdqa %xmm2, %xmm4
palignr $5, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -752,9 +965,9 @@ L(gobble_ashr_5):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -768,8 +981,8 @@ L(nibble_ashr_5):
test $0xffe0, %esi
jnz L(ashr_5_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $11, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $11, REM
jbe L(ashr_5_exittail)
#endif
pxor %xmm0, %xmm0
@@ -797,6 +1010,7 @@ L(ashr_6):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $10, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -811,7 +1025,7 @@ L(ashr_6):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $6, %ebx
+ orl $6, FLAGS
lea 6(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -827,6 +1041,7 @@ L(gobble_ashr_6):
movdqa %xmm2, %xmm4
palignr $6, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -835,9 +1050,9 @@ L(gobble_ashr_6):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -852,6 +1067,7 @@ L(gobble_ashr_6):
movdqa %xmm2, %xmm4
palignr $6, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -859,9 +1075,9 @@ L(gobble_ashr_6):
pmovmskb %xmm1, %esi
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -876,8 +1092,8 @@ L(nibble_ashr_6):
test $0xffc0, %esi
jnz L(ashr_6_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $10, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $10, REM
jbe L(ashr_6_exittail)
#endif
pxor %xmm0, %xmm0
@@ -905,6 +1121,7 @@ L(ashr_7):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $9, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -919,7 +1136,7 @@ L(ashr_7):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $7, %ebx
+ orl $7, FLAGS
lea 8(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -935,6 +1152,7 @@ L(gobble_ashr_7):
movdqa %xmm2, %xmm4
palignr $7, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -943,9 +1161,9 @@ L(gobble_ashr_7):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -960,6 +1178,7 @@ L(gobble_ashr_7):
movdqa %xmm2, %xmm4
palignr $7, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -968,9 +1187,9 @@ L(gobble_ashr_7):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -985,8 +1204,8 @@ L(nibble_ashr_7):
test $0xff80, %esi
jnz L(ashr_7_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $9, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $9, REM
jbe L(ashr_7_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1014,6 +1233,7 @@ L(ashr_8):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $8, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1028,7 +1248,7 @@ L(ashr_8):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $8, %ebx
+ orl $8, FLAGS
lea 8(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1044,6 +1264,7 @@ L(gobble_ashr_8):
movdqa %xmm2, %xmm4
palignr $8, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1052,9 +1273,9 @@ L(gobble_ashr_8):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1068,6 +1289,7 @@ L(gobble_ashr_8):
movdqa %xmm2, %xmm4
palignr $8, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1076,9 +1298,9 @@ L(gobble_ashr_8):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1092,8 +1314,8 @@ L(nibble_ashr_8):
test $0xff00, %esi
jnz L(ashr_8_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $8, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $8, REM
jbe L(ashr_8_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1121,6 +1343,7 @@ L(ashr_9):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $7, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1135,7 +1358,7 @@ L(ashr_9):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $9, %ebx
+ orl $9, FLAGS
lea 9(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1151,6 +1374,7 @@ L(gobble_ashr_9):
movdqa %xmm2, %xmm4
palignr $9, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1159,9 +1383,9 @@ L(gobble_ashr_9):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1175,6 +1399,7 @@ L(gobble_ashr_9):
movdqa %xmm2, %xmm4
palignr $9, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1183,9 +1408,9 @@ L(gobble_ashr_9):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1199,8 +1424,8 @@ L(nibble_ashr_9):
test $0xfe00, %esi
jnz L(ashr_9_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $7, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $7, REM
jbe L(ashr_9_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1227,6 +1452,7 @@ L(ashr_10):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $6, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1241,7 +1467,7 @@ L(ashr_10):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $10, %ebx
+ orl $10, FLAGS
lea 10(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1257,6 +1483,7 @@ L(gobble_ashr_10):
movdqa %xmm2, %xmm4
palignr $10, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1265,9 +1492,9 @@ L(gobble_ashr_10):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1281,6 +1508,7 @@ L(gobble_ashr_10):
movdqa %xmm2, %xmm4
palignr $10, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1289,9 +1517,9 @@ L(gobble_ashr_10):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1305,8 +1533,8 @@ L(nibble_ashr_10):
test $0xfc00, %esi
jnz L(ashr_10_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $6, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $6, REM
jbe L(ashr_10_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1333,6 +1561,7 @@ L(ashr_11):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $5, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1347,7 +1576,7 @@ L(ashr_11):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $11, %ebx
+ orl $11, FLAGS
lea 11(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1363,6 +1592,7 @@ L(gobble_ashr_11):
movdqa %xmm2, %xmm4
palignr $11, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1371,9 +1601,9 @@ L(gobble_ashr_11):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1387,6 +1617,7 @@ L(gobble_ashr_11):
movdqa %xmm2, %xmm4
palignr $11, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1395,9 +1626,9 @@ L(gobble_ashr_11):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1411,8 +1642,8 @@ L(nibble_ashr_11):
test $0xf800, %esi
jnz L(ashr_11_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $5, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $5, REM
jbe L(ashr_11_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1439,6 +1670,7 @@ L(ashr_12):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $4, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1453,7 +1685,7 @@ L(ashr_12):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $12, %ebx
+ orl $12, FLAGS
lea 12(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1469,6 +1701,7 @@ L(gobble_ashr_12):
movdqa %xmm2, %xmm4
palignr $12, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1477,9 +1710,9 @@ L(gobble_ashr_12):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
@@ -1494,6 +1727,7 @@ L(gobble_ashr_12):
movdqa %xmm2, %xmm4
palignr $12, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1502,9 +1736,9 @@ L(gobble_ashr_12):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1518,8 +1752,8 @@ L(nibble_ashr_12):
test $0xf000, %esi
jnz L(ashr_12_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $4, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $4, REM
jbe L(ashr_12_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1546,6 +1780,7 @@ L(ashr_13):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1560,7 +1795,7 @@ L(ashr_13):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $13, %ebx
+ orl $13, FLAGS
lea 13(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1576,6 +1811,7 @@ L(gobble_ashr_13):
movdqa %xmm2, %xmm4
palignr $13, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1584,9 +1820,9 @@ L(gobble_ashr_13):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1600,6 +1836,7 @@ L(gobble_ashr_13):
movdqa %xmm2, %xmm4
palignr $13, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1608,9 +1845,9 @@ L(gobble_ashr_13):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1624,8 +1861,8 @@ L(nibble_ashr_13):
test $0xe000, %esi
jnz L(ashr_13_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $3, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $3, REM
jbe L(ashr_13_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1652,6 +1889,7 @@ L(ashr_14):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $2, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1666,7 +1904,7 @@ L(ashr_14):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $14, %ebx
+ orl $14, FLAGS
lea 14(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1682,6 +1920,7 @@ L(gobble_ashr_14):
movdqa %xmm2, %xmm4
palignr $14, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1690,9 +1929,9 @@ L(gobble_ashr_14):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1706,6 +1945,7 @@ L(gobble_ashr_14):
movdqa %xmm2, %xmm4
palignr $14, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1714,9 +1954,9 @@ L(gobble_ashr_14):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1730,8 +1970,8 @@ L(nibble_ashr_14):
test $0xc000, %esi
jnz L(ashr_14_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $2, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $2, REM
jbe L(ashr_14_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1759,6 +1999,7 @@ L(ashr_15):
movdqa (%eax), %xmm1
pcmpeqb %xmm1, %xmm0
pslldq $1, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm2
psubb %xmm0, %xmm2
pmovmskb %xmm2, %edi
@@ -1773,7 +2014,7 @@ L(ashr_15):
movdqa (%edx), %xmm3
pxor %xmm0, %xmm0
mov $16, %ecx
- or $15, %ebx
+ orl $15, FLAGS
lea 15(%edx), %edi
and $0xfff, %edi
sub $0x1000, %edi
@@ -1789,6 +2030,7 @@ L(gobble_ashr_15):
movdqa %xmm2, %xmm4
palignr $15, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1797,9 +2039,9 @@ L(gobble_ashr_15):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1813,6 +2055,7 @@ L(gobble_ashr_15):
movdqa %xmm2, %xmm4
palignr $15, %xmm3, %xmm2
+ TOLOWER (%xmm1, %xmm2)
pcmpeqb %xmm1, %xmm0
pcmpeqb %xmm2, %xmm1
@@ -1821,9 +2064,9 @@ L(gobble_ashr_15):
sub $0xffff, %esi
jnz L(exit)
-#ifdef USE_AS_STRNCMP
- cmp $16, %ebp
- lea -16(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $16, REM
+ lea -16(REM), REM
jbe L(more8byteseq)
#endif
add $16, %ecx
@@ -1837,8 +2080,8 @@ L(nibble_ashr_15):
test $0x8000, %esi
jnz L(ashr_15_exittail)
-#ifdef USE_AS_STRNCMP
- cmp $1, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $1, REM
jbe L(ashr_15_exittail)
#endif
pxor %xmm0, %xmm0
@@ -1854,27 +2097,34 @@ L(ashr_15_exittail):
.p2align 4
L(aftertail):
+ TOLOWER (%xmm1, %xmm3)
pcmpeqb %xmm3, %xmm1
psubb %xmm0, %xmm1
pmovmskb %xmm1, %esi
not %esi
L(exit):
- mov %ebx, %edi
+ mov FLAGS, %edi
and $0x1f, %edi
lea -16(%edi, %ecx), %edi
L(less32bytes):
add %edi, %edx
add %ecx, %eax
- test $0x20, %ebx
+ testl $0x20, FLAGS
jz L(ret2)
xchg %eax, %edx
.p2align 4
L(ret2):
mov %esi, %ecx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ addl $4, %esp
+ cfi_adjust_cfa_offset (-4)
+#endif
POP (%esi)
POP (%edi)
- POP (%ebx)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ POP (FLAGS)
+#endif
L(less16bytes):
test %cl, %cl
jz L(2next_8_bytes)
@@ -1899,100 +2149,179 @@ L(less16bytes):
test $0x40, %cl
jnz L(Byte6)
-#ifdef USE_AS_STRNCMP
- cmp $7, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $7, REM
jbe L(eq)
#endif
movzx 7(%eax), %ecx
movzx 7(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
sub %ecx, %eax
RETURN
L(Byte0):
-#ifdef USE_AS_STRNCMP
- cmp $0, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $0, REM
jbe L(eq)
#endif
movzx (%eax), %ecx
movzx (%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
L(Byte1):
-#ifdef USE_AS_STRNCMP
- cmp $1, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $1, REM
jbe L(eq)
#endif
movzx 1(%eax), %ecx
movzx 1(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
L(Byte2):
-#ifdef USE_AS_STRNCMP
- cmp $2, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $2, REM
jbe L(eq)
#endif
movzx 2(%eax), %ecx
movzx 2(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
L(Byte3):
-#ifdef USE_AS_STRNCMP
- cmp $3, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $3, REM
jbe L(eq)
#endif
movzx 3(%eax), %ecx
movzx 3(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
L(Byte4):
-#ifdef USE_AS_STRNCMP
- cmp $4, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $4, REM
jbe L(eq)
#endif
movzx 4(%eax), %ecx
movzx 4(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
L(Byte5):
-#ifdef USE_AS_STRNCMP
- cmp $5, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $5, REM
jbe L(eq)
#endif
movzx 5(%eax), %ecx
movzx 5(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
L(Byte6):
-#ifdef USE_AS_STRNCMP
- cmp $6, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $6, REM
jbe L(eq)
#endif
movzx 6(%eax), %ecx
movzx 6(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
L(2next_8_bytes):
add $8, %eax
add $8, %edx
-#ifdef USE_AS_STRNCMP
- cmp $8, %ebp
- lea -8(%ebp), %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $8, REM
+ lea -8(REM), REM
jbe L(eq)
#endif
@@ -2017,196 +2346,455 @@ L(2next_8_bytes):
test $0x40, %ch
jnz L(Byte6)
-#ifdef USE_AS_STRNCMP
- cmp $7, %ebp
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp $7, REM
jbe L(eq)
#endif
movzx 7(%eax), %ecx
movzx 7(%edx), %eax
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%eax,4), %eax
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%eax,4), %eax
+# endif
+#endif
+
sub %ecx, %eax
RETURN
+#ifdef USE_AS_STRNCMP
+L(neq_sncmp):
+#endif
L(neq):
mov $1, %eax
ja L(neq_bigger)
neg %eax
L(neq_bigger):
-#ifdef USE_AS_STRNCMP
- POP (%ebp)
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ addl $4, %esp
+ cfi_adjust_cfa_offset (-4)
+#endif
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ POP (REM)
+#endif
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ POP (%ebx)
+# endif
#endif
ret
-#ifdef USE_AS_STRNCMP
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
.p2align 4
cfi_restore_state
L(more8byteseq):
+
+# ifdef USE_AS_STRNCASECMP_L
+ addl $4, %esp
+ cfi_adjust_cfa_offset (-4)
+# endif
POP (%esi)
POP (%edi)
- POP (%ebx)
+# ifdef USE_AS_STRNCMP
+ POP (FLAGS)
+# endif
#endif
+#ifdef USE_AS_STRNCMP
+L(eq_sncmp):
+#endif
L(eq):
-#ifdef USE_AS_STRNCMP
- POP (%ebp)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ POP (REM)
+#endif
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef PIC
+ POP (%ebx)
+# endif
#endif
xorl %eax, %eax
ret
-#ifdef USE_AS_STRNCMP
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
.p2align 4
- CFI_PUSH (%ebp)
+# if defined USE_AS_STRNCASECMP_L && defined PIC
+ CFI_PUSH (%ebx)
+# endif
+ CFI_PUSH (REM)
L(less16bytes_sncmp):
- test %ebp, %ebp
- jz L(eq)
+# ifdef USE_AS_STRNCASECMP_L
+ PUSH (%esi)
+# endif
+ test REM, REM
+ jz L(eq_sncmp)
movzbl (%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl (%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, (%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
je L(eq)
- cmp $1, %ebp
- je L(eq)
+ cmp $1, REM
+ je L(eq_sncmp)
movzbl 1(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 1(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 1(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $2, %ebp
- je L(eq)
+ cmp $2, REM
+ je L(eq_sncmp)
movzbl 2(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 2(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 2(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $3, %ebp
- je L(eq)
+ cmp $3, REM
+ je L(eq_sncmp)
movzbl 3(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 3(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 3(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $4, %ebp
- je L(eq)
+ cmp $4, REM
+ je L(eq_sncmp)
movzbl 4(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 4(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 4(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $5, %ebp
- je L(eq)
+ cmp $5, REM
+ je L(eq_sncmp)
movzbl 5(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 5(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 5(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $6, %ebp
- je L(eq)
+ cmp $6, REM
+ je L(eq_sncmp)
movzbl 6(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 6(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 6(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $7, %ebp
- je L(eq)
+ cmp $7, REM
+ je L(eq_sncmp)
movzbl 7(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 7(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 7(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $8, %ebp
- je L(eq)
+ cmp $8, REM
+ je L(eq_sncmp)
movzbl 8(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 8(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 8(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $9, %ebp
- je L(eq)
+ cmp $9, REM
+ je L(eq_sncmp)
movzbl 9(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 9(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 9(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $10, %ebp
- je L(eq)
+ cmp $10, REM
+ je L(eq_sncmp)
movzbl 10(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 10(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 10(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $11, %ebp
- je L(eq)
+ cmp $11, REM
+ je L(eq_sncmp)
movzbl 11(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 11(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 11(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $12, %ebp
- je L(eq)
+ cmp $12, REM
+ je L(eq_sncmp)
movzbl 12(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 12(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 12(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $13, %ebp
- je L(eq)
+ cmp $13, REM
+ je L(eq_sncmp)
movzbl 13(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 13(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 13(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $14, %ebp
- je L(eq)
+ cmp $14, REM
+ je L(eq_sncmp)
movzbl 14(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 14(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 14(%edx)
- jne L(neq)
+# endif
+ jne L(neq_sncmp)
test %cl, %cl
- je L(eq)
+ je L(eq_sncmp)
- cmp $15, %ebp
- je L(eq)
+ cmp $15, REM
+ je L(eq_sncmp)
movzbl 15(%eax), %ecx
+# ifdef USE_AS_STRNCASECMP_L
+ movzbl 15(%edx), %esi
+# ifdef PIC
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower@GOTOFF+128*4(%ebx,%esi,4), %esi
+# else
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%ecx,4), %ecx
+ movl _nl_C_LC_CTYPE_tolower+128*4(,%esi,4), %esi
+# endif
+ cmpl %ecx, %esi
+# else
cmpb %cl, 15(%edx)
- jne L(neq)
- test %cl, %cl
- je L(eq)
+# endif
+ jne L(neq_sncmp)
- POP (%ebp)
+# ifdef USE_AS_STRNCASECMP_L
+L(eq_sncmp):
+ POP (%esi)
+# endif
+ POP (REM)
+# if defined USE_AS_STRNCASECMP_L && defined PIC
+ POP (%ebx)
+# endif
xor %eax, %eax
ret
+
+# ifdef USE_AS_STRNCASECMP_L
+ .p2align 4
+# ifdef PIC
+ CFI_PUSH (%ebx)
+# endif
+ CFI_PUSH (REM)
+ CFI_PUSH (%esi)
+L(neq_sncmp):
+ mov $1, %eax
+ mov $-1, %edx
+ cmovna %edx, %eax
+ POP (%esi)
+ POP (REM)
+# ifdef PIC
+ POP (%ebx)
+# endif
+ ret
+# endif
#endif
END (STRCMP)
diff --git a/sysdeps/i386/i686/multiarch/strcmp.S b/sysdeps/i386/i686/multiarch/strcmp.S
index 7136d47e85..28e2d6154c 100644
--- a/sysdeps/i386/i686/multiarch/strcmp.S
+++ b/sysdeps/i386/i686/multiarch/strcmp.S
@@ -1,5 +1,5 @@
/* Multiple versions of strcmp
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -21,18 +21,30 @@
#include <sysdep.h>
#include <init-arch.h>
-#ifndef USE_AS_STRNCMP
-# define STRCMP strcmp
-# define __GI_STRCMP __GI_strcmp
-# define __STRCMP_IA32 __strcmp_ia32
-# define __STRCMP_SSSE3 __strcmp_ssse3
-# define __STRCMP_SSE4_2 __strcmp_sse4_2
-#else
+#ifdef USE_AS_STRNCMP
# define STRCMP strncmp
# define __GI_STRCMP __GI_strncmp
# define __STRCMP_IA32 __strncmp_ia32
# define __STRCMP_SSSE3 __strncmp_ssse3
# define __STRCMP_SSE4_2 __strncmp_sse4_2
+#elif defined USE_AS_STRCASECMP_L
+# define STRCMP __strcasecmp_l
+# define __GI_STRCMP __GI_strcasecmp_l
+# define __STRCMP_IA32 __strcasecmp_l_ia32
+# define __STRCMP_SSSE3 __strcasecmp_l_ssse3
+# define __STRCMP_SSE4_2 __strcasecmp_l_sse4_2
+#elif defined USE_AS_STRNCASECMP_L
+# define STRCMP __strncasecmp_l
+# define __GI_STRCMP __GI_strncasecmp_l
+# define __STRCMP_IA32 __strncasecmp_l_ia32
+# define __STRCMP_SSSE3 __strncasecmp_l_ssse3
+# define __STRCMP_SSE4_2 __strncasecmp_l_sse4_2
+#else
+# define STRCMP strcmp
+# define __GI_STRCMP __GI_strcmp
+# define __STRCMP_IA32 __strcmp_ia32
+# define __STRCMP_SSSE3 __strcmp_ssse3
+# define __STRCMP_SSE4_2 __strcmp_sse4_2
#endif
/* Define multiple versions only for the definition in libc. Don't
diff --git a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
index 073856ff84..470ddbe279 100644
--- a/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
+++ b/sysdeps/i386/i686/multiarch/strcpy-ssse3.S
@@ -20,6 +20,7 @@
#ifndef NOT_IN_libc
+
# ifndef USE_AS_STRCAT
# include <sysdep.h>
@@ -31,8 +32,8 @@
cfi_adjust_cfa_offset (-4); \
cfi_restore (REG)
-# define PUSH(REG) pushl REG; CFI_PUSH (REG)
-# define POP(REG) popl REG; CFI_POP (REG)
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
# ifndef STRCPY
# define STRCPY __strcpy_ssse3
@@ -40,14 +41,22 @@
# ifdef USE_AS_STRNCPY
# define PARMS 8
-# define ENTRANCE PUSH(%ebx)
-# define RETURN POP(%ebx); ret; CFI_PUSH(%ebx);
-# define RETURN1 POP(%edi); POP(%ebx); ret; CFI_PUSH(%ebx); CFI_PUSH(%edi)
+# define ENTRANCE PUSH (%ebx)
+# define RETURN POP (%ebx); ret; CFI_PUSH (%ebx);
+# define RETURN1 POP (%edi); POP (%ebx); ret; CFI_PUSH (%ebx); CFI_PUSH (%edi)
# else
# define PARMS 4
# define ENTRANCE
# define RETURN ret
-# define RETURN1 POP(%edi); ret; CFI_PUSH(%edi)
+# define RETURN1 POP (%edi); ret; CFI_PUSH (%edi)
+# endif
+
+# ifdef USE_AS_STPCPY
+# define SAVE_RESULT(n) lea n(%edx), %eax
+# define SAVE_RESULT_TAIL(n) lea n(%edx), %eax
+# else
+# define SAVE_RESULT(n) movl %edi, %eax
+# define SAVE_RESULT_TAIL(n) movl %edx, %eax
# endif
# define STR1 PARMS
@@ -60,9 +69,7 @@
movl - 4 byte
movlpd - 8 byte
movaps - 16 byte - requires 16 byte alignment
- of sourse and destination adresses.
- 16 byte alignment: adress is 32bit value,
- right four bit of adress shall be 0.
+ of sourse and destination adresses.
*/
.text
@@ -72,8 +79,6 @@ ENTRY (STRCPY)
mov STR2(%esp), %ecx
# ifdef USE_AS_STRNCPY
movl LEN(%esp), %ebx
- test %ebx, %ebx
- jz L(ExitTail0)
cmp $8, %ebx
jbe L(StrncpyExit8Bytes)
# endif
@@ -127,39 +132,23 @@ ENTRY (STRCPY)
sub $16, %ebx
and $0xf, %esi
-/* add 16 bytes ecx_shift to ebx */
+/* add 16 bytes ecx_offset to ebx */
add %esi, %ebx
# endif
lea 16(%ecx), %esi
-/* Now:
- esi = alignment_16(ecx) + ecx_shift + 16;
- ecx_shift = ecx - alignment_16(ecx)
-*/
and $-16, %esi
-/* Now:
- esi = alignment_16(ecx) + 16
-*/
pxor %xmm0, %xmm0
movlpd (%ecx), %xmm1
movlpd %xmm1, (%edx)
-/*
- look if there is zero symbol in next 16 bytes of string
- from esi to esi + 15 and form mask in xmm0
-*/
+
pcmpeqb (%esi), %xmm0
movlpd 8(%ecx), %xmm1
movlpd %xmm1, 8(%edx)
-/* convert byte mask in xmm0 to bit mask */
-
pmovmskb %xmm0, %eax
sub %ecx, %esi
-/* esi = 16 - ecx_shift */
-
-/* eax = 0: there isn't end of string from position esi to esi+15 */
-
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(CopyFrom1To16BytesCase2OrCase3)
@@ -169,17 +158,9 @@ ENTRY (STRCPY)
mov %edx, %eax
lea 16(%edx), %edx
-/* Now:
- edx = edx + 16 = alignment_16(edx) + edx_shift + 16
-*/
and $-16, %edx
-
-/* Now: edx = alignment_16(edx) + 16 */
-
sub %edx, %eax
-/* Now: eax = edx_shift - 16 */
-
# ifdef USE_AS_STRNCPY
add %eax, %esi
lea -1(%esi), %esi
@@ -191,22 +172,11 @@ ENTRY (STRCPY)
L(ContinueCopy):
# endif
sub %eax, %ecx
-/* Now:
- case ecx_shift >= edx_shift:
- ecx = alignment_16(ecx) + (ecx_shift - edx_shift) + 16
- case ecx_shift < edx_shift:
- ecx = alignment_16(ecx) + (16 + ecx_shift - edx_shift)
-*/
mov %ecx, %eax
and $0xf, %eax
-/* Now:
- case ecx_shift >= edx_shift: eax = ecx_shift - edx_shift
- case ecx_shift < edx_shift: eax = (16 + ecx_shift - edx_shift)
- eax can be 0, 1, ..., 15
-*/
mov $0, %esi
-/* case: ecx_shift == edx_shift */
+/* case: ecx_offset == edx_offset */
jz L(Align16Both)
@@ -323,7 +293,7 @@ L(Align16Both):
sub %ecx, %eax
sub %eax, %edx
# ifdef USE_AS_STRNCPY
- lea 48+64(%ebx, %eax), %ebx
+ lea 112(%ebx, %eax), %ebx
# endif
mov $-0x40, %esi
@@ -441,7 +411,6 @@ L(Shl1Start):
jnz L(Shl1LoopExit)
palignr $1, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 31(%ecx), %xmm2
@@ -449,7 +418,6 @@ L(Shl1Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit1Case2OrCase3)
@@ -457,8 +425,7 @@ L(Shl1Start):
test %eax, %eax
jnz L(Shl1LoopExit)
- palignr $1, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $1, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 31(%ecx), %ecx
lea 16(%edx), %edx
@@ -506,11 +473,11 @@ L(Shl1LoopStart):
jmp L(Shl1LoopStart)
L(Shl1LoopExit):
- movaps (%edx), %xmm6
- psrldq $15, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ movlpd 7(%ecx), %xmm0
+ movlpd %xmm0, 7(%edx)
mov $15, %esi
- palignr $1, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -563,7 +530,6 @@ L(Shl2Start):
jnz L(Shl2LoopExit)
palignr $2, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 30(%ecx), %xmm2
@@ -571,7 +537,6 @@ L(Shl2Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit2Case2OrCase3)
@@ -579,8 +544,7 @@ L(Shl2Start):
test %eax, %eax
jnz L(Shl2LoopExit)
- palignr $2, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $2, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 30(%ecx), %ecx
lea 16(%edx), %edx
@@ -628,11 +592,11 @@ L(Shl2LoopStart):
jmp L(Shl2LoopStart)
L(Shl2LoopExit):
- movaps (%edx), %xmm6
- psrldq $14, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd 6(%ecx), %xmm1
+ movlpd %xmm0, (%edx)
+ movlpd %xmm1, 6(%edx)
mov $14, %esi
- palignr $2, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -685,7 +649,6 @@ L(Shl3Start):
jnz L(Shl3LoopExit)
palignr $3, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 29(%ecx), %xmm2
@@ -693,7 +656,6 @@ L(Shl3Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit3Case2OrCase3)
@@ -701,8 +663,7 @@ L(Shl3Start):
test %eax, %eax
jnz L(Shl3LoopExit)
- palignr $3, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $3, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 29(%ecx), %ecx
lea 16(%edx), %edx
@@ -750,11 +711,11 @@ L(Shl3LoopStart):
jmp L(Shl3LoopStart)
L(Shl3LoopExit):
- movaps (%edx), %xmm6
- psrldq $13, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd 5(%ecx), %xmm1
+ movlpd %xmm0, (%edx)
+ movlpd %xmm1, 5(%edx)
mov $13, %esi
- palignr $3, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -807,7 +768,6 @@ L(Shl4Start):
jnz L(Shl4LoopExit)
palignr $4, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 28(%ecx), %xmm2
@@ -815,7 +775,6 @@ L(Shl4Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit4Case2OrCase3)
@@ -823,8 +782,7 @@ L(Shl4Start):
test %eax, %eax
jnz L(Shl4LoopExit)
- palignr $4, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $4, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 28(%ecx), %ecx
lea 16(%edx), %edx
@@ -872,11 +830,11 @@ L(Shl4LoopStart):
jmp L(Shl4LoopStart)
L(Shl4LoopExit):
- movaps (%edx), %xmm6
- psrldq $12, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 8(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 8(%edx)
mov $12, %esi
- palignr $4, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -929,7 +887,6 @@ L(Shl5Start):
jnz L(Shl5LoopExit)
palignr $5, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 27(%ecx), %xmm2
@@ -937,7 +894,6 @@ L(Shl5Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit5Case2OrCase3)
@@ -945,8 +901,7 @@ L(Shl5Start):
test %eax, %eax
jnz L(Shl5LoopExit)
- palignr $5, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $5, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 27(%ecx), %ecx
lea 16(%edx), %edx
@@ -994,11 +949,11 @@ L(Shl5LoopStart):
jmp L(Shl5LoopStart)
L(Shl5LoopExit):
- movaps (%edx), %xmm6
- psrldq $11, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 7(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 7(%edx)
mov $11, %esi
- palignr $5, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1051,7 +1006,6 @@ L(Shl6Start):
jnz L(Shl6LoopExit)
palignr $6, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 26(%ecx), %xmm2
@@ -1059,7 +1013,6 @@ L(Shl6Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit6Case2OrCase3)
@@ -1067,8 +1020,7 @@ L(Shl6Start):
test %eax, %eax
jnz L(Shl6LoopExit)
- palignr $6, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $6, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 26(%ecx), %ecx
lea 16(%edx), %edx
@@ -1116,11 +1068,11 @@ L(Shl6LoopStart):
jmp L(Shl6LoopStart)
L(Shl6LoopExit):
- movaps (%edx), %xmm6
- psrldq $10, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 6(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 6(%edx)
mov $10, %esi
- palignr $6, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1173,7 +1125,6 @@ L(Shl7Start):
jnz L(Shl7LoopExit)
palignr $7, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 25(%ecx), %xmm2
@@ -1181,7 +1132,6 @@ L(Shl7Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit7Case2OrCase3)
@@ -1189,8 +1139,7 @@ L(Shl7Start):
test %eax, %eax
jnz L(Shl7LoopExit)
- palignr $7, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $7, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 25(%ecx), %ecx
lea 16(%edx), %edx
@@ -1238,11 +1187,11 @@ L(Shl7LoopStart):
jmp L(Shl7LoopStart)
L(Shl7LoopExit):
- movaps (%edx), %xmm6
- psrldq $9, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 5(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 5(%edx)
mov $9, %esi
- palignr $7, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1295,7 +1244,6 @@ L(Shl8Start):
jnz L(Shl8LoopExit)
palignr $8, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 24(%ecx), %xmm2
@@ -1303,7 +1251,6 @@ L(Shl8Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit8Case2OrCase3)
@@ -1311,8 +1258,7 @@ L(Shl8Start):
test %eax, %eax
jnz L(Shl8LoopExit)
- palignr $8, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $8, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 24(%ecx), %ecx
lea 16(%edx), %edx
@@ -1360,11 +1306,9 @@ L(Shl8LoopStart):
jmp L(Shl8LoopStart)
L(Shl8LoopExit):
- movaps (%edx), %xmm6
- psrldq $8, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
mov $8, %esi
- palignr $8, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1417,7 +1361,6 @@ L(Shl9Start):
jnz L(Shl9LoopExit)
palignr $9, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 23(%ecx), %xmm2
@@ -1425,7 +1368,6 @@ L(Shl9Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit9Case2OrCase3)
@@ -1433,8 +1375,7 @@ L(Shl9Start):
test %eax, %eax
jnz L(Shl9LoopExit)
- palignr $9, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $9, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 23(%ecx), %ecx
lea 16(%edx), %edx
@@ -1482,11 +1423,9 @@ L(Shl9LoopStart):
jmp L(Shl9LoopStart)
L(Shl9LoopExit):
- movaps (%edx), %xmm6
- psrldq $7, %xmm6
+ movlpd -1(%ecx), %xmm0
+ movlpd %xmm0, -1(%edx)
mov $7, %esi
- palignr $9, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1539,7 +1478,6 @@ L(Shl10Start):
jnz L(Shl10LoopExit)
palignr $10, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 22(%ecx), %xmm2
@@ -1547,7 +1485,6 @@ L(Shl10Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit10Case2OrCase3)
@@ -1555,8 +1492,7 @@ L(Shl10Start):
test %eax, %eax
jnz L(Shl10LoopExit)
- palignr $10, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $10, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 22(%ecx), %ecx
lea 16(%edx), %edx
@@ -1604,11 +1540,9 @@ L(Shl10LoopStart):
jmp L(Shl10LoopStart)
L(Shl10LoopExit):
- movaps (%edx), %xmm6
- psrldq $6, %xmm6
+ movlpd -2(%ecx), %xmm0
+ movlpd %xmm0, -2(%edx)
mov $6, %esi
- palignr $10, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1661,7 +1595,6 @@ L(Shl11Start):
jnz L(Shl11LoopExit)
palignr $11, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 21(%ecx), %xmm2
@@ -1669,7 +1602,6 @@ L(Shl11Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit11Case2OrCase3)
@@ -1677,8 +1609,7 @@ L(Shl11Start):
test %eax, %eax
jnz L(Shl11LoopExit)
- palignr $11, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $11, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 21(%ecx), %ecx
lea 16(%edx), %edx
@@ -1726,11 +1657,9 @@ L(Shl11LoopStart):
jmp L(Shl11LoopStart)
L(Shl11LoopExit):
- movaps (%edx), %xmm6
- psrldq $5, %xmm6
+ movlpd -3(%ecx), %xmm0
+ movlpd %xmm0, -3(%edx)
mov $5, %esi
- palignr $11, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1783,7 +1712,6 @@ L(Shl12Start):
jnz L(Shl12LoopExit)
palignr $12, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 20(%ecx), %xmm2
@@ -1791,7 +1719,6 @@ L(Shl12Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit12Case2OrCase3)
@@ -1799,8 +1726,7 @@ L(Shl12Start):
test %eax, %eax
jnz L(Shl12LoopExit)
- palignr $12, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $12, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 20(%ecx), %ecx
lea 16(%edx), %edx
@@ -1848,11 +1774,9 @@ L(Shl12LoopStart):
jmp L(Shl12LoopStart)
L(Shl12LoopExit):
- movaps (%edx), %xmm6
- psrldq $4, %xmm6
+ movl (%ecx), %esi
+ movl %esi, (%edx)
mov $4, %esi
- palignr $12, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1905,7 +1829,6 @@ L(Shl13Start):
jnz L(Shl13LoopExit)
palignr $13, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 19(%ecx), %xmm2
@@ -1913,7 +1836,6 @@ L(Shl13Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit13Case2OrCase3)
@@ -1921,8 +1843,7 @@ L(Shl13Start):
test %eax, %eax
jnz L(Shl13LoopExit)
- palignr $13, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $13, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 19(%ecx), %ecx
lea 16(%edx), %edx
@@ -1970,11 +1891,9 @@ L(Shl13LoopStart):
jmp L(Shl13LoopStart)
L(Shl13LoopExit):
- movaps (%edx), %xmm6
- psrldq $3, %xmm6
+ movl -1(%ecx), %esi
+ movl %esi, -1(%edx)
mov $3, %esi
- palignr $13, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -2027,7 +1946,6 @@ L(Shl14Start):
jnz L(Shl14LoopExit)
palignr $14, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 18(%ecx), %xmm2
@@ -2035,7 +1953,6 @@ L(Shl14Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit14Case2OrCase3)
@@ -2043,8 +1960,7 @@ L(Shl14Start):
test %eax, %eax
jnz L(Shl14LoopExit)
- palignr $14, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $14, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 18(%ecx), %ecx
lea 16(%edx), %edx
@@ -2092,11 +2008,9 @@ L(Shl14LoopStart):
jmp L(Shl14LoopStart)
L(Shl14LoopExit):
- movaps (%edx), %xmm6
- psrldq $2, %xmm6
+ movl -2(%ecx), %esi
+ movl %esi, -2(%edx)
mov $2, %esi
- palignr $14, %xmm1, %xmm6
- movaps %xmm6, (%edx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -2149,7 +2063,6 @@ L(Shl15Start):
jnz L(Shl15LoopExit)
palignr $15, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 17(%ecx), %xmm2
@@ -2157,7 +2070,6 @@ L(Shl15Start):
lea 16(%edx), %edx
pmovmskb %xmm0, %eax
lea 16(%ecx), %ecx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %ebx
jbe L(StrncpyExit15Case2OrCase3)
@@ -2165,8 +2077,7 @@ L(Shl15Start):
test %eax, %eax
jnz L(Shl15LoopExit)
- palignr $15, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $15, %xmm3, %xmm2
movaps %xmm2, (%edx)
lea 17(%ecx), %ecx
lea 16(%edx), %edx
@@ -2214,15 +2125,14 @@ L(Shl15LoopStart):
jmp L(Shl15LoopStart)
L(Shl15LoopExit):
- movaps (%edx), %xmm6
- psrldq $1, %xmm6
+ movl -3(%ecx), %esi
+ movl %esi, -3(%edx)
mov $1, %esi
- palignr $15, %xmm1, %xmm6
- movaps %xmm6, (%edx)
# ifdef USE_AS_STRCAT
jmp L(CopyFrom1To16Bytes)
# endif
+
# ifndef USE_AS_STRCAT
.p2align 4
@@ -2235,15 +2145,38 @@ L(CopyFrom1To16Bytes):
POP (%esi)
test %al, %al
- jz L(ExitHigh)
+ jz L(ExitHigh8)
+
+L(CopyFrom1To16BytesLess8):
+ mov %al, %ah
+ and $15, %ah
+ jz L(ExitHigh4)
+
test $0x01, %al
jnz L(Exit1)
test $0x02, %al
jnz L(Exit2)
test $0x04, %al
jnz L(Exit3)
- test $0x08, %al
- jnz L(Exit4)
+
+ .p2align 4
+L(Exit4):
+ movl (%ecx), %eax
+ movl %eax, (%edx)
+ SAVE_RESULT (3)
+# ifdef USE_AS_STRNCPY
+ sub $4, %ebx
+ lea 4(%edx), %ecx
+ jnz L(StrncpyFillTailWithZero1)
+# ifdef USE_AS_STPCPY
+ cmpb $1, (%eax)
+ sbb $-1, %eax
+# endif
+# endif
+ RETURN1
+
+ .p2align 4
+L(ExitHigh4):
test $0x10, %al
jnz L(Exit5)
test $0x20, %al
@@ -2255,11 +2188,7 @@ L(CopyFrom1To16Bytes):
L(Exit8):
movlpd (%ecx), %xmm0
movlpd %xmm0, (%edx)
-# ifdef USE_AS_STPCPY
- lea 7(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (7)
# ifdef USE_AS_STRNCPY
sub $8, %ebx
lea 8(%edx), %ecx
@@ -2272,15 +2201,38 @@ L(Exit8):
RETURN1
.p2align 4
-L(ExitHigh):
+L(ExitHigh8):
+ mov %ah, %al
+ and $15, %al
+ jz L(ExitHigh12)
+
test $0x01, %ah
jnz L(Exit9)
test $0x02, %ah
jnz L(Exit10)
test $0x04, %ah
jnz L(Exit11)
- test $0x08, %ah
- jnz L(Exit12)
+
+ .p2align 4
+L(Exit12):
+ movlpd (%ecx), %xmm0
+ movl 8(%ecx), %eax
+ movlpd %xmm0, (%edx)
+ movl %eax, 8(%edx)
+ SAVE_RESULT (11)
+# ifdef USE_AS_STRNCPY
+ sub $12, %ebx
+ lea 12(%edx), %ecx
+ jnz L(StrncpyFillTailWithZero1)
+# ifdef USE_AS_STPCPY
+ cmpb $1, (%eax)
+ sbb $-1, %eax
+# endif
+# endif
+ RETURN1
+
+ .p2align 4
+L(ExitHigh12):
test $0x10, %ah
jnz L(Exit13)
test $0x20, %ah
@@ -2290,15 +2242,9 @@ L(ExitHigh):
.p2align 4
L(Exit16):
- movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
- movlpd 8(%ecx), %xmm0
- movlpd %xmm0, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 15(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ movdqu (%ecx), %xmm0
+ movdqu %xmm0, (%edx)
+ SAVE_RESULT (15)
# ifdef USE_AS_STRNCPY
sub $16, %ebx
lea 16(%edx), %ecx
@@ -2310,7 +2256,7 @@ L(Exit16):
# endif
RETURN1
-# ifdef USE_AS_STRNCPY
+# ifdef USE_AS_STRNCPY
CFI_PUSH(%esi)
@@ -2318,79 +2264,84 @@ L(Exit16):
L(CopyFrom1To16BytesCase2):
add $16, %ebx
add %esi, %ecx
- lea (%esi, %edx), %esi
- lea -9(%ebx), %edx
- and $1<<7, %dh
- or %al, %dh
- test %dh, %dh
- lea (%esi), %edx
+ add %esi, %edx
+
POP (%esi)
+
+ test %al, %al
jz L(ExitHighCase2)
- cmp $1, %ebx
- je L(Exit1)
+ cmp $8, %ebx
+ ja L(CopyFrom1To16BytesLess8)
+
test $0x01, %al
jnz L(Exit1)
- cmp $2, %ebx
- je L(Exit2)
+ cmp $1, %ebx
+ je L(Exit1)
test $0x02, %al
jnz L(Exit2)
- cmp $3, %ebx
- je L(Exit3)
+ cmp $2, %ebx
+ je L(Exit2)
test $0x04, %al
jnz L(Exit3)
- cmp $4, %ebx
- je L(Exit4)
+ cmp $3, %ebx
+ je L(Exit3)
test $0x08, %al
jnz L(Exit4)
- cmp $5, %ebx
- je L(Exit5)
+ cmp $4, %ebx
+ je L(Exit4)
test $0x10, %al
jnz L(Exit5)
- cmp $6, %ebx
- je L(Exit6)
+ cmp $5, %ebx
+ je L(Exit5)
test $0x20, %al
jnz L(Exit6)
- cmp $7, %ebx
- je L(Exit7)
+ cmp $6, %ebx
+ je L(Exit6)
test $0x40, %al
jnz L(Exit7)
+ cmp $7, %ebx
+ je L(Exit7)
jmp L(Exit8)
.p2align 4
L(ExitHighCase2):
- cmp $9, %ebx
- je L(Exit9)
+ cmp $8, %ebx
+ jbe L(CopyFrom1To16BytesLess8Case3)
+
test $0x01, %ah
jnz L(Exit9)
- cmp $10, %ebx
- je L(Exit10)
+ cmp $9, %ebx
+ je L(Exit9)
test $0x02, %ah
jnz L(Exit10)
- cmp $11, %ebx
- je L(Exit11)
+ cmp $10, %ebx
+ je L(Exit10)
test $0x04, %ah
jnz L(Exit11)
- cmp $12, %ebx
- je L(Exit12)
+ cmp $11, %ebx
+ je L(Exit11)
test $0x8, %ah
jnz L(Exit12)
- cmp $13, %ebx
- je L(Exit13)
+ cmp $12, %ebx
+ je L(Exit12)
test $0x10, %ah
jnz L(Exit13)
- cmp $14, %ebx
- je L(Exit14)
+ cmp $13, %ebx
+ je L(Exit13)
test $0x20, %ah
jnz L(Exit14)
- cmp $15, %ebx
- je L(Exit15)
+ cmp $14, %ebx
+ je L(Exit14)
test $0x40, %ah
jnz L(Exit15)
+ cmp $15, %ebx
+ je L(Exit15)
jmp L(Exit16)
CFI_PUSH(%esi)
+ .p2align 4
L(CopyFrom1To16BytesCase2OrCase3):
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
@@ -2402,47 +2353,78 @@ L(CopyFrom1To16BytesCase3):
add %esi, %ecx
POP (%esi)
- cmp $16, %ebx
- je L(Exit16)
+
cmp $8, %ebx
- je L(Exit8)
- jg L(More8Case3)
+ ja L(ExitHigh8Case3)
+
+L(CopyFrom1To16BytesLess8Case3):
cmp $4, %ebx
- je L(Exit4)
- jg L(More4Case3)
+ ja L(ExitHigh4Case3)
+
+ cmp $1, %ebx
+ je L(Exit1)
cmp $2, %ebx
- jl L(Exit1)
je L(Exit2)
- jg L(Exit3)
-L(More8Case3): /* but less than 16 */
- cmp $12, %ebx
- je L(Exit12)
- jl L(Less12Case3)
- cmp $14, %ebx
- jl L(Exit13)
- je L(Exit14)
- jg L(Exit15)
-L(More4Case3): /* but less than 8 */
+ cmp $3, %ebx
+ je L(Exit3)
+ movl (%ecx), %eax
+ movl %eax, (%edx)
+ SAVE_RESULT (4)
+ RETURN1
+
+ .p2align 4
+L(ExitHigh4Case3):
+ cmp $5, %ebx
+ je L(Exit5)
cmp $6, %ebx
- jl L(Exit5)
je L(Exit6)
- jg L(Exit7)
-L(Less12Case3): /* but more than 8 */
+ cmp $7, %ebx
+ je L(Exit7)
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ SAVE_RESULT (8)
+ RETURN1
+
+ .p2align 4
+L(ExitHigh8Case3):
+ cmp $12, %ebx
+ ja L(ExitHigh12Case3)
+
+ cmp $9, %ebx
+ je L(Exit9)
cmp $10, %ebx
- jl L(Exit9)
je L(Exit10)
- jg L(Exit11)
+ cmp $11, %ebx
+ je L(Exit11)
+ movlpd (%ecx), %xmm0
+ movl 8(%ecx), %eax
+ movlpd %xmm0, (%edx)
+ movl %eax, 8(%edx)
+ SAVE_RESULT (12)
+ RETURN1
+
+ .p2align 4
+L(ExitHigh12Case3):
+ cmp $13, %ebx
+ je L(Exit13)
+ cmp $14, %ebx
+ je L(Exit14)
+ cmp $15, %ebx
+ je L(Exit15)
+ movlpd (%ecx), %xmm0
+ movlpd 8(%ecx), %xmm1
+ movlpd %xmm0, (%edx)
+ movlpd %xmm1, 8(%edx)
+ SAVE_RESULT (16)
+ RETURN1
+
# endif
.p2align 4
L(Exit1):
movb (%ecx), %al
movb %al, (%edx)
-# ifdef USE_AS_STPCPY
- lea (%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (0)
# ifdef USE_AS_STRNCPY
sub $1, %ebx
lea 1(%edx), %ecx
@@ -2458,11 +2440,7 @@ L(Exit1):
L(Exit2):
movw (%ecx), %ax
movw %ax, (%edx)
-# ifdef USE_AS_STPCPY
- lea 1(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (1)
# ifdef USE_AS_STRNCPY
sub $2, %ebx
lea 2(%edx), %ecx
@@ -2480,11 +2458,7 @@ L(Exit3):
movw %ax, (%edx)
movb 2(%ecx), %al
movb %al, 2(%edx)
-# ifdef USE_AS_STPCPY
- lea 2(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (2)
# ifdef USE_AS_STRNCPY
sub $3, %ebx
lea 3(%edx), %ecx
@@ -2497,36 +2471,12 @@ L(Exit3):
RETURN1
.p2align 4
-L(Exit4):
- movl (%ecx), %eax
- movl %eax, (%edx)
-# ifdef USE_AS_STPCPY
- lea 3(%edx), %eax
-# else
- movl %edi, %eax
-# endif
-# ifdef USE_AS_STRNCPY
- sub $4, %ebx
- lea 4(%edx), %ecx
- jnz L(StrncpyFillTailWithZero1)
-# ifdef USE_AS_STPCPY
- cmpb $1, (%eax)
- sbb $-1, %eax
-# endif
-# endif
- RETURN1
-
- .p2align 4
L(Exit5):
movl (%ecx), %eax
movl %eax, (%edx)
movb 4(%ecx), %al
movb %al, 4(%edx)
-# ifdef USE_AS_STPCPY
- lea 4(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (4)
# ifdef USE_AS_STRNCPY
sub $5, %ebx
lea 5(%edx), %ecx
@@ -2544,11 +2494,7 @@ L(Exit6):
movl %eax, (%edx)
movw 4(%ecx), %ax
movw %ax, 4(%edx)
-# ifdef USE_AS_STPCPY
- lea 5(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (5)
# ifdef USE_AS_STRNCPY
sub $6, %ebx
lea 6(%edx), %ecx
@@ -2566,11 +2512,7 @@ L(Exit7):
movl %eax, (%edx)
movl 3(%ecx), %eax
movl %eax, 3(%edx)
-# ifdef USE_AS_STPCPY
- lea 6(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (6)
# ifdef USE_AS_STRNCPY
sub $7, %ebx
lea 7(%edx), %ecx
@@ -2585,14 +2527,10 @@ L(Exit7):
.p2align 4
L(Exit9):
movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
movb 8(%ecx), %al
+ movlpd %xmm0, (%edx)
movb %al, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 8(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (8)
# ifdef USE_AS_STRNCPY
sub $9, %ebx
lea 9(%edx), %ecx
@@ -2607,14 +2545,10 @@ L(Exit9):
.p2align 4
L(Exit10):
movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
movw 8(%ecx), %ax
+ movlpd %xmm0, (%edx)
movw %ax, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 9(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (9)
# ifdef USE_AS_STRNCPY
sub $10, %ebx
lea 10(%edx), %ecx
@@ -2629,14 +2563,10 @@ L(Exit10):
.p2align 4
L(Exit11):
movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
movl 7(%ecx), %eax
+ movlpd %xmm0, (%edx)
movl %eax, 7(%edx)
-# ifdef USE_AS_STPCPY
- lea 10(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ SAVE_RESULT (10)
# ifdef USE_AS_STRNCPY
sub $11, %ebx
lea 11(%edx), %ecx
@@ -2649,38 +2579,12 @@ L(Exit11):
RETURN1
.p2align 4
-L(Exit12):
- movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
- movl 8(%ecx), %eax
- movl %eax, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 11(%edx), %eax
-# else
- movl %edi, %eax
-# endif
-# ifdef USE_AS_STRNCPY
- sub $12, %ebx
- lea 12(%edx), %ecx
- jnz L(StrncpyFillTailWithZero1)
-# ifdef USE_AS_STPCPY
- cmpb $1, (%eax)
- sbb $-1, %eax
-# endif
-# endif
- RETURN1
-
- .p2align 4
L(Exit13):
movlpd (%ecx), %xmm0
+ movlpd 5(%ecx), %xmm1
movlpd %xmm0, (%edx)
- movlpd 5(%ecx), %xmm0
- movlpd %xmm0, 5(%edx)
-# ifdef USE_AS_STPCPY
- lea 12(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ movlpd %xmm1, 5(%edx)
+ SAVE_RESULT (12)
# ifdef USE_AS_STRNCPY
sub $13, %ebx
lea 13(%edx), %ecx
@@ -2695,14 +2599,10 @@ L(Exit13):
.p2align 4
L(Exit14):
movlpd (%ecx), %xmm0
+ movlpd 6(%ecx), %xmm1
movlpd %xmm0, (%edx)
- movlpd 6(%ecx), %xmm0
- movlpd %xmm0, 6(%edx)
-# ifdef USE_AS_STPCPY
- lea 13(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ movlpd %xmm1, 6(%edx)
+ SAVE_RESULT (13)
# ifdef USE_AS_STRNCPY
sub $14, %ebx
lea 14(%edx), %ecx
@@ -2717,14 +2617,10 @@ L(Exit14):
.p2align 4
L(Exit15):
movlpd (%ecx), %xmm0
+ movlpd 7(%ecx), %xmm1
movlpd %xmm0, (%edx)
- movlpd 7(%ecx), %xmm0
- movlpd %xmm0, 7(%edx)
-# ifdef USE_AS_STPCPY
- lea 14(%edx), %eax
-# else
- movl %edi, %eax
-# endif
+ movlpd %xmm1, 7(%edx)
+ SAVE_RESULT (14)
# ifdef USE_AS_STRNCPY
sub $15, %ebx
lea 15(%edx), %ecx
@@ -2853,7 +2749,7 @@ L(FillFrom1To16Bytes):
jl L(Fill1)
je L(Fill2)
jg L(Fill3)
-L(FillMore8): /* but less than 16 */
+L(FillMore8): /* but less than 16 */
cmp $12, %ebx
je L(Fill12)
jl L(FillLess12)
@@ -2861,18 +2757,18 @@ L(FillMore8): /* but less than 16 */
jl L(Fill13)
je L(Fill14)
jg L(Fill15)
-L(FillMore4): /* but less than 8 */
+L(FillMore4): /* but less than 8 */
cmp $6, %ebx
jl L(Fill5)
je L(Fill6)
jg L(Fill7)
-L(FillLess12): /* but more than 8 */
+L(FillLess12): /* but more than 8 */
cmp $10, %ebx
jl L(Fill9)
je L(Fill10)
jmp L(Fill11)
- CFI_PUSH (%edi)
+ CFI_PUSH(%edi)
.p2align 4
L(StrncpyFillTailWithZero1):
@@ -2929,11 +2825,7 @@ L(StrncpyFillLess32):
L(ExitTail1):
movb (%ecx), %al
movb %al, (%edx)
-# ifdef USE_AS_STPCPY
- lea (%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (0)
# ifdef USE_AS_STRNCPY
sub $1, %ebx
lea 1(%edx), %ecx
@@ -2949,11 +2841,7 @@ L(ExitTail1):
L(ExitTail2):
movw (%ecx), %ax
movw %ax, (%edx)
-# ifdef USE_AS_STPCPY
- lea 1(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (1)
# ifdef USE_AS_STRNCPY
sub $2, %ebx
lea 2(%edx), %ecx
@@ -2971,11 +2859,7 @@ L(ExitTail3):
movw %ax, (%edx)
movb 2(%ecx), %al
movb %al, 2(%edx)
-# ifdef USE_AS_STPCPY
- lea 2(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (2)
# ifdef USE_AS_STRNCPY
sub $3, %ebx
lea 3(%edx), %ecx
@@ -2991,11 +2875,7 @@ L(ExitTail3):
L(ExitTail4):
movl (%ecx), %eax
movl %eax, (%edx)
-# ifdef USE_AS_STPCPY
- lea 3(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (3)
# ifdef USE_AS_STRNCPY
sub $4, %ebx
lea 4(%edx), %ecx
@@ -3013,11 +2893,7 @@ L(ExitTail5):
movl %eax, (%edx)
movb 4(%ecx), %al
movb %al, 4(%edx)
-# ifdef USE_AS_STPCPY
- lea 4(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (4)
# ifdef USE_AS_STRNCPY
sub $5, %ebx
lea 5(%edx), %ecx
@@ -3035,11 +2911,7 @@ L(ExitTail6):
movl %eax, (%edx)
movw 4(%ecx), %ax
movw %ax, 4(%edx)
-# ifdef USE_AS_STPCPY
- lea 5(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (5)
# ifdef USE_AS_STRNCPY
sub $6, %ebx
lea 6(%edx), %ecx
@@ -3057,11 +2929,7 @@ L(ExitTail7):
movl %eax, (%edx)
movl 3(%ecx), %eax
movl %eax, 3(%edx)
-# ifdef USE_AS_STPCPY
- lea 6(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (6)
# ifdef USE_AS_STRNCPY
sub $7, %ebx
lea 7(%edx), %ecx
@@ -3077,33 +2945,21 @@ L(ExitTail7):
L(ExitTail8):
movlpd (%ecx), %xmm0
movlpd %xmm0, (%edx)
-# ifdef USE_AS_STPCPY
- lea 7(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (7)
# ifdef USE_AS_STRNCPY
sub $8, %ebx
lea 8(%edx), %ecx
jnz L(StrncpyFillTailWithZero)
-# ifdef USE_AS_STPCPY
- cmpb $1, (%eax)
- sbb $-1, %eax
-# endif
# endif
RETURN
.p2align 4
L(ExitTail9):
movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
movb 8(%ecx), %al
+ movlpd %xmm0, (%edx)
movb %al, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 8(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (8)
# ifdef USE_AS_STRNCPY
sub $9, %ebx
lea 9(%edx), %ecx
@@ -3118,14 +2974,10 @@ L(ExitTail9):
.p2align 4
L(ExitTail10):
movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
movw 8(%ecx), %ax
+ movlpd %xmm0, (%edx)
movw %ax, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 9(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (9)
# ifdef USE_AS_STRNCPY
sub $10, %ebx
lea 10(%edx), %ecx
@@ -3140,14 +2992,10 @@ L(ExitTail10):
.p2align 4
L(ExitTail11):
movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
movl 7(%ecx), %eax
+ movlpd %xmm0, (%edx)
movl %eax, 7(%edx)
-# ifdef USE_AS_STPCPY
- lea 10(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (10)
# ifdef USE_AS_STRNCPY
sub $11, %ebx
lea 11(%edx), %ecx
@@ -3162,14 +3010,10 @@ L(ExitTail11):
.p2align 4
L(ExitTail12):
movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
movl 8(%ecx), %eax
+ movlpd %xmm0, (%edx)
movl %eax, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 11(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ SAVE_RESULT_TAIL (11)
# ifdef USE_AS_STRNCPY
sub $12, %ebx
lea 12(%edx), %ecx
@@ -3184,14 +3028,10 @@ L(ExitTail12):
.p2align 4
L(ExitTail13):
movlpd (%ecx), %xmm0
+ movlpd 5(%ecx), %xmm1
movlpd %xmm0, (%edx)
- movlpd 5(%ecx), %xmm0
- movlpd %xmm0, 5(%edx)
-# ifdef USE_AS_STPCPY
- lea 12(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ movlpd %xmm1, 5(%edx)
+ SAVE_RESULT_TAIL (12)
# ifdef USE_AS_STRNCPY
sub $13, %ebx
lea 13(%edx), %ecx
@@ -3206,19 +3046,15 @@ L(ExitTail13):
.p2align 4
L(ExitTail14):
movlpd (%ecx), %xmm0
+ movlpd 6(%ecx), %xmm1
movlpd %xmm0, (%edx)
- movlpd 6(%ecx), %xmm0
- movlpd %xmm0, 6(%edx)
-# ifdef USE_AS_STPCPY
- lea 13(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ movlpd %xmm1, 6(%edx)
+ SAVE_RESULT_TAIL (13)
# ifdef USE_AS_STRNCPY
sub $14, %ebx
lea 14(%edx), %ecx
jnz L(StrncpyFillTailWithZero)
-# ifdef USE_AS_STPCPY
+# ifdef USE_AS_STPCPY
cmpb $1, (%eax)
sbb $-1, %eax
# endif
@@ -3228,36 +3064,22 @@ L(ExitTail14):
.p2align 4
L(ExitTail15):
movlpd (%ecx), %xmm0
+ movlpd 7(%ecx), %xmm1
movlpd %xmm0, (%edx)
- movlpd 7(%ecx), %xmm0
- movlpd %xmm0, 7(%edx)
-# ifdef USE_AS_STPCPY
- lea 14(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ movlpd %xmm1, 7(%edx)
+ SAVE_RESULT_TAIL (14)
# ifdef USE_AS_STRNCPY
sub $15, %ebx
lea 15(%edx), %ecx
jnz L(StrncpyFillTailWithZero)
-# ifdef USE_AS_STPCPY
- cmpb $1, (%eax)
- sbb $-1, %eax
-# endif
# endif
RETURN
.p2align 4
L(ExitTail16):
- movlpd (%ecx), %xmm0
- movlpd %xmm0, (%edx)
- movlpd 8(%ecx), %xmm0
- movlpd %xmm0, 8(%edx)
-# ifdef USE_AS_STPCPY
- lea 15(%edx), %eax
-# else
- movl %edx, %eax
-# endif
+ movdqu (%ecx), %xmm0
+ movdqu %xmm0, (%edx)
+ SAVE_RESULT_TAIL (15)
# ifdef USE_AS_STRNCPY
sub $16, %ebx
lea 16(%edx), %ecx
@@ -3268,13 +3090,14 @@ L(ExitTail16):
# endif
# endif
RETURN
-#endif
+# endif
# ifdef USE_AS_STRNCPY
# ifndef USE_AS_STRCAT
- CFI_PUSH (%esi)
- CFI_PUSH (%edi)
+ CFI_PUSH (%esi)
+ CFI_PUSH (%edi)
# endif
+ .p2align 4
L(StrncpyLeaveCase2OrCase3):
test %eax, %eax
jnz L(Aligned64LeaveCase2)
@@ -3327,153 +3150,153 @@ L(Aligned64LeaveCase2):
lea 16(%esi), %esi
lea -16(%ebx), %ebx
jmp L(CopyFrom1To16BytesCase2)
-/* -------------------------------------------------- */
+
+/*--------------------------------------------------*/
+ .p2align 4
L(StrncpyExit1Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $15, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd 7(%ecx), %xmm1
+ movlpd %xmm0, (%edx)
+ movlpd %xmm1, 7(%edx)
mov $15, %esi
- palignr $1, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit2Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $14, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd 6(%ecx), %xmm1
+ movlpd %xmm0, (%edx)
+ movlpd %xmm1, 6(%edx)
mov $14, %esi
- palignr $2, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit3Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $13, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd 5(%ecx), %xmm1
+ movlpd %xmm0, (%edx)
+ movlpd %xmm1, 5(%edx)
mov $13, %esi
- palignr $3, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit4Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $12, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 8(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 8(%edx)
mov $12, %esi
- palignr $4, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit5Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $11, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 7(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 7(%edx)
mov $11, %esi
- palignr $5, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit6Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $10, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 6(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 6(%edx)
mov $10, %esi
- palignr $6, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit7Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $9, %xmm6
+ movlpd (%ecx), %xmm0
+ movl 5(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 5(%edx)
mov $9, %esi
- palignr $7, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit8Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $8, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
mov $8, %esi
- palignr $8, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit9Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $7, %xmm6
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
mov $7, %esi
- palignr $9, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit10Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $6, %xmm6
+ movlpd -1(%ecx), %xmm0
+ movlpd %xmm0, -1(%edx)
mov $6, %esi
- palignr $10, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit11Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $5, %xmm6
+ movlpd -2(%ecx), %xmm0
+ movlpd %xmm0, -2(%edx)
mov $5, %esi
- palignr $11, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit12Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $4, %xmm6
+ movl (%ecx), %esi
+ movl %esi, (%edx)
mov $4, %esi
- palignr $12, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit13Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $3, %xmm6
+ movl -1(%ecx), %esi
+ movl %esi, -1(%edx)
mov $3, %esi
- palignr $13, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit14Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $2, %xmm6
+ movl -2(%ecx), %esi
+ movl %esi, -2(%edx)
mov $2, %esi
- palignr $14, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit15Case2OrCase3):
- movaps (%edx), %xmm6
- psrldq $1, %xmm6
+ movl -3(%ecx), %esi
+ movl %esi, -3(%edx)
mov $1, %esi
- palignr $15, %xmm1, %xmm6
- movaps %xmm6, (%edx)
test %eax, %eax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
@@ -3483,36 +3306,29 @@ L(StrncpyLeave1):
add $48, %ebx
jle L(StrncpyExit1)
palignr $1, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 31(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit1)
- palignr $1, %xmm1, %xmm2
+ palignr $1, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 31+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit1)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit1)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit1):
- movaps (%edx, %esi), %xmm6
- psrldq $15, %xmm6
- palignr $1, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 15(%esi), %esi
+ lea 15(%edx, %esi), %edx
+ lea 15(%ecx, %esi), %ecx
+ movdqu -16(%ecx), %xmm0
+ xor %esi, %esi
+ movdqu %xmm0, -16(%edx)
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave2):
@@ -3520,36 +3336,29 @@ L(StrncpyLeave2):
add $48, %ebx
jle L(StrncpyExit2)
palignr $2, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 30(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit2)
- palignr $2, %xmm1, %xmm2
+ palignr $2, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 30+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit2)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit2)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit2):
- movaps (%edx, %esi), %xmm6
- psrldq $14, %xmm6
- palignr $2, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 14(%esi), %esi
+ lea 14(%edx, %esi), %edx
+ lea 14(%ecx, %esi), %ecx
+ movdqu -16(%ecx), %xmm0
+ xor %esi, %esi
+ movdqu %xmm0, -16(%edx)
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave3):
@@ -3557,36 +3366,29 @@ L(StrncpyLeave3):
add $48, %ebx
jle L(StrncpyExit3)
palignr $3, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 29(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit3)
- palignr $3, %xmm1, %xmm2
+ palignr $3, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 29+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit3)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit3)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit3):
- movaps (%edx, %esi), %xmm6
- psrldq $13, %xmm6
- palignr $3, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 13(%esi), %esi
+ lea 13(%edx, %esi), %edx
+ lea 13(%ecx, %esi), %ecx
+ movdqu -16(%ecx), %xmm0
+ xor %esi, %esi
+ movdqu %xmm0, -16(%edx)
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave4):
@@ -3594,36 +3396,31 @@ L(StrncpyLeave4):
add $48, %ebx
jle L(StrncpyExit4)
palignr $4, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 28(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit4)
- palignr $4, %xmm1, %xmm2
+ palignr $4, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 28+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit4)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit4)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit4):
- movaps (%edx, %esi), %xmm6
- psrldq $12, %xmm6
- palignr $4, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 12(%esi), %esi
+ lea 12(%edx, %esi), %edx
+ lea 12(%ecx, %esi), %ecx
+ movlpd -12(%ecx), %xmm0
+ movl -4(%ecx), %eax
+ movlpd %xmm0, -12(%edx)
+ movl %eax, -4(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave5):
@@ -3631,36 +3428,31 @@ L(StrncpyLeave5):
add $48, %ebx
jle L(StrncpyExit5)
palignr $5, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 27(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit5)
- palignr $5, %xmm1, %xmm2
+ palignr $5, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 27+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit5)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit5)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit5):
- movaps (%edx, %esi), %xmm6
- psrldq $11, %xmm6
- palignr $5, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 11(%esi), %esi
+ lea 11(%edx, %esi), %edx
+ lea 11(%ecx, %esi), %ecx
+ movlpd -11(%ecx), %xmm0
+ movl -4(%ecx), %eax
+ movlpd %xmm0, -11(%edx)
+ movl %eax, -4(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave6):
@@ -3668,36 +3460,32 @@ L(StrncpyLeave6):
add $48, %ebx
jle L(StrncpyExit6)
palignr $6, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 26(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit6)
- palignr $6, %xmm1, %xmm2
+ palignr $6, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 26+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit6)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit6)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit6):
- movaps (%edx, %esi), %xmm6
- psrldq $10, %xmm6
- palignr $6, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 10(%esi), %esi
+ lea 10(%edx, %esi), %edx
+ lea 10(%ecx, %esi), %ecx
+
+ movlpd -10(%ecx), %xmm0
+ movw -2(%ecx), %ax
+ movlpd %xmm0, -10(%edx)
+ movw %ax, -2(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave7):
@@ -3705,36 +3493,32 @@ L(StrncpyLeave7):
add $48, %ebx
jle L(StrncpyExit7)
palignr $7, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 25(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit7)
- palignr $7, %xmm1, %xmm2
+ palignr $7, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 25+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit7)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit7)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit7):
- movaps (%edx, %esi), %xmm6
- psrldq $9, %xmm6
- palignr $7, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 9(%esi), %esi
+ lea 9(%edx, %esi), %edx
+ lea 9(%ecx, %esi), %ecx
+
+ movlpd -9(%ecx), %xmm0
+ movb -1(%ecx), %ah
+ movlpd %xmm0, -9(%edx)
+ movb %ah, -1(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave8):
@@ -3742,36 +3526,29 @@ L(StrncpyLeave8):
add $48, %ebx
jle L(StrncpyExit8)
palignr $8, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 24(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit8)
- palignr $8, %xmm1, %xmm2
+ palignr $8, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 24+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit8)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit8)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit8):
- movaps (%edx, %esi), %xmm6
- psrldq $8, %xmm6
- palignr $8, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 8(%esi), %esi
+ lea 8(%edx, %esi), %edx
+ lea 8(%ecx, %esi), %ecx
+ movlpd -8(%ecx), %xmm0
+ movlpd %xmm0, -8(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave9):
@@ -3779,36 +3556,30 @@ L(StrncpyLeave9):
add $48, %ebx
jle L(StrncpyExit9)
palignr $9, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 23(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit9)
- palignr $9, %xmm1, %xmm2
+ palignr $9, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 23+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit9)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit9)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit9):
- movaps (%edx, %esi), %xmm6
- psrldq $7, %xmm6
- palignr $9, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 7(%esi), %esi
+ lea 7(%edx, %esi), %edx
+ lea 7(%ecx, %esi), %ecx
+
+ movlpd -8(%ecx), %xmm0
+ movlpd %xmm0, -8(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave10):
@@ -3816,36 +3587,30 @@ L(StrncpyLeave10):
add $48, %ebx
jle L(StrncpyExit10)
palignr $10, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 22(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit10)
- palignr $10, %xmm1, %xmm2
+ palignr $10, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 22+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit10)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit10)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit10):
- movaps (%edx, %esi), %xmm6
- psrldq $6, %xmm6
- palignr $10, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 6(%esi), %esi
+ lea 6(%edx, %esi), %edx
+ lea 6(%ecx, %esi), %ecx
+
+ movlpd -8(%ecx), %xmm0
+ movlpd %xmm0, -8(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave11):
@@ -3853,36 +3618,31 @@ L(StrncpyLeave11):
add $48, %ebx
jle L(StrncpyExit11)
palignr $11, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 21(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit11)
- palignr $11, %xmm1, %xmm2
+ palignr $11, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 21+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit11)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit11)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit11):
- movaps (%edx, %esi), %xmm6
- psrldq $5, %xmm6
- palignr $11, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 5(%esi), %esi
+ lea 5(%edx, %esi), %edx
+ lea 5(%ecx, %esi), %ecx
+ movl -5(%ecx), %esi
+ movb -1(%ecx), %ah
+ movl %esi, -5(%edx)
+ movb %ah, -1(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave12):
@@ -3890,36 +3650,29 @@ L(StrncpyLeave12):
add $48, %ebx
jle L(StrncpyExit12)
palignr $12, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 20(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit12)
- palignr $12, %xmm1, %xmm2
+ palignr $12, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 20+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit12)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit12)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit12):
- movaps (%edx, %esi), %xmm6
- psrldq $4, %xmm6
- palignr $12, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 4(%esi), %esi
+ lea 4(%edx, %esi), %edx
+ lea 4(%ecx, %esi), %ecx
+ movl -4(%ecx), %eax
+ movl %eax, -4(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave13):
@@ -3927,36 +3680,30 @@ L(StrncpyLeave13):
add $48, %ebx
jle L(StrncpyExit13)
palignr $13, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 19(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit13)
- palignr $13, %xmm1, %xmm2
+ palignr $13, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 19+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit13)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit13)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit13):
- movaps (%edx, %esi), %xmm6
- psrldq $3, %xmm6
- palignr $13, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 3(%esi), %esi
+ lea 3(%edx, %esi), %edx
+ lea 3(%ecx, %esi), %ecx
+
+ movl -4(%ecx), %eax
+ movl %eax, -4(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave14):
@@ -3964,36 +3711,29 @@ L(StrncpyLeave14):
add $48, %ebx
jle L(StrncpyExit14)
palignr $14, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 18(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit14)
- palignr $14, %xmm1, %xmm2
+ palignr $14, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 18+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit14)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit14)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit14):
- movaps (%edx, %esi), %xmm6
- psrldq $2, %xmm6
- palignr $14, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 2(%esi), %esi
+ lea 2(%edx, %esi), %edx
+ lea 2(%ecx, %esi), %ecx
+ movw -2(%ecx), %ax
+ movw %ax, -2(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
L(StrncpyLeave15):
@@ -4001,43 +3741,36 @@ L(StrncpyLeave15):
add $48, %ebx
jle L(StrncpyExit15)
palignr $15, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%edx)
movaps 17(%ecx), %xmm2
lea 16(%esi), %esi
- movaps %xmm2, %xmm3
sub $16, %ebx
jbe L(StrncpyExit15)
- palignr $15, %xmm1, %xmm2
+ palignr $15, %xmm3, %xmm2
movaps %xmm2, 16(%edx)
- movaps 17+16(%ecx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit15)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%edx)
lea 16(%esi), %esi
sub $16, %ebx
jbe L(StrncpyExit15)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%edx)
lea 16(%esi), %esi
lea -16(%ebx), %ebx
-
L(StrncpyExit15):
- movaps (%edx, %esi), %xmm6
- psrldq $1, %xmm6
- palignr $15, %xmm1, %xmm6
- movaps %xmm6, (%edx, %esi)
- lea 1(%esi), %esi
+ lea 1(%edx, %esi), %edx
+ lea 1(%ecx, %esi), %ecx
+ movb -1(%ecx), %ah
+ movb %ah, -1(%edx)
+ xor %esi, %esi
jmp L(CopyFrom1To16BytesCase3)
# endif
# ifndef USE_AS_STRCAT
# ifdef USE_AS_STRNCPY
- CFI_POP (%esi)
- CFI_POP (%edi)
+ CFI_POP (%esi)
+ CFI_POP (%edi)
.p2align 4
L(ExitTail0):
@@ -4046,20 +3779,14 @@ L(ExitTail0):
.p2align 4
L(StrncpyExit15Bytes):
- cmp $9, %ebx
- je L(ExitTail9)
+ cmp $12, %ebx
+ jbe L(StrncpyExit12Bytes)
cmpb $0, 8(%ecx)
jz L(ExitTail9)
- cmp $10, %ebx
- je L(ExitTail10)
cmpb $0, 9(%ecx)
jz L(ExitTail10)
- cmp $11, %ebx
- je L(ExitTail11)
cmpb $0, 10(%ecx)
jz L(ExitTail11)
- cmp $12, %ebx
- je L(ExitTail12)
cmpb $0, 11(%ecx)
jz L(ExitTail12)
cmp $13, %ebx
@@ -4071,9 +3798,9 @@ L(StrncpyExit15Bytes):
cmpb $0, 13(%ecx)
jz L(ExitTail14)
movlpd (%ecx), %xmm0
+ movlpd 7(%ecx), %xmm1
movlpd %xmm0, (%edx)
- movlpd 7(%ecx), %xmm0
- movlpd %xmm0, 7(%edx)
+ movlpd %xmm1, 7(%edx)
# ifdef USE_AS_STPCPY
lea 14(%edx), %eax
cmpb $1, (%eax)
@@ -4084,23 +3811,43 @@ L(StrncpyExit15Bytes):
RETURN
.p2align 4
+L(StrncpyExit12Bytes):
+ cmp $9, %ebx
+ je L(ExitTail9)
+ cmpb $0, 8(%ecx)
+ jz L(ExitTail9)
+ cmp $10, %ebx
+ je L(ExitTail10)
+ cmpb $0, 9(%ecx)
+ jz L(ExitTail10)
+ cmp $11, %ebx
+ je L(ExitTail11)
+ cmpb $0, 10(%ecx)
+ jz L(ExitTail11)
+ movlpd (%ecx), %xmm0
+ movl 8(%ecx), %eax
+ movlpd %xmm0, (%edx)
+ movl %eax, 8(%edx)
+ SAVE_RESULT_TAIL (11)
+# ifdef USE_AS_STPCPY
+ cmpb $1, (%eax)
+ sbb $-1, %eax
+# endif
+ RETURN
+
+ .p2align 4
L(StrncpyExit8Bytes):
- cmp $1, %ebx
- je L(ExitTail1)
+ cmp $4, %ebx
+ jbe L(StrncpyExit4Bytes)
cmpb $0, (%ecx)
jz L(ExitTail1)
- cmp $2, %ebx
- je L(ExitTail2)
cmpb $0, 1(%ecx)
jz L(ExitTail2)
- cmp $3, %ebx
- je L(ExitTail3)
cmpb $0, 2(%ecx)
jz L(ExitTail3)
- cmp $4, %ebx
- je L(ExitTail4)
cmpb $0, 3(%ecx)
jz L(ExitTail4)
+
cmp $5, %ebx
je L(ExitTail5)
cmpb $0, 4(%ecx)
@@ -4123,8 +3870,32 @@ L(StrncpyExit8Bytes):
movl %edx, %eax
# endif
RETURN
-# endif
+ .p2align 4
+L(StrncpyExit4Bytes):
+ test %ebx, %ebx
+ jz L(ExitTail0)
+ cmp $1, %ebx
+ je L(ExitTail1)
+ cmpb $0, (%ecx)
+ jz L(ExitTail1)
+ cmp $2, %ebx
+ je L(ExitTail2)
+ cmpb $0, 1(%ecx)
+ jz L(ExitTail2)
+ cmp $3, %ebx
+ je L(ExitTail3)
+ cmpb $0, 2(%ecx)
+ jz L(ExitTail3)
+ movl (%ecx), %eax
+ movl %eax, (%edx)
+ SAVE_RESULT_TAIL (3)
+# ifdef USE_AS_STPCPY
+ cmpb $1, (%eax)
+ sbb $-1, %eax
+# endif
+ RETURN
+# endif
END (STRCPY)
# endif
diff --git a/sysdeps/i386/i686/multiarch/strlen-sse2.S b/sysdeps/i386/i686/multiarch/strlen-sse2.S
index 2dbc4a9e76..91b6d799cd 100644
--- a/sysdeps/i386/i686/multiarch/strlen-sse2.S
+++ b/sysdeps/i386/i686/multiarch/strlen-sse2.S
@@ -18,29 +18,46 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#if (defined USE_AS_STRCAT || defined SHARED) && !defined NOT_IN_libc
+/* for strlen only SHARED version is optimized, for strcat, strncat, strnlen both STATIC and SHARED are optimized */
+
+#if (defined USE_AS_STRNLEN || defined USE_AS_STRCAT || defined SHARED) && !defined NOT_IN_libc
+
# ifndef USE_AS_STRCAT
# include <sysdep.h>
-# define CFI_PUSH(REG) \
+# define PARMS 4
+# define STR PARMS
+# define RETURN ret
+
+# ifdef USE_AS_STRNLEN
+# define LEN PARMS + 8
+# define CFI_PUSH(REG) \
cfi_adjust_cfa_offset (4); \
cfi_rel_offset (REG, 0)
-# define CFI_POP(REG) \
+# define CFI_POP(REG) \
cfi_adjust_cfa_offset (-4); \
cfi_restore (REG)
-# define PUSH(REG) pushl REG; CFI_PUSH (REG)
-# define POP(REG) popl REG; CFI_POP (REG)
-# define PARMS 4
-# define STR PARMS
-# define ENTRANCE
-# define RETURN ret
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+# undef RETURN
+# define RETURN POP (%edi); CFI_PUSH(%edi); ret
+# endif
+
+# ifndef STRLEN
+# define STRLEN __strlen_sse2
+# endif
atom_text_section
-ENTRY (__strlen_sse2)
- ENTRANCE
+ENTRY (STRLEN)
mov STR(%esp), %edx
+# ifdef USE_AS_STRNLEN
+ PUSH (%edi)
+ movl LEN(%esp), %edi
+ sub $4, %edi
+ jbe L(len_less4_prolog)
+# endif
# endif
xor %eax, %eax
cmpb $0, (%edx)
@@ -51,6 +68,12 @@ ENTRY (__strlen_sse2)
jz L(exit_tail2)
cmpb $0, 3(%edx)
jz L(exit_tail3)
+
+# ifdef USE_AS_STRNLEN
+ sub $4, %edi
+ jbe L(len_less8_prolog)
+# endif
+
cmpb $0, 4(%edx)
jz L(exit_tail4)
cmpb $0, 5(%edx)
@@ -59,6 +82,12 @@ ENTRY (__strlen_sse2)
jz L(exit_tail6)
cmpb $0, 7(%edx)
jz L(exit_tail7)
+
+# ifdef USE_AS_STRNLEN
+ sub $4, %edi
+ jbe L(len_less12_prolog)
+# endif
+
cmpb $0, 8(%edx)
jz L(exit_tail8)
cmpb $0, 9(%edx)
@@ -67,6 +96,12 @@ ENTRY (__strlen_sse2)
jz L(exit_tail10)
cmpb $0, 11(%edx)
jz L(exit_tail11)
+
+# ifdef USE_AS_STRNLEN
+ sub $4, %edi
+ jbe L(len_less16_prolog)
+# endif
+
cmpb $0, 12(%edx)
jz L(exit_tail12)
cmpb $0, 13(%edx)
@@ -75,11 +110,18 @@ ENTRY (__strlen_sse2)
jz L(exit_tail14)
cmpb $0, 15(%edx)
jz L(exit_tail15)
+
pxor %xmm0, %xmm0
- mov %edx, %eax
- lea 16(%edx), %ecx
+ lea 16(%edx), %eax
+ mov %eax, %ecx
and $-16, %eax
- add $16, %eax
+
+# ifdef USE_AS_STRNLEN
+ and $15, %edx
+ add %edx, %edi
+ sub $64, %edi
+ jbe L(len_less64)
+# endif
pcmpeqb (%eax), %xmm0
pmovmskb %xmm0, %edx
@@ -95,7 +137,6 @@ ENTRY (__strlen_sse2)
lea 16(%eax), %eax
jnz L(exit)
-
pcmpeqb (%eax), %xmm2
pmovmskb %xmm2, %edx
pxor %xmm3, %xmm3
@@ -109,6 +150,11 @@ ENTRY (__strlen_sse2)
lea 16(%eax), %eax
jnz L(exit)
+# ifdef USE_AS_STRNLEN
+ sub $64, %edi
+ jbe L(len_less64)
+# endif
+
pcmpeqb (%eax), %xmm0
pmovmskb %xmm0, %edx
test %edx, %edx
@@ -133,6 +179,11 @@ ENTRY (__strlen_sse2)
lea 16(%eax), %eax
jnz L(exit)
+# ifdef USE_AS_STRNLEN
+ sub $64, %edi
+ jbe L(len_less64)
+# endif
+
pcmpeqb (%eax), %xmm0
pmovmskb %xmm0, %edx
test %edx, %edx
@@ -157,6 +208,11 @@ ENTRY (__strlen_sse2)
lea 16(%eax), %eax
jnz L(exit)
+# ifdef USE_AS_STRNLEN
+ sub $64, %edi
+ jbe L(len_less64)
+# endif
+
pcmpeqb (%eax), %xmm0
pmovmskb %xmm0, %edx
test %edx, %edx
@@ -181,8 +237,20 @@ ENTRY (__strlen_sse2)
lea 16(%eax), %eax
jnz L(exit)
+# ifdef USE_AS_STRNLEN
+ mov %eax, %edx
+ and $63, %edx
+ add %edx, %edi
+# endif
+
and $-0x40, %eax
-L(aligned_64):
+
+ .p2align 4
+L(aligned_64_loop):
+# ifdef USE_AS_STRNLEN
+ sub $64, %edi
+ jbe L(len_less64)
+# endif
movaps (%eax), %xmm0
movaps 16(%eax), %xmm1
movaps 32(%eax), %xmm2
@@ -194,7 +262,7 @@ L(aligned_64):
pmovmskb %xmm2, %edx
test %edx, %edx
lea 64(%eax), %eax
- jz L(aligned_64)
+ jz L(aligned_64_loop)
pcmpeqb -64(%eax), %xmm3
pmovmskb %xmm3, %edx
@@ -221,56 +289,348 @@ L(exit):
sub %ecx, %eax
test %dl, %dl
jz L(exit_high)
+
+ mov %dl, %cl
+ and $15, %cl
+ jz L(exit_8)
test $0x01, %dl
jnz L(exit_tail0)
-
test $0x02, %dl
jnz L(exit_tail1)
-
test $0x04, %dl
jnz L(exit_tail2)
+ add $3, %eax
+ RETURN
- test $0x08, %dl
- jnz L(exit_tail3)
-
+ .p2align 4
+L(exit_8):
test $0x10, %dl
jnz L(exit_tail4)
-
test $0x20, %dl
jnz L(exit_tail5)
-
test $0x40, %dl
jnz L(exit_tail6)
add $7, %eax
-L(exit_tail0):
RETURN
+ .p2align 4
L(exit_high):
- add $8, %eax
+ mov %dh, %ch
+ and $15, %ch
+ jz L(exit_high_8)
test $0x01, %dh
+ jnz L(exit_tail8)
+ test $0x02, %dh
+ jnz L(exit_tail9)
+ test $0x04, %dh
+ jnz L(exit_tail10)
+ add $11, %eax
+ RETURN
+
+ .p2align 4
+L(exit_high_8):
+ test $0x10, %dh
+ jnz L(exit_tail12)
+ test $0x20, %dh
+ jnz L(exit_tail13)
+ test $0x40, %dh
+ jnz L(exit_tail14)
+ add $15, %eax
+L(exit_tail0):
+ RETURN
+
+# ifdef USE_AS_STRNLEN
+
+ .p2align 4
+L(len_less64):
+ pxor %xmm0, %xmm0
+ add $64, %edi
+
+ pcmpeqb (%eax), %xmm0
+ pmovmskb %xmm0, %edx
+ pxor %xmm1, %xmm1
+ lea 16(%eax), %eax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ sub $16, %edi
+ jbe L(return_start_len)
+
+ pcmpeqb (%eax), %xmm1
+ pmovmskb %xmm1, %edx
+ lea 16(%eax), %eax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ sub $16, %edi
+ jbe L(return_start_len)
+
+ pcmpeqb (%eax), %xmm0
+ pmovmskb %xmm0, %edx
+ lea 16(%eax), %eax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ sub $16, %edi
+ jbe L(return_start_len)
+
+ pcmpeqb (%eax), %xmm1
+ pmovmskb %xmm1, %edx
+ lea 16(%eax), %eax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ movl LEN(%esp), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit):
+ sub %ecx, %eax
+
+ test %dl, %dl
+ jz L(strnlen_exit_high)
+ mov %dl, %cl
+ and $15, %cl
+ jz L(strnlen_exit_8)
+ test $0x01, %dl
jnz L(exit_tail0)
+ test $0x02, %dl
+ jnz L(strnlen_exit_tail1)
+ test $0x04, %dl
+ jnz L(strnlen_exit_tail2)
+ sub $4, %edi
+ jb L(return_start_len)
+ lea 3(%eax), %eax
+ RETURN
- test $0x02, %dh
- jnz L(exit_tail1)
+ .p2align 4
+L(strnlen_exit_8):
+ test $0x10, %dl
+ jnz L(strnlen_exit_tail4)
+ test $0x20, %dl
+ jnz L(strnlen_exit_tail5)
+ test $0x40, %dl
+ jnz L(strnlen_exit_tail6)
+ sub $8, %edi
+ jb L(return_start_len)
+ lea 7(%eax), %eax
+ RETURN
+ .p2align 4
+L(strnlen_exit_high):
+ mov %dh, %ch
+ and $15, %ch
+ jz L(strnlen_exit_high_8)
+ test $0x01, %dh
+ jnz L(strnlen_exit_tail8)
+ test $0x02, %dh
+ jnz L(strnlen_exit_tail9)
test $0x04, %dh
- jnz L(exit_tail2)
-
- test $0x08, %dh
- jnz L(exit_tail3)
+ jnz L(strnlen_exit_tail10)
+ sub $12, %edi
+ jb L(return_start_len)
+ lea 11(%eax), %eax
+ RETURN
+ .p2align 4
+L(strnlen_exit_high_8):
test $0x10, %dh
- jnz L(exit_tail4)
-
+ jnz L(strnlen_exit_tail12)
test $0x20, %dh
- jnz L(exit_tail5)
-
+ jnz L(strnlen_exit_tail13)
test $0x40, %dh
- jnz L(exit_tail6)
- add $7, %eax
+ jnz L(strnlen_exit_tail14)
+ sub $16, %edi
+ jb L(return_start_len)
+ lea 15(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail1):
+ sub $2, %edi
+ jb L(return_start_len)
+ lea 1(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail2):
+ sub $3, %edi
+ jb L(return_start_len)
+ lea 2(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail4):
+ sub $5, %edi
+ jb L(return_start_len)
+ lea 4(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail5):
+ sub $6, %edi
+ jb L(return_start_len)
+ lea 5(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail6):
+ sub $7, %edi
+ jb L(return_start_len)
+ lea 6(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail8):
+ sub $9, %edi
+ jb L(return_start_len)
+ lea 8(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail9):
+ sub $10, %edi
+ jb L(return_start_len)
+ lea 9(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail10):
+ sub $11, %edi
+ jb L(return_start_len)
+ lea 10(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail12):
+ sub $13, %edi
+ jb L(return_start_len)
+ lea 12(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(strnlen_exit_tail13):
+ sub $14, %edi
+ jb L(return_start_len)
+ lea 13(%eax), %eax
RETURN
.p2align 4
+L(strnlen_exit_tail14):
+ sub $15, %edi
+ jb L(return_start_len)
+ lea 14(%eax), %eax
+ RETURN
+
+ .p2align 4
+L(return_start_len):
+ movl LEN(%esp), %eax
+ RETURN
+
+/* for prolog only */
+
+ .p2align 4
+L(len_less4_prolog):
+ xor %eax, %eax
+
+ add $4, %edi
+ jz L(exit_tail0)
+
+ cmpb $0, (%edx)
+ jz L(exit_tail0)
+ cmp $1, %edi
+ je L(exit_tail1)
+
+ cmpb $0, 1(%edx)
+ jz L(exit_tail1)
+ cmp $2, %edi
+ je L(exit_tail2)
+
+ cmpb $0, 2(%edx)
+ jz L(exit_tail2)
+ cmp $3, %edi
+ je L(exit_tail3)
+
+ cmpb $0, 3(%edx)
+ jz L(exit_tail3)
+ mov $4, %eax
+ RETURN
+
+ .p2align 4
+L(len_less8_prolog):
+ add $4, %edi
+
+ cmpb $0, 4(%edx)
+ jz L(exit_tail4)
+ cmp $1, %edi
+ je L(exit_tail5)
+
+ cmpb $0, 5(%edx)
+ jz L(exit_tail5)
+ cmp $2, %edi
+ je L(exit_tail6)
+
+ cmpb $0, 6(%edx)
+ jz L(exit_tail6)
+ cmp $3, %edi
+ je L(exit_tail7)
+
+ cmpb $0, 7(%edx)
+ jz L(exit_tail7)
+ mov $8, %eax
+ RETURN
+
+
+ .p2align 4
+L(len_less12_prolog):
+ add $4, %edi
+
+ cmpb $0, 8(%edx)
+ jz L(exit_tail8)
+ cmp $1, %edi
+ je L(exit_tail9)
+
+ cmpb $0, 9(%edx)
+ jz L(exit_tail9)
+ cmp $2, %edi
+ je L(exit_tail10)
+
+ cmpb $0, 10(%edx)
+ jz L(exit_tail10)
+ cmp $3, %edi
+ je L(exit_tail11)
+
+ cmpb $0, 11(%edx)
+ jz L(exit_tail11)
+ mov $12, %eax
+ RETURN
+
+ .p2align 4
+L(len_less16_prolog):
+ add $4, %edi
+
+ cmpb $0, 12(%edx)
+ jz L(exit_tail12)
+ cmp $1, %edi
+ je L(exit_tail13)
+
+ cmpb $0, 13(%edx)
+ jz L(exit_tail13)
+ cmp $2, %edi
+ je L(exit_tail14)
+
+ cmpb $0, 14(%edx)
+ jz L(exit_tail14)
+ cmp $3, %edi
+ je L(exit_tail15)
+
+ cmpb $0, 15(%edx)
+ jz L(exit_tail15)
+ mov $16, %eax
+ RETURN
+# endif
+
+ .p2align 4
L(exit_tail1):
add $1, %eax
RETURN
@@ -330,7 +690,7 @@ L(exit_tail14):
L(exit_tail15):
add $15, %eax
# ifndef USE_AS_STRCAT
- ret
-END (__strlen_sse2)
+ RETURN
+END (STRLEN)
# endif
#endif
diff --git a/sysdeps/i386/i686/multiarch/strncase-c.c b/sysdeps/i386/i686/multiarch/strncase-c.c
new file mode 100644
index 0000000000..76581eb62b
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strncase-c.c
@@ -0,0 +1,8 @@
+#include <string.h>
+
+extern __typeof (strncasecmp) __strncasecmp_nonascii;
+
+#define __strncasecmp __strncasecmp_nonascii
+#include <string/strncase.c>
+
+strong_alias (__strncasecmp_nonascii, __strncasecmp_ia32)
diff --git a/sysdeps/i386/i686/multiarch/strncase.S b/sysdeps/i386/i686/multiarch/strncase.S
new file mode 100644
index 0000000000..d20532f993
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strncase.S
@@ -0,0 +1,68 @@
+/* Entry point for multi-version x86 strncasecmp.
+ Copyright (C) 2011 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifdef SHARED
+ .text
+ENTRY(__strncasecmp)
+ .type __strncasecmp, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __strncasecmp_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __strncasecmp_ssse3@GOTOFF(%ebx), %eax
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __strncasecmp_sse4_2@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (ebx)
+ ret
+END(__strncasecmp)
+#else
+ .text
+ENTRY(__strncasecmp)
+ .type __strncasecmp, @gnu_indirect_function
+ cmpl $0, KIND_OFFSET+__cpu_features
+ jne 1f
+ call __init_cpu_features
+1: leal __strncasecmp_ia32, %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features
+ jz 2f
+ leal __strncasecmp_ssse3, %eax
+#if 0
+ // XXX Temporarily
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features
+ jz 2f
+ leal __strncasecmp_sse4_2, %eax
+#endif
+2: ret
+END(__strncasecmp)
+#endif
+
+weak_alias (__strncasecmp, strncasecmp)
diff --git a/sysdeps/i386/i686/multiarch/strncase_l-c.c b/sysdeps/i386/i686/multiarch/strncase_l-c.c
new file mode 100644
index 0000000000..0c68b8d1cb
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strncase_l-c.c
@@ -0,0 +1,11 @@
+#include <string.h>
+
+extern __typeof (strncasecmp_l) __strncasecmp_l_nonascii;
+
+#define __strncasecmp_l __strncasecmp_l_nonascii
+#define USE_IN_EXTENDED_LOCALE_MODEL 1
+#include <string/strncase.c>
+
+/* The needs of strcasecmp in libc are minimal, no need to go through
+ the IFUNC. */
+strong_alias (__strncasecmp_l_nonascii, __GI___strncasecmp_l)
diff --git a/sysdeps/i386/i686/multiarch/strncase_l-sse4.S b/sysdeps/i386/i686/multiarch/strncase_l-sse4.S
new file mode 100644
index 0000000000..557210832e
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strncase_l-sse4.S
@@ -0,0 +1,2 @@
+#define USE_AS_STRNCASECMP_L 1
+#include "strcmp-sse4.S"
diff --git a/sysdeps/i386/i686/multiarch/strncase_l-ssse3.S b/sysdeps/i386/i686/multiarch/strncase_l-ssse3.S
new file mode 100644
index 0000000000..d438a1ae35
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strncase_l-ssse3.S
@@ -0,0 +1,2 @@
+#define USE_AS_STRNCASECMP_L 1
+#include "strcmp-ssse3.S"
diff --git a/sysdeps/i386/i686/multiarch/strncase_l.S b/sysdeps/i386/i686/multiarch/strncase_l.S
new file mode 100644
index 0000000000..a808c8cd71
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strncase_l.S
@@ -0,0 +1,5 @@
+#define STRCMP __strncasecmp_l
+#define USE_AS_STRNCASECMP_L
+#include "strcmp.S"
+
+weak_alias (__strncasecmp_l, strncasecmp_l)
diff --git a/sysdeps/i386/i686/multiarch/strnlen-c.c b/sysdeps/i386/i686/multiarch/strnlen-c.c
new file mode 100644
index 0000000000..f02465d6a4
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strnlen-c.c
@@ -0,0 +1,8 @@
+#define STRNLEN __strnlen_ia32
+#ifdef SHARED
+# undef libc_hidden_def
+# define libc_hidden_def(name) \
+ __hidden_ver1 (__strnlen_ia32, __GI_strnlen, __strnlen_ia32);
+#endif
+
+#include "string/strnlen.c"
diff --git a/sysdeps/i386/i686/multiarch/strnlen-sse2.S b/sysdeps/i386/i686/multiarch/strnlen-sse2.S
new file mode 100644
index 0000000000..56b6ae2a5c
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strnlen-sse2.S
@@ -0,0 +1,3 @@
+#define USE_AS_STRNLEN
+#define STRLEN __strnlen_sse2
+#include "strlen-sse2.S"
diff --git a/sysdeps/i386/i686/multiarch/strnlen.S b/sysdeps/i386/i686/multiarch/strnlen.S
new file mode 100644
index 0000000000..7e542d9b7c
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/strnlen.S
@@ -0,0 +1,56 @@
+/* Multiple versions of strnlen
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+ .text
+ENTRY(__strnlen)
+ .type __strnlen, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __strnlen_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __strnlen_sse2@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4);
+ cfi_restore (ebx)
+ ret
+END(__strnlen)
+
+weak_alias(__strnlen, strnlen)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcschr-c.c b/sysdeps/i386/i686/multiarch/wcschr-c.c
new file mode 100644
index 0000000000..a63e50e283
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcschr-c.c
@@ -0,0 +1,8 @@
+#ifndef NOT_IN_libc
+# undef libc_hidden_def
+# define libc_hidden_def(name) \
+ __hidden_ver1 (__wcschr_ia32, __GI_wcschr, __wcschr_ia32);
+# define WCSCHR __wcschr_ia32
+#endif
+
+#include "wcsmbs/wcschr.c"
diff --git a/sysdeps/i386/i686/multiarch/wcschr-sse2.S b/sysdeps/i386/i686/multiarch/wcschr-sse2.S
new file mode 100644
index 0000000000..cc8204cfe3
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcschr-sse2.S
@@ -0,0 +1,220 @@
+/* wcschr with SSE2, without using bsf instructions
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+# include <sysdep.h>
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+
+# define PARMS 4
+# define STR1 PARMS
+# define STR2 STR1+4
+
+ atom_text_section
+ENTRY (__wcschr_sse2)
+
+ mov STR1(%esp), %ecx
+ movd STR2(%esp), %xmm1
+
+ mov %ecx, %eax
+ punpckldq %xmm1, %xmm1
+ pxor %xmm2, %xmm2
+ punpckldq %xmm1, %xmm1
+
+ and $63, %eax
+ cmp $48, %eax
+ ja L(cross_cache)
+
+ movdqu (%ecx), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %edx
+ pmovmskb %xmm0, %eax
+ or %eax, %edx
+ jnz L(matches)
+ and $-16, %ecx
+ jmp L(loop)
+
+ .p2align 4
+L(cross_cache):
+ PUSH (%edi)
+ mov %ecx, %edi
+ mov %eax, %ecx
+ and $-16, %edi
+ and $15, %ecx
+ movdqa (%edi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %edx
+ pmovmskb %xmm0, %eax
+
+ sarl %cl, %edx
+ sarl %cl, %eax
+ test %eax, %eax
+ jz L(unaligned_no_match)
+
+ add %edi, %ecx
+ POP (%edi)
+
+ test %edx, %edx
+ jz L(match_case1)
+ test %al, %al
+ jz L(match_higth_case2)
+ test $15, %al
+ jnz L(match_case2_4)
+ test $15, %dl
+ jnz L(return_null)
+ lea 4(%ecx), %eax
+ ret
+
+ CFI_PUSH (%edi)
+
+ .p2align 4
+L(unaligned_no_match):
+ mov %edi, %ecx
+ POP (%edi)
+
+ test %edx, %edx
+ jnz L(return_null)
+
+ pxor %xmm2, %xmm2
+
+/* Loop start on aligned string. */
+ .p2align 4
+L(loop):
+ add $16, %ecx
+ movdqa (%ecx), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %edx
+ pmovmskb %xmm0, %eax
+ or %eax, %edx
+ jnz L(matches)
+ add $16, %ecx
+
+ movdqa (%ecx), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %edx
+ pmovmskb %xmm0, %eax
+ or %eax, %edx
+ jnz L(matches)
+ add $16, %ecx
+
+ movdqa (%ecx), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %edx
+ pmovmskb %xmm0, %eax
+ or %eax, %edx
+ jnz L(matches)
+ add $16, %ecx
+
+ movdqa (%ecx), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %edx
+ pmovmskb %xmm0, %eax
+ or %eax, %edx
+ jz L(loop)
+
+ .p2align 4
+L(matches):
+ pmovmskb %xmm2, %edx
+ test %eax, %eax
+ jz L(return_null)
+ test %edx, %edx
+ jz L(match_case1)
+
+ .p2align 4
+L(match_case2):
+ test %al, %al
+ jz L(match_higth_case2)
+ test $15, %al
+ jnz L(match_case2_4)
+ test $15, %dl
+ jnz L(return_null)
+ lea 4(%ecx), %eax
+ ret
+
+ .p2align 4
+L(match_case2_4):
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(match_higth_case2):
+ test %dl, %dl
+ jnz L(return_null)
+ test $15, %ah
+ jnz L(match_case2_12)
+ test $15, %dh
+ jnz L(return_null)
+ lea 12(%ecx), %eax
+ ret
+
+ .p2align 4
+L(match_case2_12):
+ lea 8(%ecx), %eax
+ ret
+
+ .p2align 4
+L(match_case1):
+ test %al, %al
+ jz L(match_higth_case1)
+
+ test $0x01, %al
+ jnz L(exit0)
+ lea 4(%ecx), %eax
+ ret
+
+ .p2align 4
+L(match_higth_case1):
+ test $0x01, %ah
+ jnz L(exit3)
+ lea 12(%ecx), %eax
+ ret
+
+ .p2align 4
+L(exit0):
+ mov %ecx, %eax
+ ret
+
+ .p2align 4
+L(exit3):
+ lea 8(%ecx), %eax
+ ret
+
+ .p2align 4
+L(return_null):
+ xor %eax, %eax
+ ret
+
+END (__wcschr_sse2)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcschr.S b/sysdeps/i386/i686/multiarch/wcschr.S
new file mode 100644
index 0000000000..bf0d6d5754
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcschr.S
@@ -0,0 +1,54 @@
+/* Multiple versions of wcschr
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+ .text
+ENTRY(wcschr)
+ .type wcschr, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __wcschr_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __wcschr_sse2@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4);
+ cfi_restore (ebx)
+ ret
+END(wcschr)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcscmp-c.c b/sysdeps/i386/i686/multiarch/wcscmp-c.c
index 9592455d0d..165c56afb8 100644
--- a/sysdeps/i386/i686/multiarch/wcscmp-c.c
+++ b/sysdeps/i386/i686/multiarch/wcscmp-c.c
@@ -1,10 +1,12 @@
-#ifndef NOT_IN_libc
-
-# define WCSCMP __wcscmp_ia32
+#include <wchar.h>
+#define WCSCMP __wcscmp_ia32
+#ifdef SHARED
# undef libc_hidden_def
# define libc_hidden_def(name) \
__hidden_ver1 (__wcscmp_ia32, __GI_wcscmp, __wcscmp_ia32);
#endif
+extern __typeof (wcscmp) __wcscmp_ia32;
+
#include "wcsmbs/wcscmp.c"
diff --git a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
index 404a9a4d4c..61c43c38db 100644
--- a/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
+++ b/sysdeps/i386/i686/multiarch/wcscmp-sse2.S
@@ -21,7 +21,6 @@
#ifndef NOT_IN_libc
# include <sysdep.h>
-# include "asm-syntax.h"
# define CFI_PUSH(REG) \
cfi_adjust_cfa_offset (4); \
@@ -34,18 +33,16 @@
# define PUSH(REG) pushl REG; CFI_PUSH (REG)
# define POP(REG) popl REG; CFI_POP (REG)
-# ifndef STRCMP
-# define STRCMP __wcscmp_sse2
-# endif
-
# define ENTRANCE PUSH(%esi); PUSH(%edi)
# define RETURN POP(%edi); POP(%esi); ret; CFI_PUSH(%esi); CFI_PUSH(%edi);
# define PARMS 4
# define STR1 PARMS
# define STR2 STR1+4
+/* Note: wcscmp uses signed comparison, not unsugned as in strcmp function. */
+
.text
-ENTRY (STRCMP)
+ENTRY (__wcscmp_sse2)
/*
* This implementation uses SSE to compare up to 16 bytes at a time.
*/
@@ -264,20 +261,20 @@ L(continue_00_48):
test %ecx, %ecx
jnz L(less4_double_words1)
- sub (%esi), %eax
- jnz L(return)
+ cmp (%esi), %eax
+ jne L(nequal)
mov 4(%edi), %eax
- sub 4(%esi), %eax
- jnz L(return)
+ cmp 4(%esi), %eax
+ jne L(nequal)
mov 8(%edi), %eax
- sub 8(%esi), %eax
- jnz L(return)
+ cmp 8(%esi), %eax
+ jne L(nequal)
mov 12(%edi), %eax
- sub 12(%esi), %eax
- jnz L(return)
+ cmp 12(%esi), %eax
+ jne L(nequal)
movdqu 16(%esi), %xmm2
pcmpeqd %xmm2, %xmm0 /* Any null double_word? */
@@ -381,7 +378,7 @@ L(continue_32_48):
movdqu 48(%esi), %xmm2
pcmpeqd %xmm1, %xmm0 /* Any null double_word? */
pcmpeqd %xmm2, %xmm1 /* compare first 4 double_words for equality */
- psubb %xmm0, %xmm1 /* packed sub of comparison results*/
+ psubb %xmm0, %xmm1 /* packed sub of comparison results */
pmovmskb %xmm1, %edx
sub $0xffff, %edx /* if first 4 double_words are same, edx == 0xffff */
jnz L(less4_double_words_48)
@@ -585,20 +582,20 @@ L(continue_48_00):
test %ecx, %ecx
jnz L(less4_double_words1)
- sub (%esi), %eax
- jnz L(return)
+ cmp (%esi), %eax
+ jne L(nequal)
mov 4(%edi), %eax
- sub 4(%esi), %eax
- jnz L(return)
+ cmp 4(%esi), %eax
+ jne L(nequal)
mov 8(%edi), %eax
- sub 8(%esi), %eax
- jnz L(return)
+ cmp 8(%esi), %eax
+ jne L(nequal)
mov 12(%edi), %eax
- sub 12(%esi), %eax
- jnz L(return)
+ cmp 12(%esi), %eax
+ jne L(nequal)
movdqu 16(%edi), %xmm1
pcmpeqd %xmm1, %xmm0 /* Any null double_word? */
@@ -839,142 +836,161 @@ L(less4_double_words1):
test %ecx, %ecx
jz L(equal)
- mov 12(%esi), %edx
- mov 12(%edi), %eax
- sub %edx, %eax
+ mov 12(%esi), %ecx
+ cmp %ecx, 12(%edi)
+ jne L(nequal)
+ xor %eax, %eax
RETURN
.p2align 4
L(less4_double_words):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words)
and $15, %dl
jz L(second_double_word)
- mov (%edi), %eax
- sub (%esi), %eax
+ mov (%esi), %ecx
+ cmp %ecx, (%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(second_double_word):
- mov 4(%edi), %eax
- sub 4(%esi), %eax
+ mov 4(%esi), %ecx
+ cmp %ecx, 4(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(next_two_double_words):
and $15, %dh
jz L(fourth_double_word)
- mov 8(%edi), %eax
- sub 8(%esi), %eax
+ mov 8(%esi), %ecx
+ cmp %ecx, 8(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(fourth_double_word):
- mov 12(%edi), %eax
- sub 12(%esi), %eax
+ mov 12(%esi), %ecx
+ cmp %ecx, 12(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(less4_double_words_16):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words_16)
and $15, %dl
jz L(second_double_word_16)
- mov 16(%edi), %eax
- sub 16(%esi), %eax
+ mov 16(%esi), %ecx
+ cmp %ecx, 16(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(second_double_word_16):
- mov 20(%edi), %eax
- sub 20(%esi), %eax
+ mov 20(%esi), %ecx
+ cmp %ecx, 20(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(next_two_double_words_16):
and $15, %dh
jz L(fourth_double_word_16)
- mov 24(%edi), %eax
- sub 24(%esi), %eax
+ mov 24(%esi), %ecx
+ cmp %ecx, 24(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(fourth_double_word_16):
- mov 28(%edi), %eax
- sub 28(%esi), %eax
+ mov 28(%esi), %ecx
+ cmp %ecx, 28(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(less4_double_words_32):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words_32)
and $15, %dl
jz L(second_double_word_32)
- mov 32(%edi), %eax
- sub 32(%esi), %eax
+ mov 32(%esi), %ecx
+ cmp %ecx, 32(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(second_double_word_32):
- mov 36(%edi), %eax
- sub 36(%esi), %eax
+ mov 36(%esi), %ecx
+ cmp %ecx, 36(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(next_two_double_words_32):
and $15, %dh
jz L(fourth_double_word_32)
- mov 40(%edi), %eax
- sub 40(%esi), %eax
+ mov 40(%esi), %ecx
+ cmp %ecx, 40(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(fourth_double_word_32):
- mov 44(%edi), %eax
- sub 44(%esi), %eax
+ mov 44(%esi), %ecx
+ cmp %ecx, 44(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(less4_double_words_48):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words_48)
and $15, %dl
jz L(second_double_word_48)
- mov 48(%edi), %eax
- sub 48(%esi), %eax
+ mov 48(%esi), %ecx
+ cmp %ecx, 48(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(second_double_word_48):
- mov 52(%edi), %eax
- sub 52(%esi), %eax
+ mov 52(%esi), %ecx
+ cmp %ecx, 52(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(next_two_double_words_48):
and $15, %dh
jz L(fourth_double_word_48)
- mov 56(%edi), %eax
- sub 56(%esi), %eax
+ mov 56(%esi), %ecx
+ cmp %ecx, 56(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(fourth_double_word_48):
- mov 60(%edi), %eax
- sub 60(%esi), %eax
- RETURN
-
- .p2align 4
-L(return):
+ mov 60(%esi), %ecx
+ cmp %ecx, 60(%edi)
+ jne L(nequal)
RETURN
.p2align 4
L(nequal):
mov $1, %eax
- ja L(nequal_bigger)
+ jg L(return)
neg %eax
+ RETURN
-L(nequal_bigger):
+ .p2align 4
+L(return):
RETURN
.p2align 4
@@ -988,7 +1004,7 @@ L(equal):
.p2align 4
L(neq):
mov $1, %eax
- ja L(neq_bigger)
+ jg L(neq_bigger)
neg %eax
L(neq_bigger):
@@ -999,5 +1015,5 @@ L(eq):
xorl %eax, %eax
ret
-END (STRCMP)
+END (__wcscmp_sse2)
#endif
diff --git a/sysdeps/i386/i686/multiarch/wcscpy-c.c b/sysdeps/i386/i686/multiarch/wcscpy-c.c
new file mode 100644
index 0000000000..a3c4024c01
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcscpy-c.c
@@ -0,0 +1,5 @@
+#ifndef NOT_IN_libc
+# define wcscpy __wcscpy_ia32
+#endif
+
+#include "wcsmbs/wcscpy.c"
diff --git a/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
new file mode 100644
index 0000000000..abeea22266
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcscpy-ssse3.S
@@ -0,0 +1,601 @@
+/* wcscpy with SSSE3
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+# include <sysdep.h>
+
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+
+# define PARMS 4
+# define RETURN POP (%edi); ret; CFI_PUSH (%edi)
+# define STR1 PARMS
+# define STR2 STR1+4
+# define LEN STR2+4
+
+ atom_text_section
+ENTRY (__wcscpy_ssse3)
+ mov STR1(%esp), %edx
+ mov STR2(%esp), %ecx
+
+ cmp $0, (%ecx)
+ jz L(ExitTail4)
+ cmp $0, 4(%ecx)
+ jz L(ExitTail8)
+ cmp $0, 8(%ecx)
+ jz L(ExitTail12)
+ cmp $0, 12(%ecx)
+ jz L(ExitTail16)
+
+ PUSH (%edi)
+ mov %edx, %edi
+ PUSH (%esi)
+ lea 16(%ecx), %esi
+
+ and $-16, %esi
+
+ pxor %xmm0, %xmm0
+ pcmpeqd (%esi), %xmm0
+ movdqu (%ecx), %xmm1
+ movdqu %xmm1, (%edx)
+
+ pmovmskb %xmm0, %eax
+ sub %ecx, %esi
+
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ mov %edx, %eax
+ lea 16(%edx), %edx
+ and $-16, %edx
+ sub %edx, %eax
+
+ sub %eax, %ecx
+ mov %ecx, %eax
+ and $0xf, %eax
+ mov $0, %esi
+
+ jz L(Align16Both)
+ cmp $4, %eax
+ je L(Shl4)
+ cmp $8, %eax
+ je L(Shl8)
+ jmp L(Shl12)
+
+L(Align16Both):
+ movaps (%ecx), %xmm1
+ movaps 16(%ecx), %xmm2
+ movaps %xmm1, (%edx)
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %eax
+ lea 16(%esi), %esi
+
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%ecx, %esi), %xmm3
+ movaps %xmm2, (%edx, %esi)
+ pcmpeqd %xmm3, %xmm0
+ pmovmskb %xmm0, %eax
+ lea 16(%esi), %esi
+
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%ecx, %esi), %xmm4
+ movaps %xmm3, (%edx, %esi)
+ pcmpeqd %xmm4, %xmm0
+ pmovmskb %xmm0, %eax
+ lea 16(%esi), %esi
+
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%ecx, %esi), %xmm1
+ movaps %xmm4, (%edx, %esi)
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm0, %eax
+ lea 16(%esi), %esi
+
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%ecx, %esi), %xmm2
+ movaps %xmm1, (%edx, %esi)
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %eax
+ lea 16(%esi), %esi
+
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%ecx, %esi), %xmm3
+ movaps %xmm2, (%edx, %esi)
+ pcmpeqd %xmm3, %xmm0
+ pmovmskb %xmm0, %eax
+ lea 16(%esi), %esi
+
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps %xmm3, (%edx, %esi)
+ mov %ecx, %eax
+ lea 16(%ecx, %esi), %ecx
+ and $-0x40, %ecx
+ sub %ecx, %eax
+ sub %eax, %edx
+
+ mov $-0x40, %esi
+
+L(Aligned64Loop):
+ movaps (%ecx), %xmm2
+ movaps 32(%ecx), %xmm3
+ movaps %xmm2, %xmm4
+ movaps 16(%ecx), %xmm5
+ movaps %xmm3, %xmm6
+ movaps 48(%ecx), %xmm7
+ pminub %xmm5, %xmm2
+ pminub %xmm7, %xmm3
+ pminub %xmm2, %xmm3
+ lea 64(%edx), %edx
+ pcmpeqd %xmm0, %xmm3
+ lea 64(%ecx), %ecx
+ pmovmskb %xmm3, %eax
+
+ test %eax, %eax
+ jnz L(Aligned64Leave)
+ movaps %xmm4, -64(%edx)
+ movaps %xmm5, -48(%edx)
+ movaps %xmm6, -32(%edx)
+ movaps %xmm7, -16(%edx)
+ jmp L(Aligned64Loop)
+
+L(Aligned64Leave):
+ pcmpeqd %xmm4, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ jnz L(CopyFrom1To16Bytes)
+
+ pcmpeqd %xmm5, %xmm0
+ pmovmskb %xmm0, %eax
+ movaps %xmm4, -64(%edx)
+ test %eax, %eax
+ lea 16(%esi), %esi
+ jnz L(CopyFrom1To16Bytes)
+
+ pcmpeqd %xmm6, %xmm0
+ pmovmskb %xmm0, %eax
+ movaps %xmm5, -48(%edx)
+ test %eax, %eax
+ lea 16(%esi), %esi
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps %xmm6, -32(%edx)
+ pcmpeqd %xmm7, %xmm0
+ pmovmskb %xmm0, %eax
+ test %eax, %eax
+ lea 16(%esi), %esi
+ jnz L(CopyFrom1To16Bytes)
+
+ mov $-0x40, %esi
+ movaps %xmm7, -16(%edx)
+ jmp L(Aligned64Loop)
+
+ .p2align 4
+L(Shl4):
+ movaps -4(%ecx), %xmm1
+ movaps 12(%ecx), %xmm2
+L(Shl4Start):
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %eax
+ movaps %xmm2, %xmm3
+
+ test %eax, %eax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 28(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+ movaps %xmm2, %xmm1
+
+ test %eax, %eax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm3, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 28(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+ movaps %xmm2, %xmm3
+
+ test %eax, %eax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 28(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+
+ test %eax, %eax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm3, %xmm2
+ movaps %xmm2, (%edx)
+ lea 28(%ecx), %ecx
+ lea 16(%edx), %edx
+
+ mov %ecx, %eax
+ and $-0x40, %ecx
+ sub %ecx, %eax
+ lea -12(%ecx), %ecx
+ sub %eax, %edx
+
+ movaps -4(%ecx), %xmm1
+
+L(Shl4LoopStart):
+ movaps 12(%ecx), %xmm2
+ movaps 28(%ecx), %xmm3
+ movaps %xmm3, %xmm6
+ movaps 44(%ecx), %xmm4
+ movaps %xmm4, %xmm7
+ movaps 60(%ecx), %xmm5
+ pminub %xmm2, %xmm6
+ pminub %xmm5, %xmm7
+ pminub %xmm6, %xmm7
+ pcmpeqd %xmm0, %xmm7
+ pmovmskb %xmm7, %eax
+ movaps %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm5
+ test %eax, %eax
+ palignr $4, %xmm3, %xmm4
+ jnz L(Shl4Start)
+
+ palignr $4, %xmm2, %xmm3
+ lea 64(%ecx), %ecx
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm7, %xmm1
+ movaps %xmm5, 48(%edx)
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ jmp L(Shl4LoopStart)
+
+L(Shl4LoopExit):
+ movlpd (%ecx), %xmm0
+ movl 8(%ecx), %esi
+ movlpd %xmm0, (%edx)
+ movl %esi, 8(%edx)
+ POP (%esi)
+ add $12, %edx
+ add $12, %ecx
+ test %al, %al
+ jz L(ExitHigh)
+ test $0x01, %al
+ jnz L(Exit4)
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ movl %edi, %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(Shl8):
+ movaps -8(%ecx), %xmm1
+ movaps 8(%ecx), %xmm2
+L(Shl8Start):
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %eax
+ movaps %xmm2, %xmm3
+
+ test %eax, %eax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 24(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+ movaps %xmm2, %xmm1
+
+ test %eax, %eax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm3, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 24(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+ movaps %xmm2, %xmm3
+
+ test %eax, %eax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 24(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+
+ test %eax, %eax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm3, %xmm2
+ movaps %xmm2, (%edx)
+ lea 24(%ecx), %ecx
+ lea 16(%edx), %edx
+
+ mov %ecx, %eax
+ and $-0x40, %ecx
+ sub %ecx, %eax
+ lea -8(%ecx), %ecx
+ sub %eax, %edx
+
+ movaps -8(%ecx), %xmm1
+
+L(Shl8LoopStart):
+ movaps 8(%ecx), %xmm2
+ movaps 24(%ecx), %xmm3
+ movaps %xmm3, %xmm6
+ movaps 40(%ecx), %xmm4
+ movaps %xmm4, %xmm7
+ movaps 56(%ecx), %xmm5
+ pminub %xmm2, %xmm6
+ pminub %xmm5, %xmm7
+ pminub %xmm6, %xmm7
+ pcmpeqd %xmm0, %xmm7
+ pmovmskb %xmm7, %eax
+ movaps %xmm5, %xmm7
+ palignr $8, %xmm4, %xmm5
+ test %eax, %eax
+ palignr $8, %xmm3, %xmm4
+ jnz L(Shl8Start)
+
+ palignr $8, %xmm2, %xmm3
+ lea 64(%ecx), %ecx
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm7, %xmm1
+ movaps %xmm5, 48(%edx)
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ jmp L(Shl8LoopStart)
+
+L(Shl8LoopExit):
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ POP (%esi)
+ add $8, %edx
+ add $8, %ecx
+ test %al, %al
+ jz L(ExitHigh)
+ test $0x01, %al
+ jnz L(Exit4)
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ movl %edi, %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(Shl12):
+ movaps -12(%ecx), %xmm1
+ movaps 4(%ecx), %xmm2
+L(Shl12Start):
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %eax
+ movaps %xmm2, %xmm3
+
+ test %eax, %eax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 20(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+ movaps %xmm2, %xmm1
+
+ test %eax, %eax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm3, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 20(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+ movaps %xmm2, %xmm3
+
+ test %eax, %eax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm1, %xmm2
+ movaps %xmm2, (%edx)
+ movaps 20(%ecx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%edx), %edx
+ pmovmskb %xmm0, %eax
+ lea 16(%ecx), %ecx
+
+ test %eax, %eax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm3, %xmm2
+ movaps %xmm2, (%edx)
+ lea 20(%ecx), %ecx
+ lea 16(%edx), %edx
+
+ mov %ecx, %eax
+ and $-0x40, %ecx
+ sub %ecx, %eax
+ lea -4(%ecx), %ecx
+ sub %eax, %edx
+
+ movaps -12(%ecx), %xmm1
+
+L(Shl12LoopStart):
+ movaps 4(%ecx), %xmm2
+ movaps 20(%ecx), %xmm3
+ movaps %xmm3, %xmm6
+ movaps 36(%ecx), %xmm4
+ movaps %xmm4, %xmm7
+ movaps 52(%ecx), %xmm5
+ pminub %xmm2, %xmm6
+ pminub %xmm5, %xmm7
+ pminub %xmm6, %xmm7
+ pcmpeqd %xmm0, %xmm7
+ pmovmskb %xmm7, %eax
+ movaps %xmm5, %xmm7
+ palignr $12, %xmm4, %xmm5
+ test %eax, %eax
+ palignr $12, %xmm3, %xmm4
+ jnz L(Shl12Start)
+
+ palignr $12, %xmm2, %xmm3
+ lea 64(%ecx), %ecx
+ palignr $12, %xmm1, %xmm2
+ movaps %xmm7, %xmm1
+ movaps %xmm5, 48(%edx)
+ movaps %xmm4, 32(%edx)
+ movaps %xmm3, 16(%edx)
+ movaps %xmm2, (%edx)
+ lea 64(%edx), %edx
+ jmp L(Shl12LoopStart)
+
+L(Shl12LoopExit):
+ movl (%ecx), %esi
+ movl %esi, (%edx)
+ mov $4, %esi
+
+ .p2align 4
+L(CopyFrom1To16Bytes):
+ add %esi, %edx
+ add %esi, %ecx
+
+ POP (%esi)
+ test %al, %al
+ jz L(ExitHigh)
+ test $0x01, %al
+ jnz L(Exit4)
+L(Exit8):
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ movl %edi, %eax
+ RETURN
+
+ .p2align 4
+L(ExitHigh):
+ test $0x01, %ah
+ jnz L(Exit12)
+L(Exit16):
+ movdqu (%ecx), %xmm0
+ movdqu %xmm0, (%edx)
+ movl %edi, %eax
+ RETURN
+
+ .p2align 4
+L(Exit4):
+ movl (%ecx), %eax
+ movl %eax, (%edx)
+ movl %edi, %eax
+ RETURN
+
+ .p2align 4
+L(Exit12):
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ movl 8(%ecx), %eax
+ movl %eax, 8(%edx)
+ movl %edi, %eax
+ RETURN
+
+CFI_POP (%edi)
+
+ .p2align 4
+L(ExitTail4):
+ movl (%ecx), %eax
+ movl %eax, (%edx)
+ movl %edx, %eax
+ ret
+
+ .p2align 4
+L(ExitTail8):
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ movl %edx, %eax
+ ret
+
+ .p2align 4
+L(ExitTail12):
+ movlpd (%ecx), %xmm0
+ movlpd %xmm0, (%edx)
+ movl 8(%ecx), %eax
+ movl %eax, 8(%edx)
+ movl %edx, %eax
+ ret
+
+ .p2align 4
+L(ExitTail16):
+ movdqu (%ecx), %xmm0
+ movdqu %xmm0, (%edx)
+ movl %edx, %eax
+ ret
+
+END (__wcscpy_ssse3)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcscpy.S b/sysdeps/i386/i686/multiarch/wcscpy.S
new file mode 100644
index 0000000000..c7bafbe82a
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcscpy.S
@@ -0,0 +1,46 @@
+/* Multiple versions of wcscpy
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+/* Define multiple versions only for the definition in libc. */
+#ifndef NOT_IN_libc
+ .text
+ENTRY(wcscpy)
+ .type wcscpy, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __wcscpy_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __wcscpy_ssse3@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (ebx)
+ ret
+END(wcscpy)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcslen-c.c b/sysdeps/i386/i686/multiarch/wcslen-c.c
new file mode 100644
index 0000000000..8cebfea0e4
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcslen-c.c
@@ -0,0 +1,9 @@
+#include <wchar.h>
+
+#ifndef NOT_IN_libc
+# define WCSLEN __wcslen_ia32
+#endif
+
+extern __typeof (wcslen) __wcslen_ia32;
+
+#include "wcsmbs/wcslen.c"
diff --git a/sysdeps/i386/i686/multiarch/wcslen-sse2.S b/sysdeps/i386/i686/multiarch/wcslen-sse2.S
new file mode 100644
index 0000000000..d41d623098
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcslen-sse2.S
@@ -0,0 +1,194 @@
+/* wcslen with SSE2
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+# include <sysdep.h>
+# define STR 4
+
+ .text
+ENTRY (__wcslen_sse2)
+ mov STR(%esp), %edx
+
+ cmp $0, (%edx)
+ jz L(exit_tail0)
+ cmp $0, 4(%edx)
+ jz L(exit_tail1)
+ cmp $0, 8(%edx)
+ jz L(exit_tail2)
+ cmp $0, 12(%edx)
+ jz L(exit_tail3)
+ cmp $0, 16(%edx)
+ jz L(exit_tail4)
+ cmp $0, 20(%edx)
+ jz L(exit_tail5)
+ cmp $0, 24(%edx)
+ jz L(exit_tail6)
+ cmp $0, 28(%edx)
+ jz L(exit_tail7)
+
+ pxor %xmm0, %xmm0
+
+ lea 32(%edx), %eax
+ lea 16(%edx), %ecx
+ and $-16, %eax
+
+ pcmpeqd (%eax), %xmm0
+ pmovmskb %xmm0, %edx
+ pxor %xmm1, %xmm1
+ test %edx, %edx
+ lea 16(%eax), %eax
+ jnz L(exit)
+
+ pcmpeqd (%eax), %xmm1
+ pmovmskb %xmm1, %edx
+ pxor %xmm2, %xmm2
+ test %edx, %edx
+ lea 16(%eax), %eax
+ jnz L(exit)
+
+ pcmpeqd (%eax), %xmm2
+ pmovmskb %xmm2, %edx
+ pxor %xmm3, %xmm3
+ test %edx, %edx
+ lea 16(%eax), %eax
+ jnz L(exit)
+
+ pcmpeqd (%eax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%eax), %eax
+ jnz L(exit)
+
+ and $-0x40, %eax
+
+ .p2align 4
+L(aligned_64_loop):
+ movaps (%eax), %xmm0
+ movaps 16(%eax), %xmm1
+ movaps 32(%eax), %xmm2
+ movaps 48(%eax), %xmm6
+
+ pminub %xmm1, %xmm0
+ pminub %xmm6, %xmm2
+ pminub %xmm0, %xmm2
+ pcmpeqd %xmm3, %xmm2
+ pmovmskb %xmm2, %edx
+ test %edx, %edx
+ lea 64(%eax), %eax
+ jz L(aligned_64_loop)
+
+ pcmpeqd -64(%eax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 48(%ecx), %ecx
+ jnz L(exit)
+
+ pcmpeqd %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea -16(%ecx), %ecx
+ jnz L(exit)
+
+ pcmpeqd -32(%eax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea -16(%ecx), %ecx
+ jnz L(exit)
+
+ pcmpeqd %xmm6, %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea -16(%ecx), %ecx
+ jnz L(exit)
+
+ jmp L(aligned_64_loop)
+
+ .p2align 4
+L(exit):
+ sub %ecx, %eax
+ shr $2, %eax
+ test %dl, %dl
+ jz L(exit_high)
+
+ mov %dl, %cl
+ and $15, %cl
+ jz L(exit_1)
+ ret
+
+ .p2align 4
+L(exit_high):
+ mov %dh, %ch
+ and $15, %ch
+ jz L(exit_3)
+ add $2, %eax
+ ret
+
+ .p2align 4
+L(exit_1):
+ add $1, %eax
+ ret
+
+ .p2align 4
+L(exit_3):
+ add $3, %eax
+ ret
+
+ .p2align 4
+L(exit_tail0):
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+L(exit_tail1):
+ mov $1, %eax
+ ret
+
+ .p2align 4
+L(exit_tail2):
+ mov $2, %eax
+ ret
+
+ .p2align 4
+L(exit_tail3):
+ mov $3, %eax
+ ret
+
+ .p2align 4
+L(exit_tail4):
+ mov $4, %eax
+ ret
+
+ .p2align 4
+L(exit_tail5):
+ mov $5, %eax
+ ret
+
+ .p2align 4
+L(exit_tail6):
+ mov $6, %eax
+ ret
+
+ .p2align 4
+L(exit_tail7):
+ mov $7, %eax
+ ret
+
+END (__wcslen_sse2)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcslen.S b/sysdeps/i386/i686/multiarch/wcslen.S
new file mode 100644
index 0000000000..58670377e0
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcslen.S
@@ -0,0 +1,56 @@
+/* Multiple versions of wcslen
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+ .text
+ENTRY(__wcslen)
+ .type __wcslen, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __wcslen_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __wcslen_sse2@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4);
+ cfi_restore (ebx)
+ ret
+END(__wcslen)
+
+weak_alias(__wcslen, wcslen)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcsrchr-c.c b/sysdeps/i386/i686/multiarch/wcsrchr-c.c
new file mode 100644
index 0000000000..c7444ce89b
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcsrchr-c.c
@@ -0,0 +1,5 @@
+#ifndef NOT_IN_libc
+# define wcsrchr __wcsrchr_ia32
+#endif
+
+#include "wcsmbs/wcsrchr.c"
diff --git a/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S
new file mode 100644
index 0000000000..2859f7e9f3
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcsrchr-sse2.S
@@ -0,0 +1,355 @@
+/* wcsrchr with SSE2, without using bsf instructions.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+# include <sysdep.h>
+# define CFI_PUSH(REG) \
+ cfi_adjust_cfa_offset (4); \
+ cfi_rel_offset (REG, 0)
+
+# define CFI_POP(REG) \
+ cfi_adjust_cfa_offset (-4); \
+ cfi_restore (REG)
+
+# define PUSH(REG) pushl REG; CFI_PUSH (REG)
+# define POP(REG) popl REG; CFI_POP (REG)
+
+# define PARMS 8
+# define ENTRANCE PUSH (%edi);
+# define RETURN POP (%edi); ret; CFI_PUSH (%edi);
+# define STR1 PARMS
+# define STR2 STR1+4
+
+ atom_text_section
+ENTRY (__wcsrchr_sse2)
+
+ ENTRANCE
+ mov STR1(%esp), %ecx
+ movd STR2(%esp), %xmm1
+
+ mov %ecx, %edi
+ punpckldq %xmm1, %xmm1
+ pxor %xmm2, %xmm2
+ punpckldq %xmm1, %xmm1
+
+/* ECX has OFFSET. */
+ and $63, %ecx
+ cmp $48, %ecx
+ ja L(crosscache)
+
+/* unaligned string. */
+ movdqu (%edi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+/* Find where NULL is. */
+ pmovmskb %xmm2, %ecx
+/* Check if there is a match. */
+ pmovmskb %xmm0, %eax
+ add $16, %edi
+
+ test %eax, %eax
+ jnz L(unaligned_match1)
+
+ test %ecx, %ecx
+ jnz L(return_null)
+
+ and $-16, %edi
+
+ PUSH (%esi)
+
+ xor %edx, %edx
+ jmp L(loop)
+
+ CFI_POP (%esi)
+
+ .p2align 4
+L(unaligned_match1):
+ test %ecx, %ecx
+ jnz L(prolog_find_zero_1)
+
+ PUSH (%esi)
+
+/* Save current match */
+ mov %eax, %edx
+ mov %edi, %esi
+ and $-16, %edi
+ jmp L(loop)
+
+ CFI_POP (%esi)
+
+ .p2align 4
+L(crosscache):
+/* Hancle unaligned string. */
+ and $15, %ecx
+ and $-16, %edi
+ pxor %xmm3, %xmm3
+ movdqa (%edi), %xmm0
+ pcmpeqd %xmm0, %xmm3
+ pcmpeqd %xmm1, %xmm0
+/* Find where NULL is. */
+ pmovmskb %xmm3, %edx
+/* Check if there is a match. */
+ pmovmskb %xmm0, %eax
+/* Remove the leading bytes. */
+ shr %cl, %edx
+ shr %cl, %eax
+ add $16, %edi
+
+ test %eax, %eax
+ jnz L(unaligned_match)
+
+ test %edx, %edx
+ jnz L(return_null)
+
+ PUSH (%esi)
+
+ xor %edx, %edx
+ jmp L(loop)
+
+ CFI_POP (%esi)
+
+ .p2align 4
+L(unaligned_match):
+ test %edx, %edx
+ jnz L(prolog_find_zero)
+
+ PUSH (%esi)
+
+ mov %eax, %edx
+ lea (%edi, %ecx), %esi
+
+/* Loop start on aligned string. */
+ .p2align 4
+L(loop):
+ movdqa (%edi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %edi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %ecx
+ pmovmskb %xmm0, %eax
+ or %eax, %ecx
+ jnz L(matches)
+
+ movdqa (%edi), %xmm3
+ pcmpeqd %xmm3, %xmm2
+ add $16, %edi
+ pcmpeqd %xmm1, %xmm3
+ pmovmskb %xmm2, %ecx
+ pmovmskb %xmm3, %eax
+ or %eax, %ecx
+ jnz L(matches)
+
+ movdqa (%edi), %xmm4
+ pcmpeqd %xmm4, %xmm2
+ add $16, %edi
+ pcmpeqd %xmm1, %xmm4
+ pmovmskb %xmm2, %ecx
+ pmovmskb %xmm4, %eax
+ or %eax, %ecx
+ jnz L(matches)
+
+ movdqa (%edi), %xmm5
+ pcmpeqd %xmm5, %xmm2
+ add $16, %edi
+ pcmpeqd %xmm1, %xmm5
+ pmovmskb %xmm2, %ecx
+ pmovmskb %xmm5, %eax
+ or %eax, %ecx
+ jz L(loop)
+
+ .p2align 4
+L(matches):
+ test %eax, %eax
+ jnz L(match)
+L(return_value):
+ test %edx, %edx
+ jz L(return_null_1)
+ mov %edx, %eax
+ mov %esi, %edi
+
+ POP (%esi)
+
+ test %ah, %ah
+ jnz L(match_third_or_fourth_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%edi), %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(return_null_1):
+ POP (%esi)
+
+ xor %eax, %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(match):
+ pmovmskb %xmm2, %ecx
+ test %ecx, %ecx
+ jnz L(find_zero)
+/* save match info */
+ mov %eax, %edx
+ mov %edi, %esi
+ jmp L(loop)
+
+ .p2align 4
+L(find_zero):
+ test %cl, %cl
+ jz L(find_zero_in_third_or_fourth_wchar)
+ test $15, %cl
+ jz L(find_zero_in_second_wchar)
+ and $1, %eax
+ jz L(return_value)
+
+ POP (%esi)
+
+ lea -16(%edi), %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(find_zero_in_second_wchar):
+ and $1 << 5 - 1, %eax
+ jz L(return_value)
+
+ POP (%esi)
+
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%edi), %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(find_zero_in_third_or_fourth_wchar):
+ test $15, %ch
+ jz L(find_zero_in_fourth_wchar)
+ and $1 << 9 - 1, %eax
+ jz L(return_value)
+
+ POP (%esi)
+
+ test %ah, %ah
+ jnz L(match_third_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%edi), %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(find_zero_in_fourth_wchar):
+
+ POP (%esi)
+
+ test %ah, %ah
+ jnz L(match_third_or_fourth_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%edi), %eax
+ RETURN
+
+ CFI_PUSH (%esi)
+
+ .p2align 4
+L(match_second_wchar):
+ lea -12(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(match_third_or_fourth_wchar):
+ test $15 << 4, %ah
+ jnz L(match_fourth_wchar)
+ lea -8(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(match_third_wchar):
+ lea -8(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(match_fourth_wchar):
+ lea -4(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(return_null):
+ xor %eax, %eax
+ RETURN
+
+ .p2align 4
+L(prolog_find_zero):
+ add %ecx, %edi
+ mov %edx, %ecx
+L(prolog_find_zero_1):
+ test %cl, %cl
+ jz L(prolog_find_zero_in_third_or_fourth_wchar)
+ test $15, %cl
+ jz L(prolog_find_zero_in_second_wchar)
+ and $1, %eax
+ jz L(return_null)
+
+ lea -16(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(prolog_find_zero_in_second_wchar):
+ and $1 << 5 - 1, %eax
+ jz L(return_null)
+
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(prolog_find_zero_in_third_or_fourth_wchar):
+ test $15, %ch
+ jz L(prolog_find_zero_in_fourth_wchar)
+ and $1 << 9 - 1, %eax
+ jz L(return_null)
+
+ test %ah, %ah
+ jnz L(match_third_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%edi), %eax
+ RETURN
+
+ .p2align 4
+L(prolog_find_zero_in_fourth_wchar):
+ test %ah, %ah
+ jnz L(match_third_or_fourth_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%edi), %eax
+ RETURN
+
+END (__wcsrchr_sse2)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wcsrchr.S b/sysdeps/i386/i686/multiarch/wcsrchr.S
new file mode 100644
index 0000000000..8240063dd6
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wcsrchr.S
@@ -0,0 +1,54 @@
+/* Multiple versions of wcsrchr
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+__i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+ .text
+ENTRY(wcsrchr)
+ .type wcsrchr, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __wcsrchr_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSE2, CPUID_OFFSET+index_SSE2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __wcsrchr_sse2@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4);
+ cfi_restore (ebx)
+ ret
+END(wcsrchr)
+#endif
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp-c.c b/sysdeps/i386/i686/multiarch/wmemcmp-c.c
new file mode 100644
index 0000000000..bd37660fcb
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wmemcmp-c.c
@@ -0,0 +1,9 @@
+#include <wchar.h>
+
+#ifndef NOT_IN_libc
+# define WMEMCMP __wmemcmp_ia32
+#endif
+
+extern __typeof (wmemcmp) __wmemcmp_ia32;
+
+#include "wcsmbs/wmemcmp.c"
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp-sse4.S b/sysdeps/i386/i686/multiarch/wmemcmp-sse4.S
new file mode 100644
index 0000000000..1a857c7e21
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wmemcmp-sse4.S
@@ -0,0 +1,4 @@
+#define USE_AS_WMEMCMP 1
+#define MEMCMP __wmemcmp_sse4_2
+
+#include "memcmp-sse4.S"
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp-ssse3.S b/sysdeps/i386/i686/multiarch/wmemcmp-ssse3.S
new file mode 100644
index 0000000000..a41ef95fc1
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wmemcmp-ssse3.S
@@ -0,0 +1,4 @@
+#define USE_AS_WMEMCMP 1
+#define MEMCMP __wmemcmp_ssse3
+
+#include "memcmp-ssse3.S"
diff --git a/sysdeps/i386/i686/multiarch/wmemcmp.S b/sysdeps/i386/i686/multiarch/wmemcmp.S
new file mode 100644
index 0000000000..5080c14ea7
--- /dev/null
+++ b/sysdeps/i386/i686/multiarch/wmemcmp.S
@@ -0,0 +1,59 @@
+/* Multiple versions of wmemcmp
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+/* Define multiple versions only for the definition in libc. */
+
+#ifndef NOT_IN_libc
+ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
+ .globl __i686.get_pc_thunk.bx
+ .hidden __i686.get_pc_thunk.bx
+ .p2align 4
+ .type __i686.get_pc_thunk.bx,@function
+ __i686.get_pc_thunk.bx:
+ movl (%esp), %ebx
+ ret
+
+ .text
+ENTRY(wmemcmp)
+ .type wmemcmp, @gnu_indirect_function
+ pushl %ebx
+ cfi_adjust_cfa_offset (4)
+ cfi_rel_offset (ebx, 0)
+ call __i686.get_pc_thunk.bx
+ addl $_GLOBAL_OFFSET_TABLE_, %ebx
+ cmpl $0, KIND_OFFSET+__cpu_features@GOTOFF(%ebx)
+ jne 1f
+ call __init_cpu_features
+1: leal __wmemcmp_ia32@GOTOFF(%ebx), %eax
+ testl $bit_SSSE3, CPUID_OFFSET+index_SSSE3+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __wmemcmp_ssse3@GOTOFF(%ebx), %eax
+ testl $bit_SSE4_2, CPUID_OFFSET+index_SSE4_2+__cpu_features@GOTOFF(%ebx)
+ jz 2f
+ leal __wmemcmp_sse4_2@GOTOFF(%ebx), %eax
+2: popl %ebx
+ cfi_adjust_cfa_offset (-4)
+ cfi_restore (ebx)
+ ret
+END(wmemcmp)
+#endif
diff --git a/sysdeps/i386/init-first.c b/sysdeps/i386/init-first.c
index 2af042fe4b..a8970cf53f 100644
--- a/sysdeps/i386/init-first.c
+++ b/sysdeps/i386/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For i386/Unix.
- Copyright (C) 1995,1996,1997,2000,2001,2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <ctype.h>
#include <unistd.h>
extern void __libc_init (int, char **, char **);
@@ -41,6 +42,9 @@ init (int *data)
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
#endif
+
+ /* Initialize ctype data. */
+ __ctype_init ();
}
#ifdef SHARED
diff --git a/sysdeps/ia64/bits/byteswap.h b/sysdeps/ia64/bits/byteswap.h
index d64914f36e..29d0e37d12 100644
--- a/sysdeps/ia64/bits/byteswap.h
+++ b/sysdeps/ia64/bits/byteswap.h
@@ -1,5 +1,6 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997,1998,2000,2002,2003,2008 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2002,2003,2008,2011
+ 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
@@ -77,17 +78,17 @@ __bswap_32 (unsigned int __bsx)
/* Swap bytes in 64 bit value. */
-#define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ul) >> 56) \
- | (((x) & 0x00ff000000000000ul) >> 40) \
- | (((x) & 0x0000ff0000000000ul) >> 24) \
- | (((x) & 0x000000ff00000000ul) >> 8) \
- | (((x) & 0x00000000ff000000ul) << 8) \
- | (((x) & 0x0000000000ff0000ul) << 24) \
- | (((x) & 0x000000000000ff00ul) << 40) \
- | (((x) & 0x00000000000000fful) << 56))
-
#if defined __GNUC__ && __GNUC__ >= 2
+# define __bswap_constant_64(x) \
+ (__extension__ ((((x) & 0xff00000000000000ul) >> 56) \
+ | (((x) & 0x00ff000000000000ul) >> 40) \
+ | (((x) & 0x0000ff0000000000ul) >> 24) \
+ | (((x) & 0x000000ff00000000ul) >> 8) \
+ | (((x) & 0x00000000ff000000ul) << 8) \
+ | (((x) & 0x0000000000ff0000ul) << 24) \
+ | (((x) & 0x000000000000ff00ul) << 40) \
+ | (((x) & 0x00000000000000fful) << 56)))
+
# define __bswap_64(x) \
(__extension__ \
({ register unsigned long int __v, __x = (x); \
@@ -97,9 +98,19 @@ __bswap_32 (unsigned int __bsx)
__asm__ __volatile__ ("mux1 %0 = %1, @rev ;;" \
: "=r" (__v) \
: "r" ((unsigned long int) (__x))); \
- __v; }))
+ __v; }))
#else
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ul) >> 56) \
+ | (((x) & 0x00ff000000000000ul) >> 40) \
+ | (((x) & 0x0000ff0000000000ul) >> 24) \
+ | (((x) & 0x000000ff00000000ul) >> 8) \
+ | (((x) & 0x00000000ff000000ul) << 8) \
+ | (((x) & 0x0000000000ff0000ul) << 24) \
+ | (((x) & 0x000000000000ff00ul) << 40) \
+ | (((x) & 0x00000000000000fful) << 56))
+
static __inline unsigned long int
__bswap_64 (unsigned long int __bsx)
{
diff --git a/sysdeps/ia64/fpu/bits/math-finite.h b/sysdeps/ia64/fpu/bits/math-finite.h
new file mode 100644
index 0000000000..8901b2dc4d
--- /dev/null
+++ b/sysdeps/ia64/fpu/bits/math-finite.h
@@ -0,0 +1,25 @@
+/* Entry points to finite-math-only compiler runs.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _MATH_H
+# error "Never use <bits/math-finite.h> directly; include <math.h> instead."
+#endif
+
+/* Nothing can be done for IA-64 since the math functions differ in their
+ structure. */
diff --git a/sysdeps/ieee754/dbl-64/branred.c b/sysdeps/ieee754/dbl-64/branred.c
index 76015f0c5c..c8483034af 100644
--- a/sysdeps/ieee754/dbl-64/branred.c
+++ b/sysdeps/ieee754/dbl-64/branred.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -38,6 +38,10 @@
#include "branred.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
/*******************************************************************/
/* Routine branred() performs range reduction of a double number */
@@ -45,7 +49,9 @@
/* x=n*pi/2+(a+aa), abs(a+aa)<pi/4, n=0,+-1,+-2,.... */
/* Routine return integer (n mod 4) */
/*******************************************************************/
-int __branred(double x, double *a, double *aa)
+int
+SECTION
+__branred(double x, double *a, double *aa)
{
int i,k;
#if 0
diff --git a/sysdeps/ieee754/dbl-64/dla.h b/sysdeps/ieee754/dbl-64/dla.h
index bf73fa902e..cb12dbc8fb 100644
--- a/sysdeps/ieee754/dbl-64/dla.h
+++ b/sysdeps/ieee754/dbl-64/dla.h
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -44,7 +44,7 @@
/* z+zz = x+y exactly. */
#define EADD(x,y,z,zz) \
- z=(x)+(y); zz=(ABS(x)>ABS(y)) ? (((x)-(z))+(y)) : (((y)-(z))+(x));
+ z=(x)+(y); zz=(ABS(x)>ABS(y)) ? (((x)-(z))+(y)) : (((y)-(z))+(x));
/* Exact subtraction of two single-length floating point numbers, Dekker. */
@@ -52,7 +52,7 @@
/* z+zz = x-y exactly. */
#define ESUB(x,y,z,zz) \
- z=(x)-(y); zz=(ABS(x)>ABS(y)) ? (((x)-(z))-(y)) : ((x)-((y)+(z)));
+ z=(x)-(y); zz=(ABS(x)>ABS(y)) ? (((x)-(z))-(y)) : ((x)-((y)+(z)));
/* Exact multiplication of two single-length floating point numbers, */
@@ -60,10 +60,15 @@
/* satisfies z+zz = x*y exactly. p,hx,tx,hy,ty are temporary */
/* storage variables of type double. */
-#define EMULV(x,y,z,zz,p,hx,tx,hy,ty) \
- p=CN*(x); hx=((x)-p)+p; tx=(x)-hx; \
- p=CN*(y); hy=((y)-p)+p; ty=(y)-hy; \
- z=(x)*(y); zz=(((hx*hy-z)+hx*ty)+tx*hy)+tx*ty;
+#ifdef DLA_FMS
+# define EMULV(x,y,z,zz,p,hx,tx,hy,ty) \
+ z=x*y; zz=DLA_FMS(x,y,z);
+#else
+# define EMULV(x,y,z,zz,p,hx,tx,hy,ty) \
+ p=CN*(x); hx=((x)-p)+p; tx=(x)-hx; \
+ p=CN*(y); hy=((y)-p)+p; ty=(y)-hy; \
+ z=(x)*(y); zz=(((hx*hy-z)+hx*ty)+tx*hy)+tx*ty;
+#endif
/* Exact multiplication of two single-length floating point numbers, Dekker. */
@@ -71,10 +76,15 @@
/* that satisfies z+zz = x*y exactly. p,hx,tx,hy,ty,q are temporary */
/* storage variables of type double. */
-#define MUL12(x,y,z,zz,p,hx,tx,hy,ty,q) \
- p=CN*(x); hx=((x)-p)+p; tx=(x)-hx; \
- p=CN*(y); hy=((y)-p)+p; ty=(y)-hy; \
- p=hx*hy; q=hx*ty+tx*hy; z=p+q; zz=((p-z)+q)+tx*ty;
+#ifdef DLA_FMS
+# define MUL12(x,y,z,zz,p,hx,tx,hy,ty,q) \
+ EMULV(x,y,z,zz,p,hx,tx,hy,ty)
+#else
+# define MUL12(x,y,z,zz,p,hx,tx,hy,ty,q) \
+ p=CN*(x); hx=((x)-p)+p; tx=(x)-hx; \
+ p=CN*(y); hy=((y)-p)+p; ty=(y)-hy; \
+ p=hx*hy; q=hx*ty+tx*hy; z=p+q; zz=((p-z)+q)+tx*ty;
+#endif
/* Double-length addition, Dekker. The macro produces a double-length */
@@ -84,10 +94,10 @@
/* storage variables of type double. */
#define ADD2(x,xx,y,yy,z,zz,r,s) \
- r=(x)+(y); s=(ABS(x)>ABS(y)) ? \
- (((((x)-r)+(y))+(yy))+(xx)) : \
- (((((y)-r)+(x))+(xx))+(yy)); \
- z=r+s; zz=(r-z)+s;
+ r=(x)+(y); s=(ABS(x)>ABS(y)) ? \
+ (((((x)-r)+(y))+(yy))+(xx)) : \
+ (((((y)-r)+(x))+(xx))+(yy)); \
+ z=r+s; zz=(r-z)+s;
/* Double-length subtraction, Dekker. The macro produces a double-length */
@@ -97,10 +107,10 @@
/* storage variables of type double. */
#define SUB2(x,xx,y,yy,z,zz,r,s) \
- r=(x)-(y); s=(ABS(x)>ABS(y)) ? \
- (((((x)-r)-(y))-(yy))+(xx)) : \
- ((((x)-((y)+r))+(xx))-(yy)); \
- z=r+s; zz=(r-z)+s;
+ r=(x)-(y); s=(ABS(x)>ABS(y)) ? \
+ (((((x)-r)-(y))-(yy))+(xx)) : \
+ ((((x)-((y)+r))+(xx))-(yy)); \
+ z=r+s; zz=(r-z)+s;
/* Double-length multiplication, Dekker. The macro produces a double-length */
@@ -110,8 +120,8 @@
/* temporary storage variables of type double. */
#define MUL2(x,xx,y,yy,z,zz,p,hx,tx,hy,ty,q,c,cc) \
- MUL12(x,y,c,cc,p,hx,tx,hy,ty,q) \
- cc=((x)*(yy)+(xx)*(y))+cc; z=c+cc; zz=(c-z)+cc;
+ MUL12(x,y,c,cc,p,hx,tx,hy,ty,q) \
+ cc=((x)*(yy)+(xx)*(y))+cc; z=c+cc; zz=(c-z)+cc;
/* Double-length division, Dekker. The macro produces a double-length */
@@ -121,8 +131,8 @@
/* are temporary storage variables of type double. */
#define DIV2(x,xx,y,yy,z,zz,p,hx,tx,hy,ty,q,c,cc,u,uu) \
- c=(x)/(y); MUL12(c,y,u,uu,p,hx,tx,hy,ty,q) \
- cc=(((((x)-u)-uu)+(xx))-c*(yy))/(y); z=c+cc; zz=(c-z)+cc;
+ c=(x)/(y); MUL12(c,y,u,uu,p,hx,tx,hy,ty,q) \
+ cc=(((((x)-u)-uu)+(xx))-c*(yy))/(y); z=c+cc; zz=(c-z)+cc;
/* Double-length addition, slower but more accurate than ADD2. */
@@ -133,17 +143,17 @@
/* are temporary storage variables of type double. */
#define ADD2A(x,xx,y,yy,z,zz,r,rr,s,ss,u,uu,w) \
- r=(x)+(y); \
- if (ABS(x)>ABS(y)) { rr=((x)-r)+(y); s=(rr+(yy))+(xx); } \
- else { rr=((y)-r)+(x); s=(rr+(xx))+(yy); } \
- if (rr!=0.0) { \
- z=r+s; zz=(r-z)+s; } \
- else { \
- ss=(ABS(xx)>ABS(yy)) ? (((xx)-s)+(yy)) : (((yy)-s)+(xx)); \
- u=r+s; \
- uu=(ABS(r)>ABS(s)) ? ((r-u)+s) : ((s-u)+r) ; \
- w=uu+ss; z=u+w; \
- zz=(ABS(u)>ABS(w)) ? ((u-z)+w) : ((w-z)+u) ; }
+ r=(x)+(y); \
+ if (ABS(x)>ABS(y)) { rr=((x)-r)+(y); s=(rr+(yy))+(xx); } \
+ else { rr=((y)-r)+(x); s=(rr+(xx))+(yy); } \
+ if (rr!=0.0) { \
+ z=r+s; zz=(r-z)+s; } \
+ else { \
+ ss=(ABS(xx)>ABS(yy)) ? (((xx)-s)+(yy)) : (((yy)-s)+(xx)); \
+ u=r+s; \
+ uu=(ABS(r)>ABS(s)) ? ((r-u)+s) : ((s-u)+r) ; \
+ w=uu+ss; z=u+w; \
+ zz=(ABS(u)>ABS(w)) ? ((u-z)+w) : ((w-z)+u) ; }
/* Double-length subtraction, slower but more accurate than SUB2. */
@@ -154,21 +164,14 @@
/* are temporary storage variables of type double. */
#define SUB2A(x,xx,y,yy,z,zz,r,rr,s,ss,u,uu,w) \
- r=(x)-(y); \
- if (ABS(x)>ABS(y)) { rr=((x)-r)-(y); s=(rr-(yy))+(xx); } \
- else { rr=(x)-((y)+r); s=(rr+(xx))-(yy); } \
- if (rr!=0.0) { \
- z=r+s; zz=(r-z)+s; } \
- else { \
- ss=(ABS(xx)>ABS(yy)) ? (((xx)-s)-(yy)) : ((xx)-((yy)+s)); \
- u=r+s; \
- uu=(ABS(r)>ABS(s)) ? ((r-u)+s) : ((s-u)+r) ; \
- w=uu+ss; z=u+w; \
- zz=(ABS(u)>ABS(w)) ? ((u-z)+w) : ((w-z)+u) ; }
-
-
-
-
-
-
-
+ r=(x)-(y); \
+ if (ABS(x)>ABS(y)) { rr=((x)-r)-(y); s=(rr-(yy))+(xx); } \
+ else { rr=(x)-((y)+r); s=(rr+(xx))-(yy); } \
+ if (rr!=0.0) { \
+ z=r+s; zz=(r-z)+s; } \
+ else { \
+ ss=(ABS(xx)>ABS(yy)) ? (((xx)-s)-(yy)) : ((xx)-((yy)+s)); \
+ u=r+s; \
+ uu=(ABS(r)>ABS(s)) ? ((r-u)+s) : ((s-u)+r) ; \
+ w=uu+ss; z=u+w; \
+ zz=(ABS(u)>ABS(w)) ? ((u-z)+w) : ((w-z)+u) ; }
diff --git a/sysdeps/ieee754/dbl-64/doasin.c b/sysdeps/ieee754/dbl-64/doasin.c
index 79f344af2d..14958b5ca2 100644
--- a/sysdeps/ieee754/dbl-64/doasin.c
+++ b/sysdeps/ieee754/dbl-64/doasin.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -31,14 +31,20 @@
#include "endian.h"
#include "mydefs.h"
-#include "dla.h"
+#include <dla.h>
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
/********************************************************************/
/* Compute arcsin(x,dx,v) of double-length number (x+dx) the result */
/* stored in v where v= v[0]+v[1] =arcsin(x+dx) */
/********************************************************************/
-void __doasin(double x, double dx, double v[]) {
+void
+SECTION
+__doasin(double x, double dx, double v[]) {
#include "doasin.h"
@@ -52,7 +58,10 @@ void __doasin(double x, double dx, double v[]) {
d11 = 0.79470250400727425881446981833568758E-02;
double xx,p,pp,u,uu,r,s;
- double hx,tx,hy,ty,tp,tq,tc,tcc;
+ double tc,tcc;
+#ifndef DLA_FMS
+ double hx,tx,hy,ty,tp,tq;
+#endif
/* Taylor series for arcsin for Double-Length numbers */
diff --git a/sysdeps/ieee754/dbl-64/dosincos.c b/sysdeps/ieee754/dbl-64/dosincos.c
index 1d347a4bc7..e8890ff8de 100644
--- a/sysdeps/ieee754/dbl-64/dosincos.c
+++ b/sysdeps/ieee754/dbl-64/dosincos.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -35,11 +35,20 @@
#include "endian.h"
#include "mydefs.h"
-#include "sincos.tbl"
-#include "dla.h"
+#include <dla.h>
#include "dosincos.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
+extern const union
+{
+ int4 i[880];
+ double x[440];
+} __sincostab attribute_hidden;
+
/***********************************************************************/
/* Routine receive Double-Length number (x+dx) and computing sin(x+dx) */
/* as Double-Length number and store it at array v .It computes it by */
@@ -47,9 +56,14 @@
/*(x+dx) between 0 and PI/4 */
/***********************************************************************/
-void __dubsin(double x, double dx, double v[]) {
- double r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
+void
+SECTION
+__dubsin(double x, double dx, double v[]) {
+ double r,s,c,cc,d,dd,d2,dd2,e,ee,
sn,ssn,cs,ccs,ds,dss,dc,dcc;
+#ifndef DLA_FMS
+ double p,hx,tx,hy,ty,q;
+#endif
#if 0
double xx,y,yy,z,zz;
#endif
@@ -61,12 +75,12 @@ void __dubsin(double x, double dx, double v[]) {
x=x-(u.x-big.x);
d=x+dx;
dd=(x-d)+dx;
- /* sin(x+dx)=sin(Xi+t)=sin(Xi)*cos(t) + cos(Xi)sin(t) where t ->0 */
+ /* sin(x+dx)=sin(Xi+t)=sin(Xi)*cos(t) + cos(Xi)sin(t) where t ->0 */
MUL2(d,dd,d,dd,d2,dd2,p,hx,tx,hy,ty,q,c,cc);
- sn=sincos.x[k]; /* */
- ssn=sincos.x[k+1]; /* sin(Xi) and cos(Xi) */
- cs=sincos.x[k+2]; /* */
- ccs=sincos.x[k+3]; /* */
+ sn=__sincostab.x[k]; /* */
+ ssn=__sincostab.x[k+1]; /* sin(Xi) and cos(Xi) */
+ cs=__sincostab.x[k+2]; /* */
+ ccs=__sincostab.x[k+3]; /* */
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* Taylor */
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc); /* series */
@@ -98,9 +112,14 @@ void __dubsin(double x, double dx, double v[]) {
/*(x+dx) between 0 and PI/4 */
/**********************************************************************/
-void __dubcos(double x, double dx, double v[]) {
- double r,s,p,hx,tx,hy,ty,q,c,cc,d,dd,d2,dd2,e,ee,
+void
+SECTION
+__dubcos(double x, double dx, double v[]) {
+ double r,s,c,cc,d,dd,d2,dd2,e,ee,
sn,ssn,cs,ccs,ds,dss,dc,dcc;
+#ifndef DLA_FMS
+ double p,hx,tx,hy,ty,q;
+#endif
#if 0
double xx,y,yy,z,zz;
#endif
@@ -112,10 +131,10 @@ void __dubcos(double x, double dx, double v[]) {
d=x+dx;
dd=(x-d)+dx; /* cos(x+dx)=cos(Xi+t)=cos(Xi)cos(t) - sin(Xi)sin(t) */
MUL2(d,dd,d,dd,d2,dd2,p,hx,tx,hy,ty,q,c,cc);
- sn=sincos.x[k]; /* */
- ssn=sincos.x[k+1]; /* sin(Xi) and cos(Xi) */
- cs=sincos.x[k+2]; /* */
- ccs=sincos.x[k+3]; /* */
+ sn=__sincostab.x[k]; /* */
+ ssn=__sincostab.x[k+1]; /* sin(Xi) and cos(Xi) */
+ cs=__sincostab.x[k+2]; /* */
+ ccs=__sincostab.x[k+3]; /* */
MUL2(d2,dd2,s7.x,ss7.x,ds,dss,p,hx,tx,hy,ty,q,c,cc);
ADD2(ds,dss,s5.x,ss5.x,ds,dss,r,s);
MUL2(d2,dd2,ds,dss,ds,dss,p,hx,tx,hy,ty,q,c,cc);
@@ -161,20 +180,22 @@ void __dubcos(double x, double dx, double v[]) {
/* Routine receive Double-Length number (x+dx) and computes cos(x+dx) */
/* as Double-Length number and store it in array v */
/**********************************************************************/
-void __docos(double x, double dx, double v[]) {
+void
+SECTION
+__docos(double x, double dx, double v[]) {
double y,yy,p,w[2];
if (x>0) {y=x; yy=dx;}
else {y=-x; yy=-dx;}
if (y<0.5*hp0.x) /* y< PI/4 */
- {__dubcos(y,yy,w); v[0]=w[0]; v[1]=w[1];}
+ {__dubcos(y,yy,w); v[0]=w[0]; v[1]=w[1];}
else if (y<1.5*hp0.x) { /* y< 3/4 * PI */
p=hp0.x-y; /* p = PI/2 - y */
yy=hp1.x-yy;
y=p+yy;
yy=(p-y)+yy;
if (y>0) {__dubsin(y,yy,w); v[0]=w[0]; v[1]=w[1];}
- /* cos(x) = sin ( 90 - x ) */
- else {__dubsin(-y,-yy,w); v[0]=-w[0]; v[1]=-w[1];
+ /* cos(x) = sin ( 90 - x ) */
+ else {__dubsin(-y,-yy,w); v[0]=-w[0]; v[1]=-w[1];
}
}
else { /* y>= 3/4 * PI */
diff --git a/sysdeps/ieee754/dbl-64/e_acosh.c b/sysdeps/ieee754/dbl-64/e_acosh.c
index 27c29cd8c9..6ef10cb84b 100644
--- a/sysdeps/ieee754/dbl-64/e_acosh.c
+++ b/sysdeps/ieee754/dbl-64/e_acosh.c
@@ -5,18 +5,14 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $";
-#endif
-
/* __ieee754_acosh(x)
* Method :
- * Based on
+ * Based on
* acosh(x) = log [ x + sqrt(x*x-1) ]
* we have
* acosh(x) := log(x)+ln2, if x is large; else
@@ -31,21 +27,13 @@ static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
+static const double
one = 1.0,
ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
-#ifdef __STDC__
- double __ieee754_acosh(double x)
-#else
- double __ieee754_acosh(x)
- double x;
-#endif
-{
+double
+__ieee754_acosh(double x)
+{
double t;
int32_t hx;
u_int32_t lx;
@@ -54,8 +42,8 @@ ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
return (x-x)/(x-x);
} else if(hx >=0x41b00000) { /* x > 2**28 */
if(hx >=0x7ff00000) { /* x is inf of NaN */
- return x+x;
- } else
+ return x+x;
+ } else
return __ieee754_log(x)+ln2; /* acosh(huge)=log(2x) */
} else if(((hx-0x3ff00000)|lx)==0) {
return 0.0; /* acosh(1) = 0 */
@@ -64,6 +52,7 @@ ln2 = 6.93147180559945286227e-01; /* 0x3FE62E42, 0xFEFA39EF */
return __ieee754_log(2.0*x-one/(x+__ieee754_sqrt(t-one)));
} else { /* 1<x<2 */
t = x-one;
- return __log1p(t+__sqrt(2.0*t+t*t));
+ return __log1p(t+__ieee754_sqrt(2.0*t+t*t));
}
}
+strong_alias (__ieee754_acosh, __acosh_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_asin.c b/sysdeps/ieee754/dbl-64/e_asin.c
index ce5d227b71..65319c0b58 100644
--- a/sysdeps/ieee754/dbl-64/e_asin.c
+++ b/sysdeps/ieee754/dbl-64/e_asin.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -42,6 +42,10 @@
#include "uasncs.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
void __doasin(double x, double dx, double w[]);
void __dubsin(double x, double dx, double v[]);
void __dubcos(double x, double dx, double v[]);
@@ -53,7 +57,9 @@ double __cos32(double x, double res, double res1);
/* An ultimate asin routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of arcsin(x) */
/***************************************************************************/
-double __ieee754_asin(double x){
+double
+SECTION
+__ieee754_asin(double x){
double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2];
mynumber u,v;
int4 k,m,n;
@@ -209,9 +215,9 @@ double __ieee754_asin(double x){
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
- xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+ xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+
- xx*asncs.x[n+9])))))))+asncs.x[n+10];
+ xx*asncs.x[n+9])))))))+asncs.x[n+10];
t+=p;
res =asncs.x[n+11] +t;
cor = (asncs.x[n+11]-res)+t;
@@ -248,9 +254,9 @@ double __ieee754_asin(double x){
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
- xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+ xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+
- xx*(asncs.x[n+9]+xx*asncs.x[n+10]))))))))+asncs.x[n+11];
+ xx*(asncs.x[n+9]+xx*asncs.x[n+10]))))))))+asncs.x[n+11];
t+=p;
res =asncs.x[n+12] +t;
cor = (asncs.x[n+12]-res)+t;
@@ -324,6 +330,9 @@ double __ieee754_asin(double x){
return u.x/v.x; /* NaN */
}
}
+#ifndef __ieee754_asin
+strong_alias (__ieee754_asin, __asin_finite)
+#endif
/*******************************************************************/
/* */
@@ -331,7 +340,9 @@ double __ieee754_asin(double x){
/* */
/*******************************************************************/
-double __ieee754_acos(double x)
+double
+SECTION
+__ieee754_acos(double x)
{
double x1,x2,xx,s1,s2,res1,p,t,res,r,cor,cc,y,c,z,w[2],eps;
#if 0
@@ -397,7 +408,7 @@ double __ieee754_acos(double x)
else xx = -x - asncs.x[n];
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
- xx*(asncs.x[n+5]+xx*asncs.x[n+6]))))+asncs.x[n+7];
+ xx*(asncs.x[n+5]+xx*asncs.x[n+6]))))+asncs.x[n+7];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+8]):(hp0.x+asncs.x[n+8]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
@@ -433,8 +444,8 @@ double __ieee754_acos(double x)
else {xx = -x - asncs.x[n]; eps=1.02; }
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
- xx*(asncs.x[n+5]+xx*(asncs.x[n+6]+
- xx*asncs.x[n+7])))))+asncs.x[n+8];
+ xx*(asncs.x[n+5]+xx*(asncs.x[n+6]+
+ xx*asncs.x[n+7])))))+asncs.x[n+8];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+9]):(hp0.x+asncs.x[n+9]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
@@ -468,8 +479,8 @@ double __ieee754_acos(double x)
else {xx = -x - asncs.x[n]; eps = 1.01; }
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
- xx*(asncs.x[n+5]+xx*(asncs.x[n+6]+xx*(asncs.x[n+7]+
- xx*asncs.x[n+8]))))))+asncs.x[n+9];
+ xx*(asncs.x[n+5]+xx*(asncs.x[n+6]+xx*(asncs.x[n+7]+
+ xx*asncs.x[n+8]))))))+asncs.x[n+9];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+10]):(hp0.x+asncs.x[n+10]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
@@ -503,9 +514,9 @@ double __ieee754_acos(double x)
else {xx = -x - asncs.x[n]; eps =1.005; }
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
- xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+ xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+
- xx*asncs.x[n+9])))))))+asncs.x[n+10];
+ xx*asncs.x[n+9])))))))+asncs.x[n+10];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+11]):(hp0.x+asncs.x[n+11]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
@@ -539,9 +550,9 @@ double __ieee754_acos(double x)
else {xx = -x - asncs.x[n]; eps=1.005;}
t = asncs.x[n+1]*xx;
p=xx*xx*(asncs.x[n+2]+xx*(asncs.x[n+3]+xx*(asncs.x[n+4]+
- xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+ xx*(asncs.x[n+5]+xx*(asncs.x[n+6]
+xx*(asncs.x[n+7]+xx*(asncs.x[n+8]+xx*(asncs.x[n+9]+
- xx*asncs.x[n+10]))))))))+asncs.x[n+11];
+ xx*asncs.x[n+10]))))))))+asncs.x[n+11];
t+=p;
y = (m>0)?(hp0.x-asncs.x[n+12]):(hp0.x+asncs.x[n+12]);
t = (m>0)?(hp1.x-t):(hp1.x+t);
@@ -635,3 +646,6 @@ double __ieee754_acos(double x)
return u.x/v.x;
}
}
+#ifndef __ieee754_acos
+strong_alias (__ieee754_acos, __acos_finite)
+#endif
diff --git a/sysdeps/ieee754/dbl-64/e_atan2.c b/sysdeps/ieee754/dbl-64/e_atan2.c
index 9e1a794ec8..64dae3e8d5 100644
--- a/sysdeps/ieee754/dbl-64/e_atan2.c
+++ b/sysdeps/ieee754/dbl-64/e_atan2.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -37,13 +37,17 @@
/* */
/************************************************************************/
-#include "dla.h"
+#include <dla.h>
#include "mpa.h"
#include "MathLib.h"
#include "uatan.tbl"
#include "atnat2.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
/************************************************************************/
/* An ultimate atan2 routine. Given two IEEE double machine numbers y,x */
/* it computes the correctly rounded (to nearest) value of atan2(y,x). */
@@ -51,19 +55,28 @@
/* round to nearest mode of IEEE 754 standard. */
/************************************************************************/
static double atan2Mp(double ,double ,const int[]);
-static double signArctan2(double ,double);
+ /* Fix the sign and return after stage 1 or stage 2 */
+static double signArctan2(double y,double z)
+{
+ return __copysign(z, y);
+}
static double normalized(double ,double,double ,double);
void __mpatan2(mp_no *,mp_no *,mp_no *,int);
-double __ieee754_atan2(double y,double x) {
+double
+SECTION
+__ieee754_atan2(double y,double x) {
int i,de,ux,dx,uy,dy;
#if 0
int p;
#endif
static const int pr[MM]={6,8,10,20,32};
- double ax,ay,u,du,u9,ua,v,vv,dv,t1,t2,t3,t4,t5,t6,t7,t8,
- z,zz,cor,s1,ss1,s2,ss2;
+ double ax,ay,u,du,u9,ua,v,vv,dv,t1,t2,t3,t7,t8,
+ z,zz,cor,s1,ss1,s2,ss2;
+#ifndef DLA_FMS
+ double t4,t5,t6;
+#endif
#if 0
double z1,z2;
#endif
@@ -73,7 +86,7 @@ double __ieee754_atan2(double y,double x) {
#endif
static const int ep= 59768832, /* 57*16**5 */
- em=-59768832; /* -57*16**5 */
+ em=-59768832; /* -57*16**5 */
/* x=NaN or y=NaN */
num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF];
@@ -102,23 +115,23 @@ double __ieee754_atan2(double y,double x) {
if (ux==0x7ff00000) {
if (dx==0x00000000) {
if (uy==0x7ff00000) {
- if (dy==0x00000000) return qpi.d; }
+ if (dy==0x00000000) return qpi.d; }
else if (uy==0xfff00000) {
- if (dy==0x00000000) return mqpi.d; }
+ if (dy==0x00000000) return mqpi.d; }
else {
- if ((uy&0x80000000)==0x00000000) return ZERO;
- else return MZERO; }
+ if ((uy&0x80000000)==0x00000000) return ZERO;
+ else return MZERO; }
}
}
else if (ux==0xfff00000) {
if (dx==0x00000000) {
if (uy==0x7ff00000) {
- if (dy==0x00000000) return tqpi.d; }
+ if (dy==0x00000000) return tqpi.d; }
else if (uy==0xfff00000) {
- if (dy==0x00000000) return mtqpi.d; }
+ if (dy==0x00000000) return mtqpi.d; }
else {
- if ((uy&0x80000000)==0x00000000) return opi.d;
- else return mopi.d; }
+ if ((uy&0x80000000)==0x00000000) return opi.d;
+ else return mopi.d; }
}
}
@@ -156,108 +169,108 @@ double __ieee754_atan2(double y,double x) {
/* (i) x>0, abs(y)< abs(x): atan(ay/ax) */
if (ay<ax) {
if (u<inv16.d) {
- v=u*u; zz=du+u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
- if ((z=u+(zz-u1.d*u)) == u+(zz+u1.d*u)) return signArctan2(y,z);
+ v=u*u; zz=du+u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
+ if ((z=u+(zz-u1.d*u)) == u+(zz+u1.d*u)) return signArctan2(y,z);
- MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
- s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
- ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
- if ((z=s1+(ss1-u5.d*s1)) == s1+(ss1+u5.d*s1)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
+ s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
+ ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
+ if ((z=s1+(ss1-u5.d*s1)) == s1+(ss1+u5.d*s1)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
else {
- i=(TWO52+TWO8*u)-TWO52; i-=16;
- t3=u-cij[i][0].d;
- EADD(t3,du,v,dv)
- t1=cij[i][1].d; t2=cij[i][2].d;
- zz=v*t2+(dv*t2+v*v*(cij[i][3].d+v*(cij[i][4].d+
- v*(cij[i][5].d+v* cij[i][6].d))));
- if (i<112) {
- if (i<48) u9=u91.d; /* u < 1/4 */
- else u9=u92.d; } /* 1/4 <= u < 1/2 */
- else {
- if (i<176) u9=u93.d; /* 1/2 <= u < 3/4 */
- else u9=u94.d; } /* 3/4 <= u <= 1 */
- if ((z=t1+(zz-u9*t1)) == t1+(zz+u9*t1)) return signArctan2(y,z);
+ i=(TWO52+TWO8*u)-TWO52; i-=16;
+ t3=u-cij[i][0].d;
+ EADD(t3,du,v,dv)
+ t1=cij[i][1].d; t2=cij[i][2].d;
+ zz=v*t2+(dv*t2+v*v*(cij[i][3].d+v*(cij[i][4].d+
+ v*(cij[i][5].d+v* cij[i][6].d))));
+ if (i<112) {
+ if (i<48) u9=u91.d; /* u < 1/4 */
+ else u9=u92.d; } /* 1/4 <= u < 1/2 */
+ else {
+ if (i<176) u9=u93.d; /* 1/2 <= u < 3/4 */
+ else u9=u94.d; } /* 3/4 <= u <= 1 */
+ if ((z=t1+(zz-u9*t1)) == t1+(zz+u9*t1)) return signArctan2(y,z);
- t1=u-hij[i][0].d;
- EADD(t1,du,v,vv)
- s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
- v*(hij[i][14].d+v* hij[i][15].d))));
- ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
- if ((z=s2+(ss2-ub.d*s2)) == s2+(ss2+ub.d*s2)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ t1=u-hij[i][0].d;
+ EADD(t1,du,v,vv)
+ s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
+ v*(hij[i][14].d+v* hij[i][15].d))));
+ ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
+ if ((z=s2+(ss2-ub.d*s2)) == s2+(ss2+ub.d*s2)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
}
/* (ii) x>0, abs(x)<=abs(y): pi/2-atan(ax/ay) */
else {
if (u<inv16.d) {
- v=u*u;
- zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
- ESUB(hpi.d,u,t2,cor)
- t3=((hpi1.d+cor)-du)-zz;
- if ((z=t2+(t3-u2.d)) == t2+(t3+u2.d)) return signArctan2(y,z);
+ v=u*u;
+ zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
+ ESUB(hpi.d,u,t2,cor)
+ t3=((hpi1.d+cor)-du)-zz;
+ if ((z=t2+(t3-u2.d)) == t2+(t3+u2.d)) return signArctan2(y,z);
- MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
- s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
- ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
- SUB2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
- if ((z=s2+(ss2-u6.d)) == s2+(ss2+u6.d)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
+ s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
+ ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
+ SUB2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
+ if ((z=s2+(ss2-u6.d)) == s2+(ss2+u6.d)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
else {
- i=(TWO52+TWO8*u)-TWO52; i-=16;
- v=(u-cij[i][0].d)+du;
- zz=hpi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
- v*(cij[i][5].d+v* cij[i][6].d))));
- t1=hpi.d-cij[i][1].d;
- if (i<112) ua=ua1.d; /* w < 1/2 */
- else ua=ua2.d; /* w >= 1/2 */
- if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
+ i=(TWO52+TWO8*u)-TWO52; i-=16;
+ v=(u-cij[i][0].d)+du;
+ zz=hpi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
+ v*(cij[i][5].d+v* cij[i][6].d))));
+ t1=hpi.d-cij[i][1].d;
+ if (i<112) ua=ua1.d; /* w < 1/2 */
+ else ua=ua2.d; /* w >= 1/2 */
+ if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
- t1=u-hij[i][0].d;
- EADD(t1,du,v,vv)
- s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
- v*(hij[i][14].d+v* hij[i][15].d))));
- ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
- SUB2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
- if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ t1=u-hij[i][0].d;
+ EADD(t1,du,v,vv)
+ s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
+ v*(hij[i][14].d+v* hij[i][15].d))));
+ ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
+ SUB2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
+ if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
}
}
@@ -266,114 +279,120 @@ double __ieee754_atan2(double y,double x) {
/* (iii) x<0, abs(x)< abs(y): pi/2+atan(ax/ay) */
if (ax<ay) {
if (u<inv16.d) {
- v=u*u;
- zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
- EADD(hpi.d,u,t2,cor)
- t3=((hpi1.d+cor)+du)+zz;
- if ((z=t2+(t3-u3.d)) == t2+(t3+u3.d)) return signArctan2(y,z);
+ v=u*u;
+ zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
+ EADD(hpi.d,u,t2,cor)
+ t3=((hpi1.d+cor)+du)+zz;
+ if ((z=t2+(t3-u3.d)) == t2+(t3+u3.d)) return signArctan2(y,z);
- MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
- s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
- ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
- ADD2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
- if ((z=s2+(ss2-u7.d)) == s2+(ss2+u7.d)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
+ s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
+ ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
+ ADD2(hpi.d,hpi1.d,s1,ss1,s2,ss2,t1,t2)
+ if ((z=s2+(ss2-u7.d)) == s2+(ss2+u7.d)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
else {
- i=(TWO52+TWO8*u)-TWO52; i-=16;
- v=(u-cij[i][0].d)+du;
- zz=hpi1.d+v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
- v*(cij[i][5].d+v* cij[i][6].d))));
- t1=hpi.d+cij[i][1].d;
- if (i<112) ua=ua1.d; /* w < 1/2 */
- else ua=ua2.d; /* w >= 1/2 */
- if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
+ i=(TWO52+TWO8*u)-TWO52; i-=16;
+ v=(u-cij[i][0].d)+du;
+ zz=hpi1.d+v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
+ v*(cij[i][5].d+v* cij[i][6].d))));
+ t1=hpi.d+cij[i][1].d;
+ if (i<112) ua=ua1.d; /* w < 1/2 */
+ else ua=ua2.d; /* w >= 1/2 */
+ if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
- t1=u-hij[i][0].d;
- EADD(t1,du,v,vv)
- s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
- v*(hij[i][14].d+v* hij[i][15].d))));
- ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
- ADD2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
- if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ t1=u-hij[i][0].d;
+ EADD(t1,du,v,vv)
+ s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
+ v*(hij[i][14].d+v* hij[i][15].d))));
+ ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
+ ADD2(hpi.d,hpi1.d,s2,ss2,s1,ss1,t1,t2)
+ if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
}
/* (iv) x<0, abs(y)<=abs(x): pi-atan(ax/ay) */
else {
if (u<inv16.d) {
- v=u*u;
- zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
- ESUB(opi.d,u,t2,cor)
- t3=((opi1.d+cor)-du)-zz;
- if ((z=t2+(t3-u4.d)) == t2+(t3+u4.d)) return signArctan2(y,z);
+ v=u*u;
+ zz=u*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
+ ESUB(opi.d,u,t2,cor)
+ t3=((opi1.d+cor)-du)-zz;
+ if ((z=t2+(t3-u4.d)) == t2+(t3+u4.d)) return signArctan2(y,z);
- MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
- s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
- ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
- SUB2(opi.d,opi1.d,s1,ss1,s2,ss2,t1,t2)
- if ((z=s2+(ss2-u8.d)) == s2+(ss2+u8.d)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ MUL2(u,du,u,du,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
+ s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
+ ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ MUL2(u,du,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(u,du,s2,ss2,s1,ss1,t1,t2)
+ SUB2(opi.d,opi1.d,s1,ss1,s2,ss2,t1,t2)
+ if ((z=s2+(ss2-u8.d)) == s2+(ss2+u8.d)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
else {
- i=(TWO52+TWO8*u)-TWO52; i-=16;
- v=(u-cij[i][0].d)+du;
- zz=opi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
- v*(cij[i][5].d+v* cij[i][6].d))));
- t1=opi.d-cij[i][1].d;
- if (i<112) ua=ua1.d; /* w < 1/2 */
- else ua=ua2.d; /* w >= 1/2 */
- if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
+ i=(TWO52+TWO8*u)-TWO52; i-=16;
+ v=(u-cij[i][0].d)+du;
+ zz=opi1.d-v*(cij[i][2].d+v*(cij[i][3].d+v*(cij[i][4].d+
+ v*(cij[i][5].d+v* cij[i][6].d))));
+ t1=opi.d-cij[i][1].d;
+ if (i<112) ua=ua1.d; /* w < 1/2 */
+ else ua=ua2.d; /* w >= 1/2 */
+ if ((z=t1+(zz-ua)) == t1+(zz+ua)) return signArctan2(y,z);
- t1=u-hij[i][0].d;
- EADD(t1,du,v,vv)
- s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
- v*(hij[i][14].d+v* hij[i][15].d))));
- ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
- SUB2(opi.d,opi1.d,s2,ss2,s1,ss1,t1,t2)
- if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
- return atan2Mp(x,y,pr);
+ t1=u-hij[i][0].d;
+ EADD(t1,du,v,vv)
+ s1=v*(hij[i][11].d+v*(hij[i][12].d+v*(hij[i][13].d+
+ v*(hij[i][14].d+v* hij[i][15].d))));
+ ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][5].d,hij[i][6].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][3].d,hij[i][4].d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(hij[i][1].d,hij[i][2].d,s1,ss1,s2,ss2,t1,t2)
+ SUB2(opi.d,opi1.d,s2,ss2,s1,ss1,t1,t2)
+ if ((z=s1+(ss1-uc.d)) == s1+(ss1+uc.d)) return signArctan2(y,z);
+ return atan2Mp(x,y,pr);
}
}
}
}
+#ifndef __ieee754_atan2
+strong_alias (__ieee754_atan2, __atan2_finite)
+#endif
+
/* Treat the Denormalized case */
-static double normalized(double ax,double ay,double y, double z)
+static double
+SECTION
+normalized(double ax,double ay,double y, double z)
{ int p;
mp_no mpx,mpy,mpz,mperr,mpz2,mpt1;
p=6;
@@ -382,13 +401,10 @@ static double normalized(double ax,double ay,double y, double z)
__sub(&mpz,&mperr,&mpz2,p); __mp_dbl(&mpz2,&z,p);
return signArctan2(y,z);
}
- /* Fix the sign and return after stage 1 or stage 2 */
-static double signArctan2(double y,double z)
-{
- return ((y<ZERO) ? -z : z);
-}
/* Stage 3: Perform a multi-Precision computation */
-static double atan2Mp(double x,double y,const int pr[])
+static double
+SECTION
+atan2Mp(double x,double y,const int pr[])
{
double z1,z2;
int i,p;
diff --git a/sysdeps/ieee754/dbl-64/e_atanh.c b/sysdeps/ieee754/dbl-64/e_atanh.c
index fa4fe675c9..1f83e31981 100644
--- a/sysdeps/ieee754/dbl-64/e_atanh.c
+++ b/sysdeps/ieee754/dbl-64/e_atanh.c
@@ -1,74 +1,73 @@
-/* @(#)e_atanh.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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. */
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_atanh.c,v 1.8 1995/05/10 20:44:55 jtc Exp $";
-#endif
/* __ieee754_atanh(x)
- * Method :
- * 1.Reduced x to positive by atanh(-x) = -atanh(x)
- * 2.For x>=0.5
- * 1 2x x
- * atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
- * 2 1 - x 1 - x
- *
- * For x<0.5
- * atanh(x) = 0.5*log1p(2x+2x*x/(1-x))
- *
- * Special cases:
- * atanh(x) is NaN if |x| > 1 with signal;
- * atanh(NaN) is that NaN with no signal;
- * atanh(+-1) is +-INF with signal.
- *
+ Method :
+ 1.Reduced x to positive by atanh(-x) = -atanh(x)
+ 2.For x>=0.5
+ 1 2x x
+ atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
+ 2 1 - x 1 - x
+
+ For x<0.5
+ atanh(x) = 0.5*log1p(2x+2x*x/(1-x))
+
+ Special cases:
+ atanh(x) is NaN if |x| > 1 with signal;
+ atanh(NaN) is that NaN with no signal;
+ atanh(+-1) is +-INF with signal.
+
*/
+#include <inttypes.h>
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
-static const double one = 1.0, huge = 1e300;
-#else
-static double one = 1.0, huge = 1e300;
-#endif
-
-#ifdef __STDC__
-static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
+static const double huge = 1e300;
-#ifdef __STDC__
- double __ieee754_atanh(double x)
-#else
- double __ieee754_atanh(x)
- double x;
-#endif
+double
+__ieee754_atanh (double x)
{
- double t;
- int32_t hx,ix;
- u_int32_t lx;
- EXTRACT_WORDS(hx,lx,x);
- ix = hx&0x7fffffff;
- if ((ix|((lx|(-lx))>>31))>0x3ff00000) /* |x|>1 */
- return (x-x)/(x-x);
- if(ix==0x3ff00000)
- return x/zero;
- if(ix<0x3e300000&&(huge+x)>zero) return x; /* x<2**-28 */
- SET_HIGH_WORD(x,ix);
- if(ix<0x3fe00000) { /* x < 0.5 */
- t = x+x;
- t = 0.5*__log1p(t+t*x/(one-x));
- } else
- t = 0.5*__log1p((x+x)/(one-x));
- if(hx>=0) return t; else return -t;
+ double xa = fabs (x);
+ double t;
+ if (xa < 0.5)
+ {
+ if (__builtin_expect (xa < 0x1.0p-28, 0))
+ {
+ math_force_eval (huge + x);
+ return x;
+ }
+
+ t = xa + xa;
+ t = 0.5 * __log1p (t + t * xa / (1.0 - xa));
+ }
+ else if (__builtin_expect (xa < 1.0, 1))
+ t = 0.5 * __log1p ((xa + xa) / (1.0 - xa));
+ else
+ {
+ if (xa > 1.0)
+ return (x - x) / (x - x);
+
+ return x / 0.0;
+ }
+
+ return __copysign (t, x);
}
+strong_alias (__ieee754_atanh, __atanh_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_cosh.c b/sysdeps/ieee754/dbl-64/e_cosh.c
index 65106b9989..b9f79e47a9 100644
--- a/sysdeps/ieee754/dbl-64/e_cosh.c
+++ b/sysdeps/ieee754/dbl-64/e_cosh.c
@@ -1,32 +1,28 @@
-/* @(#)e_cosh.c 5.1 93/09/24 */
+/* Optimized by Ulrich Drepper <drepper@gmail.com>, 2011 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $";
-#endif
-
/* __ieee754_cosh(x)
- * Method :
+ * Method :
* mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
- * 1. Replace x by |x| (cosh(x) = cosh(-x)).
- * 2.
- * [ exp(x) - 1 ]^2
+ * 1. Replace x by |x| (cosh(x) = cosh(-x)).
+ * 2.
+ * [ exp(x) - 1 ]^2
* 0 <= x <= ln2/2 : cosh(x) := 1 + -------------------
- * 2*exp(x)
+ * 2*exp(x)
*
- * exp(x) + 1/exp(x)
+ * exp(x) + 1/exp(x)
* ln2/2 <= x <= 22 : cosh(x) := -------------------
- * 2
- * 22 <= x <= lnovft : cosh(x) := exp(x)/2
+ * 2
+ * 22 <= x <= lnovft : cosh(x) := exp(x)/2
* lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2)
* ln2ovft < x : cosh(x) := huge*huge (overflow)
*
@@ -38,19 +34,11 @@ static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double one = 1.0, half=0.5, huge = 1.0e300;
-#else
-static double one = 1.0, half=0.5, huge = 1.0e300;
-#endif
-#ifdef __STDC__
- double __ieee754_cosh(double x)
-#else
- double __ieee754_cosh(x)
- double x;
-#endif
-{
+double
+__ieee754_cosh (double x)
+{
double t,w;
int32_t ix;
u_int32_t lx;
@@ -59,19 +47,17 @@ static double one = 1.0, half=0.5, huge = 1.0e300;
GET_HIGH_WORD(ix,x);
ix &= 0x7fffffff;
- /* x is INF or NaN */
- if(ix>=0x7ff00000) return x*x;
-
- /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
- if(ix<0x3fd62e43) {
- t = __expm1(fabs(x));
- w = one+t;
- if (ix<0x3c800000) return w; /* cosh(tiny) = 1 */
- return one+(t*t)/(w+w);
- }
-
- /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
+ /* |x| in [0,22] */
if (ix < 0x40360000) {
+ /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
+ if(ix<0x3fd62e43) {
+ t = __expm1(fabs(x));
+ w = one+t;
+ if (ix<0x3c800000) return w; /* cosh(tiny) = 1 */
+ return one+(t*t)/(w+w);
+ }
+
+ /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
t = __ieee754_exp(fabs(x));
return half*t+half/t;
}
@@ -87,6 +73,10 @@ static double one = 1.0, half=0.5, huge = 1.0e300;
return t*w;
}
+ /* x is INF or NaN */
+ if(ix>=0x7ff00000) return x*x;
+
/* |x| > overflowthresold, cosh(x) overflow */
return huge*huge;
}
+strong_alias (__ieee754_cosh, __cosh_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_exp.c b/sysdeps/ieee754/dbl-64/e_exp.c
index 717469e250..e7a839d42e 100644
--- a/sysdeps/ieee754/dbl-64/e_exp.c
+++ b/sysdeps/ieee754/dbl-64/e_exp.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -40,13 +40,19 @@
#include "uexp.tbl"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
double __slowexp(double);
/***************************************************************************/
/* An ultimate exp routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of e^x */
/***************************************************************************/
-double __ieee754_exp(double x) {
+double
+SECTION
+__ieee754_exp(double x) {
double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
mynumber junk1, junk2, binexp = {{0,0}};
#if 0
@@ -145,6 +151,9 @@ double __ieee754_exp(double x) {
else return __slowexp(x);
}
}
+#ifndef __ieee754_exp
+strong_alias (__ieee754_exp, __exp_finite)
+#endif
/************************************************************************/
/* Compute e^(x+xx)(Double-Length number) .The routine also receive */
@@ -153,7 +162,9 @@ double __ieee754_exp(double x) {
/*else return e^(x + xx) (always positive ) */
/************************************************************************/
-double __exp1(double x, double xx, double error) {
+double
+SECTION
+__exp1(double x, double xx, double error) {
double bexp, t, eps, del, base, y, al, bet, res, rem, cor;
mynumber junk1, junk2, binexp = {{0,0}};
#if 0
diff --git a/sysdeps/ieee754/dbl-64/e_exp2.c b/sysdeps/ieee754/dbl-64/e_exp2.c
index ce6368be43..0b7330aace 100644
--- a/sysdeps/ieee754/dbl-64/e_exp2.c
+++ b/sysdeps/ieee754/dbl-64/e_exp2.c
@@ -1,5 +1,6 @@
/* Double-precision floating point 2^x.
- Copyright (C) 1997,1998,2000,2001,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2001,2005,2006,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
@@ -24,9 +25,6 @@
17 (1), March 1991, pp. 26-45.
It has been slightly modified to compute 2^x instead of e^x.
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <stdlib.h>
#include <float.h>
#include <ieee754.h>
@@ -37,13 +35,8 @@
#include "t_exp2.h"
-/* XXX I know the assembler generates a warning about incorrect section
- attributes. But without the attribute here the compiler places the
- constants in the .data section. Ideally the constant is placed in
- .rodata.cst8 so that it can be merged, but gcc sucks, it ICEs when
- we try to force this section on it. --drepper */
-static const volatile double TWO1023 = 8.988465674311579539e+307;
-static const volatile double TWOM1000 = 9.3326361850321887899e-302;
+static const double TWO1023 = 8.988465674311579539e+307;
+static const double TWOM1000 = 9.3326361850321887899e-302;
double
__ieee754_exp2 (double x)
@@ -52,19 +45,26 @@ __ieee754_exp2 (double x)
static const double lomark = (double) (DBL_MIN_EXP - DBL_MANT_DIG - 1);
/* Check for usual case. */
- if (isless (x, himark) && isgreaterequal (x, lomark))
+ if (__builtin_expect (isless (x, himark), 1))
{
+ /* Exceptional cases: */
+ if (__builtin_expect (! isgreaterequal (x, lomark), 0))
+ {
+ if (__isinf (x))
+ /* e^-inf == 0, with no error. */
+ return 0;
+ else
+ /* Underflow */
+ return TWOM1000 * TWOM1000;
+ }
+
static const double THREEp42 = 13194139533312.0;
int tval, unsafe;
double rx, x22, result;
union ieee754_double ex2_u, scale_u;
fenv_t oldenv;
- feholdexcept (&oldenv);
-#ifdef FE_TONEAREST
- /* If we don't have this, it's too bad. */
- fesetround (FE_TONEAREST);
-#endif
+ libc_feholdexcept_setround (&oldenv, FE_TONEAREST);
/* 1. Argument reduction.
Choose integers ex, -256 <= t < 256, and some real
@@ -108,9 +108,10 @@ __ieee754_exp2 (double x)
* x + .055504110254308625)
* x + .240226506959100583)
* x + .69314718055994495) * ex2_u.d;
+ math_opt_barrier (x22);
/* 5. Return (2^x2-1) * 2^(t/512+e+ex) + 2^(t/512+e+ex). */
- fesetenv (&oldenv);
+ libc_fesetenv (&oldenv);
result = x22 * x + ex2_u.d;
@@ -119,17 +120,8 @@ __ieee754_exp2 (double x)
else
return result * scale_u.d;
}
- /* Exceptional cases: */
- else if (isless (x, himark))
- {
- if (__isinf (x))
- /* e^-inf == 0, with no error. */
- return 0;
- else
- /* Underflow */
- return TWOM1000 * TWOM1000;
- }
else
/* Return x, if x is a NaN or Inf; or overflow, otherwise. */
return TWO1023*x;
}
+strong_alias (__ieee754_exp2, __exp2_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_fmod.c b/sysdeps/ieee754/dbl-64/e_fmod.c
index 2ce613574a..0328b011d2 100644
--- a/sysdeps/ieee754/dbl-64/e_fmod.c
+++ b/sysdeps/ieee754/dbl-64/e_fmod.c
@@ -1,20 +1,15 @@
-/* @(#)e_fmod.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_fmod.c,v 1.8 1995/05/10 20:45:07 jtc Exp $";
-#endif
-
-/*
+/*
* __ieee754_fmod(x,y)
* Return x mod y in exact arithmetic
* Method: shift and subtract
@@ -23,18 +18,10 @@ static char rcsid[] = "$NetBSD: e_fmod.c,v 1.8 1995/05/10 20:45:07 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double one = 1.0, Zero[] = {0.0, -0.0,};
-#else
-static double one = 1.0, Zero[] = {0.0, -0.0,};
-#endif
-#ifdef __STDC__
- double __ieee754_fmod(double x, double y)
-#else
- double __ieee754_fmod(x,y)
- double x,y ;
-#endif
+double
+__ieee754_fmod (double x, double y)
{
int32_t n,hx,hy,hz,ix,iy,sx,i;
u_int32_t lx,ly,lz;
@@ -51,12 +38,12 @@ static double one = 1.0, Zero[] = {0.0, -0.0,};
return (x*y)/(x*y);
if(hx<=hy) {
if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
- if(lx==ly)
+ if(lx==ly)
return Zero[(u_int32_t)sx>>31]; /* |x|=|y| return x*0*/
}
/* determine ix = ilogb(x) */
- if(hx<0x00100000) { /* subnormal x */
+ if(__builtin_expect(hx<0x00100000, 0)) { /* subnormal x */
if(hx==0) {
for (ix = -1043, i=lx; i>0; i<<=1) ix -=1;
} else {
@@ -65,7 +52,7 @@ static double one = 1.0, Zero[] = {0.0, -0.0,};
} else ix = (hx>>20)-1023;
/* determine iy = ilogb(y) */
- if(hy<0x00100000) { /* subnormal y */
+ if(__builtin_expect(hy<0x00100000, 0)) { /* subnormal y */
if(hy==0) {
for (iy = -1043, i=ly; i>0; i<<=1) iy -=1;
} else {
@@ -74,25 +61,25 @@ static double one = 1.0, Zero[] = {0.0, -0.0,};
} else iy = (hy>>20)-1023;
/* set up {hx,lx}, {hy,ly} and align y to x */
- if(ix >= -1022)
+ if(__builtin_expect(ix >= -1022, 1))
hx = 0x00100000|(0x000fffff&hx);
else { /* subnormal x, shift x to normal */
n = -1022-ix;
if(n<=31) {
- hx = (hx<<n)|(lx>>(32-n));
- lx <<= n;
+ hx = (hx<<n)|(lx>>(32-n));
+ lx <<= n;
} else {
hx = lx<<(n-32);
lx = 0;
}
}
- if(iy >= -1022)
+ if(__builtin_expect(iy >= -1022, 1))
hy = 0x00100000|(0x000fffff&hy);
else { /* subnormal y, shift y to normal */
n = -1022-iy;
if(n<=31) {
- hy = (hy<<n)|(ly>>(32-n));
- ly <<= n;
+ hy = (hy<<n)|(ly>>(32-n));
+ ly <<= n;
} else {
hy = ly<<(n-32);
ly = 0;
@@ -105,22 +92,22 @@ static double one = 1.0, Zero[] = {0.0, -0.0,};
hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
if(hz<0){hx = hx+hx+(lx>>31); lx = lx+lx;}
else {
- if((hz|lz)==0) /* return sign(x)*0 */
+ if((hz|lz)==0) /* return sign(x)*0 */
return Zero[(u_int32_t)sx>>31];
- hx = hz+hz+(lz>>31); lx = lz+lz;
+ hx = hz+hz+(lz>>31); lx = lz+lz;
}
}
hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
if(hz>=0) {hx=hz;lx=lz;}
/* convert back to floating value and restore the sign */
- if((hx|lx)==0) /* return sign(x)*0 */
- return Zero[(u_int32_t)sx>>31];
+ if((hx|lx)==0) /* return sign(x)*0 */
+ return Zero[(u_int32_t)sx>>31];
while(hx<0x00100000) { /* normalize x */
hx = hx+hx+(lx>>31); lx = lx+lx;
iy -= 1;
}
- if(iy>= -1022) { /* normalize output */
+ if(__builtin_expect(iy>= -1022, 1)) { /* normalize output */
hx = ((hx-0x00100000)|((iy+1023)<<20));
INSERT_WORDS(x,hx|sx,lx);
} else { /* subnormal output */
@@ -138,3 +125,4 @@ static double one = 1.0, Zero[] = {0.0, -0.0,};
}
return x; /* exact output */
}
+strong_alias (__ieee754_fmod, __fmod_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_gamma_r.c b/sysdeps/ieee754/dbl-64/e_gamma_r.c
index f32309350c..c4b7470e5b 100644
--- a/sysdeps/ieee754/dbl-64/e_gamma_r.c
+++ b/sysdeps/ieee754/dbl-64/e_gamma_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997, 1999, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2001, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -33,19 +33,20 @@ __ieee754_gamma_r (double x, int *signgamp)
EXTRACT_WORDS (hx, lx, x);
- if (((hx & 0x7fffffff) | lx) == 0)
+ if (__builtin_expect (((hx & 0x7fffffff) | lx) == 0, 0))
{
/* Return value for x == 0 is Inf with divide by zero exception. */
*signgamp = 0;
return 1.0 / x;
}
- if (hx < 0 && (u_int32_t) hx < 0xfff00000 && __rint (x) == x)
+ if (__builtin_expect (hx < 0, 0)
+ && (u_int32_t) hx < 0xfff00000 && __rint (x) == x)
{
/* Return value for integer x < 0 is NaN with invalid exception. */
*signgamp = 0;
return (x - x) / (x - x);
}
- if ((unsigned int) hx == 0xfff00000 && lx==0)
+ if (__builtin_expect ((unsigned int) hx == 0xfff00000 && lx==0, 0))
{
/* x == -Inf. According to ISO this is NaN. */
*signgamp = 0;
@@ -55,3 +56,4 @@ __ieee754_gamma_r (double x, int *signgamp)
/* XXX FIXME. */
return __ieee754_exp (__ieee754_lgamma_r (x, signgamp));
}
+strong_alias (__ieee754_gamma_r, __gamma_r_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_hypot.c b/sysdeps/ieee754/dbl-64/e_hypot.c
index 76a77ec33a..a89ccaa35e 100644
--- a/sysdeps/ieee754/dbl-64/e_hypot.c
+++ b/sysdeps/ieee754/dbl-64/e_hypot.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
-#endif
-
/* __ieee754_hypot(x,y)
*
* Method :
@@ -42,19 +38,15 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
* hypot(x,y) is NAN if x or y is NAN.
*
* Accuracy:
- * hypot(x,y) returns sqrt(x^2+y^2) with error less
- * than 1 ulps (units in the last place)
+ * hypot(x,y) returns sqrt(x^2+y^2) with error less
+ * than 1 ulps (units in the last place)
*/
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
- double __ieee754_hypot(double x, double y)
-#else
- double __ieee754_hypot(x,y)
- double x, y;
-#endif
+double
+__ieee754_hypot(double x, double y)
{
double a,b,t1,t2,y1,y2,w;
int32_t j,k,ha,hb;
@@ -68,7 +60,7 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
SET_HIGH_WORD(b,hb); /* b <- |b| */
if((ha-hb)>0x3c00000) {return a+b;} /* x/y > 2**60 */
k=0;
- if(ha > 0x5f300000) { /* a>2**500 */
+ if(__builtin_expect(ha > 0x5f300000, 0)) { /* a>2**500 */
if(ha >= 0x7ff00000) { /* Inf or NaN */
u_int32_t low;
w = a+b; /* for sNaN */
@@ -83,9 +75,9 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
SET_HIGH_WORD(a,ha);
SET_HIGH_WORD(b,hb);
}
- if(hb < 0x20b00000) { /* b < 2**-500 */
+ if(__builtin_expect(hb < 0x20b00000, 0)) { /* b < 2**-500 */
if(hb <= 0x000fffff) { /* subnormal b or 0 */
- u_int32_t low;
+ u_int32_t low;
GET_LOW_WORD(low,b);
if((hb|low)==0) return a;
t1=0;
@@ -94,7 +86,7 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
a *= t1;
k -= 1022;
} else { /* scale a and b by 2^600 */
- ha += 0x25800000; /* a *= 2^600 */
+ ha += 0x25800000; /* a *= 2^600 */
hb += 0x25800000; /* b *= 2^600 */
k -= 600;
SET_HIGH_WORD(a,ha);
@@ -126,3 +118,4 @@ static char rcsid[] = "$NetBSD: e_hypot.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
return t1*w;
} else return w;
}
+strong_alias (__ieee754_hypot, __hypot_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_j0.c b/sysdeps/ieee754/dbl-64/e_j0.c
index 302df49d62..48584a60b4 100644
--- a/sysdeps/ieee754/dbl-64/e_j0.c
+++ b/sysdeps/ieee754/dbl-64/e_j0.c
@@ -13,10 +13,6 @@
for performance improvement on pipelined processors.
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_j0.c,v 1.8 1995/05/10 20:45:23 jtc Exp $";
-#endif
-
/* __ieee754_j0(x), __ieee754_y0(x)
* Bessel function of the first and second kinds of order zero.
* Method -- j0(x):
@@ -26,16 +22,16 @@ static char rcsid[] = "$NetBSD: e_j0.c,v 1.8 1995/05/10 20:45:23 jtc Exp $";
* j0(x) = 1-z/4+ z^2*R0/S0, where z = x*x;
* (precision: |j0-1+z/4-z^2R0/S0 |<2**-63.67 )
* for x in (2,inf)
- * j0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)-q0(x)*sin(x0))
- * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
+ * j0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)-q0(x)*sin(x0))
+ * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
* as follow:
* cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
* = 1/sqrt(2) * (cos(x) + sin(x))
* sin(x0) = sin(x)cos(pi/4)-cos(x)sin(pi/4)
* = 1/sqrt(2) * (sin(x) - cos(x))
- * (To avoid cancellation, use
+ * (To avoid cancellation, use
* sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.)
+ * to compute the worse one.)
*
* 3 Special cases
* j0(nan)= nan
@@ -56,8 +52,8 @@ static char rcsid[] = "$NetBSD: e_j0.c,v 1.8 1995/05/10 20:45:23 jtc Exp $";
* Note: For tiny x, U/V = u0 and j0(x)~1, hence
* y0(tiny) = u0 + (2/pi)*ln(tiny), (choose tiny<2**-27)
* 2. For x>=2.
- * y0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)+q0(x)*sin(x0))
- * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
+ * y0(x) = sqrt(2/(pi*x))*(p0(x)*cos(x0)+q0(x)*sin(x0))
+ * where x0 = x-pi/4. It is better to compute sin(x0),cos(x0)
* by the method mentioned above.
* 3. Special cases: y0(0)=-inf, y0(x<0)=NaN, y0(inf)=0.
*/
@@ -65,22 +61,14 @@ static char rcsid[] = "$NetBSD: e_j0.c,v 1.8 1995/05/10 20:45:23 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static double pzero(double), qzero(double);
-#else
-static double pzero(), qzero();
-#endif
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
-huge = 1e300,
+huge = 1e300,
one = 1.0,
invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
tpi = 6.36619772367581382433e-01, /* 0x3FE45F30, 0x6DC9C883 */
- /* R0/S0 on [0, 2.00] */
+ /* R0/S0 on [0, 2.00] */
R[] = {0.0, 0.0, 1.56249999999999947958e-02, /* 0x3F8FFFFF, 0xFFFFFFFD */
-1.89979294238854721751e-04, /* 0xBF28E6A5, 0xB61AC6E9 */
1.82954049532700665670e-06, /* 0x3EBEB1D1, 0x0C503919 */
@@ -90,18 +78,10 @@ S[] = {0.0, 1.56191029464890010492e-02, /* 0x3F8FFCE8, 0x82C8C2A4 */
5.13546550207318111446e-07, /* 0x3EA13B54, 0xCE84D5A9 */
1.16614003333790000205e-09}; /* 0x3E1408BC, 0xF4745D8F */
-#ifdef __STDC__
static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-#ifdef __STDC__
- double __ieee754_j0(double x)
-#else
- double __ieee754_j0(x)
- double x;
-#endif
+double
+__ieee754_j0(double x)
{
double z, s,c,ss,cc,r,u,v,r1,r2,s1,s2,z2,z4;
int32_t hx,ix;
@@ -117,7 +97,7 @@ static double zero = 0.0;
if(ix<0x7fe00000) { /* make sure x+x not overflow */
z = -__cos(x+x);
if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
+ else ss = z/cc;
}
/*
* j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
@@ -131,10 +111,9 @@ static double zero = 0.0;
return z;
}
if(ix<0x3f200000) { /* |x| < 2**-13 */
- if(huge+x>one) { /* raise inexact if x != 0 */
- if(ix<0x3e400000) return one; /* |x|<2**-27 */
- else return one - 0.25*x*x;
- }
+ math_force_eval(huge+x); /* raise inexact if x != 0 */
+ if(ix<0x3e400000) return one; /* |x|<2**-27 */
+ else return one - 0.25*x*x;
}
z = x*x;
#ifdef DO_NOT_USE_THIS
@@ -155,12 +134,9 @@ static double zero = 0.0;
return((one+u)*(one-u)+z*(r/s));
}
}
+strong_alias (__ieee754_j0, __j0_finite)
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
U[] = {-7.38042951086872317523e-02, /* 0xBFB2E4D6, 0x99CBD01F */
1.76666452509181115538e-01, /* 0x3FC69D01, 0x9DE9E3FC */
-1.38185671945596898896e-02, /* 0xBF8C4CE8, 0xB16CFA97 */
@@ -173,52 +149,48 @@ V[] = {1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
2.59150851840457805467e-07, /* 0x3E91642D, 0x7FF202FD */
4.41110311332675467403e-10}; /* 0x3DFE5018, 0x3BD6D9EF */
-#ifdef __STDC__
- double __ieee754_y0(double x)
-#else
- double __ieee754_y0(x)
- double x;
-#endif
+double
+__ieee754_y0(double x)
{
double z, s,c,ss,cc,u,v,z2,z4,z6,u1,u2,u3,v1,v2;
int32_t hx,ix,lx;
EXTRACT_WORDS(hx,lx,x);
- ix = 0x7fffffff&hx;
+ ix = 0x7fffffff&hx;
/* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0, y0(0) is -inf. */
if(ix>=0x7ff00000) return one/(x+x*x);
- if((ix|lx)==0) return -HUGE_VAL+x; /* -inf and overflow exception. */
- if(hx<0) return zero/(zero*x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
- * where x0 = x-pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
- * = 1/sqrt(2) * (sin(x) + cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
+ if((ix|lx)==0) return -HUGE_VAL+x; /* -inf and overflow exception. */
+ if(hx<0) return zero/(zero*x);
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
+ * where x0 = x-pi/4
+ * Better formula:
+ * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
+ * = 1/sqrt(2) * (sin(x) + cos(x))
+ * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.
+ */
__sincos (x, &s, &c);
- ss = s-c;
- cc = s+c;
+ ss = s-c;
+ cc = s+c;
/*
* j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
* y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
*/
- if(ix<0x7fe00000) { /* make sure x+x not overflow */
- z = -__cos(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrt(x);
- else {
- u = pzero(x); v = qzero(x);
- z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrt(x);
- }
- return z;
+ if(ix<0x7fe00000) { /* make sure x+x not overflow */
+ z = -__cos(x+x);
+ if ((s*c)<zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrt(x);
+ else {
+ u = pzero(x); v = qzero(x);
+ z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrt(x);
+ }
+ return z;
}
if(ix<=0x3e400000) { /* x < 2**-27 */
return(U[0] + tpi*__ieee754_log(x));
@@ -238,21 +210,18 @@ V[] = {1.27304834834123699328e-02, /* 0x3F8A1270, 0x91C9C71A */
#endif
return(u/v + tpi*(__ieee754_j0(x)*__ieee754_log(x)));
}
+strong_alias (__ieee754_y0, __y0_finite)
/* The asymptotic expansions of pzero is
* 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
* For x >= 2, We approximate pzero by
- * pzero(x) = 1 + (R/S)
+ * pzero(x) = 1 + (R/S)
* where R = pR0 + pR1*s^2 + pR2*s^4 + ... + pR5*s^10
- * S = 1 + pS0*s^2 + ... + pS4*s^10
+ * S = 1 + pS0*s^2 + ... + pS4*s^10
* and
* | pzero(x)-1-R/S | <= 2 ** ( -60.26)
*/
-#ifdef __STDC__
static const double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
-7.03124999999900357484e-02, /* 0xBFB1FFFF, 0xFFFFFD32 */
-8.08167041275349795626e+00, /* 0xC02029D0, 0xB44FA779 */
@@ -260,11 +229,7 @@ static double pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-2.48521641009428822144e+03, /* 0xC0A36A6E, 0xCD4DCAFC */
-5.25304380490729545272e+03, /* 0xC0B4850B, 0x36CC643D */
};
-#ifdef __STDC__
static const double pS8[5] = {
-#else
-static double pS8[5] = {
-#endif
1.16534364619668181717e+02, /* 0x405D2233, 0x07A96751 */
3.83374475364121826715e+03, /* 0x40ADF37D, 0x50596938 */
4.05978572648472545552e+04, /* 0x40E3D2BB, 0x6EB6B05F */
@@ -272,11 +237,7 @@ static double pS8[5] = {
4.76277284146730962675e+04, /* 0x40E74177, 0x4F2C49DC */
};
-#ifdef __STDC__
static const double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
-1.14125464691894502584e-11, /* 0xBDA918B1, 0x47E495CC */
-7.03124940873599280078e-02, /* 0xBFB1FFFF, 0xE69AFBC6 */
-4.15961064470587782438e+00, /* 0xC010A370, 0xF90C6BBF */
@@ -284,11 +245,7 @@ static double pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-3.31231299649172967747e+02, /* 0xC074B3B3, 0x6742CC63 */
-3.46433388365604912451e+02, /* 0xC075A6EF, 0x28A38BD7 */
};
-#ifdef __STDC__
static const double pS5[5] = {
-#else
-static double pS5[5] = {
-#endif
6.07539382692300335975e+01, /* 0x404E6081, 0x0C98C5DE */
1.05125230595704579173e+03, /* 0x40906D02, 0x5C7E2864 */
5.97897094333855784498e+03, /* 0x40B75AF8, 0x8FBE1D60 */
@@ -296,11 +253,7 @@ static double pS5[5] = {
2.40605815922939109441e+03, /* 0x40A2CC1D, 0xC70BE864 */
};
-#ifdef __STDC__
static const double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
-2.54704601771951915620e-09, /* 0xBE25E103, 0x6FE1AA86 */
-7.03119616381481654654e-02, /* 0xBFB1FFF6, 0xF7C0E24B */
-2.40903221549529611423e+00, /* 0xC00345B2, 0xAEA48074 */
@@ -308,11 +261,7 @@ static double pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-5.80791704701737572236e+01, /* 0xC04D0A22, 0x420A1A45 */
-3.14479470594888503854e+01, /* 0xC03F72AC, 0xA892D80F */
};
-#ifdef __STDC__
static const double pS3[5] = {
-#else
-static double pS3[5] = {
-#endif
3.58560338055209726349e+01, /* 0x4041ED92, 0x84077DD3 */
3.61513983050303863820e+02, /* 0x40769839, 0x464A7C0E */
1.19360783792111533330e+03, /* 0x4092A66E, 0x6D1061D6 */
@@ -320,11 +269,7 @@ static double pS3[5] = {
1.73580930813335754692e+02, /* 0x4065B296, 0xFC379081 */
};
-#ifdef __STDC__
static const double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
-8.87534333032526411254e-08, /* 0xBE77D316, 0xE927026D */
-7.03030995483624743247e-02, /* 0xBFB1FF62, 0x495E1E42 */
-1.45073846780952986357e+00, /* 0xBFF73639, 0x8A24A843 */
@@ -332,11 +277,7 @@ static double pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-1.11931668860356747786e+01, /* 0xC02662E6, 0xC5246303 */
-3.23364579351335335033e+00, /* 0xC009DE81, 0xAF8FE70F */
};
-#ifdef __STDC__
static const double pS2[5] = {
-#else
-static double pS2[5] = {
-#endif
2.22202997532088808441e+01, /* 0x40363865, 0x908B5959 */
1.36206794218215208048e+02, /* 0x4061069E, 0x0EE8878F */
2.70470278658083486789e+02, /* 0x4070E786, 0x42EA079B */
@@ -344,18 +285,10 @@ static double pS2[5] = {
1.46576176948256193810e+01, /* 0x402D50B3, 0x44391809 */
};
-#ifdef __STDC__
- static double pzero(double x)
-#else
- static double pzero(x)
- double x;
-#endif
+static double
+pzero(double x)
{
-#ifdef __STDC__
const double *p,*q;
-#else
- double *p,*q;
-#endif
double z,r,s,z2,z4,r1,r2,r3,s1,s2,s3;
int32_t ix;
GET_HIGH_WORD(ix,x);
@@ -385,17 +318,13 @@ static double pS2[5] = {
/* For x >= 8, the asymptotic expansions of qzero is
* -1/8 s + 75/1024 s^3 - ..., where s = 1/x.
* We approximate pzero by
- * qzero(x) = s*(-1.25 + (R/S))
+ * qzero(x) = s*(-1.25 + (R/S))
* where R = qR0 + qR1*s^2 + qR2*s^4 + ... + qR5*s^10
- * S = 1 + qS0*s^2 + ... + qS5*s^12
+ * S = 1 + qS0*s^2 + ... + qS5*s^12
* and
* | qzero(x)/s +1.25-R/S | <= 2 ** ( -61.22)
*/
-#ifdef __STDC__
static const double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
7.32421874999935051953e-02, /* 0x3FB2BFFF, 0xFFFFFE2C */
1.17682064682252693899e+01, /* 0x40278952, 0x5BB334D6 */
@@ -403,11 +332,7 @@ static double qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
8.85919720756468632317e+03, /* 0x40C14D99, 0x3E18F46D */
3.70146267776887834771e+04, /* 0x40E212D4, 0x0E901566 */
};
-#ifdef __STDC__
static const double qS8[6] = {
-#else
-static double qS8[6] = {
-#endif
1.63776026895689824414e+02, /* 0x406478D5, 0x365B39BC */
8.09834494656449805916e+03, /* 0x40BFA258, 0x4E6B0563 */
1.42538291419120476348e+05, /* 0x41016652, 0x54D38C3F */
@@ -416,11 +341,7 @@ static double qS8[6] = {
-3.43899293537866615225e+05, /* 0xC114FD6D, 0x2C9530C5 */
};
-#ifdef __STDC__
static const double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
1.84085963594515531381e-11, /* 0x3DB43D8F, 0x29CC8CD9 */
7.32421766612684765896e-02, /* 0x3FB2BFFF, 0xD172B04C */
5.83563508962056953777e+00, /* 0x401757B0, 0xB9953DD3 */
@@ -428,11 +349,7 @@ static double qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
1.02724376596164097464e+03, /* 0x40900CF9, 0x9DC8C481 */
1.98997785864605384631e+03, /* 0x409F17E9, 0x53C6E3A6 */
};
-#ifdef __STDC__
static const double qS5[6] = {
-#else
-static double qS5[6] = {
-#endif
8.27766102236537761883e+01, /* 0x4054B1B3, 0xFB5E1543 */
2.07781416421392987104e+03, /* 0x40A03BA0, 0xDA21C0CE */
1.88472887785718085070e+04, /* 0x40D267D2, 0x7B591E6D */
@@ -441,11 +358,7 @@ static double qS5[6] = {
-5.35434275601944773371e+03, /* 0xC0B4EA57, 0xBEDBC609 */
};
-#ifdef __STDC__
static const double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
4.37741014089738620906e-09, /* 0x3E32CD03, 0x6ADECB82 */
7.32411180042911447163e-02, /* 0x3FB2BFEE, 0x0E8D0842 */
3.34423137516170720929e+00, /* 0x400AC0FC, 0x61149CF5 */
@@ -453,11 +366,7 @@ static double qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
1.70808091340565596283e+02, /* 0x406559DB, 0xE25EFD1F */
1.66733948696651168575e+02, /* 0x4064D77C, 0x81FA21E0 */
};
-#ifdef __STDC__
static const double qS3[6] = {
-#else
-static double qS3[6] = {
-#endif
4.87588729724587182091e+01, /* 0x40486122, 0xBFE343A6 */
7.09689221056606015736e+02, /* 0x40862D83, 0x86544EB3 */
3.70414822620111362994e+03, /* 0x40ACF04B, 0xE44DFC63 */
@@ -466,11 +375,7 @@ static double qS3[6] = {
-1.49247451836156386662e+02, /* 0xC062A7EB, 0x201CF40F */
};
-#ifdef __STDC__
static const double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
1.50444444886983272379e-07, /* 0x3E84313B, 0x54F76BDB */
7.32234265963079278272e-02, /* 0x3FB2BEC5, 0x3E883E34 */
1.99819174093815998816e+00, /* 0x3FFFF897, 0xE727779C */
@@ -478,11 +383,7 @@ static double qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
3.16662317504781540833e+01, /* 0x403FAA8E, 0x29FBDC4A */
1.62527075710929267416e+01, /* 0x403040B1, 0x71814BB4 */
};
-#ifdef __STDC__
static const double qS2[6] = {
-#else
-static double qS2[6] = {
-#endif
3.03655848355219184498e+01, /* 0x403E5D96, 0xF7C07AED */
2.69348118608049844624e+02, /* 0x4070D591, 0xE4D14B40 */
8.44783757595320139444e+02, /* 0x408A6645, 0x22B3BF22 */
@@ -491,18 +392,10 @@ static double qS2[6] = {
-5.31095493882666946917e+00, /* 0xC0153E6A, 0xF8B32931 */
};
-#ifdef __STDC__
- static double qzero(double x)
-#else
- static double qzero(x)
- double x;
-#endif
+static double
+qzero(double x)
{
-#ifdef __STDC__
const double *p,*q;
-#else
- double *p,*q;
-#endif
double s,r,z,z2,z4,z6,r1,r2,r3,s1,s2,s3;
int32_t ix;
GET_HIGH_WORD(ix,x);
diff --git a/sysdeps/ieee754/dbl-64/e_j1.c b/sysdeps/ieee754/dbl-64/e_j1.c
index 8a3b2ffd19..fdc6b5b896 100644
--- a/sysdeps/ieee754/dbl-64/e_j1.c
+++ b/sysdeps/ieee754/dbl-64/e_j1.c
@@ -13,10 +13,6 @@
for performance improvement on pipelined processors.
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_j1.c,v 1.8 1995/05/10 20:45:27 jtc Exp $";
-#endif
-
/* __ieee754_j1(x), __ieee754_y1(x)
* Bessel function of the first and second kinds of order zero.
* Method -- j1(x):
@@ -26,17 +22,17 @@ static char rcsid[] = "$NetBSD: e_j1.c,v 1.8 1995/05/10 20:45:27 jtc Exp $";
* j1(x) = x/2 + x*z*R0/S0, where z = x*x;
* (precision: |j1/x - 1/2 - R0/S0 |<2**-61.51 )
* for x in (2,inf)
- * j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
+ * j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
+ * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
+ * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
* as follow:
* cos(x1) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
* = 1/sqrt(2) * (sin(x) - cos(x))
* sin(x1) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
* = -1/sqrt(2) * (sin(x) + cos(x))
- * (To avoid cancellation, use
+ * (To avoid cancellation, use
* sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.)
+ * to compute the worse one.)
*
* 3 Special cases
* j1(nan)= nan
@@ -57,25 +53,17 @@ static char rcsid[] = "$NetBSD: e_j1.c,v 1.8 1995/05/10 20:45:27 jtc Exp $";
* Note: For tiny x, 1/x dominate y1 and hence
* y1(tiny) = -2/pi/tiny, (choose tiny<2**-54)
* 3. For x>=2.
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
+ * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
+ * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
* by method mentioned above.
*/
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static double pone(double), qone(double);
-#else
-static double pone(), qone();
-#endif
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
huge = 1e300,
one = 1.0,
invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
@@ -91,25 +79,17 @@ S[] = {0.0, 1.91537599538363460805e-02, /* 0x3F939D0B, 0x12637E53 */
5.04636257076217042715e-09, /* 0x3E35AC88, 0xC97DFF2C */
1.23542274426137913908e-11}; /* 0x3DAB2ACF, 0xCFB97ED8 */
-#ifdef __STDC__
static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-#ifdef __STDC__
- double __ieee754_j1(double x)
-#else
- double __ieee754_j1(x)
- double x;
-#endif
+double
+__ieee754_j1(double x)
{
double z, s,c,ss,cc,r,u,v,y,r1,r2,s1,s2,s3,z2,z4;
int32_t hx,ix;
GET_HIGH_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) return one/x;
+ if(__builtin_expect(ix>=0x7ff00000, 0)) return one/x;
y = fabs(x);
if(ix >= 0x40000000) { /* |x| >= 2.0 */
__sincos (y, &s, &c);
@@ -118,7 +98,7 @@ static double zero = 0.0;
if(ix<0x7fe00000) { /* make sure y+y not overflow */
z = __cos(y+y);
if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
+ else ss = z/cc;
}
/*
* j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
@@ -130,9 +110,9 @@ static double zero = 0.0;
z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrt(y);
}
if(hx<0) return -z;
- else return z;
+ else return z;
}
- if(ix<0x3e400000) { /* |x|<2**-27 */
+ if(__builtin_expect(ix<0x3e400000, 0)) { /* |x|<2**-27 */
if(huge+x>one) return 0.5*x;/* inexact if x!=0 necessary */
}
z = x*x;
@@ -144,7 +124,7 @@ static double zero = 0.0;
r1 = z*R[0]; z2=z*z;
r2 = R[1]+z*R[2]; z4=z2*z2;
r = r1 + z2*r2 + z4*R[3];
- r *= x;
+ r *= x;
s1 = one+z*S[1];
s2 = S[2]+z*S[3];
s3 = S[4]+z*S[5];
@@ -152,23 +132,16 @@ static double zero = 0.0;
#endif
return(x*0.5+r/s);
}
+strong_alias (__ieee754_j1, __j1_finite)
-#ifdef __STDC__
static const double U0[5] = {
-#else
-static double U0[5] = {
-#endif
-1.96057090646238940668e-01, /* 0xBFC91866, 0x143CBC8A */
5.04438716639811282616e-02, /* 0x3FA9D3C7, 0x76292CD1 */
-1.91256895875763547298e-03, /* 0xBF5F55E5, 0x4844F50F */
2.35252600561610495928e-05, /* 0x3EF8AB03, 0x8FA6B88E */
-9.19099158039878874504e-08, /* 0xBE78AC00, 0x569105B8 */
};
-#ifdef __STDC__
static const double V0[5] = {
-#else
-static double V0[5] = {
-#endif
1.99167318236649903973e-02, /* 0x3F94650D, 0x3F4DA9F0 */
2.02552581025135171496e-04, /* 0x3F2A8C89, 0x6C257764 */
1.35608801097516229404e-06, /* 0x3EB6C05A, 0x894E8CA6 */
@@ -176,56 +149,53 @@ static double V0[5] = {
1.66559246207992079114e-11, /* 0x3DB25039, 0xDACA772A */
};
-#ifdef __STDC__
- double __ieee754_y1(double x)
-#else
- double __ieee754_y1(x)
- double x;
-#endif
+double
+__ieee754_y1(double x)
{
double z, s,c,ss,cc,u,v,u1,u2,v1,v2,v3,z2,z4;
int32_t hx,ix,lx;
EXTRACT_WORDS(hx,lx,x);
- ix = 0x7fffffff&hx;
+ ix = 0x7fffffff&hx;
/* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
- if(ix>=0x7ff00000) return one/(x+x*x);
- if((ix|lx)==0) return -HUGE_VAL+x; /* -inf and overflow exception. */;
- if(hx<0) return zero/(zero*x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ if(__builtin_expect(ix>=0x7ff00000, 0)) return one/(x+x*x);
+ if(__builtin_expect((ix|lx)==0, 0))
+ return -HUGE_VAL+x; /* -inf and overflow exception. */;
+ if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
__sincos (x, &s, &c);
- ss = -s-c;
- cc = s-c;
- if(ix<0x7fe00000) { /* make sure x+x not overflow */
- z = __cos(x+x);
- if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
- }
- /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
- * where x0 = x-3pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = -1/sqrt(2) * (cos(x) + sin(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrt(x);
- else {
- u = pone(x); v = qone(x);
- z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrt(x);
- }
- return z;
- }
- if(ix<=0x3c900000) { /* x < 2**-54 */
- return(-tpi/x);
- }
- z = x*x;
+ ss = -s-c;
+ cc = s-c;
+ if(ix<0x7fe00000) { /* make sure x+x not overflow */
+ z = __cos(x+x);
+ if ((s*c)>zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
+ * where x0 = x-3pi/4
+ * Better formula:
+ * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+ * = -1/sqrt(2) * (cos(x) + sin(x))
+ * To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.
+ */
+ if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrt(x);
+ else {
+ u = pone(x); v = qone(x);
+ z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrt(x);
+ }
+ return z;
+ }
+ if(__builtin_expect(ix<=0x3c900000, 0)) { /* x < 2**-54 */
+ return(-tpi/x);
+ }
+ z = x*x;
#ifdef DO_NOT_USE_THIS
- u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
- v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
+ u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
+ v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
#else
u1 = U0[0]+z*U0[1];z2=z*z;
u2 = U0[2]+z*U0[3];z4=z2*z2;
@@ -235,24 +205,21 @@ static double V0[5] = {
v3 = V0[3]+z*V0[4];
v = v1 + z2*v2 + z4*v3;
#endif
- return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x));
+ return(x*(u/v) + tpi*(__ieee754_j1(x)*__ieee754_log(x)-one/x));
}
+strong_alias (__ieee754_y1, __y1_finite)
/* For x >= 8, the asymptotic expansions of pone is
* 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
* We approximate pone by
- * pone(x) = 1 + (R/S)
+ * pone(x) = 1 + (R/S)
* where R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10
- * S = 1 + ps0*s^2 + ... + ps4*s^10
+ * S = 1 + ps0*s^2 + ... + ps4*s^10
* and
* | pone(x)-1-R/S | <= 2 ** ( -60.06)
*/
-#ifdef __STDC__
static const double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
1.17187499999988647970e-01, /* 0x3FBDFFFF, 0xFFFFFCCE */
1.32394806593073575129e+01, /* 0x402A7A9D, 0x357F7FCE */
@@ -260,11 +227,7 @@ static double pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
3.87474538913960532227e+03, /* 0x40AE457D, 0xA3A532CC */
7.91447954031891731574e+03, /* 0x40BEEA7A, 0xC32782DD */
};
-#ifdef __STDC__
static const double ps8[5] = {
-#else
-static double ps8[5] = {
-#endif
1.14207370375678408436e+02, /* 0x405C8D45, 0x8E656CAC */
3.65093083420853463394e+03, /* 0x40AC85DC, 0x964D274F */
3.69562060269033463555e+04, /* 0x40E20B86, 0x97C5BB7F */
@@ -272,11 +235,7 @@ static double ps8[5] = {
3.08042720627888811578e+04, /* 0x40DE1511, 0x697A0B2D */
};
-#ifdef __STDC__
static const double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
1.31990519556243522749e-11, /* 0x3DAD0667, 0xDAE1CA7D */
1.17187493190614097638e-01, /* 0x3FBDFFFF, 0xE2C10043 */
6.80275127868432871736e+00, /* 0x401B3604, 0x6E6315E3 */
@@ -284,11 +243,7 @@ static double pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
5.17636139533199752805e+02, /* 0x40802D16, 0xD052D649 */
5.28715201363337541807e+02, /* 0x408085B8, 0xBB7E0CB7 */
};
-#ifdef __STDC__
static const double ps5[5] = {
-#else
-static double ps5[5] = {
-#endif
5.92805987221131331921e+01, /* 0x404DA3EA, 0xA8AF633D */
9.91401418733614377743e+02, /* 0x408EFB36, 0x1B066701 */
5.35326695291487976647e+03, /* 0x40B4E944, 0x5706B6FB */
@@ -296,11 +251,7 @@ static double ps5[5] = {
1.50404688810361062679e+03, /* 0x40978030, 0x036F5E51 */
};
-#ifdef __STDC__
static const double pr3[6] = {
-#else
-static double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
3.02503916137373618024e-09, /* 0x3E29FC21, 0xA7AD9EDD */
1.17186865567253592491e-01, /* 0x3FBDFFF5, 0x5B21D17B */
3.93297750033315640650e+00, /* 0x400F76BC, 0xE85EAD8A */
@@ -308,11 +259,7 @@ static double pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
9.10550110750781271918e+01, /* 0x4056C385, 0x4D2C1837 */
4.85590685197364919645e+01, /* 0x4048478F, 0x8EA83EE5 */
};
-#ifdef __STDC__
static const double ps3[5] = {
-#else
-static double ps3[5] = {
-#endif
3.47913095001251519989e+01, /* 0x40416549, 0xA134069C */
3.36762458747825746741e+02, /* 0x40750C33, 0x07F1A75F */
1.04687139975775130551e+03, /* 0x40905B7C, 0x5037D523 */
@@ -320,11 +267,7 @@ static double ps3[5] = {
1.03787932439639277504e+02, /* 0x4059F26D, 0x7C2EED53 */
};
-#ifdef __STDC__
static const double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
1.07710830106873743082e-07, /* 0x3E7CE9D4, 0xF65544F4 */
1.17176219462683348094e-01, /* 0x3FBDFF42, 0xBE760D83 */
2.36851496667608785174e+00, /* 0x4002F2B7, 0xF98FAEC0 */
@@ -332,11 +275,7 @@ static double pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
1.76939711271687727390e+01, /* 0x4031B1A8, 0x177F8EE2 */
5.07352312588818499250e+00, /* 0x40144B49, 0xA574C1FE */
};
-#ifdef __STDC__
static const double ps2[5] = {
-#else
-static double ps2[5] = {
-#endif
2.14364859363821409488e+01, /* 0x40356FBD, 0x8AD5ECDC */
1.25290227168402751090e+02, /* 0x405F5293, 0x14F92CD5 */
2.32276469057162813669e+02, /* 0x406D08D8, 0xD5A2DBD9 */
@@ -344,30 +283,22 @@ static double ps2[5] = {
8.36463893371618283368e+00, /* 0x4020BAB1, 0xF44E5192 */
};
-#ifdef __STDC__
- static double pone(double x)
-#else
- static double pone(x)
- double x;
-#endif
+static double
+pone(double x)
{
-#ifdef __STDC__
const double *p,*q;
-#else
- double *p,*q;
-#endif
double z,r,s,r1,r2,r3,s1,s2,s3,z2,z4;
- int32_t ix;
+ int32_t ix;
GET_HIGH_WORD(ix,x);
ix &= 0x7fffffff;
- if(ix>=0x40200000) {p = pr8; q= ps8;}
- else if(ix>=0x40122E8B){p = pr5; q= ps5;}
- else if(ix>=0x4006DB6D){p = pr3; q= ps3;}
- else if(ix>=0x40000000){p = pr2; q= ps2;}
- z = one/(x*x);
+ if(ix>=0x40200000) {p = pr8; q= ps8;}
+ else if(ix>=0x40122E8B){p = pr5; q= ps5;}
+ else if(ix>=0x4006DB6D){p = pr3; q= ps3;}
+ else if(ix>=0x40000000){p = pr2; q= ps2;}
+ z = one/(x*x);
#ifdef DO_NOT_USE_THIS
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
+ r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
+ s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
#else
r1 = p[0]+z*p[1]; z2=z*z;
r2 = p[2]+z*p[3]; z4=z2*z2;
@@ -378,25 +309,21 @@ static double ps2[5] = {
s3 = q[3]+z*q[4];
s = s1 + z2*s2 + z4*s3;
#endif
- return one+ r/s;
+ return one+ r/s;
}
/* For x >= 8, the asymptotic expansions of qone is
* 3/8 s - 105/1024 s^3 - ..., where s = 1/x.
* We approximate pone by
- * qone(x) = s*(0.375 + (R/S))
+ * qone(x) = s*(0.375 + (R/S))
* where R = qr1*s^2 + qr2*s^4 + ... + qr5*s^10
- * S = 1 + qs1*s^2 + ... + qs6*s^12
+ * S = 1 + qs1*s^2 + ... + qs6*s^12
* and
* | qone(x)/s -0.375-R/S | <= 2 ** ( -61.13)
*/
-#ifdef __STDC__
static const double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
-1.02539062499992714161e-01, /* 0xBFBA3FFF, 0xFFFFFDF3 */
-1.62717534544589987888e+01, /* 0xC0304591, 0xA26779F7 */
@@ -404,11 +331,7 @@ static double qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-1.18498066702429587167e+04, /* 0xC0C724E7, 0x40F87415 */
-4.84385124285750353010e+04, /* 0xC0E7A6D0, 0x65D09C6A */
};
-#ifdef __STDC__
static const double qs8[6] = {
-#else
-static double qs8[6] = {
-#endif
1.61395369700722909556e+02, /* 0x40642CA6, 0xDE5BCDE5 */
7.82538599923348465381e+03, /* 0x40BE9162, 0xD0D88419 */
1.33875336287249578163e+05, /* 0x4100579A, 0xB0B75E98 */
@@ -417,11 +340,7 @@ static double qs8[6] = {
-2.94490264303834643215e+05, /* 0xC111F969, 0x0EA5AA18 */
};
-#ifdef __STDC__
static const double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
-2.08979931141764104297e-11, /* 0xBDB6FA43, 0x1AA1A098 */
-1.02539050241375426231e-01, /* 0xBFBA3FFF, 0xCB597FEF */
-8.05644828123936029840e+00, /* 0xC0201CE6, 0xCA03AD4B */
@@ -429,11 +348,7 @@ static double qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-1.37319376065508163265e+03, /* 0xC09574C6, 0x6931734F */
-2.61244440453215656817e+03, /* 0xC0A468E3, 0x88FDA79D */
};
-#ifdef __STDC__
static const double qs5[6] = {
-#else
-static double qs5[6] = {
-#endif
8.12765501384335777857e+01, /* 0x405451B2, 0xFF5A11B2 */
1.99179873460485964642e+03, /* 0x409F1F31, 0xE77BF839 */
1.74684851924908907677e+04, /* 0x40D10F1F, 0x0D64CE29 */
@@ -442,11 +357,7 @@ static double qs5[6] = {
-4.71918354795128470869e+03, /* 0xC0B26F2E, 0xFCFFA004 */
};
-#ifdef __STDC__
static const double qr3[6] = {
-#else
-static double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
-5.07831226461766561369e-09, /* 0xBE35CFA9, 0xD38FC84F */
-1.02537829820837089745e-01, /* 0xBFBA3FEB, 0x51AEED54 */
-4.61011581139473403113e+00, /* 0xC01270C2, 0x3302D9FF */
@@ -454,11 +365,7 @@ static double qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-2.28244540737631695038e+02, /* 0xC06C87D3, 0x4718D55F */
-2.19210128478909325622e+02, /* 0xC06B66B9, 0x5F5C1BF6 */
};
-#ifdef __STDC__
static const double qs3[6] = {
-#else
-static double qs3[6] = {
-#endif
4.76651550323729509273e+01, /* 0x4047D523, 0xCCD367E4 */
6.73865112676699709482e+02, /* 0x40850EEB, 0xC031EE3E */
3.38015286679526343505e+03, /* 0x40AA684E, 0x448E7C9A */
@@ -467,11 +374,7 @@ static double qs3[6] = {
-1.35201191444307340817e+02, /* 0xC060E670, 0x290A311F */
};
-#ifdef __STDC__
static const double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
-1.78381727510958865572e-07, /* 0xBE87F126, 0x44C626D2 */
-1.02517042607985553460e-01, /* 0xBFBA3E8E, 0x9148B010 */
-2.75220568278187460720e+00, /* 0xC0060484, 0x69BB4EDA */
@@ -479,11 +382,7 @@ static double qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-4.23253133372830490089e+01, /* 0xC04529A3, 0xDE104AAA */
-2.13719211703704061733e+01, /* 0xC0355F36, 0x39CF6E52 */
};
-#ifdef __STDC__
static const double qs2[6] = {
-#else
-static double qs2[6] = {
-#endif
2.95333629060523854548e+01, /* 0x403D888A, 0x78AE64FF */
2.52981549982190529136e+02, /* 0x406F9F68, 0xDB821CBA */
7.57502834868645436472e+02, /* 0x4087AC05, 0xCE49A0F7 */
@@ -492,18 +391,10 @@ static double qs2[6] = {
-4.95949898822628210127e+00, /* 0xC013D686, 0xE71BE86B */
};
-#ifdef __STDC__
- static double qone(double x)
-#else
- static double qone(x)
- double x;
-#endif
+static double
+qone(double x)
{
-#ifdef __STDC__
const double *p,*q;
-#else
- double *p,*q;
-#endif
double s,r,z,r1,r2,r3,s1,s2,s3,z2,z4,z6;
int32_t ix;
GET_HIGH_WORD(ix,x);
diff --git a/sysdeps/ieee754/dbl-64/e_jn.c b/sysdeps/ieee754/dbl-64/e_jn.c
index d9d6f91762..f8b8e2ee6a 100644
--- a/sysdeps/ieee754/dbl-64/e_jn.c
+++ b/sysdeps/ieee754/dbl-64/e_jn.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_jn.c,v 1.9 1995/05/10 20:45:34 jtc Exp $";
-#endif
-
/*
* __ieee754_jn(n, x), __ieee754_yn(n, x)
* floating point Bessel's function of the 1st and 2nd kind
@@ -43,27 +39,15 @@ static char rcsid[] = "$NetBSD: e_jn.c,v 1.9 1995/05/10 20:45:34 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
invsqrtpi= 5.64189583547756279280e-01, /* 0x3FE20DD7, 0x50429B6D */
two = 2.00000000000000000000e+00, /* 0x40000000, 0x00000000 */
one = 1.00000000000000000000e+00; /* 0x3FF00000, 0x00000000 */
-#ifdef __STDC__
static const double zero = 0.00000000000000000000e+00;
-#else
-static double zero = 0.00000000000000000000e+00;
-#endif
-#ifdef __STDC__
- double __ieee754_jn(int n, double x)
-#else
- double __ieee754_jn(n,x)
- int n; double x;
-#endif
+double
+__ieee754_jn(int n, double x)
{
int32_t i,hx,ix,lx, sgn;
double a, b, temp, di;
@@ -75,7 +59,8 @@ static double zero = 0.00000000000000000000e+00;
EXTRACT_WORDS(hx,lx,x);
ix = 0x7fffffff&hx;
/* if J(n,NaN) is NaN */
- if((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000) return x+x;
+ if(__builtin_expect((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000, 0))
+ return x+x;
if(n<0){
n = -n;
x = -x;
@@ -85,8 +70,9 @@ static double zero = 0.00000000000000000000e+00;
if(n==1) return(__ieee754_j1(x));
sgn = (n&1)&(hx>>31); /* even n -- 0, odd n -- sign(x) */
x = fabs(x);
- if((ix|lx)==0||ix>=0x7ff00000) /* if x is 0 or inf */
- b = zero;
+ if(__builtin_expect((ix|lx)==0||ix>=0x7ff00000,0))
+ /* if x is 0 or inf */
+ b = zero;
else if((double)n<=x) {
/* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
if(ix>=0x52D00000) { /* x > 2**302 */
@@ -99,7 +85,7 @@ static double zero = 0.00000000000000000000e+00;
* n sin(xn)*sqt2 cos(xn)*sqt2
* ----------------------------------
* 0 s-c c+s
- * 1 -s-c -c+s
+ * 1 -s-c -c+s
* 2 -s+c -c-s
* 3 s+c c-s
*/
@@ -114,13 +100,13 @@ static double zero = 0.00000000000000000000e+00;
}
b = invsqrtpi*temp/__ieee754_sqrt(x);
} else {
- a = __ieee754_j0(x);
- b = __ieee754_j1(x);
- for(i=1;i<n;i++){
+ a = __ieee754_j0(x);
+ b = __ieee754_j1(x);
+ for(i=1;i<n;i++){
temp = b;
b = b*((double)(i+i)/x) - a; /* avoid underflow */
a = temp;
- }
+ }
}
} else {
if(ix<0x3e100000) { /* x < 2**-29 */
@@ -139,11 +125,11 @@ static double zero = 0.00000000000000000000e+00;
}
} else {
/* use backward recurrence */
- /* x x^2 x^2
+ /* x x^2 x^2
* J(n,x)/J(n-1,x) = ---- ------ ------ .....
* 2n - 2(n+1) - 2(n+2)
*
- * 1 1 1
+ * 1 1 1
* (for large x) = ---- ------ ------ .....
* 2n 2(n+1) 2(n+2)
* -- - ------ - ------ -
@@ -156,7 +142,7 @@ static double zero = 0.00000000000000000000e+00;
* 1
* w - -----------------
* 1
- * w+h - ---------
+ * w+h - ---------
* w+2h - ...
*
* To determine how many terms needed, let
@@ -193,19 +179,19 @@ static double zero = 0.00000000000000000000e+00;
v = two/x;
tmp = tmp*__ieee754_log(fabs(v*tmp));
if(tmp<7.09782712893383973096e+02) {
- for(i=n-1,di=(double)(i+i);i>0;i--){
- temp = b;
+ for(i=n-1,di=(double)(i+i);i>0;i--){
+ temp = b;
b *= di;
b = b/x - a;
- a = temp;
+ a = temp;
di -= two;
- }
+ }
} else {
- for(i=n-1,di=(double)(i+i);i>0;i--){
- temp = b;
+ for(i=n-1,di=(double)(i+i);i>0;i--){
+ temp = b;
b *= di;
b = b/x - a;
- a = temp;
+ a = temp;
di -= two;
/* scale b to avoid spurious overflow */
if(b>1e100) {
@@ -213,7 +199,7 @@ static double zero = 0.00000000000000000000e+00;
t /= b;
b = one;
}
- }
+ }
}
/* j0() and j1() suffer enormous loss of precision at and
* near zero; however, we know that their zero points never
@@ -229,13 +215,10 @@ static double zero = 0.00000000000000000000e+00;
}
if(sgn==1) return -b; else return b;
}
+strong_alias (__ieee754_jn, __jn_finite)
-#ifdef __STDC__
- double __ieee754_yn(int n, double x)
-#else
- double __ieee754_yn(n,x)
- int n; double x;
-#endif
+double
+__ieee754_yn(int n, double x)
{
int32_t i,hx,ix,lx;
int32_t sign;
@@ -244,9 +227,11 @@ static double zero = 0.00000000000000000000e+00;
EXTRACT_WORDS(hx,lx,x);
ix = 0x7fffffff&hx;
/* if Y(n,NaN) is NaN */
- if((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000) return x+x;
- if((ix|lx)==0) return -HUGE_VAL+x; /* -inf and overflow exception. */;
- if(hx<0) return zero/(zero*x);
+ if(__builtin_expect((ix|((u_int32_t)(lx|-lx))>>31)>0x7ff00000,0))
+ return x+x;
+ if(__builtin_expect((ix|lx)==0, 0))
+ return -HUGE_VAL+x; /* -inf and overflow exception. */;
+ if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
sign = 1;
if(n<0){
n = -n;
@@ -254,7 +239,7 @@ static double zero = 0.00000000000000000000e+00;
}
if(n==0) return(__ieee754_y0(x));
if(n==1) return(sign*__ieee754_y1(x));
- if(ix==0x7ff00000) return zero;
+ if(__builtin_expect(ix==0x7ff00000, 0)) return zero;
if(ix>=0x52D00000) { /* x > 2**302 */
/* (x >> n**2)
* Jn(x) = cos(x-(2n+1)*pi/4)*sqrt(2/x*pi)
@@ -265,7 +250,7 @@ static double zero = 0.00000000000000000000e+00;
* n sin(xn)*sqt2 cos(xn)*sqt2
* ----------------------------------
* 0 s-c c+s
- * 1 -s-c -c+s
+ * 1 -s-c -c+s
* 2 -s+c -c-s
* 3 s+c c-s
*/
@@ -294,3 +279,4 @@ static double zero = 0.00000000000000000000e+00;
}
if(sign>0) return b; else return -b;
}
+strong_alias (__ieee754_yn, __yn_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_lgamma_r.c b/sysdeps/ieee754/dbl-64/e_lgamma_r.c
index a298a5a2a4..e26ce8a247 100644
--- a/sysdeps/ieee754/dbl-64/e_lgamma_r.c
+++ b/sysdeps/ieee754/dbl-64/e_lgamma_r.c
@@ -10,19 +10,15 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_lgamma_r.c,v 1.7 1995/05/10 20:45:42 jtc Exp $";
-#endif
-
/* __ieee754_lgamma_r(x, signgamp)
* Reentrant version of the logarithm of the Gamma function
* with user provide pointer for the sign of Gamma(x).
*
* Method:
* 1. Argument Reduction for 0 < x <= 8
- * Since gamma(1+s)=s*gamma(s), for x in [0,8], we may
- * reduce x to a number in [1.5,2.5] by
- * lgamma(1+s) = log(s) + lgamma(s)
+ * Since gamma(1+s)=s*gamma(s), for x in [0,8], we may
+ * reduce x to a number in [1.5,2.5] by
+ * lgamma(1+s) = log(s) + lgamma(s)
* for example,
* lgamma(7.3) = log(6.3) + lgamma(6.3)
* = log(6.3*5.3) + lgamma(5.3)
@@ -56,15 +52,15 @@ static char rcsid[] = "$NetBSD: e_lgamma_r.c,v 1.7 1995/05/10 20:45:42 jtc Exp $
* Let z = 1/x, then we approximation
* f(z) = lgamma(x) - (x-0.5)(log(x)-1)
* by
- * 3 5 11
+ * 3 5 11
* w = w0 + w1*z + w2*z + w3*z + ... + w6*z
* where
* |w - f(z)| < 2**-58.74
*
* 4. For negative x, since (G is gamma function)
* -x*G(-x)*G(x) = pi/sin(pi*x),
- * we have
- * G(x) = pi/(sin(pi*x)*(-x)*G(-x))
+ * we have
+ * G(x) = pi/(sin(pi*x)*(-x)*G(-x))
* since G(-x) is positive, sign(G(x)) = sign(sin(pi*x)) for x<0
* Hence, for x<0, signgam = sign(sin(pi*x)) and
* lgamma(x) = log(|Gamma(x)|)
@@ -77,18 +73,14 @@ static char rcsid[] = "$NetBSD: e_lgamma_r.c,v 1.7 1995/05/10 20:45:42 jtc Exp $
* lgamma(1)=lgamma(2)=0
* lgamma(x) ~ -log(x) for tiny x
* lgamma(0) = lgamma(inf) = inf
- * lgamma(-integer) = +-inf
+ * lgamma(-integer) = +-inf
*
*/
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
two52= 4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
half= 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
@@ -156,18 +148,10 @@ w4 = -5.95187557450339963135e-04, /* 0xBF4380CB, 0x8C0FE741 */
w5 = 8.36339918996282139126e-04, /* 0x3F4B67BA, 0x4CDAD5D1 */
w6 = -1.63092934096575273989e-03; /* 0xBF5AB89D, 0x0B9E43E4 */
-#ifdef __STDC__
static const double zero= 0.00000000000000000000e+00;
-#else
-static double zero= 0.00000000000000000000e+00;
-#endif
-#ifdef __STDC__
- static double sin_pi(double x)
-#else
- static double sin_pi(x)
- double x;
-#endif
+static double
+sin_pi(double x)
{
double y,z;
int n,ix;
@@ -188,16 +172,16 @@ static double zero= 0.00000000000000000000e+00;
y = 2.0*(y - __floor(y)); /* y = |x| mod 2.0 */
n = (int) (y*4.0);
} else {
- if(ix>=0x43400000) {
- y = zero; n = 0; /* y must be even */
- } else {
- if(ix<0x43300000) z = y+two52; /* exact */
+ if(ix>=0x43400000) {
+ y = zero; n = 0; /* y must be even */
+ } else {
+ if(ix<0x43300000) z = y+two52; /* exact */
GET_LOW_WORD(n,z);
n &= 1;
- y = n;
- n<<= 2;
- }
- }
+ y = n;
+ n<<= 2;
+ }
+ }
switch (n) {
case 0: y = __sin(pi*y); break;
case 1:
@@ -212,12 +196,8 @@ static double zero= 0.00000000000000000000e+00;
}
-#ifdef __STDC__
- double __ieee754_lgamma_r(double x, int *signgamp)
-#else
- double __ieee754_lgamma_r(x,signgamp)
- double x; int *signgamp;
-#endif
+double
+__ieee754_lgamma_r(double x, int *signgamp)
{
double t,y,z,nadj,p,p1,p2,p3,q,r,w;
int i,hx,lx,ix;
@@ -227,21 +207,23 @@ static double zero= 0.00000000000000000000e+00;
/* purge off +-inf, NaN, +-0, and negative arguments */
*signgamp = 1;
ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) return x*x;
- if((ix|lx)==0)
+ if(__builtin_expect(ix>=0x7ff00000, 0)) return x*x;
+ if(__builtin_expect((ix|lx)==0, 0))
{
if (hx < 0)
*signgamp = -1;
return one/fabs(x);
}
- if(ix<0x3b900000) { /* |x|<2**-70, return -log(|x|) */
+ if(__builtin_expect(ix<0x3b900000, 0)) {
+ /* |x|<2**-70, return -log(|x|) */
if(hx<0) {
- *signgamp = -1;
- return -__ieee754_log(-x);
+ *signgamp = -1;
+ return -__ieee754_log(-x);
} else return -__ieee754_log(x);
}
if(hx<0) {
- if(ix>=0x43300000) /* |x|>=2**52, must be -integer */
+ if(__builtin_expect(ix>=0x43300000, 0))
+ /* |x|>=2**52, must be -integer */
return x/zero;
t = sin_pi(x);
if(t==zero) return one/fabsf(t); /* -integer */
@@ -254,15 +236,15 @@ static double zero= 0.00000000000000000000e+00;
if((((ix-0x3ff00000)|lx)==0)||(((ix-0x40000000)|lx)==0)) r = 0;
/* for x < 2.0 */
else if(ix<0x40000000) {
- if(ix<=0x3feccccc) { /* lgamma(x) = lgamma(x+1)-log(x) */
+ if(ix<=0x3feccccc) { /* lgamma(x) = lgamma(x+1)-log(x) */
r = -__ieee754_log(x);
if(ix>=0x3FE76944) {y = one-x; i= 0;}
else if(ix>=0x3FCDA661) {y= x-(tc-one); i=1;}
- else {y = x; i=2;}
+ else {y = x; i=2;}
} else {
- r = zero;
- if(ix>=0x3FFBB4C3) {y=2.0-x;i=0;} /* [1.7316,2] */
- else if(ix>=0x3FF3B4C4) {y=x-tc;i=1;} /* [1.23,1.73] */
+ r = zero;
+ if(ix>=0x3FFBB4C3) {y=2.0-x;i=0;} /* [1.7316,2] */
+ else if(ix>=0x3FF3B4C4) {y=x-tc;i=1;} /* [1.23,1.73] */
else {y=x-one;i=2;}
}
switch(i) {
@@ -286,7 +268,7 @@ static double zero= 0.00000000000000000000e+00;
r += (-0.5*y + p1/p2);
}
}
- else if(ix<0x40200000) { /* x < 8.0 */
+ else if(ix<0x40200000) { /* x < 8.0 */
i = (int)x;
t = zero;
y = x-(double)i;
@@ -315,3 +297,4 @@ static double zero= 0.00000000000000000000e+00;
if(hx<0) r = nadj - r;
return r;
}
+strong_alias (__ieee754_lgamma_r, __lgamma_r_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_log.c b/sysdeps/ieee754/dbl-64/e_log.c
index 1a9967b546..e45520eba8 100644
--- a/sysdeps/ieee754/dbl-64/e_log.c
+++ b/sysdeps/ieee754/dbl-64/e_log.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -36,18 +36,24 @@
#include "endian.h"
-#include "dla.h"
+#include <dla.h>
#include "mpa.h"
#include "MathLib.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
void __mplog(mp_no *, mp_no *, int);
/*********************************************************************/
/* An ultimate log routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of log(x). */
/*********************************************************************/
-double __ieee754_log(double x) {
+double
+SECTION
+__ieee754_log(double x) {
#define M 4
static const int pr[M]={8,10,18,32};
int i,j,n,ux,dx,p;
@@ -55,9 +61,12 @@ double __ieee754_log(double x) {
int k;
#endif
double dbl_n,u,p0,q,r0,w,nln2a,luai,lubi,lvaj,lvbj,
- sij,ssij,ttij,A,B,B0,y,y1,y2,polI,polII,sa,sb,
- t1,t2,t3,t4,t5,t6,t7,t8,t,ra,rb,ww,
- a0,aa0,s1,s2,ss2,s3,ss3,a1,aa1,a,aa,b,bb,c;
+ sij,ssij,ttij,A,B,B0,y,y1,y2,polI,polII,sa,sb,
+ t1,t2,t7,t8,t,ra,rb,ww,
+ a0,aa0,s1,s2,ss2,s3,ss3,a1,aa1,a,aa,b,bb,c;
+#ifndef DLA_FMS
+ double t3,t4,t5,t6;
+#endif
number num;
mp_no mpx,mpy,mpy1,mpy2,mperr;
@@ -68,18 +77,21 @@ double __ieee754_log(double x) {
num.d = x; ux = num.i[HIGH_HALF]; dx = num.i[LOW_HALF];
n=0;
- if (ux < 0x00100000) {
- if (((ux & 0x7fffffff) | dx) == 0) return MHALF/ZERO; /* return -INF */
- if (ux < 0) return (x-x)/ZERO; /* return NaN */
+ if (__builtin_expect(ux < 0x00100000, 0)) {
+ if (__builtin_expect(((ux & 0x7fffffff) | dx) == 0, 0))
+ return MHALF/ZERO; /* return -INF */
+ if (__builtin_expect(ux < 0, 0))
+ return (x-x)/ZERO; /* return NaN */
n -= 54; x *= two54.d; /* scale x */
num.d = x;
}
- if (ux >= 0x7ff00000) return x+x; /* INF or NaN */
+ if (__builtin_expect(ux >= 0x7ff00000, 0))
+ return x+x; /* INF or NaN */
/* Regular values of x */
w = x-ONE;
- if (ABS(w) > U03) { goto case_03; }
+ if (__builtin_expect(ABS(w) > U03, 1)) { goto case_03; }
/*--- Stage I, the case abs(x-1) < 0.03 */
@@ -90,7 +102,7 @@ double __ieee754_log(double x) {
/* Evaluate polynomial II */
polII = (b0.d+w*(b1.d+w*(b2.d+w*(b3.d+w*(b4.d+
- w*(b5.d+w*(b6.d+w*(b7.d+w*b8.d))))))))*w*w*w;
+ w*(b5.d+w*(b6.d+w*(b7.d+w*b8.d))))))))*w*w*w;
c = (aa+bb)+polII;
/* End stage I, case abs(x-1) < 0.03 */
@@ -99,7 +111,7 @@ double __ieee754_log(double x) {
/*--- Stage II, the case abs(x-1) < 0.03 */
a = d11.d+w*(d12.d+w*(d13.d+w*(d14.d+w*(d15.d+w*(d16.d+
- w*(d17.d+w*(d18.d+w*(d19.d+w*d20.d))))))));
+ w*(d17.d+w*(d18.d+w*(d19.d+w*d20.d))))))));
EMULV(w,a,s2,ss2,t1,t2,t3,t4,t5)
ADD2(d10.d,dd10.d,s2,ss2,s3,ss3,t1,t2)
MUL2(w,ZERO,s3,ss3,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -201,3 +213,6 @@ double __ieee754_log(double x) {
}
return y1;
}
+#ifndef __ieee754_log
+strong_alias (__ieee754_log, __log_finite)
+#endif
diff --git a/sysdeps/ieee754/dbl-64/e_log10.c b/sysdeps/ieee754/dbl-64/e_log10.c
index e8a3278eaf..6a630bcef7 100644
--- a/sysdeps/ieee754/dbl-64/e_log10.c
+++ b/sysdeps/ieee754/dbl-64/e_log10.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_log10.c,v 1.9 1995/05/10 20:45:51 jtc Exp $";
-#endif
-
/* __ieee754_log10(x)
* Return the base 10 logarithm of x
*
@@ -50,28 +46,16 @@ static char rcsid[] = "$NetBSD: e_log10.c,v 1.9 1995/05/10 20:45:51 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */
ivln10 = 4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */
log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
-#ifdef __STDC__
static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-#ifdef __STDC__
- double __ieee754_log10(double x)
-#else
- double __ieee754_log10(x)
- double x;
-#endif
+double
+__ieee754_log10(double x)
{
double y,z;
int32_t i,k,hx;
@@ -79,20 +63,22 @@ static double zero = 0.0;
EXTRACT_WORDS(hx,lx,x);
- k=0;
- if (hx < 0x00100000) { /* x < 2**-1022 */
- if (((hx&0x7fffffff)|lx)==0)
- return -two54/(x-x); /* log(+-0)=-inf */
- if (hx<0) return (x-x)/(x-x); /* log(-#) = NaN */
- k -= 54; x *= two54; /* subnormal number, scale up x */
+ k=0;
+ if (hx < 0x00100000) { /* x < 2**-1022 */
+ if (__builtin_expect(((hx&0x7fffffff)|lx)==0, 0))
+ return -two54/(x-x); /* log(+-0)=-inf */
+ if (__builtin_expect(hx<0, 0))
+ return (x-x)/(x-x); /* log(-#) = NaN */
+ k -= 54; x *= two54; /* subnormal number, scale up x */
GET_HIGH_WORD(hx,x);
- }
- if (hx >= 0x7ff00000) return x+x;
+ }
+ if (__builtin_expect(hx >= 0x7ff00000, 0)) return x+x;
k += (hx>>20)-1023;
i = ((u_int32_t)k&0x80000000)>>31;
- hx = (hx&0x000fffff)|((0x3ff-i)<<20);
- y = (double)(k+i);
+ hx = (hx&0x000fffff)|((0x3ff-i)<<20);
+ y = (double)(k+i);
SET_HIGH_WORD(x,hx);
z = y*log10_2lo + ivln10*__ieee754_log(x);
return z+y*log10_2hi;
}
+strong_alias (__ieee754_log10, __log10_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_log2.c b/sysdeps/ieee754/dbl-64/e_log2.c
index f05d0ce966..be41cb4e68 100644
--- a/sysdeps/ieee754/dbl-64/e_log2.c
+++ b/sysdeps/ieee754/dbl-64/e_log2.c
@@ -21,14 +21,14 @@
* 2. Approximation of log(1+f).
* Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
* = 2s + 2/3 s**3 + 2/5 s**5 + .....,
- * = 2s + s*R
+ * = 2s + s*R
* We use a special Reme algorithm on [0,0.1716] to generate
- * a polynomial of degree 14 to approximate R The maximum error
+ * a polynomial of degree 14 to approximate R The maximum error
* of this polynomial approximation is bounded by 2**-58.45. In
* other words,
- * 2 4 6 8 10 12 14
+ * 2 4 6 8 10 12 14
* R(z) ~ Lg1*s +Lg2*s +Lg3*s +Lg4*s +Lg5*s +Lg6*s +Lg7*s
- * (the values of Lg1 to Lg7 are listed in the program)
+ * (the values of Lg1 to Lg7 are listed in the program)
* and
* | 2 14 | -58.45
* | Lg1*s +...+Lg7*s - R(z) | <= 2
@@ -57,11 +57,7 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
ln2 = 0.69314718055994530942,
two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
Lg1 = 6.666666666666735130e-01, /* 3FE55555 55555593 */
@@ -72,18 +68,10 @@ Lg5 = 1.818357216161805012e-01, /* 3FC74664 96CB03DE */
Lg6 = 1.531383769920937332e-01, /* 3FC39A09 D078C69F */
Lg7 = 1.479819860511658591e-01; /* 3FC2F112 DF3E5244 */
-#ifdef __STDC__
static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-#ifdef __STDC__
- double __ieee754_log2(double x)
-#else
- double __ieee754_log2(x)
- double x;
-#endif
+double
+__ieee754_log2(double x)
{
double hfsq,f,s,z,R,w,t1,t2,dk;
int32_t k,hx,i,j;
@@ -93,13 +81,14 @@ static double zero = 0.0;
k=0;
if (hx < 0x00100000) { /* x < 2**-1022 */
- if (((hx&0x7fffffff)|lx)==0)
+ if (__builtin_expect(((hx&0x7fffffff)|lx)==0, 0))
return -two54/(x-x); /* log(+-0)=-inf */
- if (hx<0) return (x-x)/(x-x); /* log(-#) = NaN */
+ if (__builtin_expect(hx<0, 0))
+ return (x-x)/(x-x); /* log(-#) = NaN */
k -= 54; x *= two54; /* subnormal number, scale up x */
GET_HIGH_WORD(hx,x);
}
- if (hx >= 0x7ff00000) return x+x;
+ if (__builtin_expect(hx >= 0x7ff00000, 0)) return x+x;
k += (hx>>20)-1023;
hx &= 0x000fffff;
i = (hx+0x95f64)&0x100000;
@@ -112,7 +101,7 @@ static double zero = 0.0;
R = f*f*(0.5-0.33333333333333333*f);
return dk-(R-f)/ln2;
}
- s = f/(2.0+f);
+ s = f/(2.0+f);
z = s*s;
i = hx-0x6147a;
w = z*z;
@@ -128,3 +117,4 @@ static double zero = 0.0;
return dk-((s*(f-R))-f)/ln2;
}
}
+strong_alias (__ieee754_log2, __log2_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_pow.c b/sysdeps/ieee754/dbl-64/e_pow.c
index 1e159f2c0b..350e93986d 100644
--- a/sysdeps/ieee754/dbl-64/e_pow.c
+++ b/sysdeps/ieee754/dbl-64/e_pow.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001, 2002, 2004 Free Software Foundation
+ * Copyright (C) 2001, 2002, 2004, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -22,12 +22,12 @@
/* */
/* FUNCTIONS: upow */
/* power1 */
-/* my_log2 */
+/* my_log2 */
/* log1 */
/* checkint */
/* FILES NEEDED: dla.h endian.h mpa.h mydefs.h */
/* halfulp.c mpexp.c mplog.c slowexp.c slowpow.c mpa.c */
-/* uexp.c upow.c */
+/* uexp.c upow.c */
/* root.tbl uexp.tbl upow.tbl */
/* An ultimate power routine. Given two IEEE double machine numbers y,x */
/* it computes the correctly rounded (to nearest) value of x^y. */
@@ -37,12 +37,16 @@
/***************************************************************************/
#include "endian.h"
#include "upow.h"
-#include "dla.h"
+#include <dla.h>
#include "mydefs.h"
#include "MathLib.h"
#include "upow.tbl"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
double __exp1(double x, double xx, double error);
static double log1(double x, double *delta, double *error);
@@ -55,7 +59,9 @@ static int checkint(double x);
/* An ultimate power routine. Given two IEEE double machine numbers y,x */
/* it computes the correctly rounded (to nearest) value of X^y. */
/***************************************************************************/
-double __ieee754_pow(double x, double y) {
+double
+SECTION
+__ieee754_pow(double x, double y) {
double z,a,aa,error, t,a1,a2,y1,y2;
#if 0
double gor=1.0;
@@ -77,7 +83,7 @@ double __ieee754_pow(double x, double y) {
/* else */
if(((u.i[HIGH_HALF]>0 && u.i[HIGH_HALF]<0x7ff00000)|| /* x>0 and not x->0 */
(u.i[HIGH_HALF]==0 && u.i[LOW_HALF]!=0)) &&
- /* 2^-1023< x<= 2^-1023 * 0x1.0000ffffffff */
+ /* 2^-1023< x<= 2^-1023 * 0x1.0000ffffffff */
(v.i[HIGH_HALF]&0x7fffffff) < 0x4ff00000) { /* if y<-1 or y>1 */
z = log1(x,&aa,&error); /* x^y =e^(y log (X)) */
t = y*134217729.0;
@@ -153,11 +159,16 @@ double __ieee754_pow(double x, double y) {
if (y<0) return (x<1.0)?INF.x:0;
return 0; /* unreachable, to make the compiler happy */
}
+#ifndef __ieee754_pow
+strong_alias (__ieee754_pow, __pow_finite)
+#endif
/**************************************************************************/
/* Computing x^y using more accurate but more slow log routine */
/**************************************************************************/
-static double power1(double x, double y) {
+static double
+SECTION
+power1(double x, double y) {
double z,a,aa,error, t,a1,a2,y1,y2;
z = my_log2(x,&aa,&error);
t = y*134217729.0;
@@ -180,7 +191,9 @@ static double power1(double x, double y) {
/* + the parameter delta. */
/* The result is bounded by error (rightmost argument) */
/****************************************************************************/
-static double log1(double x, double *delta, double *error) {
+static double
+SECTION
+log1(double x, double *delta, double *error) {
int i,j,m;
#if 0
int n;
@@ -272,7 +285,9 @@ static double log1(double x, double *delta, double *error) {
/* Computing log(x)(x is left argument).The result is return double + delta.*/
/* The result is bounded by error (right argument) */
/****************************************************************************/
-static double my_log2(double x, double *delta, double *error) {
+static double
+SECTION
+my_log2(double x, double *delta, double *error) {
int i,j,m;
#if 0
int n;
@@ -282,7 +297,10 @@ static double my_log2(double x, double *delta, double *error) {
double cor;
#endif
double ou1,ou2,lu1,lu2,ov,lv1,lv2,a,a1,a2;
- double y,yy,z,zz,j1,j2,j3,j4,j5,j6,j7,j8;
+ double y,yy,z,zz,j1,j2,j7,j8;
+#ifndef DLA_FMS
+ double j3,j4,j5,j6;
+#endif
mynumber u,v;
#ifdef BIG_ENDI
mynumber
@@ -363,7 +381,9 @@ static double my_log2(double x, double *delta, double *error) {
/* Routine receives a double x and checks if it is an integer. If not */
/* it returns 0, else it returns 1 if even or -1 if odd. */
/**********************************************************************/
-static int checkint(double x) {
+static int
+SECTION
+checkint(double x) {
union {int4 i[2]; double x;} u;
int k,m,n;
#if 0
diff --git a/sysdeps/ieee754/dbl-64/e_rem_pio2.c b/sysdeps/ieee754/dbl-64/e_rem_pio2.c
index a8a8cdb2b2..a82b291dd5 100644
--- a/sysdeps/ieee754/dbl-64/e_rem_pio2.c
+++ b/sysdeps/ieee754/dbl-64/e_rem_pio2.c
@@ -1,22 +1,19 @@
-/* @(#)e_rem_pio2.c 5.1 93/09/24 */
+#ifdef NOT_NEEDED_ANYMORE
+
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $";
-#endif
-
/* __ieee754_rem_pio2(x,y)
- *
- * return the remainder of x rem pi/2 in y[0]+y[1]
+ *
+ * return the remainder of x rem pi/2 in y[0]+y[1]
* use __kernel_rem_pio2()
*/
@@ -24,31 +21,23 @@ static char rcsid[] = "$NetBSD: e_rem_pio2.c,v 1.8 1995/05/10 20:46:02 jtc Exp $
#include "math_private.h"
/*
- * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
+ * Table of constants for 2/pi, 396 Hex digits (476 decimal) of 2/pi
*/
-#ifdef __STDC__
static const int32_t two_over_pi[] = {
-#else
-static int32_t two_over_pi[] = {
-#endif
-0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
-0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
-0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
-0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
-0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
-0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
-0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
-0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
-0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
-0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
-0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
+0xA2F983, 0x6E4E44, 0x1529FC, 0x2757D1, 0xF534DD, 0xC0DB62,
+0x95993C, 0x439041, 0xFE5163, 0xABDEBB, 0xC561B7, 0x246E3A,
+0x424DD2, 0xE00649, 0x2EEA09, 0xD1921C, 0xFE1DEB, 0x1CB129,
+0xA73EE8, 0x8235F5, 0x2EBB44, 0x84E99C, 0x7026B4, 0x5F7E41,
+0x3991D6, 0x398353, 0x39F49C, 0x845F8B, 0xBDF928, 0x3B1FF8,
+0x97FFDE, 0x05980F, 0xEF2F11, 0x8B5A0A, 0x6D1F6D, 0x367ECF,
+0x27CB09, 0xB74F46, 0x3F669E, 0x5FEA2D, 0x7527BA, 0xC7EBE5,
+0xF17B3D, 0x0739F7, 0x8A5292, 0xEA6BFB, 0x5FB11F, 0x8D5D08,
+0x560330, 0x46FC7B, 0x6BABF0, 0xCFBC20, 0x9AF436, 0x1DA9E3,
+0x91615E, 0xE61B08, 0x659985, 0x5F14A0, 0x68408D, 0xFFD880,
+0x4D7327, 0x310606, 0x1556CA, 0x73A8C9, 0x60E27B, 0xC08C6B,
};
-#ifdef __STDC__
static const int32_t npio2_hw[] = {
-#else
-static int32_t npio2_hw[] = {
-#endif
0x3FF921FB, 0x400921FB, 0x4012D97C, 0x401921FB, 0x401F6A7A, 0x4022D97C,
0x4025FDBB, 0x402921FB, 0x402C463A, 0x402F6A7A, 0x4031475C, 0x4032D97C,
0x40346B9C, 0x4035FDBB, 0x40378FDB, 0x403921FB, 0x403AB41B, 0x403C463A,
@@ -67,11 +56,7 @@ static int32_t npio2_hw[] = {
* pio2_3t: pi/2 - (pio2_1+pio2_2+pio2_3)
*/
-#ifdef __STDC__
-static const double
-#else
-static double
-#endif
+static const double
zero = 0.00000000000000000000e+00, /* 0x00000000, 0x00000000 */
half = 5.00000000000000000000e-01, /* 0x3FE00000, 0x00000000 */
two24 = 1.67772160000000000000e+07, /* 0x41700000, 0x00000000 */
@@ -83,12 +68,8 @@ pio2_2t = 2.02226624879595063154e-21, /* 0x3BA3198A, 0x2E037073 */
pio2_3 = 2.02226624871116645580e-21, /* 0x3BA3198A, 0x2E000000 */
pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
-#ifdef __STDC__
- int32_t __ieee754_rem_pio2(double x, double *y)
-#else
- int32_t __ieee754_rem_pio2(x,y)
- double x,y[];
-#endif
+int32_t
+__ieee754_rem_pio2(double x, double *y)
{
double z,w,t,r,fn;
double tx[3];
@@ -100,9 +81,9 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
if(ix<=0x3fe921fb) /* |x| ~<= pi/4 , no need for reduction */
{y[0] = x; y[1] = 0; return 0;}
if(ix<0x4002d97c) { /* |x| < 3pi/4, special case with n=+-1 */
- if(hx>0) {
+ if(hx>0) {
z = x - pio2_1;
- if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
+ if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
y[0] = z - pio2_1t;
y[1] = (z-y[0])-pio2_1t;
} else { /* near pi/2, use 33+33+53 bit pi */
@@ -113,7 +94,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
return 1;
} else { /* negative x */
z = x + pio2_1;
- if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
+ if(ix!=0x3ff921fb) { /* 33+53 bit pi is good enough */
y[0] = z + pio2_1t;
y[1] = (z-y[0])+pio2_1t;
} else { /* near pi/2, use 33+33+53 bit pi */
@@ -130,36 +111,36 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
fn = (double)n;
r = t-fn*pio2_1;
w = fn*pio2_1t; /* 1st round good to 85 bit */
- if(n<32&&ix!=npio2_hw[n-1]) {
+ if(n<32&&ix!=npio2_hw[n-1]) {
y[0] = r-w; /* quick check no cancellation */
} else {
- u_int32_t high;
- j = ix>>20;
- y[0] = r-w;
+ u_int32_t high;
+ j = ix>>20;
+ y[0] = r-w;
GET_HIGH_WORD(high,y[0]);
- i = j-((high>>20)&0x7ff);
- if(i>16) { /* 2nd iteration needed, good to 118 */
+ i = j-((high>>20)&0x7ff);
+ if(i>16) { /* 2nd iteration needed, good to 118 */
t = r;
- w = fn*pio2_2;
+ w = fn*pio2_2;
r = t-w;
- w = fn*pio2_2t-((t-r)-w);
+ w = fn*pio2_2t-((t-r)-w);
y[0] = r-w;
GET_HIGH_WORD(high,y[0]);
i = j-((high>>20)&0x7ff);
if(i>49) { /* 3rd iteration need, 151 bits acc */
- t = r; /* will cover all possible cases */
- w = fn*pio2_3;
- r = t-w;
- w = fn*pio2_3t-((t-r)-w);
- y[0] = r-w;
+ t = r; /* will cover all possible cases */
+ w = fn*pio2_3;
+ r = t-w;
+ w = fn*pio2_3t-((t-r)-w);
+ y[0] = r-w;
}
}
}
y[1] = (r-y[0])-w;
- if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
+ if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
else return n;
}
- /*
+ /*
* all other (large) arguments
*/
if(ix>=0x7ff00000) { /* x is inf or NaN */
@@ -168,7 +149,7 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
/* set z = scalbn(|x|,ilogb(x)-23) */
GET_LOW_WORD(low,x);
SET_LOW_WORD(z,low);
- e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
+ e0 = (ix>>20)-1046; /* e0 = ilogb(z)-23; */
SET_HIGH_WORD(z, ix - ((int32_t)(e0<<20)));
for(i=0;i<2;i++) {
tx[i] = (double)((int32_t)(z));
@@ -181,3 +162,5 @@ pio2_3t = 8.47842766036889956997e-32; /* 0x397B839A, 0x252049C1 */
if(hx<0) {y[0] = -y[0]; y[1] = -y[1]; return -n;}
return n;
}
+
+#endif
diff --git a/sysdeps/ieee754/dbl-64/e_remainder.c b/sysdeps/ieee754/dbl-64/e_remainder.c
index cc06e18ce8..d1782a15cf 100644
--- a/sysdeps/ieee754/dbl-64/e_remainder.c
+++ b/sysdeps/ieee754/dbl-64/e_remainder.c
@@ -1,8 +1,8 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
- *
+ * Copyright (C) 2001, 2011 Free Software Foundation
+ *
* This program 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
@@ -96,9 +96,9 @@ double __ieee754_remainder(double x, double y)
u.x=(u.x-d*w.x)-d*ww.x;
if (ABS(u.x)<0.5*t.x) return (u.x!=0)?u.x:((x>0)?ZERO.x:nZERO.x);
else
- if (ABS(u.x)>0.5*t.x) return (d>z)?u.x+t.x:u.x-t.x;
- else
- {z=u.x/t.x; d=(z+big.x)-big.x; return ((u.x-d*w.x)-d*ww.x);}
+ if (ABS(u.x)>0.5*t.x) return (d>z)?u.x+t.x:u.x-t.x;
+ else
+ {z=u.x/t.x; d=(z+big.x)-big.x; return ((u.x-d*w.x)-d*ww.x);}
}
} /* (kx<0x7fe00000&&ky<0x7ff00000&&ky>=0x03500000) */
@@ -128,3 +128,4 @@ double __ieee754_remainder(double x, double y)
}
}
}
+strong_alias (__ieee754_remainder, __remainder_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_sinh.c b/sysdeps/ieee754/dbl-64/e_sinh.c
index 1701b9bb67..50463c3048 100644
--- a/sysdeps/ieee754/dbl-64/e_sinh.c
+++ b/sysdeps/ieee754/dbl-64/e_sinh.c
@@ -5,7 +5,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -15,15 +15,15 @@ static char rcsid[] = "$NetBSD: e_sinh.c,v 1.7 1995/05/10 20:46:13 jtc Exp $";
#endif
/* __ieee754_sinh(x)
- * Method :
+ * Method :
* mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
- * 1. Replace x by |x| (sinh(-x) = -sinh(x)).
- * 2.
- * E + E/(E+1)
+ * 1. Replace x by |x| (sinh(-x) = -sinh(x)).
+ * 2.
+ * E + E/(E+1)
* 0 <= x <= 22 : sinh(x) := --------------, E=expm1(x)
- * 2
+ * 2
*
- * 22 <= x <= lnovft : sinh(x) := exp(x)/2
+ * 22 <= x <= lnovft : sinh(x) := exp(x)/2
* lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2)
* ln2ovft < x : sinh(x) := x*shuge (overflow)
*
@@ -35,19 +35,11 @@ static char rcsid[] = "$NetBSD: e_sinh.c,v 1.7 1995/05/10 20:46:13 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double one = 1.0, shuge = 1.0e307;
-#else
-static double one = 1.0, shuge = 1.0e307;
-#endif
-#ifdef __STDC__
- double __ieee754_sinh(double x)
-#else
- double __ieee754_sinh(x)
- double x;
-#endif
-{
+double
+__ieee754_sinh(double x)
+{
double t,w,h;
int32_t ix,jx;
u_int32_t lx;
@@ -57,14 +49,15 @@ static double one = 1.0, shuge = 1.0e307;
ix = jx&0x7fffffff;
/* x is INF or NaN */
- if(ix>=0x7ff00000) return x+x;
+ if(__builtin_expect(ix>=0x7ff00000, 0)) return x+x;
h = 0.5;
if (jx<0) h = -h;
/* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */
if (ix < 0x40360000) { /* |x|<22 */
- if (ix<0x3e300000) /* |x|<2**-28 */
- if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
+ if (__builtin_expect(ix<0x3e300000, 0)) /* |x|<2**-28 */
+ if(shuge+x>one)
+ return x;/* sinh(tiny) = tiny with inexact */
t = __expm1(fabs(x));
if(ix<0x3ff00000) return h*(2.0*t-t*t/(t+one));
return h*(t+t/(t+one));
@@ -84,3 +77,4 @@ static double one = 1.0, shuge = 1.0e307;
/* |x| > overflowthresold, sinh(x) overflow */
return x*shuge;
}
+strong_alias (__ieee754_sinh, __sinh_finite)
diff --git a/sysdeps/ieee754/dbl-64/e_sqrt.c b/sysdeps/ieee754/dbl-64/e_sqrt.c
index f7e8055491..c507c598d7 100644
--- a/sysdeps/ieee754/dbl-64/e_sqrt.c
+++ b/sysdeps/ieee754/dbl-64/e_sqrt.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -35,7 +35,7 @@
#include "endian.h"
#include "mydefs.h"
-#include "dla.h"
+#include <dla.h>
#include "MathLib.h"
#include "root.tbl"
#include "math_private.h"
@@ -86,3 +86,4 @@ double __ieee754_sqrt(double x) {
return tm256.x*__ieee754_sqrt(x*t512.x);
}
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/ieee754/dbl-64/halfulp.c b/sysdeps/ieee754/dbl-64/halfulp.c
index 478a4bacf6..6018309427 100644
--- a/sysdeps/ieee754/dbl-64/halfulp.c
+++ b/sysdeps/ieee754/dbl-64/halfulp.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001, 2005 Free Software Foundation
+ * Copyright (C) 2001, 2005, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -37,22 +37,29 @@
#include "endian.h"
#include "mydefs.h"
-#include "dla.h"
+#include <dla.h>
#include "math_private.h"
-double __ieee754_sqrt(double x);
+#ifndef SECTION
+# define SECTION
+#endif
static const int4 tab54[32] = {
262143, 11585, 1782, 511, 210, 107, 63, 42,
30, 22, 17, 14, 12, 10, 9, 7,
- 7, 6, 5, 5, 5, 4, 4, 4,
- 3, 3, 3, 3, 3, 3, 3, 3 };
+ 7, 6, 5, 5, 5, 4, 4, 4,
+ 3, 3, 3, 3, 3, 3, 3, 3 };
-double __halfulp(double x, double y)
+double
+SECTION
+__halfulp(double x, double y)
{
mynumber v;
- double z,u,uu,j1,j2,j3,j4,j5;
+ double z,u,uu;
+#ifndef DLA_FMS
+ double j1,j2,j3,j4,j5;
+#endif
int4 k,l,m,n;
if (y <= 0) { /*if power is negative or zero */
v.x = y;
@@ -64,12 +71,12 @@ double __halfulp(double x, double y)
z = (double) k;
return (z*y == -1075.0)?0: -10.0;
}
- /* if y > 0 */
+ /* if y > 0 */
v.x = y;
if (v.i[LOW_HALF] != 0) return -10.0;
v.x=x;
- /* case where x = 2**n for some integer n */
+ /* case where x = 2**n for some integer n */
if (((v.i[HIGH_HALF]&0x000fffff)|v.i[LOW_HALF]) == 0) {
k=(v.i[HIGH_HALF]>>20)-1023;
return (((double) k)*y == -1075.0)?0:-10.0;
@@ -90,7 +97,7 @@ double __halfulp(double x, double y)
k = -k;
if (k>5) return -10.0;
- /* now treat x */
+ /* now treat x */
while (k>0) {
z = __ieee754_sqrt(x);
EMULV(z,z,u,uu,j1,j2,j3,j4,j5);
@@ -111,11 +118,11 @@ double __halfulp(double x, double y)
m = (k&0x000fffff)|0x00100000;
m = m>>(20-l); /* m is the odd integer of x */
- /* now check whether the length of m**n is at most 54 bits */
+ /* now check whether the length of m**n is at most 54 bits */
if (m > tab54[n-3]) return -10.0;
- /* yes, it is - now compute x**n by simple multiplications */
+ /* yes, it is - now compute x**n by simple multiplications */
u = x;
for (k=1;k<n;k++) u = u*x;
diff --git a/sysdeps/ieee754/dbl-64/mpa.c b/sysdeps/ieee754/dbl-64/mpa.c
index 68647ba335..39c640882b 100644
--- a/sysdeps/ieee754/dbl-64/mpa.c
+++ b/sysdeps/ieee754/dbl-64/mpa.c
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -48,11 +47,18 @@
#include "mpa.h"
#include "mpa2.h"
#include <sys/param.h> /* For MIN() */
+
+#ifndef SECTION
+# define SECTION
+#endif
+
+#ifndef NO___ACR
/* mcr() compares the sizes of the mantissas of two multiple precision */
/* numbers. Mantissas are compared regardless of the signs of the */
/* numbers, even if x->d[0] or y->d[0] are zero. Exponents are also */
/* disregarded. */
-static int mcr(const mp_no *x, const mp_no *y, int p) {
+static int
+mcr(const mp_no *x, const mp_no *y, int p) {
int i;
for (i=1; i<=p; i++) {
if (X[i] == Y[i]) continue;
@@ -62,9 +68,9 @@ static int mcr(const mp_no *x, const mp_no *y, int p) {
}
-
/* acr() compares the absolute values of two multiple precision numbers */
-int __acr(const mp_no *x, const mp_no *y, int p) {
+int
+__acr(const mp_no *x, const mp_no *y, int p) {
int i;
if (X[0] == ZERO) {
@@ -80,10 +86,12 @@ int __acr(const mp_no *x, const mp_no *y, int p) {
return i;
}
+#endif
-/* cr90 compares the values of two multiple precision numbers */
-int __cr(const mp_no *x, const mp_no *y, int p) {
+#if 0
+/* cr() compares the values of two multiple precision numbers */
+static int __cr(const mp_no *x, const mp_no *y, int p) {
int i;
if (X[0] > Y[0]) i= 1;
@@ -93,36 +101,37 @@ int __cr(const mp_no *x, const mp_no *y, int p) {
return i;
}
+#endif
+#ifndef NO___CPY
/* Copy a multiple precision number. Set *y=*x. x=y is permissible. */
void __cpy(const mp_no *x, mp_no *y, int p) {
- int i;
-
EY = EX;
- for (i=0; i <= p; i++) Y[i] = X[i];
-
- return;
+ for (int i=0; i <= p; i++) Y[i] = X[i];
}
+#endif
+#if 0
/* Copy a multiple precision number x of precision m into a */
/* multiple precision number y of precision n. In case n>m, */
/* the digits of y beyond the m'th are set to zero. In case */
/* n<m, the digits of x beyond the n'th are ignored. */
/* x=y is permissible. */
-void __cpymn(const mp_no *x, int m, mp_no *y, int n) {
+static void __cpymn(const mp_no *x, int m, mp_no *y, int n) {
int i,k;
EY = EX; k=MIN(m,n);
for (i=0; i <= k; i++) Y[i] = X[i];
for ( ; i <= n; i++) Y[i] = ZERO;
-
- return;
}
+#endif
+
+#ifndef NO___MP_DBL
/* Convert a multiple precision number *x into a double precision */
/* number *y, normalized case (|x| >= 2**(-1022))) */
static void norm(const mp_no *x, double *y, int p)
@@ -141,7 +150,7 @@ static void norm(const mp_no *x, double *y, int p)
}
else {
for (a=ONE, z[1]=X[1]; z[1] < TWO23; )
- {a *= TWO; z[1] *= TWO; }
+ {a *= TWO; z[1] *= TWO; }
for (i=2; i<5; i++) {
z[i] = X[i]*a;
@@ -157,10 +166,10 @@ static void norm(const mp_no *x, double *y, int p)
if (v == TWO18) {
if (z[4] == ZERO) {
- for (i=5; i <= p; i++) {
- if (X[i] == ZERO) continue;
- else {z[3] += ONE; break; }
- }
+ for (i=5; i <= p; i++) {
+ if (X[i] == ZERO) continue;
+ else {z[3] += ONE; break; }
+ }
}
else z[3] += ONE;
}
@@ -174,7 +183,6 @@ static void norm(const mp_no *x, double *y, int p)
for (i=1; i>EX; i--) c *= RADIXI;
*y = c;
- return;
#undef R
}
@@ -222,8 +230,6 @@ static void denorm(const mp_no *x, double *y, int p)
c = X[0]*((z[1] + R*(z[2] + R*z[3])) - TWO10);
*y = c*TWOM1032;
- return;
-
#undef R
}
@@ -242,13 +248,16 @@ void __mp_dbl(const mp_no *x, double *y, int p) {
else if (EX==-42 && X[1]>=TWO10) norm(x,y,p);
else denorm(x,y,p);
}
+#endif
/* dbl_mp() converts a double precision number x into a multiple precision */
/* number *y. If the precision p is too small the result is truncated. x is */
/* left unchanged. */
-void __dbl_mp(double x, mp_no *y, int p) {
+void
+SECTION
+__dbl_mp(double x, mp_no *y, int p) {
int i,n;
double u;
@@ -269,7 +278,6 @@ void __dbl_mp(double x, mp_no *y, int p) {
if (u>x) u -= ONE;
Y[i] = u; x -= u; x *= RADIX; }
for ( ; i<=p; i++) Y[i] = ZERO;
- return;
}
@@ -279,7 +287,9 @@ void __dbl_mp(double x, mp_no *y, int p) {
/* No guard digit is used. The result equals the exact sum, truncated. */
/* *x & *y are left unchanged. */
-static void add_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
+static void
+SECTION
+add_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int i,j,k;
@@ -321,7 +331,9 @@ static void add_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
/* or y&z. One guard digit is used. The error is less than one ulp. */
/* *x & *y are left unchanged. */
-static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
+static void
+SECTION
+sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int i,j,k;
@@ -336,11 +348,11 @@ static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
else {
i=p; j=p+1-j; k=p;
if (Y[j] > ZERO) {
- Z[k+1] = RADIX - Y[j--];
- Z[k] = MONE; }
+ Z[k+1] = RADIX - Y[j--];
+ Z[k] = MONE; }
else {
- Z[k+1] = ZERO;
- Z[k] = ZERO; j--;}
+ Z[k+1] = ZERO;
+ Z[k] = ZERO; j--;}
}
}
@@ -368,8 +380,6 @@ static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
Z[k++] = Z[i++];
for (; k <= p; )
Z[k++] = ZERO;
-
- return;
}
@@ -377,7 +387,9 @@ static void sub_magnitudes(const mp_no *x, const mp_no *y, mp_no *z, int p) {
/* but not x&z or y&z. One guard digit is used. The error is less than */
/* one ulp. *x & *y are left unchanged. */
-void __add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
+void
+SECTION
+__add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int n;
@@ -393,7 +405,6 @@ void __add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
else if (n == -1) {sub_magnitudes(y,x,z,p); Z[0] = Y[0]; }
else Z[0] = ZERO;
}
- return;
}
@@ -401,7 +412,9 @@ void __add(const mp_no *x, const mp_no *y, mp_no *z, int p) {
/* overlap but not x&z or y&z. One guard digit is used. The error is */
/* less than one ulp. *x & *y are left unchanged. */
-void __sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
+void
+SECTION
+__sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int n;
@@ -417,7 +430,6 @@ void __sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
else if (n == -1) {sub_magnitudes(y,x,z,p); Z[0] = -Y[0]; }
else Z[0] = ZERO;
}
- return;
}
@@ -426,16 +438,18 @@ void __sub(const mp_no *x, const mp_no *y, mp_no *z, int p) {
/* truncated to p digits. In case p>3 the error is bounded by 1.001 ulp. */
/* *x & *y are left unchanged. */
-void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
+void
+SECTION
+__mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
int i, i1, i2, j, k, k2;
double u;
- /* Is z=0? */
+ /* Is z=0? */
if (X[0]*Y[0]==ZERO)
{ Z[0]=ZERO; return; }
- /* Multiply, add and carry */
+ /* Multiply, add and carry */
k2 = (p<3) ? p+p : p+3;
Z[k2]=ZERO;
for (k=k2; k>1; ) {
@@ -449,7 +463,7 @@ void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
Z[--k] = u*RADIXI;
}
- /* Is there a carry beyond the most significant digit? */
+ /* Is there a carry beyond the most significant digit? */
if (Z[1] == ZERO) {
for (i=1; i<=p; i++) Z[i]=Z[i+1];
EZ = EX + EY - 1; }
@@ -457,7 +471,6 @@ void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
EZ = EX + EY;
Z[0] = X[0] * Y[0];
- return;
}
@@ -466,6 +479,8 @@ void __mul(const mp_no *x, const mp_no *y, mp_no *z, int p) {
/* 2.001*r**(1-p) for p>3. */
/* *x=0 is not permissible. *x is left unchanged. */
+static
+SECTION
void __inv(const mp_no *x, mp_no *y, int p) {
int i;
#if 0
@@ -474,11 +489,11 @@ void __inv(const mp_no *x, mp_no *y, int p) {
double t;
mp_no z,w;
static const int np1[] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,3,
- 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
+ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,4};
const mp_no mptwo = {1,{1.0,2.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
__cpy(x,&z,p); z.e=0; __mp_dbl(&z,&t,p);
t=ONE/t; __dbl_mp(t,y,p); EY -= EX;
@@ -489,7 +504,6 @@ void __inv(const mp_no *x, mp_no *y, int p) {
__sub(&mptwo,y,&z,p);
__mul(&w,&z,y,p);
}
- return;
}
@@ -498,11 +512,12 @@ void __inv(const mp_no *x, mp_no *y, int p) {
/* Relative error bound = 2.001*r**(1-p) for p=2, 2.063*r**(1-p) for p=3 */
/* and 3.001*r**(1-p) for p>3. *y=0 is not permissible. */
-void __dvd(const mp_no *x, const mp_no *y, mp_no *z, int p) {
+void
+SECTION
+__dvd(const mp_no *x, const mp_no *y, mp_no *z, int p) {
mp_no w;
if (X[0] == ZERO) Z[0] = ZERO;
else {__inv(y,&w,p); __mul(x,&w,z,p);}
- return;
}
diff --git a/sysdeps/ieee754/dbl-64/mpa.h b/sysdeps/ieee754/dbl-64/mpa.h
index 4aec48e90f..5647ab7b4f 100644
--- a/sysdeps/ieee754/dbl-64/mpa.h
+++ b/sysdeps/ieee754/dbl-64/mpa.h
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -45,14 +44,14 @@ typedef struct {/* This structure holds the details of a multi-precision */
int e; /* floating point number, x: d[0] holds its sign (-1,0 or 1) */
double d[40]; /* e holds its exponent (...,-2,-1,0,1,2,...) and */
} mp_no; /* d[1]...d[p] hold its mantissa digits. The value of x is, */
- /* x = d[1]*r**(e-1) + d[2]*r**(e-2) + ... + d[p]*r**(e-p). */
- /* Here r = 2**24, 0 <= d[i] < r and 1 <= p <= 32. */
- /* p is a global variable. A multi-precision number is */
- /* always normalized. Namely, d[1] > 0. An exception is */
- /* a zero which is characterized by d[0] = 0. The terms */
- /* d[p+1], d[p+2], ... of a none zero number have no */
- /* significance and so are the terms e, d[1],d[2],... */
- /* of a zero. */
+ /* x = d[1]*r**(e-1) + d[2]*r**(e-2) + ... + d[p]*r**(e-p). */
+ /* Here r = 2**24, 0 <= d[i] < r and 1 <= p <= 32. */
+ /* p is a global variable. A multi-precision number is */
+ /* always normalized. Namely, d[1] > 0. An exception is */
+ /* a zero which is characterized by d[0] = 0. The terms */
+ /* d[p+1], d[p+2], ... of a none zero number have no */
+ /* significance and so are the terms e, d[1],d[2],... */
+ /* of a zero. */
typedef union { int i[2]; double d; } number;
@@ -66,15 +65,15 @@ typedef union { int i[2]; double d; } number;
#define ABS(x) ((x) < 0 ? -(x) : (x))
int __acr(const mp_no *, const mp_no *, int);
-int __cr(const mp_no *, const mp_no *, int);
+// int __cr(const mp_no *, const mp_no *, int);
void __cpy(const mp_no *, mp_no *, int);
-void __cpymn(const mp_no *, int, mp_no *, int);
+// void __cpymn(const mp_no *, int, mp_no *, int);
void __mp_dbl(const mp_no *, double *, int);
void __dbl_mp(double, mp_no *, int);
void __add(const mp_no *, const mp_no *, mp_no *, int);
void __sub(const mp_no *, const mp_no *, mp_no *, int);
void __mul(const mp_no *, const mp_no *, mp_no *, int);
-void __inv(const mp_no *, mp_no *, int);
+// void __inv(const mp_no *, mp_no *, int);
void __dvd(const mp_no *, const mp_no *, mp_no *, int);
extern void __mpatan (mp_no *, mp_no *, int);
diff --git a/sysdeps/ieee754/dbl-64/mpatan.c b/sysdeps/ieee754/dbl-64/mpatan.c
index ee21c25138..f40873ea59 100644
--- a/sysdeps/ieee754/dbl-64/mpatan.c
+++ b/sysdeps/ieee754/dbl-64/mpatan.c
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -34,11 +33,19 @@
#include "endian.h"
#include "mpa.h"
-void __mpsqrt(mp_no *, mp_no *, int);
-void __mpatan(mp_no *x, mp_no *y, int p) {
+#ifndef SECTION
+# define SECTION
+#endif
+
#include "mpatan.h"
+void __mpsqrt(mp_no *, mp_no *, int);
+
+void
+SECTION
+__mpatan(mp_no *x, mp_no *y, int p) {
+
int i,m,n;
double dx;
mp_no
@@ -54,19 +61,19 @@ void __mpatan(mp_no *x, mp_no *y, int p) {
mp_no mps,mpsm,mpt,mpt1,mpt2,mpt3;
- /* Choose m and initiate mpone, mptwo & mptwoim1 */
+ /* Choose m and initiate mpone, mptwo & mptwoim1 */
if (EX>0) m=7;
else if (EX<0) m=0;
else {
__mp_dbl(x,&dx,p); dx=ABS(dx);
for (m=6; m>0; m--)
- {if (dx>xm[m].d) break;}
+ {if (dx>__atan_xm[m].d) break;}
}
mpone.e = mptwo.e = mptwoim1.e = 1;
mpone.d[0] = mpone.d[1] = mptwo.d[0] = mptwoim1.d[0] = ONE;
mptwo.d[1] = TWO;
- /* Reduce x m times */
+ /* Reduce x m times */
__mul(x,x,&mpsm,p);
if (m==0) __cpy(x,&mps,p);
else {
@@ -82,8 +89,8 @@ void __mpatan(mp_no *x, mp_no *y, int p) {
__mpsqrt(&mpsm,&mps,p); mps.d[0] = X[0];
}
- /* Evaluate a truncated power series for Atan(s) */
- n=np[p]; mptwoim1.d[1] = twonm1[p].d;
+ /* Evaluate a truncated power series for Atan(s) */
+ n=__atan_np[p]; mptwoim1.d[1] = __atan_twonm1[p].d;
__dvd(&mpsm,&mptwoim1,&mpt,p);
for (i=n-1; i>1; i--) {
mptwoim1.d[1] -= TWO;
@@ -94,8 +101,8 @@ void __mpatan(mp_no *x, mp_no *y, int p) {
__mul(&mps,&mpt,&mpt1,p);
__sub(&mps,&mpt1,&mpt,p);
- /* Compute Atan(x) */
- mptwoim1.d[1] = twom[m].d;
+ /* Compute Atan(x) */
+ mptwoim1.d[1] = __atan_twom[m].d;
__mul(&mptwoim1,&mpt,y,p);
return;
diff --git a/sysdeps/ieee754/dbl-64/mpatan.h b/sysdeps/ieee754/dbl-64/mpatan.h
index d420ff3408..003b06c695 100644
--- a/sysdeps/ieee754/dbl-64/mpatan.h
+++ b/sysdeps/ieee754/dbl-64/mpatan.h
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -29,9 +28,18 @@
#ifndef MPATAN_H
#define MPATAN_H
+extern const number __atan_xm[8] attribute_hidden;
+extern const number __atan_twonm1[33] attribute_hidden;
+extern const number __atan_twom[8] attribute_hidden;
+extern const number __atan_one attribute_hidden;
+extern const number __atan_two attribute_hidden;
+extern const int __atan_np[33] attribute_hidden;
+
+
+#ifndef AVOID_MPATAN_H
#ifdef BIG_ENDI
- static const number
- xm[8] = { /* x[m] */
+ const number
+ __atan_xm[8] = { /* x[m] */
/**/ {{0x00000000, 0x00000000} }, /* 0.0 */
/**/ {{0x3f8930be, 0x00000000} }, /* 0.0123 */
/**/ {{0x3f991687, 0x00000000} }, /* 0.0245 */
@@ -40,9 +48,9 @@
/**/ {{0x3fc95810, 0x00000000} }, /* 0.198 */
/**/ {{0x3fda7ef9, 0x00000000} }, /* 0.414 */
/**/ {{0x3ff00000, 0x00000000} }, /* 1.0 */
- };
- static const number
- twonm1[33] = { /* 2n-1 */
+ };
+ const number
+ __atan_twonm1[33] = { /* 2n-1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
@@ -76,10 +84,10 @@
/**/ {{0x405b4000, 0x00000000} }, /* 109 */
/**/ {{0x405c4000, 0x00000000} }, /* 113 */
/**/ {{0x405d4000, 0x00000000} }, /* 117 */
- };
+ };
- static const number
- twom[8] = { /* 2**m */
+ const number
+ __atan_twom[8] = { /* 2**m */
/**/ {{0x3ff00000, 0x00000000} }, /* 1.0 */
/**/ {{0x40000000, 0x00000000} }, /* 2.0 */
/**/ {{0x40100000, 0x00000000} }, /* 4.0 */
@@ -88,17 +96,17 @@
/**/ {{0x40400000, 0x00000000} }, /* 32.0 */
/**/ {{0x40500000, 0x00000000} }, /* 64.0 */
/**/ {{0x40600000, 0x00000000} }, /* 128.0 */
- };
+ };
- static const number
-/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
-/**/ two = {{0x40000000, 0x00000000} }; /* 2 */
+ const number
+/**/ __atan_one = {{0x3ff00000, 0x00000000} }, /* 1 */
+/**/ __atan_two = {{0x40000000, 0x00000000} }; /* 2 */
#else
#ifdef LITTLE_ENDI
- static const number
- xm[8] = { /* x[m] */
+ const number
+ __atan_xm[8] = { /* x[m] */
/**/ {{0x00000000, 0x00000000} }, /* 0.0 */
/**/ {{0x00000000, 0x3f8930be} }, /* 0.0123 */
/**/ {{0x00000000, 0x3f991687} }, /* 0.0245 */
@@ -107,9 +115,9 @@
/**/ {{0x00000000, 0x3fc95810} }, /* 0.198 */
/**/ {{0x00000000, 0x3fda7ef9} }, /* 0.414 */
/**/ {{0x00000000, 0x3ff00000} }, /* 1.0 */
- };
- static const number
- twonm1[33] = { /* 2n-1 */
+ };
+ const number
+__atan_twonm1[33] = { /* 2n-1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
@@ -143,10 +151,10 @@
/**/ {{0x00000000, 0x405b4000} }, /* 109 */
/**/ {{0x00000000, 0x405c4000} }, /* 113 */
/**/ {{0x00000000, 0x405d4000} }, /* 117 */
- };
+ };
- static const number
- twom[8] = { /* 2**m */
+ const number
+ __atan_twom[8] = { /* 2**m */
/**/ {{0x00000000, 0x3ff00000} }, /* 1.0 */
/**/ {{0x00000000, 0x40000000} }, /* 2.0 */
/**/ {{0x00000000, 0x40100000} }, /* 4.0 */
@@ -155,20 +163,21 @@
/**/ {{0x00000000, 0x40400000} }, /* 32.0 */
/**/ {{0x00000000, 0x40500000} }, /* 64.0 */
/**/ {{0x00000000, 0x40600000} }, /* 128.0 */
- };
+ };
- static const number
-/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
-/**/ two = {{0x00000000, 0x40000000} }; /* 2 */
+ const number
+/**/ __atan_one = {{0x00000000, 0x3ff00000} }, /* 1 */
+/**/ __atan_two = {{0x00000000, 0x40000000} }; /* 2 */
#endif
#endif
-#define ONE one.d
-#define TWO two.d
-
- static const int
- np[33] = { 0, 0, 0, 0, 6, 8,10,11,13,15,17,19,21,23,25,27,28,
- 30,32,34,36,38,40,42,43,45,47,49,51,53,55,57,59};
+ const int
+ __atan_np[33] = { 0, 0, 0, 0, 6, 8,10,11,13,15,17,19,21,23,25,27,28,
+ 30,32,34,36,38,40,42,43,45,47,49,51,53,55,57,59};
#endif
+#endif
+
+#define ONE __atan_one.d
+#define TWO __atan_two.d
diff --git a/sysdeps/ieee754/dbl-64/mpatan2.c b/sysdeps/ieee754/dbl-64/mpatan2.c
index 8977ec9042..1deb056417 100644
--- a/sysdeps/ieee754/dbl-64/mpatan2.c
+++ b/sysdeps/ieee754/dbl-64/mpatan2.c
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -38,18 +37,24 @@
#include "mpa.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
void __mpsqrt(mp_no *, mp_no *, int);
void __mpatan(mp_no *, mp_no *, int);
/* Multi-Precision Atan2(y,x) function subroutine, for p >= 4. */
/* y=0 is not permitted if x<=0. No error messages are given. */
-void __mpatan2(mp_no *y, mp_no *x, mp_no *z, int p) {
+void
+SECTION
+__mpatan2(mp_no *y, mp_no *x, mp_no *z, int p) {
static const double ZERO = 0.0, ONE = 1.0;
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpt1,mpt2,mpt3;
diff --git a/sysdeps/ieee754/dbl-64/mpexp.c b/sysdeps/ieee754/dbl-64/mpexp.c
index e2ab71b2cc..b0cffe2fe5 100644
--- a/sysdeps/ieee754/dbl-64/mpexp.c
+++ b/sysdeps/ieee754/dbl-64/mpexp.c
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -34,34 +33,40 @@
#include "mpa.h"
#include "mpexp.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
/* Multi-Precision exponential function subroutine (for p >= 4, */
/* 2**(-55) <= abs(x) <= 1024). */
-void __mpexp(mp_no *x, mp_no *y, int p) {
+void
+SECTION
+__mpexp(mp_no *x, mp_no *y, int p) {
int i,j,k,m,m1,m2,n;
double a,b;
static const int np[33] = {0,0,0,0,3,3,4,4,5,4,4,5,5,5,6,6,6,6,6,6,
- 6,6,6,6,7,7,7,7,8,8,8,8,8};
+ 6,6,6,6,7,7,7,7,8,8,8,8,8};
static const int m1p[33]= {0,0,0,0,17,23,23,28,27,38,42,39,43,47,43,47,50,54,
- 57,60,64,67,71,74,68,71,74,77,70,73,76,78,81};
+ 57,60,64,67,71,74,68,71,74,77,70,73,76,78,81};
static const int m1np[7][18] = {
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 0, 0, 0,36,48,60,72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
- { 0, 0, 0, 0,24,32,40,48,56,64,72, 0, 0, 0, 0, 0, 0, 0},
- { 0, 0, 0, 0,17,23,29,35,41,47,53,59,65, 0, 0, 0, 0, 0},
- { 0, 0, 0, 0, 0, 0,23,28,33,38,42,47,52,57,62,66, 0, 0},
- { 0, 0, 0, 0, 0, 0, 0, 0,27, 0, 0,39,43,47,51,55,59,63},
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,43,47,50,54}};
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0,36,48,60,72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0,24,32,40,48,56,64,72, 0, 0, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0,17,23,29,35,41,47,53,59,65, 0, 0, 0, 0, 0},
+ { 0, 0, 0, 0, 0, 0,23,28,33,38,42,47,52,57,62,66, 0, 0},
+ { 0, 0, 0, 0, 0, 0, 0, 0,27, 0, 0,39,43,47,51,55,59,63},
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,43,47,50,54}};
mp_no mpone = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpk = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mps,mpak,mpt1,mpt2;
/* Choose m,n and compute a=2**(-m) */
- n = np[p]; m1 = m1p[p]; a = twomm1[p].d;
+ n = np[p]; m1 = m1p[p]; a = __mpexp_twomm1[p].d;
for (i=0; i<EX; i++) a *= RADIXI;
for ( ; i>EX; i--) a *= RADIX;
b = X[1]*RADIXI; m2 = 24*EX;
@@ -81,12 +86,12 @@ void __mpexp(mp_no *x, mp_no *y, int p) {
/* Evaluate the polynomial. Put result in mpt2 */
mpone.e=1; mpone.d[0]=ONE; mpone.d[1]=ONE;
- mpk.e = 1; mpk.d[0] = ONE; mpk.d[1]=nn[n].d;
+ mpk.e = 1; mpk.d[0] = ONE; mpk.d[1]=__mpexp_nn[n].d;
__dvd(&mps,&mpk,&mpt1,p);
__add(&mpone,&mpt1,&mpak,p);
for (k=n-1; k>1; k--) {
__mul(&mps,&mpak,&mpt1,p);
- mpk.d[1]=nn[k].d;
+ mpk.d[1]=__mpexp_nn[k].d;
__dvd(&mpt1,&mpk,&mpt2,p);
__add(&mpone,&mpt2,&mpak,p);
}
diff --git a/sysdeps/ieee754/dbl-64/mpexp.h b/sysdeps/ieee754/dbl-64/mpexp.h
index a0b08ccb41..7985060a8c 100644
--- a/sysdeps/ieee754/dbl-64/mpexp.h
+++ b/sysdeps/ieee754/dbl-64/mpexp.h
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -28,9 +28,20 @@
#ifndef MPEXP_H
#define MPEXP_H
+extern const number __mpexp_twomm1[33] attribute_hidden;
+extern const number __mpexp_nn[9] attribute_hidden;
+extern const number __mpexp_radix attribute_hidden;
+extern const number __mpexp_radixi attribute_hidden;
+extern const number __mpexp_zero attribute_hidden;
+extern const number __mpexp_one attribute_hidden;
+extern const number __mpexp_two attribute_hidden;
+extern const number __mpexp_half attribute_hidden;
+
+
+#ifndef AVOID_MPEXP_H
#ifdef BIG_ENDI
- static const number
- twomm1[33] = { /* 2**-m1 */
+ const number
+ __mpexp_twomm1[33] = { /* 2**-m1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
@@ -65,8 +76,8 @@
/**/ {{0x3b100000, 0x00000000} }, /* 2**-78 */
/**/ {{0x3ae00000, 0x00000000} }, /* 2**-81 */
};
- static const number
- nn[9]={ /* n */
+ const number
+ __mpexp_nn[9]={ /* n */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x3ff00000, 0x00000000} }, /* 1 */
/**/ {{0x40000000, 0x00000000} }, /* 2 */
@@ -78,18 +89,18 @@
/**/ {{0x40200000, 0x00000000} }, /* 8 */
};
- static const number
-/**/ radix = {{0x41700000, 0x00000000} }, /* 2**24 */
-/**/ radixi = {{0x3e700000, 0x00000000} }, /* 2**-24 */
-/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
-/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
-/**/ two = {{0x40000000, 0x00000000} }, /* 2 */
-/**/ half = {{0x3fe00000, 0x00000000} }; /* 1/2 */
+ const number
+/**/ __mpexp_radix = {{0x41700000, 0x00000000} }, /* 2**24 */
+/**/ __mpexp_radixi = {{0x3e700000, 0x00000000} }, /* 2**-24 */
+/**/ __mpexp_zero = {{0x00000000, 0x00000000} }, /* 0 */
+/**/ __mpexp_one = {{0x3ff00000, 0x00000000} }, /* 1 */
+/**/ __mpexp_two = {{0x40000000, 0x00000000} }, /* 2 */
+/**/ __mpexp_half = {{0x3fe00000, 0x00000000} }; /* 1/2 */
#else
#ifdef LITTLE_ENDI
- static const number
- twomm1[33] = { /* 2**-m1 */
+ const number
+ __mpexp_twomm1[33] = { /* 2**-m1 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
@@ -124,8 +135,8 @@
/**/ {{0x00000000, 0x3b100000} }, /* 2**-78 */
/**/ {{0x00000000, 0x3ae00000} }, /* 2**-81 */
};
- static const number
- nn[9]={ /* n */
+ const number
+ __mpexp_nn[9]={ /* n */
/**/ {{0x00000000, 0x00000000} }, /* 0 */
/**/ {{0x00000000, 0x3ff00000} }, /* 1 */
/**/ {{0x00000000, 0x40000000} }, /* 2 */
@@ -137,22 +148,23 @@
/**/ {{0x00000000, 0x40200000} }, /* 8 */
};
- static const number
-/**/ radix = {{0x00000000, 0x41700000} }, /* 2**24 */
-/**/ radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */
-/**/ zero = {{0x00000000, 0x00000000} }, /* 0 */
-/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
-/**/ two = {{0x00000000, 0x40000000} }, /* 2 */
-/**/ half = {{0x00000000, 0x3fe00000} }; /* 1/2 */
+ const number
+/**/ __mpexp_radix = {{0x00000000, 0x41700000} }, /* 2**24 */
+/**/ __mpexp_radixi = {{0x00000000, 0x3e700000} }, /* 2**-24 */
+/**/ __mpexp_zero = {{0x00000000, 0x00000000} }, /* 0 */
+/**/ __mpexp_one = {{0x00000000, 0x3ff00000} }, /* 1 */
+/**/ __mpexp_two = {{0x00000000, 0x40000000} }, /* 2 */
+/**/ __mpexp_half = {{0x00000000, 0x3fe00000} }; /* 1/2 */
#endif
#endif
+#endif
-#define RADIX radix.d
-#define RADIXI radixi.d
-#define ZERO zero.d
-#define ONE one.d
-#define TWO two.d
-#define HALF half.d
+#define RADIX __mpexp_radix.d
+#define RADIXI __mpexp_radixi.d
+#define ZERO __mpexp_zero.d
+#define ONE __mpexp_one.d
+#define TWO __mpexp_two.d
+#define HALF __mpexp_half.d
#endif
diff --git a/sysdeps/ieee754/dbl-64/mpsqrt.c b/sysdeps/ieee754/dbl-64/mpsqrt.c
index 9945de3061..f007cab5d2 100644
--- a/sysdeps/ieee754/dbl-64/mpsqrt.c
+++ b/sysdeps/ieee754/dbl-64/mpsqrt.c
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -33,6 +32,12 @@
#include "endian.h"
#include "mpa.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
+#include "mpsqrt.h"
+
/****************************************************************************/
/* Multi-Precision square root function subroutine for precision p >= 4. */
/* The relative error is bounded by 3.501*r**(1-p), where r=2**24. */
@@ -41,31 +46,31 @@
/* p as integer. Routine computes sqrt(*x) and stores result in *y */
/****************************************************************************/
-double fastiroot(double);
-
-void __mpsqrt(mp_no *x, mp_no *y, int p) {
-#include "mpsqrt.h"
+static double fastiroot(double);
- int i,m,ex,ey;
+void
+SECTION
+__mpsqrt(mp_no *x, mp_no *y, int p) {
+ int i,m,ey;
double dx,dy;
mp_no
mphalf = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}},
mp3halfs = {0,{0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
- 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
+ 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0}};
mp_no mpxn,mpz,mpu,mpt1,mpt2;
/* Prepare multi-precision 1/2 and 3/2 */
mphalf.e =0; mphalf.d[0] =ONE; mphalf.d[1] =HALFRAD;
mp3halfs.e=1; mp3halfs.d[0]=ONE; mp3halfs.d[1]=ONE; mp3halfs.d[2]=HALFRAD;
- ex=EX; ey=EX/2; __cpy(x,&mpxn,p); mpxn.e -= (ey+ey);
+ ey=EX/2; __cpy(x,&mpxn,p); mpxn.e -= (ey+ey);
__mp_dbl(&mpxn,&dx,p); dy=fastiroot(dx); __dbl_mp(dy,&mpu,p);
__mul(&mpxn,&mphalf,&mpz,p);
- m=mp[p];
+ m=__mpsqrt_mp[p];
for (i=0; i<m; i++) {
__mul(&mpu,&mpu,&mpt1,p);
__mul(&mpt1,&mpz,&mpt2,p);
@@ -82,7 +87,9 @@ void __mpsqrt(mp_no *x, mp_no *y, int p) {
/* Compute a double precision approximation for 1/sqrt(x) */
/* with the relative error bounded by 2**-51. */
/***********************************************************/
-double fastiroot(double x) {
+static double
+SECTION
+fastiroot(double x) {
union {int i[2]; double d;} p,q;
double y,z, t;
int n;
diff --git a/sysdeps/ieee754/dbl-64/mpsqrt.h b/sysdeps/ieee754/dbl-64/mpsqrt.h
index 729d57af2c..86fa397b22 100644
--- a/sysdeps/ieee754/dbl-64/mpsqrt.h
+++ b/sysdeps/ieee754/dbl-64/mpsqrt.h
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2011 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -28,24 +28,31 @@
#ifndef MPSQRT_H
#define MPSQRT_H
+extern const number __mpsqrt_one attribute_hidden;
+extern const number __mpsqrt_halfrad attribute_hidden;
+extern const int __mpsqrt_mp[33] attribute_hidden;
+
+
+#ifndef AVOID_MPSQRT_H
#ifdef BIG_ENDI
- static const number
-/**/ one = {{0x3ff00000, 0x00000000} }, /* 1 */
-/**/ halfrad = {{0x41600000, 0x00000000} }; /* 2**23 */
+ const number
+/**/ __mpsqrt_one = {{0x3ff00000, 0x00000000} }, /* 1 */
+/**/ __mpsqrt_halfrad = {{0x41600000, 0x00000000} }; /* 2**23 */
#else
#ifdef LITTLE_ENDI
- static const number
-/**/ one = {{0x00000000, 0x3ff00000} }, /* 1 */
-/**/ halfrad = {{0x00000000, 0x41600000} }; /* 2**23 */
+ const number
+/**/ __mpsqrt_one = {{0x00000000, 0x3ff00000} }, /* 1 */
+/**/ __mpsqrt_halfrad = {{0x00000000, 0x41600000} }; /* 2**23 */
#endif
#endif
-#define ONE one.d
-#define HALFRAD halfrad.d
+ const int __mpsqrt_mp[33] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,
+ 4,4,4,4,4,4,4,4,4};
+#endif
- static const int mp[33] = {0,0,0,0,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,
- 4,4,4,4,4,4,4,4,4};
+#define ONE __mpsqrt_one.d
+#define HALFRAD __mpsqrt_halfrad.d
#endif
diff --git a/sysdeps/ieee754/dbl-64/mptan.c b/sysdeps/ieee754/dbl-64/mptan.c
index 267445a19e..e1e5d9b925 100644
--- a/sysdeps/ieee754/dbl-64/mptan.c
+++ b/sysdeps/ieee754/dbl-64/mptan.c
@@ -1,8 +1,7 @@
-
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -38,10 +37,16 @@
#include "endian.h"
#include "mpa.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
int __mpranred(double, mp_no *, int);
void __c32(mp_no *, mp_no *, mp_no *, int);
-void __mptan(double x, mp_no *mpy, int p) {
+void
+SECTION
+__mptan(double x, mp_no *mpy, int p) {
static const double MONE = -1.0;
diff --git a/sysdeps/ieee754/dbl-64/s_asinh.c b/sysdeps/ieee754/dbl-64/s_asinh.c
index 985cfe32e1..93789fb41e 100644
--- a/sysdeps/ieee754/dbl-64/s_asinh.c
+++ b/sysdeps/ieee754/dbl-64/s_asinh.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_asinh.c,v 1.9 1995/05/12 04:57:37 jtc Exp $";
-#endif
-
/* asinh(x)
* Method :
* Based on
@@ -28,40 +24,34 @@ static char rcsid[] = "$NetBSD: s_asinh.c,v 1.9 1995/05/12 04:57:37 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
one = 1.00000000000000000000e+00, /* 0x3FF00000, 0x00000000 */
ln2 = 6.93147180559945286227e-01, /* 0x3FE62E42, 0xFEFA39EF */
huge= 1.00000000000000000000e+300;
-#ifdef __STDC__
- double __asinh(double x)
-#else
- double __asinh(x)
- double x;
-#endif
+double
+__asinh(double x)
{
- double t,w;
+ double w;
int32_t hx,ix;
GET_HIGH_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix>=0x7ff00000) return x+x; /* x is inf or NaN */
- if(ix< 0x3e300000) { /* |x|<2**-28 */
+ if(__builtin_expect(ix< 0x3e300000, 0)) { /* |x|<2**-28 */
if(huge+x>one) return x; /* return x inexact except 0 */
}
- if(ix>0x41b00000) { /* |x| > 2**28 */
+ if(__builtin_expect(ix>0x41b00000, 0)) { /* |x| > 2**28 */
+ if(ix>=0x7ff00000) return x+x; /* x is inf or NaN */
w = __ieee754_log(fabs(x))+ln2;
- } else if (ix>0x40000000) { /* 2**28 > |x| > 2.0 */
- t = fabs(x);
- w = __ieee754_log(2.0*t+one/(__ieee754_sqrt(x*x+one)+t));
- } else { /* 2.0 > |x| > 2**-28 */
- t = x*x;
- w =__log1p(fabs(x)+t/(one+__ieee754_sqrt(one+t)));
+ } else {
+ double xa = fabs(x);
+ if (ix>0x40000000) { /* 2**28 > |x| > 2.0 */
+ w = __ieee754_log(2.0*xa+one/(__ieee754_sqrt(xa*xa+one)+xa));
+ } else { /* 2.0 > |x| > 2**-28 */
+ double t = xa*xa;
+ w =__log1p(xa+t/(one+__ieee754_sqrt(one+t)));
+ }
}
- if(hx>0) return w; else return -w;
+ return __copysign(w, x);
}
weak_alias (__asinh, asinh)
#ifdef NO_LONG_DOUBLE
diff --git a/sysdeps/ieee754/dbl-64/s_atan.c b/sysdeps/ieee754/dbl-64/s_atan.c
index 556f5b216d..65369ffb23 100644
--- a/sysdeps/ieee754/dbl-64/s_atan.c
+++ b/sysdeps/ieee754/dbl-64/s_atan.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -37,7 +37,7 @@
/* */
/************************************************************************/
-#include "dla.h"
+#include <dla.h>
#include "mpa.h"
#include "MathLib.h"
#include "uatan.tbl"
@@ -46,14 +46,23 @@
void __mpatan(mp_no *,mp_no *,int); /* see definition in mpatan.c */
static double atanMp(double,const int[]);
-double __signArctan(double,double);
+
+ /* Fix the sign of y and return */
+static double __signArctan(double x,double y){
+ return __copysign(y, x);
+}
+
+
/* An ultimate atan() routine. Given an IEEE double machine number x, */
/* routine computes the correctly rounded (to nearest) value of atan(x). */
double atan(double x) {
- double cor,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,u,u2,u3,
- v,vv,w,ww,y,yy,z,zz;
+ double cor,s1,ss1,s2,ss2,t1,t2,t3,t7,t8,t9,t10,u,u2,u3,
+ v,vv,w,ww,y,yy,z,zz;
+#ifndef DLA_FMS
+ double t4,t5,t6;
+#endif
#if 0
double y1,y2;
#endif
@@ -78,44 +87,44 @@ double atan(double x) {
if (u<C) {
if (u<B) {
if (u<A) { /* u < A */
- return x; }
+ return x; }
else { /* A <= u < B */
- v=x*x; yy=x*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
- if ((y=x+(yy-U1*x)) == x+(yy+U1*x)) return y;
-
- EMULV(x,x,v,vv,t1,t2,t3,t4,t5) /* v+vv=x^2 */
- s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
- ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- MUL2(x,ZERO,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(x,ZERO,s2,ss2,s1,ss1,t1,t2)
- if ((y=s1+(ss1-U5*s1)) == s1+(ss1+U5*s1)) return y;
-
- return atanMp(x,pr);
+ v=x*x; yy=x*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
+ if ((y=x+(yy-U1*x)) == x+(yy+U1*x)) return y;
+
+ EMULV(x,x,v,vv,t1,t2,t3,t4,t5) /* v+vv=x^2 */
+ s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
+ ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ MUL2(x,ZERO,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(x,ZERO,s2,ss2,s1,ss1,t1,t2)
+ if ((y=s1+(ss1-U5*s1)) == s1+(ss1+U5*s1)) return y;
+
+ return atanMp(x,pr);
} }
else { /* B <= u < C */
i=(TWO52+TWO8*u)-TWO52; i-=16;
z=u-cij[i][0].d;
yy=z*(cij[i][2].d+z*(cij[i][3].d+z*(cij[i][4].d+
- z*(cij[i][5].d+z* cij[i][6].d))));
+ z*(cij[i][5].d+z* cij[i][6].d))));
t1=cij[i][1].d;
if (i<112) {
- if (i<48) u2=U21; /* u < 1/4 */
- else u2=U22; } /* 1/4 <= u < 1/2 */
+ if (i<48) u2=U21; /* u < 1/4 */
+ else u2=U22; } /* 1/4 <= u < 1/2 */
else {
- if (i<176) u2=U23; /* 1/2 <= u < 3/4 */
- else u2=U24; } /* 3/4 <= u <= 1 */
+ if (i<176) u2=U23; /* 1/2 <= u < 3/4 */
+ else u2=U24; } /* 3/4 <= u <= 1 */
if ((y=t1+(yy-u2*t1)) == t1+(yy+u2*t1)) return __signArctan(x,y);
z=u-hij[i][0].d;
s1=z*(hij[i][11].d+z*(hij[i][12].d+z*(hij[i][13].d+
- z*(hij[i][14].d+z* hij[i][15].d))));
+ z*(hij[i][14].d+z* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(z,ZERO,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
@@ -138,7 +147,7 @@ double atan(double x) {
i=(TWO52+TWO8*w)-TWO52; i-=16;
z=(w-cij[i][0].d)+ww;
yy=HPI1-z*(cij[i][2].d+z*(cij[i][3].d+z*(cij[i][4].d+
- z*(cij[i][5].d+z* cij[i][6].d))));
+ z*(cij[i][5].d+z* cij[i][6].d))));
t1=HPI-cij[i][1].d;
if (i<112) u3=U31; /* w < 1/2 */
else u3=U32; /* w >= 1/2 */
@@ -148,7 +157,7 @@ double atan(double x) {
t1=w-hij[i][0].d;
EADD(t1,ww,z,zz)
s1=z*(hij[i][11].d+z*(hij[i][12].d+z*(hij[i][13].d+
- z*(hij[i][14].d+z* hij[i][15].d))));
+ z*(hij[i][14].d+z* hij[i][15].d))));
ADD2(hij[i][9].d,hij[i][10].d,s1,ZERO,s2,ss2,t1,t2)
MUL2(z,zz,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(hij[i][7].d,hij[i][8].d,s1,ss1,s2,ss2,t1,t2)
@@ -165,49 +174,41 @@ double atan(double x) {
}
else {
if (u<E) { /* D <= u < E */
- w=ONE/u; v=w*w;
- EMULV(w,u,t1,t2,t3,t4,t5,t6,t7)
- yy=w*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
- ww=w*((ONE-t1)-t2);
- ESUB(HPI,w,t3,cor)
- yy=((HPI1+cor)-ww)-yy;
- if ((y=t3+(yy-U4)) == t3+(yy+U4)) return __signArctan(x,y);
-
- DIV2(ONE,ZERO,u,ZERO,w,ww,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
- MUL2(w,ww,w,ww,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
- s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
- ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
- MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
- MUL2(w,ww,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
- ADD2(w,ww,s2,ss2,s1,ss1,t1,t2)
- SUB2(HPI,HPI1,s1,ss1,s2,ss2,t1,t2)
- if ((y=s2+(ss2-U8)) == s2+(ss2+U8)) return __signArctan(x,y);
+ w=ONE/u; v=w*w;
+ EMULV(w,u,t1,t2,t3,t4,t5,t6,t7)
+ yy=w*v*(d3.d+v*(d5.d+v*(d7.d+v*(d9.d+v*(d11.d+v*d13.d)))));
+ ww=w*((ONE-t1)-t2);
+ ESUB(HPI,w,t3,cor)
+ yy=((HPI1+cor)-ww)-yy;
+ if ((y=t3+(yy-U4)) == t3+(yy+U4)) return __signArctan(x,y);
+
+ DIV2(ONE,ZERO,u,ZERO,w,ww,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+ MUL2(w,ww,w,ww,v,vv,t1,t2,t3,t4,t5,t6,t7,t8)
+ s1=v*(f11.d+v*(f13.d+v*(f15.d+v*(f17.d+v*f19.d))));
+ ADD2(f9.d,ff9.d,s1,ZERO,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f7.d,ff7.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f5.d,ff5.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(f3.d,ff3.d,s1,ss1,s2,ss2,t1,t2)
+ MUL2(v,vv,s2,ss2,s1,ss1,t1,t2,t3,t4,t5,t6,t7,t8)
+ MUL2(w,ww,s1,ss1,s2,ss2,t1,t2,t3,t4,t5,t6,t7,t8)
+ ADD2(w,ww,s2,ss2,s1,ss1,t1,t2)
+ SUB2(HPI,HPI1,s1,ss1,s2,ss2,t1,t2)
+ if ((y=s2+(ss2-U8)) == s2+(ss2+U8)) return __signArctan(x,y);
return atanMp(x,pr);
}
else {
- /* u >= E */
- if (x>0) return HPI;
- else return MHPI; }
+ /* u >= E */
+ if (x>0) return HPI;
+ else return MHPI; }
}
}
}
-
- /* Fix the sign of y and return */
-double __signArctan(double x,double y){
-
- if (x<ZERO) return -y;
- else return y;
-}
-
/* Final stages. Compute atan(x) by multiple precision arithmetic */
static double atanMp(double x,const int pr[]){
mp_no mpx,mpy,mpy2,mperr,mpt1,mpy1;
diff --git a/sysdeps/ieee754/dbl-64/s_ceil.c b/sysdeps/ieee754/dbl-64/s_ceil.c
index 1b352a679e..de50e29bf2 100644
--- a/sysdeps/ieee754/dbl-64/s_ceil.c
+++ b/sysdeps/ieee754/dbl-64/s_ceil.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_ceil.c,v 1.8 1995/05/10 20:46:53 jtc Exp $";
-#endif
-
/*
* ceil(x)
* Return x rounded toward -inf to integral value
@@ -26,36 +22,27 @@ static char rcsid[] = "$NetBSD: s_ceil.c,v 1.8 1995/05/10 20:46:53 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double huge = 1.0e300;
-#else
-static double huge = 1.0e300;
-#endif
-#ifdef __STDC__
- double __ceil(double x)
-#else
- double __ceil(x)
- double x;
-#endif
+double
+__ceil(double x)
{
int32_t i0,i1,j0;
u_int32_t i,j;
EXTRACT_WORDS(i0,i1,x);
j0 = ((i0>>20)&0x7ff)-0x3ff;
if(j0<20) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0<0) {i0=0x80000000;i1=0;}
- else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}
- }
+ if(j0<0) { /* raise inexact if x != 0 */
+ math_force_eval(huge+x);
+ /* return 0*sign(x) if |x|<1 */
+ if(i0<0) {i0=0x80000000;i1=0;}
+ else if((i0|i1)!=0) { i0=0x3ff00000;i1=0;}
} else {
i = (0x000fffff)>>j0;
if(((i0&i)|i1)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0>0) i0 += (0x00100000)>>j0;
- i0 &= (~i); i1=0;
- }
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0>0) i0 += (0x00100000)>>j0;
+ i0 &= (~i); i1=0;
}
} else if (j0>51) {
if(j0==0x400) return x+x; /* inf or NaN */
@@ -63,23 +50,24 @@ static double huge = 1.0e300;
} else {
i = ((u_int32_t)(0xffffffff))>>(j0-20);
if((i1&i)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0>0) {
- if(j0==20) i0+=1;
- else {
- j = i1 + (1<<(52-j0));
- if(j<i1) i0+=1; /* got a carry */
- i1 = j;
- }
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0>0) {
+ if(j0==20) i0+=1;
+ else {
+ j = i1 + (1<<(52-j0));
+ if(j<i1) i0+=1; /* got a carry */
+ i1 = j;
}
- i1 &= (~i);
}
+ i1 &= (~i);
}
INSERT_WORDS(x,i0,i1);
return x;
}
+#ifndef __ceil
weak_alias (__ceil, ceil)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__ceil, __ceill)
weak_alias (__ceil, ceill)
+# endif
#endif
diff --git a/sysdeps/ieee754/dbl-64/s_expm1.c b/sysdeps/ieee754/dbl-64/s_expm1.c
index 324354336e..589128c08c 100644
--- a/sysdeps/ieee754/dbl-64/s_expm1.c
+++ b/sysdeps/ieee754/dbl-64/s_expm1.c
@@ -13,10 +13,6 @@
for performance improvement on pipelined processors.
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_expm1.c,v 1.8 1995/05/10 20:47:09 jtc Exp $";
-#endif
-
/* expm1(x)
* Returns exp(x)-1, the exponential of x minus 1.
*
@@ -40,38 +36,38 @@ static char rcsid[] = "$NetBSD: s_expm1.c,v 1.8 1995/05/10 20:47:09 jtc Exp $";
* = 6/r * ( 1 + 2.0*(1/(exp(r)-1) - 1/r))
* = 1 - r^2/60 + r^4/2520 - r^6/100800 + ...
* We use a special Reme algorithm on [0,0.347] to generate
- * a polynomial of degree 5 in r*r to approximate R1. The
+ * a polynomial of degree 5 in r*r to approximate R1. The
* maximum error of this polynomial approximation is bounded
* by 2**-61. In other words,
* R1(z) ~ 1.0 + Q1*z + Q2*z**2 + Q3*z**3 + Q4*z**4 + Q5*z**5
- * where Q1 = -1.6666666666666567384E-2,
- * Q2 = 3.9682539681370365873E-4,
- * Q3 = -9.9206344733435987357E-6,
- * Q4 = 2.5051361420808517002E-7,
- * Q5 = -6.2843505682382617102E-9;
- * (where z=r*r, and the values of Q1 to Q5 are listed below)
+ * where Q1 = -1.6666666666666567384E-2,
+ * Q2 = 3.9682539681370365873E-4,
+ * Q3 = -9.9206344733435987357E-6,
+ * Q4 = 2.5051361420808517002E-7,
+ * Q5 = -6.2843505682382617102E-9;
+ * (where z=r*r, and the values of Q1 to Q5 are listed below)
* with error bounded by
* | 5 | -61
* | 1.0+Q1*z+...+Q5*z - R1(z) | <= 2
* | |
*
* expm1(r) = exp(r)-1 is then computed by the following
- * specific way which minimize the accumulation rounding error:
+ * specific way which minimize the accumulation rounding error:
* 2 3
* r r [ 3 - (R1 + R1*r/2) ]
* expm1(r) = r + --- + --- * [--------------------]
- * 2 2 [ 6 - r*(3 - R1*r/2) ]
+ * 2 2 [ 6 - r*(3 - R1*r/2) ]
*
* To compensate the error in the argument reduction, we use
* expm1(r+c) = expm1(r) + c + expm1(r)*c
* ~ expm1(r) + c + r*c
* Thus c+r*c will be added in as the correction terms for
* expm1(r+c). Now rearrange the term to avoid optimization
- * screw up:
- * ( 2 2 )
- * ({ ( r [ R1 - (3 - R1*r/2) ] ) } r )
+ * screw up:
+ * ( 2 2 )
+ * ({ ( r [ R1 - (3 - R1*r/2) ] ) } r )
* expm1(r+c)~r - ({r*(--- * [--------------------]-c)-c} - --- )
- * ({ ( 2 [ 6 - r*(3 - R1*r/2) ] ) } 2 )
+ * ({ ( 2 [ 6 - r*(3 - R1*r/2) ] ) } 2 )
* ( )
*
* = r - E
@@ -87,7 +83,7 @@ static char rcsid[] = "$NetBSD: s_expm1.c,v 1.8 1995/05/10 20:47:09 jtc Exp $";
* (ii) if k=0, return r-E
* (iii) if k=-1, return 0.5*(r-E)-0.5
* (iv) if k=1 if r < -0.25, return 2*((r+0.5)- E)
- * else return 1.0+2.0*(r-E);
+ * else return 1.0+2.0*(r-E);
* (v) if (k<-2||k>56) return 2^k(1-(E-r)) - 1 (or exp(x)-1)
* (vi) if k <= 20, return 2^k((1-2^-k)-(E-r)), else
* (vii) return 2^k(1-((E+2^-k)-r))
@@ -116,11 +112,7 @@ static char rcsid[] = "$NetBSD: s_expm1.c,v 1.8 1995/05/10 20:47:09 jtc Exp $";
#include "math.h"
#include "math_private.h"
#define one Q[0]
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
huge = 1.0e+300,
tiny = 1.0e-300,
o_threshold = 7.09782712893383973096e+02,/* 0x40862E42, 0xFEFA39EF */
@@ -134,12 +126,8 @@ Q[] = {1.0, -3.33333333333331316428e-02, /* BFA11111 111110F4 */
4.00821782732936239552e-06, /* 3ED0CFCA 86E65239 */
-2.01099218183624371326e-07}; /* BE8AFDB7 6E09C32D */
-#ifdef __STDC__
- double __expm1(double x)
-#else
- double __expm1(x)
- double x;
-#endif
+double
+__expm1(double x)
{
double y,hi,lo,c,t,e,hxs,hfx,r1,h2,h4,R1,R2,R3;
int32_t k,xsb;
@@ -153,20 +141,20 @@ Q[] = {1.0, -3.33333333333331316428e-02, /* BFA11111 111110F4 */
/* filter out huge and non-finite argument */
if(hx >= 0x4043687A) { /* if |x|>=56*ln2 */
if(hx >= 0x40862E42) { /* if |x|>=709.78... */
- if(hx>=0x7ff00000) {
+ if(hx>=0x7ff00000) {
u_int32_t low;
GET_LOW_WORD(low,x);
if(((hx&0xfffff)|low)!=0)
- return x+x; /* NaN */
+ return x+x; /* NaN */
else return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
- }
- if(x > o_threshold) {
+ }
+ if(x > o_threshold) {
__set_errno (ERANGE);
return huge*huge; /* overflow */
}
}
if(xsb!=0) { /* x < -56*ln2, return -1.0 with inexact */
- if(x+tiny<0.0) /* raise inexact */
+ math_force_eval(x+tiny); /* raise inexact */
return tiny-one; /* return -1 */
}
}
@@ -187,7 +175,7 @@ Q[] = {1.0, -3.33333333333331316428e-02, /* BFA11111 111110F4 */
x = hi - lo;
c = (hi-x)-lo;
}
- else if(hx < 0x3c900000) { /* when |x|<2**-54, return x */
+ else if(hx < 0x3c900000) { /* when |x|<2**-54, return x */
t = huge+x; /* return x with inexact flags when x!=0 */
return x - (t-(huge+x));
}
@@ -212,28 +200,28 @@ Q[] = {1.0, -3.33333333333331316428e-02, /* BFA11111 111110F4 */
e -= hxs;
if(k== -1) return 0.5*(x-e)-0.5;
if(k==1) {
- if(x < -0.25) return -2.0*(e-(x+0.5));
- else return one+2.0*(x-e);
+ if(x < -0.25) return -2.0*(e-(x+0.5));
+ else return one+2.0*(x-e);
}
if (k <= -2 || k>56) { /* suffice to return exp(x)-1 */
- u_int32_t high;
- y = one-(e-x);
+ u_int32_t high;
+ y = one-(e-x);
GET_HIGH_WORD(high,y);
SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
- return y-one;
+ return y-one;
}
t = one;
if(k<20) {
- u_int32_t high;
- SET_HIGH_WORD(t,0x3ff00000 - (0x200000>>k)); /* t=1-2^-k */
- y = t-(e-x);
+ u_int32_t high;
+ SET_HIGH_WORD(t,0x3ff00000 - (0x200000>>k)); /* t=1-2^-k */
+ y = t-(e-x);
GET_HIGH_WORD(high,y);
SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
} else {
- u_int32_t high;
+ u_int32_t high;
SET_HIGH_WORD(t,((0x3ff-k)<<20)); /* 2^-k */
- y = x-(e+t);
- y += one;
+ y = x-(e+t);
+ y += one;
GET_HIGH_WORD(high,y);
SET_HIGH_WORD(y,high+(k<<20)); /* add k to y's exponent */
}
diff --git a/sysdeps/ieee754/dbl-64/s_finite.c b/sysdeps/ieee754/dbl-64/s_finite.c
index 90de0f9d11..2ca3bf2454 100644
--- a/sysdeps/ieee754/dbl-64/s_finite.c
+++ b/sysdeps/ieee754/dbl-64/s_finite.c
@@ -22,6 +22,7 @@ static char rcsid[] = "$NetBSD: s_finite.c,v 1.8 1995/05/10 20:47:17 jtc Exp $";
#include "math.h"
#include "math_private.h"
+#undef __finite
#ifdef __STDC__
int __finite(double x)
#else
diff --git a/sysdeps/ieee754/dbl-64/s_floor.c b/sysdeps/ieee754/dbl-64/s_floor.c
index 77db9ef392..8b2038e69d 100644
--- a/sysdeps/ieee754/dbl-64/s_floor.c
+++ b/sysdeps/ieee754/dbl-64/s_floor.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_floor.c,v 1.8 1995/05/10 20:47:20 jtc Exp $";
-#endif
-
/*
* floor(x)
* Return x rounded toward -inf to integral value
@@ -44,19 +40,17 @@ static double huge = 1.0e300;
EXTRACT_WORDS(i0,i1,x);
j0 = ((i0>>20)&0x7ff)-0x3ff;
if(j0<20) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0>=0) {i0=i1=0;}
- else if(((i0&0x7fffffff)|i1)!=0)
- { i0=0xbff00000;i1=0;}
- }
+ if(j0<0) { /* raise inexact if x != 0 */
+ math_force_eval(huge+x);/* return 0*sign(x) if |x|<1 */
+ if(i0>=0) {i0=i1=0;}
+ else if(((i0&0x7fffffff)|i1)!=0)
+ { i0=0xbff00000;i1=0;}
} else {
i = (0x000fffff)>>j0;
if(((i0&i)|i1)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0<0) i0 += (0x00100000)>>j0;
- i0 &= (~i); i1=0;
- }
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0<0) i0 += (0x00100000)>>j0;
+ i0 &= (~i); i1=0;
}
} else if (j0>51) {
if(j0==0x400) return x+x; /* inf or NaN */
@@ -64,23 +58,24 @@ static double huge = 1.0e300;
} else {
i = ((u_int32_t)(0xffffffff))>>(j0-20);
if((i1&i)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0<0) {
- if(j0==20) i0+=1;
- else {
- j = i1+(1<<(52-j0));
- if(j<i1) i0 +=1 ; /* got a carry */
- i1=j;
- }
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0<0) {
+ if(j0==20) i0+=1;
+ else {
+ j = i1+(1<<(52-j0));
+ if(j<i1) i0 +=1 ; /* got a carry */
+ i1=j;
}
- i1 &= (~i);
}
+ i1 &= (~i);
}
INSERT_WORDS(x,i0,i1);
return x;
}
+#ifndef __floor
weak_alias (__floor, floor)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__floor, __floorl)
weak_alias (__floor, floorl)
+# endif
#endif
diff --git a/sysdeps/ieee754/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c
index 3b0bfd5ce6..14c6503de2 100644
--- a/sysdeps/ieee754/dbl-64/s_fma.c
+++ b/sysdeps/ieee754/dbl-64/s_fma.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -22,6 +22,7 @@
#include <math.h>
#include <fenv.h>
#include <ieee754.h>
+#include <math_private.h>
/* This implementation uses rounding to odd to avoid problems with
double rounding. See a paper by Boldo and Melquiond:
@@ -47,7 +48,7 @@ __fma (double x, double y, double z)
z rather than NaN. */
if (w.ieee.exponent == 0x7ff
&& u.ieee.exponent != 0x7ff
- && v.ieee.exponent != 0x7ff)
+ && v.ieee.exponent != 0x7ff)
return (z + x) + y;
/* If x or y or z is Inf/NaN, or if fma will certainly overflow,
or if x * y is less than half of DBL_DENORM_MIN,
@@ -148,34 +149,33 @@ __fma (double x, double y, double z)
double a2 = t1 + t2;
fenv_t env;
- feholdexcept (&env);
- fesetround (FE_TOWARDZERO);
+ libc_feholdexcept_setround (&env, FE_TOWARDZERO);
/* Perform m2 + a2 addition with round to odd. */
u.d = a2 + m2;
if (__builtin_expect (adjust == 0, 1))
{
if ((u.ieee.mantissa1 & 1) == 0 && u.ieee.exponent != 0x7ff)
- u.ieee.mantissa1 |= fetestexcept (FE_INEXACT) != 0;
- feupdateenv (&env);
+ u.ieee.mantissa1 |= libc_fetestexcept (FE_INEXACT) != 0;
+ libc_feupdateenv (&env);
/* Result is a1 + u.d. */
return a1 + u.d;
}
else if (__builtin_expect (adjust > 0, 1))
{
if ((u.ieee.mantissa1 & 1) == 0 && u.ieee.exponent != 0x7ff)
- u.ieee.mantissa1 |= fetestexcept (FE_INEXACT) != 0;
- feupdateenv (&env);
+ u.ieee.mantissa1 |= libc_fetestexcept (FE_INEXACT) != 0;
+ libc_feupdateenv (&env);
/* Result is a1 + u.d, scaled up. */
return (a1 + u.d) * 0x1p53;
}
else
{
if ((u.ieee.mantissa1 & 1) == 0)
- u.ieee.mantissa1 |= fetestexcept (FE_INEXACT) != 0;
+ u.ieee.mantissa1 |= libc_fetestexcept (FE_INEXACT) != 0;
v.d = a1 + u.d;
- int j = fetestexcept (FE_INEXACT) != 0;
- feupdateenv (&env);
+ int j = libc_fetestexcept (FE_INEXACT) != 0;
+ libc_feupdateenv (&env);
/* Ensure the following computations are performed in default rounding
mode instead of just reusing the round to zero computation. */
asm volatile ("" : "=m" (u) : "m" (u));
diff --git a/sysdeps/ieee754/dbl-64/s_fmaf.c b/sysdeps/ieee754/dbl-64/s_fmaf.c
index cd16cd1dce..dc748e5548 100644
--- a/sysdeps/ieee754/dbl-64/s_fmaf.c
+++ b/sysdeps/ieee754/dbl-64/s_fmaf.c
@@ -1,5 +1,5 @@
/* Compute x * y + z as ternary operation.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2010.
@@ -21,6 +21,7 @@
#include <math.h>
#include <fenv.h>
#include <ieee754.h>
+#include <math_private.h>
/* This implementation relies on double being more than twice as
precise as float and uses rounding to odd in order to avoid problems
@@ -35,13 +36,12 @@ __fmaf (float x, float y, float z)
/* Multiplication is always exact. */
double temp = (double) x * (double) y;
union ieee754_double u;
- feholdexcept (&env);
- fesetround (FE_TOWARDZERO);
+ libc_feholdexcept_setroundf (&env, FE_TOWARDZERO);
/* Perform addition with round to odd. */
u.d = temp + (double) z;
if ((u.ieee.mantissa1 & 1) == 0 && u.ieee.exponent != 0x7ff)
- u.ieee.mantissa1 |= fetestexcept (FE_INEXACT) != 0;
- feupdateenv (&env);
+ u.ieee.mantissa1 |= libc_fetestexcept (FE_INEXACT) != 0;
+ libc_feupdateenv (&env);
/* And finally truncation with round to nearest. */
return (float) u.d;
}
diff --git a/sysdeps/ieee754/dbl-64/s_isinf_ns.c b/sysdeps/ieee754/dbl-64/s_isinf_ns.c
new file mode 100644
index 0000000000..065522ed80
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/s_isinf_ns.c
@@ -0,0 +1,20 @@
+/*
+ * Written by Ulrich Drepper <drepper@gmail.com>.
+ */
+
+/*
+ * __isinf_ns(x) returns != 0 if x is ±inf, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#undef __isinf_ns
+int
+__isinf_ns (double x)
+{
+ int32_t hx,lx;
+ EXTRACT_WORDS(hx,lx,x);
+ return !(lx | ((hx & 0x7fffffff) ^ 0x7ff00000));
+}
diff --git a/sysdeps/ieee754/dbl-64/s_isnan.c b/sysdeps/ieee754/dbl-64/s_isnan.c
index 3a089e99a8..74e8291609 100644
--- a/sysdeps/ieee754/dbl-64/s_isnan.c
+++ b/sysdeps/ieee754/dbl-64/s_isnan.c
@@ -22,6 +22,7 @@ static char rcsid[] = "$NetBSD: s_isnan.c,v 1.8 1995/05/10 20:47:36 jtc Exp $";
#include "math.h"
#include "math_private.h"
+#undef __isnan
#ifdef __STDC__
int __isnan(double x)
#else
diff --git a/sysdeps/ieee754/dbl-64/s_log1p.c b/sysdeps/ieee754/dbl-64/s_log1p.c
index 0a9801a931..dc79a02bb3 100644
--- a/sysdeps/ieee754/dbl-64/s_log1p.c
+++ b/sysdeps/ieee754/dbl-64/s_log1p.c
@@ -13,10 +13,6 @@
for performance improvement on pipelined processors.
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_log1p.c,v 1.8 1995/05/10 20:47:46 jtc Exp $";
-#endif
-
/* double log1p(double x)
*
* Method :
@@ -34,14 +30,14 @@ static char rcsid[] = "$NetBSD: s_log1p.c,v 1.8 1995/05/10 20:47:46 jtc Exp $";
* 2. Approximation of log1p(f).
* Let s = f/(2+f) ; based on log(1+f) = log(1+s) - log(1-s)
* = 2s + 2/3 s**3 + 2/5 s**5 + .....,
- * = 2s + s*R
+ * = 2s + s*R
* We use a special Reme algorithm on [0,0.1716] to generate
- * a polynomial of degree 14 to approximate R The maximum error
+ * a polynomial of degree 14 to approximate R The maximum error
* of this polynomial approximation is bounded by 2**-58.45. In
* other words,
- * 2 4 6 8 10 12 14
+ * 2 4 6 8 10 12 14
* R(z) ~ Lp1*s +Lp2*s +Lp3*s +Lp4*s +Lp5*s +Lp6*s +Lp7*s
- * (the values of Lp1 to Lp7 are listed in the program)
+ * (the values of Lp1 to Lp7 are listed in the program)
* and
* | 2 14 | -58.45
* | Lp1*s +...+Lp7*s - R(z) | <= 2
@@ -52,7 +48,7 @@ static char rcsid[] = "$NetBSD: s_log1p.c,v 1.8 1995/05/10 20:47:46 jtc Exp $";
* log1p(f) = f - (hfsq - s*(hfsq+R)).
*
* 3. Finally, log1p(x) = k*ln2 + log1p(f).
- * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
+ * = k*ln2_hi+(f-(hfsq-(s*(hfsq+R)+k*ln2_lo)))
* Here ln2 is split into two floating point number:
* ln2_hi + ln2_lo,
* where n*ln2_hi is always exact for |n| < 2000.
@@ -73,7 +69,7 @@ static char rcsid[] = "$NetBSD: s_log1p.c,v 1.8 1995/05/10 20:47:46 jtc Exp $";
* to produce the hexadecimal values shown.
*
* Note: Assuming log() return accurate answer, the following
- * algorithm can be used to compute log1p(x) to within a few ULP:
+ * algorithm can be used to compute log1p(x) to within a few ULP:
*
* u = 1+x;
* if(u==1.0) return x ; else
@@ -85,11 +81,7 @@ static char rcsid[] = "$NetBSD: s_log1p.c,v 1.8 1995/05/10 20:47:46 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
ln2_lo = 1.90821492927058770002e-10, /* 3dea39ef 35793c76 */
two54 = 1.80143985094819840000e+16, /* 43500000 00000000 */
@@ -101,18 +93,10 @@ Lp[] = {0.0, 6.666666666666735130e-01, /* 3FE55555 55555593 */
1.531383769920937332e-01, /* 3FC39A09 D078C69F */
1.479819860511658591e-01}; /* 3FC2F112 DF3E5244 */
-#ifdef __STDC__
static const double zero = 0.0;
-#else
-static double zero = 0.0;
-#endif
-#ifdef __STDC__
- double __log1p(double x)
-#else
- double __log1p(x)
- double x;
-#endif
+double
+__log1p(double x)
{
double hfsq,f,c,s,z,R,u,z2,z4,z6,R1,R2,R3,R4;
int32_t k,hx,hu,ax;
@@ -127,8 +111,8 @@ static double zero = 0.0;
else return (x-x)/(x-x); /* log1p(x<-1)=NaN */
}
if(ax<0x3e200000) { /* |x| < 2**-29 */
- if(two54+x>zero /* raise inexact */
- &&ax<0x3c900000) /* |x| < 2**-54 */
+ math_force_eval(two54+x); /* raise inexact */
+ if (ax<0x3c900000) /* |x| < 2**-54 */
return x;
else
return x - x*x*0.5;
@@ -141,22 +125,22 @@ static double zero = 0.0;
if(hx<0x43400000) {
u = 1.0+x;
GET_HIGH_WORD(hu,u);
- k = (hu>>20)-1023;
- c = (k>0)? 1.0-(u-x):x-(u-1.0);/* correction term */
+ k = (hu>>20)-1023;
+ c = (k>0)? 1.0-(u-x):x-(u-1.0);/* correction term */
c /= u;
} else {
u = x;
GET_HIGH_WORD(hu,u);
- k = (hu>>20)-1023;
+ k = (hu>>20)-1023;
c = 0;
}
hu &= 0x000fffff;
if(hu<0x6a09e) {
- SET_HIGH_WORD(u,hu|0x3ff00000); /* normalize u */
+ SET_HIGH_WORD(u,hu|0x3ff00000); /* normalize u */
} else {
- k += 1;
+ k += 1;
SET_HIGH_WORD(u,hu|0x3fe00000); /* normalize u/2 */
- hu = (0x00100000-hu)>>2;
+ hu = (0x00100000-hu)>>2;
}
f = u-1.0;
}
@@ -168,9 +152,9 @@ static double zero = 0.0;
}
R = hfsq*(1.0-0.66666666666666666*f);
if(k==0) return f-R; else
- return k*ln2_hi-((R-(k*ln2_lo+c))-f);
+ return k*ln2_hi-((R-(k*ln2_lo+c))-f);
}
- s = f/(2.0+f);
+ s = f/(2.0+f);
z = s*s;
#ifdef DO_NOT_USE_THIS
R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7))))));
diff --git a/sysdeps/ieee754/dbl-64/s_rint.c b/sysdeps/ieee754/dbl-64/s_rint.c
index 4e6381efbe..a671a6277e 100644
--- a/sysdeps/ieee754/dbl-64/s_rint.c
+++ b/sysdeps/ieee754/dbl-64/s_rint.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_rint.c,v 1.8 1995/05/10 20:48:04 jtc Exp $";
-#endif
-
/*
* rint(x)
* Return x rounded to integral value according to the prevailing
@@ -27,22 +23,14 @@ static char rcsid[] = "$NetBSD: s_rint.c,v 1.8 1995/05/10 20:48:04 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
TWO52[2]={
4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
-4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
};
-#ifdef __STDC__
- double __rint(double x)
-#else
- double __rint(x)
- double x;
-#endif
+double
+__rint(double x)
{
int32_t i0,j0,sx;
u_int32_t i,i1;
@@ -57,11 +45,11 @@ TWO52[2]={
i0 &= 0xfffe0000;
i0 |= ((i1|-i1)>>12)&0x80000;
SET_HIGH_WORD(x,i0);
- w = TWO52[sx]+x;
- t = w-TWO52[sx];
+ w = TWO52[sx]+x;
+ t = w-TWO52[sx];
GET_HIGH_WORD(i0,t);
SET_HIGH_WORD(t,(i0&0x7fffffff)|(sx<<31));
- return t;
+ return t;
} else {
i = (0x000fffff)>>j0;
if(((i0&i)|i1)==0) return x; /* x is integral */
@@ -91,8 +79,10 @@ TWO52[2]={
w = TWO52[sx]+x;
return w-TWO52[sx];
}
+#ifndef __rint
weak_alias (__rint, rint)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__rint, __rintl)
weak_alias (__rint, rintl)
+# endif
#endif
diff --git a/sysdeps/ieee754/dbl-64/s_round.c b/sysdeps/ieee754/dbl-64/s_round.c
index 94fcde0e4c..74461967fc 100644
--- a/sysdeps/ieee754/dbl-64/s_round.c
+++ b/sysdeps/ieee754/dbl-64/s_round.c
@@ -1,5 +1,5 @@
/* Round double to integer away from zero.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -38,13 +38,12 @@ __round (double x)
{
if (j0 < 0)
{
- if (huge + x > 0.0)
- {
- i0 &= 0x80000000;
- if (j0 == -1)
- i0 |= 0x3ff00000;
- i1 = 0;
- }
+ math_force_eval (huge + x);
+
+ i0 &= 0x80000000;
+ if (j0 == -1)
+ i0 |= 0x3ff00000;
+ i1 = 0;
}
else
{
@@ -52,13 +51,12 @@ __round (double x)
if (((i0 & i) | i1) == 0)
/* X is integral. */
return x;
- if (huge + x > 0.0)
- {
- /* Raise inexact if x != 0. */
- i0 += 0x00080000 >> j0;
- i0 &= ~i;
- i1 = 0;
- }
+ math_force_eval (huge + x);
+
+ /* Raise inexact if x != 0. */
+ i0 += 0x00080000 >> j0;
+ i0 &= ~i;
+ i1 = 0;
}
}
else if (j0 > 51)
@@ -76,14 +74,13 @@ __round (double x)
/* X is integral. */
return x;
- if (huge + x > 0.0)
- {
- /* Raise inexact if x != 0. */
- u_int32_t j = i1 + (1 << (51 - j0));
- if (j < i1)
- i0 += 1;
- i1 = j;
- }
+ math_force_eval (huge + x);
+
+ /* Raise inexact if x != 0. */
+ u_int32_t j = i1 + (1 << (51 - j0));
+ if (j < i1)
+ i0 += 1;
+ i1 = j;
i1 &= ~i;
}
diff --git a/sysdeps/ieee754/dbl-64/s_sin.c b/sysdeps/ieee754/dbl-64/s_sin.c
index b40776f5e2..5183e55e8b 100644
--- a/sysdeps/ieee754/dbl-64/s_sin.c
+++ b/sysdeps/ieee754/dbl-64/s_sin.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001, 2009 Free Software Foundation
+ * Copyright (C) 2001, 2009, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -53,15 +53,24 @@
#include "mydefs.h"
#include "usncs.h"
#include "MathLib.h"
-#include "sincos.tbl"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
+extern const union
+{
+ int4 i[880];
+ double x[440];
+} __sincostab attribute_hidden;
+
static const double
- sn3 = -1.66666666666664880952546298448555E-01,
- sn5 = 8.33333214285722277379541354343671E-03,
- cs2 = 4.99999999999999999999950396842453E-01,
- cs4 = -4.16666666666664434524222570944589E-02,
- cs6 = 1.38888874007937613028114285595617E-03;
+ sn3 = -1.66666666666664880952546298448555E-01,
+ sn5 = 8.33333214285722277379541354343671E-03,
+ cs2 = 4.99999999999999999999950396842453E-01,
+ cs4 = -4.16666666666664434524222570944589E-02,
+ cs6 = 1.38888874007937613028114285595617E-03;
void __dubsin(double x, double dx, double w[]);
void __docos(double x, double dx, double w[]);
@@ -87,7 +96,9 @@ static double csloww2(double x, double dx, double orig, int n);
/* An ultimate sin routine. Given an IEEE double machine number x */
/* it computes the correctly rounded (to nearest) value of sin(x) */
/*******************************************************************/
-double __sin(double x){
+double
+SECTION
+__sin(double x){
double xx,res,t,cor,y,s,c,sn,ssn,cs,ccs,xn,a,da,db,eps,xn1,xn2;
#if 0
double w[2];
@@ -120,14 +131,14 @@ double __sin(double x){
s = y + y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=(m>0)?sincos.x[k]:-sincos.x[k];
- ssn=(m>0)?sincos.x[k+1]:-sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=(m>0)?__sincostab.x[k]:-__sincostab.x[k];
+ ssn=(m>0)?__sincostab.x[k+1]:-__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ssn+s*ccs-sn*c)+cs*s;
res=sn+cor;
cor=(sn-res)+cor;
- return (res==res+1.025*cor)? res : slow1(x);
+ return (res==res+1.096*cor)? res : slow1(x);
} /* else if (k < 0x3feb6000) */
/*----------------------- 0.855469 <|x|<2.426265 ----------------------*/
@@ -146,10 +157,10 @@ double __sin(double x){
s = y + y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ccs-s*ssn-cs*c)-sn*s;
res=cs+cor;
cor=(cs-res)+cor;
@@ -174,7 +185,7 @@ double __sin(double x){
xx = a*a;
if (n) {a=-a;da=-da;}
if (xx < 0.01588) {
- /*Taylor series */
+ /*Taylor series */
t = (((((s5.x*xx + s4.x)*xx + s3.x)*xx + s2.x)*xx + s1.x)*a - 0.5*da)*xx+da;
res = a+t;
cor = (a-res)+t;
@@ -192,10 +203,10 @@ double __sin(double x){
s = y + (db+y*xx*(sn3 +xx*sn5));
c = y*db+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ssn+s*ccs-sn*c)+cs*s;
res=sn+cor;
cor=(sn-res)+cor;
@@ -212,10 +223,10 @@ double __sin(double x){
y=a-(u.x-big.x)+da;
xx=y*y;
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
s = y + y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
cor=(ccs-s*ssn-cs*c)-sn*s;
@@ -253,7 +264,7 @@ double __sin(double x){
xx = a*a;
if (n) {a=-a;da=-da;}
if (xx < 0.01588) {
- /* Taylor series */
+ /* Taylor series */
t = (((((s5.x*xx + s4.x)*xx + s3.x)*xx + s2.x)*xx + s1.x)*a - 0.5*da)*xx+da;
res = a+t;
cor = (a-res)+t;
@@ -269,10 +280,10 @@ double __sin(double x){
s = y + (db+y*xx*(sn3 +xx*sn5));
c = y*db+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ssn+s*ccs-sn*c)+cs*s;
res=sn+cor;
cor=(sn-res)+cor;
@@ -289,10 +300,10 @@ double __sin(double x){
y=a-(u.x-big.x)+da;
xx=y*y;
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
s = y + y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
cor=(ccs-s*ssn-cs*c)-sn*s;
@@ -344,7 +355,9 @@ double __sin(double x){
/* it computes the correctly rounded (to nearest) value of cos(x) */
/*******************************************************************/
-double __cos(double x)
+double
+SECTION
+__cos(double x)
{
double y,xx,res,t,cor,s,c,sn,ssn,cs,ccs,xn,a,da,db,eps,xn1,xn2;
mynumber u,v;
@@ -364,10 +377,10 @@ double __cos(double x)
s = y + y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ccs-s*ssn-cs*c)-sn*s;
res=cs+cor;
cor=(cs-res)+cor;
@@ -396,10 +409,10 @@ double __cos(double x)
s = y + (db+y*xx*(sn3 +xx*sn5));
c = y*db+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ssn+s*ccs-sn*c)+cs*s;
res=sn+cor;
cor=(sn-res)+cor;
@@ -442,10 +455,10 @@ double __cos(double x)
s = y + (db+y*xx*(sn3 +xx*sn5));
c = y*db+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ssn+s*ccs-sn*c)+cs*s;
res=sn+cor;
cor=(sn-res)+cor;
@@ -461,10 +474,10 @@ double __cos(double x)
y=a-(u.x-big.x)+da;
xx=y*y;
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
s = y + y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
cor=(ccs-s*ssn-cs*c)-sn*s;
@@ -473,7 +486,7 @@ double __cos(double x)
cor = (cor>0)? 1.025*cor+eps : 1.025*cor-eps;
return (res==res+cor)? ((n)?-res:res) : csloww2(a,da,x,n);
- break;
+ break;
}
@@ -517,10 +530,10 @@ double __cos(double x)
s = y + (db+y*xx*(sn3 +xx*sn5));
c = y*db+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
cor=(ssn+s*ccs-sn*c)+cs*s;
res=sn+cor;
cor=(sn-res)+cor;
@@ -536,10 +549,10 @@ double __cos(double x)
y=a-(u.x-big.x)+da;
xx=y*y;
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
s = y + y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
cor=(ccs-s*ssn-cs*c)-sn*s;
@@ -591,7 +604,9 @@ double __cos(double x)
/* precision and if still doesn't accurate enough by mpsin or dubsin */
/************************************************************************/
-static double slow(double x) {
+static double
+SECTION
+slow(double x) {
static const double th2_36 = 206158430208.0; /* 1.5*2**37 */
double y,x1,x2,xx,r,t,res,cor,w[2];
x1=(x+th2_36)-th2_36;
@@ -611,11 +626,13 @@ static const double th2_36 = 206158430208.0; /* 1.5*2**37 */
}
}
/*******************************************************************************/
-/* Routine compute sin(x) for 0.25<|x|< 0.855469 by sincos.tbl and Taylor */
+/* Routine compute sin(x) for 0.25<|x|< 0.855469 by __sincostab.tbl and Taylor */
/* and if result still doesn't accurate enough by mpsin or dubsin */
/*******************************************************************************/
-static double slow1(double x) {
+static double
+SECTION
+slow1(double x) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,c1,c2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -627,10 +644,10 @@ static double slow1(double x) {
s = y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k]; /* Data */
- ssn=sincos.x[k+1]; /* from */
- cs=sincos.x[k+2]; /* tables */
- ccs=sincos.x[k+3]; /* sincos.tbl */
+ sn=__sincostab.x[k]; /* Data */
+ ssn=__sincostab.x[k+1]; /* from */
+ cs=__sincostab.x[k+2]; /* tables */
+ ccs=__sincostab.x[k+3]; /* __sincostab.tbl */
y1 = (y+t22)-t22;
y2 = y - y1;
c1 = (cs+t22)-t22;
@@ -648,10 +665,12 @@ static double slow1(double x) {
}
}
/**************************************************************************/
-/* Routine compute sin(x) for 0.855469 <|x|<2.426265 by sincos.tbl */
+/* Routine compute sin(x) for 0.855469 <|x|<2.426265 by __sincostab.tbl */
/* and if result still doesn't accurate enough by mpsin or dubsin */
/**************************************************************************/
-static double slow2(double x) {
+static double
+SECTION
+slow2(double x) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,e1,e2,xx,cor,res,del;
static const double t22 = 6291456.0;
@@ -672,10 +691,10 @@ static double slow2(double x) {
s = y*xx*(sn3 +xx*sn5);
c = y*del+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = (y - y1)+del;
e1 = (sn+t22)-t22;
@@ -703,7 +722,9 @@ static double slow2(double x) {
/* result.And if result not accurate enough routine calls mpsin1 or dubsin */
/***************************************************************************/
-static double sloww(double x,double dx, double orig) {
+static double
+SECTION
+sloww(double x,double dx, double orig) {
static const double th2_36 = 206158430208.0; /* 1.5*2**37 */
double y,x1,x2,xx,r,t,res,cor,w[2],a,da,xn;
union {int4 i[2]; double x;} v;
@@ -750,7 +771,9 @@ static double sloww(double x,double dx, double orig) {
/* accurate enough routine calls mpsin1 or dubsin */
/***************************************************************************/
-static double sloww1(double x, double dx, double orig) {
+static double
+SECTION
+sloww1(double x, double dx, double orig) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,c1,c2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -763,10 +786,10 @@ static double sloww1(double x, double dx, double orig) {
s = y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = (y - y1)+dx;
c1 = (cs+t22)-t22;
@@ -792,7 +815,9 @@ static double sloww1(double x, double dx, double orig) {
/* accurate enough routine calls mpsin1 or dubsin */
/***************************************************************************/
-static double sloww2(double x, double dx, double orig, int n) {
+static double
+SECTION
+sloww2(double x, double dx, double orig, int n) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,e1,e2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -805,10 +830,10 @@ static double sloww2(double x, double dx, double orig, int n) {
s = y*xx*(sn3 +xx*sn5);
c = y*dx+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = (y - y1)+dx;
@@ -836,7 +861,9 @@ static double sloww2(double x, double dx, double orig, int n) {
/* result.And if result not accurate enough routine calls other routines */
/***************************************************************************/
-static double bsloww(double x,double dx, double orig,int n) {
+static double
+SECTION
+bsloww(double x,double dx, double orig,int n) {
static const double th2_36 = 206158430208.0; /* 1.5*2**37 */
double y,x1,x2,xx,r,t,res,cor,w[2];
#if 0
@@ -869,7 +896,9 @@ static double bsloww(double x,double dx, double orig,int n) {
/* And if result not accurate enough routine calls other routines */
/***************************************************************************/
-static double bsloww1(double x, double dx, double orig,int n) {
+static double
+SECTION
+bsloww1(double x, double dx, double orig,int n) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,c1,c2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -882,10 +911,10 @@ mynumber u;
s = y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = (y - y1)+dx;
c1 = (cs+t22)-t22;
@@ -912,7 +941,9 @@ mynumber u;
/* And if result not accurate enough routine calls other routines */
/***************************************************************************/
-static double bsloww2(double x, double dx, double orig, int n) {
+static double
+SECTION
+bsloww2(double x, double dx, double orig, int n) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,e1,e2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -925,10 +956,10 @@ mynumber u;
s = y*xx*(sn3 +xx*sn5);
c = y*dx+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = (y - y1)+dx;
@@ -954,7 +985,9 @@ mynumber u;
/* precision and if still doesn't accurate enough by mpcos or docos */
/************************************************************************/
-static double cslow2(double x) {
+static double
+SECTION
+cslow2(double x) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,e1,e2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -966,10 +999,10 @@ static double cslow2(double x) {
s = y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = y - y1;
e1 = (sn+t22)-t22;
@@ -997,7 +1030,9 @@ static double cslow2(double x) {
/***************************************************************************/
-static double csloww(double x,double dx, double orig) {
+static double
+SECTION
+csloww(double x,double dx, double orig) {
static const double th2_36 = 206158430208.0; /* 1.5*2**37 */
double y,x1,x2,xx,r,t,res,cor,w[2],a,da,xn;
union {int4 i[2]; double x;} v;
@@ -1046,7 +1081,9 @@ static double csloww(double x,double dx, double orig) {
/* accurate enough routine calls other routines */
/***************************************************************************/
-static double csloww1(double x, double dx, double orig) {
+static double
+SECTION
+csloww1(double x, double dx, double orig) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,c1,c2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -1059,10 +1096,10 @@ static double csloww1(double x, double dx, double orig) {
s = y*xx*(sn3 +xx*sn5);
c = xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = (y - y1)+dx;
c1 = (cs+t22)-t22;
@@ -1090,7 +1127,9 @@ static double csloww1(double x, double dx, double orig) {
/* accurate enough routine calls other routines */
/***************************************************************************/
-static double csloww2(double x, double dx, double orig, int n) {
+static double
+SECTION
+csloww2(double x, double dx, double orig, int n) {
mynumber u;
double sn,ssn,cs,ccs,s,c,w[2],y,y1,y2,e1,e2,xx,cor,res;
static const double t22 = 6291456.0;
@@ -1103,10 +1142,10 @@ static double csloww2(double x, double dx, double orig, int n) {
s = y*xx*(sn3 +xx*sn5);
c = y*dx+xx*(cs2 +xx*(cs4 + xx*cs6));
k=u.i[LOW_HALF]<<2;
- sn=sincos.x[k];
- ssn=sincos.x[k+1];
- cs=sincos.x[k+2];
- ccs=sincos.x[k+3];
+ sn=__sincostab.x[k];
+ ssn=__sincostab.x[k+1];
+ cs=__sincostab.x[k+2];
+ ccs=__sincostab.x[k+3];
y1 = (y+t22)-t22;
y2 = (y - y1)+dx;
@@ -1127,12 +1166,17 @@ static double csloww2(double x, double dx, double orig, int n) {
}
}
+#ifndef __cos
weak_alias (__cos, cos)
+# ifdef NO_LONG_DOUBLE
+strong_alias (__cos, __cosl)
+weak_alias (__cos, cosl)
+# endif
+#endif
+#ifndef __sin
weak_alias (__sin, sin)
-
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__sin, __sinl)
weak_alias (__sin, sinl)
-strong_alias (__cos, __cosl)
-weak_alias (__cos, cosl)
+# endif
#endif
diff --git a/sysdeps/ieee754/dbl-64/s_tan.c b/sysdeps/ieee754/dbl-64/s_tan.c
index 4e26d90ae1..f0fcd677ae 100644
--- a/sysdeps/ieee754/dbl-64/s_tan.c
+++ b/sysdeps/ieee754/dbl-64/s_tan.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001, 2009 Free Software Foundation
+ * Copyright (C) 2001, 2009, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -36,21 +36,30 @@
#include <errno.h>
#include "endian.h"
-#include "dla.h"
+#include <dla.h>
#include "mpa.h"
#include "MathLib.h"
#include "math.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
static double tanMp(double);
void __mptan(double, mp_no *, int);
-double tan(double x) {
+double
+SECTION
+tan(double x) {
#include "utan.h"
#include "utan.tbl"
int ux,i,n;
double a,da,a2,b,db,c,dc,c1,cc1,c2,cc2,c3,cc3,fi,ffi,gi,pz,s,sy,
- t,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10,w,x2,xn,xx2,y,ya,yya,z0,z,zz,z2,zz2;
+ t,t1,t2,t3,t4,t7,t8,t9,t10,w,x2,xn,xx2,y,ya,yya,z0,z,zz,z2,zz2;
+#ifndef DLA_FMS
+ double t5,t6;
+#endif
int p;
number num,v;
mp_no mpa,mpt1,mpt2;
@@ -84,7 +93,7 @@ double tan(double x) {
/* Second stage */
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
- x2*a27.d))))));
+ x2*a27.d))))));
EMULV(x,x,x2,xx2,t1,t2,t3,t4,t5)
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
@@ -159,13 +168,13 @@ double tan(double x) {
a2 = a*a;
t2 = da+a*a2*(d3.d+a2*(d5.d+a2*(d7.d+a2*(d9.d+a2*d11.d))));
if (n) {
- /* First stage -cot */
- EADD(a,t2,b,db)
- DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
- if ((y=c+(dc-u6.d*c))==c+(dc+u6.d*c)) return (-y); }
+ /* First stage -cot */
+ EADD(a,t2,b,db)
+ DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+ if ((y=c+(dc-u6.d*c))==c+(dc+u6.d*c)) return (-y); }
else {
- /* First stage tan */
- if ((y=a+(t2-u5.d*a))==a+(t2+u5.d*a)) return y; }
+ /* First stage tan */
+ if ((y=a+(t2-u5.d*a))==a+(t2+u5.d*a)) return y; }
/* Second stage */
/* Range reduction by algorithm ii */
t = (x*hpinv.d + toint.d);
@@ -184,7 +193,7 @@ double tan(double x) {
EADD(a,da,t1,t2) a=t1; da=t2;
MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
- x2*a27.d))))));
+ x2*a27.d))))));
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
@@ -201,12 +210,12 @@ double tan(double x) {
ADD2(a ,da ,c2,cc2,c1,cc1,t1,t2)
if (n) {
- /* Second stage -cot */
- DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
- if ((y=c2+(cc2-u8.d*c2)) == c2+(cc2+u8.d*c2)) return (-y); }
+ /* Second stage -cot */
+ DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+ if ((y=c2+(cc2-u8.d*c2)) == c2+(cc2+u8.d*c2)) return (-y); }
else {
- /* Second stage tan */
- if ((y=c1+(cc1-u7.d*c1)) == c1+(cc1+u7.d*c1)) return y; }
+ /* Second stage tan */
+ if ((y=c1+(cc1-u7.d*c1)) == c1+(cc1+u7.d*c1)) return y; }
return tanMp(x);
}
@@ -287,18 +296,18 @@ double tan(double x) {
a2 = a*a;
t2 = da+a*a2*(d3.d+a2*(d5.d+a2*(d7.d+a2*(d9.d+a2*d11.d))));
if (n) {
- /* First stage -cot */
- EADD(a,t2,b,db)
- DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
- if ((y=c+(dc-u14.d*c))==c+(dc+u14.d*c)) return (-y); }
+ /* First stage -cot */
+ EADD(a,t2,b,db)
+ DIV2(one.d,zero.d,b,db,c,dc,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+ if ((y=c+(dc-u14.d*c))==c+(dc+u14.d*c)) return (-y); }
else {
- /* First stage tan */
- if ((y=a+(t2-u13.d*a))==a+(t2+u13.d*a)) return y; }
+ /* First stage tan */
+ if ((y=a+(t2-u13.d*a))==a+(t2+u13.d*a)) return y; }
/* Second stage */
MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
- x2*a27.d))))));
+ x2*a27.d))))));
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
@@ -315,12 +324,12 @@ double tan(double x) {
ADD2(a ,da ,c2,cc2,c1,cc1,t1,t2)
if (n) {
- /* Second stage -cot */
- DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
- if ((y=c2+(cc2-u16.d*c2)) == c2+(cc2+u16.d*c2)) return (-y); }
+ /* Second stage -cot */
+ DIV2(one.d,zero.d,c1,cc1,c2,cc2,t1,t2,t3,t4,t5,t6,t7,t8,t9,t10)
+ if ((y=c2+(cc2-u16.d*c2)) == c2+(cc2+u16.d*c2)) return (-y); }
else {
- /* Second stage tan */
- if ((y=c1+(cc1-u15.d*c1)) == c1+(cc1+u15.d*c1)) return (y); }
+ /* Second stage tan */
+ if ((y=c1+(cc1-u15.d*c1)) == c1+(cc1+u15.d*c1)) return (y); }
return tanMp(x);
}
@@ -404,7 +413,7 @@ double tan(double x) {
MUL2(a,da,a,da,x2,xx2,t1,t2,t3,t4,t5,t6,t7,t8)
c1 = x2*(a15.d+x2*(a17.d+x2*(a19.d+x2*(a21.d+x2*(a23.d+x2*(a25.d+
- x2*a27.d))))));
+ x2*a27.d))))));
ADD2(a13.d,aa13.d,c1,zero.d,c2,cc2,t1,t2)
MUL2(x2,xx2,c2,cc2,c1,cc1,t1,t2,t3,t4,t5,t6,t7,t8)
ADD2(a11.d,aa11.d,c1,cc1,c2,cc2,t1,t2)
@@ -483,7 +492,9 @@ double tan(double x) {
/* multiple precision stage */
/* Convert x to multi precision number,compute tan(x) by mptan() routine */
/* and converts result back to double */
-static double tanMp(double x)
+static double
+SECTION
+tanMp(double x)
{
int p;
double y;
diff --git a/sysdeps/ieee754/dbl-64/sincos32.c b/sysdeps/ieee754/dbl-64/sincos32.c
index a4f896a465..e39aaeea06 100644
--- a/sysdeps/ieee754/dbl-64/sincos32.c
+++ b/sysdeps/ieee754/dbl-64/sincos32.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -45,11 +45,17 @@
#include "sincos32.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
/****************************************************************/
/* Compute Multi-Precision sin() function for given p. Receive */
/* Multi Precision number x and result stored at y */
/****************************************************************/
-static void ss32(mp_no *x, mp_no *y, int p) {
+static void
+SECTION
+ss32(mp_no *x, mp_no *y, int p) {
int i;
double a;
#if 0
@@ -79,7 +85,9 @@ static void ss32(mp_no *x, mp_no *y, int p) {
/* Compute Multi-Precision cos() function for given p. Receive Multi */
/* Precision number x and result stored at y */
/**********************************************************************/
-static void cc32(mp_no *x, mp_no *y, int p) {
+static void
+SECTION
+cc32(mp_no *x, mp_no *y, int p) {
int i;
double a;
#if 0
@@ -109,7 +117,9 @@ static void cc32(mp_no *x, mp_no *y, int p) {
/***************************************************************************/
/* c32() computes both sin(x), cos(x) as Multi precision numbers */
/***************************************************************************/
-void __c32(mp_no *x, mp_no *y, mp_no *z, int p) {
+void
+SECTION
+__c32(mp_no *x, mp_no *y, mp_no *z, int p) {
static const mp_no mpt={1,{1.0,2.0}}, one={1,{1.0,1.0}};
mp_no u,t,t1,t2,c,s;
int i;
@@ -134,7 +144,9 @@ void __c32(mp_no *x, mp_no *y, mp_no *z, int p) {
/*result which is more accurate */
/*Computing sin(x) with multi precision routine c32 */
/************************************************************************/
-double __sin32(double x, double res, double res1) {
+double
+SECTION
+__sin32(double x, double res, double res1) {
int p;
mp_no a,b,c;
p=32;
@@ -158,7 +170,9 @@ double __sin32(double x, double res, double res1) {
/*result which is more accurate */
/*Computing cos(x) with multi precision routine c32 */
/************************************************************************/
-double __cos32(double x, double res, double res1) {
+double
+SECTION
+__cos32(double x, double res, double res1) {
int p;
mp_no a,b,c;
p=32;
@@ -172,12 +186,12 @@ double __cos32(double x, double res, double res1) {
}
else if (x>0.8)
{ __sub(&hp,&c,&a,p);
- __c32(&a,&c,&b,p);
+ __c32(&a,&c,&b,p);
}
else __c32(&c,&b,&a,p); /* b=cos(0.5*(res+res1)) */
__dbl_mp(x,&c,p); /* c = x */
__sub(&b,&c,&a,p);
- /* if a>0 return max(res,res1), otherwise return min(res,res1) */
+ /* if a>0 return max(res,res1), otherwise return min(res,res1) */
if (a.d[0]>0) return (res>res1)?res:res1;
else return (res<res1)?res:res1;
}
@@ -186,7 +200,9 @@ double __cos32(double x, double res, double res1) {
/*Compute sin(x+dx) as Multi Precision number and return result as */
/* double */
/*******************************************************************/
-double __mpsin(double x, double dx) {
+double
+SECTION
+__mpsin(double x, double dx) {
int p;
double y;
mp_no a,b,c;
@@ -204,7 +220,9 @@ double __mpsin(double x, double dx) {
/* Compute cos()of double-length number (x+dx) as Multi Precision */
/* number and return result as double */
/*******************************************************************/
-double __mpcos(double x, double dx) {
+double
+SECTION
+__mpcos(double x, double dx) {
int p;
double y;
mp_no a,b,c;
@@ -227,7 +245,9 @@ double __mpcos(double x, double dx) {
/* n=0,+-1,+-2,.... */
/* Return int which indicates in which quarter of circle x is */
/******************************************************************/
-int __mpranred(double x, mp_no *y, int p)
+int
+SECTION
+__mpranred(double x, mp_no *y, int p)
{
number v;
double t,xn;
@@ -275,7 +295,9 @@ int __mpranred(double x, mp_no *y, int p)
/* Multi-Precision sin() function subroutine, for p=32. It is */
/* based on the routines mpranred() and c32(). */
/*******************************************************************/
-double __mpsin1(double x)
+double
+SECTION
+__mpsin1(double x)
{
int p;
int n;
@@ -314,7 +336,9 @@ double __mpsin1(double x)
/* based on the routines mpranred() and c32(). */
/*****************************************************************/
-double __mpcos1(double x)
+double
+SECTION
+__mpcos1(double x)
{
int p;
int n;
diff --git a/sysdeps/ieee754/dbl-64/sincos.tbl b/sysdeps/ieee754/dbl-64/sincostab.c
index 9343f24163..49fccac942 100644
--- a/sysdeps/ieee754/dbl-64/sincos.tbl
+++ b/sysdeps/ieee754/dbl-64/sincostab.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* Written by International Business Machines Corp.
- * Copyright (C) 2001, 2007 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2007, 2011 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -18,13 +18,16 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#include <mydefs.h>
+#include <endian.h>
+
/****************************************************************/
/* TABLES FOR THE usin() and ucos() FUNCTION */
/****************************************************************/
#ifdef BIG_ENDI
-static const union {int4 i[880]; double x[440];}sincos = { .i = {
+const union {int4 i[880]; double x[440];}__sincostab = { .i = {
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x00000000,
/**/ 0x3FF00000, 0x00000000,
@@ -467,7 +470,7 @@ static const union {int4 i[880]; double x[440];}sincos = { .i = {
/**/ 0x3C747A10, 0x8073C259 } };
#else
#ifdef LITTLE_ENDI
-static const union {int4 i[880]; double x[440];} sincos = { .i = {
+const union {int4 i[880]; double x[440];} __sincostab = { .i = {
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x00000000,
/**/ 0x00000000, 0x3FF00000,
diff --git a/sysdeps/ieee754/dbl-64/slowexp.c b/sysdeps/ieee754/dbl-64/slowexp.c
index 78c107f709..6a6bce31ba 100644
--- a/sysdeps/ieee754/dbl-64/slowexp.c
+++ b/sysdeps/ieee754/dbl-64/slowexp.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -31,10 +31,16 @@
#include "mpa.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
void __mpexp(mp_no *x, mp_no *y, int p);
/*Converting from double precision to Multi-precision and calculating e^x */
-double __slowexp(double x) {
+double
+SECTION
+__slowexp(double x) {
double w,z,res,eps=3.0e-26;
#if 0
double y;
@@ -47,7 +53,7 @@ double __slowexp(double x) {
p=6;
__dbl_mp(x,&mpx,p); /* Convert a double precision number x */
- /* into a multiple precision number mpx with prec. p. */
+ /* into a multiple precision number mpx with prec. p. */
__mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */
__dbl_mp(eps,&mpeps,p);
__mul(&mpeps,&mpy,&mpcor,p);
diff --git a/sysdeps/ieee754/dbl-64/slowpow.c b/sysdeps/ieee754/dbl-64/slowpow.c
index e11a532bf8..0c57e6d4f2 100644
--- a/sysdeps/ieee754/dbl-64/slowpow.c
+++ b/sysdeps/ieee754/dbl-64/slowpow.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001 Free Software Foundation
+ * Copyright (C) 2001, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -35,12 +35,18 @@
#include "mpa.h"
#include "math_private.h"
+#ifndef SECTION
+# define SECTION
+#endif
+
void __mpexp(mp_no *x, mp_no *y, int p);
void __mplog(mp_no *x, mp_no *y, int p);
double ulog(double);
double __halfulp(double x,double y);
-double __slowpow(double x, double y, double z) {
+double
+SECTION
+__slowpow(double x, double y, double z) {
double res,res1;
mp_no mpx, mpy, mpz,mpw,mpp,mpr,mpr1;
static const mp_no eps = {-3,{1.0,4.0}};
@@ -48,7 +54,7 @@ double __slowpow(double x, double y, double z) {
res = __halfulp(x,y); /* halfulp() returns -10 or x^y */
if (res >= 0) return res; /* if result was really computed by halfulp */
- /* else, if result was not really computed by halfulp */
+ /* else, if result was not really computed by halfulp */
p = 10; /* p=precision */
__dbl_mp(x,&mpx,p);
__dbl_mp(y,&mpy,p);
diff --git a/sysdeps/ieee754/dbl-64/w_exp.c b/sysdeps/ieee754/dbl-64/w_exp.c
index 1216492090..f1becff94c 100644
--- a/sysdeps/ieee754/dbl-64/w_exp.c
+++ b/sysdeps/ieee754/dbl-64/w_exp.c
@@ -1,55 +1,46 @@
-/* @(#)w_exp.c 5.1 93/09/24 */
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_exp.c,v 1.6 1995/05/10 20:48:51 jtc Exp $";
-#endif
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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.
-/*
- * wrapper exp(x)
- */
+ 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.
-#include "math.h"
-#include "math_private.h"
+ 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 <math.h>
+#include <math_private.h>
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
o_threshold= 7.09782712893383973096e+02, /* 0x40862E42, 0xFEFA39EF */
u_threshold= -7.45133219101941108420e+02; /* 0xc0874910, 0xD52D3051 */
-#ifdef __STDC__
- double __exp(double x) /* wrapper exp */
-#else
- double __exp(x) /* wrapper exp */
- double x;
-#endif
+
+/* wrapper exp */
+double
+__exp (double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_exp(x);
-#else
- double z;
- z = __ieee754_exp(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(__finite(x)) {
- if(x>o_threshold)
- return __kernel_standard(x,x,6); /* exp overflow */
- else if(x<u_threshold)
- return __kernel_standard(x,x,7); /* exp underflow */
- }
- return z;
-#endif
+ if (__builtin_expect (x > o_threshold, 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 6);
+ }
+ else if (__builtin_expect (x < u_threshold, 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 7);
+ }
+
+ return __ieee754_exp (x);
}
hidden_def (__exp)
weak_alias (__exp, exp)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c b/sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c
new file mode 100644
index 0000000000..41dc42c0af
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/e_cosh.c
@@ -0,0 +1,82 @@
+/* Optimized by Ulrich Drepper <drepper@gmail.com>, 2011 */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/* __ieee754_cosh(x)
+ * Method :
+ * mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
+ * 1. Replace x by |x| (cosh(x) = cosh(-x)).
+ * 2.
+ * [ exp(x) - 1 ]^2
+ * 0 <= x <= ln2/2 : cosh(x) := 1 + -------------------
+ * 2*exp(x)
+ *
+ * exp(x) + 1/exp(x)
+ * ln2/2 <= x <= 22 : cosh(x) := -------------------
+ * 2
+ * 22 <= x <= lnovft : cosh(x) := exp(x)/2
+ * lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2)
+ * ln2ovft < x : cosh(x) := huge*huge (overflow)
+ *
+ * Special cases:
+ * cosh(x) is |x| if x is +INF, -INF, or NaN.
+ * only cosh(0)=1 is exact for finite x.
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+static const double one = 1.0, half=0.5, huge = 1.0e300;
+
+double
+__ieee754_cosh (double x)
+{
+ double t,w;
+ int32_t ix;
+
+ /* High word of |x|. */
+ GET_HIGH_WORD(ix,x);
+ ix &= 0x7fffffff;
+
+ /* |x| in [0,22] */
+ if (ix < 0x40360000) {
+ /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
+ if(ix<0x3fd62e43) {
+ t = __expm1(fabs(x));
+ w = one+t;
+ if (ix<0x3c800000) return w; /* cosh(tiny) = 1 */
+ return one+(t*t)/(w+w);
+ }
+
+ /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
+ t = __ieee754_exp(fabs(x));
+ return half*t+half/t;
+ }
+
+ /* |x| in [22, log(maxdouble)] return half*exp(|x|) */
+ if (ix < 0x40862e42) return half*__ieee754_exp(fabs(x));
+
+ /* |x| in [log(maxdouble), overflowthresold] */
+ int64_t fix;
+ EXTRACT_WORDS64(fix, x);
+ if (fix <= UINT64_C(0x408633ce8fb9f87d)) {
+ w = __ieee754_exp(half*fabs(x));
+ t = half*w;
+ return t*w;
+ }
+
+ /* x is INF or NaN */
+ if(ix>=0x7ff00000) return x*x;
+
+ /* |x| > overflowthresold, cosh(x) overflow */
+ return huge*huge;
+}
+strong_alias (__ieee754_cosh, __cosh_finite)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c b/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c
new file mode 100644
index 0000000000..0e20571a74
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/e_fmod.c
@@ -0,0 +1,104 @@
+/* Rewritten for 64-bit machines by Ulrich Drepper <drepper@gmail.com>. */
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * __ieee754_fmod(x,y)
+ * Return x mod y in exact arithmetic
+ * Method: shift and subtract
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+static const double one = 1.0, Zero[] = {0.0, -0.0,};
+
+double
+__ieee754_fmod (double x, double y)
+{
+ int32_t n,i,ix,iy;
+ int64_t hx,hy,hz,sx;
+
+ EXTRACT_WORDS64(hx,x);
+ EXTRACT_WORDS64(hy,y);
+ sx = hx&UINT64_C(0x8000000000000000); /* sign of x */
+ hx ^=sx; /* |x| */
+ hy &= UINT64_C(0x7fffffffffffffff); /* |y| */
+
+ /* purge off exception values */
+ if(__builtin_expect(hy==0
+ || hx >= UINT64_C(0x7ff0000000000000)
+ || hy > UINT64_C(0x7ff0000000000000), 0))
+ /* y=0,or x not finite or y is NaN */
+ return (x*y)/(x*y);
+ if(__builtin_expect(hx<=hy, 0)) {
+ if(hx<hy) return x; /* |x|<|y| return x */
+ return Zero[(uint64_t)sx>>63]; /* |x|=|y| return x*0*/
+ }
+
+ /* determine ix = ilogb(x) */
+ if(__builtin_expect(hx<UINT64_C(0x0010000000000000), 0)) {
+ /* subnormal x */
+ for (ix = -1022,i=(hx<<11); i>0; i<<=1) ix -=1;
+ } else ix = (hx>>52)-1023;
+
+ /* determine iy = ilogb(y) */
+ if(__builtin_expect(hy<UINT64_C(0x0010000000000000), 0)) { /* subnormal y */
+ for (iy = -1022,i=(hy<<11); i>0; i<<=1) iy -=1;
+ } else iy = (hy>>52)-1023;
+
+ /* set up hx, hy and align y to x */
+ if(__builtin_expect(ix >= -1022, 1))
+ hx = UINT64_C(0x0010000000000000)|(UINT64_C(0x000fffffffffffff)&hx);
+ else { /* subnormal x, shift x to normal */
+ n = -1022-ix;
+ hx<<=n;
+ }
+ if(__builtin_expect(iy >= -1022, 1))
+ hy = UINT64_C(0x0010000000000000)|(UINT64_C(0x000fffffffffffff)&hy);
+ else { /* subnormal y, shift y to normal */
+ n = -1022-iy;
+ hy<<=n;
+ }
+
+ /* fix point fmod */
+ n = ix - iy;
+ while(n--) {
+ hz=hx-hy;
+ if(hz<0){hx = hx+hx;}
+ else {
+ if(hz==0) /* return sign(x)*0 */
+ return Zero[(uint64_t)sx>>63];
+ hx = hz+hz;
+ }
+ }
+ hz=hx-hy;
+ if(hz>=0) {hx=hz;}
+
+ /* convert back to floating value and restore the sign */
+ if(hx==0) /* return sign(x)*0 */
+ return Zero[(uint64_t)sx>>63];
+ while(hx<UINT64_C(0x0010000000000000)) { /* normalize x */
+ hx = hx+hx;
+ iy -= 1;
+ }
+ if(__builtin_expect(iy>= -1022, 1)) { /* normalize output */
+ hx = ((hx-UINT64_C(0x0010000000000000))|((uint64_t)(iy+1023)<<52));
+ INSERT_WORDS64(x,hx|sx);
+ } else { /* subnormal output */
+ n = -1022 - iy;
+ hx>>=n;
+ INSERT_WORDS64(x,hx|sx);
+ x *= one; /* create necessary signal */
+ }
+ return x; /* exact output */
+}
+strong_alias (__ieee754_fmod, __fmod_finite)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c
index 9123fdc7bd..346dab7995 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c
@@ -22,36 +22,26 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double huge = 1.0e300;
-#else
-static double huge = 1.0e300;
-#endif
-#ifdef __STDC__
- double __ceil(double x)
-#else
- double __ceil(x)
- double x;
-#endif
+double
+__ceil(double x)
{
int64_t i0,i;
int32_t j0;
EXTRACT_WORDS64(i0,x);
j0 = ((i0>>52)&0x7ff)-0x3ff;
if(j0<=51) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0<0) {i0=INT64_C(0x8000000000000000);}
- else if(i0!=0) { i0=INT64_C(0x3ff0000000000000);}
- }
+ if(j0<0) { /* raise inexact if x != 0 */
+ math_force_eval(huge+x);/* return 0*sign(x) if |x|<1 */
+ if(i0<0) {i0=INT64_C(0x8000000000000000);}
+ else if(i0!=0) { i0=INT64_C(0x3ff0000000000000);}
} else {
i = INT64_C(0x000fffffffffffff)>>j0;
if((i0&i)==0) return x; /* x is integral */
- if(huge+x>0.0) { /* raise inexact flag */
- if(i0>0) i0 += UINT64_C(0x0010000000000000)>>j0;
- i0 &= (~i);
- }
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0>0) i0 += UINT64_C(0x0010000000000000)>>j0;
+ i0 &= (~i);
}
} else {
if(j0==0x400) return x+x; /* inf or NaN */
@@ -60,8 +50,10 @@ static double huge = 1.0e300;
INSERT_WORDS64(x,i0);
return x;
}
+#ifndef __ceil
weak_alias (__ceil, ceil)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__ceil, __ceill)
weak_alias (__ceil, ceill)
+# endif
#endif
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c
index 585f63e571..93a39a6835 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_finite.c
@@ -17,6 +17,7 @@
#include "math.h"
#include "math_private.h"
+#undef __finite
int
__finite(double x)
{
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c
new file mode 100644
index 0000000000..5df4ab52fa
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c
@@ -0,0 +1,79 @@
+/* Round double to integer away from zero.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 2011.
+
+ 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. */
+
+/* Based on a version which carries the following copyright: */
+
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+/*
+ * floor(x)
+ * Return x rounded toward -inf to integral value
+ * Method:
+ * Bit twiddling.
+ * Exception:
+ * Inexact flag raised if x not equal to floor(x).
+ */
+
+static const double huge = 1.0e300;
+
+
+double
+__floor (double x)
+{
+ int64_t i0;
+ EXTRACT_WORDS64(i0,x);
+ int32_t j0 = ((i0>>52)&0x7ff)-0x3ff;
+ if(__builtin_expect(j0<52, 1)) {
+ if(j0<0) { /* raise inexact if x != 0 */
+ math_force_eval(huge+x);/* return 0*sign(x) if |x|<1 */
+ if(i0>=0) {i0=0;}
+ else if((i0&0x7fffffffffffffffl)!=0)
+ { i0=0xbff0000000000000l;}
+ } else {
+ uint64_t i = (0x000fffffffffffffl)>>j0;
+ if((i0&i)==0) return x; /* x is integral */
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0<0) i0 += (0x0010000000000000l)>>j0;
+ i0 &= (~i);
+ }
+ INSERT_WORDS64(x,i0);
+ } else if (j0==0x400)
+ return x+x; /* inf or NaN */
+ return x;
+}
+#ifndef __floor
+weak_alias (__floor, floor)
+# ifdef NO_LONG_DOUBLE
+strong_alias (__floor, __floorl)
+weak_alias (__floor, floorl)
+# endif
+#endif
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c
new file mode 100644
index 0000000000..76f7610804
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_frexp.c
@@ -0,0 +1,67 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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 <inttypes.h>
+#include "math.h"
+#include "math_private.h"
+
+/*
+ * for non-zero, finite x
+ * x = frexp(arg,&exp);
+ * return a double fp quantity x such that 0.5 <= |x| <1.0
+ * and the corresponding binary exponent "exp". That is
+ * arg = x*2^exp.
+ * If arg is inf, 0.0, or NaN, then frexp(arg,&exp) returns arg
+ * with *exp=0.
+ */
+
+
+double
+__frexp (double x, int *eptr)
+{
+ int64_t ix;
+ EXTRACT_WORDS64 (ix, x);
+ int32_t ex = 0x7ff & (ix >> 52);
+ int e = 0;
+
+ if (__builtin_expect (ex != 0x7ff && x != 0.0, 1))
+ {
+ /* Not zero and finite. */
+ e = ex - 1022;
+ if (__builtin_expect (ex == 0, 0))
+ {
+ /* Subnormal. */
+ x *= 0x1p54;
+ EXTRACT_WORDS64 (ix, x);
+ ex = 0x7ff & (ix >> 52);
+ e = ex - 1022 - 54;
+ }
+
+ ix = (ix & INT64_C (0x800fffffffffffff)) | INT64_C (0x3fe0000000000000);
+ INSERT_WORDS64 (x, ix);
+ }
+
+ *eptr = e;
+ return x;
+}
+weak_alias (__frexp, frexp)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__frexp, __frexpl)
+weak_alias (__frexp, frexpl)
+#endif
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_isinf_ns.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_isinf_ns.c
new file mode 100644
index 0000000000..09dcc94532
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_isinf_ns.c
@@ -0,0 +1,20 @@
+/*
+ * Written by Ulrich Drepper <drepper@gmail.com>.
+ */
+
+/*
+ * __isinf_ns(x) returns != 0 if x is ±inf, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#undef __isinf_ns
+int
+__isinf_ns (double x)
+{
+ int64_t ix;
+ EXTRACT_WORDS64(ix,x);
+ return (ix & UINT64_C(0x7fffffffffffffff)) == UINT64_C(0x7ff0000000000000);
+}
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c
index 3b08c54dd4..65dc8934f9 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_isnan.c
@@ -18,6 +18,7 @@
#include "math.h"
#include "math_private.h"
+#undef __isnan
#ifdef __STDC__
int __isnan(double x)
#else
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
index cb49019ddb..861da20b10 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c
@@ -24,22 +24,14 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
TWO52[2]={
4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
-4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
};
-#ifdef __STDC__
- double __nearbyint(double x)
-#else
- double __nearbyint(x)
- double x;
-#endif
+double
+__nearbyint(double x)
{
fenv_t env;
int64_t i0,sx;
@@ -47,20 +39,19 @@ TWO52[2]={
EXTRACT_WORDS64(i0,x);
sx = (i0>>63)&1;
j0 = ((i0>>52)&0x7ff)-0x3ff;
- if(j0<52) {
+ if(__builtin_expect(j0<52, 1)) {
if(j0<0) {
if((i0&UINT64_C(0x7fffffffffffffff))==0) return x;
uint64_t i = i0 & UINT64_C(0xfffffffffffff);
i0 &= UINT64_C(0xfffe000000000000);
i0 |= (((i|-i) >> 12) & UINT64_C(0x8000000000000));
INSERT_WORDS64(x,i0);
- feholdexcept (&env);
+ libc_feholdexcept (&env);
double w = TWO52[sx]+x;
double t = w-TWO52[sx];
- fesetenv (&env);
- EXTRACT_WORDS64(i0,t);
- INSERT_WORDS64(t,(i0&UINT64_C(0x7fffffffffffffff))|(sx<<63));
- return t;
+ math_opt_barrier(t);
+ libc_fesetenv (&env);
+ return copysign(t, x);
} else {
uint64_t i = UINT64_C(0x000fffffffffffff)>>j0;
if((i0&i)==0) return x; /* x is integral */
@@ -73,10 +64,11 @@ TWO52[2]={
else return x; /* x is integral */
}
INSERT_WORDS64(x,i0);
- feholdexcept (&env);
+ libc_feholdexcept (&env);
double w = TWO52[sx]+x;
double t = w-TWO52[sx];
- fesetenv (&env);
+ math_opt_barrier (t);
+ libc_fesetenv (&env);
return t;
}
weak_alias (__nearbyint, nearbyint)
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c
new file mode 100644
index 0000000000..011401ebca
--- /dev/null
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_remquo.c
@@ -0,0 +1,112 @@
+/* Compute remainder and a congruent to the quotient.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+ 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 <math.h>
+
+#include "math_private.h"
+
+
+static const double zero = 0.0;
+
+
+double
+__remquo (double x, double y, int *quo)
+{
+ int64_t hx, hy;
+ uint64_t sx, qs;
+ int cquo;
+
+ EXTRACT_WORDS64 (hx, x);
+ EXTRACT_WORDS64 (hy, y);
+ sx = hx & UINT64_C(0x8000000000000000);
+ qs = sx ^ (hy & UINT64_C(0x8000000000000000));
+ hy &= UINT64_C(0x7fffffffffffffff);
+ hx &= UINT64_C(0x7fffffffffffffff);
+
+ /* Purge off exception values. */
+ if (__builtin_expect (hy == 0, 0))
+ return (x * y) / (x * y); /* y = 0 */
+ if (__builtin_expect (hx >= UINT64_C(0x7ff0000000000000) /* x not finite */
+ || hy > UINT64_C(0x7ff0000000000000), 0))/* y is NaN */
+ return (x * y) / (x * y);
+
+ if (hy <= UINT64_C(0x7fbfffffffffffff))
+ x = __ieee754_fmod (x, 8 * y); /* now x < 8y */
+
+ if (__builtin_expect (hx == hy, 0))
+ {
+ *quo = qs ? -1 : 1;
+ return zero * x;
+ }
+
+ INSERT_WORDS64 (x, hx);
+ INSERT_WORDS64 (y, hy);
+ cquo = 0;
+
+ if (x >= 4 * y)
+ {
+ x -= 4 * y;
+ cquo += 4;
+ }
+ if (x >= 2 * y)
+ {
+ x -= 2 * y;
+ cquo += 2;
+ }
+
+ if (hy < UINT64_C(0x0020000000000000))
+ {
+ if (x + x > y)
+ {
+ x -= y;
+ ++cquo;
+ if (x + x >= y)
+ {
+ x -= y;
+ ++cquo;
+ }
+ }
+ }
+ else
+ {
+ double y_half = 0.5 * y;
+ if (x > y_half)
+ {
+ x -= y;
+ ++cquo;
+ if (x >= y_half)
+ {
+ x -= y;
+ ++cquo;
+ }
+ }
+ }
+
+ *quo = qs ? -cquo : cquo;
+
+ if (sx)
+ x = -x;
+ return x;
+}
+weak_alias (__remquo, remquo)
+#ifdef NO_LONG_DOUBLE
+strong_alias (__remquo, __remquol)
+weak_alias (__remquo, remquol)
+#endif
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c
index 4a60aa3278..571b3811ab 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c
@@ -1,4 +1,3 @@
-/* @(#)s_rint.c 5.1 93/09/24 */
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
@@ -23,22 +22,14 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const double
-#else
-static double
-#endif
TWO52[2]={
4.50359962737049600000e+15, /* 0x43300000, 0x00000000 */
-4.50359962737049600000e+15, /* 0xC3300000, 0x00000000 */
};
-#ifdef __STDC__
- double __rint(double x)
-#else
- double __rint(x)
- double x;
-#endif
+double
+__rint(double x)
{
int64_t i0,sx;
int32_t j0;
@@ -72,8 +63,10 @@ TWO52[2]={
double w = TWO52[sx]+x;
return w-TWO52[sx];
}
+#ifndef __rint
weak_alias (__rint, rint)
-#ifdef NO_LONG_DOUBLE
+# ifdef NO_LONG_DOUBLE
strong_alias (__rint, __rintl)
weak_alias (__rint, rintl)
+# endif
#endif
diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
index 5bd857910c..25ff859283 100644
--- a/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
+++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_round.c
@@ -1,5 +1,5 @@
/* Round double to integer away from zero.
- Copyright (C) 1997, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2009, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -37,12 +37,11 @@ __round (double x)
{
if (j0 < 0)
{
- if (huge + x > 0.0)
- {
- i0 &= UINT64_C(0x8000000000000000);
- if (j0 == -1)
- i0 |= UINT64_C(0x3ff0000000000000);
- }
+ math_force_eval (huge + x);
+
+ i0 &= UINT64_C(0x8000000000000000);
+ if (j0 == -1)
+ i0 |= UINT64_C(0x3ff0000000000000);
}
else
{
@@ -50,12 +49,11 @@ __round (double x)
if ((i0 & i) == 0)
/* X is integral. */
return x;
- if (huge + x > 0.0)
- {
- /* Raise inexact if x != 0. */
- i0 += UINT64_C(0x0008000000000000) >> j0;
- i0 &= ~i;
- }
+ math_force_eval (huge + x);
+
+ /* Raise inexact if x != 0. */
+ i0 += UINT64_C(0x0008000000000000) >> j0;
+ i0 &= ~i;
}
}
else
diff --git a/sysdeps/ieee754/flt-32/e_acosf.c b/sysdeps/ieee754/flt-32/e_acosf.c
index 0d85c4210d..a258e2f918 100644
--- a/sysdeps/ieee754/flt-32/e_acosf.c
+++ b/sysdeps/ieee754/flt-32/e_acosf.c
@@ -8,23 +8,15 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_acosf.c,v 1.5 1995/05/12 04:57:16 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
-static const float
-#else
-static float
-#endif
+static const float
one = 1.0000000000e+00, /* 0x3F800000 */
pi = 3.1415925026e+00, /* 0x40490fda */
pio2_hi = 1.5707962513e+00, /* 0x3fc90fda */
@@ -40,12 +32,8 @@ qS2 = 2.0209457874e+00, /* 0x4001572d */
qS3 = -6.8828397989e-01, /* 0xbf303361 */
qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
-#ifdef __STDC__
- float __ieee754_acosf(float x)
-#else
- float __ieee754_acosf(x)
- float x;
-#endif
+float
+__ieee754_acosf(float x)
{
float z,p,q,r,w,s,c,df;
int32_t hx,ix;
@@ -87,3 +75,4 @@ qS4 = 7.7038154006e-02; /* 0x3d9dc62e */
return (float)2.0*(df+w);
}
}
+strong_alias (__ieee754_acosf, __acosf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_acoshf.c b/sysdeps/ieee754/flt-32/e_acoshf.c
index c607f72117..777e0b9e36 100644
--- a/sysdeps/ieee754/flt-32/e_acoshf.c
+++ b/sysdeps/ieee754/flt-32/e_acoshf.c
@@ -8,7 +8,7 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
@@ -21,9 +21,9 @@ static char rcsid[] = "$NetBSD: e_acoshf.c,v 1.5 1995/05/12 04:57:20 jtc Exp $";
#include "math_private.h"
#ifdef __STDC__
-static const float
+static const float
#else
-static float
+static float
#endif
one = 1.0,
ln2 = 6.9314718246e-01; /* 0x3f317218 */
@@ -34,7 +34,7 @@ ln2 = 6.9314718246e-01; /* 0x3f317218 */
float __ieee754_acoshf(x)
float x;
#endif
-{
+{
float t;
int32_t hx;
GET_FLOAT_WORD(hx,x);
@@ -42,8 +42,8 @@ ln2 = 6.9314718246e-01; /* 0x3f317218 */
return (x-x)/(x-x);
} else if(hx >=0x4d800000) { /* x > 2**28 */
if(hx >=0x7f800000) { /* x is inf of NaN */
- return x+x;
- } else
+ return x+x;
+ } else
return __ieee754_logf(x)+ln2; /* acosh(huge)=log(2x) */
} else if (hx==0x3f800000) {
return 0.0; /* acosh(1) = 0 */
@@ -52,6 +52,7 @@ ln2 = 6.9314718246e-01; /* 0x3f317218 */
return __ieee754_logf((float)2.0*x-one/(x+__ieee754_sqrtf(t-one)));
} else { /* 1<x<2 */
t = x-one;
- return __log1pf(t+__sqrtf((float)2.0*t+t*t));
+ return __log1pf(t+__ieee754_sqrtf((float)2.0*t+t*t));
}
}
+strong_alias (__ieee754_acoshf, __acoshf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_asinf.c b/sysdeps/ieee754/flt-32/e_asinf.c
index b0c835c83c..7296ba3e13 100644
--- a/sysdeps/ieee754/flt-32/e_asinf.c
+++ b/sysdeps/ieee754/flt-32/e_asinf.c
@@ -14,11 +14,11 @@
*/
/*
- Modifications for single precision expansion are
+ Modifications for single precision expansion are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -93,7 +93,7 @@ p4 = 4.216630880e-2f;
t = w*0.5f;
p = t * (p0 + t * (p1 + t * (p2 + t * (p3 + t * p4))));
s = __ieee754_sqrtf(t);
- if(ix>=0x3F79999A) { /* if |x| > 0.975 */
+ if(ix>=0x3F79999A) { /* if |x| > 0.975 */
t = pio2_hi-(2.0f*(s+s*p)-pio2_lo);
} else {
int32_t iw;
@@ -108,3 +108,4 @@ p4 = 4.216630880e-2f;
}
if(hx>0) return t; else return -t;
}
+strong_alias (__ieee754_asinf, __asinf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_atan2f.c b/sysdeps/ieee754/flt-32/e_atan2f.c
index c0cafb16b8..abbde88bdf 100644
--- a/sysdeps/ieee754/flt-32/e_atan2f.c
+++ b/sysdeps/ieee754/flt-32/e_atan2f.c
@@ -13,18 +13,10 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_atan2f.c,v 1.4 1995/05/10 20:44:53 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
tiny = 1.0e-30,
zero = 0.0,
pi_o_4 = 7.8539818525e-01, /* 0x3f490fdb */
@@ -32,12 +24,8 @@ pi_o_2 = 1.5707963705e+00, /* 0x3fc90fdb */
pi = 3.1415927410e+00, /* 0x40490fdb */
pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */
-#ifdef __STDC__
- float __ieee754_atan2f(float y, float x)
-#else
- float __ieee754_atan2f(y,x)
- float y,x;
-#endif
+float
+__ieee754_atan2f (float y, float x)
{
float z;
int32_t k,m,hx,hy,ix,iy;
@@ -56,7 +44,7 @@ pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */
if(iy==0) {
switch(m) {
case 0:
- case 1: return y; /* atan(+-0,+anything)=+-0 */
+ case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
}
@@ -87,19 +75,20 @@ pi_lo = -8.7422776573e-08; /* 0xb3bbbd2e */
/* compute y/x */
k = (iy-ix)>>23;
- if(k > 60) z=pi_o_2+(float)0.5*pi_lo; /* |y/x| > 2**60 */
- else if(hx<0&&k<-60) z=0.0; /* |y|/x < -2**60 */
+ if(k > 60) z=pi_o_2+(float)0.5*pi_lo; /* |y/x| > 2**60 */
+ else if(hx<0&&k<-60) z=0.0; /* |y|/x < -2**60 */
else z=__atanf(fabsf(y/x)); /* safe to do y/x */
switch (m) {
case 0: return z ; /* atan(+,+) */
case 1: {
- u_int32_t zh;
+ u_int32_t zh;
GET_FLOAT_WORD(zh,z);
SET_FLOAT_WORD(z,zh ^ 0x80000000);
}
return z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
default: /* case 3 */
- return (z-pi_lo)-pi;/* atan(-,-) */
+ return (z-pi_lo)-pi;/* atan(-,-) */
}
}
+strong_alias (__ieee754_atan2f, __atan2f_finite)
diff --git a/sysdeps/ieee754/flt-32/e_atanhf.c b/sysdeps/ieee754/flt-32/e_atanhf.c
index f26a15bbc1..d98a11ed67 100644
--- a/sysdeps/ieee754/flt-32/e_atanhf.c
+++ b/sysdeps/ieee754/flt-32/e_atanhf.c
@@ -1,58 +1,73 @@
-/* e_atanhf.c -- float version of e_atanh.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
+ 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. */
+
+
+/* __ieee754_atanh(x)
+ Method :
+ 1.Reduced x to positive by atanh(-x) = -atanh(x)
+ 2.For x>=0.5
+ 1 2x x
+ atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
+ 2 1 - x 1 - x
+
+ For x<0.5
+ atanh(x) = 0.5*log1p(2x+2x*x/(1-x))
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_atanhf.c,v 1.4 1995/05/10 20:44:56 jtc Exp $";
-#endif
+ Special cases:
+ atanh(x) is NaN if |x| > 1 with signal;
+ atanh(NaN) is that NaN with no signal;
+ atanh(+-1) is +-INF with signal.
+ */
+
+#include <inttypes.h>
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
-static const float one = 1.0, huge = 1e30;
-#else
-static float one = 1.0, huge = 1e30;
-#endif
-
-#ifdef __STDC__
-static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-
-#ifdef __STDC__
- float __ieee754_atanhf(float x)
-#else
- float __ieee754_atanhf(x)
- float x;
-#endif
+static const float huge = 1e30;
+
+float
+__ieee754_atanhf (float x)
{
- float t;
- int32_t hx,ix;
- GET_FLOAT_WORD(hx,x);
- ix = hx&0x7fffffff;
- if (ix>0x3f800000) /* |x|>1 */
- return (x-x)/(x-x);
- if(ix==0x3f800000)
- return x/zero;
- if(ix<0x31800000&&(huge+x)>zero) return x; /* x<2**-28 */
- SET_FLOAT_WORD(x,ix);
- if(ix<0x3f000000) { /* x < 0.5 */
- t = x+x;
- t = (float)0.5*__log1pf(t+t*x/(one-x));
- } else
- t = (float)0.5*__log1pf((x+x)/(one-x));
- if(hx>=0) return t; else return -t;
+ float xa = fabsf (x);
+ float t;
+ if (xa < 0.5f)
+ {
+ if (__builtin_expect (xa < 0x1.0p-28f, 0))
+ {
+ math_force_eval (huge + x);
+ return x;
+ }
+
+ t = xa + xa;
+ t = 0.5f * __log1pf (t + t * xa / (1.0f - xa));
+ }
+ else if (__builtin_expect (xa < 1.0f, 1))
+ t = 0.5f * __log1pf ((xa + xa) / (1.0f - xa));
+ else
+ {
+ if (xa > 1.0f)
+ return (x - x) / (x - x);
+
+ return x / 0.0f;
+ }
+
+ return __copysignf (t, x);
}
+strong_alias (__ieee754_atanhf, __atanhf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_coshf.c b/sysdeps/ieee754/flt-32/e_coshf.c
index 223fbeea20..1887639a6b 100644
--- a/sysdeps/ieee754/flt-32/e_coshf.c
+++ b/sysdeps/ieee754/flt-32/e_coshf.c
@@ -1,5 +1,6 @@
/* e_coshf.c -- float version of e_cosh.c.
* Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
+ * Optimizations by Ulrich Drepper <drepper@gmail.com>, 2011
*/
/*
@@ -13,26 +14,14 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_coshf.c,v 1.6 1996/04/08 15:43:41 phil Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float huge = 1.0e30;
static const float one = 1.0, half=0.5;
-#else
-static float one = 1.0, half=0.5, huge = 1.0e30;
-#endif
-#ifdef __STDC__
- float __ieee754_coshf(float x)
-#else
- float __ieee754_coshf(x)
- float x;
-#endif
+float
+__ieee754_coshf (float x)
{
float t,w;
int32_t ix;
@@ -40,19 +29,17 @@ static float one = 1.0, half=0.5, huge = 1.0e30;
GET_FLOAT_WORD(ix,x);
ix &= 0x7fffffff;
- /* x is INF or NaN */
- if(ix>=0x7f800000) return x*x;
-
- /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
- if(ix<0x3eb17218) {
- t = __expm1f(fabsf(x));
- w = one+t;
- if (ix<0x24000000) return w; /* cosh(tiny) = 1 */
- return one+(t*t)/(w+w);
- }
-
- /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
+ /* |x| in [0,22] */
if (ix < 0x41b00000) {
+ /* |x| in [0,0.5*ln2], return 1+expm1(|x|)^2/(2*exp(|x|)) */
+ if(ix<0x3eb17218) {
+ t = __expm1f(fabsf(x));
+ w = one+t;
+ if (ix<0x24000000) return w; /* cosh(tiny) = 1 */
+ return one+(t*t)/(w+w);
+ }
+
+ /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
t = __ieee754_expf(fabsf(x));
return half*t+half/t;
}
@@ -67,6 +54,10 @@ static float one = 1.0, half=0.5, huge = 1.0e30;
return t*w;
}
+ /* x is INF or NaN */
+ if(ix>=0x7f800000) return x*x;
+
/* |x| > overflowthresold, cosh(x) overflow */
return huge*huge;
}
+strong_alias (__ieee754_coshf, __coshf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_exp2f.c b/sysdeps/ieee754/flt-32/e_exp2f.c
index 194222a0cd..f07500d20d 100644
--- a/sysdeps/ieee754/flt-32/e_exp2f.c
+++ b/sysdeps/ieee754/flt-32/e_exp2f.c
@@ -1,5 +1,6 @@
/* Single-precision floating point 2^x.
- Copyright (C) 1997,1998,2000,2001,2005,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,2000,2001,2005,2006,2011
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
@@ -56,11 +57,7 @@ __ieee754_exp2f (float x)
union ieee754_float ex2_u, scale_u;
fenv_t oldenv;
- feholdexcept (&oldenv);
-#ifdef FE_TONEAREST
- /* If we don't have this, it's too bad. */
- fesetround (FE_TONEAREST);
-#endif
+ libc_feholdexcept_setroundf (&oldenv, FE_TONEAREST);
/* 1. Argument reduction.
Choose integers ex, -128 <= t < 128, and some real
@@ -103,7 +100,7 @@ __ieee754_exp2f (float x)
x22 = (.24022656679f * x + .69314736128f) * ex2_u.f;
/* 5. Return (2^x2-1) * 2^(t/512+e+ex) + 2^(t/512+e+ex). */
- fesetenv (&oldenv);
+ libc_fesetenv (&oldenv);
result = x22 * x + ex2_u.f;
@@ -115,7 +112,7 @@ __ieee754_exp2f (float x)
/* Exceptional cases: */
else if (isless (x, himark))
{
- if (__isinff (x))
+ if (__isinf_nsf (x))
/* e^-inf == 0, with no error. */
return 0;
else
@@ -126,3 +123,4 @@ __ieee754_exp2f (float x)
/* Return x, if x is a NaN or Inf; or overflow, otherwise. */
return TWO127*x;
}
+strong_alias (__ieee754_exp2f, __exp2f_finite)
diff --git a/sysdeps/ieee754/flt-32/e_expf.c b/sysdeps/ieee754/flt-32/e_expf.c
index b9cd53c033..02105c4385 100644
--- a/sysdeps/ieee754/flt-32/e_expf.c
+++ b/sysdeps/ieee754/flt-32/e_expf.c
@@ -1,5 +1,5 @@
/* Single-precision floating point e^x.
- Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1998, 2005, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Geoffrey Keating <geoffk@ozemail.com.au>
@@ -33,8 +33,8 @@
Then e^x is approximated as
e^x = 2^n ( e^(t/512 + delta[t])
- + ( e^(t/512 + delta[t])
- * ( p(x + delta[t] + n * ln(2)) - delta ) ) )
+ + ( e^(t/512 + delta[t])
+ * ( p(x + delta[t] + n * ln(2)) - delta ) ) )
where
- p(x) is a polynomial approximating e(x)-1;
@@ -47,9 +47,6 @@
to perform an 'accurate table method' expf, because of the range reduction
overhead (compare exp2f).
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <float.h>
#include <ieee754.h>
#include <math.h>
@@ -60,8 +57,8 @@
extern const float __exp_deltatable[178];
extern const double __exp_atable[355] /* __attribute__((mode(DF))) */;
-static const volatile float TWOM100 = 7.88860905e-31;
-static const volatile float TWO127 = 1.7014118346e+38;
+static const float TWOM100 = 7.88860905e-31;
+static const float TWO127 = 1.7014118346e+38;
float
__ieee754_expf (float x)
@@ -86,10 +83,7 @@ __ieee754_expf (float x)
union ieee754_double ex2_u;
fenv_t oldenv;
- feholdexcept (&oldenv);
-#ifdef FE_TONEAREST
- fesetround (FE_TONEAREST);
-#endif
+ libc_feholdexcept_setroundf (&oldenv, FE_TONEAREST);
/* Calculate n. */
n = x * M_1_LN2 + THREEp22;
@@ -119,7 +113,7 @@ __ieee754_expf (float x)
x22 = (0.5000000496709180453 * dx + 1.0000001192102037084) * dx + delta;
/* Return result. */
- fesetenv (&oldenv);
+ libc_fesetenvf (&oldenv);
result = x22 * ex2_u.d + ex2_u.d;
return (float) result;
@@ -138,3 +132,4 @@ __ieee754_expf (float x)
/* Return x, if x is a NaN or Inf; or overflow, otherwise. */
return TWO127*x;
}
+strong_alias (__ieee754_expf, __expf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_fmodf.c b/sysdeps/ieee754/flt-32/e_fmodf.c
index 47b312392c..e82a9ceab7 100644
--- a/sysdeps/ieee754/flt-32/e_fmodf.c
+++ b/sysdeps/ieee754/flt-32/e_fmodf.c
@@ -8,16 +8,12 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_fmodf.c,v 1.4 1995/05/10 20:45:10 jtc Exp $";
-#endif
-
-/*
+/*
* __ieee754_fmodf(x,y)
* Return x mod y in exact arithmetic
* Method: shift and subtract
@@ -26,18 +22,10 @@ static char rcsid[] = "$NetBSD: e_fmodf.c,v 1.4 1995/05/10 20:45:10 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float one = 1.0, Zero[] = {0.0, -0.0,};
-#else
-static float one = 1.0, Zero[] = {0.0, -0.0,};
-#endif
-#ifdef __STDC__
- float __ieee754_fmodf(float x, float y)
-#else
- float __ieee754_fmodf(x,y)
- float x,y ;
-#endif
+float
+__ieee754_fmodf (float x, float y)
{
int32_t n,hx,hy,hz,ix,iy,sx,i;
@@ -66,13 +54,13 @@ static float one = 1.0, Zero[] = {0.0, -0.0,};
} else iy = (hy>>23)-127;
/* set up {hx,lx}, {hy,ly} and align y to x */
- if(ix >= -126)
+ if(ix >= -126)
hx = 0x00800000|(0x007fffff&hx);
else { /* subnormal x, shift x to normal */
n = -126-ix;
hx = hx<<n;
}
- if(iy >= -126)
+ if(iy >= -126)
hy = 0x00800000|(0x007fffff&hy);
else { /* subnormal y, shift y to normal */
n = -126-iy;
@@ -85,17 +73,17 @@ static float one = 1.0, Zero[] = {0.0, -0.0,};
hz=hx-hy;
if(hz<0){hx = hx+hx;}
else {
- if(hz==0) /* return sign(x)*0 */
+ if(hz==0) /* return sign(x)*0 */
return Zero[(u_int32_t)sx>>31];
- hx = hz+hz;
+ hx = hz+hz;
}
}
hz=hx-hy;
if(hz>=0) {hx=hz;}
/* convert back to floating value and restore the sign */
- if(hx==0) /* return sign(x)*0 */
- return Zero[(u_int32_t)sx>>31];
+ if(hx==0) /* return sign(x)*0 */
+ return Zero[(u_int32_t)sx>>31];
while(hx<0x00800000) { /* normalize x */
hx = hx+hx;
iy -= 1;
@@ -111,3 +99,4 @@ static float one = 1.0, Zero[] = {0.0, -0.0,};
}
return x; /* exact output */
}
+strong_alias (__ieee754_fmodf, __fmodf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_gammaf_r.c b/sysdeps/ieee754/flt-32/e_gammaf_r.c
index 926c84f368..aeeddf1a96 100644
--- a/sysdeps/ieee754/flt-32/e_gammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_gammaf_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997, 1999, 2001, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2001, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -32,19 +32,20 @@ __ieee754_gammaf_r (float x, int *signgamp)
GET_FLOAT_WORD (hx, x);
- if ((hx & 0x7fffffff) == 0)
+ if (__builtin_expect ((hx & 0x7fffffff) == 0, 0))
{
/* Return value for x == 0 is Inf with divide by zero exception. */
*signgamp = 0;
return 1.0 / x;
}
- if (hx < 0 && (u_int32_t) hx < 0xff800000 && __rintf (x) == x)
+ if (__builtin_expect (hx < 0, 0)
+ && (u_int32_t) hx < 0xff800000 && __rintf (x) == x)
{
/* Return value for integer x < 0 is NaN with invalid exception. */
*signgamp = 0;
return (x - x) / (x - x);
}
- if (hx == 0xff800000)
+ if (__builtin_expect (hx == 0xff800000, 0))
{
/* x == -Inf. According to ISO this is NaN. */
*signgamp = 0;
@@ -54,3 +55,4 @@ __ieee754_gammaf_r (float x, int *signgamp)
/* XXX FIXME. */
return __ieee754_expf (__ieee754_lgammaf_r (x, signgamp));
}
+strong_alias (__ieee754_gammaf_r, __gammaf_r_finite)
diff --git a/sysdeps/ieee754/flt-32/e_hypotf.c b/sysdeps/ieee754/flt-32/e_hypotf.c
index a8e1a52d2b..7ec8ae66bc 100644
--- a/sysdeps/ieee754/flt-32/e_hypotf.c
+++ b/sysdeps/ieee754/flt-32/e_hypotf.c
@@ -13,19 +13,11 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_hypotf.c,v 1.5 1995/05/12 04:57:30 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
- float __ieee754_hypotf(float x, float y)
-#else
- float __ieee754_hypotf(x,y)
- float x, y;
-#endif
+float
+__ieee754_hypotf(float x, float y)
{
float a,b,t1,t2,y1,y2,w;
int32_t j,k,ha,hb;
@@ -39,7 +31,7 @@ static char rcsid[] = "$NetBSD: e_hypotf.c,v 1.5 1995/05/12 04:57:30 jtc Exp $";
SET_FLOAT_WORD(b,hb); /* b <- |b| */
if((ha-hb)>0xf000000) {return a+b;} /* x/y > 2**30 */
k=0;
- if(ha > 0x58800000) { /* a>2**50 */
+ if(__builtin_expect(ha > 0x58800000, 0)) { /* a>2**50 */
if(ha >= 0x7f800000) { /* Inf or NaN */
w = a+b; /* for sNaN */
if(ha == 0x7f800000) w = a;
@@ -51,15 +43,15 @@ static char rcsid[] = "$NetBSD: e_hypotf.c,v 1.5 1995/05/12 04:57:30 jtc Exp $";
SET_FLOAT_WORD(a,ha);
SET_FLOAT_WORD(b,hb);
}
- if(hb < 0x26800000) { /* b < 2**-50 */
+ if(__builtin_expect(hb < 0x26800000, 0)) { /* b < 2**-50 */
if(hb <= 0x007fffff) { /* subnormal b or 0 */
- if(hb==0) return a;
+ if(hb==0) return a;
SET_FLOAT_WORD(t1,0x7e800000); /* t1=2^126 */
b *= t1;
a *= t1;
k -= 126;
} else { /* scale a and b by 2^60 */
- ha += 0x1e000000; /* a *= 2^60 */
+ ha += 0x1e000000; /* a *= 2^60 */
hb += 0x1e000000; /* b *= 2^60 */
k -= 60;
SET_FLOAT_WORD(a,ha);
@@ -85,3 +77,4 @@ static char rcsid[] = "$NetBSD: e_hypotf.c,v 1.5 1995/05/12 04:57:30 jtc Exp $";
return t1*w;
} else return w;
}
+strong_alias (__ieee754_hypotf, __hypotf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_j0f.c b/sysdeps/ieee754/flt-32/e_j0f.c
index 8c499e614e..0cc52c94c4 100644
--- a/sysdeps/ieee754/flt-32/e_j0f.c
+++ b/sysdeps/ieee754/flt-32/e_j0f.c
@@ -13,29 +13,17 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_j0f.c,v 1.4 1995/05/10 20:45:25 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static float pzerof(float), qzerof(float);
-#else
-static float pzerof(), qzerof();
-#endif
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
-huge = 1e30,
+huge = 1e30,
one = 1.0,
invsqrtpi= 5.6418961287e-01, /* 0x3f106ebb */
tpi = 6.3661974669e-01, /* 0x3f22f983 */
- /* R0/S0 on [0, 2.00] */
+ /* R0/S0 on [0, 2.00] */
R02 = 1.5625000000e-02, /* 0x3c800000 */
R03 = -1.8997929874e-04, /* 0xb947352e */
R04 = 1.8295404516e-06, /* 0x35f58e88 */
@@ -45,18 +33,10 @@ S02 = 1.1692678527e-04, /* 0x38f53697 */
S03 = 5.1354652442e-07, /* 0x3509daa6 */
S04 = 1.1661400734e-09; /* 0x30a045e8 */
-#ifdef __STDC__
static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-#ifdef __STDC__
- float __ieee754_j0f(float x)
-#else
- float __ieee754_j0f(x)
- float x;
-#endif
+float
+__ieee754_j0f(float x)
{
float z, s,c,ss,cc,r,u,v;
int32_t hx,ix;
@@ -72,7 +52,7 @@ static float zero = 0.0;
if(ix<0x7f000000) { /* make sure x+x not overflow */
z = -__cosf(x+x);
if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
+ else ss = z/cc;
}
/*
* j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
@@ -86,10 +66,9 @@ static float zero = 0.0;
return z;
}
if(ix<0x39000000) { /* |x| < 2**-13 */
- if(huge+x>one) { /* raise inexact if x != 0 */
- if(ix<0x32000000) return one; /* |x|<2**-27 */
- else return one - (float)0.25*x*x;
- }
+ math_force_eval(huge+x); /* raise inexact if x != 0 */
+ if(ix<0x32000000) return one; /* |x|<2**-27 */
+ else return one - (float)0.25*x*x;
}
z = x*x;
r = z*(R02+z*(R03+z*(R04+z*R05)));
@@ -101,12 +80,9 @@ static float zero = 0.0;
return((one+u)*(one-u)+z*(r/s));
}
}
+strong_alias (__ieee754_j0f, __j0f_finite)
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
u00 = -7.3804296553e-02, /* 0xbd9726b5 */
u01 = 1.7666645348e-01, /* 0x3e34e80d */
u02 = -1.3818567619e-02, /* 0xbc626746 */
@@ -119,52 +95,48 @@ v02 = 7.6006865129e-05, /* 0x389f65e0 */
v03 = 2.5915085189e-07, /* 0x348b216c */
v04 = 4.4111031494e-10; /* 0x2ff280c2 */
-#ifdef __STDC__
- float __ieee754_y0f(float x)
-#else
- float __ieee754_y0f(x)
- float x;
-#endif
+float
+__ieee754_y0f(float x)
{
float z, s,c,ss,cc,u,v;
int32_t hx,ix;
GET_FLOAT_WORD(hx,x);
- ix = 0x7fffffff&hx;
+ ix = 0x7fffffff&hx;
/* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0, y0(0) is -inf. */
if(ix>=0x7f800000) return one/(x+x*x);
- if(ix==0) return -HUGE_VALF+x; /* -inf and overflow exception. */
- if(hx<0) return zero/(zero*x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
- /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
- * where x0 = x-pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
- * = 1/sqrt(2) * (sin(x) + cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
+ if(ix==0) return -HUGE_VALF+x; /* -inf and overflow exception. */
+ if(hx<0) return zero/(zero*x);
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ /* y0(x) = sqrt(2/(pi*x))*(p0(x)*sin(x0)+q0(x)*cos(x0))
+ * where x0 = x-pi/4
+ * Better formula:
+ * cos(x0) = cos(x)cos(pi/4)+sin(x)sin(pi/4)
+ * = 1/sqrt(2) * (sin(x) + cos(x))
+ * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.
+ */
__sincosf (x, &s, &c);
- ss = s-c;
- cc = s+c;
+ ss = s-c;
+ cc = s+c;
/*
* j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
* y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
*/
- if(ix<0x7f000000) { /* make sure x+x not overflow */
- z = -__cosf(x+x);
- if ((s*c)<zero) cc = z/ss;
- else ss = z/cc;
- }
- if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x);
- else {
- u = pzerof(x); v = qzerof(x);
- z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x);
- }
- return z;
+ if(ix<0x7f000000) { /* make sure x+x not overflow */
+ z = -__cosf(x+x);
+ if ((s*c)<zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x);
+ else {
+ u = pzerof(x); v = qzerof(x);
+ z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x);
+ }
+ return z;
}
if(ix<=0x32000000) { /* x < 2**-27 */
return(u00 + tpi*__ieee754_logf(x));
@@ -174,21 +146,18 @@ v04 = 4.4111031494e-10; /* 0x2ff280c2 */
v = one+z*(v01+z*(v02+z*(v03+z*v04)));
return(u/v + tpi*(__ieee754_j0f(x)*__ieee754_logf(x)));
}
+strong_alias (__ieee754_y0f, __y0f_finite)
/* The asymptotic expansions of pzero is
* 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
* For x >= 2, We approximate pzero by
- * pzero(x) = 1 + (R/S)
+ * pzero(x) = 1 + (R/S)
* where R = pR0 + pR1*s^2 + pR2*s^4 + ... + pR5*s^10
- * S = 1 + pS0*s^2 + ... + pS4*s^10
+ * S = 1 + pS0*s^2 + ... + pS4*s^10
* and
* | pzero(x)-1-R/S | <= 2 ** ( -60.26)
*/
-#ifdef __STDC__
static const float pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.0000000000e+00, /* 0x00000000 */
-7.0312500000e-02, /* 0xbd900000 */
-8.0816707611e+00, /* 0xc1014e86 */
@@ -196,22 +165,14 @@ static float pR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-2.4852163086e+03, /* 0xc51b5376 */
-5.2530439453e+03, /* 0xc5a4285a */
};
-#ifdef __STDC__
static const float pS8[5] = {
-#else
-static float pS8[5] = {
-#endif
1.1653436279e+02, /* 0x42e91198 */
3.8337448730e+03, /* 0x456f9beb */
4.0597855469e+04, /* 0x471e95db */
1.1675296875e+05, /* 0x47e4087c */
4.7627726562e+04, /* 0x473a0bba */
};
-#ifdef __STDC__
static const float pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
-1.1412546255e-11, /* 0xad48c58a */
-7.0312492549e-02, /* 0xbd8fffff */
-4.1596107483e+00, /* 0xc0851b88 */
@@ -219,11 +180,7 @@ static float pR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-3.3123129272e+02, /* 0xc3a59d9b */
-3.4643338013e+02, /* 0xc3ad3779 */
};
-#ifdef __STDC__
static const float pS5[5] = {
-#else
-static float pS5[5] = {
-#endif
6.0753936768e+01, /* 0x42730408 */
1.0512523193e+03, /* 0x44836813 */
5.9789707031e+03, /* 0x45bad7c4 */
@@ -231,11 +188,7 @@ static float pS5[5] = {
2.4060581055e+03, /* 0x451660ee */
};
-#ifdef __STDC__
static const float pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static float pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
-2.5470459075e-09, /* 0xb12f081b */
-7.0311963558e-02, /* 0xbd8fffb8 */
-2.4090321064e+00, /* 0xc01a2d95 */
@@ -243,11 +196,7 @@ static float pR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-5.8079170227e+01, /* 0xc2685112 */
-3.1447946548e+01, /* 0xc1fb9565 */
};
-#ifdef __STDC__
static const float pS3[5] = {
-#else
-static float pS3[5] = {
-#endif
3.5856033325e+01, /* 0x420f6c94 */
3.6151397705e+02, /* 0x43b4c1ca */
1.1936077881e+03, /* 0x44953373 */
@@ -255,11 +204,7 @@ static float pS3[5] = {
1.7358093262e+02, /* 0x432d94b8 */
};
-#ifdef __STDC__
static const float pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
-8.8753431271e-08, /* 0xb3be98b7 */
-7.0303097367e-02, /* 0xbd8ffb12 */
-1.4507384300e+00, /* 0xbfb9b1cc */
@@ -267,11 +212,7 @@ static float pR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-1.1193166733e+01, /* 0xc1331736 */
-3.2336456776e+00, /* 0xc04ef40d */
};
-#ifdef __STDC__
static const float pS2[5] = {
-#else
-static float pS2[5] = {
-#endif
2.2220300674e+01, /* 0x41b1c32d */
1.3620678711e+02, /* 0x430834f0 */
2.7047027588e+02, /* 0x43873c32 */
@@ -279,18 +220,10 @@ static float pS2[5] = {
1.4657617569e+01, /* 0x416a859a */
};
-#ifdef __STDC__
- static float pzerof(float x)
-#else
- static float pzerof(x)
- float x;
-#endif
+static float
+pzerof(float x)
{
-#ifdef __STDC__
const float *p,*q;
-#else
- float *p,*q;
-#endif
float z,r,s;
int32_t ix;
GET_FLOAT_WORD(ix,x);
@@ -309,17 +242,13 @@ static float pS2[5] = {
/* For x >= 8, the asymptotic expansions of qzero is
* -1/8 s + 75/1024 s^3 - ..., where s = 1/x.
* We approximate pzero by
- * qzero(x) = s*(-1.25 + (R/S))
+ * qzero(x) = s*(-1.25 + (R/S))
* where R = qR0 + qR1*s^2 + qR2*s^4 + ... + qR5*s^10
- * S = 1 + qS0*s^2 + ... + qS5*s^12
+ * S = 1 + qS0*s^2 + ... + qS5*s^12
* and
* | qzero(x)/s +1.25-R/S | <= 2 ** ( -61.22)
*/
-#ifdef __STDC__
static const float qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.0000000000e+00, /* 0x00000000 */
7.3242187500e-02, /* 0x3d960000 */
1.1768206596e+01, /* 0x413c4a93 */
@@ -327,11 +256,7 @@ static float qR8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
8.8591972656e+03, /* 0x460a6cca */
3.7014625000e+04, /* 0x471096a0 */
};
-#ifdef __STDC__
static const float qS8[6] = {
-#else
-static float qS8[6] = {
-#endif
1.6377603149e+02, /* 0x4323c6aa */
8.0983447266e+03, /* 0x45fd12c2 */
1.4253829688e+05, /* 0x480b3293 */
@@ -340,11 +265,7 @@ static float qS8[6] = {
-3.4389928125e+05, /* 0xc8a7eb69 */
};
-#ifdef __STDC__
static const float qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
1.8408595828e-11, /* 0x2da1ec79 */
7.3242180049e-02, /* 0x3d95ffff */
5.8356351852e+00, /* 0x40babd86 */
@@ -352,11 +273,7 @@ static float qR5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
1.0272437744e+03, /* 0x448067cd */
1.9899779053e+03, /* 0x44f8bf4b */
};
-#ifdef __STDC__
static const float qS5[6] = {
-#else
-static float qS5[6] = {
-#endif
8.2776611328e+01, /* 0x42a58da0 */
2.0778142090e+03, /* 0x4501dd07 */
1.8847289062e+04, /* 0x46933e94 */
@@ -365,11 +282,7 @@ static float qS5[6] = {
-5.3543427734e+03, /* 0xc5a752be */
};
-#ifdef __STDC__
static const float qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#else
-static float qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
4.3774099900e-09, /* 0x3196681b */
7.3241114616e-02, /* 0x3d95ff70 */
3.3442313671e+00, /* 0x405607e3 */
@@ -377,11 +290,7 @@ static float qR3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
1.7080809021e+02, /* 0x432acedf */
1.6673394775e+02, /* 0x4326bbe4 */
};
-#ifdef __STDC__
static const float qS3[6] = {
-#else
-static float qS3[6] = {
-#endif
4.8758872986e+01, /* 0x42430916 */
7.0968920898e+02, /* 0x44316c1c */
3.7041481934e+03, /* 0x4567825f */
@@ -390,11 +299,7 @@ static float qS3[6] = {
-1.4924745178e+02, /* 0xc3153f59 */
};
-#ifdef __STDC__
static const float qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
1.5044444979e-07, /* 0x342189db */
7.3223426938e-02, /* 0x3d95f62a */
1.9981917143e+00, /* 0x3fffc4bf */
@@ -402,11 +307,7 @@ static float qR2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
3.1666231155e+01, /* 0x41fd5471 */
1.6252708435e+01, /* 0x4182058c */
};
-#ifdef __STDC__
static const float qS2[6] = {
-#else
-static float qS2[6] = {
-#endif
3.0365585327e+01, /* 0x41f2ecb8 */
2.6934811401e+02, /* 0x4386ac8f */
8.4478375244e+02, /* 0x44533229 */
@@ -415,18 +316,10 @@ static float qS2[6] = {
-5.3109550476e+00, /* 0xc0a9f358 */
};
-#ifdef __STDC__
- static float qzerof(float x)
-#else
- static float qzerof(x)
- float x;
-#endif
+static float
+qzerof(float x)
{
-#ifdef __STDC__
const float *p,*q;
-#else
- float *p,*q;
-#endif
float s,r,z;
int32_t ix;
GET_FLOAT_WORD(ix,x);
diff --git a/sysdeps/ieee754/flt-32/e_j1f.c b/sysdeps/ieee754/flt-32/e_j1f.c
index 71bb2515af..bb335a7403 100644
--- a/sysdeps/ieee754/flt-32/e_j1f.c
+++ b/sysdeps/ieee754/flt-32/e_j1f.c
@@ -13,24 +13,12 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_j1f.c,v 1.4 1995/05/10 20:45:31 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static float ponef(float), qonef(float);
-#else
-static float ponef(), qonef();
-#endif
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
huge = 1e30,
one = 1.0,
invsqrtpi= 5.6418961287e-01, /* 0x3f106ebb */
@@ -46,25 +34,17 @@ s03 = 1.1771846857e-06, /* 0x359dffc2 */
s04 = 5.0463624390e-09, /* 0x31ad6446 */
s05 = 1.2354227016e-11; /* 0x2d59567e */
-#ifdef __STDC__
static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-#ifdef __STDC__
- float __ieee754_j1f(float x)
-#else
- float __ieee754_j1f(x)
- float x;
-#endif
+float
+__ieee754_j1f(float x)
{
float z, s,c,ss,cc,r,u,v,y;
int32_t hx,ix;
GET_FLOAT_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix>=0x7f800000) return one/x;
+ if(__builtin_expect(ix>=0x7f800000, 0)) return one/x;
y = fabsf(x);
if(ix >= 0x40000000) { /* |x| >= 2.0 */
__sincosf (y, &s, &c);
@@ -73,7 +53,7 @@ static float zero = 0.0;
if(ix<0x7f000000) { /* make sure y+y not overflow */
z = __cosf(y+y);
if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
+ else ss = z/cc;
}
/*
* j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
@@ -85,9 +65,9 @@ static float zero = 0.0;
z = invsqrtpi*(u*cc-v*ss)/__ieee754_sqrtf(y);
}
if(hx<0) return -z;
- else return z;
+ else return z;
}
- if(ix<0x32000000) { /* |x|<2**-27 */
+ if(__builtin_expect(ix<0x32000000, 0)) { /* |x|<2**-27 */
if(huge+x>one) return (float)0.5*x;/* inexact if x!=0 necessary */
}
z = x*x;
@@ -96,23 +76,16 @@ static float zero = 0.0;
r *= x;
return(x*(float)0.5+r/s);
}
+strong_alias (__ieee754_j1f, __j1f_finite)
-#ifdef __STDC__
static const float U0[5] = {
-#else
-static float U0[5] = {
-#endif
-1.9605709612e-01, /* 0xbe48c331 */
5.0443872809e-02, /* 0x3d4e9e3c */
-1.9125689287e-03, /* 0xbafaaf2a */
2.3525259166e-05, /* 0x37c5581c */
-9.1909917899e-08, /* 0xb3c56003 */
};
-#ifdef __STDC__
static const float V0[5] = {
-#else
-static float V0[5] = {
-#endif
1.9916731864e-02, /* 0x3ca3286a */
2.0255257550e-04, /* 0x3954644b */
1.3560879779e-06, /* 0x35b602d4 */
@@ -120,73 +93,67 @@ static float V0[5] = {
1.6655924903e-11, /* 0x2d9281cf */
};
-#ifdef __STDC__
- float __ieee754_y1f(float x)
-#else
- float __ieee754_y1f(x)
- float x;
-#endif
+float
+__ieee754_y1f(float x)
{
float z, s,c,ss,cc,u,v;
int32_t hx,ix;
GET_FLOAT_WORD(hx,x);
- ix = 0x7fffffff&hx;
+ ix = 0x7fffffff&hx;
/* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
- if(ix>=0x7f800000) return one/(x+x*x);
- if(ix==0) return -HUGE_VALF+x; /* -inf and overflow exception. */
- if(hx<0) return zero/(zero*x);
- if(ix >= 0x40000000) { /* |x| >= 2.0 */
+ if(__builtin_expect(ix>=0x7f800000, 0)) return one/(x+x*x);
+ if(__builtin_expect(ix==0, 0))
+ return -HUGE_VALF+x; /* -inf and overflow exception. */
+ if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
+ if(ix >= 0x40000000) { /* |x| >= 2.0 */
__sincosf (x, &s, &c);
- ss = -s-c;
- cc = s-c;
- if(ix<0x7f000000) { /* make sure x+x not overflow */
- z = __cosf(x+x);
- if ((s*c)>zero) cc = z/ss;
- else ss = z/cc;
- }
- /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
- * where x0 = x-3pi/4
- * Better formula:
- * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
- * = 1/sqrt(2) * (sin(x) - cos(x))
- * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
- * = -1/sqrt(2) * (cos(x) + sin(x))
- * To avoid cancellation, use
- * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.
- */
- if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x);
- else {
- u = ponef(x); v = qonef(x);
- z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x);
- }
- return z;
- }
- if(ix<=0x24800000) { /* x < 2**-54 */
- return(-tpi/x);
- }
- z = x*x;
- u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
- v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
- return(x*(u/v) + tpi*(__ieee754_j1f(x)*__ieee754_logf(x)-one/x));
+ ss = -s-c;
+ cc = s-c;
+ if(ix<0x7f000000) { /* make sure x+x not overflow */
+ z = __cosf(x+x);
+ if ((s*c)>zero) cc = z/ss;
+ else ss = z/cc;
+ }
+ /* y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x0)+q1(x)*cos(x0))
+ * where x0 = x-3pi/4
+ * Better formula:
+ * cos(x0) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
+ * = 1/sqrt(2) * (sin(x) - cos(x))
+ * sin(x0) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
+ * = -1/sqrt(2) * (cos(x) + sin(x))
+ * To avoid cancellation, use
+ * sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
+ * to compute the worse one.
+ */
+ if(ix>0x48000000) z = (invsqrtpi*ss)/__ieee754_sqrtf(x);
+ else {
+ u = ponef(x); v = qonef(x);
+ z = invsqrtpi*(u*ss+v*cc)/__ieee754_sqrtf(x);
+ }
+ return z;
+ }
+ if(__builtin_expect(ix<=0x24800000, 0)) { /* x < 2**-54 */
+ return(-tpi/x);
+ }
+ z = x*x;
+ u = U0[0]+z*(U0[1]+z*(U0[2]+z*(U0[3]+z*U0[4])));
+ v = one+z*(V0[0]+z*(V0[1]+z*(V0[2]+z*(V0[3]+z*V0[4]))));
+ return(x*(u/v) + tpi*(__ieee754_j1f(x)*__ieee754_logf(x)-one/x));
}
+strong_alias (__ieee754_y1f, __y1f_finite)
/* For x >= 8, the asymptotic expansions of pone is
* 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
* We approximate pone by
- * pone(x) = 1 + (R/S)
+ * pone(x) = 1 + (R/S)
* where R = pr0 + pr1*s^2 + pr2*s^4 + ... + pr5*s^10
- * S = 1 + ps0*s^2 + ... + ps4*s^10
+ * S = 1 + ps0*s^2 + ... + ps4*s^10
* and
* | pone(x)-1-R/S | <= 2 ** ( -60.06)
*/
-#ifdef __STDC__
static const float pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.0000000000e+00, /* 0x00000000 */
1.1718750000e-01, /* 0x3df00000 */
1.3239480972e+01, /* 0x4153d4ea */
@@ -194,11 +161,7 @@ static float pr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
3.8747453613e+03, /* 0x45722bed */
7.9144794922e+03, /* 0x45f753d6 */
};
-#ifdef __STDC__
static const float ps8[5] = {
-#else
-static float ps8[5] = {
-#endif
1.1420736694e+02, /* 0x42e46a2c */
3.6509309082e+03, /* 0x45642ee5 */
3.6956207031e+04, /* 0x47105c35 */
@@ -206,11 +169,7 @@ static float ps8[5] = {
3.0804271484e+04, /* 0x46f0a88b */
};
-#ifdef __STDC__
static const float pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
1.3199052094e-11, /* 0x2d68333f */
1.1718749255e-01, /* 0x3defffff */
6.8027510643e+00, /* 0x40d9b023 */
@@ -218,11 +177,7 @@ static float pr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
5.1763616943e+02, /* 0x440168b7 */
5.2871520996e+02, /* 0x44042dc6 */
};
-#ifdef __STDC__
static const float ps5[5] = {
-#else
-static float ps5[5] = {
-#endif
5.9280597687e+01, /* 0x426d1f55 */
9.9140142822e+02, /* 0x4477d9b1 */
5.3532670898e+03, /* 0x45a74a23 */
@@ -230,11 +185,7 @@ static float ps5[5] = {
1.5040468750e+03, /* 0x44bc0180 */
};
-#ifdef __STDC__
static const float pr3[6] = {
-#else
-static float pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
3.0250391081e-09, /* 0x314fe10d */
1.1718686670e-01, /* 0x3defffab */
3.9329774380e+00, /* 0x407bb5e7 */
@@ -242,11 +193,7 @@ static float pr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
9.1055007935e+01, /* 0x42b61c2a */
4.8559066772e+01, /* 0x42423c7c */
};
-#ifdef __STDC__
static const float ps3[5] = {
-#else
-static float ps3[5] = {
-#endif
3.4791309357e+01, /* 0x420b2a4d */
3.3676245117e+02, /* 0x43a86198 */
1.0468714600e+03, /* 0x4482dbe3 */
@@ -254,11 +201,7 @@ static float ps3[5] = {
1.0378793335e+02, /* 0x42cf936c */
};
-#ifdef __STDC__
static const float pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
1.0771083225e-07, /* 0x33e74ea8 */
1.1717621982e-01, /* 0x3deffa16 */
2.3685150146e+00, /* 0x401795c0 */
@@ -266,11 +209,7 @@ static float pr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
1.7693971634e+01, /* 0x418d8d41 */
5.0735230446e+00, /* 0x40a25a4d */
};
-#ifdef __STDC__
static const float ps2[5] = {
-#else
-static float ps2[5] = {
-#endif
2.1436485291e+01, /* 0x41ab7dec */
1.2529022980e+02, /* 0x42fa9499 */
2.3227647400e+02, /* 0x436846c7 */
@@ -278,48 +217,36 @@ static float ps2[5] = {
8.3646392822e+00, /* 0x4105d590 */
};
-#ifdef __STDC__
- static float ponef(float x)
-#else
- static float ponef(x)
- float x;
-#endif
+static float
+ponef(float x)
{
-#ifdef __STDC__
const float *p,*q;
-#else
- float *p,*q;
-#endif
float z,r,s;
- int32_t ix;
+ int32_t ix;
GET_FLOAT_WORD(ix,x);
ix &= 0x7fffffff;
- if(ix>=0x41000000) {p = pr8; q= ps8;}
- else if(ix>=0x40f71c58){p = pr5; q= ps5;}
- else if(ix>=0x4036db68){p = pr3; q= ps3;}
- else if(ix>=0x40000000){p = pr2; q= ps2;}
- z = one/(x*x);
- r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
- s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
- return one+ r/s;
+ if(ix>=0x41000000) {p = pr8; q= ps8;}
+ else if(ix>=0x40f71c58){p = pr5; q= ps5;}
+ else if(ix>=0x4036db68){p = pr3; q= ps3;}
+ else if(ix>=0x40000000){p = pr2; q= ps2;}
+ z = one/(x*x);
+ r = p[0]+z*(p[1]+z*(p[2]+z*(p[3]+z*(p[4]+z*p[5]))));
+ s = one+z*(q[0]+z*(q[1]+z*(q[2]+z*(q[3]+z*q[4]))));
+ return one+ r/s;
}
/* For x >= 8, the asymptotic expansions of qone is
* 3/8 s - 105/1024 s^3 - ..., where s = 1/x.
* We approximate pone by
- * qone(x) = s*(0.375 + (R/S))
+ * qone(x) = s*(0.375 + (R/S))
* where R = qr1*s^2 + qr2*s^4 + ... + qr5*s^10
- * S = 1 + qs1*s^2 + ... + qs6*s^12
+ * S = 1 + qs1*s^2 + ... + qs6*s^12
* and
* | qone(x)/s -0.375-R/S | <= 2 ** ( -61.13)
*/
-#ifdef __STDC__
static const float qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#else
-static float qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-#endif
0.0000000000e+00, /* 0x00000000 */
-1.0253906250e-01, /* 0xbdd20000 */
-1.6271753311e+01, /* 0xc1822c8d */
@@ -327,11 +254,7 @@ static float qr8[6] = { /* for x in [inf, 8]=1/[0,0.125] */
-1.1849806641e+04, /* 0xc639273a */
-4.8438511719e+04, /* 0xc73d3683 */
};
-#ifdef __STDC__
static const float qs8[6] = {
-#else
-static float qs8[6] = {
-#endif
1.6139537048e+02, /* 0x43216537 */
7.8253862305e+03, /* 0x45f48b17 */
1.3387534375e+05, /* 0x4802bcd6 */
@@ -340,11 +263,7 @@ static float qs8[6] = {
-2.9449025000e+05, /* 0xc88fcb48 */
};
-#ifdef __STDC__
static const float qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#else
-static float qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-#endif
-2.0897993405e-11, /* 0xadb7d219 */
-1.0253904760e-01, /* 0xbdd1fffe */
-8.0564479828e+00, /* 0xc100e736 */
@@ -352,11 +271,7 @@ static float qr5[6] = { /* for x in [8,4.5454]=1/[0.125,0.22001] */
-1.3731937256e+03, /* 0xc4aba633 */
-2.6124443359e+03, /* 0xc523471c */
};
-#ifdef __STDC__
static const float qs5[6] = {
-#else
-static float qs5[6] = {
-#endif
8.1276550293e+01, /* 0x42a28d98 */
1.9917987061e+03, /* 0x44f8f98f */
1.7468484375e+04, /* 0x468878f8 */
@@ -365,11 +280,7 @@ static float qs5[6] = {
-4.7191835938e+03, /* 0xc5937978 */
};
-#ifdef __STDC__
static const float qr3[6] = {
-#else
-static float qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-#endif
-5.0783124372e-09, /* 0xb1ae7d4f */
-1.0253783315e-01, /* 0xbdd1ff5b */
-4.6101160049e+00, /* 0xc0938612 */
@@ -377,11 +288,7 @@ static float qr3[6] = {/* for x in [4.547,2.8571]=1/[0.2199,0.35001] */
-2.2824453735e+02, /* 0xc3643e9a */
-2.1921012878e+02, /* 0xc35b35cb */
};
-#ifdef __STDC__
static const float qs3[6] = {
-#else
-static float qs3[6] = {
-#endif
4.7665153503e+01, /* 0x423ea91e */
6.7386511230e+02, /* 0x4428775e */
3.3801528320e+03, /* 0x45534272 */
@@ -390,11 +297,7 @@ static float qs3[6] = {
-1.3520118713e+02, /* 0xc3073381 */
};
-#ifdef __STDC__
static const float qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#else
-static float qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-#endif
-1.7838172539e-07, /* 0xb43f8932 */
-1.0251704603e-01, /* 0xbdd1f475 */
-2.7522056103e+00, /* 0xc0302423 */
@@ -402,11 +305,7 @@ static float qr2[6] = {/* for x in [2.8570,2]=1/[0.3499,0.5] */
-4.2325313568e+01, /* 0xc2294d1f */
-2.1371921539e+01, /* 0xc1aaf9b2 */
};
-#ifdef __STDC__
static const float qs2[6] = {
-#else
-static float qs2[6] = {
-#endif
2.9533363342e+01, /* 0x41ec4454 */
2.5298155212e+02, /* 0x437cfb47 */
7.5750280762e+02, /* 0x443d602e */
@@ -415,18 +314,10 @@ static float qs2[6] = {
-4.9594988823e+00, /* 0xc09eb437 */
};
-#ifdef __STDC__
- static float qonef(float x)
-#else
- static float qonef(x)
- float x;
-#endif
+static float
+qonef(float x)
{
-#ifdef __STDC__
const float *p,*q;
-#else
- float *p,*q;
-#endif
float s,r,z;
int32_t ix;
GET_FLOAT_WORD(ix,x);
diff --git a/sysdeps/ieee754/flt-32/e_jnf.c b/sysdeps/ieee754/flt-32/e_jnf.c
index dd3d551a39..1e55485b02 100644
--- a/sysdeps/ieee754/flt-32/e_jnf.c
+++ b/sysdeps/ieee754/flt-32/e_jnf.c
@@ -13,33 +13,17 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_jnf.c,v 1.5 1995/05/10 20:45:37 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
two = 2.0000000000e+00, /* 0x40000000 */
one = 1.0000000000e+00; /* 0x3F800000 */
-#ifdef __STDC__
static const float zero = 0.0000000000e+00;
-#else
-static float zero = 0.0000000000e+00;
-#endif
-#ifdef __STDC__
- float __ieee754_jnf(int n, float x)
-#else
- float __ieee754_jnf(n,x)
- int n; float x;
-#endif
+float
+__ieee754_jnf(int n, float x)
{
int32_t i,hx,ix, sgn;
float a, b, temp, di;
@@ -51,7 +35,7 @@ static float zero = 0.0000000000e+00;
GET_FLOAT_WORD(hx,x);
ix = 0x7fffffff&hx;
/* if J(n,NaN) is NaN */
- if(ix>0x7f800000) return x+x;
+ if(__builtin_expect(ix>0x7f800000, 0)) return x+x;
if(n<0){
n = -n;
x = -x;
@@ -61,7 +45,7 @@ static float zero = 0.0000000000e+00;
if(n==1) return(__ieee754_j1f(x));
sgn = (n&1)&(hx>>31); /* even n -- 0, odd n -- sign(x) */
x = fabsf(x);
- if(ix==0||ix>=0x7f800000) /* if x is 0 or inf */
+ if(__builtin_expect(ix==0||ix>=0x7f800000, 0)) /* if x is 0 or inf */
b = zero;
else if((float)n<=x) {
/* Safe to use J(n+1,x)=2n/x *J(n,x)-J(n-1,x) */
@@ -106,7 +90,7 @@ static float zero = 0.0000000000e+00;
* 1
* w - -----------------
* 1
- * w+h - ---------
+ * w+h - ---------
* w+2h - ...
*
* To determine how many terms needed, let
@@ -144,18 +128,18 @@ static float zero = 0.0000000000e+00;
tmp = tmp*__ieee754_logf(fabsf(v*tmp));
if(tmp<(float)8.8721679688e+01) {
for(i=n-1,di=(float)(i+i);i>0;i--){
- temp = b;
+ temp = b;
b *= di;
b = b/x - a;
- a = temp;
+ a = temp;
di -= two;
}
} else {
for(i=n-1,di=(float)(i+i);i>0;i--){
- temp = b;
+ temp = b;
b *= di;
b = b/x - a;
- a = temp;
+ a = temp;
di -= two;
/* scale b to avoid spurious overflow */
if(b>(float)1e10) {
@@ -179,13 +163,10 @@ static float zero = 0.0000000000e+00;
}
if(sgn==1) return -b; else return b;
}
+strong_alias (__ieee754_jnf, __jnf_finite)
-#ifdef __STDC__
- float __ieee754_ynf(int n, float x)
-#else
- float __ieee754_ynf(n,x)
- int n; float x;
-#endif
+float
+__ieee754_ynf(int n, float x)
{
int32_t i,hx,ix;
u_int32_t ib;
@@ -195,9 +176,10 @@ static float zero = 0.0000000000e+00;
GET_FLOAT_WORD(hx,x);
ix = 0x7fffffff&hx;
/* if Y(n,NaN) is NaN */
- if(ix>0x7f800000) return x+x;
- if(ix==0) return -HUGE_VALF+x; /* -inf and overflow exception. */
- if(hx<0) return zero/(zero*x);
+ if(__builtin_expect(ix>0x7f800000, 0)) return x+x;
+ if(__builtin_expect(ix==0, 0))
+ return -HUGE_VALF+x; /* -inf and overflow exception. */
+ if(__builtin_expect(hx<0, 0)) return zero/(zero*x);
sign = 1;
if(n<0){
n = -n;
@@ -205,7 +187,7 @@ static float zero = 0.0000000000e+00;
}
if(n==0) return(__ieee754_y0f(x));
if(n==1) return(sign*__ieee754_y1f(x));
- if(ix==0x7f800000) return zero;
+ if(__builtin_expect(ix==0x7f800000, 0)) return zero;
a = __ieee754_y0f(x);
b = __ieee754_y1f(x);
@@ -219,3 +201,4 @@ static float zero = 0.0000000000e+00;
}
if(sign>0) return b; else return -b;
}
+strong_alias (__ieee754_ynf, __ynf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_lgammaf_r.c b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
index 0ed2610085..cbee9db8fb 100644
--- a/sysdeps/ieee754/flt-32/e_lgammaf_r.c
+++ b/sysdeps/ieee754/flt-32/e_lgammaf_r.c
@@ -13,18 +13,10 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_lgammaf_r.c,v 1.3 1995/05/10 20:45:47 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
two23= 8.3886080000e+06, /* 0x4b000000 */
half= 5.0000000000e-01, /* 0x3f000000 */
one = 1.0000000000e+00, /* 0x3f800000 */
@@ -92,18 +84,10 @@ w4 = -5.9518753551e-04, /* 0xba1c065c */
w5 = 8.3633989561e-04, /* 0x3a5b3dd2 */
w6 = -1.6309292987e-03; /* 0xbad5c4e8 */
-#ifdef __STDC__
static const float zero= 0.0000000000e+00;
-#else
-static float zero= 0.0000000000e+00;
-#endif
-#ifdef __STDC__
- static float sin_pif(float x)
-#else
- static float sin_pif(x)
- float x;
-#endif
+static float
+sin_pif(float x)
{
float y,z;
int n,ix;
@@ -124,16 +108,16 @@ static float zero= 0.0000000000e+00;
y = (float)2.0*(y - __floorf(y)); /* y = |x| mod 2.0 */
n = (int) (y*(float)4.0);
} else {
- if(ix>=0x4b800000) {
- y = zero; n = 0; /* y must be even */
- } else {
- if(ix<0x4b000000) z = y+two23; /* exact */
+ if(ix>=0x4b800000) {
+ y = zero; n = 0; /* y must be even */
+ } else {
+ if(ix<0x4b000000) z = y+two23; /* exact */
GET_FLOAT_WORD(n,z);
n &= 1;
- y = n;
- n<<= 2;
- }
- }
+ y = n;
+ n<<= 2;
+ }
+ }
switch (n) {
case 0: y = __kernel_sinf(pi*y,zero,0); break;
case 1:
@@ -148,12 +132,8 @@ static float zero= 0.0000000000e+00;
}
-#ifdef __STDC__
- float __ieee754_lgammaf_r(float x, int *signgamp)
-#else
- float __ieee754_lgammaf_r(x,signgamp)
- float x; int *signgamp;
-#endif
+float
+__ieee754_lgammaf_r(float x, int *signgamp)
{
float t,y,z,nadj,p,p1,p2,p3,q,r,w;
int i,hx,ix;
@@ -163,21 +143,22 @@ static float zero= 0.0000000000e+00;
/* purge off +-inf, NaN, +-0, and negative arguments */
*signgamp = 1;
ix = hx&0x7fffffff;
- if(ix>=0x7f800000) return x*x;
- if(ix==0)
+ if(__builtin_expect(ix>=0x7f800000, 0)) return x*x;
+ if(__builtin_expect(ix==0, 0))
{
if (hx < 0)
*signgamp = -1;
return one/fabsf(x);
}
- if(ix<0x1c800000) { /* |x|<2**-70, return -log(|x|) */
+ if(__builtin_expect(ix<0x1c800000, 0)) {
+ /* |x|<2**-70, return -log(|x|) */
if(hx<0) {
- *signgamp = -1;
- return -__ieee754_logf(-x);
+ *signgamp = -1;
+ return -__ieee754_logf(-x);
} else return -__ieee754_logf(x);
}
if(hx<0) {
- if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */
+ if(ix>=0x4b000000) /* |x|>=2**23, must be -integer */
return x/zero;
t = sin_pif(x);
if(t==zero) return one/fabsf(t); /* -integer */
@@ -190,15 +171,15 @@ static float zero= 0.0000000000e+00;
if (ix==0x3f800000||ix==0x40000000) r = 0;
/* for x < 2.0 */
else if(ix<0x40000000) {
- if(ix<=0x3f666666) { /* lgamma(x) = lgamma(x+1)-log(x) */
+ if(ix<=0x3f666666) { /* lgamma(x) = lgamma(x+1)-log(x) */
r = -__ieee754_logf(x);
if(ix>=0x3f3b4a20) {y = one-x; i= 0;}
else if(ix>=0x3e6d3308) {y= x-(tc-one); i=1;}
- else {y = x; i=2;}
+ else {y = x; i=2;}
} else {
- r = zero;
- if(ix>=0x3fdda618) {y=(float)2.0-x;i=0;} /* [1.7316,2] */
- else if(ix>=0x3F9da620) {y=x-tc;i=1;} /* [1.23,1.73] */
+ r = zero;
+ if(ix>=0x3fdda618) {y=(float)2.0-x;i=0;} /* [1.7316,2] */
+ else if(ix>=0x3F9da620) {y=x-tc;i=1;} /* [1.23,1.73] */
else {y=x-one;i=2;}
}
switch(i) {
@@ -222,7 +203,7 @@ static float zero= 0.0000000000e+00;
r += (-(float)0.5*y + p1/p2);
}
}
- else if(ix<0x41000000) { /* x < 8.0 */
+ else if(ix<0x41000000) { /* x < 8.0 */
i = (int)x;
t = zero;
y = x-(float)i;
@@ -251,3 +232,4 @@ static float zero= 0.0000000000e+00;
if(hx<0) r = nadj - r;
return r;
}
+strong_alias (__ieee754_lgammaf_r, __lgammaf_r_finite)
diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c
index cea3d9156b..72dcea6250 100644
--- a/sysdeps/ieee754/flt-32/e_log10f.c
+++ b/sysdeps/ieee754/flt-32/e_log10f.c
@@ -13,55 +13,41 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_log10f.c,v 1.5 1995/05/10 20:45:53 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
two25 = 3.3554432000e+07, /* 0x4c000000 */
ivln10 = 4.3429449201e-01, /* 0x3ede5bd9 */
log10_2hi = 3.0102920532e-01, /* 0x3e9a2080 */
log10_2lo = 7.9034151668e-07; /* 0x355427db */
-#ifdef __STDC__
static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-#ifdef __STDC__
- float __ieee754_log10f(float x)
-#else
- float __ieee754_log10f(x)
- float x;
-#endif
+float
+__ieee754_log10f(float x)
{
float y,z;
int32_t i,k,hx;
GET_FLOAT_WORD(hx,x);
- k=0;
- if (hx < 0x00800000) { /* x < 2**-126 */
- if ((hx&0x7fffffff)==0)
- return -two25/(x-x); /* log(+-0)=-inf */
- if (hx<0) return (x-x)/(x-x); /* log(-#) = NaN */
- k -= 25; x *= two25; /* subnormal number, scale up x */
+ k=0;
+ if (hx < 0x00800000) { /* x < 2**-126 */
+ if (__builtin_expect((hx&0x7fffffff)==0, 0))
+ return -two25/(x-x); /* log(+-0)=-inf */
+ if (__builtin_expect(hx<0, 0))
+ return (x-x)/(x-x); /* log(-#) = NaN */
+ k -= 25; x *= two25; /* subnormal number, scale up x */
GET_FLOAT_WORD(hx,x);
- }
- if (hx >= 0x7f800000) return x+x;
+ }
+ if (__builtin_expect(hx >= 0x7f800000, 0)) return x+x;
k += (hx>>23)-127;
i = ((u_int32_t)k&0x80000000)>>31;
- hx = (hx&0x007fffff)|((0x7f-i)<<23);
- y = (float)(k+i);
+ hx = (hx&0x007fffff)|((0x7f-i)<<23);
+ y = (float)(k+i);
SET_FLOAT_WORD(x,hx);
z = y*log10_2lo + ivln10*__ieee754_logf(x);
return z+y*log10_2hi;
}
+strong_alias (__ieee754_log10f, __log10f_finite)
diff --git a/sysdeps/ieee754/flt-32/e_log2f.c b/sysdeps/ieee754/flt-32/e_log2f.c
index af3c6eadfe..7453214516 100644
--- a/sysdeps/ieee754/flt-32/e_log2f.c
+++ b/sysdeps/ieee754/flt-32/e_log2f.c
@@ -18,11 +18,7 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
ln2 = 0.69314718055994530942,
two25 = 3.355443200e+07, /* 0x4c000000 */
Lg1 = 6.6666668653e-01, /* 3F2AAAAB */
@@ -33,18 +29,10 @@ Lg5 = 1.8183572590e-01, /* 3E3A3325 */
Lg6 = 1.5313838422e-01, /* 3E1CD04F */
Lg7 = 1.4798198640e-01; /* 3E178897 */
-#ifdef __STDC__
static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-#ifdef __STDC__
- float __ieee754_log2f(float x)
-#else
- float __ieee754_log2f(x)
- float x;
-#endif
+float
+__ieee754_log2f(float x)
{
float hfsq,f,s,z,R,w,t1,t2,dk;
int32_t k,ix,i,j;
@@ -53,13 +41,14 @@ static float zero = 0.0;
k=0;
if (ix < 0x00800000) { /* x < 2**-126 */
- if ((ix&0x7fffffff)==0)
+ if (__builtin_expect((ix&0x7fffffff)==0, 0))
return -two25/(x-x); /* log(+-0)=-inf */
- if (ix<0) return (x-x)/(x-x); /* log(-#) = NaN */
+ if (__builtin_expect(ix<0, 0))
+ return (x-x)/(x-x); /* log(-#) = NaN */
k -= 25; x *= two25; /* subnormal number, scale up x */
GET_FLOAT_WORD(ix,x);
}
- if (ix >= 0x7f800000) return x+x;
+ if (__builtin_expect(ix >= 0x7f800000, 0)) return x+x;
k += (ix>>23)-127;
ix &= 0x007fffff;
i = (ix+(0x95f64<<3))&0x800000;
@@ -72,7 +61,7 @@ static float zero = 0.0;
R = f*f*((float)0.5-(float)0.33333333333333333*f);
return dk-(R-f)/ln2;
}
- s = f/((float)2.0+f);
+ s = f/((float)2.0+f);
z = s*s;
i = ix-(0x6147a<<3);
w = z*z;
@@ -88,3 +77,4 @@ static float zero = 0.0;
return dk-((s*(f-R))-f)/ln2;
}
}
+strong_alias (__ieee754_log2f, __log2f_finite)
diff --git a/sysdeps/ieee754/flt-32/e_logf.c b/sysdeps/ieee754/flt-32/e_logf.c
index de8f869df4..b870b31957 100644
--- a/sysdeps/ieee754/flt-32/e_logf.c
+++ b/sysdeps/ieee754/flt-32/e_logf.c
@@ -13,18 +13,10 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_logf.c,v 1.4 1995/05/10 20:45:54 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
ln2_hi = 6.9313812256e-01, /* 0x3f317180 */
ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */
two25 = 3.355443200e+07, /* 0x4c000000 */
@@ -36,18 +28,10 @@ Lg5 = 1.8183572590e-01, /* 3E3A3325 */
Lg6 = 1.5313838422e-01, /* 3E1CD04F */
Lg7 = 1.4798198640e-01; /* 3E178897 */
-#ifdef __STDC__
static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-#ifdef __STDC__
- float __ieee754_logf(float x)
-#else
- float __ieee754_logf(x)
- float x;
-#endif
+float
+__ieee754_logf(float x)
{
float hfsq,f,s,z,R,w,t1,t2,dk;
int32_t k,ix,i,j;
@@ -56,13 +40,14 @@ static float zero = 0.0;
k=0;
if (ix < 0x00800000) { /* x < 2**-126 */
- if ((ix&0x7fffffff)==0)
+ if (__builtin_expect((ix&0x7fffffff)==0, 0))
return -two25/(x-x); /* log(+-0)=-inf */
- if (ix<0) return (x-x)/(x-x); /* log(-#) = NaN */
+ if (__builtin_expect(ix<0, 0))
+ return (x-x)/(x-x); /* log(-#) = NaN */
k -= 25; x *= two25; /* subnormal number, scale up x */
GET_FLOAT_WORD(ix,x);
}
- if (ix >= 0x7f800000) return x+x;
+ if (__builtin_expect(ix >= 0x7f800000, 0)) return x+x;
k += (ix>>23)-127;
ix &= 0x007fffff;
i = (ix+(0x95f64<<3))&0x800000;
@@ -76,9 +61,9 @@ static float zero = 0.0;
}
R = f*f*((float)0.5-(float)0.33333333333333333*f);
if(k==0) return f-R; else {dk=(float)k;
- return dk*ln2_hi-((R-dk*ln2_lo)-f);}
+ return dk*ln2_hi-((R-dk*ln2_lo)-f);}
}
- s = f/((float)2.0+f);
+ s = f/((float)2.0+f);
dk = (float)k;
z = s*s;
i = ix-(0x6147a<<3);
@@ -97,3 +82,4 @@ static float zero = 0.0;
return dk*ln2_hi-((s*(f-R)-dk*ln2_lo)-f);
}
}
+strong_alias (__ieee754_logf, __logf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_powf.c b/sysdeps/ieee754/flt-32/e_powf.c
index 9f520804a4..460055204f 100644
--- a/sysdeps/ieee754/flt-32/e_powf.c
+++ b/sysdeps/ieee754/flt-32/e_powf.c
@@ -13,20 +13,12 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_powf.c,v 1.7 1996/04/08 15:43:44 phil Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
static const float huge = 1.0e+30, tiny = 1.0e-30;
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
bp[] = {1.0, 1.5,},
dp_h[] = { 0.0, 5.84960938e-01,}, /* 0x3f15c000 */
dp_l[] = { 0.0, 1.56322085e-06,}, /* 0x35d1cfdc */
@@ -57,12 +49,8 @@ ivln2 = 1.4426950216e+00, /* 0x3fb8aa3b =1/ln2 */
ivln2_h = 1.4426879883e+00, /* 0x3fb8aa00 =16b 1/ln2*/
ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
-#ifdef __STDC__
- float __ieee754_powf(float x, float y)
-#else
- float __ieee754_powf(x,y)
- float x, y;
-#endif
+float
+__ieee754_powf(float x, float y)
{
float z,ax,z_h,z_l,p_h,p_l;
float y1,t1,t2,r,s,t,u,v,w;
@@ -81,8 +69,8 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
if(x == -1.0 && isinf(y)) return one;
/* +-NaN return x+y */
- if(ix > 0x7f800000 ||
- iy > 0x7f800000)
+ if(__builtin_expect(ix > 0x7f800000 ||
+ iy > 0x7f800000, 0))
return x+y;
/* determine if y is an odd int when x < 0
@@ -101,26 +89,26 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
}
/* special value of y */
- if (iy==0x7f800000) { /* y is +-inf */
+ if (__builtin_expect(iy==0x7f800000, 0)) { /* y is +-inf */
if (ix==0x3f800000)
- return y - y; /* inf**+-1 is NaN */
+ return y - y; /* inf**+-1 is NaN */
else if (ix > 0x3f800000)/* (|x|>1)**+-inf = inf,0 */
- return (hy>=0)? y: zero;
+ return (hy>=0)? y: zero;
else /* (|x|<1)**-,+inf = inf,0 */
- return (hy<0)?-y: zero;
+ return (hy<0)?-y: zero;
}
if(iy==0x3f800000) { /* y is +-1 */
if(hy<0) return one/x; else return x;
}
if(hy==0x40000000) return x*x; /* y is 2 */
if(hy==0x3f000000) { /* y is 0.5 */
- if(hx>=0) /* x >= +0 */
+ if(__builtin_expect(hx>=0, 1)) /* x >= +0 */
return __ieee754_sqrtf(x);
}
ax = fabsf(x);
/* special value of x */
- if(ix==0x7f800000||ix==0||ix==0x3f800000){
+ if(__builtin_expect(ix==0x7f800000||ix==0||ix==0x3f800000, 0)){
z = ax; /*x is +-0,+-inf,+-1*/
if(hy<0) z = one/z; /* z = (1/|x|) */
if(hx<0) {
@@ -133,10 +121,11 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
}
/* (x<0)**(non-int) is NaN */
- if(((((u_int32_t)hx>>31)-1)|yisint)==0) return (x-x)/(x-x);
+ if(__builtin_expect(((((u_int32_t)hx>>31)-1)|yisint)==0, 0))
+ return (x-x)/(x-x);
/* |y| is huge */
- if(iy>0x4d000000) { /* if |y| > 2**27 */
+ if(__builtin_expect(iy>0x4d000000, 0)) { /* if |y| > 2**27 */
/* over/underflow if x is not close to one */
if(ix<0x3f7ffff8) return (hy<0)? huge*huge:tiny*tiny;
if(ix>0x3f800007) return (hy>0)? huge*huge:tiny*tiny;
@@ -214,14 +203,14 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
p_h = y1*t1;
z = p_l+p_h;
GET_FLOAT_WORD(j,z);
- if (j>0x43000000) /* if z > 128 */
+ if (__builtin_expect(j>0x43000000, 0)) /* if z > 128 */
return s*huge*huge; /* overflow */
- else if (j==0x43000000) { /* if z == 128 */
+ else if (__builtin_expect(j==0x43000000, 0)) { /* if z == 128 */
if(p_l+ovt>z-p_h) return s*huge*huge; /* overflow */
}
- else if ((j&0x7fffffff)>0x43160000) /* z <= -150 */
+ else if (__builtin_expect((j&0x7fffffff)>0x43160000, 0))/* z <= -150 */
return s*tiny*tiny; /* underflow */
- else if ((u_int32_t) j==0xc3160000){ /* z == -150 */
+ else if (__builtin_expect((u_int32_t) j==0xc3160000, 0)){/* z == -150*/
if(p_l<=z-p_h) return s*tiny*tiny; /* underflow */
}
/*
@@ -255,3 +244,4 @@ ivln2_l = 7.0526075433e-06; /* 0x36eca570 =1/ln2 tail*/
else SET_FLOAT_WORD(z,j);
return s*z;
}
+strong_alias (__ieee754_powf, __powf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_remainderf.c b/sysdeps/ieee754/flt-32/e_remainderf.c
index 90d0d366d4..aaf15dfe54 100644
--- a/sysdeps/ieee754/flt-32/e_remainderf.c
+++ b/sysdeps/ieee754/flt-32/e_remainderf.c
@@ -8,31 +8,19 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_remainderf.c,v 1.4 1995/05/10 20:46:08 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-#ifdef __STDC__
- float __ieee754_remainderf(float x, float p)
-#else
- float __ieee754_remainderf(x,p)
- float x,p;
-#endif
+float
+__ieee754_remainderf(float x, float p)
{
int32_t hx,hp;
u_int32_t sx;
@@ -45,7 +33,7 @@ static float zero = 0.0;
hx &= 0x7fffffff;
/* purge off exception values */
- if(hp==0) return (x*p)/(x*p); /* p = 0 */
+ if(hp==0) return (x*p)/(x*p); /* p = 0 */
if((hx>=0x7f800000)|| /* x not finite */
((hp>0x7f800000))) /* p is NaN */
return (x*p)/(x*p);
@@ -71,3 +59,4 @@ static float zero = 0.0;
SET_FLOAT_WORD(x,hx^sx);
return x;
}
+strong_alias (__ieee754_remainderf, __remainderf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_sinhf.c b/sysdeps/ieee754/flt-32/e_sinhf.c
index 045f6f121e..5813963488 100644
--- a/sysdeps/ieee754/flt-32/e_sinhf.c
+++ b/sysdeps/ieee754/flt-32/e_sinhf.c
@@ -8,31 +8,19 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_sinhf.c,v 1.4 1995/05/10 20:46:15 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float one = 1.0, shuge = 1.0e37;
-#else
-static float one = 1.0, shuge = 1.0e37;
-#endif
-#ifdef __STDC__
- float __ieee754_sinhf(float x)
-#else
- float __ieee754_sinhf(x)
- float x;
-#endif
-{
+float
+__ieee754_sinhf(float x)
+{
float t,w,h;
int32_t ix,jx;
@@ -40,13 +28,13 @@ static float one = 1.0, shuge = 1.0e37;
ix = jx&0x7fffffff;
/* x is INF or NaN */
- if(ix>=0x7f800000) return x+x;
+ if(__builtin_expect(ix>=0x7f800000, 0)) return x+x;
h = 0.5;
if (jx<0) h = -h;
/* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */
if (ix < 0x41b00000) { /* |x|<22 */
- if (ix<0x31800000) /* |x|<2**-28 */
+ if (__builtin_expect(ix<0x31800000, 0)) /* |x|<2**-28 */
if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
t = __expm1f(fabsf(x));
if(ix<0x3f800000) return h*((float)2.0*t-t*t/(t+one));
@@ -66,3 +54,4 @@ static float one = 1.0, shuge = 1.0e37;
/* |x| > overflowthresold, sinh(x) overflow */
return x*shuge;
}
+strong_alias (__ieee754_sinhf, __sinhf_finite)
diff --git a/sysdeps/ieee754/flt-32/e_sqrtf.c b/sysdeps/ieee754/flt-32/e_sqrtf.c
index 7648ef4bca..6d6688c52c 100644
--- a/sysdeps/ieee754/flt-32/e_sqrtf.c
+++ b/sysdeps/ieee754/flt-32/e_sqrtf.c
@@ -8,43 +8,31 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_sqrtf.c,v 1.4 1995/05/10 20:46:19 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float one = 1.0, tiny=1.0e-30;
-#else
-static float one = 1.0, tiny=1.0e-30;
-#endif
-#ifdef __STDC__
- float __ieee754_sqrtf(float x)
-#else
- float __ieee754_sqrtf(x)
- float x;
-#endif
+float
+__ieee754_sqrtf(float x)
{
float z;
- int32_t sign = (int)0x80000000;
+ int32_t sign = (int)0x80000000;
int32_t ix,s,q,m,t,i;
u_int32_t r;
GET_FLOAT_WORD(ix,x);
/* take care of Inf and NaN */
- if((ix&0x7f800000)==0x7f800000) {
+ if((ix&0x7f800000)==0x7f800000) {
return x*x+x; /* sqrt(NaN)=NaN, sqrt(+inf)=+inf
sqrt(-inf)=sNaN */
- }
+ }
/* take care of zero */
if(ix<=0) {
if((ix&(~sign))==0) return x;/* sqrt(+-0) = +-0 */
@@ -69,12 +57,12 @@ static float one = 1.0, tiny=1.0e-30;
r = 0x01000000; /* r = moving bit from right to left */
while(r!=0) {
- t = s+r;
- if(t<=ix) {
- s = t+r;
- ix -= t;
- q += r;
- }
+ t = s+r;
+ if(t<=ix) {
+ s = t+r;
+ ix -= t;
+ q += r;
+ }
ix += ix;
r>>=1;
}
@@ -83,7 +71,7 @@ static float one = 1.0, tiny=1.0e-30;
if(ix!=0) {
z = one-tiny; /* trigger inexact flag */
if (z>=one) {
- z = one+tiny;
+ z = one+tiny;
if (z>one)
q += 2;
else
@@ -95,3 +83,4 @@ static float one = 1.0, tiny=1.0e-30;
SET_FLOAT_WORD(z,ix);
return z;
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/ieee754/flt-32/s_asinhf.c b/sysdeps/ieee754/flt-32/s_asinhf.c
index fac256d37a..aa46f90004 100644
--- a/sysdeps/ieee754/flt-32/s_asinhf.c
+++ b/sysdeps/ieee754/flt-32/s_asinhf.c
@@ -13,46 +13,36 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_asinhf.c,v 1.5 1995/05/12 04:57:39 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
one = 1.0000000000e+00, /* 0x3F800000 */
ln2 = 6.9314718246e-01, /* 0x3f317218 */
huge= 1.0000000000e+30;
-#ifdef __STDC__
- float __asinhf(float x)
-#else
- float __asinhf(x)
- float x;
-#endif
+float
+__asinhf(float x)
{
- float t,w;
+ float w;
int32_t hx,ix;
GET_FLOAT_WORD(hx,x);
ix = hx&0x7fffffff;
- if(ix>=0x7f800000) return x+x; /* x is inf or NaN */
- if(ix< 0x38000000) { /* |x|<2**-14 */
+ if(__builtin_expect(ix< 0x38000000, 0)) { /* |x|<2**-14 */
if(huge+x>one) return x; /* return x inexact except 0 */
}
- if(ix>0x47000000) { /* |x| > 2**14 */
+ if(__builtin_expect(ix>0x47000000, 0)) { /* |x| > 2**14 */
+ if(ix>=0x7f800000) return x+x; /* x is inf or NaN */
w = __ieee754_logf(fabsf(x))+ln2;
- } else if (ix>0x40000000) { /* 2**14 > |x| > 2.0 */
- t = fabsf(x);
- w = __ieee754_logf((float)2.0*t+one/(__ieee754_sqrtf(x*x+one)+t));
- } else { /* 2.0 > |x| > 2**-14 */
- t = x*x;
- w =__log1pf(fabsf(x)+t/(one+__ieee754_sqrtf(one+t)));
+ } else {
+ float xa = fabsf(x);
+ if (ix>0x40000000) { /* 2**14 > |x| > 2.0 */
+ w = __ieee754_logf(2.0f*xa+one/(__ieee754_sqrtf(xa*xa+one)+xa));
+ } else { /* 2.0 > |x| > 2**-14 */
+ float t = xa*xa;
+ w =__log1pf(xa+t/(one+__ieee754_sqrtf(one+t)));
+ }
}
- if(hx>0) return w; else return -w;
+ return __copysignf(w, x);
}
weak_alias (__asinhf, asinhf)
diff --git a/sysdeps/ieee754/flt-32/s_ceilf.c b/sysdeps/ieee754/flt-32/s_ceilf.c
index 29ccadb049..af926600b0 100644
--- a/sysdeps/ieee754/flt-32/s_ceilf.c
+++ b/sysdeps/ieee754/flt-32/s_ceilf.c
@@ -8,30 +8,19 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_ceilf.c,v 1.4 1995/05/10 20:46:55 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
+
static const float huge = 1.0e30;
-#else
-static float huge = 1.0e30;
-#endif
-#ifdef __STDC__
- float __ceilf(float x)
-#else
- float __ceilf(x)
- float x;
-#endif
+float
+__ceilf(float x)
{
int32_t i0,j0;
u_int32_t i;
@@ -39,24 +28,24 @@ static float huge = 1.0e30;
GET_FLOAT_WORD(i0,x);
j0 = ((i0>>23)&0xff)-0x7f;
if(j0<23) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0<0) {i0=0x80000000;}
- else if(i0!=0) { i0=0x3f800000;}
- }
+ if(j0<0) { /* raise inexact if x != 0 */
+ math_force_eval(huge+x);/* return 0*sign(x) if |x|<1 */
+ if(i0<0) {i0=0x80000000;}
+ else if(i0!=0) { i0=0x3f800000;}
} else {
i = (0x007fffff)>>j0;
if((i0&i)==0) return x; /* x is integral */
- if(huge+x>(float)0.0) { /* raise inexact flag */
- if(i0>0) i0 += (0x00800000)>>j0;
- i0 &= (~i);
- }
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0>0) i0 += (0x00800000)>>j0;
+ i0 &= (~i);
}
} else {
- if(j0==0x80) return x+x; /* inf or NaN */
+ if(__builtin_expect(j0==0x80, 0)) return x+x; /* inf or NaN */
else return x; /* x is integral */
}
SET_FLOAT_WORD(x,i0);
return x;
}
+#ifndef __ceilf
weak_alias (__ceilf, ceilf)
+#endif
diff --git a/sysdeps/ieee754/flt-32/s_expm1f.c b/sysdeps/ieee754/flt-32/s_expm1f.c
index 3f4536b906..1d707120b0 100644
--- a/sysdeps/ieee754/flt-32/s_expm1f.c
+++ b/sysdeps/ieee754/flt-32/s_expm1f.c
@@ -13,22 +13,14 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_expm1f.c,v 1.5 1995/05/10 20:47:11 jtc Exp $";
-#endif
-
#include <errno.h>
#include "math.h"
#include "math_private.h"
-static const volatile float huge = 1.0e+30;
-static const volatile float tiny = 1.0e-30;
+static const float huge = 1.0e+30;
+static const float tiny = 1.0e-30;
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
one = 1.0,
o_threshold = 8.8721679688e+01,/* 0x42b17180 */
ln2_hi = 6.9313812256e-01,/* 0x3f317180 */
@@ -41,12 +33,8 @@ Q3 = -7.9365076090e-05, /* 0xb8a670cd */
Q4 = 4.0082177293e-06, /* 0x36867e54 */
Q5 = -2.0109921195e-07; /* 0xb457edbb */
-#ifdef __STDC__
- float __expm1f(float x)
-#else
- float __expm1f(x)
- float x;
-#endif
+float
+__expm1f(float x)
{
float y,hi,lo,c,t,e,hxs,hfx,r1;
int32_t k,xsb;
@@ -60,17 +48,17 @@ Q5 = -2.0109921195e-07; /* 0xb457edbb */
/* filter out huge and non-finite argument */
if(hx >= 0x4195b844) { /* if |x|>=27*ln2 */
if(hx >= 0x42b17218) { /* if |x|>=88.721... */
- if(hx>0x7f800000)
- return x+x; /* NaN */
+ if(hx>0x7f800000)
+ return x+x; /* NaN */
if(hx==0x7f800000)
return (xsb==0)? x:-1.0;/* exp(+-inf)={inf,-1} */
- if(x > o_threshold) {
+ if(x > o_threshold) {
__set_errno (ERANGE);
return huge*huge; /* overflow */
}
}
if(xsb!=0) { /* x < -27*ln2, return -1.0 with inexact */
- if(x+tiny<(float)0.0) /* raise inexact */
+ math_force_eval(x+tiny);/* raise inexact */
return tiny-one; /* return -1 */
}
}
@@ -91,7 +79,7 @@ Q5 = -2.0109921195e-07; /* 0xb457edbb */
x = hi - lo;
c = (hi-x)-lo;
}
- else if(hx < 0x33000000) { /* when |x|<2**-25, return x */
+ else if(hx < 0x33000000) { /* when |x|<2**-25, return x */
t = huge+x; /* return x with inexact flags when x!=0 */
return x - (t-(huge+x));
}
@@ -109,28 +97,28 @@ Q5 = -2.0109921195e-07; /* 0xb457edbb */
e -= hxs;
if(k== -1) return (float)0.5*(x-e)-(float)0.5;
if(k==1) {
- if(x < (float)-0.25) return -(float)2.0*(e-(x+(float)0.5));
- else return one+(float)2.0*(x-e);
+ if(x < (float)-0.25) return -(float)2.0*(e-(x+(float)0.5));
+ else return one+(float)2.0*(x-e);
}
if (k <= -2 || k>56) { /* suffice to return exp(x)-1 */
- int32_t i;
- y = one-(e-x);
+ int32_t i;
+ y = one-(e-x);
GET_FLOAT_WORD(i,y);
SET_FLOAT_WORD(y,i+(k<<23)); /* add k to y's exponent */
- return y-one;
+ return y-one;
}
t = one;
if(k<23) {
- int32_t i;
- SET_FLOAT_WORD(t,0x3f800000 - (0x1000000>>k)); /* t=1-2^-k */
- y = t-(e-x);
+ int32_t i;
+ SET_FLOAT_WORD(t,0x3f800000 - (0x1000000>>k)); /* t=1-2^-k */
+ y = t-(e-x);
GET_FLOAT_WORD(i,y);
SET_FLOAT_WORD(y,i+(k<<23)); /* add k to y's exponent */
} else {
- int32_t i;
+ int32_t i;
SET_FLOAT_WORD(t,((0x7f-k)<<23)); /* 2^-k */
- y = x-(e+t);
- y += one;
+ y = x-(e+t);
+ y += one;
GET_FLOAT_WORD(i,y);
SET_FLOAT_WORD(y,i+(k<<23)); /* add k to y's exponent */
}
diff --git a/sysdeps/ieee754/flt-32/s_finitef.c b/sysdeps/ieee754/flt-32/s_finitef.c
index 65767f8f93..2df513be75 100644
--- a/sysdeps/ieee754/flt-32/s_finitef.c
+++ b/sysdeps/ieee754/flt-32/s_finitef.c
@@ -25,6 +25,7 @@ static char rcsid[] = "$NetBSD: s_finitef.c,v 1.4 1995/05/10 20:47:18 jtc Exp $"
#include "math.h"
#include "math_private.h"
+#undef __finitef
#ifdef __STDC__
int __finitef(float x)
#else
diff --git a/sysdeps/ieee754/flt-32/s_floorf.c b/sysdeps/ieee754/flt-32/s_floorf.c
index e8822b0884..de160d2114 100644
--- a/sysdeps/ieee754/flt-32/s_floorf.c
+++ b/sysdeps/ieee754/flt-32/s_floorf.c
@@ -8,15 +8,11 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_floorf.c,v 1.4 1995/05/10 20:47:22 jtc Exp $";
-#endif
-
/*
* floorf(x)
* Return x rounded toward -inf to integral value
@@ -29,43 +25,35 @@ static char rcsid[] = "$NetBSD: s_floorf.c,v 1.4 1995/05/10 20:47:22 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float huge = 1.0e30;
-#else
-static float huge = 1.0e30;
-#endif
-#ifdef __STDC__
- float __floorf(float x)
-#else
- float __floorf(x)
- float x;
-#endif
+float
+__floorf(float x)
{
int32_t i0,j0;
u_int32_t i;
GET_FLOAT_WORD(i0,x);
j0 = ((i0>>23)&0xff)-0x7f;
if(j0<23) {
- if(j0<0) { /* raise inexact if x != 0 */
- if(huge+x>(float)0.0) {/* return 0*sign(x) if |x|<1 */
- if(i0>=0) {i0=0;}
- else if((i0&0x7fffffff)!=0)
- { i0=0xbf800000;}
- }
+ if(j0<0) { /* raise inexact if x != 0 */
+ math_force_eval(huge+x);/* return 0*sign(x) if |x|<1 */
+ if(i0>=0) {i0=0;}
+ else if((i0&0x7fffffff)!=0)
+ { i0=0xbf800000;}
} else {
i = (0x007fffff)>>j0;
if((i0&i)==0) return x; /* x is integral */
- if(huge+x>(float)0.0) { /* raise inexact flag */
- if(i0<0) i0 += (0x00800000)>>j0;
- i0 &= (~i);
- }
+ math_force_eval(huge+x); /* raise inexact flag */
+ if(i0<0) i0 += (0x00800000)>>j0;
+ i0 &= (~i);
}
} else {
- if(j0==0x80) return x+x; /* inf or NaN */
+ if(__builtin_expect(j0==0x80, 0)) return x+x; /* inf or NaN */
else return x; /* x is integral */
}
SET_FLOAT_WORD(x,i0);
return x;
}
+#ifndef __floorf
weak_alias (__floorf, floorf)
+#endif
diff --git a/sysdeps/ieee754/flt-32/s_isinf_nsf.c b/sysdeps/ieee754/flt-32/s_isinf_nsf.c
new file mode 100644
index 0000000000..1e46e2ce4a
--- /dev/null
+++ b/sysdeps/ieee754/flt-32/s_isinf_nsf.c
@@ -0,0 +1,20 @@
+/*
+ * Written by Ulrich Drepper <drepper@gmail.com>.
+ */
+
+/*
+ * __isinf_nsf(x) returns != 0 if x is ±inf, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+#undef __isinf_nsf
+int
+__isinf_nsf (float x)
+{
+ int32_t ix;
+ GET_FLOAT_WORD(ix,x);
+ return (ix & 0x7fffffff) == 0x7f800000;
+}
diff --git a/sysdeps/ieee754/flt-32/s_isnanf.c b/sysdeps/ieee754/flt-32/s_isnanf.c
index 4ac16c2b5f..1b1b2475b9 100644
--- a/sysdeps/ieee754/flt-32/s_isnanf.c
+++ b/sysdeps/ieee754/flt-32/s_isnanf.c
@@ -4,7 +4,7 @@
/*
* ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ * Copyright (C) 1993, 2011 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
@@ -25,6 +25,7 @@ static char rcsid[] = "$NetBSD: s_isnanf.c,v 1.4 1995/05/10 20:47:38 jtc Exp $";
#include "math.h"
#include "math_private.h"
+#undef __isnanf
#ifdef __STDC__
int __isnanf(float x)
#else
diff --git a/sysdeps/ieee754/flt-32/s_log1pf.c b/sysdeps/ieee754/flt-32/s_log1pf.c
index bd3d57635c..9e555ed570 100644
--- a/sysdeps/ieee754/flt-32/s_log1pf.c
+++ b/sysdeps/ieee754/flt-32/s_log1pf.c
@@ -13,18 +13,10 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_log1pf.c,v 1.4 1995/05/10 20:47:48 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
ln2_hi = 6.9313812256e-01, /* 0x3f317180 */
ln2_lo = 9.0580006145e-06, /* 0x3717f7d1 */
two25 = 3.355443200e+07, /* 0x4c000000 */
@@ -36,18 +28,10 @@ Lp5 = 1.8183572590e-01, /* 3E3A3325 */
Lp6 = 1.5313838422e-01, /* 3E1CD04F */
Lp7 = 1.4798198640e-01; /* 3E178897 */
-#ifdef __STDC__
static const float zero = 0.0;
-#else
-static float zero = 0.0;
-#endif
-#ifdef __STDC__
- float __log1pf(float x)
-#else
- float __log1pf(x)
- float x;
-#endif
+float
+__log1pf(float x)
{
float hfsq,f,c,s,z,R,u;
int32_t k,hx,hu,ax;
@@ -62,8 +46,8 @@ static float zero = 0.0;
else return (x-x)/(x-x); /* log1p(x<-1)=NaN */
}
if(ax<0x31000000) { /* |x| < 2**-29 */
- if(two25+x>zero /* raise inexact */
- &&ax<0x24800000) /* |x| < 2**-54 */
+ math_force_eval(two25+x); /* raise inexact */
+ if (ax<0x24800000) /* |x| < 2**-54 */
return x;
else
return x - x*x*(float)0.5;
@@ -76,37 +60,37 @@ static float zero = 0.0;
if(hx<0x5a000000) {
u = (float)1.0+x;
GET_FLOAT_WORD(hu,u);
- k = (hu>>23)-127;
+ k = (hu>>23)-127;
/* correction term */
- c = (k>0)? (float)1.0-(u-x):x-(u-(float)1.0);
+ c = (k>0)? (float)1.0-(u-x):x-(u-(float)1.0);
c /= u;
} else {
u = x;
GET_FLOAT_WORD(hu,u);
- k = (hu>>23)-127;
+ k = (hu>>23)-127;
c = 0;
}
hu &= 0x007fffff;
if(hu<0x3504f7) {
- SET_FLOAT_WORD(u,hu|0x3f800000);/* normalize u */
+ SET_FLOAT_WORD(u,hu|0x3f800000);/* normalize u */
} else {
- k += 1;
+ k += 1;
SET_FLOAT_WORD(u,hu|0x3f000000); /* normalize u/2 */
- hu = (0x00800000-hu)>>2;
+ hu = (0x00800000-hu)>>2;
}
f = u-(float)1.0;
}
hfsq=(float)0.5*f*f;
if(hu==0) { /* |f| < 2**-20 */
if(f==zero) {
- if(k==0) return zero;
+ if(k==0) return zero;
else {c += k*ln2_lo; return k*ln2_hi+c;}
}
R = hfsq*((float)1.0-(float)0.66666666666666666*f);
if(k==0) return f-R; else
- return k*ln2_hi-((R-(k*ln2_lo+c))-f);
+ return k*ln2_hi-((R-(k*ln2_lo+c))-f);
}
- s = f/((float)2.0+f);
+ s = f/((float)2.0+f);
z = s*s;
R = z*(Lp1+z*(Lp2+z*(Lp3+z*(Lp4+z*(Lp5+z*(Lp6+z*Lp7))))));
if(k==0) return f-(hfsq-s*(hfsq+R)); else
diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c
index 7d6f262f51..04ef9ab20c 100644
--- a/sysdeps/ieee754/flt-32/s_nearbyintf.c
+++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c
@@ -19,22 +19,14 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
TWO23[2]={
8.3886080000e+06, /* 0x4b000000 */
-8.3886080000e+06, /* 0xcb000000 */
};
-#ifdef __STDC__
- float __nearbyintf(float x)
-#else
- float __nearbyintf(x)
- float x;
-#endif
+float
+__nearbyintf(float x)
{
fenv_t env;
int32_t i0,j0,sx;
@@ -50,13 +42,13 @@ TWO23[2]={
i0 &= 0xfff00000;
i0 |= ((i1|-i1)>>9)&0x400000;
SET_FLOAT_WORD(x,i0);
- feholdexcept (&env);
- w = TWO23[sx]+x;
- t = w-TWO23[sx];
- fesetenv (&env);
+ libc_feholdexceptf (&env);
+ w = TWO23[sx]+x;
+ t = w-TWO23[sx];
+ libc_fesetenvf (&env);
GET_FLOAT_WORD(i0,t);
SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
- return t;
+ return t;
} else {
i = (0x007fffff)>>j0;
if((i0&i)==0) return x; /* x is integral */
@@ -64,14 +56,14 @@ TWO23[2]={
if((i0&i)!=0) i0 = (i0&(~i))|((0x100000)>>j0);
}
} else {
- if(j0==0x80) return x+x; /* inf or NaN */
+ if(__builtin_expect(j0==0x80, 0)) return x+x; /* inf or NaN */
else return x; /* x is integral */
}
SET_FLOAT_WORD(x,i0);
- feholdexcept (&env);
+ libc_feholdexceptf (&env);
w = TWO23[sx]+x;
t = w-TWO23[sx];
- fesetenv (&env);
+ libc_fesetenvf (&env);
return t;
}
weak_alias (__nearbyintf, nearbyintf)
diff --git a/sysdeps/ieee754/flt-32/s_rintf.c b/sysdeps/ieee754/flt-32/s_rintf.c
index 4e5b409b29..9ea9b6fc4f 100644
--- a/sysdeps/ieee754/flt-32/s_rintf.c
+++ b/sysdeps/ieee754/flt-32/s_rintf.c
@@ -8,34 +8,22 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: s_rintf.c,v 1.4 1995/05/10 20:48:06 jtc Exp $";
-#endif
-
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const float
-#else
-static float
-#endif
TWO23[2]={
8.3886080000e+06, /* 0x4b000000 */
-8.3886080000e+06, /* 0xcb000000 */
};
-#ifdef __STDC__
- float __rintf(float x)
-#else
- float __rintf(x)
- float x;
-#endif
+float
+__rintf(float x)
{
int32_t i0,j0,sx;
u_int32_t i,i1;
@@ -44,17 +32,17 @@ TWO23[2]={
sx = (i0>>31)&1;
j0 = ((i0>>23)&0xff)-0x7f;
if(j0<23) {
- if(j0<0) {
+ if(j0<0) {
if((i0&0x7fffffff)==0) return x;
i1 = (i0&0x07fffff);
i0 &= 0xfff00000;
i0 |= ((i1|-i1)>>9)&0x400000;
SET_FLOAT_WORD(x,i0);
- w = TWO23[sx]+x;
- t = w-TWO23[sx];
+ w = TWO23[sx]+x;
+ t = w-TWO23[sx];
GET_FLOAT_WORD(i0,t);
SET_FLOAT_WORD(t,(i0&0x7fffffff)|(sx<<31));
- return t;
+ return t;
} else {
i = (0x007fffff)>>j0;
if((i0&i)==0) return x; /* x is integral */
@@ -69,4 +57,6 @@ TWO23[2]={
w = TWO23[sx]+x;
return w-TWO23[sx];
}
+#ifndef __rintf
weak_alias (__rintf, rintf)
+#endif
diff --git a/sysdeps/ieee754/flt-32/s_roundf.c b/sysdeps/ieee754/flt-32/s_roundf.c
index 0b24987792..f4f9dd61d3 100644
--- a/sysdeps/ieee754/flt-32/s_roundf.c
+++ b/sysdeps/ieee754/flt-32/s_roundf.c
@@ -1,5 +1,5 @@
/* Round float to integer away from zero.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -37,12 +37,11 @@ __roundf (float x)
{
if (j0 < 0)
{
- if (huge + x > 0.0F)
- {
- i0 &= 0x80000000;
- if (j0 == -1)
- i0 |= 0x3f800000;
- }
+ math_force_eval (huge + x);
+
+ i0 &= 0x80000000;
+ if (j0 == -1)
+ i0 |= 0x3f800000;
}
else
{
@@ -50,12 +49,11 @@ __roundf (float x)
if ((i0 & i) == 0)
/* X is integral. */
return x;
- if (huge + x > 0.0F)
- {
- /* Raise inexact if x != 0. */
- i0 += 0x00400000 >> j0;
- i0 &= ~i;
- }
+ math_force_eval (huge + x);
+
+ /* Raise inexact if x != 0. */
+ i0 += 0x00400000 >> j0;
+ i0 &= ~i;
}
}
else
diff --git a/sysdeps/ieee754/flt-32/w_expf.c b/sysdeps/ieee754/flt-32/w_expf.c
index 83b268f570..151c584547 100644
--- a/sysdeps/ieee754/flt-32/w_expf.c
+++ b/sysdeps/ieee754/flt-32/w_expf.c
@@ -1,60 +1,46 @@
-/* w_expf.c -- float version of w_exp.c.
- * Conversion to float by Ian Lance Taylor, Cygnus Support, ian@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: w_expf.c,v 1.3 1995/05/10 20:48:53 jtc Exp $";
-#endif
-
-/*
- * wrapper expf(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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 <math.h>
+#include <math_private.h>
+
static const float
-#else
-static float
-#endif
o_threshold= 8.8722831726e+01, /* 0x42b17217 */
u_threshold= -1.0397208405e+02; /* 0xc2cff1b5 */
-#ifdef __STDC__
- float __expf(float x) /* wrapper expf */
-#else
- float __expf(x) /* wrapper expf */
- float x;
-#endif
+
+/* wrapper expf */
+float
+__expf (float x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_expf(x);
-#else
- float z;
- z = __ieee754_expf(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(__finitef(x)) {
- if(x>o_threshold)
- /* exp overflow */
- return (float)__kernel_standard((double)x,(double)x,106);
- else if(x<u_threshold)
- /* exp underflow */
- return (float)__kernel_standard((double)x,(double)x,107);
- }
- return z;
-#endif
+ if (__builtin_expect (x > o_threshold, 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 106);
+ }
+ else if (__builtin_expect (x < u_threshold, 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard_f (x, x, 107);
+ }
+
+ return __ieee754_expf (x);
}
hidden_def (__expf)
weak_alias (__expf, expf)
diff --git a/sysdeps/ieee754/k_standard.c b/sysdeps/ieee754/k_standard.c
index ede5157454..229c4981dc 100644
--- a/sysdeps/ieee754/k_standard.c
+++ b/sysdeps/ieee754/k_standard.c
@@ -94,12 +94,8 @@ static double zero = 0.0; /* used as const */
*/
-#ifdef __STDC__
- double __kernel_standard(double x, double y, int type)
-#else
- double __kernel_standard(x,y,type)
- double x,y; int type;
-#endif
+double
+__kernel_standard(double x, double y, int type)
{
struct exception exc;
#ifndef HUGE_VAL /* this is the only routine that uses HUGE_VAL */
@@ -150,7 +146,7 @@ static double zero = 0.0; /* used as const */
__set_errno (EDOM);
else if (!matherr(&exc)) {
if(_LIB_VERSION == _SVID_) {
- (void) WRITE2("asin: DOMAIN error\n", 19);
+ (void) WRITE2("asin: DOMAIN error\n", 19);
}
__set_errno (EDOM);
}
@@ -361,14 +357,14 @@ static double zero = 0.0; /* used as const */
exc.type = OVERFLOW;
exc.name = type < 100 ? "lgamma" : (type < 200
? "lgammaf" : "lgammal");
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
+ if (_LIB_VERSION == _SVID_)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
__set_errno (ERANGE);
- else if (!matherr(&exc)) {
- __set_errno (ERANGE);
}
break;
case 15:
@@ -378,10 +374,10 @@ static double zero = 0.0; /* used as const */
exc.type = SING;
exc.name = type < 100 ? "lgamma" : (type < 200
? "lgammaf" : "lgammal");
- if (_LIB_VERSION == _SVID_)
- exc.retval = HUGE;
- else
- exc.retval = HUGE_VAL;
+ if (_LIB_VERSION == _SVID_)
+ exc.retval = HUGE;
+ else
+ exc.retval = HUGE_VAL;
if (_LIB_VERSION == _POSIX_)
__set_errno (ERANGE);
else if (!matherr(&exc)) {
@@ -611,95 +607,95 @@ static double zero = 0.0; /* used as const */
__set_errno (EDOM);
}
break;
- case 27:
+ case 27:
case 127:
case 227:
- /* fmod(x,0) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "fmod" : (type < 200
+ /* fmod(x,0) */
+ exc.type = DOMAIN;
+ exc.name = type < 100 ? "fmod" : (type < 200
? "fmodf" : "fmodl");
- if (_LIB_VERSION == _SVID_)
- exc.retval = x;
+ if (_LIB_VERSION == _SVID_)
+ exc.retval = x;
else
exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (EDOM);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("fmod: DOMAIN error\n", 20);
- }
- __set_errno (EDOM);
- }
- break;
- case 28:
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (EDOM);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2("fmod: DOMAIN error\n", 20);
+ }
+ __set_errno (EDOM);
+ }
+ break;
+ case 28:
case 128:
case 228:
- /* remainder(x,0) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "remainder" : (type < 200
+ /* remainder(x,0) */
+ exc.type = DOMAIN;
+ exc.name = type < 100 ? "remainder" : (type < 200
? "remainderf"
: "remainderl");
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (EDOM);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("remainder: DOMAIN error\n", 24);
- }
- __set_errno (EDOM);
- }
- break;
- case 29:
+ exc.retval = zero/zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (EDOM);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2("remainder: DOMAIN error\n", 24);
+ }
+ __set_errno (EDOM);
+ }
+ break;
+ case 29:
case 129:
case 229:
- /* acosh(x<1) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "acosh" : (type < 200
+ /* acosh(x<1) */
+ exc.type = DOMAIN;
+ exc.name = type < 100 ? "acosh" : (type < 200
? "acoshf" : "acoshl");
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (EDOM);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("acosh: DOMAIN error\n", 20);
- }
- __set_errno (EDOM);
- }
- break;
- case 30:
+ exc.retval = zero/zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (EDOM);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2("acosh: DOMAIN error\n", 20);
+ }
+ __set_errno (EDOM);
+ }
+ break;
+ case 30:
case 130:
case 230:
- /* atanh(|x|>1) */
- exc.type = DOMAIN;
- exc.name = type < 100 ? "atanh" : (type < 200
+ /* atanh(|x|>1) */
+ exc.type = DOMAIN;
+ exc.name = type < 100 ? "atanh" : (type < 200
? "atanhf" : "atanhl");
- exc.retval = zero/zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (EDOM);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("atanh: DOMAIN error\n", 20);
- }
- __set_errno (EDOM);
- }
- break;
- case 31:
+ exc.retval = zero/zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (EDOM);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2("atanh: DOMAIN error\n", 20);
+ }
+ __set_errno (EDOM);
+ }
+ break;
+ case 31:
case 131:
case 231:
- /* atanh(|x|=1) */
- exc.type = SING;
- exc.name = type < 100 ? "atanh" : (type < 200
+ /* atanh(|x|=1) */
+ exc.type = SING;
+ exc.name = type < 100 ? "atanh" : (type < 200
? "atanhf" : "atanhl");
exc.retval = x/zero; /* sign(x)*inf */
- if (_LIB_VERSION == _POSIX_)
- __set_errno (ERANGE);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2("atanh: SING error\n", 18);
- }
- __set_errno (EDOM);
- }
- break;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2("atanh: SING error\n", 18);
+ }
+ __set_errno (EDOM);
+ }
+ break;
case 32:
case 132:
case 232:
@@ -732,103 +728,103 @@ static double zero = 0.0; /* used as const */
case 134:
case 234:
/* j0(|x|>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "j0" : (type < 200 ? "j0f" : "j0l");
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (ERANGE);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- __set_errno (ERANGE);
- }
+ exc.type = TLOSS;
+ exc.name = type < 100 ? "j0" : (type < 200 ? "j0f" : "j0l");
+ exc.retval = zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ __set_errno (ERANGE);
+ }
break;
case 35:
case 135:
case 235:
/* y0(x>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "y0" : (type < 200 ? "y0f" : "y0l");
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (ERANGE);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- __set_errno (ERANGE);
- }
+ exc.type = TLOSS;
+ exc.name = type < 100 ? "y0" : (type < 200 ? "y0f" : "y0l");
+ exc.retval = zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ __set_errno (ERANGE);
+ }
break;
case 36:
case 136:
case 236:
/* j1(|x|>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "j1" : (type < 200 ? "j1f" : "j1l");
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (ERANGE);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- __set_errno (ERANGE);
- }
+ exc.type = TLOSS;
+ exc.name = type < 100 ? "j1" : (type < 200 ? "j1f" : "j1l");
+ exc.retval = zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ __set_errno (ERANGE);
+ }
break;
case 37:
case 137:
case 237:
/* y1(x>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "y1" : (type < 200 ? "y1f" : "y1l");
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (ERANGE);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- __set_errno (ERANGE);
- }
+ exc.type = TLOSS;
+ exc.name = type < 100 ? "y1" : (type < 200 ? "y1f" : "y1l");
+ exc.retval = zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ __set_errno (ERANGE);
+ }
break;
case 38:
case 138:
case 238:
/* jn(|x|>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "jn" : (type < 200 ? "jnf" : "jnl");
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (ERANGE);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- __set_errno (ERANGE);
- }
+ exc.type = TLOSS;
+ exc.name = type < 100 ? "jn" : (type < 200 ? "jnf" : "jnl");
+ exc.retval = zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ __set_errno (ERANGE);
+ }
break;
case 39:
case 139:
case 239:
/* yn(x>X_TLOSS) */
- exc.type = TLOSS;
- exc.name = type < 100 ? "yn" : (type < 200 ? "ynf" : "ynl");
- exc.retval = zero;
- if (_LIB_VERSION == _POSIX_)
- __set_errno (ERANGE);
- else if (!matherr(&exc)) {
- if (_LIB_VERSION == _SVID_) {
- (void) WRITE2(exc.name, 2);
- (void) WRITE2(": TLOSS error\n", 14);
- }
- __set_errno (ERANGE);
- }
+ exc.type = TLOSS;
+ exc.name = type < 100 ? "yn" : (type < 200 ? "ynf" : "ynl");
+ exc.retval = zero;
+ if (_LIB_VERSION == _POSIX_)
+ __set_errno (ERANGE);
+ else if (!matherr(&exc)) {
+ if (_LIB_VERSION == _SVID_) {
+ (void) WRITE2(exc.name, 2);
+ (void) WRITE2(": TLOSS error\n", 14);
+ }
+ __set_errno (ERANGE);
+ }
break;
case 40:
case 140:
@@ -838,11 +834,11 @@ static double zero = 0.0; /* used as const */
exc.name = type < 100 ? "tgamma" : (type < 200
? "tgammaf" : "tgammal");
exc.retval = HUGE_VAL;
- if (_LIB_VERSION == _POSIX_)
+ if (_LIB_VERSION == _POSIX_)
__set_errno (ERANGE);
- else if (!matherr(&exc)) {
- __set_errno (ERANGE);
- }
+ else if (!matherr(&exc)) {
+ __set_errno (ERANGE);
+ }
break;
case 41:
case 141:
@@ -995,3 +991,10 @@ static double zero = 0.0; /* used as const */
}
return exc.retval;
}
+
+
+float
+__kernel_standard_f(float x, float y, int type)
+{
+ return __kernel_standard(x, y, type);
+}
diff --git a/sysdeps/ieee754/ldbl-128/e_acoshl.c b/sysdeps/ieee754/ldbl-128/e_acoshl.c
index 62170d4c2d..2a74e9cd74 100644
--- a/sysdeps/ieee754/ldbl-128/e_acoshl.c
+++ b/sysdeps/ieee754/ldbl-128/e_acoshl.c
@@ -30,20 +30,12 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
one = 1.0,
ln2 = 0.6931471805599453094172321214581766L;
-#ifdef __STDC__
- long double __ieee754_acoshl(long double x)
-#else
- long double __ieee754_acoshl(x)
- long double x;
-#endif
+long double
+__ieee754_acoshl(long double x)
{
long double t;
u_int64_t lx;
@@ -53,7 +45,7 @@ ln2 = 0.6931471805599453094172321214581766L;
return (x-x)/(x-x);
} else if(hx >=0x4035000000000000LL) { /* x > 2**54 */
if(hx >=0x7fff000000000000LL) { /* x is inf of NaN */
- return x+x;
+ return x+x;
} else
return __ieee754_logl(x)+ln2; /* acoshl(huge)=logl(2x) */
} else if(((hx-0x3fff000000000000LL)|lx)==0) {
@@ -66,3 +58,4 @@ ln2 = 0.6931471805599453094172321214581766L;
return __log1pl(t+__sqrtl(2.0L*t+t*t));
}
}
+strong_alias (__ieee754_acoshl, __acoshl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_acosl.c b/sysdeps/ieee754/ldbl-128/e_acosl.c
index 284e86a527..a7503695ca 100644
--- a/sysdeps/ieee754/ldbl-128/e_acosl.c
+++ b/sysdeps/ieee754/ldbl-128/e_acosl.c
@@ -12,9 +12,9 @@
/*
Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -57,11 +57,7 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
one = 1.0L,
pio2_hi = 1.5707963267948966192313216916397514420986L,
pio2_lo = 4.3359050650618905123985220130216759843812E-35L,
@@ -152,14 +148,8 @@ static long double
qS8 = -4.175375777334867025769346564600396877176E1L;
/* 1.000000000000000000000000000000000000000E0 */
-#ifdef __STDC__
long double
__ieee754_acosl (long double x)
-#else
-long double
-__ieee754_acosl (x)
- long double x;
-#endif
{
long double z, r, w, p, q, s, t, f2;
int32_t ix, sign;
@@ -283,11 +273,11 @@ __ieee754_acosl (x)
s = __ieee754_sqrtl (z);
/* Compute an extended precision square root from
the Newton iteration s -> 0.5 * (s + z / s).
- The change w from s to the improved value is
+ The change w from s to the improved value is
w = 0.5 * (s + z / s) - s = (s^2 + z)/2s - s = (z - s^2)/2s.
- Express s = f1 + f2 where f1 * f1 is exactly representable.
+ Express s = f1 + f2 where f1 * f1 is exactly representable.
w = (z - s^2)/2s = (z - f1^2 - 2 f1 f2 - f2^2)/2s .
- s + w has extended precision. */
+ s + w has extended precision. */
u.value = s;
u.parts32.w2 = 0;
u.parts32.w3 = 0;
@@ -326,3 +316,4 @@ __ieee754_acosl (x)
return 2.0 * w;
}
}
+strong_alias (__ieee754_acosl, __acosl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_asinl.c b/sysdeps/ieee754/ldbl-128/e_asinl.c
index 89f5d79582..e82b03f6a7 100644
--- a/sysdeps/ieee754/ldbl-128/e_asinl.c
+++ b/sysdeps/ieee754/ldbl-128/e_asinl.c
@@ -12,9 +12,9 @@
/*
Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
- reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under the
+ and are incorporated herein by permission of the author. The author
+ reserves the right to distribute this material elsewhere under different
+ copying permissions. These modifications are distributed here under the
following terms:
This library is free software; you can redistribute it and/or
@@ -263,3 +263,4 @@ __ieee754_asinl (x)
else
return -t;
}
+strong_alias (__ieee754_asinl, __asinl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_atan2l.c b/sysdeps/ieee754/ldbl-128/e_atan2l.c
index 2bbb3b8f49..bba3c9bcf1 100644
--- a/sysdeps/ieee754/ldbl-128/e_atan2l.c
+++ b/sysdeps/ieee754/ldbl-128/e_atan2l.c
@@ -17,7 +17,7 @@
* Method :
* 1. Reduce y to positive by atan2l(y,x)=-atan2l(-y,x).
* 2. Reduce x to positive by (if x and y are unexceptional):
- * ARG (x+iy) = arctan(y/x) ... if x > 0,
+ * ARG (x+iy) = arctan(y/x) ... if x > 0,
* ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
*
* Special cases:
@@ -43,11 +43,7 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
tiny = 1.0e-4900L,
zero = 0.0,
pi_o_4 = 7.85398163397448309615660845819875699e-01L, /* 3ffe921fb54442d18469898cc51701b8 */
@@ -55,12 +51,8 @@ pi_o_2 = 1.57079632679489661923132169163975140e+00L, /* 3fff921fb54442d18469898
pi = 3.14159265358979323846264338327950280e+00L, /* 4000921fb54442d18469898cc51701b8 */
pi_lo = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74020bbea64 */
-#ifdef __STDC__
- long double __ieee754_atan2l(long double y, long double x)
-#else
- long double __ieee754_atan2l(y,x)
- long double y,x;
-#endif
+long double
+__ieee754_atan2l(long double y, long double x)
{
long double z;
int64_t k,m,hx,hy,ix,iy;
@@ -80,7 +72,7 @@ pi_lo = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74
if((iy|ly)==0) {
switch(m) {
case 0:
- case 1: return y; /* atan(+-0,+anything)=+-0 */
+ case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
}
@@ -111,19 +103,20 @@ pi_lo = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74
/* compute y/x */
k = (iy-ix)>>48;
- if(k > 120) z=pi_o_2+0.5L*pi_lo; /* |y/x| > 2**120 */
- else if(hx<0&&k<-120) z=0.0L; /* |y|/x < -2**120 */
+ if(k > 120) z=pi_o_2+0.5L*pi_lo; /* |y/x| > 2**120 */
+ else if(hx<0&&k<-120) z=0.0L; /* |y|/x < -2**120 */
else z=__atanl(fabsl(y/x)); /* safe to do y/x */
switch (m) {
case 0: return z ; /* atan(+,+) */
case 1: {
- u_int64_t zh;
+ u_int64_t zh;
GET_LDOUBLE_MSW64(zh,z);
SET_LDOUBLE_MSW64(z,zh ^ 0x8000000000000000ULL);
}
return z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
default: /* case 3 */
- return (z-pi_lo)-pi;/* atan(-,-) */
+ return (z-pi_lo)-pi;/* atan(-,-) */
}
}
+strong_alias (__ieee754_atan2l, __atan2l_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_atanhl.c b/sysdeps/ieee754/ldbl-128/e_atanhl.c
index dd681c847c..334c4bd701 100644
--- a/sysdeps/ieee754/ldbl-128/e_atanhl.c
+++ b/sysdeps/ieee754/ldbl-128/e_atanhl.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* __ieee754_atanhl(x)
* Method :
* 1.Reduced x to positive by atanh(-x) = -atanh(x)
@@ -26,7 +22,7 @@ static char rcsid[] = "$NetBSD: $";
* atanhl(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
* 2 1 - x 1 - x
*
- * For x<0.5
+ * For x<0.5
* atanhl(x) = 0.5*log1pl(2x+2x*x/(1-x))
*
* Special cases:
@@ -39,24 +35,12 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0L, huge = 1e4900L;
-#else
-static long double one = 1.0L, huge = 1e4900L;
-#endif
-#ifdef __STDC__
static const long double zero = 0.0L;
-#else
-static double long zero = 0.0L;
-#endif
-#ifdef __STDC__
- long double __ieee754_atanhl(long double x)
-#else
- long double __ieee754_atanhl(x)
- long double x;
-#endif
+long double
+__ieee754_atanhl(long double x)
{
long double t;
u_int32_t jx, ix;
@@ -82,3 +66,4 @@ static double long zero = 0.0L;
t = 0.5*__log1pl((u.value+u.value)/(one-u.value));
if(jx & 0x80000000) return -t; else return t;
}
+strong_alias (__ieee754_atanhl, __atanhl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_coshl.c b/sysdeps/ieee754/ldbl-128/e_coshl.c
index 3913e3479b..dfe8d47f9b 100644
--- a/sysdeps/ieee754/ldbl-128/e_coshl.c
+++ b/sysdeps/ieee754/ldbl-128/e_coshl.c
@@ -11,9 +11,9 @@
/* Changes for 128-bit long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -54,22 +54,11 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0, half = 0.5, huge = 1.0e4900L,
ovf_thresh = 1.1357216553474703894801348310092223067821E4L;
-#else
-static long double one = 1.0, half = 0.5, huge = 1.0e4900L,
-ovf_thresh = 1.1357216553474703894801348310092223067821E4L;
-#endif
-#ifdef __STDC__
long double
__ieee754_coshl (long double x)
-#else
-long double
-__ieee754_coshl (x)
- long double x;
-#endif
{
long double t, w;
int32_t ex;
@@ -118,3 +107,4 @@ __ieee754_coshl (x)
/* |x| > overflowthresold, cosh(x) overflow */
return huge * huge;
}
+strong_alias (__ieee754_coshl, __coshl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_expl.c b/sysdeps/ieee754/ldbl-128/e_expl.c
index 31ff16f8c0..0279e777ed 100644
--- a/sysdeps/ieee754/ldbl-128/e_expl.c
+++ b/sysdeps/ieee754/ldbl-128/e_expl.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point e^x.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
Partly based on double-precision code
@@ -73,7 +73,7 @@ static const long double C[] = {
/* Smallest integer x for which e^x overflows. */
#define himark C[0]
11356.523406294143949491931077970765L,
-
+
/* Largest integer x for which e^x underflows. */
#define lomark C[1]
-11433.4627433362978788372438434526231L,
@@ -247,3 +247,4 @@ __ieee754_expl (long double x)
/* Return x, if x is a NaN or Inf; or overflow, otherwise. */
return TWO16383*x;
}
+strong_alias (__ieee754_expl, __expl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_fmodl.c b/sysdeps/ieee754/ldbl-128/e_fmodl.c
index 1043f69cb3..05665a9c8b 100644
--- a/sysdeps/ieee754/ldbl-128/e_fmodl.c
+++ b/sysdeps/ieee754/ldbl-128/e_fmodl.c
@@ -3,16 +3,16 @@
*/
/*
* ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ * Copyright (C) 1993, 2011 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
-/*
+/*
* __ieee754_fmodl(x,y)
* Return x mod y in exact arithmetic
* Method: shift and subtract
@@ -21,18 +21,10 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0, Zero[] = {0.0, -0.0,};
-#else
-static long double one = 1.0, Zero[] = {0.0, -0.0,};
-#endif
-#ifdef __STDC__
- long double __ieee754_fmodl(long double x, long double y)
-#else
- long double __ieee754_fmodl(x,y)
- long double x,y;
-#endif
+long double
+__ieee754_fmodl (long double x, long double y)
{
int64_t n,hx,hy,hz,ix,iy,sx,i;
u_int64_t lx,ly,lz;
@@ -49,7 +41,7 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
return (x*y)/(x*y);
if(hx<=hy) {
if((hx<hy)||(lx<ly)) return x; /* |x|<|y| return x */
- if(lx==ly)
+ if(lx==ly)
return Zero[(u_int64_t)sx>>63]; /* |x|=|y| return x*0*/
}
@@ -72,25 +64,25 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
} else iy = (hy>>48)-0x3fff;
/* set up {hx,lx}, {hy,ly} and align y to x */
- if(ix >= -16382)
+ if(ix >= -16382)
hx = 0x0001000000000000LL|(0x0000ffffffffffffLL&hx);
else { /* subnormal x, shift x to normal */
n = -16382-ix;
if(n<=63) {
- hx = (hx<<n)|(lx>>(64-n));
- lx <<= n;
+ hx = (hx<<n)|(lx>>(64-n));
+ lx <<= n;
} else {
hx = lx<<(n-64);
lx = 0;
}
}
- if(iy >= -16382)
+ if(iy >= -16382)
hy = 0x0001000000000000LL|(0x0000ffffffffffffLL&hy);
else { /* subnormal y, shift y to normal */
n = -16382-iy;
if(n<=63) {
- hy = (hy<<n)|(ly>>(64-n));
- ly <<= n;
+ hy = (hy<<n)|(ly>>(64-n));
+ ly <<= n;
} else {
hy = ly<<(n-64);
ly = 0;
@@ -103,17 +95,17 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
else {
- if((hz|lz)==0) /* return sign(x)*0 */
+ if((hz|lz)==0) /* return sign(x)*0 */
return Zero[(u_int64_t)sx>>63];
- hx = hz+hz+(lz>>63); lx = lz+lz;
+ hx = hz+hz+(lz>>63); lx = lz+lz;
}
}
hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
if(hz>=0) {hx=hz;lx=lz;}
/* convert back to floating value and restore the sign */
- if((hx|lx)==0) /* return sign(x)*0 */
- return Zero[(u_int64_t)sx>>63];
+ if((hx|lx)==0) /* return sign(x)*0 */
+ return Zero[(u_int64_t)sx>>63];
while(hx<0x0001000000000000LL) { /* normalize x */
hx = hx+hx+(lx>>63); lx = lx+lx;
iy -= 1;
@@ -136,3 +128,4 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
}
return x; /* exact output */
}
+strong_alias (__ieee754_fmodl, __fmodl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_gammal_r.c b/sysdeps/ieee754/ldbl-128/e_gammal_r.c
index 36f5d45881..2dbe6acff9 100644
--- a/sysdeps/ieee754/ldbl-128/e_gammal_r.c
+++ b/sysdeps/ieee754/ldbl-128/e_gammal_r.c
@@ -1,8 +1,8 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997, 1999, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2002, 2004, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
- Jakub Jelinek <jj@ultra.linux.cz, 1999.
+ Jakub Jelinek <jj@ultra.linux.cz, 1999.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -56,3 +56,4 @@ __ieee754_gammal_r (long double x, int *signgamp)
/* XXX FIXME. */
return __ieee754_expl (__ieee754_lgammal_r (x, signgamp));
}
+strong_alias (__ieee754_gammal_r, __gammal_r_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_hypotl.c b/sysdeps/ieee754/ldbl-128/e_hypotl.c
index 6834eac59c..dad78fef1d 100644
--- a/sysdeps/ieee754/ldbl-128/e_hypotl.c
+++ b/sysdeps/ieee754/ldbl-128/e_hypotl.c
@@ -13,10 +13,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
-#endif
-
/* __ieee754_hypotl(x,y)
*
* Method :
@@ -45,19 +41,15 @@ static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
* hypotl(x,y) is NAN if x or y is NAN.
*
* Accuracy:
- * hypotl(x,y) returns sqrtl(x^2+y^2) with error less
- * than 1 ulps (units in the last place)
+ * hypotl(x,y) returns sqrtl(x^2+y^2) with error less
+ * than 1 ulps (units in the last place)
*/
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
- long double __ieee754_hypotl(long double x, long double y)
-#else
- long double __ieee754_hypotl(x,y)
- long double x, y;
-#endif
+long double
+__ieee754_hypotl(long double x, long double y)
{
long double a,b,t1,t2,y1,y2,w;
int64_t j,k,ha,hb;
@@ -89,7 +81,7 @@ static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
}
if(hb < 0x20bf000000000000LL) { /* b < 2**-8000 */
if(hb <= 0x0000ffffffffffffLL) { /* subnormal b or 0 */
- u_int64_t low;
+ u_int64_t low;
GET_LDOUBLE_LSW64(low,b);
if((hb|low)==0) return a;
t1=0;
@@ -98,7 +90,7 @@ static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
a *= t1;
k -= 16382;
} else { /* scale a and b by 2^9600 */
- ha += 0x2580000000000000LL; /* a *= 2^9600 */
+ ha += 0x2580000000000000LL; /* a *= 2^9600 */
hb += 0x2580000000000000LL; /* b *= 2^9600 */
k -= 9600;
SET_LDOUBLE_MSW64(a,ha);
@@ -130,3 +122,4 @@ static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
return t1*w;
} else return w;
}
+strong_alias (__ieee754_hypotl, __hypotl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_j0l.c b/sysdeps/ieee754/ldbl-128/e_j0l.c
index bcd57e2b06..ef718b9d70 100644
--- a/sysdeps/ieee754/ldbl-128/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j0l.c
@@ -779,6 +779,7 @@ __ieee754_j0l (long double x)
z = ONEOSQPI * (p * cc - q * ss) / __ieee754_sqrtl (xx);
return z;
}
+strong_alias (__ieee754_j0l, __j0l_finite)
/* Y0(x) = 2/pi * log(x) * J0(x) + R(x^2)
@@ -918,3 +919,4 @@ long double
z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (x);
return z;
}
+strong_alias (__ieee754_y0l, __y0l_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_j1l.c b/sysdeps/ieee754/ldbl-128/e_j1l.c
index 7b73e2e799..8d92b4f084 100644
--- a/sysdeps/ieee754/ldbl-128/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-128/e_j1l.c
@@ -786,6 +786,7 @@ __ieee754_j1l (long double x)
z = -z;
return z;
}
+strong_alias (__ieee754_j1l, __j1l_finite)
/* Y1(x) = 2/pi * (log(x) * J1(x) - 1/x) + x R(x^2)
@@ -925,3 +926,4 @@ __ieee754_y1l (long double x)
z = ONEOSQPI * (p * ss + q * cc) / __ieee754_sqrtl (xx);
return z;
}
+strong_alias (__ieee754_y1l, __y1l_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_jnl.c b/sysdeps/ieee754/ldbl-128/e_jnl.c
index a7f6772c08..81591634b1 100644
--- a/sysdeps/ieee754/ldbl-128/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-128/e_jnl.c
@@ -11,9 +11,9 @@
/* Modifications for 128-bit long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -59,26 +59,15 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
invsqrtpi = 5.6418958354775628694807945156077258584405E-1L,
two = 2.0e0L,
one = 1.0e0L,
zero = 0.0L;
-#ifdef __STDC__
long double
__ieee754_jnl (int n, long double x)
-#else
-long double
-__ieee754_jnl (n, x)
- int n;
- long double x;
-#endif
{
u_int32_t se;
int32_t i, ix, sgn;
@@ -302,16 +291,10 @@ __ieee754_jnl (n, x)
else
return b;
}
+strong_alias (__ieee754_jnl, __jnl_finite)
-#ifdef __STDC__
long double
__ieee754_ynl (int n, long double x)
-#else
-long double
-__ieee754_ynl (n, x)
- int n;
- long double x;
-#endif
{
u_int32_t se;
int32_t i, ix;
@@ -407,3 +390,4 @@ __ieee754_ynl (n, x)
else
return -b;
}
+strong_alias (__ieee754_ynl, __ynl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
index d080448476..2482296acf 100644
--- a/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
+++ b/sysdeps/ieee754/ldbl-128/e_lgammal_r.c
@@ -754,15 +754,8 @@ deval (long double x, const long double *p, int n)
}
-#ifdef __STDC__
long double
__ieee754_lgammal_r (long double x, int *signgamp)
-#else
-long double
-__ieee754_lgammal_r (x, signgamp)
- long double x;
- int *signgamp;
-#endif
{
long double p, q, w, z, nx;
int i, nn;
@@ -775,7 +768,7 @@ __ieee754_lgammal_r (x, signgamp)
if (x == 0.0L)
{
if (__signbitl (x))
- *signgamp = -1;
+ *signgamp = -1;
}
if (x < 0.0L)
@@ -863,7 +856,7 @@ __ieee754_lgammal_r (x, signgamp)
{
z = x - 0.75L;
p = z * neval (z, RN1r75, NRN1r75)
- / deval (z, RD1r75, NRD1r75);
+ / deval (z, RD1r75, NRD1r75);
p += lgam1r75b;
p += lgam1r75a;
}
@@ -1040,3 +1033,4 @@ __ieee754_lgammal_r (x, signgamp)
q += neval (p, RASY, NRASY) / x;
return (q);
}
+strong_alias (__ieee754_lgammal_r, __lgammal_r_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_log10l.c b/sysdeps/ieee754/ldbl-128/e_log10l.c
index 1213177a86..6e69bbd7b7 100644
--- a/sysdeps/ieee754/ldbl-128/e_log10l.c
+++ b/sysdeps/ieee754/ldbl-128/e_log10l.c
@@ -58,7 +58,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
@@ -179,8 +179,7 @@ deval (long double x, const long double *p, int n)
long double
-__ieee754_log10l (x)
- long double x;
+__ieee754_log10l (long double x)
{
long double z;
long double y;
@@ -256,3 +255,4 @@ done:
z += e * L102A;
return (z);
}
+strong_alias (__ieee754_log10l, __log10l_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_log2l.c b/sysdeps/ieee754/ldbl-128/e_log2l.c
index 8663d78b3f..9a02394eef 100644
--- a/sysdeps/ieee754/ldbl-128/e_log2l.c
+++ b/sysdeps/ieee754/ldbl-128/e_log2l.c
@@ -57,7 +57,7 @@
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "math.h"
@@ -248,3 +248,4 @@ done:
z += e;
return (z);
}
+strong_alias (__ieee754_log2l, __log2l_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_logl.c b/sysdeps/ieee754/ldbl-128/e_logl.c
index b9e17f8f95..6d532874c0 100644
--- a/sysdeps/ieee754/ldbl-128/e_logl.c
+++ b/sysdeps/ieee754/ldbl-128/e_logl.c
@@ -42,7 +42,7 @@
*
*/
-/* Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
+/* Copyright 2001 by Stephen L. Moshier <moshier@na-net.ornl.gov>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -251,7 +251,7 @@ __ieee754_logl(long double x)
/* log(u) = log( t u/t ) = log(t) + log(u/t)
log(t) is tabulated in the lookup table.
Express log(u/t) = log(1+z), where z = u/t - 1 = (u-t)/t.
- cf. Cody & Waite. */
+ cf. Cody & Waite. */
z = (u.value - t.value) / t.value;
}
/* Series expansion of log(1+z). */
@@ -277,3 +277,4 @@ __ieee754_logl(long double x)
y += e * ln2a;
return y;
}
+strong_alias (__ieee754_logl, __logl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_powl.c b/sysdeps/ieee754/ldbl-128/e_powl.c
index ba7e27b7d7..d8e1af03c6 100644
--- a/sysdeps/ieee754/ldbl-128/e_powl.c
+++ b/sysdeps/ieee754/ldbl-128/e_powl.c
@@ -11,9 +11,9 @@
/* Expansions and modifications for 128-bit long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -144,14 +144,8 @@ static const long double
cp_h = 9.6179669392597555432899980587535537779331E-1L,
cp_l = 5.0577616648125906047157785230014751039424E-17L;
-#ifdef __STDC__
long double
__ieee754_powl (long double x, long double y)
-#else
-long double
-__ieee754_powl (x, y)
- long double x, y;
-#endif
{
long double z, ax, z_h, z_l, p_h, p_l;
long double y1, t1, t2, r, s, t, u, v, w;
@@ -445,3 +439,4 @@ __ieee754_powl (x, y)
}
return s * z;
}
+strong_alias (__ieee754_powl, __powl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_remainderl.c b/sysdeps/ieee754/ldbl-128/e_remainderl.c
index 81af247b33..84233808ef 100644
--- a/sysdeps/ieee754/ldbl-128/e_remainderl.c
+++ b/sysdeps/ieee754/ldbl-128/e_remainderl.c
@@ -7,36 +7,28 @@
*
* Developed at SunPro, a Sun Microsystems, Inc. business.
* Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
+ * software is freely granted, provided that this notice
* is preserved.
* ====================================================
*/
/* __ieee754_remainderl(x,p)
- * Return :
- * returns x REM p = x - [x/p]*p as if in infinite
- * precise arithmetic, where [x/p] is the (infinite bit)
+ * Return :
+ * returns x REM p = x - [x/p]*p as if in infinite
+ * precise arithmetic, where [x/p] is the (infinite bit)
* integer nearest x/p (in half way case choose the even one).
- * Method :
+ * Method :
* Based on fmodl() return x-[x/p]chopped*p exactlp.
*/
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double zero = 0.0L;
-#else
-static long double zero = 0.0L;
-#endif
-#ifdef __STDC__
- long double __ieee754_remainderl(long double x, long double p)
-#else
- long double __ieee754_remainderl(x,p)
- long double x,p;
-#endif
+long double
+__ieee754_remainderl(long double x, long double p)
{
int64_t hx,hp;
u_int64_t sx,lx,lp;
@@ -49,7 +41,7 @@ static long double zero = 0.0L;
hx &= 0x7fffffffffffffffLL;
/* purge off exception values */
- if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
+ if((hp|lp)==0) return (x*p)/(x*p); /* p = 0 */
if((hx>=0x7fff000000000000LL)|| /* x not finite */
((hp>=0x7fff000000000000LL)&& /* p is NaN */
(((hp-0x7fff000000000000LL)|lp)!=0)))
@@ -76,3 +68,4 @@ static long double zero = 0.0L;
SET_LDOUBLE_MSW64(x,hx^sx);
return x;
}
+strong_alias (__ieee754_remainderl, __remainderl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/e_sinhl.c b/sysdeps/ieee754/ldbl-128/e_sinhl.c
index 93f4179c65..ac36cac5c7 100644
--- a/sysdeps/ieee754/ldbl-128/e_sinhl.c
+++ b/sysdeps/ieee754/ldbl-128/e_sinhl.c
@@ -16,9 +16,9 @@
/* Changes for 128-bit long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -56,22 +56,11 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0, shuge = 1.0e4931L,
ovf_thresh = 1.1357216553474703894801348310092223067821E4L;
-#else
-static long double one = 1.0, shuge = 1.0e4931L,
-ovf_thresh = 1.1357216553474703894801348310092223067821E4L;
-#endif
-#ifdef __STDC__
long double
__ieee754_sinhl (long double x)
-#else
-long double
-__ieee754_sinhl (x)
- long double x;
-#endif
{
long double t, w, h;
u_int32_t jx, ix;
@@ -121,3 +110,4 @@ __ieee754_sinhl (x)
/* |x| > overflowthreshold, sinhl(x) overflow */
return x * shuge;
}
+strong_alias (__ieee754_sinhl, __sinhl_finite)
diff --git a/sysdeps/ieee754/ldbl-128/s_isinf_nsl.c b/sysdeps/ieee754/ldbl-128/s_isinf_nsl.c
new file mode 100644
index 0000000000..1ebc1accbc
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128/s_isinf_nsl.c
@@ -0,0 +1,19 @@
+/*
+ * Written by Ulrich Drepper <drepper@gmail.com>
+ */
+
+/*
+ * __isinf_nsl(x) returns != 0 if x is ±inf, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+int
+__isinf_nsl (long double x)
+{
+ int64_t hx,lx;
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ return !(lx | ((hx & 0x7fffffffffffffffLL) ^ 0x7fff000000000000LL));
+}
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c b/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c
index 00576c76c8..20d94eaa1e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_acoshl.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $";
-#endif
-
/* __ieee754_acosh(x)
* Method :
* Based on
@@ -31,20 +27,12 @@ static char rcsid[] = "$NetBSD: e_acosh.c,v 1.9 1995/05/12 04:57:18 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
one = 1.0L,
ln2 = 6.93147180559945286227e-01L; /* 0x3FE62E42, 0xFEFA39EF */
-#ifdef __STDC__
- long double __ieee754_acoshl(long double x)
-#else
- long double __ieee754_acoshl(x)
- long double x;
-#endif
+long double
+__ieee754_acoshl(long double x)
{
long double t;
int64_t hx;
@@ -54,7 +42,7 @@ ln2 = 6.93147180559945286227e-01L; /* 0x3FE62E42, 0xFEFA39EF */
return (x-x)/(x-x);
} else if(hx >=0x41b0000000000000LL) { /* x > 2**28 */
if(hx >=0x7ff0000000000000LL) { /* x is inf of NaN */
- return x+x;
+ return x+x;
} else
return __ieee754_logl(x)+ln2; /* acosh(huge)=log(2x) */
} else if (((hx-0x3ff0000000000000LL)|(lx&0x7fffffffffffffffLL))==0) {
@@ -67,3 +55,4 @@ ln2 = 6.93147180559945286227e-01L; /* 0x3FE62E42, 0xFEFA39EF */
return __log1p(t+__sqrtl(2.0*t+t*t));
}
}
+strong_alias (__ieee754_acoshl, __acoshl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_acosl.c b/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
index 8823fd69b4..1b37c9220c 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_acosl.c
@@ -283,11 +283,11 @@ __ieee754_acosl (x)
s = __ieee754_sqrtl (z);
/* Compute an extended precision square root from
the Newton iteration s -> 0.5 * (s + z / s).
- The change w from s to the improved value is
+ The change w from s to the improved value is
w = 0.5 * (s + z / s) - s = (s^2 + z)/2s - s = (z - s^2)/2s.
- Express s = f1 + f2 where f1 * f1 is exactly representable.
+ Express s = f1 + f2 where f1 * f1 is exactly representable.
w = (z - s^2)/2s = (z - f1^2 - 2 f1 f2 - f2^2)/2s .
- s + w has extended precision. */
+ s + w has extended precision. */
u.value = s;
u.parts32.w2 = 0;
u.parts32.w3 = 0;
@@ -326,3 +326,4 @@ __ieee754_acosl (x)
return 2.0 * w;
}
}
+strong_alias (__ieee754_acosl, __acosl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c
index 3696694f78..6c61232c05 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_asinl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_asinl.c
@@ -12,9 +12,9 @@
/*
Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
- reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under the
+ and are incorporated herein by permission of the author. The author
+ reserves the right to distribute this material elsewhere under different
+ copying permissions. These modifications are distributed here under the
following terms:
This library is free software; you can redistribute it and/or
@@ -263,3 +263,4 @@ __ieee754_asinl (x)
else
return -t;
}
+strong_alias (__ieee754_asinl, __asinl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c b/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c
index a4bb53df04..a5b6621006 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_atan2l.c
@@ -17,7 +17,7 @@
* Method :
* 1. Reduce y to positive by atan2l(y,x)=-atan2l(-y,x).
* 2. Reduce x to positive by (if x and y are unexceptional):
- * ARG (x+iy) = arctan(y/x) ... if x > 0,
+ * ARG (x+iy) = arctan(y/x) ... if x > 0,
* ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
*
* Special cases:
@@ -43,11 +43,7 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
tiny = 1.0e-300L,
zero = 0.0,
pi_o_4 = 7.85398163397448309615660845819875699e-01L, /* 3ffe921fb54442d18469898cc51701b8 */
@@ -55,12 +51,8 @@ pi_o_2 = 1.57079632679489661923132169163975140e+00L, /* 3fff921fb54442d18469898
pi = 3.14159265358979323846264338327950280e+00L, /* 4000921fb54442d18469898cc51701b8 */
pi_lo = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74020bbea64 */
-#ifdef __STDC__
- long double __ieee754_atan2l(long double y, long double x)
-#else
- long double __ieee754_atan2l(y,x)
- long double y,x;
-#endif
+long double
+__ieee754_atan2l(long double y, long double x)
{
long double z;
int64_t k,m,hx,hy,ix,iy;
@@ -80,7 +72,7 @@ pi_lo = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74
if((iy|(ly&0x7fffffffffffffffLL))==0) {
switch(m) {
case 0:
- case 1: return y; /* atan(+-0,+anything)=+-0 */
+ case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
}
@@ -111,14 +103,15 @@ pi_lo = 8.67181013012378102479704402604335225e-35L; /* 3f8dcd129024e088a67cc74
/* compute y/x */
k = (iy-ix)>>52;
- if(k > 120) z=pi_o_2+0.5L*pi_lo; /* |y/x| > 2**120 */
- else if(hx<0&&k<-120) z=0.0L; /* |y|/x < -2**120 */
+ if(k > 120) z=pi_o_2+0.5L*pi_lo; /* |y/x| > 2**120 */
+ else if(hx<0&&k<-120) z=0.0L; /* |y|/x < -2**120 */
else z=__atanl(fabsl(y/x)); /* safe to do y/x */
switch (m) {
case 0: return z ; /* atan(+,+) */
case 1: return -z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
default: /* case 3 */
- return (z-pi_lo)-pi;/* atan(-,-) */
+ return (z-pi_lo)-pi;/* atan(-,-) */
}
}
+strong_alias (__ieee754_atan2l, __atan2l_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_atanhl.c b/sysdeps/ieee754/ldbl-128ibm/e_atanhl.c
index a801bd6f74..c879e4518e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_atanhl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_atanhl.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_atanh.c,v 1.8 1995/05/10 20:44:55 jtc Exp $";
-#endif
-
/* __ieee754_atanh(x)
* Method :
* 1.Reduced x to positive by atanh(-x) = -atanh(x)
@@ -22,7 +18,7 @@ static char rcsid[] = "$NetBSD: e_atanh.c,v 1.8 1995/05/10 20:44:55 jtc Exp $";
* atanh(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
* 2 1 - x 1 - x
*
- * For x<0.5
+ * For x<0.5
* atanh(x) = 0.5*log1p(2x+2x*x/(1-x))
*
* Special cases:
@@ -35,24 +31,12 @@ static char rcsid[] = "$NetBSD: e_atanh.c,v 1.8 1995/05/10 20:44:55 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0L, huge = 1e300L;
-#else
-static long double one = 1.0L, huge = 1e300L;
-#endif
-#ifdef __STDC__
static const long double zero = 0.0L;
-#else
-static long double zero = 0.0L;
-#endif
-#ifdef __STDC__
- long double __ieee754_atanhl(long double x)
-#else
- long double __ieee754_atanhl(x)
- long double x;
-#endif
+long double
+__ieee754_atanhl(long double x)
{
long double t;
int64_t hx,ix;
@@ -61,7 +45,7 @@ static long double zero = 0.0L;
ix = hx&0x7fffffffffffffffLL;
if (ix >= 0x3ff0000000000000LL) { /* |x|>=1 */
if (ix > 0x3ff0000000000000LL)
- return (x-x)/(x-x);
+ return (x-x)/(x-x);
t = fabsl (x);
if (t > one)
return (x-x)/(x-x);
@@ -77,3 +61,4 @@ static long double zero = 0.0L;
t = 0.5*__log1pl((x+x)/(one-x));
if(hx>=0) return t; else return -t;
}
+strong_alias (__ieee754_atanhl, __atanhl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_coshl.c b/sysdeps/ieee754/ldbl-128ibm/e_coshl.c
index 73cb47892f..ebc9436396 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_coshl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_coshl.c
@@ -10,22 +10,18 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $";
-#endif
-
/* __ieee754_cosh(x)
* Method :
* mathematically cosh(x) if defined to be (exp(x)+exp(-x))/2
* 1. Replace x by |x| (cosh(x) = cosh(-x)).
* 2.
- * [ exp(x) - 1 ]^2
+ * [ exp(x) - 1 ]^2
* 0 <= x <= ln2/2 : cosh(x) := 1 + -------------------
- * 2*exp(x)
+ * 2*exp(x)
*
- * exp(x) + 1/exp(x)
+ * exp(x) + 1/exp(x)
* ln2/2 <= x <= 22 : cosh(x) := -------------------
- * 2
+ * 2
* 22 <= x <= lnovft : cosh(x) := exp(x)/2
* lnovft <= x <= ln2ovft: cosh(x) := exp(x/2)/2 * exp(x/2)
* ln2ovft < x : cosh(x) := huge*huge (overflow)
@@ -38,18 +34,10 @@ static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0L, half=0.5L, huge = 1.0e300L;
-#else
-static long double one = 1.0L, half=0.5L, huge = 1.0e300L;
-#endif
-#ifdef __STDC__
- long double __ieee754_coshl(long double x)
-#else
- long double __ieee754_coshl(x)
- long double x;
-#endif
+long double
+__ieee754_coshl (long double x)
{
long double t,w;
int64_t ix;
@@ -79,7 +67,7 @@ static long double one = 1.0L, half=0.5L, huge = 1.0e300L;
if (ix < 0x40862e42fefa39efLL) return half*__ieee754_expl(fabsl(x));
/* |x| in [log(maxdouble), overflowthresold] */
- if (ix < 0x408633ce8fb9f87dLL) {
+ if (ix < 0x408633ce8fb9f87dLL) {
w = __ieee754_expl(half*fabsl(x));
t = half*w;
return t*w;
@@ -88,3 +76,4 @@ static long double one = 1.0L, half=0.5L, huge = 1.0e300L;
/* |x| > overflowthresold, cosh(x) overflow */
return huge*huge;
}
+strong_alias (__ieee754_coshl, __coshl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_expl.c b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
index daf2cba323..9e03eae23e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_expl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_expl.c
@@ -1,5 +1,5 @@
/* Quad-precision floating point e^x.
- Copyright (C) 1999,2004,2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1999,2004,2006, 2008, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jj@ultra.linux.cz>
Partly based on double-precision code
@@ -255,3 +255,4 @@ __ieee754_expl (long double x)
/* Return x, if x is a NaN or Inf; or overflow, otherwise. */
return TWO1023*x;
}
+strong_alias (__ieee754_expl, __expl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c b/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c
index e99b0bac34..4ad59a0916 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_fmodl.c
@@ -22,18 +22,10 @@
#include "math_private.h"
#include <ieee754.h>
-#ifdef __STDC__
static const long double one = 1.0, Zero[] = {0.0, -0.0,};
-#else
-static long double one = 1.0, Zero[] = {0.0, -0.0,};
-#endif
-#ifdef __STDC__
- long double __ieee754_fmodl(long double x, long double y)
-#else
- long double __ieee754_fmodl(x,y)
- long double x,y;
-#endif
+long double
+__ieee754_fmodl (long double x, long double y)
{
int64_t n,hx,hy,hz,ix,iy,sx,i;
u_int64_t lx,ly,lz;
@@ -76,8 +68,8 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
/* Make the IBM extended format 105 bit mantissa look like the ieee854 112
bit mantissa so the following operatations will give the correct
result. */
- ldbl_extract_mantissa(&hx, &lx, &temp, x);
- ldbl_extract_mantissa(&hy, &ly, &temp, y);
+ ldbl_extract_mantissa(&hx, &lx, &temp, x);
+ ldbl_extract_mantissa(&hy, &ly, &temp, y);
/* set up {hx,lx}, {hy,ly} and align y to x */
if(ix >= -1022)
@@ -85,8 +77,8 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
else { /* subnormal x, shift x to normal */
n = -1022-ix;
if(n<=63) {
- hx = (hx<<n)|(lx>>(64-n));
- lx <<= n;
+ hx = (hx<<n)|(lx>>(64-n));
+ lx <<= n;
} else {
hx = lx<<(n-64);
lx = 0;
@@ -97,8 +89,8 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
else { /* subnormal y, shift y to normal */
n = -1022-iy;
if(n<=63) {
- hy = (hy<<n)|(ly>>(64-n));
- ly <<= n;
+ hy = (hy<<n)|(ly>>(64-n));
+ ly <<= n;
} else {
hy = ly<<(n-64);
ly = 0;
@@ -111,16 +103,16 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
if(hz<0){hx = hx+hx+(lx>>63); lx = lx+lx;}
else {
- if((hz|(lz&0x7fffffffffffffff))==0) /* return sign(x)*0 */
+ if((hz|(lz&0x7fffffffffffffff))==0) /* return sign(x)*0 */
return Zero[(u_int64_t)sx>>63];
- hx = hz+hz+(lz>>63); lx = lz+lz;
+ hx = hz+hz+(lz>>63); lx = lz+lz;
}
}
hz=hx-hy;lz=lx-ly; if(lx<ly) hz -= 1;
if(hz>=0) {hx=hz;lx=lz;}
/* convert back to floating value and restore the sign */
- if((hx|(lx&0x7fffffffffffffff))==0) /* return sign(x)*0 */
+ if((hx|(lx&0x7fffffffffffffff))==0) /* return sign(x)*0 */
return Zero[(u_int64_t)sx>>63];
while(hx<0x0001000000000000LL) { /* normalize x */
hx = hx+hx+(lx>>63); lx = lx+lx;
@@ -143,3 +135,4 @@ static long double one = 1.0, Zero[] = {0.0, -0.0,};
}
return x; /* exact output */
}
+strong_alias (__ieee754_fmodl, __fmodl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c b/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c
index 03bcb2129a..f20ea9e057 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c
@@ -1,8 +1,8 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997,1999,2002,2004,2006 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2002,2004,2006,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997 and
- Jakub Jelinek <jj@ultra.linux.cz, 1999.
+ Jakub Jelinek <jj@ultra.linux.cz, 1999.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -56,3 +56,4 @@ __ieee754_gammal_r (long double x, int *signgamp)
/* XXX FIXME. */
return __ieee754_expl (__ieee754_lgammal_r (x, signgamp));
}
+strong_alias (__ieee754_gammal_r, __gammal_r_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c b/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c
index 4330f28b93..4ef076741f 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_hypotl.c
@@ -10,10 +10,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
-#endif
-
/* __ieee754_hypotl(x,y)
*
* Method :
@@ -42,8 +38,8 @@ static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
* hypotl(x,y) is NAN if x or y is NAN.
*
* Accuracy:
- * hypotl(x,y) returns sqrtl(x^2+y^2) with error less
- * than 1 ulps (units in the last place)
+ * hypotl(x,y) returns sqrtl(x^2+y^2) with error less
+ * than 1 ulps (units in the last place)
*/
#include "math.h"
@@ -52,12 +48,8 @@ static char rcsid[] = "$NetBSD: e_hypotl.c,v 1.9 1995/05/12 04:57:27 jtc Exp $";
static const long double two600 = 0x1.0p+600L;
static const long double two1022 = 0x1.0p+1022L;
-#ifdef __STDC__
- long double __ieee754_hypotl(long double x, long double y)
-#else
- long double __ieee754_hypotl(x,y)
- long double x, y;
-#endif
+long double
+__ieee754_hypotl(long double x, long double y)
{
long double a,b,t1,t2,y1,y2,w,kld;
int64_t j,k,ha,hb;
@@ -93,7 +85,7 @@ static const long double two1022 = 0x1.0p+1022L;
}
if(hb < 0x20b0000000000000LL) { /* b < 2**-500 */
if(hb <= 0x000fffffffffffffLL) { /* subnormal b or 0 */
- u_int64_t low;
+ u_int64_t low;
GET_LDOUBLE_LSW64(low,b);
if((hb|(low&0x7fffffffffffffffLL))==0) return a;
t1=two1022; /* t1=2^1022 */
@@ -102,7 +94,7 @@ static const long double two1022 = 0x1.0p+1022L;
k -= 1022;
kld = kld / two1022;
} else { /* scale a and b by 2^600 */
- ha += 0x2580000000000000LL; /* a *= 2^600 */
+ ha += 0x2580000000000000LL; /* a *= 2^600 */
hb += 0x2580000000000000LL; /* b *= 2^600 */
k -= 600;
a *= two600;
@@ -129,3 +121,4 @@ static const long double two1022 = 0x1.0p+1022L;
else
return w;
}
+strong_alias (__ieee754_hypotl, __hypotl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
index 372f942bfc..2114753f83 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_jnl.c
@@ -303,6 +303,7 @@ __ieee754_jnl (n, x)
else
return b;
}
+strong_alias (__ieee754_jnl, __jnl_finite)
#ifdef __STDC__
long double
@@ -409,3 +410,4 @@ __ieee754_ynl (n, x)
else
return -b;
}
+strong_alias (__ieee754_ynl, __ynl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_log10l.c b/sysdeps/ieee754/ldbl-128ibm/e_log10l.c
index 27e2c71b8d..de57be39d9 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_log10l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_log10l.c
@@ -179,8 +179,7 @@ deval (long double x, const long double *p, int n)
long double
-__ieee754_log10l (x)
- long double x;
+__ieee754_log10l (long double x)
{
long double z;
long double y;
@@ -256,3 +255,4 @@ done:
z += e * L102A;
return (z);
}
+strong_alias (__ieee754_log10l, __log10l_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_log2l.c b/sysdeps/ieee754/ldbl-128ibm/e_log2l.c
index fe8a8e1d6c..9737e13f0e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_log2l.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_log2l.c
@@ -248,3 +248,4 @@ done:
z += e;
return (z);
}
+strong_alias (__ieee754_log2l, __log2l_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_logl.c b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
index aa5fc3740f..6832608069 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_logl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_logl.c
@@ -253,7 +253,7 @@ __ieee754_logl(long double x)
/* log(u) = log( t u/t ) = log(t) + log(u/t)
log(t) is tabulated in the lookup table.
Express log(u/t) = log(1+z), where z = u/t - 1 = (u-t)/t.
- cf. Cody & Waite. */
+ cf. Cody & Waite. */
z = (u.value - t.value) / t.value;
}
/* Series expansion of log(1+z). */
@@ -279,3 +279,4 @@ __ieee754_logl(long double x)
y += e * ln2a;
return y;
}
+strong_alias (__ieee754_logl, __logl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_powl.c b/sysdeps/ieee754/ldbl-128ibm/e_powl.c
index feeaa8ce21..9b1f2be1d0 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_powl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_powl.c
@@ -144,14 +144,8 @@ static const long double
cp_h = 9.6179669392597555432899980587535537779331E-1L,
cp_l = 5.0577616648125906047157785230014751039424E-17L;
-#ifdef __STDC__
long double
__ieee754_powl (long double x, long double y)
-#else
-long double
-__ieee754_powl (x, y)
- long double x, y;
-#endif
{
long double z, ax, z_h, z_l, p_h, p_l;
long double y1, t1, t2, r, s, t, u, v, w;
@@ -390,7 +384,7 @@ __ieee754_powl (x, y)
{
/* if z > 16384 */
if (((j - 0x40d00000) | o.parts32.w1
- | (o.parts32.w2 & 0x7fffffff) | o.parts32.w3) != 0)
+ | (o.parts32.w2 & 0x7fffffff) | o.parts32.w3) != 0)
return s * huge * huge; /* overflow */
else
{
@@ -402,7 +396,7 @@ __ieee754_powl (x, y)
{
/* z < -16495 */
if (((j - 0xc0d01bc0) | o.parts32.w1
- | (o.parts32.w2 & 0x7fffffff) | o.parts32.w3) != 0)
+ | (o.parts32.w2 & 0x7fffffff) | o.parts32.w3) != 0)
return s * tiny * tiny; /* underflow */
else
{
@@ -439,3 +433,4 @@ __ieee754_powl (x, y)
z = __scalbnl (z, n);
return s * z;
}
+strong_alias (__ieee754_powl, __powl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c b/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
index b7fa68f32a..d4a847dbed 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
@@ -14,8 +14,8 @@
/* __ieee754_remainderl(x,p)
* Return :
- * returns x REM p = x - [x/p]*p as if in infinite
- * precise arithmetic, where [x/p] is the (infinite bit)
+ * returns x REM p = x - [x/p]*p as if in infinite
+ * precise arithmetic, where [x/p] is the (infinite bit)
* integer nearest x/p (in half way case choose the even one).
* Method :
* Based on fmodl() return x-[x/p]chopped*p exactlp.
@@ -24,19 +24,11 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double zero = 0.0L;
-#else
-static long double zero = 0.0L;
-#endif
-#ifdef __STDC__
- long double __ieee754_remainderl(long double x, long double p)
-#else
- long double __ieee754_remainderl(x,p)
- long double x,p;
-#endif
+long double
+__ieee754_remainderl(long double x, long double p)
{
int64_t hx,hp;
u_int64_t sx,lx,lp;
@@ -49,7 +41,7 @@ static long double zero = 0.0L;
hx &= 0x7fffffffffffffffLL;
/* purge off exception values */
- if((hp|(lp&0x7fffffffffffffff))==0) return (x*p)/(x*p); /* p = 0 */
+ if((hp|(lp&0x7fffffffffffffff))==0) return (x*p)/(x*p); /* p = 0 */
if((hx>=0x7ff0000000000000LL)|| /* x not finite */
((hp>=0x7ff0000000000000LL)&& /* p is NaN */
(((hp-0x7ff0000000000000LL)|lp)!=0)))
@@ -76,3 +68,4 @@ static long double zero = 0.0L;
SET_LDOUBLE_MSW64(x,hx^sx);
return x;
}
+strong_alias (__ieee754_remainderl, __remainderl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
index 38ae71d4b7..b8e86b1a6b 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_sinhl.c
@@ -10,18 +10,14 @@
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: e_sinh.c,v 1.7 1995/05/10 20:46:13 jtc Exp $";
-#endif
-
/* __ieee754_sinh(x)
* Method :
* mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
* 1. Replace x by |x| (sinh(-x) = -sinh(x)).
* 2.
- * E + E/(E+1)
+ * E + E/(E+1)
* 0 <= x <= 22 : sinh(x) := --------------, E=expm1(x)
- * 2
+ * 2
*
* 22 <= x <= lnovft : sinh(x) := exp(x)/2
* lnovft <= x <= ln2ovft: sinh(x) := exp(x/2)/2 * exp(x/2)
@@ -35,18 +31,10 @@ static char rcsid[] = "$NetBSD: e_sinh.c,v 1.7 1995/05/10 20:46:13 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0, shuge = 1.0e307;
-#else
-static long double one = 1.0, shuge = 1.0e307;
-#endif
-#ifdef __STDC__
- long double __ieee754_sinhl(long double x)
-#else
- long double __ieee754_sinhl(x)
- long double x;
-#endif
+long double
+__ieee754_sinhl(long double x)
{
long double t,w,h;
int64_t ix,jx;
@@ -62,7 +50,7 @@ static long double one = 1.0, shuge = 1.0e307;
if (jx<0) h = -h;
/* |x| in [0,22], return sign(x)*0.5*(E+E/(E+1))) */
if (ix < 0x4036000000000000LL) { /* |x|<22 */
- if (ix<0x3e20000000000000LL) /* |x|<2**-29 */
+ if (ix<0x3e20000000000000LL) /* |x|<2**-29 */
if(shuge+x>one) return x;/* sinhl(tiny) = tiny with inexact */
t = __expm1l(fabsl(x));
if(ix<0x3ff0000000000000LL) return h*(2.0*t-t*t/(t+one));
@@ -82,3 +70,4 @@ static long double one = 1.0, shuge = 1.0e307;
/* |x| > overflowthresold, sinh(x) overflow */
return x*shuge;
}
+strong_alias (__ieee754_sinhl, __sinhl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c b/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
index fe6bb55b07..68aa18f554 100644
--- a/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/e_sqrtl.c
@@ -1,7 +1,7 @@
/*
* IBM Accurate Mathematical Library
* written by International Business Machines Corp.
- * Copyright (C) 2001, 2004, 2006 Free Software Foundation
+ * Copyright (C) 2001, 2004, 2006, 2011 Free Software Foundation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@@ -50,7 +50,7 @@ twom54 = 5.55111512312578270212e-17; /* 0x3C90000000000000 */
/* it computes the correctly rounded (to nearest) value of square */
/* root of x. */
/*********************************************************************/
-long double __ieee754_sqrtl(long double x)
+long double __ieee754_sqrtl(long double x)
{
static const long double big = 134217728.0, big1 = 134217729.0;
long double t,s,i;
@@ -107,3 +107,4 @@ long double __ieee754_sqrtl(long double x)
return tm256.x*__ieee754_sqrtl(x*t512.x);
}
}
+strong_alias (__ieee754_sqrtl, __sqrtl_finite)
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_atanl.c b/sysdeps/ieee754/ldbl-128ibm/s_atanl.c
index b6195f10be..db31e4f90e 100644
--- a/sysdeps/ieee754/ldbl-128ibm/s_atanl.c
+++ b/sysdeps/ieee754/ldbl-128ibm/s_atanl.c
@@ -59,6 +59,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <math.h>
#include "math_private.h"
#include <math_ldbl_opt.h>
diff --git a/sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c b/sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c
new file mode 100644
index 0000000000..edeaba5f7c
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-128ibm/s_isinf_nsl.c
@@ -0,0 +1,16 @@
+/*
+ * __isinf_nsl(x) returns != 0 if x is ±inf, else 0;
+ * no branching!
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+int
+__isinf_nsl (long double x)
+{
+ int64_t hx,lx;
+ GET_LDOUBLE_WORDS64(hx,lx,x);
+ return !((lx & 0x7fffffffffffffffLL)
+ | ((hx & 0x7fffffffffffffffLL) ^ 0x7ff0000000000000LL));
+}
diff --git a/sysdeps/ieee754/ldbl-96/e_acoshl.c b/sysdeps/ieee754/ldbl-96/e_acoshl.c
index 5d4fa1deda..29004ec267 100644
--- a/sysdeps/ieee754/ldbl-96/e_acoshl.c
+++ b/sysdeps/ieee754/ldbl-96/e_acoshl.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* __ieee754_acoshl(x)
* Method :
* Based on
@@ -35,20 +31,12 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
one = 1.0,
ln2 = 6.931471805599453094287e-01L; /* 0x3FFE, 0xB17217F7, 0xD1CF79AC */
-#ifdef __STDC__
- long double __ieee754_acoshl(long double x)
-#else
- long double __ieee754_acoshl(x)
- long double x;
-#endif
+long double
+__ieee754_acoshl(long double x)
{
long double t;
u_int32_t se,i0,i1;
@@ -57,7 +45,7 @@ ln2 = 6.931471805599453094287e-01L; /* 0x3FFE, 0xB17217F7, 0xD1CF79AC */
return (x-x)/(x-x);
} else if(se >=0x401d) { /* x > 2**30 */
if(se >=0x7fff) { /* x is inf of NaN */
- return x+x;
+ return x+x;
} else
return __ieee754_logl(x)+ln2; /* acoshl(huge)=logl(2x) */
} else if(((se-0x3fff)|i0|i1)==0) {
@@ -67,6 +55,7 @@ ln2 = 6.931471805599453094287e-01L; /* 0x3FFE, 0xB17217F7, 0xD1CF79AC */
return __ieee754_logl(2.0*x-one/(x+__ieee754_sqrtl(t-one)));
} else { /* 1<x<2 */
t = x-one;
- return __log1pl(t+__sqrtl(2.0*t+t*t));
+ return __log1pl(t+__ieee754_sqrtl(2.0*t+t*t));
}
}
+strong_alias (__ieee754_acoshl, __acoshl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_asinl.c b/sysdeps/ieee754/ldbl-96/e_asinl.c
index 1cad623d43..d813039311 100644
--- a/sysdeps/ieee754/ldbl-96/e_asinl.c
+++ b/sysdeps/ieee754/ldbl-96/e_asinl.c
@@ -12,9 +12,9 @@
/*
Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -45,7 +45,7 @@
* = pio2_hi - (2*(s+s*z*R(z)) - pio2_lo)
* For x<=0.98, let pio4_hi = pio2_hi/2, then
* f = hi part of s;
- * c = sqrt(z) - f = (z-f*f)/(s+f) ...f+c=sqrt(z)
+ * c = sqrt(z) - f = (z-f*f)/(s+f) ...f+c=sqrt(z)
* and
* asin(x) = pi/2 - 2*(s+s*z*R(z))
* = pio4_hi+(pio4-2s)-(2s*z*R(z)-pio2_lo)
@@ -159,3 +159,4 @@ __ieee754_asinl (x)
else
return -t;
}
+strong_alias (__ieee754_asinl, __asinl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_atan2l.c b/sysdeps/ieee754/ldbl-96/e_atan2l.c
index 0759458c2f..535d0d6123 100644
--- a/sysdeps/ieee754/ldbl-96/e_atan2l.c
+++ b/sysdeps/ieee754/ldbl-96/e_atan2l.c
@@ -14,15 +14,11 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* __ieee754_atan2l(y,x)
* Method :
* 1. Reduce y to positive by atan2(y,x)=-atan2(-y,x).
* 2. Reduce x to positive by (if x and y are unexceptional):
- * ARG (x+iy) = arctan(y/x) ... if x > 0,
+ * ARG (x+iy) = arctan(y/x) ... if x > 0,
* ARG (x+iy) = pi - arctan[y/(-x)] ... if x < 0,
*
* Special cases:
@@ -48,11 +44,7 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
tiny = 1.0e-4900L,
zero = 0.0,
pi_o_4 = 7.85398163397448309628202E-01L, /* 0x3FFE, 0xC90FDAA2, 0x2168C235 */
@@ -60,12 +52,8 @@ pi_o_2 = 1.5707963267948966192564E+00L, /* 0x3FFF, 0xC90FDAA2, 0x2168C235 */
pi = 3.14159265358979323851281E+00L, /* 0x4000, 0xC90FDAA2, 0x2168C235 */
pi_lo = -5.01655761266833202345176e-20L;/* 0xBFBE, 0xECE675D1, 0xFC8F8CBB */
-#ifdef __STDC__
- long double __ieee754_atan2l(long double y, long double x)
-#else
- long double __ieee754_atan2l(y,x)
- long double y,x;
-#endif
+long double
+__ieee754_atan2l (long double y, long double x)
{
long double z;
int32_t k,m,hx,hy,ix,iy;
@@ -87,7 +75,7 @@ pi_lo = -5.01655761266833202345176e-20L;/* 0xBFBE, 0xECE675D1, 0xFC8F8CBB */
if((iy|ly)==0) {
switch(m) {
case 0:
- case 1: return y; /* atan(+-0,+anything)=+-0 */
+ case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
}
@@ -118,19 +106,20 @@ pi_lo = -5.01655761266833202345176e-20L;/* 0xBFBE, 0xECE675D1, 0xFC8F8CBB */
/* compute y/x */
k = sy-sx;
- if(k > 70) z=pi_o_2+0.5*pi_lo; /* |y/x| > 2**70 */
- else if(sx>=0x8000&&k<-70) z=0.0; /* |y|/x < -2**70 */
+ if(k > 70) z=pi_o_2+0.5*pi_lo; /* |y/x| > 2**70 */
+ else if(sx>=0x8000&&k<-70) z=0.0; /* |y|/x < -2**70 */
else z=__atanl(fabsl(y/x)); /* safe to do y/x */
switch (m) {
case 0: return z ; /* atan(+,+) */
case 1: {
- u_int32_t sz;
+ u_int32_t sz;
GET_LDOUBLE_EXP(sz,z);
SET_LDOUBLE_EXP(z,sz ^ 0x8000);
}
return z ; /* atan(-,+) */
case 2: return pi-(z-pi_lo);/* atan(+,-) */
default: /* case 3 */
- return (z-pi_lo)-pi;/* atan(-,-) */
+ return (z-pi_lo)-pi;/* atan(-,-) */
}
}
+strong_alias (__ieee754_atan2l, __atan2l_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_atanhl.c b/sysdeps/ieee754/ldbl-96/e_atanhl.c
index fdcd1e9fe8..0f3c7fb596 100644
--- a/sysdeps/ieee754/ldbl-96/e_atanhl.c
+++ b/sysdeps/ieee754/ldbl-96/e_atanhl.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* __ieee754_atanhl(x)
* Method :
* 1.Reduced x to positive by atanh(-x) = -atanh(x)
@@ -26,7 +22,7 @@ static char rcsid[] = "$NetBSD: $";
* atanhl(x) = --- * log(1 + -------) = 0.5 * log1p(2 * --------)
* 2 1 - x 1 - x
*
- * For x<0.5
+ * For x<0.5
* atanhl(x) = 0.5*log1pl(2x+2x*x/(1-x))
*
* Special cases:
@@ -39,24 +35,12 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0, huge = 1e4900L;
-#else
-static long double one = 1.0, huge = 1e4900L;
-#endif
-#ifdef __STDC__
static const long double zero = 0.0;
-#else
-static double long zero = 0.0;
-#endif
-#ifdef __STDC__
- long double __ieee754_atanhl(long double x)
-#else
- long double __ieee754_atanhl(x)
- long double x;
-#endif
+long double
+__ieee754_atanhl(long double x)
{
long double t;
int32_t ix;
@@ -68,7 +52,10 @@ static double long zero = 0.0;
return (x-x)/(x-x);
if(ix==0x3fff)
return x/zero;
- if(ix<0x3fe3&&(huge+x)>zero) return x; /* x<2**-28 */
+ if(ix<0x3fe3) {
+ math_force_eval(huge+x);
+ return x; /* x<2**-28 */
+ }
SET_LDOUBLE_EXP(x,ix);
if(ix<0x3ffe) { /* x < 0.5 */
t = x+x;
@@ -77,3 +64,4 @@ static double long zero = 0.0;
t = 0.5*__log1pl((x+x)/(one-x));
if(se<=0x7fff) return t; else return -t;
}
+strong_alias (__ieee754_atanhl, __atanhl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_coshl.c b/sysdeps/ieee754/ldbl-96/e_coshl.c
index 8c38fa4da2..6113f0719f 100644
--- a/sysdeps/ieee754/ldbl-96/e_coshl.c
+++ b/sysdeps/ieee754/ldbl-96/e_coshl.c
@@ -18,13 +18,13 @@ static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $";
* mathematically coshl(x) if defined to be (exp(x)+exp(-x))/2
* 1. Replace x by |x| (coshl(x) = coshl(-x)).
* 2.
- * [ exp(x) - 1 ]^2
+ * [ exp(x) - 1 ]^2
* 0 <= x <= ln2/2 : coshl(x) := 1 + -------------------
- * 2*exp(x)
+ * 2*exp(x)
*
- * exp(x) + 1/exp(x)
+ * exp(x) + 1/exp(x)
* ln2/2 <= x <= 22 : coshl(x) := -------------------
- * 2
+ * 2
* 22 <= x <= lnovft : coshl(x) := expl(x)/2
* lnovft <= x <= ln2ovft: coshl(x) := expl(x/2)/2 * expl(x/2)
* ln2ovft < x : coshl(x) := huge*huge (overflow)
@@ -37,18 +37,10 @@ static char rcsid[] = "$NetBSD: e_cosh.c,v 1.7 1995/05/10 20:44:58 jtc Exp $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0, half=0.5, huge = 1.0e4900L;
-#else
-static long double one = 1.0, half=0.5, huge = 1.0e4900L;
-#endif
-#ifdef __STDC__
- long double __ieee754_coshl(long double x)
-#else
- long double __ieee754_coshl(x)
- long double x;
-#endif
+long double
+__ieee754_coshl (long double x)
{
long double t,w;
int32_t ex;
@@ -58,19 +50,17 @@ static long double one = 1.0, half=0.5, huge = 1.0e4900L;
GET_LDOUBLE_WORDS(ex,mx,lx,x);
ex &= 0x7fff;
- /* x is INF or NaN */
- if(ex==0x7fff) return x*x;
-
- /* |x| in [0,0.5*ln2], return 1+expm1l(|x|)^2/(2*expl(|x|)) */
- if(ex < 0x3ffd || (ex == 0x3ffd && mx < 0xb17217f7u)) {
- t = __expm1l(fabsl(x));
- w = one+t;
- if (ex<0x3fbc) return w; /* cosh(tiny) = 1 */
- return one+(t*t)/(w+w);
- }
-
- /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
+ /* |x| in [0,22] */
if (ex < 0x4003 || (ex == 0x4003 && mx < 0xb0000000u)) {
+ /* |x| in [0,0.5*ln2], return 1+expm1l(|x|)^2/(2*expl(|x|)) */
+ if(ex < 0x3ffd || (ex == 0x3ffd && mx < 0xb17217f7u)) {
+ t = __expm1l(fabsl(x));
+ w = one+t;
+ if (ex<0x3fbc) return w; /* cosh(tiny) = 1 */
+ return one+(t*t)/(w+w);
+ }
+
+ /* |x| in [0.5*ln2,22], return (exp(|x|)+1/exp(|x|)/2; */
t = __ieee754_expl(fabsl(x));
return half*t+half/t;
}
@@ -88,6 +78,10 @@ static long double one = 1.0, half=0.5, huge = 1.0e4900L;
return t*w;
}
+ /* x is INF or NaN */
+ if(ex==0x7fff) return x*x;
+
/* |x| >= log(2*maxdouble), cosh(x) overflow */
return huge*huge;
}
+strong_alias (__ieee754_coshl, __coshl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_gammal_r.c b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
index dd956fed95..40c18ea584 100644
--- a/sysdeps/ieee754/ldbl-96/e_gammal_r.c
+++ b/sysdeps/ieee754/ldbl-96/e_gammal_r.c
@@ -1,5 +1,5 @@
/* Implementation of gamma function according to ISO C.
- Copyright (C) 1997, 1999, 2001, 2003, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1997,1999,2001,2003,2004,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -32,25 +32,27 @@ __ieee754_gammal_r (long double x, int *signgamp)
GET_LDOUBLE_WORDS (es, hx, lx, x);
- if (((es & 0x7fff) | hx | lx) == 0)
+ if (__builtin_expect (((es & 0x7fff) | hx | lx) == 0, 0))
{
/* Return value for x == 0 is Inf with divide by zero exception. */
*signgamp = 0;
return 1.0 / x;
}
- if (es == 0xffffffff && ((hx & 0x7fffffff) | lx) == 0)
+ if (__builtin_expect (es == 0xffffffff && ((hx & 0x7fffffff) | lx) == 0, 0))
{
/* x == -Inf. According to ISO this is NaN. */
*signgamp = 0;
return x - x;
}
- if ((es & 0x7fff) == 0x7fff && ((hx & 0x7fffffff) | lx) != 0)
+ if (__builtin_expect ((es & 0x7fff) == 0x7fff, 0)
+ && ((hx & 0x7fffffff) | lx) != 0)
{
/* NaN, return it. */
*signgamp = 0;
return x;
}
- if ((es & 0x8000) != 0 && x < 0xffffffff && __rintl (x) == x)
+ if (__builtin_expect ((es & 0x8000) != 0, 0)
+ && x < 0xffffffff && __rintl (x) == x)
{
/* Return value for integer x < 0 is NaN with invalid exception. */
*signgamp = 0;
@@ -60,3 +62,4 @@ __ieee754_gammal_r (long double x, int *signgamp)
/* XXX FIXME. */
return __ieee754_expl (__ieee754_lgammal_r (x, signgamp));
}
+strong_alias (__ieee754_gammal_r, __gammal_r_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_hypotl.c b/sysdeps/ieee754/ldbl-96/e_hypotl.c
index 1a40c556dc..5e0b37ec0d 100644
--- a/sysdeps/ieee754/ldbl-96/e_hypotl.c
+++ b/sysdeps/ieee754/ldbl-96/e_hypotl.c
@@ -14,10 +14,6 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* __ieee754_hypotl(x,y)
*
* Method :
@@ -46,8 +42,8 @@ static char rcsid[] = "$NetBSD: $";
* hypot(x,y) is NAN if x or y is NAN.
*
* Accuracy:
- * hypot(x,y) returns sqrt(x^2+y^2) with error less
- * than 1 ulps (units in the last place)
+ * hypot(x,y) returns sqrt(x^2+y^2) with error less
+ * than 1 ulps (units in the last place)
*/
#include "math.h"
@@ -72,9 +68,10 @@ static char rcsid[] = "$NetBSD: $";
SET_LDOUBLE_EXP(b,eb); /* b <- |b| */
if((ea-eb)>0x46) {return a+b;} /* x/y > 2**70 */
k=0;
- if(ea > 0x5f3f) { /* a>2**8000 */
+ if(__builtin_expect(ea > 0x5f3f,0)) { /* a>2**8000 */
if(ea == 0x7fff) { /* Inf or NaN */
- u_int32_t exp,high,low;
+ u_int32_t exp __attribute__ ((unused));
+ u_int32_t high,low;
w = a+b; /* for sNaN */
GET_LDOUBLE_WORDS(exp,high,low,a);
if(((high&0x7fffffff)|low)==0) w = a;
@@ -87,9 +84,10 @@ static char rcsid[] = "$NetBSD: $";
SET_LDOUBLE_EXP(a,ea);
SET_LDOUBLE_EXP(b,eb);
}
- if(eb < 0x20bf) { /* b < 2**-8000 */
+ if(__builtin_expect(eb < 0x20bf, 0)) { /* b < 2**-8000 */
if(eb == 0) { /* subnormal b or 0 */
- u_int32_t exp,high,low;
+ u_int32_t exp __attribute__ ((unused));
+ u_int32_t high,low;
GET_LDOUBLE_WORDS(exp,high,low,b);
if((high|low)==0) return a;
SET_LDOUBLE_WORDS(t1, 0x7ffd, 0, 0); /* t1=2^16382 */
@@ -97,7 +95,7 @@ static char rcsid[] = "$NetBSD: $";
a *= t1;
k -= 16382;
} else { /* scale a and b by 2^9600 */
- ea += 0x2580; /* a *= 2^9600 */
+ ea += 0x2580; /* a *= 2^9600 */
eb += 0x2580; /* b *= 2^9600 */
k -= 9600;
SET_LDOUBLE_EXP(a,ea);
@@ -131,3 +129,4 @@ static char rcsid[] = "$NetBSD: $";
return t1*w;
} else return w;
}
+strong_alias (__ieee754_hypotl, __hypotl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_j0l.c b/sysdeps/ieee754/ldbl-96/e_j0l.c
index 12c906bcbc..325408d5df 100644
--- a/sysdeps/ieee754/ldbl-96/e_j0l.c
+++ b/sysdeps/ieee754/ldbl-96/e_j0l.c
@@ -11,9 +11,9 @@
/* Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -74,17 +74,9 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static long double pzero (long double), qzero (long double);
-#else
-static long double pzero (), qzero ();
-#endif
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
huge = 1e4930L,
one = 1.0L,
invsqrtpi = 5.6418958354775628694807945156077258584405e-1L,
@@ -109,28 +101,18 @@ static long double
/* 1.000000000000000000000000000000000000000E0L,*/
};
-#ifdef __STDC__
static const long double zero = 0.0;
-#else
-static long double zero = 0.0;
-#endif
-#ifdef __STDC__
long double
__ieee754_j0l (long double x)
-#else
-long double
-__ieee754_j0l (x)
- long double x;
-#endif
{
long double z, s, c, ss, cc, r, u, v;
int32_t ix;
- u_int32_t se, i0, i1;
+ u_int32_t se;
- GET_LDOUBLE_WORDS (se, i0, i1, x);
+ GET_LDOUBLE_EXP (se, x);
ix = se & 0x7fff;
- if (ix >= 0x7fff)
+ if (__builtin_expect (ix >= 0x7fff, 0))
return one / (x * x);
x = fabsl (x);
if (ix >= 0x4000) /* |x| >= 2.0 */
@@ -150,7 +132,7 @@ __ieee754_j0l (x)
* j0(x) = 1/sqrt(pi) * (P(0,x)*cc - Q(0,x)*ss) / sqrt(x)
* y0(x) = 1/sqrt(pi) * (P(0,x)*ss + Q(0,x)*cc) / sqrt(x)
*/
- if (ix > 0x4080) /* 2^129 */
+ if (__builtin_expect (ix > 0x4080, 0)) /* 2^129 */
z = (invsqrtpi * cc) / __ieee754_sqrtl (x);
else
{
@@ -160,15 +142,14 @@ __ieee754_j0l (x)
}
return z;
}
- if (ix < 0x3fef) /* |x| < 2**-16 */
+ if (__builtin_expect (ix < 0x3fef, 0)) /* |x| < 2**-16 */
{
- if (huge + x > one)
- { /* raise inexact if x != 0 */
- if (ix < 0x3fde) /* |x| < 2^-33 */
- return one;
- else
- return one - 0.25 * x * x;
- }
+ /* raise inexact if x != 0 */
+ math_force_eval (huge + x);
+ if (ix < 0x3fde) /* |x| < 2^-33 */
+ return one;
+ else
+ return one - 0.25 * x * x;
}
z = x * x;
r = z * (R[0] + z * (R[1] + z * (R[2] + z * (R[3] + z * R[4]))));
@@ -183,16 +164,13 @@ __ieee754_j0l (x)
return ((one + u) * (one - u) + z * (r / s));
}
}
+strong_alias (__ieee754_j0l, __j0l_finite)
/* y0(x) = 2/pi ln(x) J0(x) + U(x^2)/V(x^2)
0 < x <= 2
peak relative error 1.7e-21 */
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
U[6] = {
-1.054912306975785573710813351985351350861E10L,
2.520192609749295139432773849576523636127E10L,
@@ -201,11 +179,7 @@ U[6] = {
-3.440684087134286610316661166492641011539E5L,
1.005524356159130626192144663414848383774E3L,
};
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
V[5] = {
1.429337283720789610137291929228082613676E11L,
2.492593075325119157558811370165695013002E9L,
@@ -215,14 +189,8 @@ V[5] = {
/* 1.000000000000000000000000000000000000000E0L */
};
-#ifdef __STDC__
long double
__ieee754_y0l (long double x)
-#else
-long double
-__ieee754_y0l (x)
- long double x;
-#endif
{
long double z, s, c, ss, cc, u, v;
int32_t ix;
@@ -231,11 +199,11 @@ __ieee754_y0l (x)
GET_LDOUBLE_WORDS (se, i0, i1, x);
ix = se & 0x7fff;
/* Y0(NaN) is NaN, y0(-inf) is Nan, y0(inf) is 0 */
- if (se & 0x8000)
+ if (__builtin_expect (se & 0x8000, 0))
return zero / (zero * x);
- if (ix >= 0x7fff)
+ if (__builtin_expect (ix >= 0x7fff, 0))
return one / (x + x * x);
- if ((i0 | i1) == 0)
+ if (__builtin_expect ((i0 | i1) == 0, 0))
return -HUGE_VALL + x; /* -inf and overflow exception. */
if (ix >= 0x4000)
{ /* |x| >= 2.0 */
@@ -266,7 +234,7 @@ __ieee754_y0l (x)
else
ss = z / cc;
}
- if (ix > 0x4080) /* 1e39 */
+ if (__builtin_expect (ix > 0x4080, 0)) /* 1e39 */
z = (invsqrtpi * ss) / __ieee754_sqrtl (x);
else
{
@@ -276,7 +244,7 @@ __ieee754_y0l (x)
}
return z;
}
- if (ix <= 0x3fde) /* x < 2^-33 */
+ if (__builtin_expect (ix <= 0x3fde, 0)) /* x < 2^-33 */
{
z = -7.380429510868722527629822444004602747322E-2L
+ tpi * __ieee754_logl (x);
@@ -287,17 +255,14 @@ __ieee754_y0l (x)
v = V[0] + z * (V[1] + z * (V[2] + z * (V[3] + z * (V[4] + z))));
return (u / v + tpi * (__ieee754_j0l (x) * __ieee754_logl (x)));
}
+strong_alias (__ieee754_y0l, __y0l_finite)
/* The asymptotic expansions of pzero is
* 1 - 9/128 s^2 + 11025/98304 s^4 - ..., where s = 1/x.
* For x >= 2, We approximate pzero by
* pzero(x) = 1 + s^2 R(s^2) / S(s^2)
*/
-#ifdef __STDC__
static const long double pR8[7] = {
-#else
-static long double pR8[7] = {
-#endif
/* 8 <= x <= inf
Peak relative error 4.62 */
-4.094398895124198016684337960227780260127E-9L,
@@ -308,11 +273,7 @@ static long double pR8[7] = {
-5.827178869301452892963280214772398135283E-2L,
-2.087563267939546435460286895807046616992E-2L,
};
-#ifdef __STDC__
static const long double pS8[6] = {
-#else
-static long double pS8[6] = {
-#endif
5.823145095287749230197031108839653988393E-8L,
1.279281986035060320477759999428992730280E-5L,
9.132668954726626677174825517150228961304E-4L,
@@ -322,11 +283,7 @@ static long double pS8[6] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static const long double pR5[7] = {
-#else
-static long double pR5[7] = {
-#endif
/* 4.54541015625 <= x <= 8
Peak relative error 6.51E-22 */
-2.041226787870240954326915847282179737987E-7L,
@@ -337,11 +294,7 @@ static long double pR5[7] = {
-8.641175552716402616180994954177818461588E-2L,
-1.354654710097134007437166939230619726157E-2L,
};
-#ifdef __STDC__
static const long double pS5[6] = {
-#else
-static long double pS5[6] = {
-#endif
2.903078099681108697057258628212823545290E-6L,
3.253948449946735405975737677123673867321E-4L,
1.181269751723085006534147920481582279979E-2L,
@@ -351,11 +304,7 @@ static long double pS5[6] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static const long double pR3[7] = {
-#else
-static long double pR3[7] = {
-#endif
/* 2.85711669921875 <= x <= 4.54541015625
peak relative error 5.25e-21 */
-5.755732156848468345557663552240816066802E-6L,
@@ -366,11 +315,7 @@ static long double pR3[7] = {
-1.193350853469302941921647487062620011042E-1L,
-8.567802507331578894302991505331963782905E-3L,
};
-#ifdef __STDC__
static const long double pS3[6] = {
-#else
-static long double pS3[6] = {
-#endif
8.185931139070086158103309281525036712419E-5L,
5.398016943778891093520574483111255476787E-3L,
1.130589193590489566669164765853409621081E-1L,
@@ -380,11 +325,7 @@ static long double pS3[6] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static const long double pR2[7] = {
-#else
-static long double pR2[7] = {
-#endif
/* 2 <= x <= 2.85711669921875
peak relative error 2.64e-21 */
-1.219525235804532014243621104365384992623E-4L,
@@ -395,11 +336,7 @@ static long double pR2[7] = {
-1.556241316844728872406672349347137975495E-1L,
-5.355423239526452209595316733635519506958E-3L,
};
-#ifdef __STDC__
static const long double pS2[6] = {
-#else
-static long double pS2[6] = {
-#endif
1.734442793664291412489066256138894953823E-3L,
7.158111826468626405416300895617986926008E-2L,
9.153839713992138340197264669867993552641E-1L,
@@ -409,20 +346,10 @@ static long double pS2[6] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static long double
pzero (long double x)
-#else
-static long double
-pzero (x)
- long double x;
-#endif
{
-#ifdef __STDC__
const long double *p, *q;
-#else
- long double *p, *q;
-#endif
long double z, r, s;
int32_t ix;
u_int32_t se, i0, i1;
@@ -468,11 +395,7 @@ pzero (x)
* We approximate qzero by
* qzero(x) = s*(-.125 + R(s^2) / S(s^2))
*/
-#ifdef __STDC__
static const long double qR8[7] = {
-#else
-static long double qR8[7] = {
-#endif
/* 8 <= x <= inf
peak relative error 2.23e-21 */
3.001267180483191397885272640777189348008E-10L,
@@ -483,11 +406,7 @@ static long double qR8[7] = {
3.881970028476167836382607922840452192636E-2L,
6.132191514516237371140841765561219149638E-2L,
};
-#ifdef __STDC__
static const long double qS8[7] = {
-#else
-static long double qS8[7] = {
-#endif
4.097730123753051126914971174076227600212E-9L,
1.199615869122646109596153392152131139306E-6L,
1.196337580514532207793107149088168946451E-4L,
@@ -498,11 +417,7 @@ static long double qS8[7] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static const long double qR5[7] = {
-#else
-static long double qR5[7] = {
-#endif
/* 4.54541015625 <= x <= 8
peak relative error 1.03e-21 */
3.406256556438974327309660241748106352137E-8L,
@@ -513,11 +428,7 @@ static long double qR5[7] = {
1.071578819056574524416060138514508609805E-1L,
7.458950172851611673015774675225656063757E-2L,
};
-#ifdef __STDC__
static const long double qS5[7] = {
-#else
-static long double qS5[7] = {
-#endif
4.650675622764245276538207123618745150785E-7L,
6.773573292521412265840260065635377164455E-5L,
3.340711249876192721980146877577806687714E-3L,
@@ -528,11 +439,7 @@ static long double qS5[7] = {
/* 1.000000000000000000000000000000000000000E0L,*/
};
-#ifdef __STDC__
static const long double qR3[7] = {
-#else
-static long double qR3[7] = {
-#endif
/* 2.85711669921875 <= x <= 4.54541015625
peak relative error 5.24e-21 */
1.749459596550816915639829017724249805242E-6L,
@@ -543,11 +450,7 @@ static long double qR3[7] = {
2.538595333972857367655146949093055405072E-1L,
8.560591367256769038905328596020118877936E-2L,
};
-#ifdef __STDC__
static const long double qS3[7] = {
-#else
-static long double qS3[7] = {
-#endif
2.388596091707517488372313710647510488042E-5L,
2.048679968058758616370095132104333998147E-3L,
5.824663198201417760864458765259945181513E-2L,
@@ -558,11 +461,7 @@ static long double qS3[7] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static const long double qR2[7] = {
-#else
-static long double qR2[7] = {
-#endif
/* 2 <= x <= 2.85711669921875
peak relative error 1.58e-21 */
6.306524405520048545426928892276696949540E-5L,
@@ -573,11 +472,7 @@ static long double qR2[7] = {
5.431871999743531634887107835372232030655E-1L,
9.447736151202905471899259026430157211949E-2L,
};
-#ifdef __STDC__
static const long double qS2[7] = {
-#else
-static long double qS2[7] = {
-#endif
8.610579901936193494609755345106129102676E-4L,
4.649054352710496997203474853066665869047E-2L,
8.104282924459837407218042945106320388339E-1L,
@@ -588,20 +483,10 @@ static long double qS2[7] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static long double
qzero (long double x)
-#else
-static long double
-qzero (x)
- long double x;
-#endif
{
-#ifdef __STDC__
const long double *p, *q;
-#else
- long double *p, *q;
-#endif
long double s, r, z;
int32_t ix;
u_int32_t se, i0, i1;
diff --git a/sysdeps/ieee754/ldbl-96/e_j1l.c b/sysdeps/ieee754/ldbl-96/e_j1l.c
index 62a8ce0cb7..d7fcc9b449 100644
--- a/sysdeps/ieee754/ldbl-96/e_j1l.c
+++ b/sysdeps/ieee754/ldbl-96/e_j1l.c
@@ -11,9 +11,9 @@
/* Long double expansions are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -38,17 +38,17 @@
* for x in (0,2)
* j1(x) = x/2 + x*z*R0/S0, where z = x*x;
* for x in (2,inf)
- * j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
+ * j1(x) = sqrt(2/(pi*x))*(p1(x)*cos(x1)-q1(x)*sin(x1))
+ * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
+ * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
* as follow:
* cos(x1) = cos(x)cos(3pi/4)+sin(x)sin(3pi/4)
* = 1/sqrt(2) * (sin(x) - cos(x))
* sin(x1) = sin(x)cos(3pi/4)-cos(x)sin(3pi/4)
* = -1/sqrt(2) * (sin(x) + cos(x))
- * (To avoid cancellation, use
+ * (To avoid cancellation, use
* sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
- * to compute the worse one.)
+ * to compute the worse one.)
*
* 3 Special cases
* j1(nan)= nan
@@ -66,25 +66,17 @@
* Note: For tiny x, 1/x dominate y1 and hence
* y1(tiny) = -2/pi/tiny
* 3. For x>=2.
- * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
- * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
+ * y1(x) = sqrt(2/(pi*x))*(p1(x)*sin(x1)+q1(x)*cos(x1))
+ * where x1 = x-3*pi/4. It is better to compute sin(x1),cos(x1)
* by method mentioned above.
*/
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static long double pone (long double), qone (long double);
-#else
-static long double pone (), qone ();
-#endif
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
huge = 1e4930L,
one = 1.0L,
invsqrtpi = 5.6418958354775628694807945156077258584405e-1L,
@@ -110,29 +102,19 @@ R[5] = {
/* 1.000000000000000000000000000000000000000E0L, */
};
-#ifdef __STDC__
static const long double zero = 0.0;
-#else
-static long double zero = 0.0;
-#endif
-#ifdef __STDC__
long double
__ieee754_j1l (long double x)
-#else
-long double
-__ieee754_j1l (x)
- long double x;
-#endif
{
long double z, c, r, s, ss, cc, u, v, y;
int32_t ix;
- u_int32_t se, i0, i1;
+ u_int32_t se;
- GET_LDOUBLE_WORDS (se, i0, i1, x);
+ GET_LDOUBLE_EXP (se, x);
ix = se & 0x7fff;
- if (ix >= 0x7fff)
+ if (__builtin_expect (ix >= 0x7fff, 0))
return one / x;
y = fabsl (x);
if (ix >= 0x4000)
@@ -152,7 +134,7 @@ __ieee754_j1l (x)
* j1(x) = 1/sqrt(pi) * (P(1,x)*cc - Q(1,x)*ss) / sqrt(x)
* y1(x) = 1/sqrt(pi) * (P(1,x)*ss + Q(1,x)*cc) / sqrt(x)
*/
- if (ix > 0x4080)
+ if (__builtin_expect (ix > 0x4080, 0))
z = (invsqrtpi * cc) / __ieee754_sqrtl (y);
else
{
@@ -165,7 +147,7 @@ __ieee754_j1l (x)
else
return z;
}
- if (ix < 0x3fde) /* |x| < 2^-33 */
+ if (__builtin_expect (ix < 0x3fde, 0)) /* |x| < 2^-33 */
{
if (huge + x > one)
return 0.5 * x; /* inexact if x!=0 necessary */
@@ -176,16 +158,13 @@ __ieee754_j1l (x)
r *= x;
return (x * 0.5 + r / s);
}
+strong_alias (__ieee754_j1l, __j1l_finite)
/* Y1(x) = 2/pi * (log(x) * j1(x) - 1/x) + x R(x^2)
0 <= x <= 2
Peak relative error 2.3e-23 */
-#ifdef __STDC__
static const long double U0[6] = {
-#else
-static long double U0[6] = {
-#endif
-5.908077186259914699178903164682444848615E10L,
1.546219327181478013495975514375773435962E10L,
-6.438303331169223128870035584107053228235E8L,
@@ -193,11 +172,7 @@ static long double U0[6] = {
-6.138043997084355564619377183564196265471E4L,
1.418503228220927321096904291501161800215E2L,
};
-#ifdef __STDC__
static const long double V0[5] = {
-#else
-static long double V0[5] = {
-#endif
3.013447341682896694781964795373783679861E11L,
4.669546565705981649470005402243136124523E9L,
3.595056091631351184676890179233695857260E7L,
@@ -207,14 +182,8 @@ static long double V0[5] = {
};
-#ifdef __STDC__
long double
__ieee754_y1l (long double x)
-#else
-long double
-__ieee754_y1l (x)
- long double x;
-#endif
{
long double z, s, c, ss, cc, u, v;
int32_t ix;
@@ -223,11 +192,11 @@ __ieee754_y1l (x)
GET_LDOUBLE_WORDS (se, i0, i1, x);
ix = se & 0x7fff;
/* if Y1(NaN) is NaN, Y1(-inf) is NaN, Y1(inf) is 0 */
- if (se & 0x8000)
+ if (__builtin_expect (se & 0x8000, 0))
return zero / (zero * x);
- if (ix >= 0x7fff)
+ if (__builtin_expect (ix >= 0x7fff, 0))
return one / (x + x * x);
- if ((i0 | i1) == 0)
+ if (__builtin_expect ((i0 | i1) == 0, 0))
return -HUGE_VALL + x; /* -inf and overflow exception. */
if (ix >= 0x4000)
{ /* |x| >= 2.0 */
@@ -253,7 +222,7 @@ __ieee754_y1l (x)
* sin(x) +- cos(x) = -cos(2x)/(sin(x) -+ cos(x))
* to compute the worse one.
*/
- if (ix > 0x4080)
+ if (__builtin_expect (ix > 0x4080, 0))
z = (invsqrtpi * ss) / __ieee754_sqrtl (x);
else
{
@@ -263,7 +232,7 @@ __ieee754_y1l (x)
}
return z;
}
- if (ix <= 0x3fbe)
+ if (__builtin_expect (ix <= 0x3fbe, 0))
{ /* x < 2**-65 */
return (-tpi / x);
}
@@ -273,12 +242,13 @@ __ieee754_y1l (x)
return (x * (u / v) +
tpi * (__ieee754_j1l (x) * __ieee754_logl (x) - one / x));
}
+strong_alias (__ieee754_y1l, __y1l_finite)
/* For x >= 8, the asymptotic expansions of pone is
* 1 + 15/128 s^2 - 4725/2^15 s^4 - ..., where s = 1/x.
* We approximate pone by
- * pone(x) = 1 + (R/S)
+ * pone(x) = 1 + (R/S)
*/
/* J1(x) cosX + Y1(x) sinX = sqrt( 2/(pi x)) P1(x)
@@ -286,11 +256,7 @@ __ieee754_y1l (x)
8 <= x <= inf (0 <= z <= 0.125)
Peak relative error 5.2e-22 */
-#ifdef __STDC__
static const long double pr8[7] = {
-#else
-static long double pr8[7] = {
-#endif
8.402048819032978959298664869941375143163E-9L,
1.813743245316438056192649247507255996036E-6L,
1.260704554112906152344932388588243836276E-4L,
@@ -299,11 +265,7 @@ static long double pr8[7] = {
1.131111483254318243139953003461511308672E-1L,
4.480715825681029711521286449131671880953E-2L,
};
-#ifdef __STDC__
static const long double ps8[6] = {
-#else
-static long double ps8[6] = {
-#endif
7.169748325574809484893888315707824924354E-8L,
1.556549720596672576431813934184403614817E-5L,
1.094540125521337139209062035774174565882E-3L,
@@ -317,11 +279,7 @@ static long double ps8[6] = {
P1(x) = 1 + z^2 R(z^2), z=1/x
4.54541015625 <= x <= 8
Peak relative error 7.7e-22 */
-#ifdef __STDC__
static const long double pr5[7] = {
-#else
-static long double pr5[7] = {
-#endif
4.318486887948814529950980396300969247900E-7L,
4.715341880798817230333360497524173929315E-5L,
1.642719430496086618401091544113220340094E-3L,
@@ -330,11 +288,7 @@ static long double pr5[7] = {
1.755576530055079253910829652698703791957E-1L,
3.218803858282095929559165965353784980613E-2L,
};
-#ifdef __STDC__
static const long double ps5[6] = {
-#else
-static long double ps5[6] = {
-#endif
3.685108812227721334719884358034713967557E-6L,
4.069102509511177498808856515005792027639E-4L,
1.449728676496155025507893322405597039816E-2L,
@@ -348,11 +302,7 @@ static long double ps5[6] = {
P1(x) = 1 + z^2 R(z^2), z=1/x
2.85711669921875 <= x <= 4.54541015625
Peak relative error 6.5e-21 */
-#ifdef __STDC__
static const long double pr3[7] = {
-#else
-static long double pr3[7] = {
-#endif
1.265251153957366716825382654273326407972E-5L,
8.031057269201324914127680782288352574567E-4L,
1.581648121115028333661412169396282881035E-2L,
@@ -361,11 +311,7 @@ static long double pr3[7] = {
2.559223765418386621748404398017602935764E-1L,
2.277136933287817911091370397134882441046E-2L,
};
-#ifdef __STDC__
static const long double ps3[6] = {
-#else
-static long double ps3[6] = {
-#endif
1.079681071833391818661952793568345057548E-4L,
6.986017817100477138417481463810841529026E-3L,
1.429403701146942509913198539100230540503E-1L,
@@ -379,11 +325,7 @@ static long double ps3[6] = {
P1(x) = 1 + z^2 R(z^2), z=1/x
2 <= x <= 2.85711669921875
Peak relative error 3.5e-21 */
-#ifdef __STDC__
static const long double pr2[7] = {
-#else
-static long double pr2[7] = {
-#endif
2.795623248568412225239401141338714516445E-4L,
1.092578168441856711925254839815430061135E-2L,
1.278024620468953761154963591853679640560E-1L,
@@ -392,11 +334,7 @@ static long double pr2[7] = {
3.544176317308370086415403567097130611468E-1L,
1.604142674802373041247957048801599740644E-2L,
};
-#ifdef __STDC__
static const long double ps2[6] = {
-#else
-static long double ps2[6] = {
-#endif
2.385605161555183386205027000675875235980E-3L,
9.616778294482695283928617708206967248579E-2L,
1.195215570959693572089824415393951258510E0L,
@@ -407,20 +345,10 @@ static long double ps2[6] = {
};
-#ifdef __STDC__
static long double
pone (long double x)
-#else
-static long double
-pone (x)
- long double x;
-#endif
{
-#ifdef __STDC__
const long double *p, *q;
-#else
- long double *p, *q;
-#endif
long double z, r, s;
int32_t ix;
u_int32_t se, i0, i1;
@@ -462,7 +390,7 @@ pone (x)
/* For x >= 8, the asymptotic expansions of qone is
* 3/8 s - 105/1024 s^3 - ..., where s = 1/x.
* We approximate pone by
- * qone(x) = s*(0.375 + (R/S))
+ * qone(x) = s*(0.375 + (R/S))
*/
/* Y1(x)cosX - J1(x)sinX = sqrt( 2/(pi x)) Q1(x),
@@ -470,11 +398,7 @@ pone (x)
8 <= x <= inf
Peak relative error 8.3e-22 */
-#ifdef __STDC__
static const long double qr8[7] = {
-#else
-static long double qr8[7] = {
-#endif
-5.691925079044209246015366919809404457380E-10L,
-1.632587664706999307871963065396218379137E-7L,
-1.577424682764651970003637263552027114600E-5L,
@@ -483,11 +407,7 @@ static long double qr8[7] = {
-6.854943629378084419631926076882330494217E-2L,
-1.055448290469180032312893377152490183203E-1L,
};
-#ifdef __STDC__
static const long double qs8[7] = {
-#else
-static long double qs8[7] = {
-#endif
5.550982172325019811119223916998393907513E-9L,
1.607188366646736068460131091130644192244E-6L,
1.580792530091386496626494138334505893599E-4L,
@@ -502,11 +422,7 @@ static long double qs8[7] = {
Q1(x) = z(.375 + z^2 R(z^2)), z=1/x
4.54541015625 <= x <= 8
Peak relative error 4.1e-22 */
-#ifdef __STDC__
static const long double qr5[7] = {
-#else
-static long double qr5[7] = {
-#endif
-6.719134139179190546324213696633564965983E-8L,
-9.467871458774950479909851595678622044140E-6L,
-4.429341875348286176950914275723051452838E-4L,
@@ -515,11 +431,7 @@ static long double qr5[7] = {
-1.964432669771684034858848142418228214855E-1L,
-1.333896496989238600119596538299938520726E-1L,
};
-#ifdef __STDC__
static const long double qs5[7] = {
-#else
-static long double qs5[7] = {
-#endif
6.552755584474634766937589285426911075101E-7L,
9.410814032118155978663509073200494000589E-5L,
4.561677087286518359461609153655021253238E-3L,
@@ -534,11 +446,7 @@ static long double qs5[7] = {
Q1(x) = z(.375 + z^2 R(z^2)), z=1/x
2.85711669921875 <= x <= 4.54541015625
Peak relative error 2.2e-21 */
-#ifdef __STDC__
static const long double qr3[7] = {
-#else
-static long double qr3[7] = {
-#endif
-3.618746299358445926506719188614570588404E-6L,
-2.951146018465419674063882650970344502798E-4L,
-7.728518171262562194043409753656506795258E-3L,
@@ -547,11 +455,7 @@ static long double qr3[7] = {
-4.858192581793118040782557808823460276452E-1L,
-1.592399251246473643510898335746432479373E-1L,
};
-#ifdef __STDC__
static const long double qs3[7] = {
-#else
-static long double qs3[7] = {
-#endif
3.529139957987837084554591421329876744262E-5L,
2.973602667215766676998703687065066180115E-3L,
8.273534546240864308494062287908662592100E-2L,
@@ -566,11 +470,7 @@ static long double qs3[7] = {
Q1(x) = z(.375 + z^2 R(z^2)), z=1/x
2 <= x <= 2.85711669921875
Peak relative error 6.9e-22 */
-#ifdef __STDC__
static const long double qr2[7] = {
-#else
-static long double qr2[7] = {
-#endif
-1.372751603025230017220666013816502528318E-4L,
-6.879190253347766576229143006767218972834E-3L,
-1.061253572090925414598304855316280077828E-1L,
@@ -579,11 +479,7 @@ static long double qr2[7] = {
-1.087955310491078933531734062917489870754E0L,
-1.826821119773182847861406108689273719137E-1L,
};
-#ifdef __STDC__
static const long double qs2[7] = {
-#else
-static long double qs2[7] = {
-#endif
1.338768933634451601814048220627185324007E-3L,
7.071099998918497559736318523932241901810E-2L,
1.200511429784048632105295629933382142221E0L,
@@ -595,20 +491,10 @@ static long double qs2[7] = {
};
-#ifdef __STDC__
static long double
qone (long double x)
-#else
-static long double
-qone (x)
- long double x;
-#endif
{
-#ifdef __STDC__
const long double *p, *q;
-#else
- long double *p, *q;
-#endif
static long double s, r, z;
int32_t ix;
u_int32_t se, i0, i1;
diff --git a/sysdeps/ieee754/ldbl-96/e_jnl.c b/sysdeps/ieee754/ldbl-96/e_jnl.c
index bedff7d566..3a70e10dbe 100644
--- a/sysdeps/ieee754/ldbl-96/e_jnl.c
+++ b/sysdeps/ieee754/ldbl-96/e_jnl.c
@@ -11,9 +11,9 @@
/* Modifications for long double are
Copyright (C) 2001 Stephen L. Moshier <moshier@na-net.ornl.gov>
- and are incorporated herein by permission of the author. The author
+ and are incorporated herein by permission of the author. The author
reserves the right to distribute this material elsewhere under different
- copying permissions. These modifications are distributed here under
+ copying permissions. These modifications are distributed here under
the following terms:
This library is free software; you can redistribute it and/or
@@ -59,28 +59,13 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
invsqrtpi = 5.64189583547756286948079e-1L, two = 2.0e0L, one = 1.0e0L;
-#ifdef __STDC__
static const long double zero = 0.0L;
-#else
-static long double zero = 0.0L;
-#endif
-#ifdef __STDC__
long double
__ieee754_jnl (int n, long double x)
-#else
-long double
-__ieee754_jnl (n, x)
- int n;
- long double x;
-#endif
{
u_int32_t se, i0, i1;
int32_t i, ix, sgn;
@@ -95,7 +80,7 @@ __ieee754_jnl (n, x)
ix = se & 0x7fff;
/* if J(n,NaN) is NaN */
- if ((ix == 0x7fff) && ((i0 & 0x7fffffff) != 0))
+ if (__builtin_expect ((ix == 0x7fff) && ((i0 & 0x7fffffff) != 0), 0))
return x + x;
if (n < 0)
{
@@ -109,7 +94,8 @@ __ieee754_jnl (n, x)
return (__ieee754_j1l (x));
sgn = (n & 1) & (se >> 15); /* even n -- 0, odd n -- sign(x) */
x = fabsl (x);
- if ((ix | i0 | i1) == 0 || ix >= 0x7fff) /* if x is 0 or inf */
+ if (__builtin_expect ((ix | i0 | i1) == 0 || ix >= 0x7fff, 0))
+ /* if x is 0 or inf */
b = zero;
else if ((long double) n <= x)
{
@@ -298,16 +284,10 @@ __ieee754_jnl (n, x)
else
return b;
}
+strong_alias (__ieee754_jnl, __jnl_finite)
-#ifdef __STDC__
long double
__ieee754_ynl (int n, long double x)
-#else
-long double
-__ieee754_ynl (n, x)
- int n;
- long double x;
-#endif
{
u_int32_t se, i0, i1;
int32_t i, ix;
@@ -318,11 +298,11 @@ __ieee754_ynl (n, x)
GET_LDOUBLE_WORDS (se, i0, i1, x);
ix = se & 0x7fff;
/* if Y(n,NaN) is NaN */
- if ((ix == 0x7fff) && ((i0 & 0x7fffffff) != 0))
+ if (__builtin_expect ((ix == 0x7fff) && ((i0 & 0x7fffffff) != 0), 0))
return x + x;
- if ((ix | i0 | i1) == 0)
+ if (__builtin_expect ((ix | i0 | i1) == 0, 0))
return -HUGE_VALL + x; /* -inf and overflow exception. */
- if (se & 0x8000)
+ if (__builtin_expect (se & 0x8000, 0))
return zero / (zero * x);
sign = 1;
if (n < 0)
@@ -334,7 +314,7 @@ __ieee754_ynl (n, x)
return (__ieee754_y0l (x));
if (n == 1)
return (sign * __ieee754_y1l (x));
- if (ix == 0x7fff)
+ if (__builtin_expect (ix == 0x7fff, 0))
return zero;
if (ix >= 0x412D)
{ /* x > 2**302 */
@@ -393,3 +373,4 @@ __ieee754_ynl (n, x)
else
return -b;
}
+strong_alias (__ieee754_ynl, __ynl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c
index 36e336565c..8a20e5e135 100644
--- a/sysdeps/ieee754/ldbl-96/e_lgammal_r.c
+++ b/sysdeps/ieee754/ldbl-96/e_lgammal_r.c
@@ -94,11 +94,7 @@
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double
-#else
-static long double
-#endif
half = 0.5L,
one = 1.0L,
pi = 3.14159265358979323846264L,
@@ -204,20 +200,10 @@ static long double
w6 = -1.880801938119376907179E-3L,
w7 = 4.885026142432270781165E-3L;
-#ifdef __STDC__
static const long double zero = 0.0L;
-#else
-static long double zero = 0.0L;
-#endif
-#ifdef __STDC__
static long double
sin_pi (long double x)
-#else
-static long double
-sin_pi (x)
- long double x;
-#endif
{
long double y, z;
int n, ix;
@@ -283,15 +269,8 @@ sin_pi (x)
}
-#ifdef __STDC__
long double
__ieee754_lgammal_r (long double x, int *signgamp)
-#else
-long double
-__ieee754_lgammal_r (x, signgamp)
- long double x;
- int *signgamp;
-#endif
{
long double t, y, z, nadj, p, p1, p2, q, r, w;
int i, ix;
@@ -301,7 +280,7 @@ __ieee754_lgammal_r (x, signgamp)
GET_LDOUBLE_WORDS (se, i0, i1, x);
ix = se & 0x7fff;
- if ((ix | i0 | i1) == 0)
+ if (__builtin_expect((ix | i0 | i1) == 0, 0))
{
if (se & 0x8000)
*signgamp = -1;
@@ -311,10 +290,10 @@ __ieee754_lgammal_r (x, signgamp)
ix = (ix << 16) | (i0 >> 16);
/* purge off +-inf, NaN, +-0, and negative arguments */
- if (ix >= 0x7fff0000)
+ if (__builtin_expect(ix >= 0x7fff0000, 0))
return x * x;
- if (ix < 0x3fc08000) /* 2^-63 */
+ if (__builtin_expect(ix < 0x3fc08000, 0)) /* 2^-63 */
{ /* |x|<2**-63, return -log(|x|) */
if (se & 0x8000)
{
@@ -438,7 +417,7 @@ __ieee754_lgammal_r (x, signgamp)
z = one / x;
y = z * z;
w = w0 + z * (w1
- + y * (w2 + y * (w3 + y * (w4 + y * (w5 + y * (w6 + y * w7))))));
+ + y * (w2 + y * (w3 + y * (w4 + y * (w5 + y * (w6 + y * w7))))));
r = (x - half) * (t - one) + w;
}
else
@@ -448,3 +427,4 @@ __ieee754_lgammal_r (x, signgamp)
r = nadj - r;
return r;
}
+strong_alias (__ieee754_lgammal_r, __lgammal_r_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_remainderl.c b/sysdeps/ieee754/ldbl-96/e_remainderl.c
index e721a6e8cd..41c4c7b34e 100644
--- a/sysdeps/ieee754/ldbl-96/e_remainderl.c
+++ b/sysdeps/ieee754/ldbl-96/e_remainderl.c
@@ -14,14 +14,10 @@
* ====================================================
*/
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
/* __ieee754_remainderl(x,p)
* Return :
- * returns x REM p = x - [x/p]*p as if in infinite
- * precise arithmetic, where [x/p] is the (infinite bit)
+ * returns x REM p = x - [x/p]*p as if in infinite
+ * precise arithmetic, where [x/p] is the (infinite bit)
* integer nearest x/p (in half way case choose the even one).
* Method :
* Based on fmod() return x-[x/p]chopped*p exactlp.
@@ -30,19 +26,11 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double zero = 0.0;
-#else
-static long double zero = 0.0;
-#endif
-#ifdef __STDC__
- long double __ieee754_remainderl(long double x, long double p)
-#else
- long double __ieee754_remainderl(x,p)
- long double x,p;
-#endif
+long double
+__ieee754_remainderl(long double x, long double p)
{
u_int32_t sx,sex,sep,x0,x1,p0,p1;
long double p_half;
@@ -54,7 +42,7 @@ static long double zero = 0.0;
sex &= 0x7fff;
/* purge off exception values */
- if((sep|p0|p1)==0) return (x*p)/(x*p); /* p = 0 */
+ if((sep|p0|p1)==0) return (x*p)/(x*p); /* p = 0 */
if((sex==0x7fff)|| /* x not finite */
((sep==0x7fff)&& /* p is NaN */
((p0|p1)!=0)))
@@ -81,3 +69,4 @@ static long double zero = 0.0;
SET_LDOUBLE_EXP(x,sex^sx);
return x;
}
+strong_alias (__ieee754_remainderl, __remainderl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/e_sinhl.c b/sysdeps/ieee754/ldbl-96/e_sinhl.c
index 646d4fde82..8593272406 100644
--- a/sysdeps/ieee754/ldbl-96/e_sinhl.c
+++ b/sysdeps/ieee754/ldbl-96/e_sinhl.c
@@ -23,9 +23,9 @@ static char rcsid[] = "$NetBSD: $";
* mathematically sinh(x) if defined to be (exp(x)-exp(-x))/2
* 1. Replace x by |x| (sinhl(-x) = -sinhl(x)).
* 2.
- * E + E/(E+1)
+ * E + E/(E+1)
* 0 <= x <= 25 : sinhl(x) := --------------, E=expm1l(x)
- * 2
+ * 2
*
* 25 <= x <= lnovft : sinhl(x) := expl(x)/2
* lnovft <= x <= ln2ovft: sinhl(x) := expl(x/2)/2 * expl(x/2)
@@ -39,18 +39,10 @@ static char rcsid[] = "$NetBSD: $";
#include "math.h"
#include "math_private.h"
-#ifdef __STDC__
static const long double one = 1.0, shuge = 1.0e4931L;
-#else
-static long double one = 1.0, shuge = 1.0e4931L;
-#endif
-#ifdef __STDC__
- long double __ieee754_sinhl(long double x)
-#else
- long double __ieee754_sinhl(x)
- long double x;
-#endif
+long double
+__ieee754_sinhl(long double x)
{
long double t,w,h;
u_int32_t jx,ix,i0,i1;
@@ -60,13 +52,13 @@ static long double one = 1.0, shuge = 1.0e4931L;
ix = jx&0x7fff;
/* x is INF or NaN */
- if(ix==0x7fff) return x+x;
+ if(__builtin_expect(ix==0x7fff, 0)) return x+x;
h = 0.5;
if (jx & 0x8000) h = -h;
/* |x| in [0,25], return sign(x)*0.5*(E+E/(E+1))) */
if (ix < 0x4003 || (ix == 0x4003 && i0 <= 0xc8000000)) { /* |x|<25 */
- if (ix<0x3fdf) /* |x|<2**-32 */
+ if (ix<0x3fdf) /* |x|<2**-32 */
if(shuge+x>one) return x;/* sinh(tiny) = tiny with inexact */
t = __expm1l(fabsl(x));
if(ix<0x3fff) return h*(2.0*t-t*t/(t+one));
@@ -89,3 +81,4 @@ static long double one = 1.0, shuge = 1.0e4931L;
/* |x| > overflowthreshold, sinhl(x) overflow */
return x*shuge;
}
+strong_alias (__ieee754_sinhl, __sinhl_finite)
diff --git a/sysdeps/ieee754/ldbl-96/s_asinhl.c b/sysdeps/ieee754/ldbl-96/s_asinhl.c
index 6eb434c44b..9f37d48842 100644
--- a/sysdeps/ieee754/ldbl-96/s_asinhl.c
+++ b/sysdeps/ieee754/ldbl-96/s_asinhl.c
@@ -52,19 +52,21 @@ huge= 1.000000000000000000e+4900L;
int32_t hx,ix;
GET_LDOUBLE_EXP(hx,x);
ix = hx&0x7fff;
- if(ix==0x7fff) return x+x; /* x is inf or NaN */
- if(ix< 0x3fde) { /* |x|<2**-34 */
+ if(__builtin_expect(ix< 0x3fde, 0)) { /* |x|<2**-34 */
if(huge+x>one) return x; /* return x inexact except 0 */
}
- if(ix>0x4020) { /* |x| > 2**34 */
+ if(__builtin_expect(ix>0x4020,0)) { /* |x| > 2**34 */
+ if(ix==0x7fff) return x+x; /* x is inf or NaN */
w = __ieee754_logl(fabsl(x))+ln2;
- } else if (ix>0x4000) { /* 2**34 > |x| > 2.0 */
- t = fabsl(x);
- w = __ieee754_logl(2.0*t+one/(__ieee754_sqrtl(x*x+one)+t));
- } else { /* 2.0 > |x| > 2**-28 */
- t = x*x;
- w =__log1pl(fabsl(x)+t/(one+__ieee754_sqrtl(one+t)));
+ } else {
+ long double xa = fabsl(x);
+ if (ix>0x4000) { /* 2**34 > |x| > 2.0 */
+ w = __ieee754_logl(2.0*xa+one/(__ieee754_sqrtl(xa*xa+one)+xa));
+ } else { /* 2.0 > |x| > 2**-28 */
+ t = xa*xa;
+ w =__log1pl(xa+t/(one+__ieee754_sqrtl(one+t)));
+ }
}
- if(hx&0x8000) return -w; else return w;
+ return __copysignl(w, x);
}
weak_alias (__asinhl, asinhl)
diff --git a/sysdeps/ieee754/ldbl-96/s_isinf_nsl.c b/sysdeps/ieee754/ldbl-96/s_isinf_nsl.c
new file mode 100644
index 0000000000..aa590307ea
--- /dev/null
+++ b/sysdeps/ieee754/ldbl-96/s_isinf_nsl.c
@@ -0,0 +1,18 @@
+/*
+ * Written by Ulrich Drepper <drepper@gmail.com>.
+ */
+
+/*
+ * __isinf_nsl(x) returns != 0 if x is ±inf, else 0;
+ */
+
+#include "math.h"
+#include "math_private.h"
+
+int
+__isinf_nsl (long double x)
+{
+ int32_t se,hx,lx;
+ GET_LDOUBLE_WORDS(se,hx,lx,x);
+ return !(((se & 0x7fff) ^ 0x7fff) | lx | (hx & 0x7fffffff));
+}
diff --git a/sysdeps/ieee754/ldbl-96/s_roundl.c b/sysdeps/ieee754/ldbl-96/s_roundl.c
index f1399cc209..833ae0d786 100644
--- a/sysdeps/ieee754/ldbl-96/s_roundl.c
+++ b/sysdeps/ieee754/ldbl-96/s_roundl.c
@@ -1,5 +1,5 @@
/* Round long double to integer away from zero.
- Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -38,15 +38,13 @@ __roundl (long double x)
{
if (j0 < 0)
{
- if (huge + x > 0.0)
+ math_force_eval (huge + x);
+ se &= 0x8000;
+ i0 = i1 = 0;
+ if (j0 == -1)
{
- se &= 0x8000;
- i0 = i1 = 0;
- if (j0 == -1)
- {
- se |= 0x3fff;
- i0 = 0x80000000;
- }
+ se |= 0x3fff;
+ i0 = 0x80000000;
}
}
else
@@ -55,15 +53,14 @@ __roundl (long double x)
if (((i0 & i) | i1) == 0)
/* X is integral. */
return x;
- if (huge + x > 0.0)
- {
- /* Raise inexact if x != 0. */
- u_int32_t j = i0 + (0x40000000 >> j0);
- if (j < i0)
- se += 1;
- i0 = (j & ~i) | 0x80000000;
- i1 = 0;
- }
+
+ /* Raise inexact if x != 0. */
+ math_force_eval (huge + x);
+ u_int32_t j = i0 + (0x40000000 >> j0);
+ if (j < i0)
+ se += 1;
+ i0 = (j & ~i) | 0x80000000;
+ i1 = 0;
}
}
else if (j0 > 62)
@@ -81,22 +78,20 @@ __roundl (long double x)
/* X is integral. */
return x;
- if (huge + x > 0.0)
+ math_force_eval (huge + x);
+ /* Raise inexact if x != 0. */
+ u_int32_t j = i1 + (1 << (62 - j0));
+ if (j < i1)
{
- /* Raise inexact if x != 0. */
- u_int32_t j = i1 + (1 << (62 - j0));
- if (j < i1)
+ u_int32_t k = i0 + 1;
+ if (k < i0)
{
- u_int32_t k = i0 + 1;
- if (k < i0)
- {
- se += 1;
- k |= 0x80000000;
- }
- i0 = k;
+ se += 1;
+ k |= 0x80000000;
}
- i1 = j;
+ i0 = k;
}
+ i1 = j;
i1 &= ~i;
}
diff --git a/sysdeps/ieee754/ldbl-96/w_expl.c b/sysdeps/ieee754/ldbl-96/w_expl.c
index 53bb143734..703a0a2049 100644
--- a/sysdeps/ieee754/ldbl-96/w_expl.c
+++ b/sysdeps/ieee754/ldbl-96/w_expl.c
@@ -1,61 +1,48 @@
-/* w_expl.c -- long double version of w_exp.c.
- * Conversion to long double by Ulrich Drepper,
- * Cygnus Support, drepper@cygnus.com.
- */
-
-/*
- * ====================================================
- * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
- *
- * Developed at SunPro, a Sun Microsystems, Inc. business.
- * Permission to use, copy, modify, and distribute this
- * software is freely granted, provided that this notice
- * is preserved.
- * ====================================================
- */
-
-#if defined(LIBM_SCCS) && !defined(lint)
-static char rcsid[] = "$NetBSD: $";
-#endif
-
-/*
- * wrapper expl(x)
- */
-
-#include "math.h"
-#include "math_private.h"
-
-#ifdef __STDC__
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
+
+ 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 <math.h>
+#include <math_private.h>
+
static const long double
-#else
-static long double
-#endif
o_threshold= 1.135652340629414394949193107797076489134e4,
/* 0x400C, 0xB17217F7, 0xD1CF79AC */
u_threshold= -1.140019167866942050398521670162263001513e4;
/* 0x400C, 0xB220C447, 0x69C201E8 */
-#ifdef __STDC__
- long double __expl(long double x) /* wrapper exp */
-#else
- long double __expl(x) /* wrapper exp */
- long double x;
-#endif
+
+/* wrapper expl */
+long double
+__expl (long double x)
{
-#ifdef _IEEE_LIBM
- return __ieee754_expl(x);
-#else
- long double z;
- z = __ieee754_expl(x);
- if(_LIB_VERSION == _IEEE_) return z;
- if(__finitel(x)) {
- if(x>o_threshold)
- return __kernel_standard(x,x,206); /* exp overflow */
- else if(x<u_threshold)
- return __kernel_standard(x,x,207); /* exp underflow */
- }
- return z;
-#endif
+ if (__builtin_expect (x > o_threshold, 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 206);
+ }
+ else if (__builtin_expect (x < u_threshold, 0))
+ {
+ if (_LIB_VERSION != _IEEE_)
+ return __kernel_standard (x, x, 207);
+ }
+
+ return __ieee754_expl (x);
}
hidden_def (__expl)
weak_alias (__expl, expl)
diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
index ec03de3417..d3b2f5d9d1 100644
--- a/sysdeps/mach/hurd/i386/init-first.c
+++ b/sysdeps/mach/hurd/i386/init-first.c
@@ -1,6 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For i386/Hurd.
- Copyright (C) 1995-2005, 2007, 2011
- Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +18,7 @@
02111-1307 USA. */
#include <assert.h>
+#include <ctype.h>
#include <hurd.h>
#include <stdio.h>
#include <unistd.h>
@@ -89,6 +89,9 @@ posixland_init (int argc, char **argv, char **envp)
__getopt_clean_environment (envp);
#endif
+ /* Initialize ctype data. */
+ __ctype_init ();
+
#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
__libc_global_ctors ();
#endif
diff --git a/sysdeps/mach/hurd/malloc-machine.h b/sysdeps/mach/hurd/malloc-machine.h
index e6078f60dc..9b9ccd524c 100644
--- a/sysdeps/mach/hurd/malloc-machine.h
+++ b/sysdeps/mach/hurd/malloc-machine.h
@@ -1,6 +1,6 @@
/* Basic platform-independent macro definitions for mutexes,
thread-specific data and parameters for malloc.
- Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2003-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -63,6 +63,13 @@ __libc_tsd_define (static, void *, MALLOC) /* declaration/common definition */
#define tsd_setspecific(key, data) __libc_tsd_set (void *, MALLOC, (data))
#define tsd_getspecific(key, vptr) ((vptr) = __libc_tsd_get (void *, MALLOC))
+/* madvise is a stub on Hurd, so don't bother calling it. */
+
+#include <sys/mman.h>
+
+#undef madvise
+#define madvise(addr, len, advice) ((void) (addr), (void) (len), (void) (advice))
+
#include <sysdeps/generic/malloc-machine.h>
#endif /* !defined(_MALLOC_MACHINE_H) */
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index 1d1460cead..e08e999fc9 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994,1995,1996,1997,1999,2002,2003,2004
+/* Copyright (C) 1994,1995,1996,1997,1999,2002,2003,2004,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -51,15 +51,20 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
{
/* vm_allocate has (a little) less overhead in the kernel too. */
err = __vm_allocate (__mach_task_self (), &mapaddr, len,
- !(flags & MAP_FIXED));
+ mapaddr == NULL);
- if (err == KERN_NO_SPACE && (flags & MAP_FIXED))
+ if (err == KERN_NO_SPACE)
{
- /* XXX this is not atomic as it is in unix! */
- /* The region is already allocated; deallocate it first. */
- err = __vm_deallocate (__mach_task_self (), mapaddr, len);
- if (!err)
- err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0);
+ if (flags & MAP_FIXED)
+ {
+ /* XXX this is not atomic as it is in unix! */
+ /* The region is already allocated; deallocate it first. */
+ err = __vm_deallocate (__mach_task_self (), mapaddr, len);
+ if (!err)
+ err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0);
+ }
+ else if (mapaddr != NULL)
+ err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
}
return err ? (__ptr_t) (long int) __hurd_fail (err) : (__ptr_t) mapaddr;
@@ -135,21 +140,32 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
err = __vm_map (__mach_task_self (),
&mapaddr, (vm_size_t) len, (vm_address_t) 0,
- ! (flags & MAP_FIXED),
+ mapaddr == NULL,
memobj, (vm_offset_t) offset,
! (flags & MAP_SHARED),
vmprot, VM_PROT_ALL,
(flags & MAP_SHARED) ? VM_INHERIT_SHARE : VM_INHERIT_COPY);
- if (err == KERN_NO_SPACE && (flags & MAP_FIXED))
+ if (err == KERN_NO_SPACE)
{
- /* XXX this is not atomic as it is in unix! */
- /* The region is already allocated; deallocate it first. */
- err = __vm_deallocate (__mach_task_self (), mapaddr, len);
- if (! err)
+ if (flags & MAP_FIXED)
+ {
+ /* XXX this is not atomic as it is in unix! */
+ /* The region is already allocated; deallocate it first. */
+ err = __vm_deallocate (__mach_task_self (), mapaddr, len);
+ if (! err)
+ err = __vm_map (__mach_task_self (),
+ &mapaddr, (vm_size_t) len, (vm_address_t) 0,
+ 0, memobj, (vm_offset_t) offset,
+ ! (flags & MAP_SHARED),
+ vmprot, VM_PROT_ALL,
+ (flags & MAP_SHARED) ? VM_INHERIT_SHARE
+ : VM_INHERIT_COPY);
+ }
+ else if (mapaddr != NULL)
err = __vm_map (__mach_task_self (),
&mapaddr, (vm_size_t) len, (vm_address_t) 0,
- 0, memobj, (vm_offset_t) offset,
+ 1, memobj, (vm_offset_t) offset,
! (flags & MAP_SHARED),
vmprot, VM_PROT_ALL,
(flags & MAP_SHARED) ? VM_INHERIT_SHARE
diff --git a/sysdeps/mach/hurd/powerpc/init-first.c b/sysdeps/mach/hurd/powerpc/init-first.c
index 2047cac3bf..48b910021c 100644
--- a/sysdeps/mach/hurd/powerpc/init-first.c
+++ b/sysdeps/mach/hurd/powerpc/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. PowerPC/Hurd.
- Copyright (C) 1995-2001, 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
02111-1307 USA. */
#include <assert.h>
+#include <ctype.h>
#include <hurd.h>
#include <stdio.h>
#include <unistd.h>
@@ -79,6 +80,9 @@ posixland_init (int argc, char **argv, char **envp)
__getopt_clean_environment (__environ);
#endif
+ /* Initialize ctype data. */
+ __ctype_init ();
+
#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
__libc_global_ctors ();
#endif
diff --git a/sysdeps/mach/hurd/socket.c b/sysdeps/mach/hurd/socket.c
index 7318ac3cf2..9122472160 100644
--- a/sysdeps/mach/hurd/socket.c
+++ b/sysdeps/mach/hurd/socket.c
@@ -1,6 +1,4 @@
-/* Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2008 Free Software
- Foundation, Inc.
-
+/* Copyright (C) 1992-1998,2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -65,7 +63,7 @@ __socket (domain, type, protocol)
isn't supported. */
if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED
|| err == MIG_BAD_ID || err == EOPNOTSUPP)
- err = EPFNOSUPPORT;
+ err = EAFNOSUPPORT;
if (! err)
{
diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c
index 00b3755a6a..68d73bd1a0 100644
--- a/sysdeps/posix/getaddrinfo.c
+++ b/sysdeps/posix/getaddrinfo.c
@@ -1958,7 +1958,7 @@ gaiconf_init (void)
size_t nscopelist = 0;
bool scopelist_nullbits = false;
- FILE *fp = fopen (GAICONF_FNAME, "rc");
+ FILE *fp = fopen (GAICONF_FNAME, "rce");
if (fp != NULL)
{
struct stat64 st;
@@ -2386,7 +2386,7 @@ getaddrinfo (const char *name, const char *service,
|| (hints->ai_family == PF_INET6 && ! seen_ipv6))
{
/* We cannot possibly return a valid answer. */
- free (in6ai);
+ __free_in6ai (in6ai);
return EAI_NONAME;
}
}
@@ -2400,7 +2400,7 @@ getaddrinfo (const char *name, const char *service,
{
if (hints->ai_flags & AI_NUMERICSERV)
{
- free (in6ai);
+ __free_in6ai (in6ai);
return EAI_NONAME;
}
@@ -2422,7 +2422,7 @@ getaddrinfo (const char *name, const char *service,
if (last_i != 0)
{
freeaddrinfo (p);
- free (in6ai);
+ __free_in6ai (in6ai);
return -(last_i & GAIH_EAI);
}
@@ -2434,7 +2434,7 @@ getaddrinfo (const char *name, const char *service,
}
else
{
- free (in6ai);
+ __free_in6ai (in6ai);
return EAI_FAMILY;
}
@@ -2622,7 +2622,7 @@ getaddrinfo (const char *name, const char *service,
p->ai_canonname = canonname;
}
- free (in6ai);
+ __free_in6ai (in6ai);
if (p)
{
diff --git a/sysdeps/powerpc/Makefile b/sysdeps/powerpc/Makefile
index e43ca704f0..23a9a16730 100644
--- a/sysdeps/powerpc/Makefile
+++ b/sysdeps/powerpc/Makefile
@@ -23,4 +23,6 @@ endif
ifeq ($(subdir),csu)
# get offset to rtld_global._dl_hwcap
gen-as-const-headers += rtld-global-offsets.sym
+# get offset to __locale_struct.__ctype_tolower
+gen-as-const-headers += locale-defines.sym
endif
diff --git a/sysdeps/powerpc/fpu/e_hypot.c b/sysdeps/powerpc/fpu/e_hypot.c
index afbcc18e9e..3731c58a30 100644
--- a/sysdeps/powerpc/fpu/e_hypot.c
+++ b/sysdeps/powerpc/fpu/e_hypot.c
@@ -26,7 +26,7 @@ static const double two500 = 3.2733906078961419e+150;
static const double two600 = 4.149515568880993e+180;
static const double two1022 = 4.49423283715579e+307;
static const double twoM500 = 3.054936363499605e-151;
-static const double twoM600 = 4.616489308892868e-128;
+static const double twoM600 = 2.4099198651028841e-181;
static const double pdnum = 2.225073858507201e-308;
/* __ieee754_hypot(x,y)
@@ -115,3 +115,4 @@ __ieee754_hypot (double x, double y)
}
return __ieee754_sqrt (x * x + y * y);
}
+strong_alias (__ieee754_hypot, __hypot_finite)
diff --git a/sysdeps/powerpc/fpu/e_hypotf.c b/sysdeps/powerpc/fpu/e_hypotf.c
index 02ad7732b9..915738c4d5 100644
--- a/sysdeps/powerpc/fpu/e_hypotf.c
+++ b/sysdeps/powerpc/fpu/e_hypotf.c
@@ -116,3 +116,4 @@ __ieee754_hypotf (float x, float y)
}
return __ieee754_sqrtf (x * x + y * y);
}
+strong_alias (__ieee754_hypotf, __hypotf_finite)
diff --git a/sysdeps/powerpc/fpu/e_sqrt.c b/sysdeps/powerpc/fpu/e_sqrt.c
index e95b786a00..d59bd08d5c 100644
--- a/sysdeps/powerpc/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/fpu/e_sqrt.c
@@ -1,5 +1,5 @@
/* Double-precision floating point square root.
- Copyright (C) 1997, 2002, 2003, 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002-2004, 2008, 2011 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
@@ -46,21 +46,15 @@ extern const float __t_sqrt[1024];
generated guesses (which mostly runs on the integer unit, while the
Newton-Raphson is running on the FPU). */
-#ifdef __STDC__
double
__slow_ieee754_sqrt (double x)
-#else
-double
-__slow_ieee754_sqrt (x)
- double x;
-#endif
{
const float inf = a_inf.value;
if (x > 0)
{
/* schedule the EXTRACT_WORDS to get separation between the store
- and the load. */
+ and the load. */
ieee_double_shape_type ew_u;
ieee_double_shape_type iw_u;
ew_u.value = (x);
@@ -147,7 +141,7 @@ __slow_ieee754_sqrt (x)
else if (x < 0)
{
/* For some reason, some PowerPC32 processors don't implement
- FE_INVALID_SQRT. */
+ FE_INVALID_SQRT. */
#ifdef FE_INVALID_SQRT
feraiseexcept (FE_INVALID_SQRT);
@@ -160,14 +154,9 @@ __slow_ieee754_sqrt (x)
return f_wash (x);
}
-#ifdef __STDC__
+#undef __ieee754_sqrt
double
__ieee754_sqrt (double x)
-#else
-double
-__ieee754_sqrt (x)
- double x;
-#endif
{
double z;
@@ -175,7 +164,7 @@ __ieee754_sqrt (x)
if (__CPU_HAS_FSQRT)
{
/* Volatile is required to prevent the compiler from moving the
- fsqrt instruction above the branch. */
+ fsqrt instruction above the branch. */
__asm __volatile (" fsqrt %0,%1\n"
:"=f" (z):"f" (x));
}
@@ -184,3 +173,4 @@ __ieee754_sqrt (x)
return z;
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/fpu/e_sqrtf.c b/sysdeps/powerpc/fpu/e_sqrtf.c
index ca44fac559..9c6b860c96 100644
--- a/sysdeps/powerpc/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/fpu/e_sqrtf.c
@@ -1,5 +1,5 @@
/* Single-precision floating point square root.
- Copyright (C) 1997, 2003, 2004, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2004, 2008, 2011 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
@@ -46,14 +46,8 @@ extern const float __t_sqrt[1024];
generated guesses (which mostly runs on the integer unit, while the
Newton-Raphson is running on the FPU). */
-#ifdef __STDC__
float
__slow_ieee754_sqrtf (float x)
-#else
-float
-__slow_ieee754_sqrtf (x)
- float x;
-#endif
{
const float inf = a_inf.value;
@@ -123,7 +117,7 @@ __slow_ieee754_sqrtf (x)
else if (x < 0)
{
/* For some reason, some PowerPC32 processors don't implement
- FE_INVALID_SQRT. */
+ FE_INVALID_SQRT. */
#ifdef FE_INVALID_SQRT
feraiseexcept (FE_INVALID_SQRT);
@@ -136,15 +130,9 @@ __slow_ieee754_sqrtf (x)
return f_washf (x);
}
-
-#ifdef __STDC__
+#undef __ieee754_sqrtf
float
__ieee754_sqrtf (float x)
-#else
-float
-__ieee754_sqrtf (x)
- float x;
-#endif
{
double z;
@@ -152,7 +140,7 @@ __ieee754_sqrtf (x)
if (__CPU_HAS_FSQRT)
{
/* Volatile is required to prevent the compiler from moving the
- fsqrt instruction above the branch. */
+ fsqrt instruction above the branch. */
__asm __volatile (" fsqrts %0,%1\n"
:"=f" (z):"f" (x));
}
@@ -161,3 +149,4 @@ __ieee754_sqrtf (x)
return z;
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/fpu/math_private.h b/sysdeps/powerpc/fpu/math_private.h
index 90021c6d3c..c4dd217d1d 100644
--- a/sysdeps/powerpc/fpu/math_private.h
+++ b/sysdeps/powerpc/fpu/math_private.h
@@ -1,5 +1,5 @@
/* Private inline math functions for powerpc.
- Copyright (C) 2006
+ Copyright (C) 2006, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -25,12 +25,145 @@
#include <ldsodefs.h>
#include <dl-procinfo.h>
+#include <math/math_private.h>
+
# if __WORDSIZE == 64 || defined _ARCH_PWR4
# define __CPU_HAS_FSQRT 1
+
+#ifndef __ieee754_sqrt
+# define __ieee754_sqrt(x) \
+ ({ double __z; \
+ __asm __volatile ( \
+ " fsqrt %0,%1\n" \
+ : "=f" (__z) \
+ : "f"(x)); \
+ __z; })
+#endif
+#ifndef __ieee754_sqrtf
+# define __ieee754_sqrtf(x) \
+ ({ float __z; \
+ __asm __volatile ( \
+ " fsqrts %0,%1\n" \
+ : "=f" (__z) \
+ : "f"(x)); \
+ __z; })
+#endif
+
# else
# define __CPU_HAS_FSQRT ((GLRO(dl_hwcap) & PPC_FEATURE_64) != 0)
+# endif // __WORDSIZE == 64 || defined _ARCH_PWR4
+
+
+#if defined _ARCH_PWR5X
+
+# ifndef __round
+# define __round(x) \
+ ({ double __z; \
+ __asm __volatile ( \
+ " frin %0,%1\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
+# endif
+# ifndef __roundf
+# define __roundf(x) \
+ ({ float __z; \
+ __asm __volatile ( \
+ " frin %0,%1\n" \
+ " frsp %0,%0\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
+# endif
+
+# ifndef __trunc
+# define __trunc(x) \
+ ({ double __z; \
+ __asm __volatile ( \
+ " friz %0,%1\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
+# endif
+# ifndef __truncf
+# define __truncf(x) \
+ ({ float __z; \
+ __asm __volatile ( \
+ " friz %0,%1\n" \
+ " frsp %0,%0\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
+# endif
+
+# ifndef __ceil
+# define __ceil(x) \
+ ({ double __z; \
+ __asm __volatile ( \
+ " frip %0,%1\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
+# endif
+# ifndef __ceilf
+# define __ceilf(x) \
+ ({ float __z; \
+ __asm __volatile ( \
+ " frip %0,%1\n" \
+ " frsp %0,%0\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
# endif
+# ifndef __floor
+# define __floor(x) \
+ ({ double __z; \
+ __asm __volatile ( \
+ " frim %0,%1\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
+# endif
+# ifndef __floorf
+# define __floorf(x) \
+ ({ float __z; \
+ __asm __volatile ( \
+ " frim %0,%1\n" \
+ " frsp %0,%0\n" \
+ : "=f" (__z) \
+ : "f" (x)); \
+ __z; })
+# endif
+
+#endif /* defined _ARCH_PWR5X */
+
+
+#if defined _ARCH_PWR6
+
+# ifndef __copysign
+# define __copysign(x, y) \
+ ({ double __z; \
+ __asm __volatile ( \
+ " fcpsgn %0,%1,%2\n" \
+ : "=f" (__z) \
+ : "f" (y), "f" (x)); \
+ __z; })
+# endif
+# ifndef __copysignf
+# define __copysignf(x, y) \
+ ({ float __z; \
+ __asm __volatile ( \
+ " fcpsgn %0,%1,%2\n" \
+ " frsp %0,%0\n" \
+ : "=f" (__z) \
+ : "f" (y), "f" (x)); \
+ __z; })
+# endif
+
+#endif /* defined _ARCH_PWR6 */
+
+
# ifndef __LIBC_INTERNAL_MATH_INLINES
extern double __slow_ieee754_sqrt (double);
__inline double
@@ -78,6 +211,4 @@ __ieee754_sqrtf (float __x)
}
#endif /* __LIBC_INTERNAL_MATH_INLINES */
-#include <math/math_private.h>
-
#endif /* _PPC_MATH_PRIVATE_H_ */
diff --git a/sysdeps/powerpc/locale-defines.sym b/sysdeps/powerpc/locale-defines.sym
new file mode 100644
index 0000000000..af64b920a4
--- /dev/null
+++ b/sysdeps/powerpc/locale-defines.sym
@@ -0,0 +1,5 @@
+#include <locale/localeinfo.h>
+
+--
+
+LOCALE_CTYPE_TOLOWER offsetof (struct __locale_struct, __ctype_tolower)
diff --git a/sysdeps/powerpc/powerpc32/a2/memcpy.S b/sysdeps/powerpc/powerpc32/a2/memcpy.S
index 472f7a393b..f4c3c18414 100644
--- a/sysdeps/powerpc/powerpc32/a2/memcpy.S
+++ b/sysdeps/powerpc/powerpc32/a2/memcpy.S
@@ -1,5 +1,5 @@
/* Optimized memcpy implementation for PowerPC A2.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Michael Brutman <brutman@us.ibm.com>.
This file is part of the GNU C Library.
@@ -113,11 +113,9 @@ L(dst_aligned):
mflr r0
/* Establishes GOT addressability so we can load __cache_line_size
from static. This value was set from the aux vector during startup. */
- bcl 20,31,1f
-1:
- mflr r9
- addis r9,r9,__cache_line_size-1b@ha
- lwz r9,__cache_line_size-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,__cache_line_size-got_label@ha
+ lwz r9,__cache_line_size-got_label@l(r9)
mtlr r0
#else
/* Load __cache_line_size from static. This value was set from the
diff --git a/sysdeps/powerpc/powerpc32/dl-start.S b/sysdeps/powerpc/powerpc32/dl-start.S
index ae41f47ede..c2fcc37465 100644
--- a/sysdeps/powerpc/powerpc32/dl-start.S
+++ b/sysdeps/powerpc/powerpc32/dl-start.S
@@ -1,5 +1,6 @@
/* Machine-dependent ELF startup code. PowerPC version.
- Copyright (C) 1995-2000, 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2002, 2004, 2005, 2006, 2011
+ 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
@@ -47,10 +48,9 @@ _dl_start_user:
passed by value!). */
/* Put our GOT pointer in r31, */
- bcl 20,31,1f
-1: mflr r31
- addis r31,r31,_GLOBAL_OFFSET_TABLE_-1b@ha
- addi r31,r31,_GLOBAL_OFFSET_TABLE_-1b@l
+ SETUP_GOT_ACCESS(r31,got_label)
+ addis r31,r31,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r31,r31,_GLOBAL_OFFSET_TABLE_-got_label@l
/* the address of _start in r30, */
mr r30,r3
/* &_dl_argc in 29, &_dl_argv in 27, and _dl_loaded in 28. */
diff --git a/sysdeps/powerpc/powerpc32/elf/start.S b/sysdeps/powerpc/powerpc32/elf/start.S
index dc89a5e109..a26ba430f8 100644
--- a/sysdeps/powerpc/powerpc32/elf/start.S
+++ b/sysdeps/powerpc/powerpc32/elf/start.S
@@ -1,5 +1,5 @@
/* Startup code for programs linked with GNU libc.
- Copyright (C) 1998,1999,2000,2001,2002,2003,2009
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2009, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -59,10 +59,8 @@ ENTRY(_start)
/* Set up an initial stack frame, and clear the LR. */
clrrwi r1,r1,4
#ifdef PIC
- bcl 20,31,L(branch)
-L(branch):
+ SETUP_GOT_ACCESS(r13,got_label)
li r0,0
- mflr r13
#else
li r0,0
#endif
@@ -73,10 +71,10 @@ L(branch):
start_addresses in r8. Also load the GOT pointer so that new PLT
calls work, like the one to __libc_start_main. */
#ifdef PIC
- addis r30,r13,_GLOBAL_OFFSET_TABLE_-L(branch)@ha
- addis r8,r13,L(start_addresses)-L(branch)@ha
- addi r30,r30,_GLOBAL_OFFSET_TABLE_-L(branch)@l
- lwzu r13,L(start_addresses)-L(branch)@l(r8)
+ addis r30,r13,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addis r8,r13,L(start_addresses)-got_label@ha
+ addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
+ lwzu r13, L(start_addresses)-got_label@l(r8)
#else
lis r8,L(start_addresses)@ha
lwzu r13,L(start_addresses)@l(r8)
diff --git a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
index e1ac064a59..b509ef3b31 100644
--- a/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/fpu/__longjmp-common.S
@@ -1,5 +1,6 @@
/* longjmp for PowerPC.
- Copyright (C) 1995-99, 2000, 2003-2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1995-99, 2000, 2003-2006, 2009, 2011
+ 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
@@ -34,10 +35,9 @@ ENTRY (BP_SYM (__longjmp))
# ifdef PIC
mflr r6
cfi_register (lr,r6)
- bcl 20,31,1f
-1: mflr r5
- addis r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha
- addi r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l
+ SETUP_GOT_ACCESS(r5,got_label)
+ addis r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@l
# ifdef SHARED
lwz r5,_rtld_global_ro@got(r5)
mtlr r6
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S b/sysdeps/powerpc/powerpc32/fpu/s_ceil.S
index 80e72ca2bd..a231448d37 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_ceil.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_ceil.S
@@ -1,5 +1,5 @@
/* ceil function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -31,10 +31,9 @@ ENTRY (__ceil)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S
index ce6d71e4f8..bfd5c61e6d 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_ceilf.S
@@ -1,5 +1,5 @@
/* float ceil function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -30,10 +30,9 @@ ENTRY (__ceilf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_floor.S b/sysdeps/powerpc/powerpc32/fpu/s_floor.S
index 0dd0dbe6c0..73971acb46 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_floor.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_floor.S
@@ -1,5 +1,5 @@
/* Floor function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -31,10 +31,9 @@ ENTRY (__floor)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_floorf.S b/sysdeps/powerpc/powerpc32/fpu/s_floorf.S
index 98a47458bc..562349e172 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_floorf.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_floorf.S
@@ -1,5 +1,5 @@
/* float Floor function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -30,10 +30,9 @@ ENTRY (__floorf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_lround.S b/sysdeps/powerpc/powerpc32/fpu/s_lround.S
index 3bf1ffaea1..b29ee9d288 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_lround.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_lround.S
@@ -1,5 +1,5 @@
/* lround function. PowerPC32 version.
- Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2007, 2008, 2011 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
@@ -45,10 +45,9 @@ ENTRY (__lround)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp10,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp10,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S b/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S
new file mode 100644
index 0000000000..0102aa3318
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/s_nearbyint.S
@@ -0,0 +1,80 @@
+/* Round to int floating-point values. PowerPC32 version.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011
+
+ 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., 1 Franklin Street, Fifth Floor, Boston MA
+ 02110-1301 USA. */
+
+/* This has been coded in assembler because GCC makes such a mess of it
+ when it's coded in C. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+
+/* double [fp1] nearbyint(double [fp1] x) */
+
+ .section .rodata.cst4,"aM",@progbits,4
+ .align 2
+.LC0: /* 2**52 */
+ .long 0x59800000 /* TWO52: 2**52 */
+
+ .section ".text"
+ENTRY (__nearbyint)
+#ifdef SHARED
+ mflr r11
+ cfi_register(lr,r11)
+ bcl 20,31,1f
+1: mflr r9
+ addis r9,r9,.LC0-1b@ha
+ lfs fp13,.LC0-1b@l(r9)
+ mtlr r11
+ cfi_same_value (lr)
+#else
+ lis r9,.LC0@ha
+ lfs fp13,.LC0@l(r9)
+#endif
+ fabs fp0,fp1
+ fsub fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52 */
+ bgelr cr7
+ fcmpu cr7,fp1,fp12 /* if (x > 0.0 */
+ ble cr7,L(lessthanzero)
+ mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
+ fadd fp0,fp1,fp13 /* x += TWO52 */
+ fsub fp1,fp0,fp13 /* x -= TWO52 */
+ fabs fp1,fp1 /* if (x == 0.0 */
+ mtfsb0 4*cr1+eq /* Clear any FE_INEXACT exception */
+ blr
+L(lessthanzero):
+ bgelr cr7
+ mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
+ fsub fp0,fp13,fp1 /* x -= TWO52 */
+ fsub fp0,fp0,fp13 /* x += TWO52 */
+ fneg fp1,fp0 /* if (x == 0.0) */
+ mtfsb0 4*cr1+eq /* Clear any FE_INEXACT exception */
+ blr
+END (__nearbyint)
+
+weak_alias (__nearbyint, nearbyint)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__nearbyint, nearbyintl)
+strong_alias (__nearbyint, __nearbyintl)
+#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0)
+#endif
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S b/sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S
new file mode 100644
index 0000000000..519022806b
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/fpu/s_nearbyintf.S
@@ -0,0 +1,70 @@
+/* Round to int floating-point values. PowerPC32 version.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011
+
+ 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., 1 Franklin Street, Fifth Floor, Boston MA
+ 02110-1301 USA. */
+
+/* This has been coded in assembler because GCC makes such a mess of it
+ when it's coded in C. */
+
+#include <sysdep.h>
+
+
+/* float [fp1] nearbyintf(float [fp1] x) */
+
+ .section .rodata.cst4,"aM",@progbits,4
+ .align 2
+.LC0:
+ .long 0x4B000000 /* TWO23: 2**23 */
+
+ .section ".text"
+ENTRY (__nearbyintf)
+#ifdef SHARED
+ mflr r11
+ cfi_register(lr,r11)
+ bcl 20,31,1f
+1: mflr r9
+ addis r9,r9,.LC0-1b@ha
+ lfs fp13,.LC0-1b@l(r9)
+ mtlr r11
+ cfi_same_value (lr)
+#else
+ lis r9,.LC0@ha
+ lfs fp13,.LC0@l(r9)
+#endif
+ fabs fp0,fp1
+ fsub fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO23 */
+ bgelr cr7
+ fcmpu cr7,fp1,fp12 /* if (x > 0.0 */
+ ble cr7,L(lessthanzero)
+ mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
+ fadds fp0,fp1,fp13 /* x += TWO23 */
+ fsubs fp1,fp0,fp13 /* x -= TWO23 */
+ mtfsb0 4*cr1+eq /* Clear any FE_INEXACT exception */
+ blr
+L(lessthanzero):
+ bgelr cr7
+ mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
+ fsubs fp0,fp13,fp1 /* x -= TWO23 */
+ fsubs fp0,fp0,fp13 /* x += TWO23 */
+ fneg fp1,fp0 /* if (x == 0.0) */
+ mtfsb0 4*cr1+eq /* Clear any FE_INEXACT exception */
+ blr
+END (__nearbyintf)
+
+weak_alias (__nearbyintf, nearbyintf)
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_rint.S b/sysdeps/powerpc/powerpc32/fpu/s_rint.S
index 93133718ad..17cd0bd90d 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_rint.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_rint.S
@@ -1,5 +1,5 @@
/* Round to int floating-point values. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -33,10 +33,9 @@ ENTRY (__rint)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_rintf.S b/sysdeps/powerpc/powerpc32/fpu/s_rintf.S
index 1e0fbb1f0d..d5115bc253 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_rintf.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_rintf.S
@@ -1,5 +1,5 @@
/* Round float to int floating-point values. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -29,10 +29,9 @@ ENTRY (__rintf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_round.S b/sysdeps/powerpc/powerpc32/fpu/s_round.S
index 48b346e651..dcb8dbedc2 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_round.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_round.S
@@ -1,5 +1,5 @@
/* round function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -43,10 +43,9 @@ ENTRY (__round)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- addi r9,r9,.LC0-1b@l
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ addi r9,r9,.LC0-got_label@l
mtlr r11
cfi_same_value (lr)
lfs fp13,0(r9)
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_roundf.S b/sysdeps/powerpc/powerpc32/fpu/s_roundf.S
index 88125aad06..0da9251247 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_roundf.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_roundf.S
@@ -1,5 +1,5 @@
/* roundf function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,10 +42,9 @@ ENTRY (__roundf )
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- addi r9,r9,.LC0-1b@l
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ addi r9,r9,.LC0-got_label@l
mtlr r11
cfi_same_value (lr)
lfs fp13,0(r9)
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S
index c3c021716a..b731cb7c82 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_trunc.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_trunc.S
@@ -1,5 +1,5 @@
/* trunc function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -38,10 +38,9 @@ ENTRY (__trunc)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/s_truncf.S b/sysdeps/powerpc/powerpc32/fpu/s_truncf.S
index eddef070cd..e14ec1b5d2 100644
--- a/sysdeps/powerpc/powerpc32/fpu/s_truncf.S
+++ b/sysdeps/powerpc/powerpc32/fpu/s_truncf.S
@@ -1,5 +1,5 @@
/* truncf function. PowerPC32 version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2011 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
@@ -37,10 +37,9 @@ ENTRY (__truncf)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfs fp13,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfs fp13,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
#else
diff --git a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
index 131e7a332e..90e20ba57a 100644
--- a/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc32/fpu/setjmp-common.S
@@ -1,5 +1,5 @@
/* setjmp for PowerPC.
- Copyright (C) 1995-2000, 2003-2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2003-2005, 2006, 2011 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
@@ -85,10 +85,9 @@ ENTRY (BP_SYM (__sigsetjmp))
# ifdef PIC
mflr r6
cfi_register(lr,r6)
- bcl 20,31,1f
-1: mflr r5
- addis r5,r5,_GLOBAL_OFFSET_TABLE_-1b@ha
- addi r5,r5,_GLOBAL_OFFSET_TABLE_-1b@l
+ SETUP_GOT_ACCESS(r5,got_label)
+ addis r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r5,r5,_GLOBAL_OFFSET_TABLE_-got_label@l
mtlr r6
cfi_same_value (lr)
# ifdef SHARED
diff --git a/sysdeps/powerpc/powerpc32/memset.S b/sysdeps/powerpc/powerpc32/memset.S
index b4ce218e24..9803e7efd8 100644
--- a/sysdeps/powerpc/powerpc32/memset.S
+++ b/sysdeps/powerpc/powerpc32/memset.S
@@ -1,5 +1,6 @@
/* Optimized memset implementation for PowerPC.
- Copyright (C) 1997, 1999, 2000, 2003, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000, 2003, 2007, 2011
+ 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
@@ -256,10 +257,9 @@ L(checklinesize):
beq L(medium)
/* Establishes GOT addressability so we can load __cache_line_size
from static. This value was set from the aux vector during startup. */
- bcl 20,31,1f
-1: mflr rGOT
- addis rGOT,rGOT,__cache_line_size-1b@ha
- lwz rCLS,__cache_line_size-1b@l(rGOT)
+ SETUP_GOT_ACCESS(rGOT,got_label)
+ addis rGOT,rGOT,__cache_line_size-got_label@ha
+ lwz rCLS,__cache_line_size-got_label@l(rGOT)
mtlr rTMP
#else
/* Load __cache_line_size from static. This value was set from the
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
index b03e041d8a..591fcfb3c2 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
@@ -1,5 +1,5 @@
/* llround function. PowerPC32 on PowerPC64 version.
- Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2006, 2007, 2008, 2011 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
@@ -53,10 +53,9 @@ ENTRY (__llround)
#ifdef SHARED
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- addi r9,r9,.LC0-1b@l
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ addi r9,r9,.LC0-got_label@l
mtlr r11
cfi_same_value (lr)
lfd fp9,0(r9)
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S
index c03dfa37f7..e04968e6fe 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrt.S
@@ -63,11 +63,9 @@ EALIGN (__sqrt, 5, 0)
cfi_offset(lr,20-16)
cfi_offset(r30,8-16)
#ifdef SHARED
- bcl 20,31,.LCF1
-.LCF1:
- mflr r30
- addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
- addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
+ SETUP_GOT_ACCESS(r30,got_label)
+ addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
#else
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S
index 050323da59..356d3edacb 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/w_sqrtf.S
@@ -63,11 +63,9 @@ EALIGN (__sqrtf, 5, 0)
cfi_offset(lr,20-16)
cfi_offset(r30,8-16)
#ifdef SHARED
- bcl 20,31,.LCF1
-.LCF1:
- mflr r30
- addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
- addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
+ SETUP_GOT_ACCESS(r30,got_label)
+ addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
#else
diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S
index 1c0f70dc54..f89b651e41 100644
--- a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S
+++ b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrt.S
@@ -63,11 +63,9 @@ EALIGN (__sqrt, 5, 0)
cfi_offset(lr,20-16)
cfi_offset(r30,8-16)
#ifdef SHARED
- bcl 20,31,.LCF1
-.LCF1:
- mflr r30
- addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
- addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
+ SETUP_GOT_ACCESS(r30,got_label)
+ addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
#else
diff --git a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S
index e638cc102b..e9dde1676b 100644
--- a/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S
+++ b/sysdeps/powerpc/powerpc32/power5/fpu/w_sqrtf.S
@@ -63,11 +63,9 @@ EALIGN (__sqrtf, 5, 0)
cfi_offset(lr,20-16)
cfi_offset(r30,8-16)
#ifdef SHARED
- bcl 20,31,.LCF1
-.LCF1:
- mflr r30
- addis r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@ha
- addi r30,r30,_GLOBAL_OFFSET_TABLE_-.LCF1@l
+ SETUP_GOT_ACCESS(r30,got_label)
+ addis r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r30,r30,_GLOBAL_OFFSET_TABLE_-got_label@l
lwz r9,_LIB_VERSION@got(30)
lwz r0,0(r9)
#else
diff --git a/sysdeps/powerpc/powerpc32/power7/Makefile b/sysdeps/powerpc/powerpc32/power7/Makefile
new file mode 100644
index 0000000000..5e8f4a28ba
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/power7/Makefile
@@ -0,0 +1,4 @@
+ifeq ($(subdir),string)
+CFLAGS-strncase.c += -funroll-loops
+CFLAGS-strncase_l.c += -funroll-loops
+endif
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
index 5b0d950c74..40e6679d11 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_finite.S
@@ -1,5 +1,5 @@
/* finite(). PowerPC32/POWER7 version.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
@@ -35,10 +35,9 @@ ENTRY (__finite)
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfd fp0,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfd fp0,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
index 2979534911..a026583a1f 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_isinf.S
@@ -1,5 +1,5 @@
/* isinf(). PowerPC32/POWER7 version.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
@@ -35,10 +35,9 @@ ENTRY (__isinf)
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfd fp0,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfd fp0,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
diff --git a/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S b/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
index 852539f24b..123260bbba 100644
--- a/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
+++ b/sysdeps/powerpc/powerpc32/power7/fpu/s_isnan.S
@@ -1,5 +1,5 @@
/* isnan(). PowerPC32/POWER7 version.
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Luis Machado <luisgpm@br.ibm.com>.
This file is part of the GNU C Library.
@@ -35,10 +35,9 @@ ENTRY (__isnan)
mflr r11
cfi_register(lr,r11)
- bcl 20,31,1f
-1: mflr r9
- addis r9,r9,.LC0-1b@ha
- lfd fp0,.LC0-1b@l(r9)
+ SETUP_GOT_ACCESS(r9,got_label)
+ addis r9,r9,.LC0-got_label@ha
+ lfd fp0,.LC0-got_label@l(r9)
mtlr r11
cfi_same_value (lr)
diff --git a/sysdeps/powerpc/powerpc32/power7/strcasecmp.S b/sysdeps/powerpc/powerpc32/power7/strcasecmp.S
new file mode 100644
index 0000000000..5d84fce470
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/power7/strcasecmp.S
@@ -0,0 +1,132 @@
+/* Optimized strcasecmp implementation for PowerPC32.
+ Copyright (C) 2011 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 <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+#include <locale-defines.h>
+
+/* int [r3] strcasecmp (const char *s1 [r3], const char *s2 [r4] )
+
+ or if defined USE_IN_EXTENDED_LOCALE_MODEL:
+
+ int [r3] strcasecmp_l (const char *s1 [r3], const char *s2 [r4],
+ __locale_t loc [r5]) */
+
+#ifndef STRCMP
+# define __STRCMP __strcasecmp
+# define STRCMP strcasecmp
+#endif
+
+ENTRY (BP_SYM (__STRCMP))
+
+#define rRTN r3 /* Return value */
+#define rSTR1 r5 /* 1st string */
+#define rSTR2 r4 /* 2nd string */
+#define rLOCARG r5 /* 3rd argument: locale_t */
+#define rCHAR1 r6 /* Byte readed from 1st string */
+#define rCHAR2 r7 /* Byte readed from 2nd string */
+#define rADDR1 r8 /* Address of tolower(rCHAR1) */
+#define rADDR2 r12 /* Address of tolower(rCHAR2) */
+#define rLWR1 r8 /* Byte tolower(rCHAR1) */
+#define rLWR2 r12 /* Byte tolower(rCHAR2) */
+#define rTMP r0
+#define rGOT r9 /* Address of the Global Offset Table */
+#define rLOC r11 /* Default locale address */
+
+ cmpw cr7, r3, r4
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+# ifdef SHARED
+ mflr rTMP
+ bcl 20,31,.L1
+.L1: mflr rGOT
+ addis rGOT, rGOT, _GLOBAL_OFFSET_TABLE_-.L1@ha
+ addi rGOT, rGOT, _GLOBAL_OFFSET_TABLE_-.L1@l
+ lwz rLOC, __libc_tsd_LOCALE@got@tprel(rGOT)
+ add rLOC, rLOC, __libc_tsd_LOCALE@tls
+ lwz rLOC, 0(rLOC)
+ mtlr rTMP
+# else
+ lis rTMP,_GLOBAL_OFFSET_TABLE_@ha
+ la rLOC,_GLOBAL_OFFSET_TABLE_@l(rTMP)
+ lwz rLOC, __libc_tsd_LOCALE@got@tprel(rGOT)
+ add rLOC, rLOC, __libc_tsd_LOCALE@tls
+ lwz rLOC, 0(rLOC)
+# endif /* SHARED */
+#else
+ mr rLOC, rLOCARG
+#endif
+ mr rSTR1, rRTN
+ lwz rLOC, LOCALE_CTYPE_TOLOWER(rLOC)
+ li rRTN, 0
+ beqlr cr7
+
+ /* Unrolling loop for POWER: loads are done with 'lbz' plus
+ offset and string descriptors are only updated in the end
+ of loop unrolling. */
+
+L(loop):
+ lbz rCHAR1, 0(rSTR1) /* Load char from s1 */
+ lbz rCHAR2, 0(rSTR2) /* Load char from s2 */
+ sldi rADDR1, rCHAR1, 2 /* Calculate address for tolower(*s1) */
+ sldi rADDR2, rCHAR2, 2 /* Calculate address for tolower(*s2) */
+ lwzx rLWR1, rLOC, rADDR1 /* Load tolower(*s1) */
+ lwzx rLWR2, rLOC, rADDR2 /* Load tolower(*s2) */
+ cmpwi cr7, rCHAR1, 0 /* *s1 == '\0' ? */
+ subf. r3, rLWR2, rLWR1
+ bnelr
+ beqlr cr7
+ lbz rCHAR1, 1(rSTR1)
+ lbz rCHAR2, 1(rSTR2)
+ sldi rADDR1, rCHAR1, 2
+ sldi rADDR2, rCHAR2, 2
+ lwzx rLWR1, rLOC, rADDR1
+ lwzx rLWR2, rLOC, rADDR2
+ cmpwi cr7, rCHAR1, 0
+ subf. r3, rLWR2, rLWR1
+ bnelr
+ beqlr cr7
+ lbz rCHAR1, 2(rSTR1)
+ lbz rCHAR2, 2(rSTR2)
+ sldi rADDR1, rCHAR1, 2
+ sldi rADDR2, rCHAR2, 2
+ lwzx rLWR1, rLOC, rADDR1
+ lwzx rLWR2, rLOC, rADDR2
+ cmpwi cr7, rCHAR1, 0
+ subf. r3, rLWR2, rLWR1
+ bnelr
+ beqlr cr7
+ lbz rCHAR1, 3(rSTR1)
+ lbz rCHAR2, 3(rSTR2)
+ /* Increment both string descriptors */
+ addi rSTR1, rSTR1, 4
+ addi rSTR2, rSTR2, 4
+ sldi rADDR1, rCHAR1, 2
+ sldi rADDR2, rCHAR2, 2
+ lwzx rLWR1, rLOC, rADDR1
+ lwzx rLWR2, rLOC, rADDR2
+ cmpwi cr7, rCHAR1, 0
+ subf. r3, rLWR2, rLWR1
+ bnelr
+ bne cr7,L(loop)
+ blr
+END (BP_SYM (__STRCMP))
+
+weak_alias (BP_SYM (__STRCMP), BP_SYM (STRCMP))
+libc_hidden_builtin_def (__STRCMP)
diff --git a/sysdeps/powerpc/powerpc32/power7/strcasecmp_l.S b/sysdeps/powerpc/powerpc32/power7/strcasecmp_l.S
new file mode 100644
index 0000000000..c13c4ebcb8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc32/power7/strcasecmp_l.S
@@ -0,0 +1,5 @@
+#define USE_IN_EXTENDED_LOCALE_MODEL
+#define STRCMP strcasecmp_l
+#define __STRCMP __strcasecmp_l
+
+#include "strcasecmp.S"
diff --git a/sysdeps/powerpc/powerpc32/sysdep.h b/sysdeps/powerpc/powerpc32/sysdep.h
index 88cfe71e0b..c824c0a85d 100644
--- a/sysdeps/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/powerpc/powerpc32/sysdep.h
@@ -1,5 +1,6 @@
/* Assembly macros for 32-bit PowerPC.
- Copyright (C) 1999, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2001, 2002, 2003, 2006, 2011
+ 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
@@ -46,6 +47,13 @@
cfi_startproc; \
CALL_MCOUNT
+/* helper macro for accessing the 32-bit powerpc GOT. */
+
+#define SETUP_GOT_ACCESS(regname,GOT_LABEL) \
+ bcl 20,31,GOT_LABEL ; \
+GOT_LABEL: ; \
+ mflr (regname)
+
#define EALIGN_W_0 /* No words to insert. */
#define EALIGN_W_1 nop
#define EALIGN_W_2 nop;nop
diff --git a/sysdeps/powerpc/powerpc64/fpu/e_sqrt.c b/sysdeps/powerpc/powerpc64/fpu/e_sqrt.c
index 0a229cbe27..66d04ceb77 100644
--- a/sysdeps/powerpc/powerpc64/fpu/e_sqrt.c
+++ b/sysdeps/powerpc/powerpc64/fpu/e_sqrt.c
@@ -1,5 +1,5 @@
/* Double-precision floating point square root.
- Copyright (C) 1997, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002-2004, 2006, 2011 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
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
+#undef __ieee754_sqrt
double
__ieee754_sqrt (double x)
{
@@ -27,3 +28,4 @@ __ieee754_sqrt (double x)
__asm __volatile ("fsqrt %0,%1" : "=f" (z) : "f" (x));
return z;
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c b/sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c
index 0f17a64a8a..847a2e4ad6 100644
--- a/sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c
+++ b/sysdeps/powerpc/powerpc64/fpu/e_sqrtf.c
@@ -1,5 +1,5 @@
/* Single-precision floating point square root.
- Copyright (C) 1997, 2003, 2004, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2003, 2004, 2006, 2011 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
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
+#undef __ieee754_sqrtf
float
__ieee754_sqrtf (float x)
{
@@ -27,3 +28,4 @@ __ieee754_sqrtf (float x)
__asm ("fsqrts %0,%1" : "=f" (z) : "f" (x));
return z;
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S
new file mode 100644
index 0000000000..436160f48e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S
@@ -0,0 +1,68 @@
+/* Round to int floating-point values. PowerPC64 version.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011
+
+ 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. */
+
+/* This has been coded in assembler because GCC makes such a mess of it
+ when it's coded in C. */
+
+#include <sysdep.h>
+#include <math_ldbl_opt.h>
+
+
+/* double [fp1] nearbyint(double [fp1] x) */
+
+ .section ".toc","aw"
+.LC0: /* 2**52 */
+ .tc FD_43300000_0[TC],0x4330000000000000
+ .section ".text"
+
+EALIGN (__nearbyint, 4, 0)
+ CALL_MCOUNT 0
+ fabs fp0,fp1
+ lfd fp13,.LC0@toc(2)
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
+ bgelr cr7
+ fsub fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp1,fp12 /* if (x > 0.0) */
+ ble cr7, L(lessthanzero)
+ mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
+ fadd fp1,fp1,fp13 /* x+= TWO52 */
+ fsub fp1,fp1,fp13 /* x-= TWO52 */
+ fabs fp1,fp1 /* if (x == 0.0) */
+ mtfsb0 4*cr1+eq /* Clear any FE_INEXACT exception */
+ blr /* x = 0.0; */
+L(lessthanzero):
+ bgelr cr7 /* if (x < 0.0) */
+ mtfsb0 4*cr7+lt
+ fsub fp1,fp1,fp13 /* x -= TWO52 */
+ fadd fp1,fp1,fp13 /* x += TWO52 */
+ fnabs fp1,fp1 /* if (x == 0.0) */
+ mtfsb0 4*cr1+eq
+ blr /* x = -0.0; */
+END (__nearbyint)
+
+weak_alias (__nearbyint, nearbyint)
+
+#ifdef NO_LONG_DOUBLE
+weak_alias (__nearbyint, nearbyint)
+strong_alias (__nearbyint, __nearbyintl)
+#endif
+#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)
+compat_symbol (libm, __nearbyint, nearbyintl, GLIBC_2_0)
+#endif
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
new file mode 100644
index 0000000000..c337e7937f
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S
@@ -0,0 +1,59 @@
+/* Round to int floating-point values. PowerPC64 version.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Adhemerval Zanella <azanella@br.ibm.com>, 2011
+
+ 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. */
+
+/* This has been coded in assembler because GCC makes such a mess of it
+ when it's coded in C. */
+
+#include <sysdep.h>
+
+
+/* float [fp1] nearbyintf(float [fp1]) */
+
+ .section ".toc","aw"
+.LC0: /* 2**23 */
+ .tc FD_4b000000_0[TC],0x4b00000000000000
+ .section ".text"
+
+EALIGN (__nearbyintf, 4, 0)
+ CALL_MCOUNT 0
+ fabs fp0,fp1
+ lfs fp13,.LC0@toc(2)
+ fcmpu cr7,fp0,fp13 /* if (fabs(x) > TWO52) */
+ bgelr cr7
+ fsubs fp12,fp13,fp13 /* generate 0.0 */
+ fcmpu cr7,fp1,fp12 /* if (x > 0.0) */
+ ble cr7, L(lessthanzero)
+ mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
+ fadds fp1,fp1,fp13 /* x += TWO23 */
+ fsubs fp1,fp1,fp13 /* x -= TWO23 */
+ fabs fp1,fp1 /* if (x == 0.0) */
+ mtfsb0 4*cr1+eq /* Clear pending FE_INEXACT exception */
+ blr /* x = 0.0; */
+L(lessthanzero):
+ bgelr cr7 /* if (x < 0.0) */
+ mtfsb0 4*cr7+lt /* Disable FE_INEXACT exception */
+ fsubs fp1,fp1,fp13 /* x -= TWO23 */
+ fadds fp1,fp1,fp13 /* x += TWO23 */
+ fnabs fp1,fp1 /* if (x == 0.0) */
+ mtfsb0 4*cr1+eq /* Clear pending FE_INEXACT exception */
+ blr /* x = -0.0; */
+END (__nearbyintf)
+
+weak_alias (__nearbyintf, nearbyintf)
diff --git a/sysdeps/powerpc/powerpc64/power7/Makefile b/sysdeps/powerpc/powerpc64/power7/Makefile
index b0f45205b9..40aacfa15a 100644
--- a/sysdeps/powerpc/powerpc64/power7/Makefile
+++ b/sysdeps/powerpc/powerpc64/power7/Makefile
@@ -3,3 +3,8 @@ ifeq ($(subdir),elf)
# optimization may require a TOC reference before relocations are resolved.
CFLAGS-rtld.c += -mno-vsx
endif
+
+ifeq ($(subdir),string)
+CFLAGS-strncase.c += -funroll-loops
+CFLAGS-strncase_l.c += -funroll-loops
+endif
diff --git a/sysdeps/powerpc/powerpc64/power7/strcasecmp.S b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
new file mode 100644
index 0000000000..1477b2e17e
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
@@ -0,0 +1,125 @@
+/* Optimized strcasecmp implementation for PowerPC64.
+ Copyright (C) 2011 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 <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
+#include <locale-defines.h>
+
+/* int [r3] strcasecmp (const char *s1 [r3], const char *s2 [r4] )
+
+ or if defined USE_IN_EXTENDED_LOCALE_MODEL:
+
+ int [r3] strcasecmp_l (const char *s1 [r3], const char *s2 [r4],
+ __locale_t loc [r5]) */
+
+#ifndef STRCMP
+# define __STRCMP __strcasecmp
+# define STRCMP strcasecmp
+#endif
+
+ENTRY (BP_SYM (__STRCMP))
+ CALL_MCOUNT 2
+
+#define rRTN r3 /* Return value */
+#define rSTR1 r5 /* 1st string */
+#define rSTR2 r4 /* 2nd string */
+#define rLOCARG r5 /* 3rd argument: locale_t */
+#define rCHAR1 r6 /* Byte readed from 1st string */
+#define rCHAR2 r7 /* Byte readed from 2nd string */
+#define rADDR1 r8 /* Address of tolower(rCHAR1) */
+#define rADDR2 r12 /* Address of tolower(rCHAR2) */
+#define rLWR1 r8 /* Word tolower(rCHAR1) */
+#define rLWR2 r12 /* Word tolower(rCHAR2) */
+#define rTMP r9
+#define rLOC r11 /* Default locale address */
+
+ cmpd cr7, r3, r4
+#ifndef USE_IN_EXTENDED_LOCALE_MODEL
+ ld rTMP, __libc_tsd_LOCALE@got@tprel(r2)
+ add rLOC, rTMP, __libc_tsd_LOCALE@tls
+ ld rLOC, 0(rLOC)
+#else
+ mr rLOC, rLOCARG
+#endif
+ ld rLOC, LOCALE_CTYPE_TOLOWER(rLOC)
+ mr rSTR1, rRTN
+ li rRTN, 0
+ beqlr cr7
+
+
+ /* Unrolling loop for POWER: loads are done with 'lbz' plus
+ offset and string descriptors are only updated in the end
+ of loop unrolling. */
+
+ lbz rCHAR1, 0(rSTR1) /* Load char from s1 */
+ lbz rCHAR2, 0(rSTR2) /* Load char from s2 */
+L(loop):
+ cmpdi rCHAR1, 0 /* *s1 == '\0' ? */
+ sldi rADDR1, rCHAR1, 2 /* Calculate address for tolower(*s1) */
+ sldi rADDR2, rCHAR2, 2 /* Calculate address for tolower(*s2) */
+ lwzx rLWR1, rLOC, rADDR1 /* Load tolower(*s1) */
+ lwzx rLWR2, rLOC, rADDR2 /* Load tolower(*s2) */
+ cmpw cr1, rLWR1, rLWR2 /* r = tolower(*s1) == tolower(*s2) ? */
+ crorc 4*cr1+eq,eq,4*cr1+eq /* (*s1 != '\0') || (r == 1) */
+ beq cr1, L(done)
+ lbz rCHAR1, 1(rSTR1)
+ lbz rCHAR2, 1(rSTR2)
+ cmpdi rCHAR1, 0
+ sldi rADDR1, rCHAR1, 2
+ sldi rADDR2, rCHAR2, 2
+ lwzx rLWR1, rLOC, rADDR1
+ lwzx rLWR2, rLOC, rADDR2
+ cmpw cr1, rLWR1, rLWR2
+ crorc 4*cr1+eq,eq,4*cr1+eq
+ beq cr1, L(done)
+ lbz rCHAR1, 2(rSTR1)
+ lbz rCHAR2, 2(rSTR2)
+ cmpdi rCHAR1, 0
+ sldi rADDR1, rCHAR1, 2
+ sldi rADDR2, rCHAR2, 2
+ lwzx rLWR1, rLOC, rADDR1
+ lwzx rLWR2, rLOC, rADDR2
+ cmpw cr1, rLWR1, rLWR2
+ crorc 4*cr1+eq,eq,4*cr1+eq
+ beq cr1, L(done)
+ lbz rCHAR1, 3(rSTR1)
+ lbz rCHAR2, 3(rSTR2)
+ cmpdi rCHAR1, 0
+ /* Increment both string descriptors */
+ addi rSTR1, rSTR1, 4
+ addi rSTR2, rSTR2, 4
+ sldi rADDR1, rCHAR1, 2
+ sldi rADDR2, rCHAR2, 2
+ lwzx rLWR1, rLOC, rADDR1
+ lwzx rLWR2, rLOC, rADDR2
+ cmpw cr1, rLWR1, rLWR2
+ crorc 4*cr1+eq,eq,4*cr1+eq
+ beq cr1,L(done)
+ lbz rCHAR1, 0(rSTR1) /* Load char from s1 */
+ lbz rCHAR2, 0(rSTR2) /* Load char from s2 */
+ b L(loop)
+L(done):
+ subf r0, rLWR2, rLWR1
+ extsw rRTN, r0
+ blr
+END (BP_SYM (__STRCMP))
+
+weak_alias (BP_SYM (__STRCMP), BP_SYM (STRCMP))
+libc_hidden_builtin_def (__STRCMP)
diff --git a/sysdeps/powerpc/powerpc64/power7/strcasecmp_l.S b/sysdeps/powerpc/powerpc64/power7/strcasecmp_l.S
new file mode 100644
index 0000000000..c13c4ebcb8
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power7/strcasecmp_l.S
@@ -0,0 +1,5 @@
+#define USE_IN_EXTENDED_LOCALE_MODEL
+#define STRCMP strcasecmp_l
+#define __STRCMP __strcasecmp_l
+
+#include "strcasecmp.S"
diff --git a/sysdeps/s390/bits/byteswap.h b/sysdeps/s390/bits/byteswap.h
index 4bfd5fa064..0e0346bba4 100644
--- a/sysdeps/s390/bits/byteswap.h
+++ b/sysdeps/s390/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values. s390 version.
- Copyright (C) 2000, 2001, 2002, 2003, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2008, 2011 Free Software Foundation, Inc.
Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
This file is part of the GNU C Library.
@@ -35,31 +35,31 @@
# if __WORDSIZE == 64
# define __bswap_16(x) \
(__extension__ \
- ({ unsigned short int __v, __x = (x); \
+ ({ unsigned short int __v, __x = (x); \
if (__builtin_constant_p (x)) \
__v = __bswap_constant_16 (__x); \
else { \
- unsigned short int __tmp = (unsigned short int) (__x); \
- __asm__ __volatile__ ( \
- "lrvh %0,%1" \
- : "=&d" (__v) : "m" (__tmp) ); \
- } \
+ unsigned short int __tmp = (unsigned short int) (__x); \
+ __asm__ __volatile__ ( \
+ "lrvh %0,%1" \
+ : "=&d" (__v) : "m" (__tmp) ); \
+ } \
__v; }))
# else
# define __bswap_16(x) \
(__extension__ \
- ({ unsigned short int __v, __x = (x); \
+ ({ unsigned short int __v, __x = (x); \
if (__builtin_constant_p (x)) \
__v = __bswap_constant_16 (__x); \
else { \
- unsigned short int __tmp = (unsigned short int) (__x); \
- __asm__ __volatile__ ( \
- "sr %0,%0\n" \
- "la 1,%1\n" \
- "icm %0,2,1(1)\n" \
- "ic %0,0(1)" \
- : "=&d" (__v) : "m" (__tmp) : "1"); \
- } \
+ unsigned short int __tmp = (unsigned short int) (__x); \
+ __asm__ __volatile__ ( \
+ "sr %0,%0\n" \
+ "la 1,%1\n" \
+ "icm %0,2,1(1)\n" \
+ "ic %0,0(1)" \
+ : "=&d" (__v) : "m" (__tmp) : "1"); \
+ } \
__v; }))
# endif
#else
@@ -80,32 +80,32 @@ __bswap_16 (unsigned short int __bsx)
# if __WORDSIZE == 64
# define __bswap_32(x) \
(__extension__ \
- ({ unsigned int __v, __x = (x); \
+ ({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (x)) \
__v = __bswap_constant_32 (__x); \
else { \
- unsigned int __tmp = (unsigned int) (__x); \
- __asm__ __volatile__ ( \
- "lrv %0,%1" \
- : "=&d" (__v) : "m" (__tmp)); \
- } \
+ unsigned int __tmp = (unsigned int) (__x); \
+ __asm__ __volatile__ ( \
+ "lrv %0,%1" \
+ : "=&d" (__v) : "m" (__tmp)); \
+ } \
__v; }))
# else
# define __bswap_32(x) \
(__extension__ \
- ({ unsigned int __v, __x = (x); \
+ ({ unsigned int __v, __x = (x); \
if (__builtin_constant_p (x)) \
__v = __bswap_constant_32 (__x); \
else { \
- unsigned int __tmp = (unsigned int) (__x); \
- __asm__ __volatile__ ( \
- "la 1,%1\n" \
- "icm %0,8,3(1)\n" \
- "icm %0,4,2(1)\n" \
- "icm %0,2,1(1)\n" \
- "ic %0,0(1)" \
- : "=&d" (__v) : "m" (__tmp) : "1"); \
- } \
+ unsigned int __tmp = (unsigned int) (__x); \
+ __asm__ __volatile__ ( \
+ "la 1,%1\n" \
+ "icm %0,8,3(1)\n" \
+ "icm %0,4,2(1)\n" \
+ "icm %0,2,1(1)\n" \
+ "ic %0,0(1)" \
+ : "=&d" (__v) : "m" (__tmp) : "1"); \
+ } \
__v; }))
# endif
#else
@@ -117,37 +117,51 @@ __bswap_32 (unsigned int __bsx)
#endif
/* Swap bytes in 64 bit value. */
-#define __bswap_constant_64(x) \
- ((((x)&0xff00000000000000) >> 56) | (((x)&0x00ff000000000000) >> 40) | \
- (((x)&0x0000ff0000000000) >> 24) | (((x)&0x000000ff00000000) >> 8) | \
- (((x)&0x00000000ff000000) << 8) | (((x)&0x0000000000ff0000) << 24) | \
- (((x)&0x000000000000ff00) << 40) | (((x)&0x00000000000000ff) << 56))
-
#if defined __GNUC__ && __GNUC__ >= 2
+# define __bswap_constant_64(x) \
+ (__extension__ ((((x) & 0xff00000000000000ul) >> 56) \
+ | (((x) & 0x00ff000000000000ul) >> 40) \
+ | (((x) & 0x0000ff0000000000ul) >> 24) \
+ | (((x) & 0x000000ff00000000ul) >> 8) \
+ | (((x) & 0x00000000ff000000ul) << 8) \
+ | (((x) & 0x0000000000ff0000ul) << 24) \
+ | (((x) & 0x000000000000ff00ul) << 40) \
+ | (((x) & 0x00000000000000fful) << 56)))
+
# if __WORDSIZE == 64
# define __bswap_64(x) \
(__extension__ \
- ({ unsigned long __w, __x = (x); \
+ ({ unsigned long __w, __x = (x); \
if (__builtin_constant_p (x)) \
__w = __bswap_constant_64 (__x); \
else { \
- unsigned long __tmp = (unsigned long) (__x); \
- __asm__ __volatile__ ( \
- "lrvg %0,%1" \
- : "=&d" (__w) : "m" (__tmp)); \
- } \
+ unsigned long __tmp = (unsigned long) (__x); \
+ __asm__ __volatile__ ( \
+ "lrvg %0,%1" \
+ : "=&d" (__w) : "m" (__tmp)); \
+ } \
__w; }))
# else
# define __bswap_64(x) \
__extension__ \
({ union { unsigned long long int __ll; \
- unsigned long int __l[2]; } __w, __r; \
- __w.__ll = (x); \
- __r.__l[0] = __bswap_32 (__w.__l[1]); \
- __r.__l[1] = __bswap_32 (__w.__l[0]); \
- __r.__ll; })
+ unsigned long int __l[2]; } __w, __r; \
+ __w.__ll = (x); \
+ __r.__l[0] = __bswap_32 (__w.__l[1]); \
+ __r.__l[1] = __bswap_32 (__w.__l[0]); \
+ __r.__ll; })
# endif
#else
+# define __bswap_constant_64(x) \
+ ((((x) & 0xff00000000000000ul) >> 56) \
+ | (((x) & 0x00ff000000000000ul) >> 40) \
+ | (((x) & 0x0000ff0000000000ul) >> 24) \
+ | (((x) & 0x000000ff00000000ul) >> 8) \
+ | (((x) & 0x00000000ff000000ul) << 8) \
+ | (((x) & 0x0000000000ff0000ul) << 24) \
+ | (((x) & 0x000000000000ff00ul) << 40) \
+ | (((x) & 0x00000000000000fful) << 56))
+
static __inline unsigned long long int
__bswap_64 (unsigned long long int __bsx)
{
diff --git a/sysdeps/s390/fpu/e_sqrt.c b/sysdeps/s390/fpu/e_sqrt.c
index e4b183e4c4..affd3a1a52 100644
--- a/sysdeps/s390/fpu/e_sqrt.c
+++ b/sysdeps/s390/fpu/e_sqrt.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
- Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+/* Copyright (C) 2004, 2011 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,4 @@ __ieee754_sqrt (double x)
asm ( "sqdbr %0,%1" : "=f" (res) : "f" (x) );
return res;
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/s390/fpu/e_sqrtf.c b/sysdeps/s390/fpu/e_sqrtf.c
index 5b5e06e8ac..4272f059db 100644
--- a/sysdeps/s390/fpu/e_sqrtf.c
+++ b/sysdeps/s390/fpu/e_sqrtf.c
@@ -1,5 +1,5 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
- Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+/* Copyright (C) 2004, 2011 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,3 +27,4 @@ __ieee754_sqrtf (float x)
asm ( "sqebr %0,%1" : "=f" (res) : "f" (x) );
return res;
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/s390/fpu/e_sqrtl.c b/sysdeps/s390/fpu/e_sqrtl.c
index e1daac1974..45d0a0e674 100644
--- a/sysdeps/s390/fpu/e_sqrtl.c
+++ b/sysdeps/s390/fpu/e_sqrtl.c
@@ -1,6 +1,6 @@
/* Square root. S/390 FPU version.
- Copyright (C) 2004, 2006 Free Software Foundation, Inc.
- Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
+ Copyright (C) 2004, 2006, 2011 Free Software Foundation, Inc.
+ Contributed by Martin Schwidefsky <schwidefsky@de.ibm.com>.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -28,3 +28,4 @@ __ieee754_sqrtl (long double x)
asm ( "sqxbr %0,%1" : "=f" (res) : "f" (x) );
return res;
}
+strong_alias (__ieee754_sqrtl, __sqrtl_finite)
diff --git a/sysdeps/s390/fpu/libm-test-ulps b/sysdeps/s390/fpu/libm-test-ulps
index 989722e651..fb89731325 100644
--- a/sysdeps/s390/fpu/libm-test-ulps
+++ b/sysdeps/s390/fpu/libm-test-ulps
@@ -338,9 +338,9 @@ ildouble: 2
ldouble: 2
Test "Real part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
double: 1
-float: 4
+float: 5
idouble: 1
-ifloat: 4
+ifloat: 5
ildouble: 3
ldouble: 3
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
@@ -647,8 +647,15 @@ ifloat: 3
ildouble: 2
ldouble: 2
Test "jn (10, 2.0) == 0.251538628271673670963516093751820639e-6":
+double: 1
float: 4
+idouble: 1
ifloat: 4
+Test "jn (2, 2.4048255576957729) == 0.43175480701968038399746111312430703":
+double: 2
+float: 1
+idouble: 2
+ifloat: 1
Test "jn (3, 0.125) == 0.406503832554912875023029337653442868e-4":
double: 1
float: 1
@@ -671,6 +678,37 @@ double: 1
float: 2
idouble: 1
ifloat: 2
+Test "jn (3, 2.4048255576957729) == 0.19899990535769083404042146764530813":
+double: 3
+idouble: 3
+Test "jn (4, 2.4048255576957729) == 0.647466661641779720084932282551219891E-1":
+double: 1
+idouble: 1
+Test "jn (5, 2.4048255576957729) == 0.163892432048058525099230549946147698E-1":
+double: 3
+float: 1
+idouble: 3
+ifloat: 1
+Test "jn (6, 2.4048255576957729) == 0.34048184720278336646673682895929161E-2":
+double: 4
+float: 3
+idouble: 4
+ifloat: 3
+Test "jn (7, 2.4048255576957729) == 0.60068836573295394221291569249883076E-3":
+double: 3
+float: 5
+idouble: 3
+ifloat: 5
+Test "jn (8, 2.4048255576957729) == 0.92165786705344923232879022467054148E-4":
+double: 3
+float: 2
+idouble: 3
+ifloat: 2
+Test "jn (9, 2.4048255576957729) == 0.12517270977961513005428966643852564E-4":
+double: 1
+float: 2
+idouble: 1
+ifloat: 2
# lgamma
Test "lgamma (-0.5) == log(2*sqrt(pi))":
@@ -1117,9 +1155,9 @@ ldouble: 1
Function: Real part of "cpow":
double: 2
-float: 4
+float: 5
idouble: 2
-ifloat: 4
+ifloat: 5
ildouble: 10
ldouble: 10
@@ -1245,9 +1283,9 @@ ldouble: 4
Function: "jn":
double: 4
-float: 4
+float: 5
idouble: 4
-ifloat: 4
+ifloat: 5
ildouble: 4
ldouble: 4
diff --git a/sysdeps/sh/backtrace.c b/sysdeps/sh/backtrace.c
new file mode 100644
index 0000000000..ee7bf615d6
--- /dev/null
+++ b/sysdeps/sh/backtrace.c
@@ -0,0 +1 @@
+#include "../ia64/backtrace.c"
diff --git a/sysdeps/sh/init-first.c b/sysdeps/sh/init-first.c
index 1f3a821fea..b40333e512 100644
--- a/sysdeps/sh/init-first.c
+++ b/sysdeps/sh/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. For SH.
- Copyright (C) 1995-1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1995-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <ctype.h>
#include <unistd.h>
extern void __libc_init (int, char **, char **);
@@ -41,6 +42,9 @@ init (int *data)
/* This is a hack to make the special getopt in GNU libc working. */
__getopt_clean_environment (envp);
#endif
+
+ /* Initialize ctype data. */
+ __ctype_init ();
}
#ifdef SHARED
diff --git a/sysdeps/sparc/sparc32/e_sqrt.c b/sysdeps/sparc/sparc32/e_sqrt.c
index 0be4b6c0cc..5969105a23 100644
--- a/sysdeps/sparc/sparc32/e_sqrt.c
+++ b/sysdeps/sparc/sparc32/e_sqrt.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1997, 2011 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
@@ -32,3 +32,4 @@ __ieee754_sqrt (x)
asm ("fsqrtd %1, %0" : "=f" (result) : "f" (x));
return result;
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/sparc/sparc64/fpu/e_sqrtl.c b/sysdeps/sparc/sparc64/fpu/e_sqrtl.c
index 4c3d19a50a..e1479c2e3a 100644
--- a/sysdeps/sparc/sparc64/fpu/e_sqrtl.c
+++ b/sysdeps/sparc/sparc64/fpu/e_sqrtl.c
@@ -1,5 +1,5 @@
/* Long double square root, sparc64 version.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2000.
@@ -29,3 +29,4 @@ __ieee754_sqrtl (long double x)
_Qp_sqrt (&ret, &x);
return ret;
}
+strong_alias (__ieee754_sqrtl, __sqrtl_finite)
diff --git a/sysdeps/unix/clock_gettime.c b/sysdeps/unix/clock_gettime.c
index d467f2b787..b4355d4638 100644
--- a/sysdeps/unix/clock_gettime.c
+++ b/sysdeps/unix/clock_gettime.c
@@ -113,7 +113,7 @@ clock_gettime (clockid_t clock_id, struct timespec *tp)
default:
#ifdef SYSDEP_GETTIME_CPU
- retval = SYSDEP_GETTIME_CPU (clock_id, tp);
+ SYSDEP_GETTIME_CPU (clock_id, tp);
#endif
#if HP_TIMING_AVAIL
if ((clock_id & ((1 << CLOCK_IDFIELD_SIZE) - 1))
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index af53f70c51..e684b160f0 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -39,8 +39,27 @@ install-others += $(inst_includedir)/bits/syscall.h
tests += tst-clone
# Generate the list of SYS_* macros for the system calls (__NR_* macros).
-# For bi-arch platforms, the CPU/Makefile defines {32,64}bit-predefine and
-# we generate a file that uses <bits/wordsize.h>.
+
+# If there is more than one syscall list for different architecture
+# variants, the CPU/Makefile defines syscall-list-variants to be a
+# list of names for those variants (e.g. 32bit 64bit), and, for each
+# variant, defines syscall-list-$(variant)-options to be compiler
+# options to cause <asm/unistd.h> to define the desired list of
+# syscalls and syscall-list-$(variant)-condition to be the condition
+# for those options to use in a C #if condition.
+# syscall-list-includes may be defined to a list of headers to include
+# in the generated header, if the default does not suffice.
+
+ifndef syscall-list-variants
+syscall-list-variants := default
+syscall-list-default-options :=
+syscall-list-default-condition :=
+endif
+
+ifndef syscall-list-includes
+syscall-list-includes := bits/wordsize.h
+endif
+
$(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscall.h
$(make-target-directory)
{ \
@@ -50,37 +69,30 @@ $(objpfx)syscall-%.h $(objpfx)syscall-%.d: ../sysdeps/unix/sysv/linux/sys/syscal
echo '# error "Never use <bits/syscall.h> directly; include <sys/syscall.h> instead."'; \
echo '#endif'; \
echo ''; \
- $(CC) -E -MD -MP -MF $(@:.h=.d)-t1 -MT '$(@:.d=.h) $(@:.h=.d)' \
- -x c $(sysincludes) $< $(addprefix -U,$(64bit-predefine)) \
- $(addprefix -D,$(32bit-predefine)) -D_LIBC -dM | \
- sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \
- LC_ALL=C sort > $(@:.d=.h).new32; \
- $(CC) -E -MD -MP -MF $(@:.h=.d)-t2 -MT '$(@:.d=.h) $(@:.h=.d)' \
- -x c $(sysincludes) $< $(addprefix -U,$(32bit-predefine)) \
- $(addprefix -D,$(64bit-predefine)) -D_LIBC -dM | \
+ $(foreach h,$(syscall-list-includes), echo '#include <$(h)>';) \
+ echo ''; \
+ $(foreach v,$(syscall-list-variants),\
+ $(CC) -E -MD -MP -MF $(@:.h=.d)-t$(v) -MT '$(@:.d=.h) $(@:.h=.d)' \
+ -x c $(sysincludes) $< $(syscall-list-$(v)-options) \
+ -D_LIBC -dM | \
sed -n 's@^#define __NR_\([^ ]*\) .*$$@#define SYS_\1 __NR_\1@p' | \
- LC_ALL=C sort > $(@:.d=.h).new64; \
- if cmp -s $(@:.d=.h).new32 $(@:.d=.h).new64; then \
- cat $(@:.d=.h).new32; \
- else \
- echo '#include <bits/wordsize.h>'; \
- echo ''; \
- LC_ALL=C comm -12 $(@:.d=.h).new32 $(@:.d=.h).new64; \
- echo '#if __WORDSIZE == 64'; \
- LC_ALL=C comm -13 $(@:.d=.h).new32 $(@:.d=.h).new64; \
- echo '#else'; \
- LC_ALL=C comm -23 $(@:.d=.h).new32 $(@:.d=.h).new64; \
- echo '#endif'; \
- fi; \
- rm -f $(@:.d=.h).new32 $(@:.d=.h).new64; \
+ LC_ALL=C sort > $(@:.d=.h).new$(v); \
+ $(if $(syscall-list-$(v)-condition),\
+ echo '#if $(syscall-list-$(v)-condition)';) \
+ cat $(@:.d=.h).new$(v); \
+ $(if $(syscall-list-$(v)-condition),echo '#endif';) \
+ rm -f $(@:.d=.h).new$(v); \
+ ) \
} > $(@:.d=.h).new
mv -f $(@:.d=.h).new $(@:.d=.h)
ifneq (,$(objpfx))
- sed $(sed-remove-objpfx) $(@:.h=.d)-t1 $(@:.h=.d)-t2 > $(@:.h=.d)-t3
+ sed $(sed-remove-objpfx) \
+ $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v)) > $(@:.h=.d)-t3
else
- cat $(@:.h=.d)-t1 $(@:.h=.d)-t2 > $(@:.h=.d)-t3
+ cat $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v)) \
+ > $(@:.h=.d)-t3
endif
- rm -f $(@:.h=.d)-t1 $(@:.h=.d)-t2
+ rm -f $(foreach v,$(syscall-list-variants),$(@:.h=.d)-t$(v))
mv -f $(@:.h=.d)-t3 $(@:.h=.d)
$(inst_includedir)/bits/syscall.h: $(objpfx)syscall-list.h $(+force)
@@ -161,6 +173,6 @@ CFLAGS-mq_receive.c += -fexceptions
endif
ifeq ($(subdir),nscd)
-sysdep-CFLAGS += -DHAVE_EPOLL -DHAVE_SENDFILE -DHAVE_INOTIFY
+sysdep-CFLAGS += -DHAVE_EPOLL -DHAVE_SENDFILE -DHAVE_INOTIFY -DHAVE_NETLINK
CFLAGS-gai.c += -DNEED_NETLINK
endif
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 3a3e8e8c2b..7f2f1b9ffe 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -163,6 +163,9 @@ libc {
sendmmsg;
}
+ GLIBC_2.15 {
+ process_vm_readv; process_vm_writev;
+ }
GLIBC_PRIVATE {
# functions used in other libraries
__syscall_rt_sigqueueinfo;
diff --git a/sysdeps/unix/sysv/linux/bits/uio.h b/sysdeps/unix/sysv/linux/bits/uio.h
index 6a283ed771..b2d77195c7 100644
--- a/sysdeps/unix/sysv/linux/bits/uio.h
+++ b/sysdeps/unix/sysv/linux/bits/uio.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2006, 2011 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
@@ -48,3 +48,28 @@ struct iovec
};
#endif
+
+#if defined _SYS_UIO_H && !defined _BITS_UIO_H_FOR_SYS_UIO_H
+#define _BITS_UIO_H_FOR_SYS_UIO_H 1
+
+__BEGIN_DECLS
+
+/* Read from another process' address space. */
+extern ssize_t process_vm_readv (pid_t __pid, __const struct iovec *__lvec,
+ unsigned long int __liovcnt,
+ __const struct iovec *__rvec,
+ unsigned long int __riovcnt,
+ unsigned long int __flags)
+ __THROW;
+
+/* Write to another process' address space. */
+extern ssize_t process_vm_writev (pid_t __pid, __const struct iovec *__lvec,
+ unsigned long int __liovcnt,
+ __const struct iovec *__rvec,
+ unsigned long int __riovcnt,
+ unsigned long int __flags)
+ __THROW;
+
+__END_DECLS
+
+#endif
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index c053adcda7..0738a7012b 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -1,5 +1,5 @@
/* Determine protocol families for which interfaces exist. Linux version.
- Copyright (C) 2003, 2006, 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2008, 2010, 2011 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
@@ -33,6 +33,9 @@
#include <not-cancel.h>
#include <kernel-features.h>
+#include <bits/libc-lock.h>
+#include <atomic.h>
+#include <nscd/nscd-client.h>
#ifndef IFA_F_HOMEADDRESS
@@ -43,9 +46,42 @@
#endif
-static int
-make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
- struct in6addrinfo **in6ai, size_t *in6ailen)
+struct cached_data
+{
+ uint32_t timestamp;
+ uint32_t usecnt;
+ bool seen_ipv4;
+ bool seen_ipv6;
+ size_t in6ailen;
+ struct in6addrinfo in6ai[0];
+};
+
+static struct cached_data noai6ai_cached =
+ {
+ .usecnt = 1, /* Make sure we never try to delete this entry. */
+ .in6ailen = 0
+ };
+
+static struct cached_data *cache;
+__libc_lock_define_initialized (static, lock);
+
+
+#ifdef IS_IN_nscd
+static uint32_t nl_timestamp;
+
+uint32_t
+__bump_nl_timestamp (void)
+{
+ if (atomic_increment_val (&nl_timestamp) == 0)
+ atomic_increment (&nl_timestamp);
+
+ return nl_timestamp;
+}
+#endif
+
+
+static struct cached_data *
+make_request (int fd, pid_t pid)
{
struct req
{
@@ -99,9 +135,6 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
sizeof (nladdr))) < 0)
goto out_fail;
- *seen_ipv4 = false;
- *seen_ipv6 = false;
-
bool done = false;
struct in6ailist
{
@@ -109,6 +142,8 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
struct in6ailist *next;
} *in6ailist = NULL;
size_t in6ailistlen = 0;
+ bool seen_ipv4 = false;
+ bool seen_ipv6 = false;
do
{
@@ -172,12 +207,12 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
{
if (*(const in_addr_t *) address
!= htonl (INADDR_LOOPBACK))
- *seen_ipv4 = true;
+ seen_ipv4 = true;
}
else
{
if (!IN6_IS_ADDR_LOOPBACK (address))
- *seen_ipv6 = true;
+ seen_ipv6 = true;
}
}
@@ -211,32 +246,47 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6,
}
while (! done);
- close_not_cancel_no_status (fd);
-
- if (*seen_ipv6 && in6ailist != NULL)
+ struct cached_data *result;
+ if (seen_ipv6 && in6ailist != NULL)
{
- *in6ai = malloc (in6ailistlen * sizeof (**in6ai));
- if (*in6ai == NULL)
+ result = malloc (sizeof (*result)
+ + in6ailistlen * sizeof (struct in6addrinfo));
+ if (result == NULL)
goto out_fail;
- *in6ailen = in6ailistlen;
+#ifdef IS_IN_nscd
+ result->timestamp = nl_timestamp;
+#else
+ result->timestamp = __nscd_get_nl_timestamp ();
+#endif
+ result->usecnt = 2;
+ result->seen_ipv4 = seen_ipv4;
+ result->seen_ipv6 = true;
+ result->in6ailen = in6ailistlen;
do
{
- (*in6ai)[--in6ailistlen] = in6ailist->info;
+ result->in6ai[--in6ailistlen] = in6ailist->info;
in6ailist = in6ailist->next;
}
while (in6ailist != NULL);
}
+ else
+ {
+ atomic_add (&noai6ai_cached.usecnt, 2);
+ noai6ai_cached.seen_ipv4 = seen_ipv4;
+ noai6ai_cached.seen_ipv6 = seen_ipv6;
+ result = &noai6ai_cached;
+ }
if (use_malloc)
free (buf);
- return 0;
+ return result;
out_fail:
if (use_malloc)
free (buf);
- return -1;
+ return NULL;
}
@@ -260,24 +310,66 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
if (! __no_netlink_support)
{
- int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
+ struct cached_data *olddata = NULL;
+ struct cached_data *data = NULL;
- struct sockaddr_nl nladdr;
- memset (&nladdr, '\0', sizeof (nladdr));
- nladdr.nl_family = AF_NETLINK;
+ __libc_lock_lock (lock);
- socklen_t addr_len = sizeof (nladdr);
+#ifdef IS_IN_nscd
+# define cache_valid() nl_timestamp != 0 && cache->timestamp == nl_timestamp
+#else
+# define cache_valid() \
+ ({ uint32_t val = __nscd_get_nl_timestamp (); \
+ val != 0 && cache->timestamp == val; })
+#endif
+ if (cache != NULL && cache_valid ())
+ {
+ data = cache;
+ atomic_increment (&cache->usecnt);
+ }
+ else
+ {
+ int fd = __socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
- if (fd >= 0
- && __bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
- && __getsockname (fd, (struct sockaddr *) &nladdr, &addr_len) == 0
- && make_request (fd, nladdr.nl_pid, seen_ipv4, seen_ipv6,
- in6ai, in6ailen) == 0)
- /* It worked. */
- return;
+ if (__builtin_expect (fd >= 0, 1))
+ {
+ struct sockaddr_nl nladdr;
+ memset (&nladdr, '\0', sizeof (nladdr));
+ nladdr.nl_family = AF_NETLINK;
- if (fd >= 0)
- __close (fd);
+ socklen_t addr_len = sizeof (nladdr);
+
+ if(__bind (fd, (struct sockaddr *) &nladdr, sizeof (nladdr)) == 0
+ && __getsockname (fd, (struct sockaddr *) &nladdr,
+ &addr_len) == 0)
+ data = make_request (fd, nladdr.nl_pid);
+
+ close_not_cancel_no_status (fd);
+ }
+
+ if (data != NULL)
+ {
+ olddata = cache;
+ cache = data;
+ }
+ }
+
+ __libc_lock_unlock (lock);
+
+ if (data != NULL)
+ {
+ /* It worked. */
+ *seen_ipv4 = data->seen_ipv4;
+ *seen_ipv6 = data->seen_ipv6;
+ *in6ailen = data->in6ailen;
+ *in6ai = data->in6ai;
+
+ if (olddata != NULL && olddata->usecnt > 0
+ && atomic_add_zero (&olddata->usecnt, -1))
+ free (olddata);
+
+ return;
+ }
#if __ASSUME_NETLINK_SUPPORT == 0
/* Remember that there is no netlink support. */
@@ -315,3 +407,26 @@ __check_pf (bool *seen_ipv4, bool *seen_ipv6,
(void) freeifaddrs (ifa);
#endif
}
+
+
+void
+__free_in6ai (struct in6addrinfo *ai)
+{
+ if (ai != NULL)
+ {
+ struct cached_data *data =
+ (struct cached_data *) ((char *) ai
+ - offsetof (struct cached_data, in6ai));
+
+ if (atomic_add_zero (&data->usecnt, -1))
+ {
+ __libc_lock_lock (lock);
+
+ if (data->usecnt == 0)
+ /* Still unused. */
+ free (data);
+
+ __libc_lock_unlock (lock);
+ }
+ }
+}
diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
index 0ae45de371..ad0fe1e8b5 100644
--- a/sysdeps/unix/sysv/linux/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
@@ -45,8 +45,8 @@
/* This means the REALTIME and MONOTONIC clock are definitely
supported in the kernel. */
-# define SYSDEP_GETTIME \
- SYSDEP_GETTIME_CPUTIME \
+# define SYSDEP_GETTIME \
+ SYSDEP_GETTIME_CPUTIME; \
case CLOCK_REALTIME: \
case CLOCK_MONOTONIC: \
retval = SYSCALL_GETTIME (clock_id, tp); \
@@ -82,8 +82,8 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
/* The REALTIME and MONOTONIC clock might be available. Try the
syscall first. */
-# define SYSDEP_GETTIME \
- SYSDEP_GETTIME_CPUTIME \
+# define SYSDEP_GETTIME \
+ SYSDEP_GETTIME_CPUTIME; \
case CLOCK_REALTIME: \
case CLOCK_MONOTONIC: \
case CLOCK_MONOTONIC_RAW: \
@@ -100,7 +100,7 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
__set_errno (retval); \
retval = -1; \
} \
- break;
+ break
#endif
#ifdef __NR_clock_gettime
@@ -110,7 +110,9 @@ maybe_syscall_gettime (clockid_t clock_id, struct timespec *tp)
# if __ASSUME_POSIX_CPU_TIMERS > 0
-# define SYSDEP_GETTIME_CPU SYSCALL_GETTIME
+# define SYSDEP_GETTIME_CPU(clock_id, tp) \
+ retval = SYSCALL_GETTIME (clock_id, tp); \
+ break
# define SYSDEP_GETTIME_CPUTIME /* Default catches them too. */
# else
@@ -164,7 +166,7 @@ maybe_syscall_gettime_cpu (clockid_t clock_id, struct timespec *tp)
return e;
}
-# define SYSDEP_GETTIME_CPU \
+# define SYSDEP_GETTIME_CPU(clock_id, tp) \
retval = maybe_syscall_gettime_cpu (clock_id, tp); \
if (retval == 0) \
break; \
@@ -199,7 +201,7 @@ maybe_syscall_gettime_cputime (clockid_t clock_id, struct timespec *tp)
break; \
} \
retval = hp_timing_gettime (clock_id, tp); \
- break;
+ break
# if !HP_TIMING_AVAIL
# define hp_timing_gettime(clock_id, tp) (__set_errno (EINVAL), -1)
# endif
diff --git a/sysdeps/unix/sysv/linux/futimes.c b/sysdeps/unix/sysv/linux/futimes.c
index 272b83eb05..cd3cce618c 100644
--- a/sysdeps/unix/sysv/linux/futimes.c
+++ b/sysdeps/unix/sysv/linux/futimes.c
@@ -1,5 +1,5 @@
/* futimes -- change access and modification times of open file. Linux version.
- Copyright (C) 2002,2003,2005,2006,2007 Free Software Foundation, Inc.
+ Copyright (C) 2002,2003,2005,2006,2007,2011 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
@@ -95,8 +95,8 @@ __futimes (int fd, const struct timeval tvp[2])
if (tvp != NULL)
{
times = &buf;
- buf.actime = tvp[0].tv_sec + (tvp[0].tv_usec + 500000) / 1000000;
- buf.modtime = tvp[1].tv_sec + (tvp[1].tv_usec + 500000) / 1000000;
+ buf.actime = tvp[0].tv_sec;
+ buf.modtime = tvp[1].tv_sec;
}
else
times = NULL;
diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c
index 7feb7a1802..bde3fa8999 100644
--- a/sysdeps/unix/sysv/linux/getsysstats.c
+++ b/sysdeps/unix/sysv/linux/getsysstats.c
@@ -296,7 +296,7 @@ phys_pages_info (const char *format)
long int result = -1;
/* If we haven't found an appropriate entry return 1. */
- FILE *fp = fopen ("/proc/meminfo", "rc");
+ FILE *fp = fopen ("/proc/meminfo", "rce");
if (fp != NULL)
{
/* No threads use this stream. */
diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
index a60212f4ed..63cf1ed33a 100644
--- a/sysdeps/unix/sysv/linux/init-first.c
+++ b/sysdeps/unix/sysv/linux/init-first.c
@@ -1,5 +1,5 @@
/* Initialization code run first thing by the ELF startup code. Linux version.
- Copyright (C) 1995-2004, 2005, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2004, 2005, 2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
@@ -93,12 +94,14 @@ _init (int argc, char **argv, char **envp)
__getopt_clean_environment (envp);
#endif
+ /* Initialize ctype data. */
+ __ctype_init ();
+
#if defined SHARED && !defined NO_CTORS_DTORS_SECTIONS
__libc_global_ctors ();
#endif
}
-
/* This function is defined here so that if this file ever gets into
ld.so we will get a link error. Having this file silently included
in ld.so causes disaster, because the _init definition above will
diff --git a/sysdeps/unix/sysv/linux/internal_statvfs.c b/sysdeps/unix/sysv/linux/internal_statvfs.c
index 2ddec1edba..a0bad02d79 100644
--- a/sysdeps/unix/sysv/linux/internal_statvfs.c
+++ b/sysdeps/unix/sysv/linux/internal_statvfs.c
@@ -237,9 +237,13 @@ INTERNAL_STATVFS (const char *name, struct STATVFS *buf,
buf->f_files = fsbuf->f_files;
buf->f_ffree = fsbuf->f_ffree;
if (sizeof (buf->f_fsid) == sizeof (fsbuf->f_fsid))
+ /* The shifting uses 'unsigned long long int' even though the target
+ field might only have 32 bits. This is OK since the 'if' branch
+ is not used in this case but the compiler would still generate
+ warnings. */
buf->f_fsid = ((fsbuf->f_fsid.__val[0]
- & ((1UL << (8 * sizeof (fsbuf->f_fsid.__val[0]))) - 1))
- | ((unsigned long int) fsbuf->f_fsid.__val[1]
+ & ((1ULL << (8 * sizeof (fsbuf->f_fsid.__val[0]))) - 1))
+ | ((unsigned long long int) fsbuf->f_fsid.__val[1]
<< (8 * (sizeof (buf->f_fsid)
- sizeof (fsbuf->f_fsid.__val[0])))));
else
diff --git a/sysdeps/unix/sysv/linux/powerpc/Makefile b/sysdeps/unix/sysv/linux/powerpc/Makefile
index d1281cf469..55311a4fc1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/Makefile
+++ b/sysdeps/unix/sysv/linux/powerpc/Makefile
@@ -1,4 +1,9 @@
-64bit-predefine = __powerpc64__
+syscall-list-variants := 32bit 64bit
+syscall-list-32bit-options := -U__powerpc64__
+syscall-list-32bit-condition := __WORDSIZE == 32
+syscall-list-64bit-options := -D__powerpc64__
+syscall-list-64bit-condition := __WORDSIZE == 64
+
ifeq ($(subdir),rt)
librt-routines += rt-sysdep
endif
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S
index cfd9864f63..2b97f01b47 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/____longjmp_chk.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009, 2011 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
@@ -29,10 +29,9 @@
#ifdef PIC
# define LOAD_ARG \
- bcl 20,31,1f; \
-1: mflr r3; \
- addis r3,r3,_GLOBAL_OFFSET_TABLE_-1b@ha; \
- addi r3,r3,_GLOBAL_OFFSET_TABLE_-1b@l; \
+ SETUP_GOT_ACCESS(r3,got_label2); \
+ addis r3,r3,_GLOBAL_OFFSET_TABLE_-got_label2@ha; \
+ addi r3,r3,_GLOBAL_OFFSET_TABLE_-got_label2@l; \
lwz r3,.LC0@got(r3)
#else
# define LOAD_ARG \
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S
index 4c8c6b433b..928ba217bc 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/brk.S
@@ -1,5 +1,5 @@
/* brk system call for Linux/ppc.
- Copyright (C) 1995-97, 1999, 2000, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1995-97, 1999, 2000, 2006, 2011 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,10 +36,9 @@ ENTRY (BP_SYM (__brk))
DO_CALL(SYS_ify(brk))
lwz r6,8(r1)
#ifdef PIC
- bcl 20,31,1f
-1: mflr r5
- addis r5,r5,__curbrk-1b@ha
- stw r3,__curbrk-1b@l(r5)
+ SETUP_GOT_ACCESS(r5,got_label)
+ addis r5,r5,__curbrk-got_label@ha
+ stw r3,__curbrk-got_label@l(r5)
#else
lis r4,__curbrk@ha
stw r3,__curbrk@l(r4)
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
index 27285ed4a5..f55c0730f1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext-common.S
@@ -1,5 +1,5 @@
/* Save current context, powerpc32 common.
- Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2011 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
@@ -145,10 +145,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
# ifdef __CONTEXT_ENABLE_VRS
# ifdef PIC
mflr r8
- bcl 20,31,1f
-1: mflr r7
- addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha
- addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l
+ SETUP_GOT_ACCESS(r7,got_label)
+ addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
# ifdef SHARED
lwz r7,_rtld_global_ro@got(r7)
mtlr r8
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
index f304090868..a2f419b0e1 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
@@ -1,5 +1,5 @@
/* Jump to a new context powerpc32 common.
- Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009, 2011 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,10 +73,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
#ifdef PIC
mflr r8
- bcl 20,31,1f
-1: mflr r7
- addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha
- addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l
+ SETUP_GOT_ACCESS(r7,got_label)
+ addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
# ifdef SHARED
lwz r7,_rtld_global_ro@got(r7)
mtlr r8
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
index 62efee2dce..19dfcf8402 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
@@ -1,5 +1,5 @@
/* Save current context and jump to a new context.
- Copyright (C) 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2006, 2008, 2009, 2011 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
@@ -146,10 +146,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
# ifdef PIC
mflr r8
- bcl 20,31,1f
-1: mflr r7
- addis r7,r7,_GLOBAL_OFFSET_TABLE_-1b@ha
- addi r7,r7,_GLOBAL_OFFSET_TABLE_-1b@l
+ SETUP_GOT_ACCESS(r7,got_label)
+ addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
# ifdef SHARED
lwz r7,_rtld_global_ro@got(r7)
mtlr r8
@@ -299,10 +298,9 @@ ENTRY(__CONTEXT_FUNC_NAME)
# ifdef PIC
mflr r8
# ifdef HAVE_ASM_PPC_REL16
- bcl 20,31,5f
-5: mflr r7
- addis r7,r7,_GLOBAL_OFFSET_TABLE_-5b@ha
- addi r7,r7,_GLOBAL_OFFSET_TABLE_-5b@l
+ SETUP_GOT_ACCESS(r7,got_label)
+ addis r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@ha
+ addi r7,r7,_GLOBAL_OFFSET_TABLE_-got_label@l
# else
bl _GLOBAL_OFFSET_TABLE_@local-4
mflr r7
diff --git a/sysdeps/unix/sysv/linux/readonly-area.c b/sysdeps/unix/sysv/linux/readonly-area.c
index 69e926a7a1..ce8ac94c4c 100644
--- a/sysdeps/unix/sysv/linux/readonly-area.c
+++ b/sysdeps/unix/sysv/linux/readonly-area.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 2011 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
@@ -32,7 +32,7 @@ __readonly_area (const char *ptr, size_t size)
{
const void *ptr_end = ptr + size;
- FILE *fp = fopen ("/proc/self/maps", "rc");
+ FILE *fp = fopen ("/proc/self/maps", "rce");
if (fp == NULL)
{
/* It is the system administrator's choice to not have /proc
diff --git a/sysdeps/unix/sysv/linux/s390/Makefile b/sysdeps/unix/sysv/linux/s390/Makefile
index 72eae688db..fb20fb05ac 100644
--- a/sysdeps/unix/sysv/linux/s390/Makefile
+++ b/sysdeps/unix/sysv/linux/s390/Makefile
@@ -1,4 +1,9 @@
-64bit-predefine = __s390x__
+syscall-list-variants := 32bit 64bit
+syscall-list-32bit-options := -U__s390x__
+syscall-list-32bit-condition := __WORDSIZE == 32
+syscall-list-64bit-options := -D__s390x__
+syscall-list-64bit-condition := __WORDSIZE == 64
+
ifeq ($(subdir),rt)
librt-routines += rt-sysdep
endif
diff --git a/sysdeps/unix/sysv/linux/sh/bits/atomic.h b/sysdeps/unix/sysv/linux/sh/bits/atomic.h
index a0e5918f03..b2a5c21816 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/atomic.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/atomic.h
@@ -1,5 +1,5 @@
/* Atomic operations used inside libc. Linux/SH version.
- Copyright (C) 2003 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2011 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
@@ -65,6 +65,12 @@ typedef uintmax_t uatomic_max_t;
r1: saved stack pointer
*/
+#if __GNUC_PREREQ (4, 7)
+# define rNOSP "u"
+#else
+# define rNOSP "r"
+#endif
+
#define __arch_compare_and_exchange_val_8_acq(mem, newval, oldval) \
({ __typeof (*(mem)) __result; \
__asm __volatile ("\
@@ -78,7 +84,7 @@ typedef uintmax_t uatomic_max_t;
bf 1f\n\
mov.b %2,@%1\n\
1: mov r1,r15"\
- : "=&r" (__result) : "r" (mem), "r" (newval), "r" (oldval) \
+ : "=&r" (__result) : rNOSP (mem), rNOSP (newval), rNOSP (oldval) \
: "r0", "r1", "t", "memory"); \
__result; })
@@ -95,7 +101,7 @@ typedef uintmax_t uatomic_max_t;
bf 1f\n\
mov.w %2,@%1\n\
1: mov r1,r15"\
- : "=&r" (__result) : "r" (mem), "r" (newval), "r" (oldval) \
+ : "=&r" (__result) : rNOSP (mem), rNOSP (newval), rNOSP (oldval) \
: "r0", "r1", "t", "memory"); \
__result; })
@@ -112,7 +118,7 @@ typedef uintmax_t uatomic_max_t;
bf 1f\n\
mov.l %2,@%1\n\
1: mov r1,r15"\
- : "=&r" (__result) : "r" (mem), "r" (newval), "r" (oldval) \
+ : "=&r" (__result) : rNOSP (mem), rNOSP (newval), rNOSP (oldval) \
: "r0", "r1", "t", "memory"); \
__result; })
@@ -136,7 +142,7 @@ typedef uintmax_t uatomic_max_t;
add %0,%1\n\
mov.b %1,@%2\n\
1: mov r1,r15"\
- : "=&r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=&r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "memory"); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("\
@@ -148,7 +154,7 @@ typedef uintmax_t uatomic_max_t;
add %0,%1\n\
mov.w %1,@%2\n\
1: mov r1,r15"\
- : "=&r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=&r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "memory"); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("\
@@ -160,7 +166,7 @@ typedef uintmax_t uatomic_max_t;
add %0,%1\n\
mov.l %1,@%2\n\
1: mov r1,r15"\
- : "=&r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=&r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "memory"); \
else \
{ \
@@ -185,7 +191,7 @@ typedef uintmax_t uatomic_max_t;
add r2,%0\n\
mov.b %0,@%1\n\
1: mov r1,r15"\
- : "=&r" (__tmp) : "r" (mem), "0" (__value) \
+ : "=&r" (__tmp) : rNOSP (mem), "0" (__value) \
: "r0", "r1", "r2", "memory"); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("\
@@ -197,7 +203,7 @@ typedef uintmax_t uatomic_max_t;
add r2,%0\n\
mov.w %0,@%1\n\
1: mov r1,r15"\
- : "=&r" (__tmp) : "r" (mem), "0" (__value) \
+ : "=&r" (__tmp) : rNOSP (mem), "0" (__value) \
: "r0", "r1", "r2", "memory"); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("\
@@ -209,7 +215,7 @@ typedef uintmax_t uatomic_max_t;
add r2,%0\n\
mov.l %0,@%1\n\
1: mov r1,r15"\
- : "=&r" (__tmp) : "r" (mem), "0" (__value) \
+ : "=&r" (__tmp) : rNOSP (mem), "0" (__value) \
: "r0", "r1", "r2", "memory"); \
else \
{ \
@@ -238,7 +244,7 @@ typedef uintmax_t uatomic_max_t;
1: mov r1,r15\n\
shal %1\n\
movt %0"\
- : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "r2", "t", "memory"); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("\
@@ -252,7 +258,7 @@ typedef uintmax_t uatomic_max_t;
1: mov r1,r15\n\
shal %1\n\
movt %0"\
- : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "r2", "t", "memory"); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("\
@@ -266,7 +272,7 @@ typedef uintmax_t uatomic_max_t;
1: mov r1,r15\n\
shal %1\n\
movt %0"\
- : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "r2", "t", "memory"); \
else \
abort (); \
@@ -287,7 +293,7 @@ typedef uintmax_t uatomic_max_t;
1: mov r1,r15\n\
tst %1,%1\n\
movt %0"\
- : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "r2", "t", "memory"); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("\
@@ -301,7 +307,7 @@ typedef uintmax_t uatomic_max_t;
1: mov r1,r15\n\
tst %1,%1\n\
movt %0"\
- : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "r2", "t", "memory"); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("\
@@ -315,7 +321,7 @@ typedef uintmax_t uatomic_max_t;
1: mov r1,r15\n\
tst %1,%1\n\
movt %0"\
- : "=r" (__result), "=&r" (__tmp) : "r" (mem), "1" (__value) \
+ : "=r" (__result), "=&r" (__tmp) : rNOSP (mem), "1" (__value) \
: "r0", "r1", "r2", "t", "memory"); \
else \
abort (); \
@@ -336,7 +342,7 @@ typedef uintmax_t uatomic_max_t;
or %1,r2\n\
mov.b r2,@%0\n\
1: mov r1,r15"\
- : : "r" (mem), "r" (__mask) \
+ : : rNOSP (mem), rNOSP (__mask) \
: "r0", "r1", "r2", "memory"); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("\
@@ -348,7 +354,7 @@ typedef uintmax_t uatomic_max_t;
or %1,r2\n\
mov.w r2,@%0\n\
1: mov r1,r15"\
- : : "r" (mem), "r" (__mask) \
+ : : rNOSP (mem), rNOSP (__mask) \
: "r0", "r1", "r2", "memory"); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("\
@@ -360,7 +366,7 @@ typedef uintmax_t uatomic_max_t;
or %1,r2\n\
mov.l r2,@%0\n\
1: mov r1,r15"\
- : : "r" (mem), "r" (__mask) \
+ : : rNOSP (mem), rNOSP (__mask) \
: "r0", "r1", "r2", "memory"); \
else \
abort (); \
@@ -382,7 +388,7 @@ typedef uintmax_t uatomic_max_t;
mov.b %1,@%2\n\
1: mov r1,r15"\
: "=&r" (__result), "=&r" (__mask) \
- : "r" (mem), "0" (__result), "1" (__mask) \
+ : rNOSP (mem), "0" (__result), "1" (__mask) \
: "r0", "r1", "r2", "memory"); \
else if (sizeof (*(mem)) == 2) \
__asm __volatile ("\
@@ -397,7 +403,7 @@ typedef uintmax_t uatomic_max_t;
mov.w %1,@%2\n\
1: mov r1,r15"\
: "=&r" (__result), "=&r" (__mask) \
- : "r" (mem), "0" (__result), "1" (__mask) \
+ : rNOSP (mem), "0" (__result), "1" (__mask) \
: "r0", "r1", "r2", "memory"); \
else if (sizeof (*(mem)) == 4) \
__asm __volatile ("\
@@ -412,7 +418,7 @@ typedef uintmax_t uatomic_max_t;
mov.l %1,@%2\n\
1: mov r1,r15"\
: "=&r" (__result), "=&r" (__mask) \
- : "r" (mem), "0" (__result), "1" (__mask) \
+ : rNOSP (mem), "0" (__result), "1" (__mask) \
: "r0", "r1", "r2", "memory"); \
else \
abort (); \
diff --git a/sysdeps/unix/sysv/linux/sparc/Makefile b/sysdeps/unix/sysv/linux/sparc/Makefile
index 9cb2a634d5..96bf0bbd16 100644
--- a/sysdeps/unix/sysv/linux/sparc/Makefile
+++ b/sysdeps/unix/sysv/linux/sparc/Makefile
@@ -1,4 +1,8 @@
-64bit-predefine = __sparc_v9__ __arch64__
+syscall-list-variants := 32bit 64bit
+syscall-list-32bit-options := -U__sparc_v9__ -U__arch64__
+syscall-list-32bit-condition := __WORDSIZE == 32
+syscall-list-64bit-options := -D__sparc_v9__ -D__arch64__
+syscall-list-64bit-condition := __WORDSIZE == 64
ifeq ($(subdir),rt)
librt-routines += rt-sysdep
diff --git a/sysdeps/unix/sysv/linux/sparc/sys/epoll.h b/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
index 9943f21383..2dfc4fcc20 100644
--- a/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/sparc/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2008, 2010, 2011 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
@@ -65,9 +65,9 @@ enum EPOLL_EVENTS
#define EPOLLHUP EPOLLHUP
EPOLLRDHUP = 0x2000,
#define EPOLLRDHUP EPOLLRDHUP
- EPOLLONESHOT = (1 << 30),
+ EPOLLONESHOT = 1u << 30,
#define EPOLLONESHOT EPOLLONESHOT
- EPOLLET = (1 << 31)
+ EPOLLET = 1u << 31
#define EPOLLET EPOLLET
};
diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h
index ca1d3d0459..f23db922e6 100644
--- a/sysdeps/unix/sysv/linux/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2009, 2011 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
@@ -65,9 +65,9 @@ enum EPOLL_EVENTS
#define EPOLLHUP EPOLLHUP
EPOLLRDHUP = 0x2000,
#define EPOLLRDHUP EPOLLRDHUP
- EPOLLONESHOT = (1 << 30),
+ EPOLLONESHOT = 1u << 30,
#define EPOLLONESHOT EPOLLONESHOT
- EPOLLET = (1 << 31)
+ EPOLLET = 1u << 31
#define EPOLLET EPOLLET
};
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 2bed9e99e6..f6e6653d37 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -109,3 +109,6 @@ name_to_handle_at EXTRA name_to_handle_at i:isppi name_to_handle_at
open_by_handle_at EXTRA open_by_handle_at Ci:ipi open_by_handle_at
setns EXTRA setns i:ii setns
+
+process_vm_readv EXTRA process_vm_readv i:ipipii process_vm_readv
+process_vm_writev EXTRA process_vm_writev i:ipipii process_vm_writev
diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile
index 6e2741a967..9c9e6151d1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/Makefile
+++ b/sysdeps/unix/sysv/linux/x86_64/Makefile
@@ -1,5 +1,8 @@
-32bit-predefine = __i386__
-64bit-predefine = __x86_64__
+syscall-list-variants := 32bit 64bit
+syscall-list-32bit-options := -D__i386__ -U__x86_64__
+syscall-list-32bit-condition := __WORDSIZE == 32
+syscall-list-64bit-options := -U__i386__ -D__x86_64__
+syscall-list-64bit-condition := __WORDSIZE == 64
ifeq ($(subdir),misc)
sysdep_routines += ioperm iopl
diff --git a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
index 7802701e22..f7121106bc 100644
--- a/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
+++ b/sysdeps/unix/sysv/linux/x86_64/clock_gettime.c
@@ -3,8 +3,14 @@
#ifdef SHARED
# define SYSCALL_GETTIME(id, tp) \
({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
+ long int v_ret; \
PTR_DEMANGLE (f); \
- f (id, tp); })
+ v_ret = f (id, tp); \
+ if (INTERNAL_SYSCALL_ERROR_P (v_ret, )) { \
+ __set_errno (INTERNAL_SYSCALL_ERRNO (v_ret, )); \
+ v_ret = -1; \
+ } \
+ v_ret; })
# define INTERNAL_GETTIME(id, tp) \
({ long int (*f) (clockid_t, struct timespec *) = __vdso_clock_gettime; \
PTR_DEMANGLE (f); \
diff --git a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
index d799c845c1..6b5ef35f4d 100644
--- a/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2008, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2008, 2010, 2011 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
@@ -65,9 +65,9 @@ enum EPOLL_EVENTS
#define EPOLLHUP EPOLLHUP
EPOLLRDHUP = 0x2000,
#define EPOLLRDHUP EPOLLRDHUP
- EPOLLONESHOT = (1 << 30),
+ EPOLLONESHOT = 1u << 30,
#define EPOLLONESHOT EPOLLONESHOT
- EPOLLET = (1 << 31)
+ EPOLLET = 1u << 31
#define EPOLLET EPOLLET
};
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c
index c1c1a7526f..a613eb0f54 100644
--- a/sysdeps/unix/sysv/linux/x86_64/time.c
+++ b/sysdeps/unix/sysv/linux/x86_64/time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,02, 2003, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001,02,2003,2011 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
@@ -16,13 +16,11 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#ifdef SHARED
#include <dl-vdso.h>
-
#define VSYSCALL_ADDR_vtime 0xffffffffff600400
-
-#ifdef SHARED
void *time_ifunc (void) __asm__ ("time");
void *
@@ -34,7 +32,9 @@ time_ifunc (void)
return _dl_vdso_vsym ("time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime;
}
__asm (".type time, %gnu_indirect_function");
+
#else
+
# include <time.h>
# include <sysdep.h>
@@ -44,6 +44,7 @@ time (time_t *t)
INTERNAL_SYSCALL_DECL (err);
return INTERNAL_SYSCALL (time, err, 1, t);
}
+
#endif
strong_alias (time, __GI_time)
diff --git a/sysdeps/x86_64/bits/byteswap.h b/sysdeps/x86_64/bits/byteswap.h
index e350fb8063..c6db93c41a 100644
--- a/sysdeps/x86_64/bits/byteswap.h
+++ b/sysdeps/x86_64/bits/byteswap.h
@@ -1,5 +1,5 @@
/* Macros to swap the order of bytes in integer values.
- Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010
+ Copyright (C) 1997, 1998, 2000, 2002, 2003, 2007, 2008, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -99,14 +99,14 @@
#if defined __GNUC__ && __GNUC__ >= 2
/* Swap bytes in 64 bit value. */
# define __bswap_constant_64(x) \
- ((((x) & 0xff00000000000000ull) >> 56) \
- | (((x) & 0x00ff000000000000ull) >> 40) \
- | (((x) & 0x0000ff0000000000ull) >> 24) \
- | (((x) & 0x000000ff00000000ull) >> 8) \
- | (((x) & 0x00000000ff000000ull) << 8) \
- | (((x) & 0x0000000000ff0000ull) << 24) \
- | (((x) & 0x000000000000ff00ull) << 40) \
- | (((x) & 0x00000000000000ffull) << 56))
+ (__extension__ ((((x) & 0xff00000000000000ull) >> 56) \
+ | (((x) & 0x00ff000000000000ull) >> 40) \
+ | (((x) & 0x0000ff0000000000ull) >> 24) \
+ | (((x) & 0x000000ff00000000ull) >> 8) \
+ | (((x) & 0x00000000ff000000ull) << 8) \
+ | (((x) & 0x0000000000ff0000ull) << 24) \
+ | (((x) & 0x000000000000ff00ull) << 40) \
+ | (((x) & 0x00000000000000ffull) << 56)))
# if __WORDSIZE == 64
# define __bswap_64(x) \
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h
index 6d66ff69c7..a8fbc1625b 100644
--- a/sysdeps/x86_64/dl-machine.h
+++ b/sysdeps/x86_64/dl-machine.h
@@ -98,7 +98,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
/* The GOT entries for functions in the PLT have not yet been filled
in. Their initial contents will arrange when called to push an
offset into the .rel.plt section, push _GLOBAL_OFFSET_TABLE_[1],
- and then jump to _GLOBAL_OFFSET_TABLE[2]. */
+ and then jump to _GLOBAL_OFFSET_TABLE_[2]. */
got = (Elf64_Addr *) D_PTR (l, l_info[DT_PLTGOT]);
/* If a library is prelinked but we have to relocate anyway,
we have to be able to undo the prelinking of .got.plt.
@@ -207,10 +207,14 @@ _dl_start_user:\n\
/* A reloc type used for ld.so cmdline arg lookups to reject PLT entries. */
#define ELF_MACHINE_JMP_SLOT R_X86_64_JUMP_SLOT
+/* The relative ifunc relocation. */
+// XXX This is a work-around for a broken linker. Remove!
+#define ELF_MACHINE_IRELATIVE R_X86_64_IRELATIVE
+
/* The x86-64 never uses Elf64_Rel relocations. */
#define ELF_MACHINE_NO_REL 1
-/* We define an initialization functions. This is called very early in
+/* We define an initialization function. This is called very early in
_dl_sysdep_start. */
#define DL_PLATFORM_INIT dl_platform_init ()
@@ -230,8 +234,8 @@ elf_machine_fixup_plt (struct link_map *map, lookup_t t,
return *reloc_addr = value;
}
-/* Return the final value of a plt relocation. On x86-64 the
- JUMP_SLOT relocation ignores the addend. */
+/* Return the final value of a PLT relocation. On x86-64 the
+ JUMP_SLOT relocation ignores the addend. */
static inline Elf64_Addr
elf_machine_plt_value (struct link_map *map, const Elf64_Rela *reloc,
Elf64_Addr value)
diff --git a/sysdeps/x86_64/fpu/bits/fenv.h b/sysdeps/x86_64/fpu/bits/fenv.h
index 11859f00c8..8bc2450837 100644
--- a/sysdeps/x86_64/fpu/bits/fenv.h
+++ b/sysdeps/x86_64/fpu/bits/fenv.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,1999,2000,2001,2004 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2001,2004,2011 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
@@ -95,3 +95,41 @@ fenv_t;
/* Floating-point environment where none of the exception is masked. */
# define FE_NOMASK_ENV ((__const fenv_t *) -2)
#endif
+
+
+#ifdef __USE_EXTERN_INLINES
+__BEGIN_DECLS
+
+/* Optimized versions. */
+extern int __REDIRECT_NTH (__feraiseexcept_renamed, (int), feraiseexcept);
+__extern_inline int
+__NTH (feraiseexcept (int __excepts))
+{
+ if (__builtin_constant_p (__excepts)
+ && (__excepts & ~(FE_INVALID | FE_DIVBYZERO)) == 0)
+ {
+ if ((FE_INVALID & __excepts) != 0)
+ {
+ /* One example of a invalid operation is 0.0 / 0.0. */
+ float __f = 0.0;
+
+ __asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
+ (void) &__f;
+ }
+ if ((FE_DIVBYZERO & __excepts) != 0)
+ {
+ float __f = 1.0;
+ float __g = 0.0;
+
+ __asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
+ (void) &__f;
+ }
+
+ return 0;
+ }
+
+ return __feraiseexcept_renamed (__excepts);
+}
+
+__END_DECLS
+#endif
diff --git a/sysdeps/x86_64/fpu/bits/mathinline.h b/sysdeps/x86_64/fpu/bits/mathinline.h
index 780f8786dd..1a2c1ee997 100644
--- a/sysdeps/x86_64/fpu/bits/mathinline.h
+++ b/sysdeps/x86_64/fpu/bits/mathinline.h
@@ -30,7 +30,10 @@
#endif
-#if defined __USE_ISOC99 && defined __GNUC__ && __GNUC__ >= 2
+/* The gcc, version 2.7 or below, has problems with all this inlining
+ code. So disable it for this version of the compiler. */
+#if __GNUC_PREREQ (2, 8) && defined __USE_ISOC99
+__BEGIN_NAMESPACE_C99
/* Test for negative number. Used in the signbit() macro. */
__MATH_INLINE int
@@ -64,7 +67,14 @@ __NTH (__signbitl (long double __x))
return (__u.__i[2] & 0x8000) != 0;
}
-#ifdef __USE_ISOC99
+__END_NAMESPACE_C99
+#endif
+
+
+#if (__GNUC_PREREQ (2, 8) && !defined __NO_MATH_INLINES \
+ && defined __OPTIMIZE__)
+
+# ifdef __USE_ISOC99
__BEGIN_NAMESPACE_C99
/* Round to nearest integer. */
@@ -103,7 +113,8 @@ __NTH (llrint (double __x))
}
# endif
-# if __FINITE_MATH_ONLY__ == 1 && (__WORDSIZE == 64 || defined __SSE2_MATH__)
+# if defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0 \
+ && (__WORDSIZE == 64 || defined __SSE2_MATH__)
/* Determine maximum of two values. */
__MATH_INLINE float
__NTH (fmaxf (float __x, float __y))
@@ -136,4 +147,88 @@ __NTH (fmin (double __x, double __y))
__END_NAMESPACE_C99
# endif
+# if defined __SSE4_1__ && (__WORDSIZE == 64 || defined __SSE2_MATH__)
+# if defined __USE_MISC || defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
+__BEGIN_NAMESPACE_C99
+
+/* Round to nearest integer. */
+__MATH_INLINE double
+__NTH (rint (double __x))
+{
+ double __res;
+ __asm ("roundsd $4, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__MATH_INLINE float
+__NTH (rintf (float __x))
+{
+ float __res;
+ __asm ("roundss $4, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+
+# ifdef __USE_ISOC99
+/* Round to nearest integer without raising inexact exception. */
+__MATH_INLINE double
+__NTH (nearbyint (double __x))
+{
+ double __res;
+ __asm ("roundsd $0xc, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__MATH_INLINE float
+__NTH (nearbyintf (float __x))
+{
+ float __res;
+ __asm ("roundss $0xc, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+# endif
+
+__END_NAMESPACE_C99
+# endif
+
+__BEGIN_NAMESPACE_STD
+/* Smallest integral value not less than X. */
+__MATH_INLINE double
+__NTH (ceil (double __x))
+{
+ double __res;
+ __asm ("roundsd $2, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_STD
+
+__BEGIN_NAMESPACE_C99
+__MATH_INLINE float
+__NTH (ceilf (float __x))
+{
+ float __res;
+ __asm ("roundss $2, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_C99
+
+__BEGIN_NAMESPACE_STD
+/* Largest integer not greater than X. */
+__MATH_INLINE double
+__NTH (floor (double __x))
+{
+ double __res;
+ __asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_STD
+
+__BEGIN_NAMESPACE_C99
+__MATH_INLINE float
+__NTH (floorf (float __x))
+{
+ float __res;
+ __asm ("roundss $1, %1, %0" : "=x" (__res) : "xm" (__x));
+ return __res;
+}
+__END_NAMESPACE_C99
+# endif
+
#endif
diff --git a/sysdeps/x86_64/fpu/dla.h b/sysdeps/x86_64/fpu/dla.h
new file mode 100644
index 0000000000..fa2d52bbf0
--- /dev/null
+++ b/sysdeps/x86_64/fpu/dla.h
@@ -0,0 +1,17 @@
+#include <features.h>
+
+#ifdef __FMA4__
+# if __GNUC_PREREQ (4, 6)
+# define DLA_FMS(x,y,z) \
+ __builtin_fma (x, y, -(z))
+# else
+# define DLA_FMS(x,y,z) \
+ ({ double __z; \
+ asm ("vfmsubsd %3, %2, %1, %0" \
+ : "=x" (__z) \
+ : "x" ((double) (x)), "xm" ((double) (y)) , "x" ((double) (z))); \
+ __z; })
+# endif
+#endif
+
+#include "sysdeps/ieee754/dbl-64/dla.h"
diff --git a/sysdeps/x86_64/fpu/e_exp2l.S b/sysdeps/x86_64/fpu/e_exp2l.S
index 336b989098..7abf425c7b 100644
--- a/sysdeps/x86_64/fpu/e_exp2l.S
+++ b/sysdeps/x86_64/fpu/e_exp2l.S
@@ -36,3 +36,4 @@ ENTRY(__ieee754_exp2l)
fldz /* Set result to 0. */
2: ret
END (__ieee754_exp2l)
+strong_alias (__ieee754_exp2l, __exp2l_finite)
diff --git a/sysdeps/x86_64/fpu/e_fmodl.S b/sysdeps/x86_64/fpu/e_fmodl.S
index 2967bf224b..07c50df8d1 100644
--- a/sysdeps/x86_64/fpu/e_fmodl.S
+++ b/sysdeps/x86_64/fpu/e_fmodl.S
@@ -20,3 +20,4 @@ ENTRY(__ieee754_fmodl)
fstp %st(1)
ret
END (__ieee754_fmodl)
+strong_alias (__ieee754_fmodl, __fmodl_finite)
diff --git a/sysdeps/x86_64/fpu/e_log10l.S b/sysdeps/x86_64/fpu/e_log10l.S
index 633234b744..50c58757af 100644
--- a/sysdeps/x86_64/fpu/e_log10l.S
+++ b/sysdeps/x86_64/fpu/e_log10l.S
@@ -10,14 +10,12 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -30,9 +28,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##(%rip)
+# define MO(op) op##(%rip)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -65,3 +63,20 @@ ENTRY(__ieee754_log10l)
fstp %st(1)
ret
END(__ieee754_log10l)
+
+
+ENTRY(__log10l_finite)
+ fldlg2 // log10(2)
+ fldt 8(%rsp) // x : log10(2)
+ fld %st // x : x : log10(2)
+4: fsubl MO(one) // x-1 : x : log10(2)
+ fld %st // x-1 : x-1 : x : log10(2)
+ fabs // |x-1| : x-1 : x : log10(2)
+ fcompl MO(limit) // x-1 : x : log10(2)
+ fnstsw // x-1 : x : log10(2)
+ andb $0x45, %ah
+ jz 2b
+ fstp %st(1) // x-1 : log10(2)
+ fyl2xp1 // log10(x)
+ ret
+END(__log10l_finite)
diff --git a/sysdeps/x86_64/fpu/e_log2l.S b/sysdeps/x86_64/fpu/e_log2l.S
index f04d30a05a..78dc2d5c0e 100644
--- a/sysdeps/x86_64/fpu/e_log2l.S
+++ b/sysdeps/x86_64/fpu/e_log2l.S
@@ -10,11 +10,11 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -27,9 +27,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##(%rip)
+# define MO(op) op##(%rip)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -62,3 +62,20 @@ ENTRY(__ieee754_log2l)
fstp %st(1)
ret
END (__ieee754_log2l)
+
+
+ENTRY(__log2l_finite)
+ fldl MO(one)
+ fldt 8(%rsp) // x : 1
+ fld %st // x : x : 1
+ fsub %st(2), %st // x-1 : x : 1
+ fld %st // x-1 : x-1 : x : 1
+ fabs // |x-1| : x-1 : x : 1
+ fcompl MO(limit) // x-1 : x : 1
+ fnstsw // x-1 : x : 1
+ andb $0x45, %ah
+ jz 2b
+ fstp %st(1) // x-1 : 1
+ fyl2xp1 // log(x)
+ ret
+END (__log2l_finite)
diff --git a/sysdeps/x86_64/fpu/e_logl.S b/sysdeps/x86_64/fpu/e_logl.S
index 2ba91eedfd..2503b9a013 100644
--- a/sysdeps/x86_64/fpu/e_logl.S
+++ b/sysdeps/x86_64/fpu/e_logl.S
@@ -8,15 +8,13 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
- .align ALIGNARG(4)
+ .p2align 3
ASM_TYPE_DIRECTIVE(one,@object)
one: .double 1.0
ASM_SIZE_DIRECTIVE(one)
@@ -29,9 +27,9 @@ limit: .double 0.29
#ifdef PIC
-#define MO(op) op##(%rip)
+# define MO(op) op##(%rip)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -64,3 +62,20 @@ ENTRY(__ieee754_logl)
fstp %st(1)
ret
END (__ieee754_logl)
+
+
+ENTRY(__logl_finite)
+ fldln2 // log(2)
+ fldt 8(%rsp) // x : log(2)
+ fld %st // x : x : log(2)
+ fsubl MO(one) // x-1 : x : log(2)
+ fld %st // x-1 : x-1 : x : log(2)
+ fabs // |x-1| : x-1 : x : log(2)
+ fcompl MO(limit) // x-1 : x : log(2)
+ fnstsw // x-1 : x : log(2)
+ andb $0x45, %ah
+ jz 2b
+ fstp %st(1) // x-1 : log(2)
+ fyl2xp1 // log(x)
+ ret
+END (__logl_finite)
diff --git a/sysdeps/x86_64/fpu/e_powl.S b/sysdeps/x86_64/fpu/e_powl.S
index a0b1b1df1e..a65c465ec7 100644
--- a/sysdeps/x86_64/fpu/e_powl.S
+++ b/sysdeps/x86_64/fpu/e_powl.S
@@ -22,12 +22,27 @@
#include <machine/asm.h>
#ifdef __ELF__
- .section .rodata
+ .section .rodata.cst8,"aM",@progbits,8
#else
.text
#endif
+ .p2align 3
+ ASM_TYPE_DIRECTIVE(one,@object)
+one: .double 1.0
+ ASM_SIZE_DIRECTIVE(one)
+ ASM_TYPE_DIRECTIVE(limit,@object)
+limit: .double 0.29
+ ASM_SIZE_DIRECTIVE(limit)
+ ASM_TYPE_DIRECTIVE(p63,@object)
+p63: .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
+ ASM_SIZE_DIRECTIVE(p63)
- .align ALIGNARG(4)
+#ifdef __ELF__
+ .section .rodata.cst16,"aM",@progbits,16
+#else
+ .text
+#endif
+ .p2align 3
ASM_TYPE_DIRECTIVE(infinity,@object)
inf_zero:
infinity:
@@ -43,21 +58,11 @@ minfinity:
mzero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
ASM_SIZE_DIRECTIVE(minf_mzero)
- ASM_TYPE_DIRECTIVE(one,@object)
-one: .double 1.0
- ASM_SIZE_DIRECTIVE(one)
- ASM_TYPE_DIRECTIVE(limit,@object)
-limit: .double 0.29
- ASM_SIZE_DIRECTIVE(limit)
- ASM_TYPE_DIRECTIVE(p63,@object)
-p63:
- .byte 0, 0, 0, 0, 0, 0, 0xe0, 0x43
- ASM_SIZE_DIRECTIVE(p63)
#ifdef PIC
-#define MO(op) op##(%rip)
+# define MO(op) op##(%rip)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -339,3 +344,4 @@ ENTRY(__ieee754_powl)
ret
END(__ieee754_powl)
+strong_alias (__ieee754_powl, __powl_finite)
diff --git a/sysdeps/x86_64/fpu/e_remainderl.S b/sysdeps/x86_64/fpu/e_remainderl.S
index 480b1cad8b..4ee0910912 100644
--- a/sysdeps/x86_64/fpu/e_remainderl.S
+++ b/sysdeps/x86_64/fpu/e_remainderl.S
@@ -18,3 +18,4 @@ ENTRY(__ieee754_remainderl)
fstp %st(1)
ret
END (__ieee754_remainderl)
+strong_alias (__ieee754_remainderl, __remainderl_finite)
diff --git a/sysdeps/x86_64/fpu/e_scalbl.S b/sysdeps/x86_64/fpu/e_scalbl.S
index 6b229705ba..5833321a19 100644
--- a/sysdeps/x86_64/fpu/e_scalbl.S
+++ b/sysdeps/x86_64/fpu/e_scalbl.S
@@ -10,8 +10,6 @@
#include <machine/asm.h>
-RCSID("$NetBSD: $")
-
#ifdef __ELF__
.section .rodata
#else
@@ -23,16 +21,15 @@ RCSID("$NetBSD: $")
zero_nan:
.double 0.0
nan: .byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
-minus_zero:
.byte 0, 0, 0, 0, 0, 0, 0, 0x80
.byte 0, 0, 0, 0, 0, 0, 0xff, 0x7f
ASM_SIZE_DIRECTIVE(zero_nan)
#ifdef PIC
-#define MO(op) op##(%rip)
+# define MO(op) op##(%rip)
#else
-#define MO(op) op
+# define MO(op) op
#endif
.text
@@ -98,3 +95,4 @@ ENTRY(__ieee754_scalbl)
fdiv %st
ret
END(__ieee754_scalbl)
+strong_alias (__ieee754_scalbl, __scalbl_finite)
diff --git a/sysdeps/x86_64/fpu/e_sqrt.c b/sysdeps/x86_64/fpu/e_sqrt.c
index d588a8b10d..99120993fe 100644
--- a/sysdeps/x86_64/fpu/e_sqrt.c
+++ b/sysdeps/x86_64/fpu/e_sqrt.c
@@ -1,5 +1,5 @@
/* Square root of floating point number.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,12 +19,14 @@
#include <math_private.h>
+#undef __ieee754_sqrt
double
__ieee754_sqrt (double x)
{
double res;
- asm ("sqrtsd %0, %1" : "=x" (res) : "x" (x));
+ asm ("sqrtsd %1, %0" : "=x" (res) : "xm" (x));
return res;
}
+strong_alias (__ieee754_sqrt, __sqrt_finite)
diff --git a/sysdeps/x86_64/fpu/e_sqrtf.c b/sysdeps/x86_64/fpu/e_sqrtf.c
index f7801f05d2..dade4f59f4 100644
--- a/sysdeps/x86_64/fpu/e_sqrtf.c
+++ b/sysdeps/x86_64/fpu/e_sqrtf.c
@@ -1,5 +1,5 @@
/* Square root of floating point number.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -19,12 +19,14 @@
#include <math_private.h>
+#undef __ieee754_sqrtf
float
__ieee754_sqrtf (float x)
{
float res;
- asm ("sqrtss %0, %1" : "=x" (res) : "x" (x));
+ asm ("sqrtss %1, %0" : "=x" (res) : "xm" (x));
return res;
}
+strong_alias (__ieee754_sqrtf, __sqrtf_finite)
diff --git a/sysdeps/x86_64/fpu/feupdateenv.c b/sysdeps/x86_64/fpu/feupdateenv.c
index 291c56bd10..b2c62916c3 100644
--- a/sysdeps/x86_64/fpu/feupdateenv.c
+++ b/sysdeps/x86_64/fpu/feupdateenv.c
@@ -1,5 +1,5 @@
/* Install given floating-point environment and raise exceptions.
- Copyright (C) 1997,99,2000,01,07,2010 Free Software Foundation, Inc.
+ Copyright (C) 1997,99,2000,01,07,2010,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -36,7 +36,7 @@ __feupdateenv (const fenv_t *envp)
/* Raise the saved exception. Incidently for us the implementation
defined format of the values in objects of type fexcept_t is the
same as the ones specified using the FE_* constants. */
- feraiseexcept ((int) temp);
+ __feraiseexcept ((int) temp);
/* Success. */
return 0;
diff --git a/sysdeps/x86_64/fpu/fraiseexcpt.c b/sysdeps/x86_64/fpu/fraiseexcpt.c
index d1d3c03302..88d1a59bbb 100644
--- a/sysdeps/x86_64/fpu/fraiseexcpt.c
+++ b/sysdeps/x86_64/fpu/fraiseexcpt.c
@@ -1,5 +1,5 @@
/* Raise given exceptions.
- Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2011 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
@@ -21,7 +21,7 @@
#include <math.h>
int
-feraiseexcept (int excepts)
+__feraiseexcept (int excepts)
{
/* Raise exceptions represented by EXPECTS. But we must raise only
one signal at a time. It is important that if the overflow/underflow
@@ -117,4 +117,5 @@ feraiseexcept (int excepts)
/* Success. */
return 0;
}
+strong_alias (__feraiseexcept, feraiseexcept)
libm_hidden_def (feraiseexcept)
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index 25135e394a..aafdac720e 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -369,8 +369,8 @@ ifloat: 5
Test "Imaginary part of: cpow (2 + 3 i, 4 + 0 i) == -119.0 - 120.0 i":
float: 2
ifloat: 2
-ildouble: 2
-ldouble: 2
+ildouble: 4
+ldouble: 4
Test "Imaginary part of: cpow (e + 0 i, 0 + 2 * M_PIl i) == 1.0 + 0.0 i":
double: 2
float: 2
@@ -812,6 +812,10 @@ Test "sincos (pi/6, &sin_res, &cos_res) puts 0.866025403784438646763723170752936
float: 1
ifloat: 1
+Test "sinh (0x8p-32) == 1.86264514923095703232705808926175479e-9":
+ldouble: 1
+ildouble: 1
+
# tan
Test "tan (pi/4) == 1":
double: 1
@@ -1176,8 +1180,8 @@ double: 2
float: 2
idouble: 2
ifloat: 2
-ildouble: 2
-ldouble: 2
+ildouble: 4
+ldouble: 4
Function: Real part of "csin":
ildouble: 1
@@ -1323,6 +1327,10 @@ ifloat: 1
ildouble: 1
ldouble: 1
+Function: "sinh":
+ldouble: 1
+ildouble: 1
+
Function: "tan":
double: 1
idouble: 1
diff --git a/sysdeps/x86_64/fpu/math_private.h b/sysdeps/x86_64/fpu/math_private.h
index 4be753654a..7f52d5ee5f 100644
--- a/sysdeps/x86_64/fpu/math_private.h
+++ b/sysdeps/x86_64/fpu/math_private.h
@@ -1,58 +1,289 @@
#ifndef _MATH_PRIVATE_H
#define math_opt_barrier(x) \
-({ __typeof(x) __x; \
- if (sizeof (x) <= sizeof (double)) \
- __asm ("" : "=x" (__x) : "0" (x)); \
- else \
- __asm ("" : "=t" (__x) : "0" (x)); \
- __x; })
+ ({ __typeof(x) __x; \
+ if (sizeof (x) <= sizeof (double)) \
+ __asm ("" : "=x" (__x) : "0" (x)); \
+ else \
+ __asm ("" : "=t" (__x) : "0" (x)); \
+ __x; })
#define math_force_eval(x) \
-do \
- { \
- if (sizeof (x) <= sizeof (double)) \
- __asm __volatile ("" : : "x" (x)); \
- else \
- __asm __volatile ("" : : "f" (x)); \
- } \
-while (0)
+ do { \
+ if (sizeof (x) <= sizeof (double)) \
+ __asm __volatile ("" : : "x" (x)); \
+ else \
+ __asm __volatile ("" : : "f" (x)); \
+ } while (0)
#include <math/math_private.h>
/* We can do a few things better on x86-64. */
+#ifdef __AVX__
+# define MOVD "vmovd"
+#else
+# define MOVD "movd"
+#endif
+
/* Direct movement of float into integer register. */
#undef EXTRACT_WORDS64
-#define EXTRACT_WORDS64(i,d) \
-do { \
- long int i_; \
- asm ("movd %1, %0" : "=rm" (i_) : "x" (d)); \
- (i) = i_; \
-} while (0)
+#define EXTRACT_WORDS64(i, d) \
+ do { \
+ long int i_; \
+ asm (MOVD " %1, %0" : "=rm" (i_) : "x" ((double) (d))); \
+ (i) = i_; \
+ } while (0)
/* And the reverse. */
#undef INSERT_WORDS64
-#define INSERT_WORDS64(d,i) \
-do { \
- long int i_ = i; \
- asm ("movd %1, %0" : "=x" (d) : "rm" (i_)); \
-} while (0)
+#define INSERT_WORDS64(d, i) \
+ do { \
+ long int i_ = i; \
+ double d__; \
+ asm (MOVD " %1, %0" : "=x" (d__) : "rm" (i_)); \
+ d = d__; \
+ } while (0)
/* Direct movement of float into integer register. */
#undef GET_FLOAT_WORD
-#define GET_FLOAT_WORD(i,d) \
-do { \
- int i_; \
- asm ("movd %1, %0" : "=rm" (i_) : "x" (d)); \
- (i) = i_; \
-} while (0)
+#define GET_FLOAT_WORD(i, d) \
+ do { \
+ int i_; \
+ asm (MOVD " %1, %0" : "=rm" (i_) : "x" ((float) (d))); \
+ (i) = i_; \
+ } while (0)
/* And the reverse. */
#undef SET_FLOAT_WORD
-#define SET_FLOAT_WORD(d,i) \
-do { \
- int i_ = i; \
- asm ("movd %1, %0" : "=x" (d) : "rm" (i_)); \
-} while (0)
+#define SET_FLOAT_WORD(f, i) \
+ do { \
+ int i_ = i; \
+ float f__; \
+ asm (MOVD " %1, %0" : "=x" (f__) : "rm" (i_)); \
+ f = f__; \
+ } while (0)
+
+#endif
+
+#define __isnan(d) \
+ ({ long int __di; EXTRACT_WORDS64 (__di, (double) (d)); \
+ (__di & 0x7fffffffffffffffl) > 0x7ff0000000000000l; })
+#define __isnanf(d) \
+ ({ int __di; GET_FLOAT_WORD (__di, (float) d); \
+ (__di & 0x7fffffff) > 0x7f800000; })
+
+#define __isinf_ns(d) \
+ ({ long int __di; EXTRACT_WORDS64 (__di, (double) (d)); \
+ (__di & 0x7fffffffffffffffl) == 0x7ff0000000000000l; })
+#define __isinf_nsf(d) \
+ ({ int __di; GET_FLOAT_WORD (__di, (float) d); \
+ (__di & 0x7fffffff) == 0x7f800000; })
+
+#define __finite(d) \
+ ({ long int __di; EXTRACT_WORDS64 (__di, (double) (d)); \
+ (__di & 0x7fffffffffffffffl) < 0x7ff0000000000000l; })
+#define __finitef(d) \
+ ({ int __di; GET_FLOAT_WORD (__di, (float) d); \
+ (__di & 0x7fffffff) < 0x7f800000; })
+
+#ifdef __AVX__
+# define __ieee754_sqrt(d) \
+ ({ double __res; \
+ asm ("vsqrtsd %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
+ __res; })
+# define __ieee754_sqrtf(d) \
+ ({ float __res; \
+ asm ("vsqrtss %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
+ __res; })
+#else
+# define __ieee754_sqrt(d) \
+ ({ double __res; \
+ asm ("sqrtsd %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
+ __res; })
+# define __ieee754_sqrtf(d) \
+ ({ float __res; \
+ asm ("sqrtss %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
+ __res; })
+#endif
+#define __ieee754_sqrtl(d) \
+ ({ long double __res; \
+ asm ("fsqrt" : "=t" (__res) : "0" ((long double) (d))); \
+ __res; })
+
+#ifdef __SSE4_1__
+# ifndef __rint
+# ifdef __AVX__
+# define __rint(d) \
+ ({ double __res; \
+ asm ("vroundsd $4, %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
+ __res; })
+# else
+# define __rint(d) \
+ ({ double __res; \
+ asm ("roundsd $4, %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
+ __res; })
+# endif
+# endif
+# ifndef __rintf
+# ifdef __AVX__
+# define __rintf(d) \
+ ({ float __res; \
+ asm ("vroundss $4, %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
+ __res; })
+# else
+# define __rintf(d) \
+ ({ float __res; \
+ asm ("roundss $4, %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
+ __res; })
+# endif
+# endif
+
+# ifndef __floor
+# ifdef __AVX__
+# define __floor(d) \
+ ({ double __res; \
+ asm ("vroundsd $1, %1, %0, %0" : "=x" (__res) : "xm" ((double) (d))); \
+ __res; })
+# else
+# define __floor(d) \
+ ({ double __res; \
+ asm ("roundsd $1, %1, %0" : "=x" (__res) : "xm" ((double) (d))); \
+ __res; })
+# endif
+# endif
+# ifndef __floorf
+# ifdef __AVX__
+# define __floorf(d) \
+ ({ float __res; \
+ asm ("vroundss $1, %1, %0, %0" : "=x" (__res) : "xm" ((float) (d))); \
+ __res; })
+# else
+# define __floorf(d) \
+ ({ float __res; \
+ asm ("roundss $1, %1, %0" : "=x" (__res) : "xm" ((float) (d))); \
+ __res; })
+# endif
+# endif
+#endif
+
+
+/* Specialized variants of the <fenv.h> interfaces which only handle
+ either the FPU or the SSE unit. */
+#undef libc_fegetround
+#define libc_fegetround() \
+ ({ \
+ unsigned int mxcsr; \
+ asm volatile ("stmxcsr %0" : "=m" (*&mxcsr)); \
+ (mxcsr & 0x6000) >> 3; \
+ })
+#undef libc_fegetroundf
+#define libc_fegetroundf() libc_fegetround ()
+// #define libc_fegetroundl() fegetround ()
+
+#undef libc_fesetround
+#define libc_fesetround(r) \
+ do { \
+ unsigned int mxcsr; \
+ asm ("stmxcsr %0" : "=m" (*&mxcsr)); \
+ mxcsr = (mxcsr & ~0x6000) | ((r) << 3); \
+ asm volatile ("ldmxcsr %0" : : "m" (*&mxcsr)); \
+ } while (0)
+#undef libc_fesetroundf
+#define libc_fesetroundf(r) libc_fesetround (r)
+// #define libc_fesetroundl(r) (void) fesetround (r)
+
+#undef libc_feholdexcept
+#ifdef __AVX__
+# define libc_feholdexcept(e) \
+ do { \
+ unsigned int mxcsr; \
+ asm ("vstmxcsr %0" : "=m" (*&mxcsr)); \
+ (e)->__mxcsr = mxcsr; \
+ mxcsr = (mxcsr | 0x1f80) & ~0x3f; \
+ asm volatile ("vldmxcsr %0" : : "m" (*&mxcsr)); \
+ } while (0)
+#else
+# define libc_feholdexcept(e) \
+ do { \
+ unsigned int mxcsr; \
+ asm ("stmxcsr %0" : "=m" (*&mxcsr)); \
+ (e)->__mxcsr = mxcsr; \
+ mxcsr = (mxcsr | 0x1f80) & ~0x3f; \
+ asm volatile ("ldmxcsr %0" : : "m" (*&mxcsr)); \
+ } while (0)
+#endif
+#undef libc_feholdexceptf
+#define libc_feholdexceptf(e) libc_feholdexcept (e)
+// #define libc_feholdexceptl(e) (void) feholdexcept (e)
+
+#undef libc_feholdexcept_setround
+#ifdef __AVX__
+# define libc_feholdexcept_setround(e, r) \
+ do { \
+ unsigned int mxcsr; \
+ asm ("vstmxcsr %0" : "=m" (*&mxcsr)); \
+ (e)->__mxcsr = mxcsr; \
+ mxcsr = ((mxcsr | 0x1f80) & ~0x603f) | ((r) << 3); \
+ asm volatile ("vldmxcsr %0" : : "m" (*&mxcsr)); \
+ } while (0)
+#else
+# define libc_feholdexcept_setround(e, r) \
+ do { \
+ unsigned int mxcsr; \
+ asm ("stmxcsr %0" : "=m" (*&mxcsr)); \
+ (e)->__mxcsr = mxcsr; \
+ mxcsr = ((mxcsr | 0x1f80) & ~0x603f) | ((r) << 3); \
+ asm volatile ("ldmxcsr %0" : : "m" (*&mxcsr)); \
+ } while (0)
+#endif
+#undef libc_feholdexcept_setroundf
+#define libc_feholdexcept_setroundf(e, r) libc_feholdexcept_setround (e, r)
+// #define libc_feholdexcept_setroundl(e, r) ...
+
+#undef libc_fetestexcept
+#ifdef __AVX__
+# define libc_fetestexcept(e) \
+ ({ unsigned int mxcsr; asm volatile ("vstmxcsr %0" : "=m" (*&mxcsr)); \
+ mxcsr & (e) & FE_ALL_EXCEPT; })
+#else
+# define libc_fetestexcept(e) \
+ ({ unsigned int mxcsr; asm volatile ("stmxcsr %0" : "=m" (*&mxcsr)); \
+ mxcsr & (e) & FE_ALL_EXCEPT; })
+#endif
+#undef libc_fetestexceptf
+#define libc_fetestexceptf(e) libc_fetestexcept (e)
+// #define libc_fetestexceptl(e) fetestexcept (e)
+
+#undef libc_fesetenv
+#ifdef __AVX__
+# define libc_fesetenv(e) \
+ asm volatile ("vldmxcsr %0" : : "m" ((e)->__mxcsr))
+#else
+# define libc_fesetenv(e) \
+ asm volatile ("ldmxcsr %0" : : "m" ((e)->__mxcsr))
+#endif
+#undef libc_fesetenvf
+#define libc_fesetenvf(e) libc_fesetenv (e)
+// #define libc_fesetenvl(e) (void) fesetenv (e)
+#undef libc_feupdateenv
+#ifdef __AVX__
+# define libc_feupdateenv(e) \
+ do { \
+ unsigned int mxcsr; \
+ asm volatile ("vstmxcsr %0" : "=m" (*&mxcsr)); \
+ asm volatile ("vldmxcsr %0" : : "m" ((e)->__mxcsr)); \
+ __feraiseexcept (mxcsr & FE_ALL_EXCEPT); \
+ } while (0)
+#else
+# define libc_feupdateenv(e) \
+ do { \
+ unsigned int mxcsr; \
+ asm volatile ("stmxcsr %0" : "=m" (*&mxcsr)); \
+ asm volatile ("ldmxcsr %0" : : "m" ((e)->__mxcsr)); \
+ __feraiseexcept (mxcsr & FE_ALL_EXCEPT); \
+ } while (0)
#endif
+#undef libc_feupdateenvf
+#define libc_feupdateenvf(e) libc_feupdateenv (e)
+// #define libc_feupdateenvl(e) (void) feupdateenv (e)
diff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile
new file mode 100644
index 0000000000..be689036dc
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/Makefile
@@ -0,0 +1,54 @@
+ifeq ($(subdir),math)
+libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \
+ s_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c
+
+ifeq ($(have-mfma4),yes)
+libm-sysdep_routines += e_exp-fma4 e_log-fma4 e_pow-fma4 s_atan-fma4 \
+ e_asin-fma4 e_atan2-fma4 s_sin-fma4 s_tan-fma4 \
+ mplog-fma4 mpa-fma4 slowexp-fma4 slowpow-fma4 \
+ sincos32-fma4 doasin-fma4 dosincos-fma4 \
+ brandred-fma4 halfulp-fma4 mpexp-fma4 \
+ mpatan2-fma4 mpatan-fma4 mpsqrt-fma4 mptan-fma4
+
+CFLAGS-brandred-fma4.c = -mfma4
+CFLAGS-doasin-fma4.c = -mfma4
+CFLAGS-dosincos-fma4.c = -mfma4
+CFLAGS-e_asin-fma4.c = -mfma4
+CFLAGS-e_atan2-fma4.c = -mfma4
+CFLAGS-e_exp-fma4.c = -mfma4
+CFLAGS-e_log-fma4.c = -mfma4
+CFLAGS-e_pow-fma4.c = -mfma4
+CFLAGS-halfulp-fma4.c = -mfma4
+CFLAGS-mpa-fma4.c = -mfma4
+CFLAGS-mpatan-fma4.c = -mfma4
+CFLAGS-mpatan2-fma4.c = -mfma4
+CFLAGS-mpexp-fma4.c = -mfma4
+CFLAGS-mplog-fma4.c = -mfma4
+CFLAGS-mpsqrt-fma4.c = -mfma4
+CFLAGS-mptan-fma4.c = -mfma4
+CFLAGS-s_atan-fma4.c = -mfma4
+CFLAGS-sincos32-fma4.c = -mfma4
+CFLAGS-slowexp-fma4.c = -mfma4
+CFLAGS-slowpow-fma4.c = -mfma4
+CFLAGS-s_sin-fma4.c = -mfma4
+CFLAGS-s_tan-fma4.c = -mfma4
+endif
+
+ifeq ($(config-cflags-avx),yes)
+libm-sysdep_routines += e_exp-avx e_log-avx s_atan-avx \
+ e_atan2-avx s_sin-avx s_tan-avx \
+ mplog-avx mpa-avx slowexp-avx \
+ mpexp-avx
+
+CFLAGS-e_atan2-avx.c = -mavx
+CFLAGS-e_exp-avx.c = -mavx
+CFLAGS-e_log-avx.c = -mavx
+CFLAGS-mpa-avx.c = -mavx
+CFLAGS-mpexp-avx.c = -mavx
+CFLAGS-mplog-avx.c = -mavx
+CFLAGS-s_atan-avx.c = -mavx
+CFLAGS-s_sin-avx.c = -mavx
+CFLAGS-slowexp-avx.c = -mavx
+CFLAGS-s_tan-avx.c = -mavx
+endif
+endif
diff --git a/sysdeps/x86_64/fpu/multiarch/brandred-fma4.c b/sysdeps/x86_64/fpu/multiarch/brandred-fma4.c
new file mode 100644
index 0000000000..f4f68ac962
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/brandred-fma4.c
@@ -0,0 +1,4 @@
+#define __branred __branred_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/branred.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/doasin-fma4.c b/sysdeps/x86_64/fpu/multiarch/doasin-fma4.c
new file mode 100644
index 0000000000..53eb419472
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/doasin-fma4.c
@@ -0,0 +1,4 @@
+#define __doasin __doasin_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/doasin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/dosincos-fma4.c b/sysdeps/x86_64/fpu/multiarch/dosincos-fma4.c
new file mode 100644
index 0000000000..1578b2fce0
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/dosincos-fma4.c
@@ -0,0 +1,6 @@
+#define __docos __docos_fma4
+#define __dubcos __dubcos_fma4
+#define __dubsin __dubsin_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/dosincos.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_asin-fma4.c
new file mode 100644
index 0000000000..2657c31f49
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_asin-fma4.c
@@ -0,0 +1,11 @@
+#define __ieee754_acos __ieee754_acos_fma4
+#define __ieee754_asin __ieee754_asin_fma4
+#define __cos32 __cos32_fma4
+#define __doasin __doasin_fma4
+#define __docos __docos_fma4
+#define __dubcos __dubcos_fma4
+#define __dubsin __dubsin_fma4
+#define __sin32 __sin32_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/e_asin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_asin.c b/sysdeps/x86_64/fpu/multiarch/e_asin.c
new file mode 100644
index 0000000000..e742a9c133
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_asin.c
@@ -0,0 +1,23 @@
+#ifdef HAVE_FMA4_SUPPORT
+# include <init-arch.h>
+# include <math_private.h>
+
+extern double __ieee754_acos_sse2 (double);
+extern double __ieee754_asin_sse2 (double);
+extern double __ieee754_acos_fma4 (double);
+extern double __ieee754_asin_fma4 (double);
+
+libm_ifunc (__ieee754_acos,
+ HAS_FMA4 ? __ieee754_acos_fma4 : __ieee754_acos_sse2);
+strong_alias (__ieee754_acos, __acos_finite)
+
+libm_ifunc (__ieee754_asin,
+ HAS_FMA4 ? __ieee754_asin_fma4 : __ieee754_asin_sse2);
+strong_alias (__ieee754_asin, __asin_finite)
+
+# define __ieee754_acos __ieee754_acos_sse2
+# define __ieee754_asin __ieee754_asin_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/e_asin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2-avx.c b/sysdeps/x86_64/fpu/multiarch/e_atan2-avx.c
new file mode 100644
index 0000000000..3012afac37
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2-avx.c
@@ -0,0 +1,9 @@
+#define __ieee754_atan2 __ieee754_atan2_avx
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __dvd __dvd_avx
+#define __mul __mul_avx
+#define __sub __sub_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/e_atan2.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c
new file mode 100644
index 0000000000..f4e986293e
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2-fma4.c
@@ -0,0 +1,10 @@
+#define __ieee754_atan2 __ieee754_atan2_fma4
+#define __add __add_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __dvd __dvd_fma4
+#define __mpatan2 __mpatan2_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/e_atan2.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_atan2.c b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
new file mode 100644
index 0000000000..6867c6e64e
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_atan2.c
@@ -0,0 +1,24 @@
+#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+# include <init-arch.h>
+# include <math_private.h>
+
+extern double __ieee754_atan2_sse2 (double, double);
+extern double __ieee754_atan2_avx (double, double);
+# ifdef HAVE_FMA4_SUPPORT
+extern double __ieee754_atan2_fma4 (double, double);
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __ieee754_atan2_fma4 ((void *) 0)
+# endif
+
+libm_ifunc (__ieee754_atan2,
+ HAS_FMA4 ? __ieee754_atan2_fma4
+ : (HAS_AVX ? __ieee754_atan2_avx : __ieee754_atan2_sse2));
+strong_alias (__ieee754_atan2, __atan2_finite)
+
+# define __ieee754_atan2 __ieee754_atan2_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/e_atan2.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp-avx.c b/sysdeps/x86_64/fpu/multiarch/e_exp-avx.c
new file mode 100644
index 0000000000..ee5dd6d2dc
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp-avx.c
@@ -0,0 +1,6 @@
+#define __ieee754_exp __ieee754_exp_avx
+#define __exp1 __exp1_avx
+#define __slowexp __slowexp_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/e_exp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c
new file mode 100644
index 0000000000..ae6eb67603
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp-fma4.c
@@ -0,0 +1,6 @@
+#define __ieee754_exp __ieee754_exp_fma4
+#define __exp1 __exp1_fma4
+#define __slowexp __slowexp_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/e_exp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_exp.c b/sysdeps/x86_64/fpu/multiarch/e_exp.c
new file mode 100644
index 0000000000..3c650287c5
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_exp.c
@@ -0,0 +1,24 @@
+#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+# include <init-arch.h>
+# include <math_private.h>
+
+extern double __ieee754_exp_sse2 (double);
+extern double __ieee754_exp_avx (double);
+# ifdef HAVE_FMA4_SUPPORT
+extern double __ieee754_exp_fma4 (double);
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __ieee754_exp_fma4 ((void *) 0)
+# endif
+
+libm_ifunc (__ieee754_exp,
+ HAS_FMA4 ? __ieee754_exp_fma4
+ : (HAS_AVX ? __ieee754_exp_avx : __ieee754_exp_sse2));
+strong_alias (__ieee754_exp, __exp_finite)
+
+# define __ieee754_exp __ieee754_exp_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/e_exp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log-avx.c b/sysdeps/x86_64/fpu/multiarch/e_log-avx.c
new file mode 100644
index 0000000000..c669019bc2
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_log-avx.c
@@ -0,0 +1,8 @@
+#define __ieee754_log __ieee754_log_avx
+#define __mplog __mplog_avx
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __sub __sub_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/e_log.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
new file mode 100644
index 0000000000..a2346cc618
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_log-fma4.c
@@ -0,0 +1,8 @@
+#define __ieee754_log __ieee754_log_fma4
+#define __mplog __mplog_fma4
+#define __add __add_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __sub __sub_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/e_log.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_log.c b/sysdeps/x86_64/fpu/multiarch/e_log.c
new file mode 100644
index 0000000000..3b468d0f46
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_log.c
@@ -0,0 +1,25 @@
+#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+# include <init-arch.h>
+# include <math_private.h>
+
+extern double __ieee754_log_sse2 (double);
+extern double __ieee754_log_avx (double);
+# ifdef HAVE_FMA4_SUPPORT
+extern double __ieee754_log_fma4 (double);
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __ieee754_log_fma4 ((void *) 0)
+# endif
+
+libm_ifunc (__ieee754_log,
+ HAS_FMA4 ? __ieee754_log_fma4
+ : (HAS_AVX ? __ieee754_log_avx
+ : __ieee754_log_sse2));
+strong_alias (__ieee754_log, __log_finite)
+
+# define __ieee754_log __ieee754_log_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/e_log.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_pow-fma4.c b/sysdeps/x86_64/fpu/multiarch/e_pow-fma4.c
new file mode 100644
index 0000000000..5b3ea8e103
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_pow-fma4.c
@@ -0,0 +1,6 @@
+#define __ieee754_pow __ieee754_pow_fma4
+#define __exp1 __exp1_fma4
+#define __slowpow __slowpow_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/e_pow.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/e_pow.c b/sysdeps/x86_64/fpu/multiarch/e_pow.c
new file mode 100644
index 0000000000..a740b6c447
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/e_pow.c
@@ -0,0 +1,15 @@
+#ifdef HAVE_FMA4_SUPPORT
+# include <init-arch.h>
+# include <math_private.h>
+
+extern double __ieee754_pow_sse2 (double, double);
+extern double __ieee754_pow_fma4 (double, double);
+
+libm_ifunc (__ieee754_pow, HAS_FMA4 ? __ieee754_pow_fma4 : __ieee754_pow_sse2);
+strong_alias (__ieee754_pow, __pow_finite)
+
+# define __ieee754_pow __ieee754_pow_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/e_pow.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/halfulp-fma4.c b/sysdeps/x86_64/fpu/multiarch/halfulp-fma4.c
new file mode 100644
index 0000000000..a00c17c016
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/halfulp-fma4.c
@@ -0,0 +1,4 @@
+#define __halfulp __halfulp_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/halfulp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpa-avx.c b/sysdeps/x86_64/fpu/multiarch/mpa-avx.c
new file mode 100644
index 0000000000..a92dbedc05
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mpa-avx.c
@@ -0,0 +1,12 @@
+#define __add __add_avx
+#define __mul __mul_avx
+#define __sub __sub_avx
+#define __dbl_mp __dbl_mp_avx
+#define __dvd __dvd_avx
+
+#define NO___CPY 1
+#define NO___MP_DBL 1
+#define NO___ACR 1
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/mpa.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c
new file mode 100644
index 0000000000..f8ed8f3464
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mpa-fma4.c
@@ -0,0 +1,12 @@
+#define __add __add_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __dvd __dvd_fma4
+
+#define NO___CPY 1
+#define NO___MP_DBL 1
+#define NO___ACR 1
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/mpa.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c
new file mode 100644
index 0000000000..fbd3bd49a2
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mpatan-fma4.c
@@ -0,0 +1,10 @@
+#define __mpatan __mpatan_fma4
+#define __add __add_fma4
+#define __dvd __dvd_fma4
+#define __mpsqrt __mpsqrt_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define AVOID_MPATAN_H 1
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/mpatan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c
new file mode 100644
index 0000000000..e6e44d49b0
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mpatan2-fma4.c
@@ -0,0 +1,9 @@
+#define __mpatan2 __mpatan2_fma4
+#define __add __add_fma4
+#define __dvd __dvd_fma4
+#define __mpatan __mpatan_fma4
+#define __mpsqrt __mpsqrt_fma4
+#define __mul __mul_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/mpatan2.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpexp-avx.c b/sysdeps/x86_64/fpu/multiarch/mpexp-avx.c
new file mode 100644
index 0000000000..87f29c96c9
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mpexp-avx.c
@@ -0,0 +1,9 @@
+#define __mpexp __mpexp_avx
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __dvd __dvd_avx
+#define __mul __mul_avx
+#define AVOID_MPEXP_H 1
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/mpexp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c
new file mode 100644
index 0000000000..07ca6e9ad0
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mpexp-fma4.c
@@ -0,0 +1,9 @@
+#define __mpexp __mpexp_fma4
+#define __add __add_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __dvd __dvd_fma4
+#define __mul __mul_fma4
+#define AVOID_MPEXP_H 1
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/mpexp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mplog-avx.c b/sysdeps/x86_64/fpu/multiarch/mplog-avx.c
new file mode 100644
index 0000000000..fd783d9a67
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mplog-avx.c
@@ -0,0 +1,8 @@
+#define __mplog __mplog_avx
+#define __add __add_avx
+#define __mpexp __mpexp_avx
+#define __mul __mul_avx
+#define __sub __sub_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/mplog.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mplog-fma4.c b/sysdeps/x86_64/fpu/multiarch/mplog-fma4.c
new file mode 100644
index 0000000000..b4733118d7
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mplog-fma4.c
@@ -0,0 +1,8 @@
+#define __mplog __mplog_fma4
+#define __add __add_fma4
+#define __mpexp __mpexp_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/mplog.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c b/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c
new file mode 100644
index 0000000000..f8a1ba2d92
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mpsqrt-fma4.c
@@ -0,0 +1,8 @@
+#define __mpsqrt __mpsqrt_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define AVOID_MPSQRT_H 1
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/mpsqrt.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/mptan-fma4.c b/sysdeps/x86_64/fpu/multiarch/mptan-fma4.c
new file mode 100644
index 0000000000..fb4a9d48ca
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/mptan-fma4.c
@@ -0,0 +1,7 @@
+#define __mptan __mptan_fma4
+#define __c32 __c32_fma4
+#define __dvd __dvd_fma4
+#define __mpranred __mpranred_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/mptan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c b/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c
new file mode 100644
index 0000000000..b5cb9c3a75
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan-avx.c
@@ -0,0 +1,8 @@
+#define atan __atan_avx
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __mul __mul_avx
+#define __sub __sub_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/s_atan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
new file mode 100644
index 0000000000..9e83e6cdab
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan-fma4.c
@@ -0,0 +1,9 @@
+#define atan __atan_fma4
+#define __add __add_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __mpatan __mpatan_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/s_atan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_atan.c b/sysdeps/x86_64/fpu/multiarch/s_atan.c
new file mode 100644
index 0000000000..3160201c17
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_atan.c
@@ -0,0 +1,21 @@
+#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+# include <init-arch.h>
+# include <math.h>
+
+extern double __atan_sse2 (double);
+extern double __atan_avx (double);
+# ifdef HAVE_FMA4_SUPPORT
+extern double __atan_fma4 (double);
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __atan_fma4 ((void *) 0)
+# endif
+
+libm_ifunc (atan, HAS_FMA4 ? __atan_fma4 : HAS_AVX ? __atan_avx : __atan_sse2);
+
+# define atan __atan_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/s_atan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
new file mode 100644
index 0000000000..6a5ea3ff27
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceil-c.c
@@ -0,0 +1,2 @@
+#define __ceil __ceil_c
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_ceil.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceil.S b/sysdeps/x86_64/fpu/multiarch/s_ceil.S
new file mode 100644
index 0000000000..d0f8da3443
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceil.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__ceil)
+ .type __ceil, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __ceil_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __ceil_c(%rip), %rax
+2: ret
+END(__ceil)
+weak_alias (__ceil, ceil)
+
+
+ENTRY(__ceil_sse41)
+ roundsd $2, %xmm0, %xmm0
+ ret
+END(__ceil_sse41)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceilf-c.c b/sysdeps/x86_64/fpu/multiarch/s_ceilf-c.c
new file mode 100644
index 0000000000..229a6273b2
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceilf-c.c
@@ -0,0 +1,2 @@
+#define __ceilf __ceilf_c
+#include <sysdeps/ieee754/flt-32/s_ceilf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_ceilf.S b/sysdeps/x86_64/fpu/multiarch/s_ceilf.S
new file mode 100644
index 0000000000..65ce252f6f
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_ceilf.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__ceilf)
+ .type __ceilf, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __ceilf_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __ceilf_c(%rip), %rax
+2: ret
+END(__ceilf)
+weak_alias (__ceilf, ceilf)
+
+
+ENTRY(__ceilf_sse41)
+ roundss $2, %xmm0, %xmm0
+ ret
+END(__ceilf_sse41)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor-c.c b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
new file mode 100644
index 0000000000..68733b69ef
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_floor-c.c
@@ -0,0 +1,3 @@
+#undef __floor
+#define __floor __floor_c
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_floor.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floor.S b/sysdeps/x86_64/fpu/multiarch/s_floor.S
new file mode 100644
index 0000000000..514ea95411
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_floor.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__floor)
+ .type __floor, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __floor_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __floor_c(%rip), %rax
+2: ret
+END(__floor)
+weak_alias (__floor, floor)
+
+
+ENTRY(__floor_sse41)
+ roundsd $1, %xmm0, %xmm0
+ ret
+END(__floor_sse41)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floorf-c.c b/sysdeps/x86_64/fpu/multiarch/s_floorf-c.c
new file mode 100644
index 0000000000..2386362328
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_floorf-c.c
@@ -0,0 +1,3 @@
+#undef __floorf
+#define __floorf __floorf_c
+#include <sysdeps/ieee754/flt-32/s_floorf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_floorf.S b/sysdeps/x86_64/fpu/multiarch/s_floorf.S
new file mode 100644
index 0000000000..d8cd56e496
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_floorf.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__floorf)
+ .type __floorf, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __floorf_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __floorf_c(%rip), %rax
+2: ret
+END(__floorf)
+weak_alias (__floorf, floorf)
+
+
+ENTRY(__floorf_sse41)
+ roundss $1, %xmm0, %xmm0
+ ret
+END(__floorf_sse41)
diff --git a/sysdeps/x86_64/multiarch/s_fma.c b/sysdeps/x86_64/fpu/multiarch/s_fma.c
index 9a680c68fc..dca256a517 100644
--- a/sysdeps/x86_64/multiarch/s_fma.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fma.c
@@ -1,5 +1,5 @@
/* FMA version of fma.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -28,13 +28,29 @@ extern double __fma_sse2 (double x, double y, double z) attribute_hidden;
static double
-__fma_fma (double x, double y, double z)
+__fma_fma3 (double x, double y, double z)
{
asm ("vfmadd213sd %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z));
return x;
}
-libm_ifunc (__fma, HAS_FMA ? __fma_fma : __fma_sse2);
+
+# ifdef HAVE_FMA4_SUPPORT
+static double
+__fma_fma4 (double x, double y, double z)
+{
+ asm ("vfmaddsd %3, %2, %1, %0" : "=x" (x) : "x" (x), "xm" (y), "xm" (z));
+ return x;
+}
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __fma_fma4 ((void *) 0)
+# endif
+
+
+libm_ifunc (__fma, HAS_FMA
+ ? __fma_fma3 : (HAS_FMA4 ? __fma_fma4 : __fma_sse2));
weak_alias (__fma, fma)
# define __fma __fma_sse2
diff --git a/sysdeps/x86_64/multiarch/s_fmaf.c b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
index 85ef65a50e..0dcf273ea0 100644
--- a/sysdeps/x86_64/multiarch/s_fmaf.c
+++ b/sysdeps/x86_64/fpu/multiarch/s_fmaf.c
@@ -1,5 +1,5 @@
/* FMA version of fmaf.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010, 2011 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
@@ -27,13 +27,29 @@ extern float __fmaf_sse2 (float x, float y, float z) attribute_hidden;
static float
-__fmaf_fma (float x, float y, float z)
+__fmaf_fma3 (float x, float y, float z)
{
asm ("vfmadd213ss %3, %2, %0" : "=x" (x) : "0" (x), "x" (y), "xm" (z));
return x;
}
-libm_ifunc (__fmaf, HAS_FMA ? __fmaf_fma : __fmaf_sse2);
+
+# ifdef HAVE_FMA4_SUPPORT
+static float
+__fmaf_fma4 (float x, float y, float z)
+{
+ asm ("vfmaddss %3, %2, %1, %0" : "=x" (x) : "x" (x), "xm" (y), "xm" (z));
+ return x;
+}
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __fmaf_fma4 ((void *) 0)
+# endif
+
+
+libm_ifunc (__fmaf, HAS_FMA
+ ? __fmaf_fma3 : (HAS_FMA4 ? __fmaf_fma4 : __fmaf_sse2));
weak_alias (__fmaf, fmaf)
# define __fmaf __fmaf_sse2
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c
new file mode 100644
index 0000000000..f897a2a6a6
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint-c.c
@@ -0,0 +1,3 @@
+#undef __nearbyint
+#define __nearbyint __nearbyint_c
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_nearbyint.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyint.S b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.S
new file mode 100644
index 0000000000..8ed90e7fd8
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyint.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__nearbyint)
+ .type __nearbyint, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __nearbyint_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __nearbyint_c(%rip), %rax
+2: ret
+END(__nearbyint)
+weak_alias (__nearbyint, nearbyint)
+
+
+ENTRY(__nearbyint_sse41)
+ roundsd $0xc, %xmm0, %xmm0
+ ret
+END(__nearbyint_sse41)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-c.c b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-c.c
new file mode 100644
index 0000000000..aa7768233b
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf-c.c
@@ -0,0 +1,3 @@
+#undef __nearbyintf
+#define __nearbyintf __nearbyintf_c
+#include <sysdeps/ieee754/flt-32/s_nearbyintf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S
new file mode 100644
index 0000000000..943f35d6a1
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__nearbyintf)
+ .type __nearbyintf, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __nearbyintf_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __nearbyintf_c(%rip), %rax
+2: ret
+END(__nearbyintf)
+weak_alias (__nearbyintf, nearbyintf)
+
+
+ENTRY(__nearbyintf_sse41)
+ roundss $0xc, %xmm0, %xmm0
+ ret
+END(__nearbyintf_sse41)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint-c.c b/sysdeps/x86_64/fpu/multiarch/s_rint-c.c
new file mode 100644
index 0000000000..162a630ff9
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_rint-c.c
@@ -0,0 +1,3 @@
+#undef __rint
+#define __rint __rint_c
+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_rint.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rint.S b/sysdeps/x86_64/fpu/multiarch/s_rint.S
new file mode 100644
index 0000000000..75beffad98
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_rint.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__rint)
+ .type __rint, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __rint_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __rint_c(%rip), %rax
+2: ret
+END(__rint)
+weak_alias (__rint, rint)
+
+
+ENTRY(__rint_sse41)
+ roundsd $4, %xmm0, %xmm0
+ ret
+END(__rint_sse41)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rintf-c.c b/sysdeps/x86_64/fpu/multiarch/s_rintf-c.c
new file mode 100644
index 0000000000..8505249f34
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_rintf-c.c
@@ -0,0 +1,3 @@
+#undef __rintf
+#define __rintf __rintf_c
+#include <sysdeps/ieee754/flt-32/s_rintf.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_rintf.S b/sysdeps/x86_64/fpu/multiarch/s_rintf.S
new file mode 100644
index 0000000000..512d28cacf
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_rintf.S
@@ -0,0 +1,40 @@
+/* Copyright (C) 2011 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@gmail.come>, 2011.
+
+ 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 <machine/asm.h>
+#include <init-arch.h>
+
+
+ENTRY(__rintf)
+ .type __rintf, @gnu_indirect_function
+ call __get_cpu_features@plt
+ movq %rax, %rdx
+ leaq __rintf_sse41(%rip), %rax
+ testl $bit_SSE4_1, CPUID_OFFSET+index_SSE4_1(%rdx)
+ jnz 2f
+ leaq __rintf_c(%rip), %rax
+2: ret
+END(__rintf)
+weak_alias (__rintf, rintf)
+
+
+ENTRY(__rintf_sse41)
+ roundss $4, %xmm0, %xmm0
+ ret
+END(__rintf_sse41)
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin-avx.c b/sysdeps/x86_64/fpu/multiarch/s_sin-avx.c
new file mode 100644
index 0000000000..e1c6de0259
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin-avx.c
@@ -0,0 +1,5 @@
+#define __cos __cos_avx
+#define __sin __sin_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/s_sin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
new file mode 100644
index 0000000000..2501af981a
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin-fma4.c
@@ -0,0 +1,12 @@
+#define __cos __cos_fma4
+#define __sin __sin_fma4
+#define __branred __branred_fma4
+#define __docos __docos_fma4
+#define __dubsin __dubsin_fma4
+#define __mpcos __mpcos_fma4
+#define __mpcos1 __mpcos1_fma4
+#define __mpsin __mpsin_fma4
+#define __mpsin1 __mpsin1_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/s_sin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_sin.c b/sysdeps/x86_64/fpu/multiarch/s_sin.c
new file mode 100644
index 0000000000..1ba9dbc50c
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_sin.c
@@ -0,0 +1,31 @@
+#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+# include <init-arch.h>
+# include <math.h>
+# undef NAN
+
+extern double __cos_sse2 (double);
+extern double __sin_sse2 (double);
+extern double __cos_avx (double);
+extern double __sin_avx (double);
+# ifdef HAVE_FMA4_SUPPORT
+extern double __cos_fma4 (double);
+extern double __sin_fma4 (double);
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __cos_fma4 ((void *) 0)
+# define __sin_fma4 ((void *) 0)
+# endif
+
+libm_ifunc (__cos, HAS_FMA4 ? __cos_fma4 : HAS_AVX ? __cos_avx : __cos_sse2);
+weak_alias (__cos, cos)
+
+libm_ifunc (__sin, HAS_FMA4 ? __sin_fma4 : HAS_AVX ? __sin_avx : __sin_sse2);
+weak_alias (__sin, sin)
+
+# define __cos __cos_sse2
+# define __sin __sin_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/s_sin.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan-avx.c b/sysdeps/x86_64/fpu/multiarch/s_tan-avx.c
new file mode 100644
index 0000000000..53de5d3c98
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan-avx.c
@@ -0,0 +1,6 @@
+#define tan __tan_avx
+#define __dbl_mp __dbl_mp_avx
+#define __sub __sub_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/s_tan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c b/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
new file mode 100644
index 0000000000..d7dab3ca9e
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan-fma4.c
@@ -0,0 +1,9 @@
+#define tan __tan_fma4
+#define __branred __branred_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __mpranred __mpranred_fma4
+#define __mptan __mptan_fma4
+#define __sub __sub_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/s_tan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/s_tan.c b/sysdeps/x86_64/fpu/multiarch/s_tan.c
new file mode 100644
index 0000000000..8f6601e17c
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/s_tan.c
@@ -0,0 +1,21 @@
+#if defined HAVE_FMA4_SUPPORT || defined HAVE_AVX_SUPPORT
+# include <init-arch.h>
+# include <math.h>
+
+extern double __tan_sse2 (double);
+extern double __tan_avx (double);
+# ifdef HAVE_FMA4_SUPPORT
+extern double __tan_fma4 (double);
+# else
+# undef HAS_FMA4
+# define HAS_FMA4 0
+# define __tan_fma4 ((void *) 0)
+# endif
+
+libm_ifunc (tan, HAS_FMA4 ? __tan_fma4 : HAS_AVX ? __tan_avx : __tan_sse2);
+
+# define tan __tan_sse2
+#endif
+
+
+#include <sysdeps/ieee754/dbl-64/s_tan.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c b/sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c
new file mode 100644
index 0000000000..ebbfa18cca
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/sincos32-fma4.c
@@ -0,0 +1,15 @@
+#define __cos32 __cos32_fma4
+#define __sin32 __sin32_fma4
+#define __c32 __c32_fma4
+#define __mpsin __mpsin_fma4
+#define __mpsin1 __mpsin1_fma4
+#define __mpcos __mpcos_fma4
+#define __mpcos1 __mpcos1_fma4
+#define __mpranred __mpranred_fma4
+#define __add __add_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/sincos32.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/slowexp-avx.c b/sysdeps/x86_64/fpu/multiarch/slowexp-avx.c
new file mode 100644
index 0000000000..d01c6d71a4
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/slowexp-avx.c
@@ -0,0 +1,9 @@
+#define __slowexp __slowexp_avx
+#define __add __add_avx
+#define __dbl_mp __dbl_mp_avx
+#define __mpexp __mpexp_avx
+#define __mul __mul_avx
+#define __sub __sub_avx
+#define SECTION __attribute__ ((section (".text.avx")))
+
+#include <sysdeps/ieee754/dbl-64/slowexp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c b/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
new file mode 100644
index 0000000000..3bcde84233
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/slowexp-fma4.c
@@ -0,0 +1,9 @@
+#define __slowexp __slowexp_fma4
+#define __add __add_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __mpexp __mpexp_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/slowexp.c>
diff --git a/sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c b/sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c
new file mode 100644
index 0000000000..69d69823bb
--- /dev/null
+++ b/sysdeps/x86_64/fpu/multiarch/slowpow-fma4.c
@@ -0,0 +1,11 @@
+#define __slowpow __slowpow_fma4
+#define __add __add_fma4
+#define __dbl_mp __dbl_mp_fma4
+#define __mpexp __mpexp_fma4
+#define __mplog __mplog_fma4
+#define __mul __mul_fma4
+#define __sub __sub_fma4
+#define __halfulp __halfulp_fma4
+#define SECTION __attribute__ ((section (".text.fma4")))
+
+#include <sysdeps/ieee754/dbl-64/slowpow.c>
diff --git a/sysdeps/x86_64/fpu/s_scalbln.c b/sysdeps/x86_64/fpu/s_scalbln.c
deleted file mode 100644
index 1009713fbc..0000000000
--- a/sysdeps/x86_64/fpu/s_scalbln.c
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Nothing to do. This function is the same as scalbn. So we define an
- alias. */
diff --git a/sysdeps/x86_64/fpu/s_scalbn.c b/sysdeps/x86_64/fpu/s_scalbn.c
deleted file mode 100644
index 74d34655ad..0000000000
--- a/sysdeps/x86_64/fpu/s_scalbn.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#define scalbln __renamed_scalbln
-#define __scalbln __renamed___scalbln
-
-#include <sysdeps/ieee754/dbl-64/wordsize-64/s_scalbn.c>
-
-#undef scalbln
-#undef __scalbln
-strong_alias (__scalbn, __scalbln)
-weak_alias (__scalbn, scalbln)
diff --git a/sysdeps/x86_64/memrchr.S b/sysdeps/x86_64/memrchr.S
index 81b7a1c320..70adca379c 100644
--- a/sysdeps/x86_64/memrchr.S
+++ b/sysdeps/x86_64/memrchr.S
@@ -282,6 +282,9 @@ L(return_null):
.p2align 4
L(length_less16_offset0):
+ test %edx, %edx
+ jz L(return_null)
+
mov %dl, %cl
pcmpeqb (%rdi), %xmm1
diff --git a/sysdeps/x86_64/multiarch/Makefile b/sysdeps/x86_64/multiarch/Makefile
index a5254dc93c..9a183f068e 100644
--- a/sysdeps/x86_64/multiarch/Makefile
+++ b/sysdeps/x86_64/multiarch/Makefile
@@ -9,13 +9,14 @@ sysdep_routines += strncat-c stpncpy-c strncpy-c strcmp-ssse3 strncmp-ssse3 \
strend-sse4 memcmp-sse4 memcpy-ssse3 mempcpy-ssse3 \
memmove-ssse3 memcpy-ssse3-back mempcpy-ssse3-back \
memmove-ssse3-back strcasestr-nonascii strcasecmp_l-ssse3 \
- strncase_l-ssse3 strlen-sse4 strlen-no-bsf memset-x86-64 \
+ strncase_l-ssse3 strlen-sse4 strlen-sse2-no-bsf memset-x86-64 \
strcpy-ssse3 strncpy-ssse3 stpcpy-ssse3 stpncpy-ssse3 \
strcpy-sse2-unaligned strncpy-sse2-unaligned \
stpcpy-sse2-unaligned stpncpy-sse2-unaligned \
strcat-sse2-unaligned strncat-sse2-unaligned \
strcat-ssse3 strncat-ssse3 strlen-sse2-pminub \
- strrchr-sse2-no-bsf strchr-sse2-no-bsf
+ strnlen-sse2-no-bsf strrchr-sse2-no-bsf strchr-sse2-no-bsf \
+ memcmp-ssse3
ifeq (yes,$(config-cflags-sse4))
sysdep_routines += strcspn-c strpbrk-c strspn-c strstr-c strcasestr-c varshift
CFLAGS-varshift.c += -msse4
@@ -27,3 +28,7 @@ CFLAGS-strcasestr.c += -msse4
CFLAGS-strcasestr-nonascii.c += -msse4
endif
endif
+
+ifeq ($(subdir),wcsmbs)
+sysdep_routines += wmemcmp-sse4 wmemcmp-ssse3 wmemcmp-c wcscpy-ssse3 wcscpy-c
+endif
diff --git a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c
index 0a145ca259..65b0ee93e5 100644
--- a/sysdeps/x86_64/multiarch/init-arch.c
+++ b/sysdeps/x86_64/multiarch/init-arch.c
@@ -86,7 +86,7 @@ __init_cpu_features (void)
default:
/* Unknown family 0x06 processors. Assuming this is one
- of Core i3/i5/i7 processors if AVX is available. */
+ of Core i3/i5/i7 processors if AVX is available. */
if ((ecx & bit_AVX) == 0)
break;
@@ -124,13 +124,22 @@ __init_cpu_features (void)
get_common_indeces (&family, &model);
- unsigned int ecx = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx;
+ ecx = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx;
/* AMD processors prefer SSE instructions for memory/string routines
if they are available, otherwise they prefer integer instructions. */
if ((ecx & 0x200))
__cpu_features.feature[index_Prefer_SSE_for_memop]
|= bit_Prefer_SSE_for_memop;
+
+ unsigned int eax;
+ __cpuid (0x80000000, eax, ebx, ecx, edx);
+ if (eax >= 0x80000001)
+ __cpuid (0x80000001,
+ __cpu_features.cpuid[COMMON_CPUID_INDEX_80000001].eax,
+ __cpu_features.cpuid[COMMON_CPUID_INDEX_80000001].ebx,
+ __cpu_features.cpuid[COMMON_CPUID_INDEX_80000001].ecx,
+ __cpu_features.cpuid[COMMON_CPUID_INDEX_80000001].edx);
}
else
kind = arch_kind_other;
diff --git a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h
index 6cfdbddc4e..2a1df393c4 100644
--- a/sysdeps/x86_64/multiarch/init-arch.h
+++ b/sysdeps/x86_64/multiarch/init-arch.h
@@ -1,5 +1,5 @@
/* This file is part of the GNU C Library.
- Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
@@ -23,19 +23,24 @@
#define bit_Fast_Unaligned_Load (1 << 4)
#define bit_Prefer_PMINUB_for_stringop (1 << 5)
+#define bit_SSE2 (1 << 26)
+#define bit_SSSE3 (1 << 9)
+#define bit_SSE4_1 (1 << 19)
+#define bit_SSE4_2 (1 << 20)
+#define bit_AVX (1 << 28)
+#define bit_POPCOUNT (1 << 23)
+#define bit_FMA (1 << 12)
+#define bit_FMA4 (1 << 16)
+
#ifdef __ASSEMBLER__
# include <ifunc-defines.h>
-# define bit_SSE2 (1 << 26)
-# define bit_SSSE3 (1 << 9)
-# define bit_SSE4_1 (1 << 19)
-# define bit_SSE4_2 (1 << 20)
-
# define index_SSE2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_EDX_OFFSET
# define index_SSSE3 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
# define index_SSE4_1 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
# define index_SSE4_2 COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
+# define index_AVX COMMON_CPUID_INDEX_1*CPUID_SIZE+CPUID_ECX_OFFSET
# define index_Fast_Rep_String FEATURE_INDEX_1*FEATURE_SIZE
# define index_Fast_Copy_Backward FEATURE_INDEX_1*FEATURE_SIZE
@@ -51,6 +56,7 @@
enum
{
COMMON_CPUID_INDEX_1 = 0,
+ COMMON_CPUID_INDEX_80000001, /* for AMD */
/* Keep the following line at the end. */
COMMON_CPUID_INDEX_MAX
};
@@ -101,16 +107,18 @@ extern const struct cpu_features *__get_cpu_features (void)
# endif
# define HAS_CPU_FEATURE(idx, reg, bit) \
- ((__get_cpu_features ()->cpuid[idx].reg & (1 << (bit))) != 0)
+ ((__get_cpu_features ()->cpuid[idx].reg & (bit)) != 0)
/* Following are the feature tests used throughout libc. */
-# define HAS_SSE2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, edx, 26)
-# define HAS_POPCOUNT HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 23)
-# define HAS_SSSE3 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 9)
-# define HAS_SSE4_1 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 19)
-# define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 20)
-# define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, 12)
+# define HAS_SSE2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, edx, bit_SSE2)
+# define HAS_POPCOUNT HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_POPCOUNT)
+# define HAS_SSSE3 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSSE3)
+# define HAS_SSE4_1 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_1)
+# define HAS_SSE4_2 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_SSE4_2)
+# define HAS_FMA HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_FMA)
+# define HAS_AVX HAS_CPU_FEATURE (COMMON_CPUID_INDEX_1, ecx, bit_AVX)
+# define HAS_FMA4 HAS_CPU_FEATURE (COMMON_CPUID_INDEX_80000001, ecx, bit_FMA4)
# define index_Fast_Rep_String FEATURE_INDEX_1
# define index_Fast_Copy_Backward FEATURE_INDEX_1
diff --git a/sysdeps/x86_64/multiarch/memcmp-sse4.S b/sysdeps/x86_64/multiarch/memcmp-sse4.S
index fc439bb013..28dd505d99 100644
--- a/sysdeps/x86_64/multiarch/memcmp-sse4.S
+++ b/sysdeps/x86_64/multiarch/memcmp-sse4.S
@@ -1,5 +1,5 @@
-/* memcmp with SSE4.1
- Copyright (C) 2010 Free Software Foundation, Inc.
+/* memcmp with SSE4.1, wmemcmp with SSE4.1
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -20,43 +20,54 @@
#ifndef NOT_IN_libc
-#include <sysdep.h>
-#include "asm-syntax.h"
+# include <sysdep.h>
-#ifndef MEMCMP
-# define MEMCMP __memcmp_sse4_1
-#endif
+# ifndef MEMCMP
+# define MEMCMP __memcmp_sse4_1
+# endif
-#ifndef ALIGN
-# define ALIGN(n) .p2align n
-#endif
+# ifndef ALIGN
+# define ALIGN(n) .p2align n
+# endif
-#define JMPTBL(I, B) (I - B)
+# define JMPTBL(I, B) (I - B)
-#define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
+# define BRANCH_TO_JMPTBL_ENTRY(TABLE, INDEX, SCALE) \
lea TABLE(%rip), %r11; \
movslq (%r11, INDEX, SCALE), %rcx; \
add %r11, %rcx; \
jmp *%rcx; \
ud2
+/* Warning!
+ wmemcmp has to use SIGNED comparison for elements.
+ memcmp has to use UNSIGNED comparison for elemnts.
+*/
+
.section .text.sse4.1,"ax",@progbits
ENTRY (MEMCMP)
+# ifdef USE_AS_WMEMCMP
+ shl $2, %rdx
+# endif
pxor %xmm0, %xmm0
cmp $79, %rdx
ja L(79bytesormore)
+# ifndef USE_AS_WMEMCMP
cmp $1, %rdx
je L(firstbyte)
+# endif
add %rdx, %rsi
add %rdx, %rdi
BRANCH_TO_JMPTBL_ENTRY(L(table_64bytes), %rdx, 4)
+# ifndef USE_AS_WMEMCMP
ALIGN (4)
L(firstbyte):
movzbl (%rdi), %eax
movzbl (%rsi), %ecx
sub %ecx, %eax
ret
+# endif
ALIGN (4)
L(79bytesormore):
@@ -308,11 +319,11 @@ L(less32bytesin256):
ALIGN (4)
L(512bytesormore):
-#ifdef DATA_CACHE_SIZE_HALF
+# ifdef DATA_CACHE_SIZE_HALF
mov $DATA_CACHE_SIZE_HALF, %r8
-#else
+# else
mov __x86_64_data_cache_size_half(%rip), %r8
-#endif
+# endif
mov %r8, %r9
shr $1, %r8
add %r9, %r8
@@ -624,11 +635,11 @@ L(less32bytesin256in2alinged):
ALIGN (4)
L(512bytesormorein2aligned):
-#ifdef DATA_CACHE_SIZE_HALF
+# ifdef DATA_CACHE_SIZE_HALF
mov $DATA_CACHE_SIZE_HALF, %r8
-#else
+# else
mov __x86_64_data_cache_size_half(%rip), %r8
-#endif
+# endif
mov %r8, %r9
shr $1, %r8
add %r9, %r8
@@ -667,6 +678,7 @@ L(64bytesormore_loopin2aligned):
BRANCH_TO_JMPTBL_ENTRY(L(table_64bytes), %rdx, 4)
L(L2_L3_cache_aglined):
sub $64, %rdx
+
ALIGN (4)
L(L2_L3_aligned_128bytes_loop):
prefetchnta 0x1c0(%rdi)
@@ -803,13 +815,19 @@ L(12bytes):
jne L(diffin8bytes)
L(4bytes):
mov -4(%rsi), %ecx
+# ifndef USE_AS_WMEMCMP
mov -4(%rdi), %eax
cmp %eax, %ecx
+# else
+ cmp -4(%rdi), %ecx
+# endif
jne L(diffin4bytes)
L(0bytes):
xor %eax, %eax
ret
+# ifndef USE_AS_WMEMCMP
+/* unreal case for wmemcmp */
ALIGN (4)
L(65bytes):
movdqu -65(%rdi), %xmm1
@@ -1017,6 +1035,7 @@ L(1bytes):
movzbl -1(%rsi), %ecx
sub %ecx, %eax
ret
+# endif
ALIGN (4)
L(68bytes):
@@ -1047,13 +1066,20 @@ L(20bytes):
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
- mov -4(%rdi), %eax
mov -4(%rsi), %ecx
+
+# ifndef USE_AS_WMEMCMP
+ mov -4(%rdi), %eax
cmp %eax, %ecx
+# else
+ cmp -4(%rdi), %ecx
+# endif
jne L(diffin4bytes)
xor %eax, %eax
ret
+# ifndef USE_AS_WMEMCMP
+/* unreal cases for wmemcmp */
ALIGN (4)
L(69bytes):
movdqu -69(%rsi), %xmm1
@@ -1161,6 +1187,7 @@ L(23bytes):
jne L(diffin8bytes)
xor %eax, %eax
ret
+# endif
ALIGN (4)
L(72bytes):
@@ -1191,13 +1218,16 @@ L(24bytes):
pxor %xmm1, %xmm2
ptest %xmm2, %xmm0
jnc L(less16bytes)
- mov -8(%rdi), %rax
+
mov -8(%rsi), %rcx
+ mov -8(%rdi), %rax
cmp %rax, %rcx
jne L(diffin8bytes)
xor %eax, %eax
ret
+# ifndef USE_AS_WMEMCMP
+/* unreal cases for wmemcmp */
ALIGN (4)
L(73bytes):
movdqu -73(%rsi), %xmm1
@@ -1312,7 +1342,7 @@ L(27bytes):
jne L(diffin4bytes)
xor %eax, %eax
ret
-
+# endif
ALIGN (4)
L(76bytes):
movdqu -76(%rsi), %xmm1
@@ -1346,13 +1376,19 @@ L(28bytes):
mov -12(%rsi), %rcx
cmp %rax, %rcx
jne L(diffin8bytes)
- mov -4(%rdi), %eax
mov -4(%rsi), %ecx
+# ifndef USE_AS_WMEMCMP
+ mov -4(%rdi), %eax
cmp %eax, %ecx
+# else
+ cmp -4(%rdi), %ecx
+# endif
jne L(diffin4bytes)
xor %eax, %eax
ret
+# ifndef USE_AS_WMEMCMP
+/* unreal cases for wmemcmp */
ALIGN (4)
L(77bytes):
movdqu -77(%rsi), %xmm1
@@ -1474,7 +1510,7 @@ L(31bytes):
jne L(diffin8bytes)
xor %eax, %eax
ret
-
+# endif
ALIGN (4)
L(64bytes):
movdqu -64(%rdi), %xmm2
@@ -1527,7 +1563,17 @@ L(diffin8bytes):
jne L(diffin4bytes)
shr $32, %rcx
shr $32, %rax
+
+# ifdef USE_AS_WMEMCMP
+/* for wmemcmp */
+ cmp %eax, %ecx
+ jne L(diffin4bytes)
+ xor %eax, %eax
+ ret
+# endif
+
L(diffin4bytes):
+# ifndef USE_AS_WMEMCMP
cmp %cx, %ax
jne L(diffin2bytes)
shr $16, %ecx
@@ -1546,11 +1592,28 @@ L(end):
and $0xff, %ecx
sub %ecx, %eax
ret
+# else
+
+/* for wmemcmp */
+ mov $1, %eax
+ jl L(nequal_bigger)
+ neg %eax
+ ret
+
+ ALIGN (4)
+L(nequal_bigger):
+ ret
+
+L(unreal_case):
+ xor %eax, %eax
+ ret
+# endif
END (MEMCMP)
.section .rodata.sse4.1,"a",@progbits
ALIGN (3)
+# ifndef USE_AS_WMEMCMP
L(table_64bytes):
.int JMPTBL (L(0bytes), L(table_64bytes))
.int JMPTBL (L(1bytes), L(table_64bytes))
@@ -1632,4 +1695,87 @@ L(table_64bytes):
.int JMPTBL (L(77bytes), L(table_64bytes))
.int JMPTBL (L(78bytes), L(table_64bytes))
.int JMPTBL (L(79bytes), L(table_64bytes))
+# else
+L(table_64bytes):
+ .int JMPTBL (L(0bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(4bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(8bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(12bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(16bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(20bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(24bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(28bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(32bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(36bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(40bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(44bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(48bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(52bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(56bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(60bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(64bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(68bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(72bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(76bytes), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+ .int JMPTBL (L(unreal_case), L(table_64bytes))
+# endif
#endif
diff --git a/sysdeps/x86_64/multiarch/memcmp-ssse3.S b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
new file mode 100644
index 0000000000..e35a23ee7f
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/memcmp-ssse3.S
@@ -0,0 +1,1997 @@
+/* memcmp with SSSE3, wmemcmp with SSSE3
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+
+# include <sysdep.h>
+
+# ifndef MEMCMP
+# define MEMCMP __memcmp_ssse3
+# endif
+
+# ifndef ALIGN
+# define ALIGN(n) .p2align n
+# endif
+
+/* Warning!
+ wmemcmp has to use SIGNED comparison for elements.
+ memcmp has to use UNSIGNED comparison for elemnts.
+*/
+
+ atom_text_section
+ENTRY (MEMCMP)
+# ifdef USE_AS_WMEMCMP
+ shl $2, %rdx
+ test %rdx, %rdx
+ jz L(equal)
+# endif
+ mov %rdx, %rcx
+ mov %rdi, %rdx
+ cmp $48, %rcx;
+ jae L(48bytesormore) /* LEN => 48 */
+
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+/* ECX >= 32. */
+L(48bytesormore):
+ movdqu (%rdi), %xmm3
+ movdqu (%rsi), %xmm0
+ pcmpeqb %xmm0, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 16(%rdi), %rdi
+ lea 16(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(less16bytes)
+ mov %edi, %edx
+ and $0xf, %edx
+ xor %rdx, %rdi
+ sub %rdx, %rsi
+ add %rdx, %rcx
+ mov %esi, %edx
+ and $0xf, %edx
+ jz L(shr_0)
+ xor %rdx, %rsi
+
+# ifndef USE_AS_WMEMCMP
+ cmp $8, %edx
+ jae L(next_unaligned_table)
+ cmp $0, %edx
+ je L(shr_0)
+ cmp $1, %edx
+ je L(shr_1)
+ cmp $2, %edx
+ je L(shr_2)
+ cmp $3, %edx
+ je L(shr_3)
+ cmp $4, %edx
+ je L(shr_4)
+ cmp $5, %edx
+ je L(shr_5)
+ cmp $6, %edx
+ je L(shr_6)
+ jmp L(shr_7)
+
+ ALIGN (2)
+L(next_unaligned_table):
+ cmp $8, %edx
+ je L(shr_8)
+ cmp $9, %edx
+ je L(shr_9)
+ cmp $10, %edx
+ je L(shr_10)
+ cmp $11, %edx
+ je L(shr_11)
+ cmp $12, %edx
+ je L(shr_12)
+ cmp $13, %edx
+ je L(shr_13)
+ cmp $14, %edx
+ je L(shr_14)
+ jmp L(shr_15)
+# else
+ cmp $0, %edx
+ je L(shr_0)
+ cmp $4, %edx
+ je L(shr_4)
+ cmp $8, %edx
+ je L(shr_8)
+ jmp L(shr_12)
+# endif
+
+ ALIGN (4)
+L(shr_0):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ jae L(shr_0_gobble)
+ xor %eax, %eax
+ movdqa (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+ movdqa 16(%rsi), %xmm2
+ pcmpeqb 16(%rdi), %xmm2
+ pand %xmm1, %xmm2
+ pmovmskb %xmm2, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_0_gobble):
+ movdqa (%rsi), %xmm0
+ xor %eax, %eax
+ pcmpeqb (%rdi), %xmm0
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm2
+ pcmpeqb 16(%rdi), %xmm2
+L(shr_0_gobble_loop):
+ pand %xmm0, %xmm2
+ sub $32, %rcx
+ pmovmskb %xmm2, %edx
+ movdqa %xmm0, %xmm1
+ movdqa 32(%rsi), %xmm0
+ movdqa 48(%rsi), %xmm2
+ sbb $0xffff, %edx
+ pcmpeqb 32(%rdi), %xmm0
+ pcmpeqb 48(%rdi), %xmm2
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ jz L(shr_0_gobble_loop)
+
+ pand %xmm0, %xmm2
+ cmp $0, %rcx
+ jge L(next)
+ inc %edx
+ add $32, %rcx
+L(next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm2, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+# ifndef USE_AS_WMEMCMP
+
+ ALIGN (4)
+L(shr_1):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_1_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $1, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $1, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $1, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_1_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $1, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $1, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_1_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $1, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $1, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_1_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_1_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_1_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 1(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+
+ ALIGN (4)
+L(shr_2):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_2_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $2, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $2, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $2, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_2_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $2, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $2, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_2_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $2, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $2, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_2_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_2_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_2_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 2(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_3):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_3_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $3, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $3, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $3, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_3_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $3, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $3, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_3_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $3, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $3, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_3_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_3_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_3_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 3(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+# endif
+
+ ALIGN (4)
+L(shr_4):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_4_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $4, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $4, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $4, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_4_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $4, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $4, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_4_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $4, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $4, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_4_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_4_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_4_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 4(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+# ifndef USE_AS_WMEMCMP
+
+ ALIGN (4)
+L(shr_5):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_5_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $5, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $5, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $5, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_5_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $5, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $5, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_5_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $5, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $5, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_5_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_5_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_5_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 5(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_6):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_6_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $6, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $6, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $6, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_6_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $6, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $6, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_6_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $6, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $6, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_6_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_6_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_6_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 6(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_7):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_7_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $7, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $7, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $7, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_7_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $7, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $7, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_7_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $7, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $7, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_7_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_7_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_7_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 7(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+# endif
+
+ ALIGN (4)
+L(shr_8):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_8_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $8, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $8, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $8, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_8_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $8, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $8, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_8_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $8, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $8, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_8_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_8_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_8_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 8(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+# ifndef USE_AS_WMEMCMP
+
+ ALIGN (4)
+L(shr_9):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_9_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $9, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $9, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $9, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_9_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $9, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $9, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_9_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $9, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $9, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_9_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_9_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_9_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 9(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_10):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_10_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $10, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $10, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $10, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_10_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $10, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $10, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_10_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $10, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $10, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_10_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_10_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_10_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 10(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_11):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_11_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $11, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $11, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $11, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_11_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $11, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $11, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_11_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $11, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $11, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_11_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_11_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_11_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 11(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+# endif
+
+ ALIGN (4)
+L(shr_12):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_12_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $12, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $12, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $12, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_12_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $12, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $12, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_12_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $12, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $12, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_12_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_12_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_12_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 12(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+# ifndef USE_AS_WMEMCMP
+
+ ALIGN (4)
+L(shr_13):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_13_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $13, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $13, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $13, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_13_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $13, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $13, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_13_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $13, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $13, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_13_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_13_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_13_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 13(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_14):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_14_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $14, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $14, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $14, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_14_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $14, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $14, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_14_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $14, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $14, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_14_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_14_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_14_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 14(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_15):
+ cmp $80, %rcx
+ lea -48(%rcx), %rcx
+ mov %edx, %eax
+ jae L(shr_15_gobble)
+
+ movdqa 16(%rsi), %xmm1
+ movdqa %xmm1, %xmm2
+ palignr $15, (%rsi), %xmm1
+ pcmpeqb (%rdi), %xmm1
+
+ movdqa 32(%rsi), %xmm3
+ palignr $15, %xmm2, %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+ pand %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+ add $15, %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+
+ ALIGN (4)
+L(shr_15_gobble):
+ sub $32, %rcx
+ movdqa 16(%rsi), %xmm0
+ palignr $15, (%rsi), %xmm0
+ pcmpeqb (%rdi), %xmm0
+
+ movdqa 32(%rsi), %xmm3
+ palignr $15, 16(%rsi), %xmm3
+ pcmpeqb 16(%rdi), %xmm3
+
+L(shr_15_gobble_loop):
+ pand %xmm0, %xmm3
+ sub $32, %rcx
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+
+ movdqa 64(%rsi), %xmm3
+ palignr $15, 48(%rsi), %xmm3
+ sbb $0xffff, %edx
+ movdqa 48(%rsi), %xmm0
+ palignr $15, 32(%rsi), %xmm0
+ pcmpeqb 32(%rdi), %xmm0
+ lea 32(%rsi), %rsi
+ pcmpeqb 48(%rdi), %xmm3
+
+ lea 32(%rdi), %rdi
+ jz L(shr_15_gobble_loop)
+ pand %xmm0, %xmm3
+
+ cmp $0, %rcx
+ jge L(shr_15_gobble_next)
+ inc %edx
+ add $32, %rcx
+L(shr_15_gobble_next):
+ test %edx, %edx
+ jnz L(exit)
+
+ pmovmskb %xmm3, %edx
+ movdqa %xmm0, %xmm1
+ lea 32(%rdi), %rdi
+ lea 32(%rsi), %rsi
+ sub $0xffff, %edx
+ jnz L(exit)
+
+ lea 15(%rsi), %rsi
+ add %rcx, %rsi
+ add %rcx, %rdi
+ jmp L(less48bytes)
+# endif
+ ALIGN (4)
+L(exit):
+ pmovmskb %xmm1, %r8d
+ sub $0xffff, %r8d
+ jz L(first16bytes)
+ lea -16(%rsi), %rsi
+ lea -16(%rdi), %rdi
+ mov %r8d, %edx
+L(first16bytes):
+ add %rax, %rsi
+L(less16bytes):
+# ifndef USE_AS_WMEMCMP
+ test %dl, %dl
+ jz L(next_24_bytes)
+
+ test $0x01, %dl
+ jnz L(Byte16)
+
+ test $0x02, %dl
+ jnz L(Byte17)
+
+ test $0x04, %dl
+ jnz L(Byte18)
+
+ test $0x08, %dl
+ jnz L(Byte19)
+
+ test $0x10, %dl
+ jnz L(Byte20)
+
+ test $0x20, %dl
+ jnz L(Byte21)
+
+ test $0x40, %dl
+ jnz L(Byte22)
+
+ movzbl -9(%rdi), %eax
+ movzbl -9(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(Byte16):
+ movzbl -16(%rdi), %eax
+ movzbl -16(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(Byte17):
+ movzbl -15(%rdi), %eax
+ movzbl -15(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(Byte18):
+ movzbl -14(%rdi), %eax
+ movzbl -14(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(Byte19):
+ movzbl -13(%rdi), %eax
+ movzbl -13(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(Byte20):
+ movzbl -12(%rdi), %eax
+ movzbl -12(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(Byte21):
+ movzbl -11(%rdi), %eax
+ movzbl -11(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(Byte22):
+ movzbl -10(%rdi), %eax
+ movzbl -10(%rsi), %edx
+ sub %edx, %eax
+ ret
+
+ ALIGN (4)
+L(next_24_bytes):
+ lea 8(%rdi), %rdi
+ lea 8(%rsi), %rsi
+ test $0x01, %dh
+ jnz L(Byte16)
+
+ test $0x02, %dh
+ jnz L(Byte17)
+
+ test $0x04, %dh
+ jnz L(Byte18)
+
+ test $0x08, %dh
+ jnz L(Byte19)
+
+ test $0x10, %dh
+ jnz L(Byte20)
+
+ test $0x20, %dh
+ jnz L(Byte21)
+
+ test $0x40, %dh
+ jnz L(Byte22)
+
+ mov -9(%rdi), %eax
+ and $0xff, %eax
+ mov -9(%rsi), %edx
+ and $0xff, %edx
+ sub %edx, %eax
+ ret
+# else
+/* special for wmemcmp */
+ xor %eax, %eax
+ test %dl, %dl
+ jz L(next_two_double_words)
+ and $15, %dl
+ jz L(second_double_word)
+ mov -16(%rdi), %eax
+ cmp -16(%rsi), %eax
+ jne L(find_diff)
+ ret
+
+ ALIGN (4)
+L(second_double_word):
+ mov -12(%rdi), %eax
+ cmp -12(%rsi), %eax
+ jne L(find_diff)
+ ret
+
+ ALIGN (4)
+L(next_two_double_words):
+ and $15, %dh
+ jz L(fourth_double_word)
+ mov -8(%rdi), %eax
+ cmp -8(%rsi), %eax
+ jne L(find_diff)
+ ret
+
+ ALIGN (4)
+L(fourth_double_word):
+ mov -4(%rdi), %eax
+ cmp -4(%rsi), %eax
+ jne L(find_diff)
+ ret
+# endif
+
+ ALIGN (4)
+L(less48bytes):
+ cmp $8, %ecx
+ jae L(more8bytes)
+ cmp $0, %ecx
+ je L(0bytes)
+# ifndef USE_AS_WMEMCMP
+ cmp $1, %ecx
+ je L(1bytes)
+ cmp $2, %ecx
+ je L(2bytes)
+ cmp $3, %ecx
+ je L(3bytes)
+ cmp $4, %ecx
+ je L(4bytes)
+ cmp $5, %ecx
+ je L(5bytes)
+ cmp $6, %ecx
+ je L(6bytes)
+ jmp L(7bytes)
+# else
+ jmp L(4bytes)
+# endif
+
+ ALIGN (4)
+L(more8bytes):
+ cmp $16, %ecx
+ jae L(more16bytes)
+ cmp $8, %ecx
+ je L(8bytes)
+# ifndef USE_AS_WMEMCMP
+ cmp $9, %ecx
+ je L(9bytes)
+ cmp $10, %ecx
+ je L(10bytes)
+ cmp $11, %ecx
+ je L(11bytes)
+ cmp $12, %ecx
+ je L(12bytes)
+ cmp $13, %ecx
+ je L(13bytes)
+ cmp $14, %ecx
+ je L(14bytes)
+ jmp L(15bytes)
+# else
+ jmp L(12bytes)
+# endif
+
+ ALIGN (4)
+L(more16bytes):
+ cmp $24, %ecx
+ jae L(more24bytes)
+ cmp $16, %ecx
+ je L(16bytes)
+# ifndef USE_AS_WMEMCMP
+ cmp $17, %ecx
+ je L(17bytes)
+ cmp $18, %ecx
+ je L(18bytes)
+ cmp $19, %ecx
+ je L(19bytes)
+ cmp $20, %ecx
+ je L(20bytes)
+ cmp $21, %ecx
+ je L(21bytes)
+ cmp $22, %ecx
+ je L(22bytes)
+ jmp L(23bytes)
+# else
+ jmp L(20bytes)
+# endif
+
+ ALIGN (4)
+L(more24bytes):
+ cmp $32, %ecx
+ jae L(more32bytes)
+ cmp $24, %ecx
+ je L(24bytes)
+# ifndef USE_AS_WMEMCMP
+ cmp $25, %ecx
+ je L(25bytes)
+ cmp $26, %ecx
+ je L(26bytes)
+ cmp $27, %ecx
+ je L(27bytes)
+ cmp $28, %ecx
+ je L(28bytes)
+ cmp $29, %ecx
+ je L(29bytes)
+ cmp $30, %ecx
+ je L(30bytes)
+ jmp L(31bytes)
+# else
+ jmp L(28bytes)
+# endif
+
+ ALIGN (4)
+L(more32bytes):
+ cmp $40, %ecx
+ jae L(more40bytes)
+ cmp $32, %ecx
+ je L(32bytes)
+# ifndef USE_AS_WMEMCMP
+ cmp $33, %ecx
+ je L(33bytes)
+ cmp $34, %ecx
+ je L(34bytes)
+ cmp $35, %ecx
+ je L(35bytes)
+ cmp $36, %ecx
+ je L(36bytes)
+ cmp $37, %ecx
+ je L(37bytes)
+ cmp $38, %ecx
+ je L(38bytes)
+ jmp L(39bytes)
+# else
+ jmp L(36bytes)
+# endif
+
+ ALIGN (4)
+L(more40bytes):
+ cmp $40, %ecx
+ je L(40bytes)
+# ifndef USE_AS_WMEMCMP
+ cmp $41, %ecx
+ je L(41bytes)
+ cmp $42, %ecx
+ je L(42bytes)
+ cmp $43, %ecx
+ je L(43bytes)
+ cmp $44, %ecx
+ je L(44bytes)
+ cmp $45, %ecx
+ je L(45bytes)
+ cmp $46, %ecx
+ je L(46bytes)
+ jmp L(47bytes)
+
+ ALIGN (4)
+L(44bytes):
+ movl -44(%rdi), %eax
+ movl -44(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(40bytes):
+ movl -40(%rdi), %eax
+ movl -40(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(36bytes):
+ movl -36(%rdi), %eax
+ movl -36(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(32bytes):
+ movl -32(%rdi), %eax
+ movl -32(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(28bytes):
+ movl -28(%rdi), %eax
+ movl -28(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(24bytes):
+ movl -24(%rdi), %eax
+ movl -24(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(20bytes):
+ movl -20(%rdi), %eax
+ movl -20(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(16bytes):
+ movl -16(%rdi), %eax
+ movl -16(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(12bytes):
+ movl -12(%rdi), %eax
+ movl -12(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(8bytes):
+ movl -8(%rdi), %eax
+ movl -8(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(4bytes):
+ movl -4(%rdi), %eax
+ movl -4(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(0bytes):
+ xor %eax, %eax
+ ret
+# else
+ ALIGN (4)
+L(44bytes):
+ movl -44(%rdi), %eax
+ cmp -44(%rsi), %eax
+ jne L(find_diff)
+L(40bytes):
+ movl -40(%rdi), %eax
+ cmp -40(%rsi), %eax
+ jne L(find_diff)
+L(36bytes):
+ movl -36(%rdi), %eax
+ cmp -36(%rsi), %eax
+ jne L(find_diff)
+L(32bytes):
+ movl -32(%rdi), %eax
+ cmp -32(%rsi), %eax
+ jne L(find_diff)
+L(28bytes):
+ movl -28(%rdi), %eax
+ cmp -28(%rsi), %eax
+ jne L(find_diff)
+L(24bytes):
+ movl -24(%rdi), %eax
+ cmp -24(%rsi), %eax
+ jne L(find_diff)
+L(20bytes):
+ movl -20(%rdi), %eax
+ cmp -20(%rsi), %eax
+ jne L(find_diff)
+L(16bytes):
+ movl -16(%rdi), %eax
+ cmp -16(%rsi), %eax
+ jne L(find_diff)
+L(12bytes):
+ movl -12(%rdi), %eax
+ cmp -12(%rsi), %eax
+ jne L(find_diff)
+L(8bytes):
+ movl -8(%rdi), %eax
+ cmp -8(%rsi), %eax
+ jne L(find_diff)
+L(4bytes):
+ movl -4(%rdi), %eax
+ cmp -4(%rsi), %eax
+ jne L(find_diff)
+L(0bytes):
+ xor %eax, %eax
+ ret
+# endif
+
+# ifndef USE_AS_WMEMCMP
+ ALIGN (4)
+L(45bytes):
+ movl -45(%rdi), %eax
+ movl -45(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(41bytes):
+ movl -41(%rdi), %eax
+ movl -41(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(37bytes):
+ movl -37(%rdi), %eax
+ movl -37(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(33bytes):
+ movl -33(%rdi), %eax
+ movl -33(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(29bytes):
+ movl -29(%rdi), %eax
+ movl -29(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(25bytes):
+ movl -25(%rdi), %eax
+ movl -25(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(21bytes):
+ movl -21(%rdi), %eax
+ movl -21(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(17bytes):
+ movl -17(%rdi), %eax
+ movl -17(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(13bytes):
+ movl -13(%rdi), %eax
+ movl -13(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(9bytes):
+ movl -9(%rdi), %eax
+ movl -9(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(5bytes):
+ movl -5(%rdi), %eax
+ movl -5(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(1bytes):
+ movzbl -1(%rdi), %eax
+ cmpb -1(%rsi), %al
+ jne L(set)
+ xor %eax, %eax
+ ret
+
+ ALIGN (4)
+L(46bytes):
+ movl -46(%rdi), %eax
+ movl -46(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(42bytes):
+ movl -42(%rdi), %eax
+ movl -42(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(38bytes):
+ movl -38(%rdi), %eax
+ movl -38(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(34bytes):
+ movl -34(%rdi), %eax
+ movl -34(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(30bytes):
+ movl -30(%rdi), %eax
+ movl -30(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(26bytes):
+ movl -26(%rdi), %eax
+ movl -26(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(22bytes):
+ movl -22(%rdi), %eax
+ movl -22(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(18bytes):
+ movl -18(%rdi), %eax
+ movl -18(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(14bytes):
+ movl -14(%rdi), %eax
+ movl -14(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(10bytes):
+ movl -10(%rdi), %eax
+ movl -10(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(6bytes):
+ movl -6(%rdi), %eax
+ movl -6(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(2bytes):
+ movzwl -2(%rdi), %eax
+ movzwl -2(%rsi), %ecx
+ cmpb %cl, %al
+ jne L(set)
+ cmp %ecx, %eax
+ jne L(set)
+ xor %eax, %eax
+ ret
+
+ ALIGN (4)
+L(47bytes):
+ movl -47(%rdi), %eax
+ movl -47(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(43bytes):
+ movl -43(%rdi), %eax
+ movl -43(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(39bytes):
+ movl -39(%rdi), %eax
+ movl -39(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(35bytes):
+ movl -35(%rdi), %eax
+ movl -35(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(31bytes):
+ movl -31(%rdi), %eax
+ movl -31(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(27bytes):
+ movl -27(%rdi), %eax
+ movl -27(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(23bytes):
+ movl -23(%rdi), %eax
+ movl -23(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(19bytes):
+ movl -19(%rdi), %eax
+ movl -19(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(15bytes):
+ movl -15(%rdi), %eax
+ movl -15(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(11bytes):
+ movl -11(%rdi), %eax
+ movl -11(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(7bytes):
+ movl -7(%rdi), %eax
+ movl -7(%rsi), %ecx
+ cmp %ecx, %eax
+ jne L(find_diff)
+L(3bytes):
+ movzwl -3(%rdi), %eax
+ movzwl -3(%rsi), %ecx
+ cmpb %cl, %al
+ jne L(set)
+ cmp %ecx, %eax
+ jne L(set)
+ movzbl -1(%rdi), %eax
+ cmpb -1(%rsi), %al
+ jne L(set)
+ xor %eax, %eax
+ ret
+
+ ALIGN (4)
+L(find_diff):
+ cmpb %cl, %al
+ jne L(set)
+ cmpw %cx, %ax
+ jne L(set)
+ shr $16, %eax
+ shr $16, %ecx
+ cmpb %cl, %al
+ jne L(set)
+
+/* We get there only if we already know there is a
+difference. */
+
+ cmp %ecx, %eax
+L(set):
+ sbb %eax, %eax
+ sbb $-1, %eax
+ ret
+# else
+
+/* for wmemcmp */
+ ALIGN (4)
+L(find_diff):
+ mov $1, %eax
+ jg L(find_diff_bigger)
+ neg %eax
+ ret
+
+ ALIGN (4)
+L(find_diff_bigger):
+ ret
+# endif
+
+ ALIGN (4)
+L(equal):
+ xor %eax, %eax
+ ret
+
+END (MEMCMP)
+#endif
diff --git a/sysdeps/x86_64/multiarch/memcmp.S b/sysdeps/x86_64/multiarch/memcmp.S
index 301ab287f5..8bf8f3a417 100644
--- a/sysdeps/x86_64/multiarch/memcmp.S
+++ b/sysdeps/x86_64/multiarch/memcmp.S
@@ -1,5 +1,5 @@
/* Multiple versions of memcmp
- Copyright (C) 2010 Free Software Foundation, Inc.
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -29,11 +29,20 @@ ENTRY(memcmp)
cmpl $0, KIND_OFFSET+__cpu_features(%rip)
jne 1f
call __init_cpu_features
-1: leaq __memcmp_sse2(%rip), %rax
- testl $bit_SSE4_1, __cpu_features+CPUID_OFFSET+index_SSE4_1(%rip)
- jz 2f
+
+1: testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
+ jnz 2f
+ leaq __memcmp_sse2(%rip), %rax
+ ret
+
+2: testl $bit_SSE4_1, __cpu_features+CPUID_OFFSET+index_SSE4_1(%rip)
+ jz 3f
leaq __memcmp_sse4_1(%rip), %rax
-2: ret
+ ret
+
+3: leaq __memcmp_ssse3(%rip), %rax
+ ret
+
END(memcmp)
# undef ENTRY
diff --git a/sysdeps/x86_64/multiarch/rawmemchr.S b/sysdeps/x86_64/multiarch/rawmemchr.S
index a8933fb55a..1f5bbe6d3f 100644
--- a/sysdeps/x86_64/multiarch/rawmemchr.S
+++ b/sysdeps/x86_64/multiarch/rawmemchr.S
@@ -43,19 +43,18 @@ strong_alias (rawmemchr, __rawmemchr)
.section .text.sse4.2,"ax",@progbits
- .align 16
+ .align 16
.type __rawmemchr_sse42, @function
__rawmemchr_sse42:
cfi_startproc
CALL_MCOUNT
movd %esi, %xmm1
movq %rdi, %rcx
- punpcklbw %xmm1, %xmm1
+ pxor %xmm2, %xmm2
andq $~15, %rdi
- punpcklbw %xmm1, %xmm1
orl $0xffffffff, %esi
+ pshufb %xmm2, %xmm1
movdqa (%rdi), %xmm0
- pshufd $0, %xmm1, %xmm1
subq %rdi, %rcx
pcmpeqb %xmm1, %xmm0
shl %cl, %esi
diff --git a/sysdeps/x86_64/multiarch/strcat-ssse3.S b/sysdeps/x86_64/multiarch/strcat-ssse3.S
index 34b61b8468..2ec3ba7c3e 100644
--- a/sysdeps/x86_64/multiarch/strcat-ssse3.S
+++ b/sysdeps/x86_64/multiarch/strcat-ssse3.S
@@ -35,7 +35,7 @@ ENTRY (STRCAT)
# endif
# define RETURN jmp L(StartStrcpyPart)
-# include "strlen-no-bsf.S"
+# include "strlen-sse2-no-bsf.S"
# undef RETURN
diff --git a/sysdeps/x86_64/multiarch/strcmp-sse42.S b/sysdeps/x86_64/multiarch/strcmp-sse42.S
new file mode 100644
index 0000000000..7a50ff05db
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/strcmp-sse42.S
@@ -0,0 +1,1791 @@
+/* strcmp with SSE4.2
+ Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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. */
+
+
+/* We use 0x1a:
+ _SIDD_SBYTE_OPS
+ | _SIDD_CMP_EQUAL_EACH
+ | _SIDD_NEGATIVE_POLARITY
+ | _SIDD_LEAST_SIGNIFICANT
+ on pcmpistri to find out if two 16byte data elements are the same
+ and the offset of the first different byte. There are 4 cases:
+
+ 1. Both 16byte data elements are valid and identical.
+ 2. Both 16byte data elements have EOS and identical.
+ 3. Both 16byte data elements are valid and they differ at offset X.
+ 4. At least one 16byte data element has EOS at offset X. Two 16byte
+ data elements must differ at or before offset X.
+
+ Here is the table of ECX, CFlag, ZFlag and SFlag for 4 cases:
+
+ case ECX CFlag ZFlag SFlag
+ 1 16 0 0 0
+ 2 16 0 1 1
+ 3 X 1 0 0
+ 4 0 <= X 1 0/1 0/1
+
+ We exit from the loop for cases 2, 3 and 4 with jbe which branches
+ when either CFlag or ZFlag is 1. If CFlag == 0, we return 0 for
+ case 2. */
+
+ /* Put all SSE 4.2 functions together. */
+ .section .text.SECTION,"ax",@progbits
+ .align 16
+ .type STRCMP_SSE42, @function
+#ifdef USE_AS_STRCASECMP_L
+ENTRY (GLABEL(__strcasecmp))
+ movq __libc_tsd_LOCALE@gottpoff(%rip),%rax
+ movq %fs:(%rax),%rdx
+
+ // XXX 5 byte should be before the function
+ /* 5-byte NOP. */
+ .byte 0x0f,0x1f,0x44,0x00,0x00
+END (GLABEL(__strcasecmp))
+ /* FALLTHROUGH to strcasecmp_l. */
+#endif
+#ifdef USE_AS_STRNCASECMP_L
+ENTRY (GLABEL(__strncasecmp))
+ movq __libc_tsd_LOCALE@gottpoff(%rip),%rax
+ movq %fs:(%rax),%rcx
+
+ // XXX 5 byte should be before the function
+ /* 5-byte NOP. */
+ .byte 0x0f,0x1f,0x44,0x00,0x00
+END (GLABEL(__strncasecmp))
+ /* FALLTHROUGH to strncasecmp_l. */
+#endif
+
+
+#ifdef USE_AVX
+# define movdqa vmovdqa
+# define movdqu vmovdqu
+# define pmovmskb vpmovmskb
+# define pcmpistri vpcmpistri
+# define psubb vpsubb
+# define pcmpeqb vpcmpeqb
+# define psrldq vpsrldq
+# define pslldq vpslldq
+# define palignr vpalignr
+# define pxor vpxor
+# define D(arg) arg, arg
+#else
+# define D(arg) arg
+#endif
+
+STRCMP_SSE42:
+ cfi_startproc
+ CALL_MCOUNT
+
+/*
+ * This implementation uses SSE to compare up to 16 bytes at a time.
+ */
+#ifdef USE_AS_STRCASECMP_L
+ /* We have to fall back on the C implementation for locales
+ with encodings not matching ASCII for single bytes. */
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movq LOCALE_T___LOCALES+LC_CTYPE*8(%rdx), %rax
+# else
+ movq (%rdx), %rax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+ jne __strcasecmp_l_nonascii
+#endif
+#ifdef USE_AS_STRNCASECMP_L
+ /* We have to fall back on the C implementation for locales
+ with encodings not matching ASCII for single bytes. */
+# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
+ movq LOCALE_T___LOCALES+LC_CTYPE*8(%rcx), %rax
+# else
+ movq (%rcx), %rax
+# endif
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+ jne __strncasecmp_l_nonascii
+#endif
+
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ test %rdx, %rdx
+ je LABEL(strcmp_exitz)
+ cmp $1, %rdx
+ je LABEL(Byte0)
+ mov %rdx, %r11
+#endif
+ mov %esi, %ecx
+ mov %edi, %eax
+/* Use 64bit AND here to avoid long NOP padding. */
+ and $0x3f, %rcx /* rsi alignment in cache line */
+ and $0x3f, %rax /* rdi alignment in cache line */
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ .section .rodata.cst16,"aM",@progbits,16
+ .align 16
+LABEL(belowupper):
+ .quad 0x4040404040404040
+ .quad 0x4040404040404040
+LABEL(topupper):
+# ifdef USE_AVX
+ .quad 0x5a5a5a5a5a5a5a5a
+ .quad 0x5a5a5a5a5a5a5a5a
+# else
+ .quad 0x5b5b5b5b5b5b5b5b
+ .quad 0x5b5b5b5b5b5b5b5b
+# endif
+LABEL(touppermask):
+ .quad 0x2020202020202020
+ .quad 0x2020202020202020
+ .previous
+ movdqa LABEL(belowupper)(%rip), %xmm4
+# define UCLOW_reg %xmm4
+ movdqa LABEL(topupper)(%rip), %xmm5
+# define UCHIGH_reg %xmm5
+ movdqa LABEL(touppermask)(%rip), %xmm6
+# define LCQWORD_reg %xmm6
+#endif
+ cmp $0x30, %ecx
+ ja LABEL(crosscache)/* rsi: 16-byte load will cross cache line */
+ cmp $0x30, %eax
+ ja LABEL(crosscache)/* rdi: 16-byte load will cross cache line */
+ movdqu (%rdi), %xmm1
+ movdqu (%rsi), %xmm2
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# ifdef USE_AVX
+# define TOLOWER(reg1, reg2) \
+ vpcmpgtb UCLOW_reg, reg1, %xmm7; \
+ vpcmpgtb UCHIGH_reg, reg1, %xmm8; \
+ vpcmpgtb UCLOW_reg, reg2, %xmm9; \
+ vpcmpgtb UCHIGH_reg, reg2, %xmm10; \
+ vpandn %xmm7, %xmm8, %xmm8; \
+ vpandn %xmm9, %xmm10, %xmm10; \
+ vpand LCQWORD_reg, %xmm8, %xmm8; \
+ vpand LCQWORD_reg, %xmm10, %xmm10; \
+ vpor reg1, %xmm8, reg1; \
+ vpor reg2, %xmm10, reg2
+# else
+# define TOLOWER(reg1, reg2) \
+ movdqa reg1, %xmm7; \
+ movdqa UCHIGH_reg, %xmm8; \
+ movdqa reg2, %xmm9; \
+ movdqa UCHIGH_reg, %xmm10; \
+ pcmpgtb UCLOW_reg, %xmm7; \
+ pcmpgtb reg1, %xmm8; \
+ pcmpgtb UCLOW_reg, %xmm9; \
+ pcmpgtb reg2, %xmm10; \
+ pand %xmm8, %xmm7; \
+ pand %xmm10, %xmm9; \
+ pand LCQWORD_reg, %xmm7; \
+ pand LCQWORD_reg, %xmm9; \
+ por %xmm7, reg1; \
+ por %xmm9, reg2
+# endif
+ TOLOWER (%xmm1, %xmm2)
+#else
+# define TOLOWER(reg1, reg2)
+#endif
+ pxor %xmm0, D(%xmm0) /* clear %xmm0 for null char checks */
+ pcmpeqb %xmm1, D(%xmm0) /* Any null chars? */
+ pcmpeqb %xmm2, D(%xmm1) /* compare first 16 bytes for equality */
+ psubb %xmm0, D(%xmm1) /* packed sub of comparison results*/
+ pmovmskb %xmm1, %edx
+ sub $0xffff, %edx /* if first 16 bytes are same, edx == 0xffff */
+ jnz LABEL(less16bytes)/* If not, find different value or null char */
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)/* finish comparision */
+#endif
+ add $16, %rsi /* prepare to search next 16 bytes */
+ add $16, %rdi /* prepare to search next 16 bytes */
+
+ /*
+ * Determine source and destination string offsets from 16-byte
+ * alignment. Use relative offset difference between the two to
+ * determine which case below to use.
+ */
+ .p2align 4
+LABEL(crosscache):
+ and $0xfffffffffffffff0, %rsi /* force %rsi is 16 byte aligned */
+ and $0xfffffffffffffff0, %rdi /* force %rdi is 16 byte aligned */
+ mov $0xffff, %edx /* for equivalent offset */
+ xor %r8d, %r8d
+ and $0xf, %ecx /* offset of rsi */
+ and $0xf, %eax /* offset of rdi */
+ pxor %xmm0, D(%xmm0) /* clear %xmm0 for null char check */
+ cmp %eax, %ecx
+ je LABEL(ashr_0) /* rsi and rdi relative offset same */
+ ja LABEL(bigger)
+ mov %edx, %r8d /* r8d is offset flag for exit tail */
+ xchg %ecx, %eax
+ xchg %rsi, %rdi
+LABEL(bigger):
+ movdqa (%rdi), %xmm2
+ movdqa (%rsi), %xmm1
+ lea 15(%rax), %r9
+ sub %rcx, %r9
+ lea LABEL(unaligned_table)(%rip), %r10
+ movslq (%r10, %r9,4), %r9
+ pcmpeqb %xmm1, D(%xmm0) /* Any null chars? */
+ lea (%r10, %r9), %r10
+ jmp *%r10 /* jump to corresponding case */
+
+/*
+ * The following cases will be handled by ashr_0
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(0~15) n(0~15) 15(15+ n-n) ashr_0
+ */
+ .p2align 4
+LABEL(ashr_0):
+
+ movdqa (%rsi), %xmm1
+ pcmpeqb %xmm1, D(%xmm0) /* Any null chars? */
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpeqb (%rdi), D(%xmm1) /* compare 16 bytes for equality */
+#else
+ movdqa (%rdi), %xmm2
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm2, D(%xmm1) /* compare 16 bytes for equality */
+#endif
+ psubb %xmm0, D(%xmm1) /* packed sub of comparison results*/
+ pmovmskb %xmm1, %r9d
+ shr %cl, %edx /* adjust 0xffff for offset */
+ shr %cl, %r9d /* adjust for 16-byte offset */
+ sub %r9d, %edx
+ /*
+ * edx must be the same with r9d if in left byte (16-rcx) is equal to
+ * the start from (16-rax) and no null char was seen.
+ */
+ jne LABEL(less32bytes) /* mismatch or null char */
+ UPDATE_STRNCMP_COUNTER
+ mov $16, %rcx
+ mov $16, %r9
+
+ /*
+ * Now both strings are aligned at 16-byte boundary. Loop over strings
+ * checking 32-bytes per iteration.
+ */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+ .p2align 4
+LABEL(ashr_0_use):
+ movdqa (%rdi,%rdx), %xmm0
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ lea 16(%rdx), %rdx
+ jbe LABEL(ashr_0_exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ movdqa (%rdi,%rdx), %xmm0
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ lea 16(%rdx), %rdx
+ jbe LABEL(ashr_0_exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ jmp LABEL(ashr_0_use)
+
+
+ .p2align 4
+LABEL(ashr_0_exit_use):
+ jnc LABEL(strcmp_exitz)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub %rcx, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ lea -16(%rdx, %rcx), %rcx
+ movzbl (%rdi, %rcx), %eax
+ movzbl (%rsi, %rcx), %edx
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rcx
+ movl (%rcx,%rax,4), %eax
+ movl (%rcx,%rdx,4), %edx
+#endif
+ sub %edx, %eax
+ ret
+
+
+
+/*
+ * The following cases will be handled by ashr_1
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(15) n -15 0(15 +(n-15) - n) ashr_1
+ */
+ .p2align 4
+LABEL(ashr_1):
+ pslldq $15, D(%xmm2) /* shift first string to align with second */
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2) /* compare 16 bytes for equality */
+ psubb %xmm0, D(%xmm2) /* packed sub of comparison results*/
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx /* adjust 0xffff for offset */
+ shr %cl, %r9d /* adjust for 16-byte offset */
+ sub %r9d, %edx
+ jnz LABEL(less32bytes) /* mismatch or null char seen */
+ movdqa (%rdi), %xmm3
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads*/
+ mov $1, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 1(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_1_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_1_use)
+
+LABEL(nibble_ashr_1_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $1, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_1_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $1, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_1_use)
+
+ .p2align 4
+LABEL(nibble_ashr_1_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $1, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $14, %ecx
+ ja LABEL(nibble_ashr_1_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_2
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(14~15) n -14 1(15 +(n-14) - n) ashr_2
+ */
+ .p2align 4
+LABEL(ashr_2):
+ pslldq $14, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $2, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 2(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_2_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_2_use)
+
+LABEL(nibble_ashr_2_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $2, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_2_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $2, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_2_use)
+
+ .p2align 4
+LABEL(nibble_ashr_2_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $2, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $13, %ecx
+ ja LABEL(nibble_ashr_2_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_3
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(13~15) n -13 2(15 +(n-13) - n) ashr_3
+ */
+ .p2align 4
+LABEL(ashr_3):
+ pslldq $13, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $3, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 3(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+LABEL(loop_ashr_3_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_3_use)
+
+LABEL(nibble_ashr_3_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $3, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_3_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $3, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_3_use)
+
+ .p2align 4
+LABEL(nibble_ashr_3_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $3, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $12, %ecx
+ ja LABEL(nibble_ashr_3_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_4
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(12~15) n -12 3(15 +(n-12) - n) ashr_4
+ */
+ .p2align 4
+LABEL(ashr_4):
+ pslldq $12, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $4, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 4(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_4_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_4_use)
+
+LABEL(nibble_ashr_4_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $4, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_4_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $4, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_4_use)
+
+ .p2align 4
+LABEL(nibble_ashr_4_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $4, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $11, %ecx
+ ja LABEL(nibble_ashr_4_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_5
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(11~15) n - 11 4(15 +(n-11) - n) ashr_5
+ */
+ .p2align 4
+LABEL(ashr_5):
+ pslldq $11, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $5, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 5(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_5_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_5_use)
+
+LABEL(nibble_ashr_5_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $5, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_5_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+
+ palignr $5, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_5_use)
+
+ .p2align 4
+LABEL(nibble_ashr_5_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $5, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $10, %ecx
+ ja LABEL(nibble_ashr_5_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_6
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(10~15) n - 10 5(15 +(n-10) - n) ashr_6
+ */
+ .p2align 4
+LABEL(ashr_6):
+ pslldq $10, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $6, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 6(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_6_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_6_use)
+
+LABEL(nibble_ashr_6_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $6, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_6_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $6, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_6_use)
+
+ .p2align 4
+LABEL(nibble_ashr_6_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $6, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $9, %ecx
+ ja LABEL(nibble_ashr_6_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_7
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(9~15) n - 9 6(15 +(n - 9) - n) ashr_7
+ */
+ .p2align 4
+LABEL(ashr_7):
+ pslldq $9, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $7, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 7(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_7_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_7_use)
+
+LABEL(nibble_ashr_7_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $7, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_7_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $7, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_7_use)
+
+ .p2align 4
+LABEL(nibble_ashr_7_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $7, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $8, %ecx
+ ja LABEL(nibble_ashr_7_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_8
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(8~15) n - 8 7(15 +(n - 8) - n) ashr_8
+ */
+ .p2align 4
+LABEL(ashr_8):
+ pslldq $8, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $8, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 8(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_8_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_8_use)
+
+LABEL(nibble_ashr_8_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $8, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_8_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $8, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_8_use)
+
+ .p2align 4
+LABEL(nibble_ashr_8_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $8, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $7, %ecx
+ ja LABEL(nibble_ashr_8_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_9
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(7~15) n - 7 8(15 +(n - 7) - n) ashr_9
+ */
+ .p2align 4
+LABEL(ashr_9):
+ pslldq $7, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $9, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 9(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_9_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_9_use)
+
+LABEL(nibble_ashr_9_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+
+ palignr $9, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_9_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $9, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_9_use)
+
+ .p2align 4
+LABEL(nibble_ashr_9_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $9, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $6, %ecx
+ ja LABEL(nibble_ashr_9_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_10
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(6~15) n - 6 9(15 +(n - 6) - n) ashr_10
+ */
+ .p2align 4
+LABEL(ashr_10):
+ pslldq $6, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $10, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 10(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_10_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_10_use)
+
+LABEL(nibble_ashr_10_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $10, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_10_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $10, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_10_use)
+
+ .p2align 4
+LABEL(nibble_ashr_10_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $10, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $5, %ecx
+ ja LABEL(nibble_ashr_10_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_11
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(5~15) n - 5 10(15 +(n - 5) - n) ashr_11
+ */
+ .p2align 4
+LABEL(ashr_11):
+ pslldq $5, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $11, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 11(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_11_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_11_use)
+
+LABEL(nibble_ashr_11_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $11, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_11_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $11, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_11_use)
+
+ .p2align 4
+LABEL(nibble_ashr_11_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $11, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $4, %ecx
+ ja LABEL(nibble_ashr_11_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_12
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(4~15) n - 4 11(15 +(n - 4) - n) ashr_12
+ */
+ .p2align 4
+LABEL(ashr_12):
+ pslldq $4, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $12, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 12(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_12_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_12_use)
+
+LABEL(nibble_ashr_12_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $12, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_12_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $12, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_12_use)
+
+ .p2align 4
+LABEL(nibble_ashr_12_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $12, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $3, %ecx
+ ja LABEL(nibble_ashr_12_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_13
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(3~15) n - 3 12(15 +(n - 3) - n) ashr_13
+ */
+ .p2align 4
+LABEL(ashr_13):
+ pslldq $3, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $13, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 13(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_13_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_13_use)
+
+LABEL(nibble_ashr_13_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $13, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_13_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $13, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_13_use)
+
+ .p2align 4
+LABEL(nibble_ashr_13_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $13, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $2, %ecx
+ ja LABEL(nibble_ashr_13_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_14
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(2~15) n - 2 13(15 +(n - 2) - n) ashr_14
+ */
+ .p2align 4
+LABEL(ashr_14):
+ pslldq $2, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $14, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 14(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_14_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_14_use)
+
+LABEL(nibble_ashr_14_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $14, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_14_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $14, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_14_use)
+
+ .p2align 4
+LABEL(nibble_ashr_14_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $14, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $1, %ecx
+ ja LABEL(nibble_ashr_14_restart_use)
+
+ jmp LABEL(nibble_ashr_exit_use)
+
+/*
+ * The following cases will be handled by ashr_15
+ * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
+ * n(1~15) n - 1 14(15 +(n - 1) - n) ashr_15
+ */
+ .p2align 4
+LABEL(ashr_15):
+ pslldq $1, D(%xmm2)
+ TOLOWER (%xmm1, %xmm2)
+ pcmpeqb %xmm1, D(%xmm2)
+ psubb %xmm0, D(%xmm2)
+ pmovmskb %xmm2, %r9d
+ shr %cl, %edx
+ shr %cl, %r9d
+ sub %r9d, %edx
+ jnz LABEL(less32bytes)
+
+ movdqa (%rdi), %xmm3
+
+ UPDATE_STRNCMP_COUNTER
+
+ mov $16, %rcx /* index for loads */
+ mov $15, %r9d /* byte position left over from less32bytes case */
+ /*
+ * Setup %r10 value allows us to detect crossing a page boundary.
+ * When %r10 goes positive we have crossed a page boundary and
+ * need to do a nibble.
+ */
+ lea 15(%rdi), %r10
+ and $0xfff, %r10 /* offset into 4K page */
+
+ sub $0x1000, %r10 /* subtract 4K pagesize */
+
+ mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
+
+ .p2align 4
+LABEL(loop_ashr_15_use):
+ add $16, %r10
+ jg LABEL(nibble_ashr_15_use)
+
+LABEL(nibble_ashr_15_restart_use):
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $15, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+
+ add $16, %rdx
+ add $16, %r10
+ jg LABEL(nibble_ashr_15_use)
+
+ movdqa (%rdi, %rdx), %xmm0
+ palignr $15, -16(%rdi, %rdx), D(%xmm0)
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a, (%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ jbe LABEL(exit_use)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub $16, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add $16, %rdx
+ jmp LABEL(loop_ashr_15_use)
+
+ .p2align 4
+LABEL(nibble_ashr_15_use):
+ sub $0x1000, %r10
+ movdqa -16(%rdi, %rdx), %xmm0
+ psrldq $15, D(%xmm0)
+ pcmpistri $0x3a,%xmm0, %xmm0
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ cmp %r11, %rcx
+ jae LABEL(nibble_ashr_exit_use)
+#endif
+ cmp $0, %ecx
+ ja LABEL(nibble_ashr_15_restart_use)
+
+LABEL(nibble_ashr_exit_use):
+#if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
+ pcmpistri $0x1a,(%rsi,%rdx), %xmm0
+#else
+ movdqa (%rsi,%rdx), %xmm1
+ TOLOWER (%xmm0, %xmm1)
+ pcmpistri $0x1a, %xmm1, %xmm0
+#endif
+ .p2align 4
+LABEL(exit_use):
+ jnc LABEL(strcmp_exitz)
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub %rcx, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ add %rcx, %rdx
+ lea -16(%rdi, %r9), %rdi
+ movzbl (%rdi, %rdx), %eax
+ movzbl (%rsi, %rdx), %edx
+ test %r8d, %r8d
+ jz LABEL(ret_use)
+ xchg %eax, %edx
+LABEL(ret_use):
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rcx
+ movl (%rcx,%rdx,4), %edx
+ movl (%rcx,%rax,4), %eax
+#endif
+
+ sub %edx, %eax
+ ret
+
+LABEL(less32bytes):
+ lea (%rdi, %rax), %rdi /* locate the exact address for first operand(rdi) */
+ lea (%rsi, %rcx), %rsi /* locate the exact address for second operand(rsi) */
+ test %r8d, %r8d
+ jz LABEL(ret)
+ xchg %rsi, %rdi /* recover original order according to flag(%r8d) */
+
+ .p2align 4
+LABEL(ret):
+LABEL(less16bytes):
+ bsf %rdx, %rdx /* find and store bit index in %rdx */
+
+#if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
+ sub %rdx, %r11
+ jbe LABEL(strcmp_exitz)
+#endif
+ movzbl (%rsi, %rdx), %ecx
+ movzbl (%rdi, %rdx), %eax
+
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx
+ movl (%rdx,%rcx,4), %ecx
+ movl (%rdx,%rax,4), %eax
+#endif
+
+ sub %ecx, %eax
+ ret
+
+LABEL(strcmp_exitz):
+ xor %eax, %eax
+ ret
+
+ .p2align 4
+ // XXX Same as code above
+LABEL(Byte0):
+ movzx (%rsi), %ecx
+ movzx (%rdi), %eax
+
+#if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+ leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx
+ movl (%rdx,%rcx,4), %ecx
+ movl (%rdx,%rax,4), %eax
+#endif
+
+ sub %ecx, %eax
+ ret
+ cfi_endproc
+ .size STRCMP_SSE42, .-STRCMP_SSE42
+
+#undef UCLOW_reg
+#undef UCHIGH_reg
+#undef LCQWORD_reg
+#undef TOLOWER
+
+ /* Put all SSE 4.2 functions together. */
+ .section .rodata.SECTION,"a",@progbits
+ .p2align 3
+LABEL(unaligned_table):
+ .int LABEL(ashr_1) - LABEL(unaligned_table)
+ .int LABEL(ashr_2) - LABEL(unaligned_table)
+ .int LABEL(ashr_3) - LABEL(unaligned_table)
+ .int LABEL(ashr_4) - LABEL(unaligned_table)
+ .int LABEL(ashr_5) - LABEL(unaligned_table)
+ .int LABEL(ashr_6) - LABEL(unaligned_table)
+ .int LABEL(ashr_7) - LABEL(unaligned_table)
+ .int LABEL(ashr_8) - LABEL(unaligned_table)
+ .int LABEL(ashr_9) - LABEL(unaligned_table)
+ .int LABEL(ashr_10) - LABEL(unaligned_table)
+ .int LABEL(ashr_11) - LABEL(unaligned_table)
+ .int LABEL(ashr_12) - LABEL(unaligned_table)
+ .int LABEL(ashr_13) - LABEL(unaligned_table)
+ .int LABEL(ashr_14) - LABEL(unaligned_table)
+ .int LABEL(ashr_15) - LABEL(unaligned_table)
+ .int LABEL(ashr_0) - LABEL(unaligned_table)
+
+#undef LABEL
+#undef GLABEL
+#undef SECTION
+#undef movdqa
+#undef movdqu
+#undef pmovmskb
+#undef pcmpistri
+#undef psubb
+#undef pcmpeqb
+#undef psrldq
+#undef pslldq
+#undef palignr
+#undef pxor
+#undef D
diff --git a/sysdeps/x86_64/multiarch/strcmp.S b/sysdeps/x86_64/multiarch/strcmp.S
index 8879855d92..f93c83d7d4 100644
--- a/sysdeps/x86_64/multiarch/strcmp.S
+++ b/sysdeps/x86_64/multiarch/strcmp.S
@@ -1,5 +1,5 @@
/* strcmp with SSE4.2
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -28,9 +28,9 @@
/* calculate left number to compare */ \
lea -16(%rcx, %r11), %r9; \
cmp %r9, %r11; \
- jb LABEL(strcmp_exitz_sse4_2); \
+ jb LABEL(strcmp_exitz); \
test %r9, %r9; \
- je LABEL(strcmp_exitz_sse4_2); \
+ je LABEL(strcmp_exitz); \
mov %r9, %r11
# define STRCMP_SSE42 __strncmp_sse42
@@ -42,6 +42,7 @@
# define UPDATE_STRNCMP_COUNTER
+# define STRCMP_AVX __strcasecmp_l_avx
# define STRCMP_SSE42 __strcasecmp_l_sse42
# define STRCMP_SSSE3 __strcasecmp_l_ssse3
# define STRCMP_SSE2 __strcasecmp_l_sse2
@@ -55,11 +56,12 @@
/* calculate left number to compare */ \
lea -16(%rcx, %r11), %r9; \
cmp %r9, %r11; \
- jb LABEL(strcmp_exitz_sse4_2); \
+ jb LABEL(strcmp_exitz); \
test %r9, %r9; \
- je LABEL(strcmp_exitz_sse4_2); \
+ je LABEL(strcmp_exitz); \
mov %r9, %r11
+# define STRCMP_AVX __strncasecmp_l_avx
# define STRCMP_SSE42 __strncasecmp_l_sse42
# define STRCMP_SSSE3 __strncasecmp_l_ssse3
# define STRCMP_SSE2 __strncasecmp_l_sse2
@@ -75,10 +77,6 @@
# endif
#endif
-#ifndef LABEL
-# define LABEL(l) L(l)
-#endif
-
/* Define multiple versions only for the definition in libc. Don't
define multiple versions for strncmp in static library since we
need strncmp before the initialization happened. */
@@ -107,6 +105,11 @@ ENTRY(__strcasecmp)
jne 1f
call __init_cpu_features
1:
+# ifdef HAVE_AVX_SUPPORT
+ leaq __strcasecmp_avx(%rip), %rax
+ testl $bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
+ jnz 2f
+# endif
leaq __strcasecmp_sse42(%rip), %rax
testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jnz 2f
@@ -125,6 +128,11 @@ ENTRY(__strncasecmp)
jne 1f
call __init_cpu_features
1:
+# ifdef HAVE_AVX_SUPPORT
+ leaq __strncasecmp_avx(%rip), %rax
+ testl $bit_AVX, __cpu_features+CPUID_OFFSET+index_AVX(%rip)
+ jnz 2f
+# endif
leaq __strncasecmp_sse42(%rip), %rax
testl $bit_SSE4_2, __cpu_features+CPUID_OFFSET+index_SSE4_2(%rip)
jnz 2f
@@ -137,1798 +145,24 @@ END(__strncasecmp)
weak_alias (__strncasecmp, strncasecmp)
# endif
-/* We use 0x1a:
- _SIDD_SBYTE_OPS
- | _SIDD_CMP_EQUAL_EACH
- | _SIDD_NEGATIVE_POLARITY
- | _SIDD_LEAST_SIGNIFICANT
- on pcmpistri to find out if two 16byte data elements are the same
- and the offset of the first different byte. There are 4 cases:
-
- 1. Both 16byte data elements are valid and identical.
- 2. Both 16byte data elements have EOS and identical.
- 3. Both 16byte data elements are valid and they differ at offset X.
- 4. At least one 16byte data element has EOS at offset X. Two 16byte
- data elements must differ at or before offset X.
-
- Here is the table of ECX, CFlag, ZFlag and SFlag for 4 cases:
-
- case ECX CFlag ZFlag SFlag
- 1 16 0 0 0
- 2 16 0 1 1
- 3 X 1 0 0
- 4 0 <= X 1 0/1 0/1
-
- We exit from the loop for cases 2, 3 and 4 with jbe which branches
- when either CFlag or ZFlag is 1. If CFlag == 0, we return 0 for
- case 2. */
-
- /* Put all SSE 4.2 functions together. */
- .section .text.sse4.2,"ax",@progbits
- .align 16
- .type STRCMP_SSE42, @function
-# ifdef USE_AS_STRCASECMP_L
-ENTRY (__strcasecmp_sse42)
- movq __libc_tsd_LOCALE@gottpoff(%rip),%rax
- movq %fs:(%rax),%rdx
-
- // XXX 5 byte should be before the function
- /* 5-byte NOP. */
- .byte 0x0f,0x1f,0x44,0x00,0x00
-END (__strcasecmp_sse42)
- /* FALLTHROUGH to strcasecmp_l. */
-# endif
-# ifdef USE_AS_STRNCASECMP_L
-ENTRY (__strncasecmp_sse42)
- movq __libc_tsd_LOCALE@gottpoff(%rip),%rax
- movq %fs:(%rax),%rcx
-
- // XXX 5 byte should be before the function
- /* 5-byte NOP. */
- .byte 0x0f,0x1f,0x44,0x00,0x00
-END (__strncasecmp_sse42)
- /* FALLTHROUGH to strncasecmp_l. */
-# endif
+# undef LABEL
+# define LABEL(l) .L##l##_sse42
+# define GLABEL(l) l##_sse42
+# define SECTION sse4.2
+# include "strcmp-sse42.S"
-STRCMP_SSE42:
- cfi_startproc
- CALL_MCOUNT
-/*
- * This implementation uses SSE to compare up to 16 bytes at a time.
- */
-# ifdef USE_AS_STRCASECMP_L
- /* We have to fall back on the C implementation for locales
- with encodings not matching ASCII for single bytes. */
-# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
- movq LOCALE_T___LOCALES+LC_CTYPE*8(%rdx), %rax
-# else
- movq (%rdx), %rax
+# ifdef HAVE_AVX_SUPPORT
+# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
+# define LABEL(l) .L##l##_avx
+# define GLABEL(l) l##_avx
+# define USE_AVX 1
+# undef STRCMP_SSE42
+# define STRCMP_SSE42 STRCMP_AVX
+# define SECTION avx
+# include "strcmp-sse42.S"
# endif
- testl $0, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
- jne __strcasecmp_l_nonascii
-# endif
-# ifdef USE_AS_STRNCASECMP_L
- /* We have to fall back on the C implementation for locales
- with encodings not matching ASCII for single bytes. */
-# if LOCALE_T___LOCALES != 0 || LC_CTYPE != 0
- movq LOCALE_T___LOCALES+LC_CTYPE*8(%rcx), %rax
-# else
- movq (%rcx), %rax
-# endif
- testl $0, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
- jne __strncasecmp_l_nonascii
-# endif
-
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- test %rdx, %rdx
- je LABEL(strcmp_exitz_sse4_2)
- cmp $1, %rdx
- je LABEL(Byte0_sse4_2)
- mov %rdx, %r11
-# endif
- mov %esi, %ecx
- mov %edi, %eax
-/* Use 64bit AND here to avoid long NOP padding. */
- and $0x3f, %rcx /* rsi alignment in cache line */
- and $0x3f, %rax /* rdi alignment in cache line */
-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
- .section .rodata.cst16,"aM",@progbits,16
- .align 16
-.Lbelowupper_sse4:
- .quad 0x4040404040404040
- .quad 0x4040404040404040
-.Ltopupper_sse4:
- .quad 0x5b5b5b5b5b5b5b5b
- .quad 0x5b5b5b5b5b5b5b5b
-.Ltouppermask_sse4:
- .quad 0x2020202020202020
- .quad 0x2020202020202020
- .previous
- movdqa .Lbelowupper_sse4(%rip), %xmm4
-# define UCLOW_reg %xmm4
- movdqa .Ltopupper_sse4(%rip), %xmm5
-# define UCHIGH_reg %xmm5
- movdqa .Ltouppermask_sse4(%rip), %xmm6
-# define LCQWORD_reg %xmm6
-# endif
- cmp $0x30, %ecx
- ja LABEL(crosscache_sse4_2)/* rsi: 16-byte load will cross cache line */
- cmp $0x30, %eax
- ja LABEL(crosscache_sse4_2)/* rdi: 16-byte load will cross cache line */
- movdqu (%rdi), %xmm1
- movdqu (%rsi), %xmm2
-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
-# define TOLOWER(reg1, reg2) \
- movdqa reg1, %xmm7; \
- movdqa UCHIGH_reg, %xmm8; \
- movdqa reg2, %xmm9; \
- movdqa UCHIGH_reg, %xmm10; \
- pcmpgtb UCLOW_reg, %xmm7; \
- pcmpgtb reg1, %xmm8; \
- pcmpgtb UCLOW_reg, %xmm9; \
- pcmpgtb reg2, %xmm10; \
- pand %xmm8, %xmm7; \
- pand %xmm10, %xmm9; \
- pand LCQWORD_reg, %xmm7; \
- pand LCQWORD_reg, %xmm9; \
- por %xmm7, reg1; \
- por %xmm9, reg2
- TOLOWER (%xmm1, %xmm2)
-# else
-# define TOLOWER(reg1, reg2)
-# endif
- pxor %xmm0, %xmm0 /* clear %xmm0 for null char checks */
- pcmpeqb %xmm1, %xmm0 /* Any null chars? */
- pcmpeqb %xmm2, %xmm1 /* compare first 16 bytes for equality */
- psubb %xmm0, %xmm1 /* packed sub of comparison results*/
- pmovmskb %xmm1, %edx
- sub $0xffff, %edx /* if first 16 bytes are same, edx == 0xffff */
- jnz LABEL(less16bytes_sse4_2)/* If not, find different value or null char */
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)/* finish comparision */
-# endif
- add $16, %rsi /* prepare to search next 16 bytes */
- add $16, %rdi /* prepare to search next 16 bytes */
-
- /*
- * Determine source and destination string offsets from 16-byte alignment.
- * Use relative offset difference between the two to determine which case
- * below to use.
- */
- .p2align 4
-LABEL(crosscache_sse4_2):
- and $0xfffffffffffffff0, %rsi /* force %rsi is 16 byte aligned */
- and $0xfffffffffffffff0, %rdi /* force %rdi is 16 byte aligned */
- mov $0xffff, %edx /* for equivalent offset */
- xor %r8d, %r8d
- and $0xf, %ecx /* offset of rsi */
- and $0xf, %eax /* offset of rdi */
- cmp %eax, %ecx
- je LABEL(ashr_0_sse4_2) /* rsi and rdi relative offset same */
- ja LABEL(bigger_sse4_2)
- mov %edx, %r8d /* r8d is offset flag for exit tail */
- xchg %ecx, %eax
- xchg %rsi, %rdi
-LABEL(bigger_sse4_2):
- lea 15(%rax), %r9
- sub %rcx, %r9
- lea LABEL(unaligned_table_sse4_2)(%rip), %r10
- movslq (%r10, %r9,4), %r9
- lea (%r10, %r9), %r10
- jmp *%r10 /* jump to corresponding case */
-
-/*
- * The following cases will be handled by ashr_0
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(0~15) n(0~15) 15(15+ n-n) ashr_0
- */
- .p2align 4
-LABEL(ashr_0_sse4_2):
-
- movdqa (%rsi), %xmm1
- pxor %xmm0, %xmm0 /* clear %xmm0 for null char check */
- pcmpeqb %xmm1, %xmm0 /* Any null chars? */
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpeqb (%rdi), %xmm1 /* compare 16 bytes for equality */
-# else
- movdqa (%rdi), %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm2, %xmm1 /* compare 16 bytes for equality */
-# endif
- psubb %xmm0, %xmm1 /* packed sub of comparison results*/
- pmovmskb %xmm1, %r9d
- shr %cl, %edx /* adjust 0xffff for offset */
- shr %cl, %r9d /* adjust for 16-byte offset */
- sub %r9d, %edx
- /*
- * edx must be the same with r9d if in left byte (16-rcx) is equal to
- * the start from (16-rax) and no null char was seen.
- */
- jne LABEL(less32bytes_sse4_2) /* mismatch or null char */
- UPDATE_STRNCMP_COUNTER
- mov $16, %rcx
- mov $16, %r9
- pxor %xmm0, %xmm0 /* clear xmm0, may have changed above */
-
- /*
- * Now both strings are aligned at 16-byte boundary. Loop over strings
- * checking 32-bytes per iteration.
- */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
- .p2align 4
-LABEL(ashr_0_use_sse4_2):
- movdqa (%rdi,%rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- lea 16(%rdx), %rdx
- jbe LABEL(ashr_0_use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- movdqa (%rdi,%rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- lea 16(%rdx), %rdx
- jbe LABEL(ashr_0_use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- jmp LABEL(ashr_0_use_sse4_2)
-
-
- .p2align 4
-LABEL(ashr_0_use_sse4_2_exit):
- jnc LABEL(strcmp_exitz_sse4_2)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub %rcx, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- lea -16(%rdx, %rcx), %rcx
- movzbl (%rdi, %rcx), %eax
- movzbl (%rsi, %rcx), %edx
-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
- leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rcx
- movl (%rcx,%rax,4), %eax
- movl (%rcx,%rdx,4), %edx
-# endif
- sub %edx, %eax
- ret
-
-
-
-/*
- * The following cases will be handled by ashr_1
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(15) n -15 0(15 +(n-15) - n) ashr_1
- */
- .p2align 4
-LABEL(ashr_1_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0 /* Any null chars? */
- pslldq $15, %xmm2 /* shift first string to align with second */
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2 /* compare 16 bytes for equality */
- psubb %xmm0, %xmm2 /* packed sub of comparison results*/
- pmovmskb %xmm2, %r9d
- shr %cl, %edx /* adjust 0xffff for offset */
- shr %cl, %r9d /* adjust for 16-byte offset */
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)/* mismatch or null char seen */
- movdqa (%rdi), %xmm3
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads*/
- mov $1, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 1(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_1_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_1_use_sse4_2)
-
-LABEL(nibble_ashr_1_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $1, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_1_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $1, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_1_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_1_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $1, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $14, %ecx
- ja LABEL(nibble_ashr_1_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_2
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(14~15) n -14 1(15 +(n-14) - n) ashr_2
- */
- .p2align 4
-LABEL(ashr_2_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $14, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $2, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 2(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_2_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_2_use_sse4_2)
-
-LABEL(nibble_ashr_2_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $2, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_2_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $2, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_2_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_2_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $2, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $13, %ecx
- ja LABEL(nibble_ashr_2_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_3
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(13~15) n -13 2(15 +(n-13) - n) ashr_3
- */
- .p2align 4
-LABEL(ashr_3_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $13, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $3, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 3(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
-LABEL(loop_ashr_3_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_3_use_sse4_2)
-
-LABEL(nibble_ashr_3_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $3, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_3_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $3, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_3_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_3_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $3, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $12, %ecx
- ja LABEL(nibble_ashr_3_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_4
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(12~15) n -12 3(15 +(n-12) - n) ashr_4
- */
- .p2align 4
-LABEL(ashr_4_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $12, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $4, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 4(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_4_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_4_use_sse4_2)
-
-LABEL(nibble_ashr_4_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $4, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_4_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $4, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_4_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_4_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $4, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $11, %ecx
- ja LABEL(nibble_ashr_4_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_5
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(11~15) n - 11 4(15 +(n-11) - n) ashr_5
- */
- .p2align 4
-LABEL(ashr_5_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $11, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $5, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 5(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_5_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_5_use_sse4_2)
-
-LABEL(nibble_ashr_5_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $5, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_5_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
-
- palignr $5, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_5_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_5_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $5, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $10, %ecx
- ja LABEL(nibble_ashr_5_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_6
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(10~15) n - 10 5(15 +(n-10) - n) ashr_6
- */
- .p2align 4
-LABEL(ashr_6_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $10, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $6, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 6(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_6_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_6_use_sse4_2)
-
-LABEL(nibble_ashr_6_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $6, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_6_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $6, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_6_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_6_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $6, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $9, %ecx
- ja LABEL(nibble_ashr_6_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_7
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(9~15) n - 9 6(15 +(n - 9) - n) ashr_7
- */
- .p2align 4
-LABEL(ashr_7_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $9, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $7, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 7(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_7_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_7_use_sse4_2)
-
-LABEL(nibble_ashr_7_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $7, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_7_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $7, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_7_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_7_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $7, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $8, %ecx
- ja LABEL(nibble_ashr_7_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_8
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(8~15) n - 8 7(15 +(n - 8) - n) ashr_8
- */
- .p2align 4
-LABEL(ashr_8_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $8, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $8, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 8(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_8_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_8_use_sse4_2)
-
-LABEL(nibble_ashr_8_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $8, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_8_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $8, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_8_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_8_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $8, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $7, %ecx
- ja LABEL(nibble_ashr_8_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_9
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(7~15) n - 7 8(15 +(n - 7) - n) ashr_9
- */
- .p2align 4
-LABEL(ashr_9_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $7, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $9, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 9(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_9_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_9_use_sse4_2)
-
-LABEL(nibble_ashr_9_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
-
- palignr $9, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_9_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $9, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_9_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_9_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $9, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $6, %ecx
- ja LABEL(nibble_ashr_9_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_10
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(6~15) n - 6 9(15 +(n - 6) - n) ashr_10
- */
- .p2align 4
-LABEL(ashr_10_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $6, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $10, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 10(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_10_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_10_use_sse4_2)
-
-LABEL(nibble_ashr_10_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $10, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_10_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $10, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_10_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_10_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $10, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $5, %ecx
- ja LABEL(nibble_ashr_10_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_11
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(5~15) n - 5 10(15 +(n - 5) - n) ashr_11
- */
- .p2align 4
-LABEL(ashr_11_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $5, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $11, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 11(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_11_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_11_use_sse4_2)
-
-LABEL(nibble_ashr_11_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $11, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_11_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $11, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_11_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_11_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $11, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $4, %ecx
- ja LABEL(nibble_ashr_11_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_12
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(4~15) n - 4 11(15 +(n - 4) - n) ashr_12
- */
- .p2align 4
-LABEL(ashr_12_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $4, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $12, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 12(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_12_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_12_use_sse4_2)
-
-LABEL(nibble_ashr_12_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $12, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_12_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $12, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_12_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_12_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $12, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $3, %ecx
- ja LABEL(nibble_ashr_12_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_13
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(3~15) n - 3 12(15 +(n - 3) - n) ashr_13
- */
- .p2align 4
-LABEL(ashr_13_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $3, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $13, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 13(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
-
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_13_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_13_use_sse4_2)
-
-LABEL(nibble_ashr_13_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $13, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_13_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $13, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_13_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_13_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $13, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $2, %ecx
- ja LABEL(nibble_ashr_13_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_14
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(2~15) n - 2 13(15 +(n - 2) - n) ashr_14
- */
- .p2align 4
-LABEL(ashr_14_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $2, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $14, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 14(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
- sub $0x1000, %r10 /* subtract 4K pagesize */
-
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_14_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_14_use_sse4_2)
-
-LABEL(nibble_ashr_14_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $14, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_14_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $14, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_14_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_14_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $14, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $1, %ecx
- ja LABEL(nibble_ashr_14_use_sse4_2_restart)
-
- jmp LABEL(nibble_ashr_use_sse4_2_exit)
-
-/*
- * The following cases will be handled by ashr_15
- * rcx(offset of rsi) rax(offset of rdi) relative offset corresponding case
- * n(1~15) n - 1 14(15 +(n - 1) - n) ashr_15
- */
- .p2align 4
-LABEL(ashr_15_sse4_2):
- pxor %xmm0, %xmm0
- movdqa (%rdi), %xmm2
- movdqa (%rsi), %xmm1
- pcmpeqb %xmm1, %xmm0
- pslldq $1, %xmm2
- TOLOWER (%xmm1, %xmm2)
- pcmpeqb %xmm1, %xmm2
- psubb %xmm0, %xmm2
- pmovmskb %xmm2, %r9d
- shr %cl, %edx
- shr %cl, %r9d
- sub %r9d, %edx
- jnz LABEL(less32bytes_sse4_2)
-
- movdqa (%rdi), %xmm3
-
- UPDATE_STRNCMP_COUNTER
-
- pxor %xmm0, %xmm0
- mov $16, %rcx /* index for loads */
- mov $15, %r9d /* byte position left over from less32bytes case */
- /*
- * Setup %r10 value allows us to detect crossing a page boundary.
- * When %r10 goes positive we have crossed a page boundary and
- * need to do a nibble.
- */
- lea 15(%rdi), %r10
- and $0xfff, %r10 /* offset into 4K page */
-
- sub $0x1000, %r10 /* subtract 4K pagesize */
-
- mov %rcx, %rdx /* only for offset of sse4 instruction loop*/
-
- .p2align 4
-LABEL(loop_ashr_15_use_sse4_2):
- add $16, %r10
- jg LABEL(nibble_ashr_15_use_sse4_2)
-
-LABEL(nibble_ashr_15_use_sse4_2_restart):
- movdqa (%rdi, %rdx), %xmm0
- palignr $15, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
-
- add $16, %rdx
- add $16, %r10
- jg LABEL(nibble_ashr_15_use_sse4_2)
-
- movdqa (%rdi, %rdx), %xmm0
- palignr $15, -16(%rdi, %rdx), %xmm0
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a, (%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- jbe LABEL(use_sse4_2_exit)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub $16, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add $16, %rdx
- jmp LABEL(loop_ashr_15_use_sse4_2)
-
- .p2align 4
-LABEL(nibble_ashr_15_use_sse4_2):
- sub $0x1000, %r10
- movdqa -16(%rdi, %rdx), %xmm0
- psrldq $15, %xmm0
- pcmpistri $0x3a,%xmm0, %xmm0
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- cmp %r11, %rcx
- jae LABEL(nibble_ashr_use_sse4_2_exit)
-# endif
- cmp $0, %ecx
- ja LABEL(nibble_ashr_15_use_sse4_2_restart)
-
-LABEL(nibble_ashr_use_sse4_2_exit):
-# if !defined USE_AS_STRCASECMP_L && !defined USE_AS_STRNCASECMP_L
- pcmpistri $0x1a,(%rsi,%rdx), %xmm0
-# else
- movdqa (%rsi,%rdx), %xmm1
- TOLOWER (%xmm0, %xmm1)
- pcmpistri $0x1a, %xmm1, %xmm0
-# endif
- .p2align 4
-LABEL(use_sse4_2_exit):
- jnc LABEL(strcmp_exitz_sse4_2)
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub %rcx, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- add %rcx, %rdx
- lea -16(%rdi, %r9), %rdi
- movzbl (%rdi, %rdx), %eax
- movzbl (%rsi, %rdx), %edx
- test %r8d, %r8d
- jz LABEL(use_sse4_2_ret_sse4_2)
- xchg %eax, %edx
-LABEL(use_sse4_2_ret_sse4_2):
-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
- leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rcx
- movl (%rcx,%rdx,4), %edx
- movl (%rcx,%rax,4), %eax
-# endif
-
- sub %edx, %eax
- ret
-
-LABEL(less32bytes_sse4_2):
- lea (%rdi, %rax), %rdi /* locate the exact address for first operand(rdi) */
- lea (%rsi, %rcx), %rsi /* locate the exact address for second operand(rsi) */
- test %r8d, %r8d
- jz LABEL(ret_sse4_2)
- xchg %rsi, %rdi /* recover original order according to flag(%r8d) */
-
- .p2align 4
-LABEL(ret_sse4_2):
-LABEL(less16bytes_sse4_2):
- bsf %rdx, %rdx /* find and store bit index in %rdx */
-
-# if defined USE_AS_STRNCMP || defined USE_AS_STRNCASECMP_L
- sub %rdx, %r11
- jbe LABEL(strcmp_exitz_sse4_2)
-# endif
- movzbl (%rsi, %rdx), %ecx
- movzbl (%rdi, %rdx), %eax
-
-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
- leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx
- movl (%rdx,%rcx,4), %ecx
- movl (%rdx,%rax,4), %eax
-# endif
-
- sub %ecx, %eax
- ret
-
-LABEL(strcmp_exitz_sse4_2):
- xor %eax, %eax
- ret
-
- .p2align 4
- // XXX Same as code above
-LABEL(Byte0_sse4_2):
- movzx (%rsi), %ecx
- movzx (%rdi), %eax
-
-# if defined USE_AS_STRCASECMP_L || defined USE_AS_STRNCASECMP_L
- leaq _nl_C_LC_CTYPE_tolower+128*4(%rip), %rdx
- movl (%rdx,%rcx,4), %ecx
- movl (%rdx,%rax,4), %eax
-# endif
-
- sub %ecx, %eax
- ret
- cfi_endproc
- .size STRCMP_SSE42, .-STRCMP_SSE42
-
-# undef UCLOW_reg
-# undef UCHIGH_reg
-# undef LCQWORD_reg
-# undef TOLOWER
-
- /* Put all SSE 4.2 functions together. */
- .section .rodata.sse4.2,"a",@progbits
- .p2align 3
-LABEL(unaligned_table_sse4_2):
- .int LABEL(ashr_1_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_2_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_3_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_4_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_5_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_6_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_7_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_8_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_9_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_10_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_11_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_12_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_13_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_14_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_15_sse4_2) - LABEL(unaligned_table_sse4_2)
- .int LABEL(ashr_0_sse4_2) - LABEL(unaligned_table_sse4_2)
# undef ENTRY
diff --git a/sysdeps/x86_64/multiarch/strcpy-ssse3.S b/sysdeps/x86_64/multiarch/strcpy-ssse3.S
index c4ec54cd21..b1047652d9 100644
--- a/sysdeps/x86_64/multiarch/strcpy-ssse3.S
+++ b/sysdeps/x86_64/multiarch/strcpy-ssse3.S
@@ -29,6 +29,7 @@
.section .text.ssse3,"ax",@progbits
ENTRY (STRCPY)
+
mov %rsi, %rcx
# ifdef USE_AS_STRNCPY
mov %rdx, %r8
@@ -39,7 +40,7 @@ ENTRY (STRCPY)
jz L(Exit0)
cmp $8, %r8
jbe L(StrncpyExit8Bytes)
-# endif
+# endif
cmpb $0, (%rcx)
jz L(Exit1)
cmpb $0, 1(%rcx)
@@ -56,10 +57,10 @@ ENTRY (STRCPY)
jz L(Exit7)
cmpb $0, 7(%rcx)
jz L(Exit8)
-# ifdef USE_AS_STRNCPY
+# ifdef USE_AS_STRNCPY
cmp $16, %r8
jb L(StrncpyExit15Bytes)
-# endif
+# endif
cmpb $0, 8(%rcx)
jz L(Exit9)
cmpb $0, 9(%rcx)
@@ -74,10 +75,10 @@ ENTRY (STRCPY)
jz L(Exit14)
cmpb $0, 14(%rcx)
jz L(Exit15)
-# ifdef USE_AS_STRNCPY
+# ifdef USE_AS_STRNCPY
cmp $16, %r8
je L(Exit16)
-# endif
+# endif
cmpb $0, 15(%rcx)
jz L(Exit16)
# endif
@@ -87,25 +88,15 @@ ENTRY (STRCPY)
sub $16, %r8
and $0xf, %rsi
-/* add 16 bytes rcx_shift to r8 */
+/* add 16 bytes rcx_offset to r8 */
+
add %rsi, %r8
# endif
lea 16(%rcx), %rsi
-/* Now:
- rsi = alignment_16(rcx) + rcx_shift + 16;
- rcx_shift = rcx - alignment_16(rcx)
-*/
and $-16, %rsi
-/* Now:
- rsi = alignment_16(rcx) + 16
-*/
pxor %xmm0, %xmm0
mov (%rcx), %r9
mov %r9, (%rdx)
-/*
- look if there is zero symbol in next 16 bytes of string
- from rsi to rsi + 15 and form mask in xmm0
-*/
pcmpeqb (%rsi), %xmm0
mov 8(%rcx), %r9
mov %r9, 8(%rdx)
@@ -115,10 +106,6 @@ ENTRY (STRCPY)
pmovmskb %xmm0, %rax
sub %rcx, %rsi
-/* rsi = 16 - rcx_shift */
-
-/* rax = 0: there isn't end of string from position rsi to rsi+15 */
-
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(CopyFrom1To16BytesCase2OrCase3)
@@ -128,17 +115,9 @@ ENTRY (STRCPY)
mov %rdx, %rax
lea 16(%rdx), %rdx
-/* Now:
- rdx = rdx + 16 = alignment_16(rdx) + rdx_shift + 16
-*/
and $-16, %rdx
-
-/* Now: rdx = alignment_16(rdx) + 16 */
-
sub %rdx, %rax
-/* Now: rax = rdx_shift - 16 */
-
# ifdef USE_AS_STRNCPY
add %rax, %rsi
lea -1(%rsi), %rsi
@@ -150,22 +129,11 @@ ENTRY (STRCPY)
L(ContinueCopy):
# endif
sub %rax, %rcx
-/* Now:
- case rcx_shift >= rdx_shift:
- rcx = alignment_16(rcx) + (rcx_shift - rdx_shift) + 16
- case rcx_shift < rdx_shift:
- rcx = alignment_16(rcx) + (16 + rcx_shift - rdx_shift)
-*/
mov %rcx, %rax
and $0xf, %rax
-/* Now:
- case rcx_shift >= rdx_shift: rax = rcx_shift - rdx_shift
- case rcx_shift < rdx_shift: rax = (16 + rcx_shift - rdx_shift)
- rax can be 0, 1, ..., 15
-*/
mov $0, %rsi
-/* case: rcx_shift == rdx_shift */
+/* case: rcx_offset == rdx_offset */
jz L(Align16Both)
@@ -282,10 +250,11 @@ L(Align16Both):
sub %rcx, %rax
sub %rax, %rdx
# ifdef USE_AS_STRNCPY
- lea 48+64(%r8, %rax), %r8
+ lea 112(%r8, %rax), %r8
# endif
mov $-0x40, %rsi
+ .p2align 4
L(Aligned64Loop):
movaps (%rcx), %xmm2
movaps %xmm2, %xmm4
@@ -366,7 +335,6 @@ L(Shl1Start):
jnz L(Shl1LoopExit)
palignr $1, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 31(%rcx), %xmm2
@@ -374,7 +342,7 @@ L(Shl1Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit1Case2OrCase3)
@@ -382,10 +350,9 @@ L(Shl1Start):
test %rax, %rax
jnz L(Shl1LoopExit)
- palignr $1, %xmm1, %xmm2
+ palignr $1, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 31(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -400,7 +367,6 @@ L(Shl1Start):
jnz L(Shl1LoopExit)
palignr $1, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 31(%rcx), %xmm2
@@ -408,7 +374,6 @@ L(Shl1Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit1Case2OrCase3)
@@ -416,8 +381,7 @@ L(Shl1Start):
test %rax, %rax
jnz L(Shl1LoopExit)
- palignr $1, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $1, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 31(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -432,6 +396,8 @@ L(Shl1Start):
# endif
movaps -1(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl1LoopStart):
movaps 15(%rcx), %xmm2
movaps 31(%rcx), %xmm3
@@ -465,11 +431,9 @@ L(Shl1LoopStart):
jmp L(Shl1LoopStart)
L(Shl1LoopExit):
- movaps (%rdx), %xmm6
- psrldq $15, %xmm6
+ movdqu -1(%rcx), %xmm1
mov $15, %rsi
- palignr $1, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ movdqu %xmm1, -1(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -488,7 +452,6 @@ L(Shl2Start):
jnz L(Shl2LoopExit)
palignr $2, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 30(%rcx), %xmm2
@@ -496,7 +459,7 @@ L(Shl2Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit2Case2OrCase3)
@@ -504,10 +467,9 @@ L(Shl2Start):
test %rax, %rax
jnz L(Shl2LoopExit)
- palignr $2, %xmm1, %xmm2
+ palignr $2, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 30(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -522,7 +484,6 @@ L(Shl2Start):
jnz L(Shl2LoopExit)
palignr $2, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 30(%rcx), %xmm2
@@ -530,7 +491,6 @@ L(Shl2Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit2Case2OrCase3)
@@ -538,8 +498,7 @@ L(Shl2Start):
test %rax, %rax
jnz L(Shl2LoopExit)
- palignr $2, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $2, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 30(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -554,6 +513,8 @@ L(Shl2Start):
# endif
movaps -2(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl2LoopStart):
movaps 14(%rcx), %xmm2
movaps 30(%rcx), %xmm3
@@ -587,11 +548,9 @@ L(Shl2LoopStart):
jmp L(Shl2LoopStart)
L(Shl2LoopExit):
- movaps (%rdx), %xmm6
- psrldq $14, %xmm6
+ movdqu -2(%rcx), %xmm1
mov $14, %rsi
- palignr $2, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ movdqu %xmm1, -2(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -610,7 +569,6 @@ L(Shl3Start):
jnz L(Shl3LoopExit)
palignr $3, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 29(%rcx), %xmm2
@@ -618,7 +576,7 @@ L(Shl3Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit3Case2OrCase3)
@@ -626,10 +584,9 @@ L(Shl3Start):
test %rax, %rax
jnz L(Shl3LoopExit)
- palignr $3, %xmm1, %xmm2
+ palignr $3, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 29(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -644,7 +601,6 @@ L(Shl3Start):
jnz L(Shl3LoopExit)
palignr $3, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 29(%rcx), %xmm2
@@ -652,7 +608,6 @@ L(Shl3Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit3Case2OrCase3)
@@ -660,8 +615,7 @@ L(Shl3Start):
test %rax, %rax
jnz L(Shl3LoopExit)
- palignr $3, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $3, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 29(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -676,6 +630,8 @@ L(Shl3Start):
# endif
movaps -3(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl3LoopStart):
movaps 13(%rcx), %xmm2
movaps 29(%rcx), %xmm3
@@ -709,11 +665,9 @@ L(Shl3LoopStart):
jmp L(Shl3LoopStart)
L(Shl3LoopExit):
- movaps (%rdx), %xmm6
- psrldq $13, %xmm6
+ movdqu -3(%rcx), %xmm1
mov $13, %rsi
- palignr $3, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ movdqu %xmm1, -3(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -732,7 +686,6 @@ L(Shl4Start):
jnz L(Shl4LoopExit)
palignr $4, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 28(%rcx), %xmm2
@@ -740,7 +693,7 @@ L(Shl4Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit4Case2OrCase3)
@@ -748,10 +701,9 @@ L(Shl4Start):
test %rax, %rax
jnz L(Shl4LoopExit)
- palignr $4, %xmm1, %xmm2
+ palignr $4, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 28(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -766,7 +718,6 @@ L(Shl4Start):
jnz L(Shl4LoopExit)
palignr $4, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 28(%rcx), %xmm2
@@ -774,7 +725,6 @@ L(Shl4Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit4Case2OrCase3)
@@ -782,8 +732,7 @@ L(Shl4Start):
test %rax, %rax
jnz L(Shl4LoopExit)
- palignr $4, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $4, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 28(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -798,6 +747,8 @@ L(Shl4Start):
# endif
movaps -4(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl4LoopStart):
movaps 12(%rcx), %xmm2
movaps 28(%rcx), %xmm3
@@ -831,11 +782,9 @@ L(Shl4LoopStart):
jmp L(Shl4LoopStart)
L(Shl4LoopExit):
- movaps (%rdx), %xmm6
- psrldq $12, %xmm6
+ movdqu -4(%rcx), %xmm1
mov $12, %rsi
- palignr $4, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ movdqu %xmm1, -4(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -854,7 +803,6 @@ L(Shl5Start):
jnz L(Shl5LoopExit)
palignr $5, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 27(%rcx), %xmm2
@@ -862,7 +810,7 @@ L(Shl5Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit5Case2OrCase3)
@@ -870,10 +818,9 @@ L(Shl5Start):
test %rax, %rax
jnz L(Shl5LoopExit)
- palignr $5, %xmm1, %xmm2
+ palignr $5, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 27(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -888,7 +835,6 @@ L(Shl5Start):
jnz L(Shl5LoopExit)
palignr $5, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 27(%rcx), %xmm2
@@ -896,7 +842,6 @@ L(Shl5Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit5Case2OrCase3)
@@ -904,8 +849,7 @@ L(Shl5Start):
test %rax, %rax
jnz L(Shl5LoopExit)
- palignr $5, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $5, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 27(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -920,6 +864,8 @@ L(Shl5Start):
# endif
movaps -5(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl5LoopStart):
movaps 11(%rcx), %xmm2
movaps 27(%rcx), %xmm3
@@ -953,11 +899,9 @@ L(Shl5LoopStart):
jmp L(Shl5LoopStart)
L(Shl5LoopExit):
- movaps (%rdx), %xmm6
- psrldq $11, %xmm6
+ movdqu -5(%rcx), %xmm1
mov $11, %rsi
- palignr $5, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ movdqu %xmm1, -5(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -976,7 +920,6 @@ L(Shl6Start):
jnz L(Shl6LoopExit)
palignr $6, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 26(%rcx), %xmm2
@@ -984,7 +927,7 @@ L(Shl6Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit6Case2OrCase3)
@@ -992,10 +935,9 @@ L(Shl6Start):
test %rax, %rax
jnz L(Shl6LoopExit)
- palignr $6, %xmm1, %xmm2
+ palignr $6, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 26(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1010,7 +952,6 @@ L(Shl6Start):
jnz L(Shl6LoopExit)
palignr $6, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 26(%rcx), %xmm2
@@ -1018,7 +959,6 @@ L(Shl6Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit6Case2OrCase3)
@@ -1026,8 +966,7 @@ L(Shl6Start):
test %rax, %rax
jnz L(Shl6LoopExit)
- palignr $6, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $6, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 26(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1042,6 +981,8 @@ L(Shl6Start):
# endif
movaps -6(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl6LoopStart):
movaps 10(%rcx), %xmm2
movaps 26(%rcx), %xmm3
@@ -1075,11 +1016,11 @@ L(Shl6LoopStart):
jmp L(Shl6LoopStart)
L(Shl6LoopExit):
- movaps (%rdx), %xmm6
- psrldq $10, %xmm6
+ mov (%rcx), %r9
+ mov 6(%rcx), %esi
+ mov %r9, (%rdx)
+ mov %esi, 6(%rdx)
mov $10, %rsi
- palignr $6, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1098,7 +1039,6 @@ L(Shl7Start):
jnz L(Shl7LoopExit)
palignr $7, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 25(%rcx), %xmm2
@@ -1106,7 +1046,7 @@ L(Shl7Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit7Case2OrCase3)
@@ -1114,10 +1054,9 @@ L(Shl7Start):
test %rax, %rax
jnz L(Shl7LoopExit)
- palignr $7, %xmm1, %xmm2
+ palignr $7, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 25(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1132,7 +1071,6 @@ L(Shl7Start):
jnz L(Shl7LoopExit)
palignr $7, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 25(%rcx), %xmm2
@@ -1140,7 +1078,6 @@ L(Shl7Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit7Case2OrCase3)
@@ -1148,8 +1085,7 @@ L(Shl7Start):
test %rax, %rax
jnz L(Shl7LoopExit)
- palignr $7, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $7, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 25(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1164,6 +1100,8 @@ L(Shl7Start):
# endif
movaps -7(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl7LoopStart):
movaps 9(%rcx), %xmm2
movaps 25(%rcx), %xmm3
@@ -1197,11 +1135,11 @@ L(Shl7LoopStart):
jmp L(Shl7LoopStart)
L(Shl7LoopExit):
- movaps (%rdx), %xmm6
- psrldq $9, %xmm6
+ mov (%rcx), %r9
+ mov 5(%rcx), %esi
+ mov %r9, (%rdx)
+ mov %esi, 5(%rdx)
mov $9, %rsi
- palignr $7, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1220,7 +1158,6 @@ L(Shl8Start):
jnz L(Shl8LoopExit)
palignr $8, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 24(%rcx), %xmm2
@@ -1228,7 +1165,7 @@ L(Shl8Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit8Case2OrCase3)
@@ -1236,10 +1173,9 @@ L(Shl8Start):
test %rax, %rax
jnz L(Shl8LoopExit)
- palignr $8, %xmm1, %xmm2
+ palignr $8, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 24(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1254,7 +1190,6 @@ L(Shl8Start):
jnz L(Shl8LoopExit)
palignr $8, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 24(%rcx), %xmm2
@@ -1262,7 +1197,6 @@ L(Shl8Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit8Case2OrCase3)
@@ -1270,8 +1204,7 @@ L(Shl8Start):
test %rax, %rax
jnz L(Shl8LoopExit)
- palignr $8, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $8, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 24(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1286,6 +1219,8 @@ L(Shl8Start):
# endif
movaps -8(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl8LoopStart):
movaps 8(%rcx), %xmm2
movaps 24(%rcx), %xmm3
@@ -1319,11 +1254,9 @@ L(Shl8LoopStart):
jmp L(Shl8LoopStart)
L(Shl8LoopExit):
- movaps (%rdx), %xmm6
- psrldq $8, %xmm6
+ mov (%rcx), %r9
mov $8, %rsi
- palignr $8, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, (%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1342,7 +1275,6 @@ L(Shl9Start):
jnz L(Shl9LoopExit)
palignr $9, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 23(%rcx), %xmm2
@@ -1350,7 +1282,7 @@ L(Shl9Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit9Case2OrCase3)
@@ -1358,10 +1290,9 @@ L(Shl9Start):
test %rax, %rax
jnz L(Shl9LoopExit)
- palignr $9, %xmm1, %xmm2
+ palignr $9, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 23(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1376,7 +1307,6 @@ L(Shl9Start):
jnz L(Shl9LoopExit)
palignr $9, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 23(%rcx), %xmm2
@@ -1384,7 +1314,6 @@ L(Shl9Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit9Case2OrCase3)
@@ -1392,8 +1321,7 @@ L(Shl9Start):
test %rax, %rax
jnz L(Shl9LoopExit)
- palignr $9, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $9, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 23(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1408,6 +1336,8 @@ L(Shl9Start):
# endif
movaps -9(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl9LoopStart):
movaps 7(%rcx), %xmm2
movaps 23(%rcx), %xmm3
@@ -1441,11 +1371,9 @@ L(Shl9LoopStart):
jmp L(Shl9LoopStart)
L(Shl9LoopExit):
- movaps (%rdx), %xmm6
- psrldq $7, %xmm6
+ mov -1(%rcx), %r9
mov $7, %rsi
- palignr $9, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, -1(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1464,7 +1392,6 @@ L(Shl10Start):
jnz L(Shl10LoopExit)
palignr $10, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 22(%rcx), %xmm2
@@ -1472,7 +1399,7 @@ L(Shl10Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit10Case2OrCase3)
@@ -1480,10 +1407,9 @@ L(Shl10Start):
test %rax, %rax
jnz L(Shl10LoopExit)
- palignr $10, %xmm1, %xmm2
+ palignr $10, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 22(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1498,7 +1424,6 @@ L(Shl10Start):
jnz L(Shl10LoopExit)
palignr $10, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 22(%rcx), %xmm2
@@ -1506,7 +1431,6 @@ L(Shl10Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit10Case2OrCase3)
@@ -1514,8 +1438,7 @@ L(Shl10Start):
test %rax, %rax
jnz L(Shl10LoopExit)
- palignr $10, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $10, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 22(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1530,6 +1453,8 @@ L(Shl10Start):
# endif
movaps -10(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl10LoopStart):
movaps 6(%rcx), %xmm2
movaps 22(%rcx), %xmm3
@@ -1563,11 +1488,9 @@ L(Shl10LoopStart):
jmp L(Shl10LoopStart)
L(Shl10LoopExit):
- movaps (%rdx), %xmm6
- psrldq $6, %xmm6
+ mov -2(%rcx), %r9
mov $6, %rsi
- palignr $10, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, -2(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1586,7 +1509,6 @@ L(Shl11Start):
jnz L(Shl11LoopExit)
palignr $11, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 21(%rcx), %xmm2
@@ -1594,7 +1516,7 @@ L(Shl11Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit11Case2OrCase3)
@@ -1602,10 +1524,9 @@ L(Shl11Start):
test %rax, %rax
jnz L(Shl11LoopExit)
- palignr $11, %xmm1, %xmm2
+ palignr $11, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 21(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1620,7 +1541,6 @@ L(Shl11Start):
jnz L(Shl11LoopExit)
palignr $11, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 21(%rcx), %xmm2
@@ -1628,7 +1548,6 @@ L(Shl11Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit11Case2OrCase3)
@@ -1636,8 +1555,7 @@ L(Shl11Start):
test %rax, %rax
jnz L(Shl11LoopExit)
- palignr $11, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $11, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 21(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1652,6 +1570,8 @@ L(Shl11Start):
# endif
movaps -11(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl11LoopStart):
movaps 5(%rcx), %xmm2
movaps 21(%rcx), %xmm3
@@ -1685,11 +1605,9 @@ L(Shl11LoopStart):
jmp L(Shl11LoopStart)
L(Shl11LoopExit):
- movaps (%rdx), %xmm6
- psrldq $5, %xmm6
+ mov -3(%rcx), %r9
mov $5, %rsi
- palignr $11, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, -3(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1708,7 +1626,6 @@ L(Shl12Start):
jnz L(Shl12LoopExit)
palignr $12, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 20(%rcx), %xmm2
@@ -1716,7 +1633,7 @@ L(Shl12Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit12Case2OrCase3)
@@ -1724,10 +1641,9 @@ L(Shl12Start):
test %rax, %rax
jnz L(Shl12LoopExit)
- palignr $12, %xmm1, %xmm2
+ palignr $12, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 20(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1742,7 +1658,6 @@ L(Shl12Start):
jnz L(Shl12LoopExit)
palignr $12, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 20(%rcx), %xmm2
@@ -1750,7 +1665,6 @@ L(Shl12Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit12Case2OrCase3)
@@ -1758,8 +1672,7 @@ L(Shl12Start):
test %rax, %rax
jnz L(Shl12LoopExit)
- palignr $12, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $12, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 20(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1774,6 +1687,8 @@ L(Shl12Start):
# endif
movaps -12(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl12LoopStart):
movaps 4(%rcx), %xmm2
movaps 20(%rcx), %xmm3
@@ -1807,11 +1722,9 @@ L(Shl12LoopStart):
jmp L(Shl12LoopStart)
L(Shl12LoopExit):
- movaps (%rdx), %xmm6
- psrldq $4, %xmm6
+ mov (%rcx), %r9d
mov $4, %rsi
- palignr $12, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, (%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1830,7 +1743,6 @@ L(Shl13Start):
jnz L(Shl13LoopExit)
palignr $13, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 19(%rcx), %xmm2
@@ -1838,7 +1750,7 @@ L(Shl13Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit13Case2OrCase3)
@@ -1846,10 +1758,9 @@ L(Shl13Start):
test %rax, %rax
jnz L(Shl13LoopExit)
- palignr $13, %xmm1, %xmm2
+ palignr $13, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 19(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1864,7 +1775,6 @@ L(Shl13Start):
jnz L(Shl13LoopExit)
palignr $13, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 19(%rcx), %xmm2
@@ -1872,7 +1782,6 @@ L(Shl13Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit13Case2OrCase3)
@@ -1880,8 +1789,7 @@ L(Shl13Start):
test %rax, %rax
jnz L(Shl13LoopExit)
- palignr $13, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $13, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 19(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -1896,6 +1804,8 @@ L(Shl13Start):
# endif
movaps -13(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl13LoopStart):
movaps 3(%rcx), %xmm2
movaps 19(%rcx), %xmm3
@@ -1929,11 +1839,9 @@ L(Shl13LoopStart):
jmp L(Shl13LoopStart)
L(Shl13LoopExit):
- movaps (%rdx), %xmm6
- psrldq $3, %xmm6
+ mov -1(%rcx), %r9d
mov $3, %rsi
- palignr $13, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, -1(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -1952,7 +1860,6 @@ L(Shl14Start):
jnz L(Shl14LoopExit)
palignr $14, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 18(%rcx), %xmm2
@@ -1960,7 +1867,7 @@ L(Shl14Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit14Case2OrCase3)
@@ -1968,10 +1875,9 @@ L(Shl14Start):
test %rax, %rax
jnz L(Shl14LoopExit)
- palignr $14, %xmm1, %xmm2
+ palignr $14, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 18(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -1986,7 +1892,6 @@ L(Shl14Start):
jnz L(Shl14LoopExit)
palignr $14, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 18(%rcx), %xmm2
@@ -1994,7 +1899,6 @@ L(Shl14Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit14Case2OrCase3)
@@ -2002,8 +1906,7 @@ L(Shl14Start):
test %rax, %rax
jnz L(Shl14LoopExit)
- palignr $14, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $14, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 18(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -2018,6 +1921,8 @@ L(Shl14Start):
# endif
movaps -14(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl14LoopStart):
movaps 2(%rcx), %xmm2
movaps 18(%rcx), %xmm3
@@ -2051,11 +1956,9 @@ L(Shl14LoopStart):
jmp L(Shl14LoopStart)
L(Shl14LoopExit):
- movaps (%rdx), %xmm6
- psrldq $2, %xmm6
+ mov -2(%rcx), %r9d
mov $2, %rsi
- palignr $14, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, -2(%rdx)
jmp L(CopyFrom1To16Bytes)
.p2align 4
@@ -2074,7 +1977,6 @@ L(Shl15Start):
jnz L(Shl15LoopExit)
palignr $15, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 17(%rcx), %xmm2
@@ -2082,7 +1984,7 @@ L(Shl15Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
+ movaps %xmm2, %xmm1
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit15Case2OrCase3)
@@ -2090,10 +1992,9 @@ L(Shl15Start):
test %rax, %rax
jnz L(Shl15LoopExit)
- palignr $15, %xmm1, %xmm2
+ palignr $15, %xmm3, %xmm2
movaps %xmm2, (%rdx)
movaps 17(%rcx), %xmm2
- movaps %xmm3, %xmm1
pcmpeqb %xmm2, %xmm0
lea 16(%rdx), %rdx
@@ -2108,7 +2009,6 @@ L(Shl15Start):
jnz L(Shl15LoopExit)
palignr $15, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 17(%rcx), %xmm2
@@ -2116,7 +2016,6 @@ L(Shl15Start):
lea 16(%rdx), %rdx
pmovmskb %xmm0, %rax
lea 16(%rcx), %rcx
- movaps %xmm2, %xmm3
# ifdef USE_AS_STRNCPY
sub $16, %r8
jbe L(StrncpyExit15Case2OrCase3)
@@ -2124,8 +2023,7 @@ L(Shl15Start):
test %rax, %rax
jnz L(Shl15LoopExit)
- palignr $15, %xmm1, %xmm2
- movaps %xmm3, %xmm1
+ palignr $15, %xmm3, %xmm2
movaps %xmm2, (%rdx)
lea 17(%rcx), %rcx
lea 16(%rdx), %rdx
@@ -2140,6 +2038,8 @@ L(Shl15Start):
# endif
movaps -15(%rcx), %xmm1
+/* 64 bytes loop */
+ .p2align 4
L(Shl15LoopStart):
movaps 1(%rcx), %xmm2
movaps 17(%rcx), %xmm3
@@ -2173,16 +2073,15 @@ L(Shl15LoopStart):
jmp L(Shl15LoopStart)
L(Shl15LoopExit):
- movaps (%rdx), %xmm6
- psrldq $1, %xmm6
+ mov -3(%rcx), %r9d
mov $1, %rsi
- palignr $15, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, -3(%rdx)
# ifdef USE_AS_STRCAT
jmp L(CopyFrom1To16Bytes)
# endif
# ifndef USE_AS_STRCAT
+
.p2align 4
L(CopyFrom1To16Bytes):
# ifdef USE_AS_STRNCPY
@@ -2463,7 +2362,7 @@ L(Exit4):
# ifdef USE_AS_STPCPY
cmpb $1, (%rax)
sbb $-1, %rax
-# endif
+# endif
# endif
ret
@@ -2485,7 +2384,7 @@ L(Exit5):
# ifdef USE_AS_STPCPY
cmpb $1, (%rax)
sbb $-1, %rax
-# endif
+# endif
# endif
ret
@@ -2507,7 +2406,7 @@ L(Exit6):
# ifdef USE_AS_STPCPY
cmpb $1, (%rax)
sbb $-1, %rax
-# endif
+# endif
# endif
ret
@@ -2617,7 +2516,7 @@ L(Exit12):
# ifdef USE_AS_STPCPY
cmpb $1, (%rax)
sbb $-1, %rax
-# endif
+# endif
# endif
ret
@@ -2955,11 +2854,10 @@ L(StrncpyExit8Bytes):
ret
# endif
-
# endif
# ifdef USE_AS_STRNCPY
-
+ .p2align 4
L(StrncpyLeaveCase2OrCase3):
test %rax, %rax
jnz L(Aligned64LeaveCase2)
@@ -3014,710 +2912,639 @@ L(Aligned64LeaveCase2):
lea -16(%r8), %r8
jmp L(CopyFrom1To16BytesCase2)
/*--------------------------------------------------*/
+ .p2align 4
L(StrncpyExit1Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $15, %xmm6
+ movdqu -1(%rcx), %xmm0
+ movdqu %xmm0, -1(%rdx)
mov $15, %rsi
- palignr $1, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit2Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $14, %xmm6
+ movdqu -2(%rcx), %xmm0
+ movdqu %xmm0, -2(%rdx)
mov $14, %rsi
- palignr $2, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit3Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $13, %xmm6
+ movdqu -3(%rcx), %xmm0
+ movdqu %xmm0, -3(%rdx)
mov $13, %rsi
- palignr $3, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit4Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $12, %xmm6
+ movdqu -4(%rcx), %xmm0
+ movdqu %xmm0, -4(%rdx)
mov $12, %rsi
- palignr $4, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit5Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $11, %xmm6
+ movdqu -5(%rcx), %xmm0
+ movdqu %xmm0, -5(%rdx)
mov $11, %rsi
- palignr $5, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit6Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $10, %xmm6
- mov $10, %rsi
- palignr $6, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov (%rcx), %rsi
+ mov 6(%rcx), %r9d
+ mov %r9d, 6(%rdx)
+ mov %rsi, (%rdx)
test %rax, %rax
+ mov $10, %rsi
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit7Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $9, %xmm6
- mov $9, %rsi
- palignr $7, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov (%rcx), %rsi
+ mov 5(%rcx), %r9d
+ mov %r9d, 5(%rdx)
+ mov %rsi, (%rdx)
test %rax, %rax
+ mov $9, %rsi
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit8Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $8, %xmm6
+ mov (%rcx), %r9
mov $8, %rsi
- palignr $8, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, (%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit9Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $7, %xmm6
+ mov -1(%rcx), %r9
mov $7, %rsi
- palignr $9, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, -1(%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit10Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $6, %xmm6
+ mov -2(%rcx), %r9
mov $6, %rsi
- palignr $10, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, -2(%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit11Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $5, %xmm6
+ mov -3(%rcx), %r9
mov $5, %rsi
- palignr $11, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9, -3(%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit12Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $4, %xmm6
+ mov (%rcx), %r9d
mov $4, %rsi
- palignr $12, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, (%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit13Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $3, %xmm6
+ mov -1(%rcx), %r9d
mov $3, %rsi
- palignr $13, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, -1(%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit14Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $2, %xmm6
+ mov -2(%rcx), %r9d
mov $2, %rsi
- palignr $14, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, -2(%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyExit15Case2OrCase3):
- movaps (%rdx), %xmm6
- psrldq $1, %xmm6
+ mov -3(%rcx), %r9d
mov $1, %rsi
- palignr $15, %xmm1, %xmm6
- movaps %xmm6, (%rdx)
+ mov %r9d, -3(%rdx)
test %rax, %rax
jnz L(CopyFrom1To16BytesCase2)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave1):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit1)
palignr $1, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 31(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit1)
- palignr $1, %xmm1, %xmm2
+ palignr $1, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 31+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit1)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit1)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit1):
- movaps (%rdx, %rsi), %xmm6
- psrldq $15, %xmm6
- palignr $1, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 15(%rsi), %rsi
+ lea 15(%rdx, %rsi), %rdx
+ lea 15(%rcx, %rsi), %rcx
+ mov -15(%rcx), %rsi
+ mov -8(%rcx), %rax
+ mov %rsi, -15(%rdx)
+ mov %rax, -8(%rdx)
+ xor %rsi, %rsi
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave2):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit2)
palignr $2, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 30(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit2)
- palignr $2, %xmm1, %xmm2
+ palignr $2, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 30+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit2)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit2)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit2):
- movaps (%rdx, %rsi), %xmm6
- psrldq $14, %xmm6
- palignr $2, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 14(%rsi), %rsi
+ lea 14(%rdx, %rsi), %rdx
+ lea 14(%rcx, %rsi), %rcx
+ mov -14(%rcx), %rsi
+ mov -8(%rcx), %rax
+ mov %rsi, -14(%rdx)
+ mov %rax, -8(%rdx)
+ xor %rsi, %rsi
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave3):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit3)
palignr $3, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 29(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit3)
- palignr $3, %xmm1, %xmm2
+ palignr $3, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 29+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit3)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit3)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit3):
- movaps (%rdx, %rsi), %xmm6
- psrldq $13, %xmm6
- palignr $3, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 13(%rsi), %rsi
+ lea 13(%rdx, %rsi), %rdx
+ lea 13(%rcx, %rsi), %rcx
+ mov -13(%rcx), %rsi
+ mov -8(%rcx), %rax
+ mov %rsi, -13(%rdx)
+ mov %rax, -8(%rdx)
+ xor %rsi, %rsi
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave4):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit4)
palignr $4, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 28(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit4)
- palignr $4, %xmm1, %xmm2
+ palignr $4, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 28+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit4)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit4)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit4):
- movaps (%rdx, %rsi), %xmm6
- psrldq $12, %xmm6
- palignr $4, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 12(%rsi), %rsi
+ lea 12(%rdx, %rsi), %rdx
+ lea 12(%rcx, %rsi), %rcx
+ mov -12(%rcx), %rsi
+ mov -4(%rcx), %eax
+ mov %rsi, -12(%rdx)
+ mov %eax, -4(%rdx)
+ xor %rsi, %rsi
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave5):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit5)
palignr $5, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 27(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit5)
- palignr $5, %xmm1, %xmm2
+ palignr $5, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 27+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit5)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit5)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit5):
- movaps (%rdx, %rsi), %xmm6
- psrldq $11, %xmm6
- palignr $5, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 11(%rsi), %rsi
+ lea 11(%rdx, %rsi), %rdx
+ lea 11(%rcx, %rsi), %rcx
+ mov -11(%rcx), %rsi
+ mov -4(%rcx), %eax
+ mov %rsi, -11(%rdx)
+ mov %eax, -4(%rdx)
+ xor %rsi, %rsi
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave6):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit6)
palignr $6, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 26(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit6)
- palignr $6, %xmm1, %xmm2
+ palignr $6, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 26+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit6)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit6)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit6):
- movaps (%rdx, %rsi), %xmm6
- psrldq $10, %xmm6
- palignr $6, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 10(%rsi), %rsi
+ lea 10(%rdx, %rsi), %rdx
+ lea 10(%rcx, %rsi), %rcx
+ mov -10(%rcx), %rsi
+ movw -2(%rcx), %ax
+ mov %rsi, -10(%rdx)
+ movw %ax, -2(%rdx)
+ xor %rsi, %rsi
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave7):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit7)
palignr $7, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 25(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit7)
- palignr $7, %xmm1, %xmm2
+ palignr $7, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 25+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit7)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit7)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit7):
- movaps (%rdx, %rsi), %xmm6
- psrldq $9, %xmm6
- palignr $7, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 9(%rsi), %rsi
+ lea 9(%rdx, %rsi), %rdx
+ lea 9(%rcx, %rsi), %rcx
+ mov -9(%rcx), %rsi
+ movb -1(%rcx), %ah
+ mov %rsi, -9(%rdx)
+ movb %ah, -1(%rdx)
+ xor %rsi, %rsi
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave8):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit8)
palignr $8, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 24(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit8)
- palignr $8, %xmm1, %xmm2
+ palignr $8, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 24+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit8)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit8)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit8):
- movaps (%rdx, %rsi), %xmm6
- psrldq $8, %xmm6
- palignr $8, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 8(%rsi), %rsi
+ lea 8(%rdx, %rsi), %rdx
+ lea 8(%rcx, %rsi), %rcx
+ mov -8(%rcx), %rax
+ xor %rsi, %rsi
+ mov %rax, -8(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave9):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit9)
palignr $9, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 23(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit9)
- palignr $9, %xmm1, %xmm2
+ palignr $9, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 23+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit9)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit9)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit9):
- movaps (%rdx, %rsi), %xmm6
- psrldq $7, %xmm6
- palignr $9, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 7(%rsi), %rsi
+ lea 7(%rdx, %rsi), %rdx
+ lea 7(%rcx, %rsi), %rcx
+ mov -8(%rcx), %rax
+ xor %rsi, %rsi
+ mov %rax, -8(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave10):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit10)
palignr $10, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 22(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit10)
- palignr $10, %xmm1, %xmm2
+ palignr $10, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 22+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit10)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit10)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit10):
- movaps (%rdx, %rsi), %xmm6
- psrldq $6, %xmm6
- palignr $10, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 6(%rsi), %rsi
+ lea 6(%rdx, %rsi), %rdx
+ lea 6(%rcx, %rsi), %rcx
+ mov -8(%rcx), %rax
+ xor %rsi, %rsi
+ mov %rax, -8(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave11):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit11)
palignr $11, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 21(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit11)
- palignr $11, %xmm1, %xmm2
+ palignr $11, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 21+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit11)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit11)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit11):
- movaps (%rdx, %rsi), %xmm6
- psrldq $5, %xmm6
- palignr $11, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 5(%rsi), %rsi
+ lea 5(%rdx, %rsi), %rdx
+ lea 5(%rcx, %rsi), %rcx
+ mov -8(%rcx), %rax
+ xor %rsi, %rsi
+ mov %rax, -8(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave12):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit12)
palignr $12, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 20(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit12)
- palignr $12, %xmm1, %xmm2
+ palignr $12, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 20+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit12)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit12)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit12):
- movaps (%rdx, %rsi), %xmm6
- psrldq $4, %xmm6
- palignr $12, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 4(%rsi), %rsi
+ lea 4(%rdx, %rsi), %rdx
+ lea 4(%rcx, %rsi), %rcx
+ mov -4(%rcx), %eax
+ xor %rsi, %rsi
+ mov %eax, -4(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave13):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit13)
palignr $13, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 19(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit13)
- palignr $13, %xmm1, %xmm2
+ palignr $13, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 19+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit13)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit13)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit13):
- movaps (%rdx, %rsi), %xmm6
- psrldq $3, %xmm6
- palignr $13, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 3(%rsi), %rsi
+ lea 3(%rdx, %rsi), %rdx
+ lea 3(%rcx, %rsi), %rcx
+ mov -4(%rcx), %eax
+ xor %rsi, %rsi
+ mov %eax, -4(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave14):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit14)
palignr $14, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 18(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit14)
- palignr $14, %xmm1, %xmm2
+ palignr $14, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 18+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit14)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit14)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit14):
- movaps (%rdx, %rsi), %xmm6
- psrldq $2, %xmm6
- palignr $14, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 2(%rsi), %rsi
+ lea 2(%rdx, %rsi), %rdx
+ lea 2(%rcx, %rsi), %rcx
+ movw -2(%rcx), %ax
+ xor %rsi, %rsi
+ movw %ax, -2(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+ .p2align 4
L(StrncpyLeave15):
movaps %xmm2, %xmm3
add $48, %r8
jle L(StrncpyExit15)
palignr $15, %xmm1, %xmm2
- movaps %xmm3, %xmm1
movaps %xmm2, (%rdx)
movaps 17(%rcx), %xmm2
lea 16(%rsi), %rsi
- movaps %xmm2, %xmm3
sub $16, %r8
jbe L(StrncpyExit15)
- palignr $15, %xmm1, %xmm2
+ palignr $15, %xmm3, %xmm2
movaps %xmm2, 16(%rdx)
- movaps 17+16(%rcx), %xmm2
- movaps %xmm3, %xmm1
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit15)
- movaps %xmm2, %xmm1
movaps %xmm4, 32(%rdx)
lea 16(%rsi), %rsi
sub $16, %r8
jbe L(StrncpyExit15)
- movaps %xmm7, %xmm1
movaps %xmm5, 48(%rdx)
lea 16(%rsi), %rsi
lea -16(%r8), %r8
L(StrncpyExit15):
- movaps (%rdx, %rsi), %xmm6
- psrldq $1, %xmm6
- palignr $15, %xmm1, %xmm6
- movaps %xmm6, (%rdx, %rsi)
- lea 1(%rsi), %rsi
+ lea 1(%rdx, %rsi), %rdx
+ lea 1(%rcx, %rsi), %rcx
+ movb -1(%rcx), %ah
+ xor %rsi, %rsi
+ movb %ah, -1(%rdx)
jmp L(CopyFrom1To16BytesCase3)
+
# endif
# ifndef USE_AS_STRCAT
END (STRCPY)
diff --git a/sysdeps/x86_64/multiarch/strlen-no-bsf.S b/sysdeps/x86_64/multiarch/strlen-no-bsf.S
deleted file mode 100644
index a430e5fa0f..0000000000
--- a/sysdeps/x86_64/multiarch/strlen-no-bsf.S
+++ /dev/null
@@ -1,313 +0,0 @@
-/* strlen SSE2 without bsf
- Copyright (C) 2010, 2011 Free Software Foundation, Inc.
- Contributed by Intel Corporation.
- 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. */
-
-#if (defined SHARED || defined USE_AS_STRCAT) && !defined NOT_IN_libc
-
-# ifndef USE_AS_STRCAT
-
-# include <sysdep.h>
-
-# define RETURN ret
-
- atom_text_section
-ENTRY (__strlen_no_bsf)
-# endif
- xor %eax, %eax
- cmpb $0, (%rdi)
- jz L(exit_tail0)
- cmpb $0, 1(%rdi)
- jz L(exit_tail1)
- cmpb $0, 2(%rdi)
- jz L(exit_tail2)
- cmpb $0, 3(%rdi)
- jz L(exit_tail3)
- cmpb $0, 4(%rdi)
- jz L(exit_tail4)
- cmpb $0, 5(%rdi)
- jz L(exit_tail5)
- cmpb $0, 6(%rdi)
- jz L(exit_tail6)
- cmpb $0, 7(%rdi)
- jz L(exit_tail7)
- cmpb $0, 8(%rdi)
- jz L(exit_tail8)
- cmpb $0, 9(%rdi)
- jz L(exit_tail9)
- cmpb $0, 10(%rdi)
- jz L(exit_tail10)
- cmpb $0, 11(%rdi)
- jz L(exit_tail11)
- cmpb $0, 12(%rdi)
- jz L(exit_tail12)
- cmpb $0, 13(%rdi)
- jz L(exit_tail13)
- cmpb $0, 14(%rdi)
- jz L(exit_tail14)
- cmpb $0, 15(%rdi)
- jz L(exit_tail15)
- pxor %xmm0, %xmm0
- mov %rdi, %rcx
- mov %rdi, %rax
- and $-16, %rax
- add $16, %rax
- add $16, %rcx
-
- pcmpeqb (%rax), %xmm0
- pmovmskb %xmm0, %edx
- pxor %xmm1, %xmm1
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm1
- pmovmskb %xmm1, %edx
- pxor %xmm2, %xmm2
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
-
- pcmpeqb (%rax), %xmm2
- pmovmskb %xmm2, %edx
- pxor %xmm3, %xmm3
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm3
- pmovmskb %xmm3, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm0
- pmovmskb %xmm0, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm1
- pmovmskb %xmm1, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm2
- pmovmskb %xmm2, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm3
- pmovmskb %xmm3, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm0
- pmovmskb %xmm0, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm1
- pmovmskb %xmm1, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm2
- pmovmskb %xmm2, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm3
- pmovmskb %xmm3, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm0
- pmovmskb %xmm0, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm1
- pmovmskb %xmm1, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm2
- pmovmskb %xmm2, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- pcmpeqb (%rax), %xmm3
- pmovmskb %xmm3, %edx
- test %edx, %edx
- lea 16(%rax), %rax
- jnz L(exit)
-
- and $-0x40, %rax
-L(aligned_64):
- pcmpeqb (%rax), %xmm0
- pcmpeqb 16(%rax), %xmm1
- pcmpeqb 32(%rax), %xmm2
- pcmpeqb 48(%rax), %xmm3
- pmovmskb %xmm0, %edx
- pmovmskb %xmm1, %r11d
- pmovmskb %xmm2, %r10d
- pmovmskb %xmm3, %r9d
- or %edx, %r9d
- or %r11d, %r9d
- or %r10d, %r9d
- lea 64(%rax), %rax
- jz L(aligned_64)
-
- test %edx, %edx
- jnz L(aligned_64_exit_16)
- test %r11d, %r11d
- jnz L(aligned_64_exit_32)
- test %r10d, %r10d
- jnz L(aligned_64_exit_48)
-L(aligned_64_exit_64):
- pmovmskb %xmm3, %edx
- jmp L(aligned_64_exit)
-L(aligned_64_exit_48):
- lea -16(%rax), %rax
- mov %r10d, %edx
- jmp L(aligned_64_exit)
-L(aligned_64_exit_32):
- lea -32(%rax), %rax
- mov %r11d, %edx
- jmp L(aligned_64_exit)
-L(aligned_64_exit_16):
- lea -48(%rax), %rax
-L(aligned_64_exit):
-L(exit):
- sub %rcx, %rax
- test %dl, %dl
- jz L(exit_high)
- test $0x01, %dl
- jnz L(exit_tail0)
-
- test $0x02, %dl
- jnz L(exit_tail1)
-
- test $0x04, %dl
- jnz L(exit_tail2)
-
- test $0x08, %dl
- jnz L(exit_tail3)
-
- test $0x10, %dl
- jnz L(exit_tail4)
-
- test $0x20, %dl
- jnz L(exit_tail5)
-
- test $0x40, %dl
- jnz L(exit_tail6)
- add $7, %eax
-L(exit_tail0):
- RETURN
-
-L(exit_high):
- add $8, %eax
- test $0x01, %dh
- jnz L(exit_tail0)
-
- test $0x02, %dh
- jnz L(exit_tail1)
-
- test $0x04, %dh
- jnz L(exit_tail2)
-
- test $0x08, %dh
- jnz L(exit_tail3)
-
- test $0x10, %dh
- jnz L(exit_tail4)
-
- test $0x20, %dh
- jnz L(exit_tail5)
-
- test $0x40, %dh
- jnz L(exit_tail6)
- add $7, %eax
- RETURN
- .p2align 4
-L(exit_tail1):
- add $1, %eax
- RETURN
-
-L(exit_tail2):
- add $2, %eax
- RETURN
-
-L(exit_tail3):
- add $3, %eax
- RETURN
-
-L(exit_tail4):
- add $4, %eax
- RETURN
-
-L(exit_tail5):
- add $5, %eax
- RETURN
-L(exit_tail6):
- add $6, %eax
- RETURN
-L(exit_tail7):
- add $7, %eax
- RETURN
-L(exit_tail8):
- add $8, %eax
- RETURN
-L(exit_tail9):
- add $9, %eax
- RETURN
-L(exit_tail10):
- add $10, %eax
- RETURN
-L(exit_tail11):
- add $11, %eax
- RETURN
-L(exit_tail12):
- add $12, %eax
- RETURN
-L(exit_tail13):
- add $13, %eax
- RETURN
-L(exit_tail14):
- add $14, %eax
- RETURN
-L(exit_tail15):
- add $15, %eax
-# ifndef USE_AS_STRCAT
- RETURN
-END (__strlen_no_bsf)
-# endif
-#endif
diff --git a/sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S b/sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S
new file mode 100644
index 0000000000..b2d1a9e4b5
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/strlen-sse2-no-bsf.S
@@ -0,0 +1,686 @@
+/* strlen SSE2 without bsf
+ Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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. */
+
+/* only for strlen case we don't use optimized version for STATIC build just for SHARED */
+
+#if (defined SHARED || defined USE_AS_STRCAT || defined USE_AS_STRNLEN) && !defined NOT_IN_libc
+
+# ifndef USE_AS_STRCAT
+
+# include <sysdep.h>
+
+# define RETURN ret
+
+# ifndef STRLEN
+# define STRLEN __strlen_sse2_no_bsf
+# endif
+
+ atom_text_section
+ENTRY (STRLEN)
+# endif
+ xor %eax, %eax
+# ifdef USE_AS_STRNLEN
+ mov %rsi, %r8
+ sub $4, %rsi
+ jbe L(len_less4_prolog)
+# endif
+ cmpb $0, (%rdi)
+ jz L(exit_tail0)
+ cmpb $0, 1(%rdi)
+ jz L(exit_tail1)
+ cmpb $0, 2(%rdi)
+ jz L(exit_tail2)
+ cmpb $0, 3(%rdi)
+ jz L(exit_tail3)
+
+# ifdef USE_AS_STRNLEN
+ sub $4, %rsi
+ jbe L(len_less8_prolog)
+# endif
+
+ cmpb $0, 4(%rdi)
+ jz L(exit_tail4)
+ cmpb $0, 5(%rdi)
+ jz L(exit_tail5)
+ cmpb $0, 6(%rdi)
+ jz L(exit_tail6)
+ cmpb $0, 7(%rdi)
+ jz L(exit_tail7)
+
+# ifdef USE_AS_STRNLEN
+ sub $4, %rsi
+ jbe L(len_less12_prolog)
+# endif
+
+ cmpb $0, 8(%rdi)
+ jz L(exit_tail8)
+ cmpb $0, 9(%rdi)
+ jz L(exit_tail9)
+ cmpb $0, 10(%rdi)
+ jz L(exit_tail10)
+ cmpb $0, 11(%rdi)
+ jz L(exit_tail11)
+
+# ifdef USE_AS_STRNLEN
+ sub $4, %rsi
+ jbe L(len_less16_prolog)
+# endif
+
+ cmpb $0, 12(%rdi)
+ jz L(exit_tail12)
+ cmpb $0, 13(%rdi)
+ jz L(exit_tail13)
+ cmpb $0, 14(%rdi)
+ jz L(exit_tail14)
+ cmpb $0, 15(%rdi)
+ jz L(exit_tail15)
+ pxor %xmm0, %xmm0
+ lea 16(%rdi), %rcx
+ lea 16(%rdi), %rax
+ and $-16, %rax
+
+# ifdef USE_AS_STRNLEN
+ and $15, %rdi
+ add %rdi, %rsi
+ sub $64, %rsi
+ jbe L(len_less64)
+# endif
+
+ pcmpeqb (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ pxor %xmm1, %xmm1
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ pxor %xmm2, %xmm2
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm2
+ pmovmskb %xmm2, %edx
+ pxor %xmm3, %xmm3
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+# ifdef USE_AS_STRNLEN
+ sub $64, %rsi
+ jbe L(len_less64)
+# endif
+
+ pcmpeqb (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm2
+ pmovmskb %xmm2, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+# ifdef USE_AS_STRNLEN
+ sub $64, %rsi
+ jbe L(len_less64)
+# endif
+
+ pcmpeqb (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm2
+ pmovmskb %xmm2, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+# ifdef USE_AS_STRNLEN
+ sub $64, %rsi
+ jbe L(len_less64)
+# endif
+
+ pcmpeqb (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm2
+ pmovmskb %xmm2, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqb (%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+# ifdef USE_AS_STRNLEN
+ mov %rax, %rdx
+ and $63, %rdx
+ add %rdx, %rsi
+# endif
+
+ and $-0x40, %rax
+
+ .p2align 4
+L(aligned_64):
+# ifdef USE_AS_STRNLEN
+ sub $64, %rsi
+ jbe L(len_less64)
+# endif
+ pcmpeqb (%rax), %xmm0
+ pcmpeqb 16(%rax), %xmm1
+ pcmpeqb 32(%rax), %xmm2
+ pcmpeqb 48(%rax), %xmm3
+ pmovmskb %xmm0, %edx
+ pmovmskb %xmm1, %r11d
+ pmovmskb %xmm2, %r10d
+ pmovmskb %xmm3, %r9d
+ or %edx, %r9d
+ or %r11d, %r9d
+ or %r10d, %r9d
+ lea 64(%rax), %rax
+ jz L(aligned_64)
+
+ test %edx, %edx
+ jnz L(aligned_64_exit_16)
+ test %r11d, %r11d
+ jnz L(aligned_64_exit_32)
+ test %r10d, %r10d
+ jnz L(aligned_64_exit_48)
+L(aligned_64_exit_64):
+ pmovmskb %xmm3, %edx
+ jmp L(aligned_64_exit)
+L(aligned_64_exit_48):
+ lea -16(%rax), %rax
+ mov %r10d, %edx
+ jmp L(aligned_64_exit)
+L(aligned_64_exit_32):
+ lea -32(%rax), %rax
+ mov %r11d, %edx
+ jmp L(aligned_64_exit)
+L(aligned_64_exit_16):
+ lea -48(%rax), %rax
+L(aligned_64_exit):
+L(exit):
+ sub %rcx, %rax
+ test %dl, %dl
+ jz L(exit_high)
+ test $0x01, %dl
+ jnz L(exit_tail0)
+
+ test $0x02, %dl
+ jnz L(exit_tail1)
+
+ test $0x04, %dl
+ jnz L(exit_tail2)
+
+ test $0x08, %dl
+ jnz L(exit_tail3)
+
+ test $0x10, %dl
+ jnz L(exit_tail4)
+
+ test $0x20, %dl
+ jnz L(exit_tail5)
+
+ test $0x40, %dl
+ jnz L(exit_tail6)
+ add $7, %eax
+L(exit_tail0):
+ RETURN
+
+L(exit_high):
+ add $8, %eax
+ test $0x01, %dh
+ jnz L(exit_tail0)
+
+ test $0x02, %dh
+ jnz L(exit_tail1)
+
+ test $0x04, %dh
+ jnz L(exit_tail2)
+
+ test $0x08, %dh
+ jnz L(exit_tail3)
+
+ test $0x10, %dh
+ jnz L(exit_tail4)
+
+ test $0x20, %dh
+ jnz L(exit_tail5)
+
+ test $0x40, %dh
+ jnz L(exit_tail6)
+ add $7, %eax
+ RETURN
+
+# ifdef USE_AS_STRNLEN
+
+ .p2align 4
+L(len_less64):
+ pxor %xmm0, %xmm0
+ add $64, %rsi
+
+ pcmpeqb (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ pxor %xmm1, %xmm1
+ lea 16(%rax), %rax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ sub $16, %rsi
+ jbe L(return_start_len)
+
+ pcmpeqb (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ lea 16(%rax), %rax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ sub $16, %rsi
+ jbe L(return_start_len)
+
+ pcmpeqb (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ lea 16(%rax), %rax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ sub $16, %rsi
+ jbe L(return_start_len)
+
+ pcmpeqb (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ lea 16(%rax), %rax
+ test %edx, %edx
+ jnz L(strnlen_exit)
+
+ mov %r8, %rax
+ ret
+
+ .p2align 4
+L(strnlen_exit):
+ sub %rcx, %rax
+
+ test %dl, %dl
+ jz L(strnlen_exit_high)
+ mov %dl, %cl
+ and $15, %cl
+ jz L(strnlen_exit_8)
+ test $0x01, %dl
+ jnz L(exit_tail0)
+ test $0x02, %dl
+ jnz L(strnlen_exit_tail1)
+ test $0x04, %dl
+ jnz L(strnlen_exit_tail2)
+ sub $4, %rsi
+ jb L(return_start_len)
+ lea 3(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_8):
+ test $0x10, %dl
+ jnz L(strnlen_exit_tail4)
+ test $0x20, %dl
+ jnz L(strnlen_exit_tail5)
+ test $0x40, %dl
+ jnz L(strnlen_exit_tail6)
+ sub $8, %rsi
+ jb L(return_start_len)
+ lea 7(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_high):
+ mov %dh, %ch
+ and $15, %ch
+ jz L(strnlen_exit_high_8)
+ test $0x01, %dh
+ jnz L(strnlen_exit_tail8)
+ test $0x02, %dh
+ jnz L(strnlen_exit_tail9)
+ test $0x04, %dh
+ jnz L(strnlen_exit_tail10)
+ sub $12, %rsi
+ jb L(return_start_len)
+ lea 11(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_high_8):
+ test $0x10, %dh
+ jnz L(strnlen_exit_tail12)
+ test $0x20, %dh
+ jnz L(strnlen_exit_tail13)
+ test $0x40, %dh
+ jnz L(strnlen_exit_tail14)
+ sub $16, %rsi
+ jb L(return_start_len)
+ lea 15(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail1):
+ sub $2, %rsi
+ jb L(return_start_len)
+ lea 1(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail2):
+ sub $3, %rsi
+ jb L(return_start_len)
+ lea 2(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail4):
+ sub $5, %rsi
+ jb L(return_start_len)
+ lea 4(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail5):
+ sub $6, %rsi
+ jb L(return_start_len)
+ lea 5(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail6):
+ sub $7, %rsi
+ jb L(return_start_len)
+ lea 6(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail8):
+ sub $9, %rsi
+ jb L(return_start_len)
+ lea 8(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail9):
+ sub $10, %rsi
+ jb L(return_start_len)
+ lea 9(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail10):
+ sub $11, %rsi
+ jb L(return_start_len)
+ lea 10(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail12):
+ sub $13, %rsi
+ jb L(return_start_len)
+ lea 12(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail13):
+ sub $14, %rsi
+ jb L(return_start_len)
+ lea 13(%eax), %eax
+ ret
+
+ .p2align 4
+L(strnlen_exit_tail14):
+ sub $15, %rsi
+ jb L(return_start_len)
+ lea 14(%eax), %eax
+ ret
+
+ .p2align 4
+L(return_start_len):
+ mov %r8, %rax
+ ret
+
+/* for prolog only */
+
+ .p2align 4
+L(len_less4_prolog):
+ add $4, %rsi
+ jz L(exit_tail0)
+
+ cmpb $0, (%rdi)
+ jz L(exit_tail0)
+ cmp $1, %esi
+ je L(exit_tail1)
+
+ cmpb $0, 1(%rdi)
+ jz L(exit_tail1)
+ cmp $2, %esi
+ je L(exit_tail2)
+
+ cmpb $0, 2(%rdi)
+ jz L(exit_tail2)
+ cmp $3, %esi
+ je L(exit_tail3)
+
+ cmpb $0, 3(%rdi)
+ jz L(exit_tail3)
+ mov $4, %eax
+ ret
+
+ .p2align 4
+L(len_less8_prolog):
+ add $4, %rsi
+
+ cmpb $0, 4(%rdi)
+ jz L(exit_tail4)
+ cmp $1, %esi
+ je L(exit_tail5)
+
+ cmpb $0, 5(%rdi)
+ jz L(exit_tail5)
+ cmp $2, %esi
+ je L(exit_tail6)
+
+ cmpb $0, 6(%rdi)
+ jz L(exit_tail6)
+ cmp $3, %esi
+ je L(exit_tail7)
+
+ cmpb $0, 7(%rdi)
+ jz L(exit_tail7)
+ mov $8, %eax
+ ret
+
+ .p2align 4
+L(len_less12_prolog):
+ add $4, %rsi
+
+ cmpb $0, 8(%rdi)
+ jz L(exit_tail8)
+ cmp $1, %esi
+ je L(exit_tail9)
+
+ cmpb $0, 9(%rdi)
+ jz L(exit_tail9)
+ cmp $2, %esi
+ je L(exit_tail10)
+
+ cmpb $0, 10(%rdi)
+ jz L(exit_tail10)
+ cmp $3, %esi
+ je L(exit_tail11)
+
+ cmpb $0, 11(%rdi)
+ jz L(exit_tail11)
+ mov $12, %eax
+ ret
+
+ .p2align 4
+L(len_less16_prolog):
+ add $4, %rsi
+
+ cmpb $0, 12(%rdi)
+ jz L(exit_tail12)
+ cmp $1, %esi
+ je L(exit_tail13)
+
+ cmpb $0, 13(%rdi)
+ jz L(exit_tail13)
+ cmp $2, %esi
+ je L(exit_tail14)
+
+ cmpb $0, 14(%rdi)
+ jz L(exit_tail14)
+ cmp $3, %esi
+ je L(exit_tail15)
+
+ cmpb $0, 15(%rdi)
+ jz L(exit_tail15)
+ mov $16, %eax
+ ret
+# endif
+
+ .p2align 4
+L(exit_tail1):
+ add $1, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail2):
+ add $2, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail3):
+ add $3, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail4):
+ add $4, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail5):
+ add $5, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail6):
+ add $6, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail7):
+ add $7, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail8):
+ add $8, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail9):
+ add $9, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail10):
+ add $10, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail11):
+ add $11, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail12):
+ add $12, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail13):
+ add $13, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail14):
+ add $14, %eax
+ RETURN
+
+ .p2align 4
+L(exit_tail15):
+ add $15, %eax
+# ifndef USE_AS_STRCAT
+ RETURN
+END (STRLEN)
+# endif
+#endif
diff --git a/sysdeps/x86_64/multiarch/strlen.S b/sysdeps/x86_64/multiarch/strlen.S
index 43e2100f41..7716d3674f 100644
--- a/sysdeps/x86_64/multiarch/strlen.S
+++ b/sysdeps/x86_64/multiarch/strlen.S
@@ -42,7 +42,7 @@ ENTRY(strlen)
ret
2: testl $bit_Slow_BSF, __cpu_features+FEATURE_OFFSET+index_Slow_BSF(%rip)
jz 3f
- leaq __strlen_no_bsf(%rip), %rax
+ leaq __strlen_sse2_no_bsf(%rip), %rax
3: ret
END(strlen)
diff --git a/sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S b/sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S
new file mode 100644
index 0000000000..248328d999
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/strnlen-sse2-no-bsf.S
@@ -0,0 +1,3 @@
+#define USE_AS_STRNLEN
+#define STRLEN __strnlen_sse2_no_bsf
+#include "strlen-sse2-no-bsf.S"
diff --git a/sysdeps/x86_64/multiarch/strnlen.S b/sysdeps/x86_64/multiarch/strnlen.S
new file mode 100644
index 0000000000..75c9adfbcf
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/strnlen.S
@@ -0,0 +1,55 @@
+/* multiple version of strnlen
+ Copyright (C) 2011 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 <sysdep.h>
+#include <init-arch.h>
+
+
+/* Define multiple versions only for the definition in libc. */
+#ifndef NOT_IN_libc
+
+ .text
+ENTRY(__strnlen)
+ .type __strnlen, @gnu_indirect_function
+ cmpl $0, __cpu_features+KIND_OFFSET(%rip)
+ jne 1f
+ call __init_cpu_features
+1: leaq __strnlen_sse2(%rip), %rax
+ testl $bit_Slow_BSF, __cpu_features+FEATURE_OFFSET+index_Slow_BSF(%rip)
+ jz 2f
+ leaq __strnlen_sse2_no_bsf(%rip), %rax
+2: ret
+END(__strnlen)
+
+# undef ENTRY
+# define ENTRY(name) \
+ .type __strnlen_sse2, @function; \
+ .align 16; \
+ __strnlen_sse2: cfi_startproc; \
+ CALL_MCOUNT
+# undef END
+# define END(name) \
+ cfi_endproc; .size __strnlen_sse2, .-__strnlen_sse2
+
+# undef libc_hidden_def
+# define libc_hidden_def(name) \
+ .globl __GI_strnlen; __GI_strnlen = __strnlen_sse2
+#endif
+
+#include "../strnlen.S"
diff --git a/sysdeps/x86_64/multiarch/strstr.c b/sysdeps/x86_64/multiarch/strstr.c
index b408b752fa..36dc6762c7 100644
--- a/sysdeps/x86_64/multiarch/strstr.c
+++ b/sysdeps/x86_64/multiarch/strstr.c
@@ -1,5 +1,5 @@
/* strstr with SSE4.2 intrinsics
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
Contributed by Intel Corporation.
This file is part of the GNU C Library.
@@ -88,14 +88,12 @@
cross to next page. */
static inline __m128i
-__m128i_strloadu (const unsigned char * p)
+__m128i_strloadu (const unsigned char * p, __m128i zero)
{
- int offset = ((size_t) p & (16 - 1));
-
- if (offset && (int) ((size_t) p & 0xfff) > 0xff0)
+ if (__builtin_expect ((int) ((size_t) p & 0xfff) > 0xff0, 0))
{
+ size_t offset = ((size_t) p & (16 - 1));
__m128i a = _mm_load_si128 ((__m128i *) (p - offset));
- __m128i zero = _mm_setzero_si128 ();
int bmsk = _mm_movemask_epi8 (_mm_cmpeq_epi8 (a, zero));
if ((bmsk >> offset) != 0)
return __m128i_shift_right (a, offset);
@@ -106,24 +104,22 @@ __m128i_strloadu (const unsigned char * p)
#if defined USE_AS_STRCASESTR && !defined STRCASESTR_NONASCII
/* Similar to __m128i_strloadu. Convert to lower case for POSIX/C
- locale. */
+ locale and other which have single-byte letters only in the ASCII
+ range. */
static inline __m128i
-__m128i_strloadu_tolower (const unsigned char *p, __m128i rangeuc,
- __m128i u2ldelta)
+__m128i_strloadu_tolower (const unsigned char *p, __m128i zero, __m128i uclow,
+ __m128i uchigh, __m128i lcqword)
{
- __m128i frag = __m128i_strloadu (p);
+ __m128i frag = __m128i_strloadu (p, zero);
-#define UCLOW 0x4040404040404040ULL
-#define UCHIGH 0x5b5b5b5b5b5b5b5bULL
-#define LCQWORD 0x2020202020202020ULL
/* Compare if 'Z' > bytes. Inverted way to get a mask for byte <= 'Z'. */
- __m128i r2 = _mm_cmpgt_epi8 (_mm_set1_epi64x (UCHIGH), frag);
+ __m128i r2 = _mm_cmpgt_epi8 (uchigh, frag);
/* Compare if bytes are > 'A' - 1. */
- __m128i r1 = _mm_cmpgt_epi8 (frag, _mm_set1_epi64x (UCLOW));
+ __m128i r1 = _mm_cmpgt_epi8 (frag, uclow);
/* Mask byte == ff if byte(r2) <= 'Z' and byte(r1) > 'A' - 1. */
__m128i mask = _mm_and_si128 (r2, r1);
/* Apply lowercase bit 6 mask for above mask bytes == ff. */
- return _mm_or_si128 (frag, _mm_and_si128 (mask, _mm_set1_epi64x (LCQWORD)));
+ return _mm_or_si128 (frag, _mm_and_si128 (mask, lcqword));
}
#endif
@@ -190,14 +186,18 @@ STRSTR_SSE42 (const unsigned char *s1, const unsigned char *s2)
!= 0, 0))
return __strcasestr_sse42_nonascii (s1, s2);
- const __m128i rangeuc = _mm_set_epi64x (0x0, 0x5a41);
- const __m128i u2ldelta = _mm_set1_epi64x (0xe0e0e0e0e0e0e0e0);
-# define strloadu(p) __m128i_strloadu_tolower (p, rangeuc, u2ldelta)
+ const __m128i uclow = _mm_set1_epi8 (0x40);
+ const __m128i uchigh = _mm_set1_epi8 (0x5b);
+ const __m128i lcqword = _mm_set1_epi8 (0x20);
+ const __m128i zero = _mm_setzero_si128 ();
+# define strloadu(p) __m128i_strloadu_tolower (p, zero, uclow, uchigh, lcqword)
# else
# define strloadu __m128i_strloadu_tolower
+# define zero _mm_setzero_si128 ()
# endif
#else
-# define strloadu __m128i_strloadu
+# define strloadu(p) __m128i_strloadu (p, zero)
+ const __m128i zero = _mm_setzero_si128 ();
#endif
/* p1 > 1 byte long. Load up to 16 bytes of fragment. */
@@ -208,7 +208,7 @@ STRSTR_SSE42 (const unsigned char *s1, const unsigned char *s2)
/* p2 is > 1 byte long. */
frag2 = strloadu (p2);
else
- frag2 = _mm_insert_epi8 (_mm_setzero_si128 (), LOADBYTE (p2[0]), 0);
+ frag2 = _mm_insert_epi8 (zero, LOADBYTE (p2[0]), 0);
/* Unsigned bytes, equal order, does frag2 has null? */
int cmp_c = _mm_cmpistrc (frag2, frag1, 0x0c);
@@ -217,8 +217,7 @@ STRSTR_SSE42 (const unsigned char *s1, const unsigned char *s2)
int cmp_s = _mm_cmpistrs (frag2, frag1, 0x0c);
if (cmp_s & cmp_c)
{
- int bmsk = _mm_movemask_epi8 (_mm_cmpeq_epi8 (frag2,
- _mm_setzero_si128 ()));
+ int bmsk = _mm_movemask_epi8 (_mm_cmpeq_epi8 (frag2, zero));
int len;
__asm ("bsfl %[bmsk], %[len]"
: [len] "=r" (len) : [bmsk] "r" (bmsk));
@@ -344,7 +343,6 @@ re_trace:
/* Handle both zero and sign flag set and s1 is shorter in
length. */
- __m128i zero = _mm_setzero_si128 ();
int bmsk = _mm_movemask_epi8 (_mm_cmpeq_epi8 (zero, frag2));
int bmsk1 = _mm_movemask_epi8 (_mm_cmpeq_epi8 (zero, frag1));
int len;
diff --git a/sysdeps/x86_64/multiarch/wcscpy-c.c b/sysdeps/x86_64/multiarch/wcscpy-c.c
new file mode 100644
index 0000000000..f27c069198
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/wcscpy-c.c
@@ -0,0 +1,5 @@
+#ifndef NOT_IN_libc
+# define wcscpy __wcscpy_sse2
+#endif
+
+#include "wcsmbs/wcscpy.c"
diff --git a/sysdeps/x86_64/multiarch/wcscpy-ssse3.S b/sysdeps/x86_64/multiarch/wcscpy-ssse3.S
new file mode 100644
index 0000000000..477b2cb4ef
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/wcscpy-ssse3.S
@@ -0,0 +1,553 @@
+/* wcscpy with SSSE3
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef NOT_IN_libc
+# include <sysdep.h>
+
+ .section .text.ssse3,"ax",@progbits
+ENTRY (__wcscpy_ssse3)
+
+ mov %rsi, %rcx
+ mov %rdi, %rdx
+
+ cmpl $0, (%rcx)
+ jz L(Exit4)
+ cmpl $0, 4(%rcx)
+ jz L(Exit8)
+ cmpl $0, 8(%rcx)
+ jz L(Exit12)
+ cmpl $0, 12(%rcx)
+ jz L(Exit16)
+
+ lea 16(%rcx), %rsi
+ and $-16, %rsi
+
+ pxor %xmm0, %xmm0
+ mov (%rcx), %r9
+ mov %r9, (%rdx)
+
+ pcmpeqd (%rsi), %xmm0
+ mov 8(%rcx), %r9
+ mov %r9, 8(%rdx)
+
+ pmovmskb %xmm0, %rax
+ sub %rcx, %rsi
+
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ mov %rdx, %rax
+ lea 16(%rdx), %rdx
+ and $-16, %rdx
+ sub %rdx, %rax
+ sub %rax, %rcx
+ mov %rcx, %rax
+ and $0xf, %rax
+ mov $0, %rsi
+
+/* case: rcx_offset == rdx_offset */
+
+ jz L(Align16Both)
+
+ cmp $4, %rax
+ je L(Shl4)
+ cmp $8, %rax
+ je L(Shl8)
+ jmp L(Shl12)
+
+L(Align16Both):
+ movaps (%rcx), %xmm1
+ movaps 16(%rcx), %xmm2
+ movaps %xmm1, (%rdx)
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %rax
+ lea 16(%rsi), %rsi
+
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%rcx, %rsi), %xmm3
+ movaps %xmm2, (%rdx, %rsi)
+ pcmpeqd %xmm3, %xmm0
+ pmovmskb %xmm0, %rax
+ lea 16(%rsi), %rsi
+
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%rcx, %rsi), %xmm4
+ movaps %xmm3, (%rdx, %rsi)
+ pcmpeqd %xmm4, %xmm0
+ pmovmskb %xmm0, %rax
+ lea 16(%rsi), %rsi
+
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%rcx, %rsi), %xmm1
+ movaps %xmm4, (%rdx, %rsi)
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm0, %rax
+ lea 16(%rsi), %rsi
+
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%rcx, %rsi), %xmm2
+ movaps %xmm1, (%rdx, %rsi)
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %rax
+ lea 16(%rsi), %rsi
+
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps 16(%rcx, %rsi), %xmm3
+ movaps %xmm2, (%rdx, %rsi)
+ pcmpeqd %xmm3, %xmm0
+ pmovmskb %xmm0, %rax
+ lea 16(%rsi), %rsi
+
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps %xmm3, (%rdx, %rsi)
+ mov %rcx, %rax
+ lea 16(%rcx, %rsi), %rcx
+ and $-0x40, %rcx
+ sub %rcx, %rax
+ sub %rax, %rdx
+
+ mov $-0x40, %rsi
+
+ .p2align 4
+L(Aligned64Loop):
+ movaps (%rcx), %xmm2
+ movaps %xmm2, %xmm4
+ movaps 16(%rcx), %xmm5
+ movaps 32(%rcx), %xmm3
+ movaps %xmm3, %xmm6
+ movaps 48(%rcx), %xmm7
+ pminub %xmm5, %xmm2
+ pminub %xmm7, %xmm3
+ pminub %xmm2, %xmm3
+ pcmpeqd %xmm0, %xmm3
+ pmovmskb %xmm3, %rax
+ lea 64(%rdx), %rdx
+ lea 64(%rcx), %rcx
+ test %rax, %rax
+ jnz L(Aligned64Leave)
+ movaps %xmm4, -64(%rdx)
+ movaps %xmm5, -48(%rdx)
+ movaps %xmm6, -32(%rdx)
+ movaps %xmm7, -16(%rdx)
+ jmp L(Aligned64Loop)
+
+L(Aligned64Leave):
+ pcmpeqd %xmm4, %xmm0
+ pmovmskb %xmm0, %rax
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ pcmpeqd %xmm5, %xmm0
+
+ pmovmskb %xmm0, %rax
+ movaps %xmm4, -64(%rdx)
+ test %rax, %rax
+ lea 16(%rsi), %rsi
+ jnz L(CopyFrom1To16Bytes)
+
+ pcmpeqd %xmm6, %xmm0
+
+ pmovmskb %xmm0, %rax
+ movaps %xmm5, -48(%rdx)
+ test %rax, %rax
+ lea 16(%rsi), %rsi
+ jnz L(CopyFrom1To16Bytes)
+
+ movaps %xmm6, -32(%rdx)
+ pcmpeqd %xmm7, %xmm0
+
+ pmovmskb %xmm0, %rax
+ lea 16(%rsi), %rsi
+ test %rax, %rax
+ jnz L(CopyFrom1To16Bytes)
+
+ mov $-0x40, %rsi
+ movaps %xmm7, -16(%rdx)
+ jmp L(Aligned64Loop)
+
+ .p2align 4
+L(Shl4):
+ movaps -4(%rcx), %xmm1
+ movaps 12(%rcx), %xmm2
+L(Shl4Start):
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %rax
+ movaps %xmm2, %xmm3
+
+ test %rax, %rax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 28(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+ movaps %xmm2, %xmm1
+
+ test %rax, %rax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm3, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 28(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+ movaps %xmm2, %xmm3
+
+ test %rax, %rax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 28(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+
+ test %rax, %rax
+ jnz L(Shl4LoopExit)
+
+ palignr $4, %xmm3, %xmm2
+ movaps %xmm2, (%rdx)
+ lea 28(%rcx), %rcx
+ lea 16(%rdx), %rdx
+
+ mov %rcx, %rax
+ and $-0x40, %rcx
+ sub %rcx, %rax
+ lea -12(%rcx), %rcx
+ sub %rax, %rdx
+
+ movaps -4(%rcx), %xmm1
+
+ .p2align 4
+L(Shl4LoopStart):
+ movaps 12(%rcx), %xmm2
+ movaps 28(%rcx), %xmm3
+ movaps %xmm3, %xmm6
+ movaps 44(%rcx), %xmm4
+ movaps %xmm4, %xmm7
+ movaps 60(%rcx), %xmm5
+ pminub %xmm2, %xmm6
+ pminub %xmm5, %xmm7
+ pminub %xmm6, %xmm7
+ pcmpeqd %xmm0, %xmm7
+ pmovmskb %xmm7, %rax
+ movaps %xmm5, %xmm7
+ palignr $4, %xmm4, %xmm5
+ test %rax, %rax
+ palignr $4, %xmm3, %xmm4
+ jnz L(Shl4Start)
+
+ palignr $4, %xmm2, %xmm3
+ lea 64(%rcx), %rcx
+ palignr $4, %xmm1, %xmm2
+ movaps %xmm7, %xmm1
+ movaps %xmm5, 48(%rdx)
+ movaps %xmm4, 32(%rdx)
+ movaps %xmm3, 16(%rdx)
+ movaps %xmm2, (%rdx)
+ lea 64(%rdx), %rdx
+ jmp L(Shl4LoopStart)
+
+L(Shl4LoopExit):
+ movdqu -4(%rcx), %xmm1
+ mov $12, %rsi
+ movdqu %xmm1, -4(%rdx)
+ jmp L(CopyFrom1To16Bytes)
+
+ .p2align 4
+L(Shl8):
+ movaps -8(%rcx), %xmm1
+ movaps 8(%rcx), %xmm2
+L(Shl8Start):
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %rax
+ movaps %xmm2, %xmm3
+
+ test %rax, %rax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 24(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+ movaps %xmm2, %xmm1
+
+ test %rax, %rax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm3, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 24(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+ movaps %xmm2, %xmm3
+
+ test %rax, %rax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 24(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+
+ test %rax, %rax
+ jnz L(Shl8LoopExit)
+
+ palignr $8, %xmm3, %xmm2
+ movaps %xmm2, (%rdx)
+ lea 24(%rcx), %rcx
+ lea 16(%rdx), %rdx
+
+ mov %rcx, %rax
+ and $-0x40, %rcx
+ sub %rcx, %rax
+ lea -8(%rcx), %rcx
+ sub %rax, %rdx
+
+ movaps -8(%rcx), %xmm1
+
+ .p2align 4
+L(Shl8LoopStart):
+ movaps 8(%rcx), %xmm2
+ movaps 24(%rcx), %xmm3
+ movaps %xmm3, %xmm6
+ movaps 40(%rcx), %xmm4
+ movaps %xmm4, %xmm7
+ movaps 56(%rcx), %xmm5
+ pminub %xmm2, %xmm6
+ pminub %xmm5, %xmm7
+ pminub %xmm6, %xmm7
+ pcmpeqd %xmm0, %xmm7
+ pmovmskb %xmm7, %rax
+ movaps %xmm5, %xmm7
+ palignr $8, %xmm4, %xmm5
+ test %rax, %rax
+ palignr $8, %xmm3, %xmm4
+ jnz L(Shl8Start)
+
+ palignr $8, %xmm2, %xmm3
+ lea 64(%rcx), %rcx
+ palignr $8, %xmm1, %xmm2
+ movaps %xmm7, %xmm1
+ movaps %xmm5, 48(%rdx)
+ movaps %xmm4, 32(%rdx)
+ movaps %xmm3, 16(%rdx)
+ movaps %xmm2, (%rdx)
+ lea 64(%rdx), %rdx
+ jmp L(Shl8LoopStart)
+
+L(Shl8LoopExit):
+ mov (%rcx), %r9
+ mov $8, %rsi
+ mov %r9, (%rdx)
+ jmp L(CopyFrom1To16Bytes)
+
+ .p2align 4
+L(Shl12):
+ movaps -12(%rcx), %xmm1
+ movaps 4(%rcx), %xmm2
+L(Shl12Start):
+ pcmpeqd %xmm2, %xmm0
+ pmovmskb %xmm0, %rax
+ movaps %xmm2, %xmm3
+
+ test %rax, %rax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm1, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 20(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+ movaps %xmm2, %xmm1
+
+ test %rax, %rax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm3, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 20(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+ movaps %xmm2, %xmm3
+
+ test %rax, %rax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm1, %xmm2
+ movaps %xmm2, (%rdx)
+ movaps 20(%rcx), %xmm2
+
+ pcmpeqd %xmm2, %xmm0
+ lea 16(%rdx), %rdx
+ pmovmskb %xmm0, %rax
+ lea 16(%rcx), %rcx
+
+ test %rax, %rax
+ jnz L(Shl12LoopExit)
+
+ palignr $12, %xmm3, %xmm2
+ movaps %xmm2, (%rdx)
+ lea 20(%rcx), %rcx
+ lea 16(%rdx), %rdx
+
+ mov %rcx, %rax
+ and $-0x40, %rcx
+ sub %rcx, %rax
+ lea -4(%rcx), %rcx
+ sub %rax, %rdx
+
+ movaps -12(%rcx), %xmm1
+
+ .p2align 4
+L(Shl12LoopStart):
+ movaps 4(%rcx), %xmm2
+ movaps 20(%rcx), %xmm3
+ movaps %xmm3, %xmm6
+ movaps 36(%rcx), %xmm4
+ movaps %xmm4, %xmm7
+ movaps 52(%rcx), %xmm5
+ pminub %xmm2, %xmm6
+ pminub %xmm5, %xmm7
+ pminub %xmm6, %xmm7
+ pcmpeqd %xmm0, %xmm7
+ pmovmskb %xmm7, %rax
+ movaps %xmm5, %xmm7
+ palignr $12, %xmm4, %xmm5
+ test %rax, %rax
+ palignr $12, %xmm3, %xmm4
+ jnz L(Shl12Start)
+ palignr $12, %xmm2, %xmm3
+ lea 64(%rcx), %rcx
+ palignr $12, %xmm1, %xmm2
+ movaps %xmm7, %xmm1
+ movaps %xmm5, 48(%rdx)
+ movaps %xmm4, 32(%rdx)
+ movaps %xmm3, 16(%rdx)
+ movaps %xmm2, (%rdx)
+ lea 64(%rdx), %rdx
+ jmp L(Shl12LoopStart)
+
+L(Shl12LoopExit):
+ mov (%rcx), %r9d
+ mov $4, %rsi
+ mov %r9d, (%rdx)
+ jmp L(CopyFrom1To16Bytes)
+
+ .p2align 4
+L(CopyFrom1To16Bytes):
+ add %rsi, %rdx
+ add %rsi, %rcx
+
+ test %al, %al
+ jz L(ExitHigh)
+ test $0x01, %al
+ jnz L(Exit4)
+
+ mov (%rcx), %rax
+ mov %rax, (%rdx)
+ mov %rdi, %rax
+ ret
+
+ .p2align 4
+L(ExitHigh):
+ test $0x01, %ah
+ jnz L(Exit12)
+
+ mov (%rcx), %rax
+ mov %rax, (%rdx)
+ mov 8(%rcx), %rax
+ mov %rax, 8(%rdx)
+ mov %rdi, %rax
+ ret
+
+ .p2align 4
+L(Exit4):
+ movl (%rcx), %eax
+ movl %eax, (%rdx)
+ mov %rdi, %rax
+ ret
+
+ .p2align 4
+L(Exit8):
+ mov (%rcx), %rax
+ mov %rax, (%rdx)
+ mov %rdi, %rax
+ ret
+
+ .p2align 4
+L(Exit12):
+ mov (%rcx), %rax
+ mov %rax, (%rdx)
+ mov 8(%rcx), %eax
+ mov %eax, 8(%rdx)
+ mov %rdi, %rax
+ ret
+
+ .p2align 4
+L(Exit16):
+ mov (%rcx), %rax
+ mov %rax, (%rdx)
+ mov 8(%rcx), %rax
+ mov %rax, 8(%rdx)
+ mov %rdi, %rax
+ ret
+
+END(__wcscpy_ssse3)
+#endif
diff --git a/sysdeps/x86_64/multiarch/wcscpy.S b/sysdeps/x86_64/multiarch/wcscpy.S
new file mode 100644
index 0000000000..818c5549e6
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/wcscpy.S
@@ -0,0 +1,43 @@
+/* Multiple versions of wcscpy
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+/* Define multiple versions only for the definition in libc. */
+#ifndef NOT_IN_libc
+
+ .text
+ENTRY(wcscpy)
+ .type wcscpy, @gnu_indirect_function
+ cmpl $0, KIND_OFFSET+__cpu_features(%rip)
+ jne 1f
+ call __init_cpu_features
+
+1: testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
+ jnz 2f
+ leaq __wcscpy_sse2(%rip), %rax
+ ret
+
+2: leaq __wcscpy_ssse3(%rip), %rax
+ ret
+
+END(wcscpy)
+#endif
diff --git a/sysdeps/x86_64/multiarch/wmemcmp-c.c b/sysdeps/x86_64/multiarch/wmemcmp-c.c
new file mode 100644
index 0000000000..1074238daf
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/wmemcmp-c.c
@@ -0,0 +1,9 @@
+#ifndef NOT_IN_libc
+# include <wchar.h>
+
+# define WMEMCMP __wmemcmp_sse2
+
+extern __typeof (wmemcmp) __wmemcmp_sse2;
+#endif
+
+#include "wcsmbs/wmemcmp.c"
diff --git a/sysdeps/x86_64/multiarch/wmemcmp-sse4.S b/sysdeps/x86_64/multiarch/wmemcmp-sse4.S
new file mode 100644
index 0000000000..b07973a4f6
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/wmemcmp-sse4.S
@@ -0,0 +1,4 @@
+#define USE_AS_WMEMCMP 1
+#define MEMCMP __wmemcmp_sse4_1
+
+#include "memcmp-sse4.S"
diff --git a/sysdeps/x86_64/multiarch/wmemcmp-ssse3.S b/sysdeps/x86_64/multiarch/wmemcmp-ssse3.S
new file mode 100644
index 0000000000..a41ef95fc1
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/wmemcmp-ssse3.S
@@ -0,0 +1,4 @@
+#define USE_AS_WMEMCMP 1
+#define MEMCMP __wmemcmp_ssse3
+
+#include "memcmp-ssse3.S"
diff --git a/sysdeps/x86_64/multiarch/wmemcmp.S b/sysdeps/x86_64/multiarch/wmemcmp.S
new file mode 100644
index 0000000000..7c3b7ed178
--- /dev/null
+++ b/sysdeps/x86_64/multiarch/wmemcmp.S
@@ -0,0 +1,47 @@
+/* Multiple versions of wmemcmp
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+#include <init-arch.h>
+
+/* Define multiple versions only for the definition in libc. */
+#ifndef NOT_IN_libc
+ .text
+ENTRY(wmemcmp)
+ .type wmemcmp, @gnu_indirect_function
+ cmpl $0, KIND_OFFSET+__cpu_features(%rip)
+ jne 1f
+ call __init_cpu_features
+
+1: testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
+ jnz 2f
+ leaq __wmemcmp_sse2(%rip), %rax
+ ret
+
+2: testl $bit_SSE4_1, __cpu_features+CPUID_OFFSET+index_SSE4_1(%rip)
+ jz 3f
+ leaq __wmemcmp_sse4_1(%rip), %rax
+ ret
+
+3: leaq __wmemcmp_ssse3(%rip), %rax
+ ret
+
+END(wmemcmp)
+#endif
diff --git a/sysdeps/x86_64/strcmp.S b/sysdeps/x86_64/strcmp.S
index 165073e907..6e5bdaaf2e 100644
--- a/sysdeps/x86_64/strcmp.S
+++ b/sysdeps/x86_64/strcmp.S
@@ -1,5 +1,5 @@
/* Highly optimized version for x86-64.
- Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009, 2010
+ Copyright (C) 1999, 2000, 2002, 2003, 2005, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Based on i686 version contributed by Ulrich Drepper
@@ -157,7 +157,7 @@ END (BP_SYM (STRCMP))
# else
movq (%rdx), %rax
# endif
- testl $0, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
jne __strcasecmp_l_nonascii
# elif defined USE_AS_STRNCASECMP_L
/* We have to fall back on the C implementation for locales
@@ -167,7 +167,7 @@ END (BP_SYM (STRCMP))
# else
movq (%rcx), %rax
# endif
- testl $0, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
+ testl $1, LOCALE_DATA_VALUES+_NL_CTYPE_NONASCII_CASE*SIZEOF_VALUES(%rax)
jne __strncasecmp_l_nonascii
# endif
diff --git a/sysdeps/x86_64/wcschr.S b/sysdeps/x86_64/wcschr.S
new file mode 100644
index 0000000000..b3a1b3b713
--- /dev/null
+++ b/sysdeps/x86_64/wcschr.S
@@ -0,0 +1,155 @@
+/* wcschr with SSSE3
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+
+ .text
+ENTRY (wcschr)
+
+ movd %rsi, %xmm1
+ pxor %xmm2, %xmm2
+ mov %rdi, %rcx
+ punpckldq %xmm1, %xmm1
+ punpckldq %xmm1, %xmm1
+
+ and $63, %rcx
+ cmp $48, %rcx
+ ja L(cross_cache)
+
+ movdqu (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rdx
+ pmovmskb %xmm0, %rax
+ or %rax, %rdx
+ jnz L(matches)
+
+ and $-16, %rdi
+
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rdx
+ pmovmskb %xmm0, %rax
+ or %rax, %rdx
+ jnz L(matches)
+
+ jmp L(loop)
+
+L(cross_cache):
+ and $15, %rcx
+ and $-16, %rdi
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rdx
+ pmovmskb %xmm0, %rax
+
+ sar %cl, %rdx
+ sar %cl, %rax
+ test %rax, %rax
+ je L(unaligned_no_match)
+
+ bsf %rax, %rax
+ test %rdx, %rdx
+ je L(unaligned_match)
+ bsf %rdx, %rdx
+ cmp %rdx, %rax
+ ja L(return_null)
+
+L(unaligned_match):
+ add %rdi, %rax
+ add %rcx, %rax
+ ret
+
+ .p2align 4
+L(unaligned_no_match):
+ test %rdx, %rdx
+ jne L(return_null)
+ pxor %xmm2, %xmm2
+
+ add $16, %rdi
+
+ .p2align 4
+/* Loop start on aligned string. */
+L(loop):
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rdx
+ pmovmskb %xmm0, %rax
+ or %rax, %rdx
+ jnz L(matches)
+
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rdx
+ pmovmskb %xmm0, %rax
+ or %rax, %rdx
+ jnz L(matches)
+
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rdx
+ pmovmskb %xmm0, %rax
+ or %rax, %rdx
+ jnz L(matches)
+
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rdx
+ pmovmskb %xmm0, %rax
+ or %rax, %rdx
+ jnz L(matches)
+ jmp L(loop)
+
+ .p2align 4
+L(matches):
+ pmovmskb %xmm2, %rdx
+ test %rax, %rax
+ jz L(return_null)
+ bsf %rax, %rax
+ test %rdx, %rdx
+ je L(match)
+ bsf %rdx, %rcx
+ cmp %rcx, %rax
+ ja L(return_null)
+L(match):
+ sub $16, %rdi
+ add %rdi, %rax
+ ret
+
+ .p2align 4
+L(return_null):
+ xor %rax, %rax
+ ret
+
+END (wcschr)
+
+libc_hidden_def(wcschr)
diff --git a/sysdeps/x86_64/wcscmp.S b/sysdeps/x86_64/wcscmp.S
index 991ecb2cab..146fa3a2c3 100644
--- a/sysdeps/x86_64/wcscmp.S
+++ b/sysdeps/x86_64/wcscmp.S
@@ -20,6 +20,8 @@
#include <sysdep.h>
+/* Note: wcscmp uses signed comparison, not unsighed as in strcmp function. */
+
.text
ENTRY (wcscmp)
/*
@@ -209,20 +211,20 @@ L(continue_00_48):
test %ecx, %ecx
jnz L(less4_double_words1)
- sub (%rsi), %eax
- jnz L(return)
+ cmp (%rsi), %eax
+ jne L(nequal)
mov 4(%rdi), %eax
- sub 4(%rsi), %eax
- jnz L(return)
+ cmp 4(%rsi), %eax
+ jne L(nequal)
mov 8(%rdi), %eax
- sub 8(%rsi), %eax
- jnz L(return)
+ cmp 8(%rsi), %eax
+ jne L(nequal)
mov 12(%rdi), %eax
- sub 12(%rsi), %eax
- jnz L(return)
+ cmp 12(%rsi), %eax
+ jne L(nequal)
movdqu 16(%rsi), %xmm2
pcmpeqd %xmm2, %xmm0 /* Any null double_word? */
@@ -530,20 +532,20 @@ L(continue_48_00):
test %ecx, %ecx
jnz L(less4_double_words1)
- sub (%rsi), %eax
- jnz L(return)
+ cmp (%rsi), %eax
+ jne L(nequal)
mov 4(%rdi), %eax
- sub 4(%rsi), %eax
- jnz L(return)
+ cmp 4(%rsi), %eax
+ jne L(nequal)
mov 8(%rdi), %eax
- sub 8(%rsi), %eax
- jnz L(return)
+ cmp 8(%rsi), %eax
+ jne L(nequal)
mov 12(%rdi), %eax
- sub 12(%rsi), %eax
- jnz L(return)
+ cmp 12(%rsi), %eax
+ jne L(nequal)
movdqu 16(%rdi), %xmm1
pcmpeqd %xmm1, %xmm0 /* Any null double_word? */
@@ -784,25 +786,29 @@ L(less4_double_words1):
test %ecx, %ecx
jz L(equal)
- mov 12(%rsi), %edx
- mov 12(%rdi), %eax
- sub %edx, %eax
+ mov 12(%rsi), %ecx
+ cmp %ecx, 12(%rdi)
+ jne L(nequal)
+ xor %eax, %eax
ret
.p2align 4
L(less4_double_words):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words)
and $15, %dl
jz L(second_double_word)
mov (%rdi), %eax
- sub (%rsi), %eax
+ cmp (%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(second_double_word):
mov 4(%rdi), %eax
- sub 4(%rsi), %eax
+ cmp 4(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
@@ -810,29 +816,34 @@ L(next_two_double_words):
and $15, %dh
jz L(fourth_double_word)
mov 8(%rdi), %eax
- sub 8(%rsi), %eax
+ cmp 8(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(fourth_double_word):
mov 12(%rdi), %eax
- sub 12(%rsi), %eax
+ cmp 12(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(less4_double_words_16):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words_16)
and $15, %dl
jz L(second_double_word_16)
mov 16(%rdi), %eax
- sub 16(%rsi), %eax
+ cmp 16(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(second_double_word_16):
mov 20(%rdi), %eax
- sub 20(%rsi), %eax
+ cmp 20(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
@@ -840,29 +851,34 @@ L(next_two_double_words_16):
and $15, %dh
jz L(fourth_double_word_16)
mov 24(%rdi), %eax
- sub 24(%rsi), %eax
+ cmp 24(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(fourth_double_word_16):
mov 28(%rdi), %eax
- sub 28(%rsi), %eax
+ cmp 28(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(less4_double_words_32):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words_32)
and $15, %dl
jz L(second_double_word_32)
mov 32(%rdi), %eax
- sub 32(%rsi), %eax
+ cmp 32(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(second_double_word_32):
mov 36(%rdi), %eax
- sub 36(%rsi), %eax
+ cmp 36(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
@@ -870,29 +886,34 @@ L(next_two_double_words_32):
and $15, %dh
jz L(fourth_double_word_32)
mov 40(%rdi), %eax
- sub 40(%rsi), %eax
+ cmp 40(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(fourth_double_word_32):
mov 44(%rdi), %eax
- sub 44(%rsi), %eax
+ cmp 44(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(less4_double_words_48):
+ xor %eax, %eax
test %dl, %dl
jz L(next_two_double_words_48)
and $15, %dl
jz L(second_double_word_48)
mov 48(%rdi), %eax
- sub 48(%rsi), %eax
+ cmp 48(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(second_double_word_48):
mov 52(%rdi), %eax
- sub 52(%rsi), %eax
+ cmp 52(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
@@ -900,23 +921,21 @@ L(next_two_double_words_48):
and $15, %dh
jz L(fourth_double_word_48)
mov 56(%rdi), %eax
- sub 56(%rsi), %eax
+ cmp 56(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(fourth_double_word_48):
mov 60(%rdi), %eax
- sub 60(%rsi), %eax
- ret
-
- .p2align 4
-L(return):
+ cmp 60(%rsi), %eax
+ jne L(nequal)
ret
.p2align 4
L(nequal):
mov $1, %eax
- ja L(nequal_bigger)
+ jg L(nequal_bigger)
neg %eax
L(nequal_bigger):
diff --git a/sysdeps/x86_64/wcslen.S b/sysdeps/x86_64/wcslen.S
new file mode 100644
index 0000000000..0343ac78d0
--- /dev/null
+++ b/sysdeps/x86_64/wcslen.S
@@ -0,0 +1,239 @@
+/* Optimized wcslen for x86-64 with SSE2.
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+
+ .text
+ENTRY (__wcslen)
+ cmpl $0, (%rdi)
+ jz L(exit_tail0)
+ cmpl $0, 4(%rdi)
+ jz L(exit_tail1)
+ cmpl $0, 8(%rdi)
+ jz L(exit_tail2)
+ cmpl $0, 12(%rdi)
+ jz L(exit_tail3)
+ cmpl $0, 16(%rdi)
+ jz L(exit_tail4)
+ cmpl $0, 20(%rdi)
+ jz L(exit_tail5)
+ cmpl $0, 24(%rdi)
+ jz L(exit_tail6)
+ cmpl $0, 28(%rdi)
+ jz L(exit_tail7)
+
+ pxor %xmm0, %xmm0
+
+ lea 32(%rdi), %rax
+ lea 16(%rdi), %rcx
+ and $-16, %rax
+
+ pcmpeqd (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ pxor %xmm1, %xmm1
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ pxor %xmm2, %xmm2
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm2
+ pmovmskb %xmm2, %edx
+ pxor %xmm3, %xmm3
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm2
+ pmovmskb %xmm2, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm0
+ pmovmskb %xmm0, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm1
+ pmovmskb %xmm1, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm2
+ pmovmskb %xmm2, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ pcmpeqd (%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 16(%rax), %rax
+ jnz L(exit)
+
+ and $-0x40, %rax
+
+ .p2align 4
+L(aligned_64_loop):
+ movaps (%rax), %xmm0
+ movaps 16(%rax), %xmm1
+ movaps 32(%rax), %xmm2
+ movaps 48(%rax), %xmm6
+
+ pminub %xmm1, %xmm0
+ pminub %xmm6, %xmm2
+ pminub %xmm0, %xmm2
+ pcmpeqd %xmm3, %xmm2
+ pmovmskb %xmm2, %edx
+ test %edx, %edx
+ lea 64(%rax), %rax
+ jz L(aligned_64_loop)
+
+ pcmpeqd -64(%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea 48(%rcx), %rcx
+ jnz L(exit)
+
+ pcmpeqd %xmm1, %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea -16(%rcx), %rcx
+ jnz L(exit)
+
+ pcmpeqd -32(%rax), %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea -16(%rcx), %rcx
+ jnz L(exit)
+
+ pcmpeqd %xmm6, %xmm3
+ pmovmskb %xmm3, %edx
+ test %edx, %edx
+ lea -16(%rcx), %rcx
+ jnz L(exit)
+
+ jmp L(aligned_64_loop)
+
+ .p2align 4
+L(exit):
+ sub %rcx, %rax
+ shr $2, %rax
+ test %dl, %dl
+ jz L(exit_high)
+
+ mov %dl, %cl
+ and $15, %cl
+ jz L(exit_1)
+ ret
+
+ .p2align 4
+L(exit_high):
+ mov %dh, %ch
+ and $15, %ch
+ jz L(exit_3)
+ add $2, %rax
+ ret
+
+ .p2align 4
+L(exit_1):
+ add $1, %rax
+ ret
+
+ .p2align 4
+L(exit_3):
+ add $3, %rax
+ ret
+
+ .p2align 4
+L(exit_tail0):
+ xor %rax, %rax
+ ret
+
+ .p2align 4
+L(exit_tail1):
+ mov $1, %rax
+ ret
+
+ .p2align 4
+L(exit_tail2):
+ mov $2, %rax
+ ret
+
+ .p2align 4
+L(exit_tail3):
+ mov $3, %rax
+ ret
+
+ .p2align 4
+L(exit_tail4):
+ mov $4, %rax
+ ret
+
+ .p2align 4
+L(exit_tail5):
+ mov $5, %rax
+ ret
+
+ .p2align 4
+L(exit_tail6):
+ mov $6, %rax
+ ret
+
+ .p2align 4
+L(exit_tail7):
+ mov $7, %rax
+ ret
+
+END (__wcslen)
+
+weak_alias(__wcslen, wcslen)
diff --git a/sysdeps/x86_64/wcsrchr.S b/sysdeps/x86_64/wcsrchr.S
new file mode 100644
index 0000000000..c2e4b7e97a
--- /dev/null
+++ b/sysdeps/x86_64/wcsrchr.S
@@ -0,0 +1,283 @@
+/* wcsrchr with SSSE3
+ Copyright (C) 2011 Free Software Foundation, Inc.
+ Contributed by Intel Corporation.
+ 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 <sysdep.h>
+
+ .text
+ENTRY (wcsrchr)
+
+ movd %rsi, %xmm1
+ mov %rdi, %rcx
+ punpckldq %xmm1, %xmm1
+ pxor %xmm2, %xmm2
+ punpckldq %xmm1, %xmm1
+ and $63, %rcx
+ cmp $48, %rcx
+ ja L(crosscache)
+
+ movdqu (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rcx
+ pmovmskb %xmm0, %rax
+ add $16, %rdi
+
+ test %rax, %rax
+ jnz L(unaligned_match1)
+
+ test %rcx, %rcx
+ jnz L(return_null)
+
+ and $-16, %rdi
+ xor %r8, %r8
+ jmp L(loop)
+
+ .p2align 4
+L(unaligned_match1):
+ test %rcx, %rcx
+ jnz L(prolog_find_zero_1)
+
+ mov %rax, %r8
+ mov %rdi, %rsi
+ and $-16, %rdi
+ jmp L(loop)
+
+ .p2align 4
+L(crosscache):
+ and $15, %rcx
+ and $-16, %rdi
+ pxor %xmm3, %xmm3
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm3
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm3, %rdx
+ pmovmskb %xmm0, %rax
+ shr %cl, %rdx
+ shr %cl, %rax
+ add $16, %rdi
+
+ test %rax, %rax
+ jnz L(unaligned_match)
+
+ test %rdx, %rdx
+ jnz L(return_null)
+
+ xor %r8, %r8
+ jmp L(loop)
+
+ .p2align 4
+L(unaligned_match):
+ test %rdx, %rdx
+ jnz L(prolog_find_zero)
+
+ mov %rax, %r8
+ lea (%rdi, %rcx), %rsi
+
+/* Loop start on aligned string. */
+ .p2align 4
+L(loop):
+ movdqa (%rdi), %xmm0
+ pcmpeqd %xmm0, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm0
+ pmovmskb %xmm2, %rcx
+ pmovmskb %xmm0, %rax
+ or %rax, %rcx
+ jnz L(matches)
+
+ movdqa (%rdi), %xmm3
+ pcmpeqd %xmm3, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm3
+ pmovmskb %xmm2, %rcx
+ pmovmskb %xmm3, %rax
+ or %rax, %rcx
+ jnz L(matches)
+
+ movdqa (%rdi), %xmm4
+ pcmpeqd %xmm4, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm4
+ pmovmskb %xmm2, %rcx
+ pmovmskb %xmm4, %rax
+ or %rax, %rcx
+ jnz L(matches)
+
+ movdqa (%rdi), %xmm5
+ pcmpeqd %xmm5, %xmm2
+ add $16, %rdi
+ pcmpeqd %xmm1, %xmm5
+ pmovmskb %xmm2, %rcx
+ pmovmskb %xmm5, %rax
+ or %rax, %rcx
+ jz L(loop)
+
+ .p2align 4
+L(matches):
+ test %rax, %rax
+ jnz L(match)
+L(return_value):
+ test %r8, %r8
+ jz L(return_null)
+ mov %r8, %rax
+ mov %rsi, %rdi
+
+ test $15 << 4, %ah
+ jnz L(match_fourth_wchar)
+ test %ah, %ah
+ jnz L(match_third_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(match):
+ pmovmskb %xmm2, %rcx
+ test %rcx, %rcx
+ jnz L(find_zero)
+ mov %rax, %r8
+ mov %rdi, %rsi
+ jmp L(loop)
+
+ .p2align 4
+L(find_zero):
+ test $15, %cl
+ jnz L(find_zero_in_first_wchar)
+ test %cl, %cl
+ jnz L(find_zero_in_second_wchar)
+ test $15, %ch
+ jnz L(find_zero_in_third_wchar)
+
+ and $1 << 13 - 1, %rax
+ jz L(return_value)
+
+ test $15 << 4, %ah
+ jnz L(match_fourth_wchar)
+ test %ah, %ah
+ jnz L(match_third_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(find_zero_in_first_wchar):
+ test $1, %rax
+ jz L(return_value)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(find_zero_in_second_wchar):
+ and $1 << 5 - 1, %rax
+ jz L(return_value)
+
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(find_zero_in_third_wchar):
+ and $1 << 9 - 1, %rax
+ jz L(return_value)
+
+ test %ah, %ah
+ jnz L(match_third_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(prolog_find_zero):
+ add %rcx, %rdi
+ mov %rdx, %rcx
+L(prolog_find_zero_1):
+ test $15, %cl
+ jnz L(prolog_find_zero_in_first_wchar)
+ test %cl, %cl
+ jnz L(prolog_find_zero_in_second_wchar)
+ test $15, %ch
+ jnz L(prolog_find_zero_in_third_wchar)
+
+ and $1 << 13 - 1, %rax
+ jz L(return_null)
+
+ test $15 << 4, %ah
+ jnz L(match_fourth_wchar)
+ test %ah, %ah
+ jnz L(match_third_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(prolog_find_zero_in_first_wchar):
+ test $1, %rax
+ jz L(return_null)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(prolog_find_zero_in_second_wchar):
+ and $1 << 5 - 1, %rax
+ jz L(return_null)
+
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(prolog_find_zero_in_third_wchar):
+ and $1 << 9 - 1, %rax
+ jz L(return_null)
+
+ test %ah, %ah
+ jnz L(match_third_wchar)
+ test $15 << 4, %al
+ jnz L(match_second_wchar)
+ lea -16(%rdi), %rax
+ ret
+
+ .p2align 4
+L(match_second_wchar):
+ lea -12(%rdi), %rax
+ ret
+
+ .p2align 4
+L(match_third_wchar):
+ lea -8(%rdi), %rax
+ ret
+
+ .p2align 4
+L(match_fourth_wchar):
+ lea -4(%rdi), %rax
+ ret
+
+ .p2align 4
+L(return_null):
+ xor %rax, %rax
+ ret
+
+END (wcsrchr)
diff --git a/time/getdate.c b/time/getdate.c
index cbaa41dfd2..a95bad4c4e 100644
--- a/time/getdate.c
+++ b/time/getdate.c
@@ -1,5 +1,5 @@
/* Convert a string representation of time to a time value.
- Copyright (C) 1997,1998,1999,2000,2001,2003 Free Software Foundation, Inc.
+ Copyright (C) 1997-2001,2003,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Mark Kettenis <kettenis@phys.uva.nl>, 1997.
@@ -44,7 +44,7 @@ static int check_mday (int year, int mon, int mday);
6 memory allication failed (not enough memory available),
7 there is no line in the template that matches the input,
8 invalid input specification Example: February 31 or a time is
- specified that can not be represented in a time_t (representing
+ specified that can not be represented in a time_t (representing
the time in seconds since 00:00:00 UTC, January 1, 1970) */
int getdate_err;
@@ -129,7 +129,7 @@ __getdate_r (const char *string, struct tm *tp)
return 2;
/* Open the template file. */
- fp = fopen (datemsk, "rc");
+ fp = fopen (datemsk, "rce");
if (fp == NULL)
return 2;
diff --git a/time/tst-mktime2.c b/time/tst-mktime2.c
index 0e4fd1e786..bc7cc5818b 100644
--- a/time/tst-mktime2.c
+++ b/time/tst-mktime2.c
@@ -1,4 +1,6 @@
/* Test program from Paul Eggert and Tony Leneis. */
+
+#include <limits.h>
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
diff --git a/time/tzfile.c b/time/tzfile.c
index f4cba46e50..a8c1c0e4c8 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009
+/* Copyright (C) 1991-1993,1995-2001,2003,2004,2006,2007,2009,2011
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -178,8 +178,8 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
}
/* Note the file is opened with cancellation in the I/O functions
- disabled. */
- f = fopen (file, "rc");
+ disabled and if available FD_CLOEXEC set. */
+ f = fopen (file, "rce");
if (f == NULL)
goto ret_free_transitions;
@@ -234,23 +234,58 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
goto read_again;
}
+ if (__builtin_expect (num_transitions
+ > ((SIZE_MAX - (__alignof__ (struct ttinfo) - 1))
+ / (sizeof (time_t) + 1)), 0))
+ goto lose;
total_size = num_transitions * (sizeof (time_t) + 1);
total_size = ((total_size + __alignof__ (struct ttinfo) - 1)
& ~(__alignof__ (struct ttinfo) - 1));
types_idx = total_size;
- total_size += num_types * sizeof (struct ttinfo) + chars;
+ if (__builtin_expect (num_types
+ > (SIZE_MAX - total_size) / sizeof (struct ttinfo), 0))
+ goto lose;
+ total_size += num_types * sizeof (struct ttinfo);
+ if (__builtin_expect (chars > SIZE_MAX - total_size, 0))
+ goto lose;
+ total_size += chars;
+ if (__builtin_expect (__alignof__ (struct leap) - 1
+ > SIZE_MAX - total_size, 0))
+ goto lose;
total_size = ((total_size + __alignof__ (struct leap) - 1)
& ~(__alignof__ (struct leap) - 1));
leaps_idx = total_size;
+ if (__builtin_expect (num_leaps
+ > (SIZE_MAX - total_size) / sizeof (struct leap), 0))
+ goto lose;
total_size += num_leaps * sizeof (struct leap);
- tzspec_len = (sizeof (time_t) == 8 && trans_width == 8
- ? st.st_size - (ftello (f)
- + num_transitions * (8 + 1)
- + num_types * 6
- + chars
- + num_leaps * 12
- + num_isstd
- + num_isgmt) - 1 : 0);
+ tzspec_len = 0;
+ if (sizeof (time_t) == 8 && trans_width == 8)
+ {
+ off_t rem = st.st_size - ftello (f);
+ if (__builtin_expect (rem < 0
+ || (size_t) rem < (num_transitions * (8 + 1)
+ + num_types * 6
+ + chars), 0))
+ goto lose;
+ tzspec_len = (size_t) rem - (num_transitions * (8 + 1)
+ + num_types * 6
+ + chars);
+ if (__builtin_expect (num_leaps > SIZE_MAX / 12
+ || tzspec_len < num_leaps * 12, 0))
+ goto lose;
+ tzspec_len -= num_leaps * 12;
+ if (__builtin_expect (tzspec_len < num_isstd, 0))
+ goto lose;
+ tzspec_len -= num_isstd;
+ if (__builtin_expect (tzspec_len == 0 || tzspec_len - 1 < num_isgmt, 0))
+ goto lose;
+ tzspec_len -= num_isgmt + 1;
+ if (__builtin_expect (SIZE_MAX - total_size < tzspec_len, 0))
+ goto lose;
+ }
+ if (__builtin_expect (SIZE_MAX - total_size - tzspec_len < extra, 0))
+ goto lose;
/* Allocate enough memory including the extra block requested by the
caller. */
diff --git a/version.h b/version.h
index a37c4c77d4..1dac42529b 100644
--- a/version.h
+++ b/version.h
@@ -1,4 +1,4 @@
/* This file just defines the current version number of libc. */
-#define RELEASE "development"
-#define VERSION "2.14.90"
+#define RELEASE "stable"
+#define VERSION "2.15"
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index dbb6756277..8b1ae6c805 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -42,7 +42,7 @@ routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
isoc99_wscanf isoc99_vwscanf isoc99_fwscanf isoc99_vfwscanf \
isoc99_swscanf isoc99_vswscanf
-strop-tests := wcscmp wmemcmp
+strop-tests := wcscmp wmemcmp wcslen wcschr wcsrchr wcscpy
tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
wcsatcliff $(addprefix test-,$(strop-tests))
diff --git a/wcsmbs/test-wcschr.c b/wcsmbs/test-wcschr.c
new file mode 100644
index 0000000000..be0abf7aed
--- /dev/null
+++ b/wcsmbs/test-wcschr.c
@@ -0,0 +1,2 @@
+#define WIDE 1
+#include "../string/test-strchr.c"
diff --git a/wcsmbs/test-wcscpy.c b/wcsmbs/test-wcscpy.c
new file mode 100644
index 0000000000..b7cad535f3
--- /dev/null
+++ b/wcsmbs/test-wcscpy.c
@@ -0,0 +1,2 @@
+#define WIDE 1
+#include "../string/test-strcpy.c"
diff --git a/wcsmbs/test-wcslen.c b/wcsmbs/test-wcslen.c
new file mode 100644
index 0000000000..496fa185e2
--- /dev/null
+++ b/wcsmbs/test-wcslen.c
@@ -0,0 +1,2 @@
+#define WIDE 1
+#include "../string/test-strlen.c"
diff --git a/wcsmbs/test-wcsrchr.c b/wcsmbs/test-wcsrchr.c
new file mode 100644
index 0000000000..95a5568742
--- /dev/null
+++ b/wcsmbs/test-wcsrchr.c
@@ -0,0 +1,2 @@
+#define WIDE 1
+#include "../string/test-strrchr.c"
diff --git a/wcsmbs/wcschr.c b/wcsmbs/wcschr.c
index 15b55d4543..1a31f74816 100644
--- a/wcsmbs/wcschr.c
+++ b/wcsmbs/wcschr.c
@@ -18,8 +18,11 @@
#include <wchar.h>
-
/* Find the first occurrence of WC in WCS. */
+#ifdef WCSCHR
+# define wcschr WCSCHR
+#endif
+
wchar_t *
wcschr (wcs, wc)
register const wchar_t *wcs;
diff --git a/wcsmbs/wcscmp.c b/wcsmbs/wcscmp.c
index 6c93f702f6..98728359b0 100644
--- a/wcsmbs/wcscmp.c
+++ b/wcsmbs/wcscmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -31,17 +31,17 @@ WCSCMP (s1, s2)
const wchar_t *s1;
const wchar_t *s2;
{
- wint_t c1, c2;
+ wchar_t c1, c2;
do
{
- c1 = (wint_t) *s1++;
- c2 = (wint_t) *s2++;
- if (c1 == L'\0')
+ c1 = *s1++;
+ c2 = *s2++;
+ if (c2 == L'\0')
return c1 - c2;
}
while (c1 == c2);
- return c1 - c2;
+ return c1 < c2 ? -1 : 1;
}
libc_hidden_def (WCSCMP)
diff --git a/wcsmbs/wcslen.c b/wcsmbs/wcslen.c
index 1bced4bc98..991e151720 100644
--- a/wcsmbs/wcslen.c
+++ b/wcsmbs/wcslen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
@@ -19,8 +19,11 @@
#include <wchar.h>
-
/* Return length of string S. */
+#ifdef WCSLEN
+# define __wcslen WCSLEN
+#endif
+
size_t
__wcslen (s)
const wchar_t *s;
@@ -40,4 +43,6 @@ __wcslen (s)
return len;
}
+#ifndef WCSLEN
weak_alias (__wcslen, wcslen)
+#endif
diff --git a/wcsmbs/wmemcmp.c b/wcsmbs/wmemcmp.c
index c6a321b89d..9bd556e64b 100644
--- a/wcsmbs/wmemcmp.c
+++ b/wcsmbs/wmemcmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
@@ -19,34 +19,37 @@
#include <wchar.h>
+#ifndef WMEMCMP
+# define WMEMCMP wmemcmp
+#endif
int
-wmemcmp (s1, s2, n)
+WMEMCMP (s1, s2, n)
const wchar_t *s1;
const wchar_t *s2;
size_t n;
{
- register wint_t c1;
- register wint_t c2;
+ register wchar_t c1;
+ register wchar_t c2;
while (n >= 4)
{
- c1 = (wint_t) s1[0];
- c2 = (wint_t) s2[0];
+ c1 = s1[0];
+ c2 = s2[0];
if (c1 - c2 != 0)
- return c1 - c2;
- c1 = (wint_t) s1[1];
- c2 = (wint_t) s2[1];
+ return c1 > c2 ? 1 : -1;
+ c1 = s1[1];
+ c2 = s2[1];
if (c1 - c2 != 0)
- return c1 - c2;
- c1 = (wint_t) s1[2];
- c2 = (wint_t) s2[2];
+ return c1 > c2 ? 1 : -1;
+ c1 = s1[2];
+ c2 = s2[2];
if (c1 - c2 != 0)
- return c1 - c2;
- c1 = (wint_t) s1[3];
- c2 = (wint_t) s2[3];
+ return c1 > c2 ? 1 : -1;
+ c1 = s1[3];
+ c2 = s2[3];
if (c1 - c2 != 0)
- return c1 - c2;
+ return c1 > c2 ? 1 : -1;
s1 += 4;
s2 += 4;
n -= 4;
@@ -54,30 +57,30 @@ wmemcmp (s1, s2, n)
if (n > 0)
{
- c1 = (wint_t) s1[0];
- c2 = (wint_t) s2[0];
+ c1 = s1[0];
+ c2 = s2[0];
if (c1 - c2 != 0)
- return c1 - c2;
+ return c1 > c2 ? 1 : -1;
++s1;
++s2;
--n;
}
if (n > 0)
{
- c1 = (wint_t) s1[0];
- c2 = (wint_t) s2[0];
+ c1 = s1[0];
+ c2 = s2[0];
if (c1 - c2 != 0)
- return c1 - c2;
+ return c1 > c2 ? 1 : -1;
++s1;
++s2;
--n;
}
if (n > 0)
{
- c1 = (wint_t) s1[0];
- c2 = (wint_t) s2[0];
+ c1 = s1[0];
+ c2 = s2[0];
if (c1 - c2 != 0)
- return c1 - c2;
+ return c1 > c2 ? 1 : -1;
}
return 0;