glibc:hjl/pr22353/master

Last commit made on 2017-10-30
Get this branch:
git clone -b hjl/pr22353/master https://git.launchpad.net/glibc

Branch merges

Branch information

Name:
hjl/pr22353/master
Repository:
lp:glibc

Recent commits

610a04b... by "H.J. Lu" <email address hidden> on 2017-10-27

Add strcpy-stosb.S

9b733b7... by "H.J. Lu" <email address hidden> on 2017-10-27

Add i386 strcpy.S

9a89973... by "H.J. Lu" <email address hidden> on 2017-10-27

i586: Use a jump table in strcpy.S [BZ #22353]

i586 strcpy.S used a clever trick with LEA to avoid jump table:

/* ECX has the last 2 bits of the address of source - 1. */
 andl $3, %ecx

        call 2f
2: popl %edx
 /* 0xb is the distance between 2: and 1:. */
        leal 0xb(%edx,%ecx,8), %ecx
        jmp *%ecx

        .align 8
1: /* ECX == 0 */
        orb (%esi), %al
        jz L(end)
        stosb
        xorl %eax, %eax
        incl %esi
    /* ECX == 1 */
        orb (%esi), %al
        jz L(end)
        stosb
        xorl %eax, %eax
        incl %esi
    /* ECX == 2 */
        orb (%esi), %al
        jz L(end)
        stosb
        xorl %eax, %eax
        incl %esi
    /* ECX == 3 */
L(1): movl (%esi), %ecx
        leal 4(%esi),%esi

This may fail if there are instruction length changes before L(1):. This
patch replaces it with a jump table which works with any instruction length
changes.

Tested on i586 and i686 with and without --disable-multi-arch.

 [BZ #22353]
 * sysdeps/i386/i586/strcpy.S (JMPTBL): New.
 (BRANCH_TO_JMPTBL_ENTRY): Likewise.
 (STRCPY): Use it.
 (1): Renamed to ...
 (L(Src0)): This.
 (L(Src1)): New.
 (L(Src2)): Likewise.
 (L(1)): Renamed to ...
 (L(Src3)): This.
 (L(SrcTable)): New.

dadf23f... by Florian Weimer on 2017-10-30

tst-gnuglob64: New test for glob64 based on tst-gnuglob

Reviewed-by: Adhemerval Zanella <email address hidden>

fbcecc0... by Mike FABIAN <email address hidden> on 2017-10-30

csb_PL locale: Fix “abmon” for March and use a better translation for March in “mon” [BZ #19485]

 [BZ #19485]
 * localedata/locales/csb_PL (LC_TIME): Fix “abmon” for March
 and use a better translation for March in “mon”.
 * localedata/locales/csb_PL: Use more ASCII to improve the
 readability of the source.

b110af8... by Mike FABIAN <email address hidden> on 2017-10-30

km_KH locale: remove tags which were using Lao characters [BZ #13953]

 [BZ #13953]
 * localedata/locales/km_KH: Use ASCII as much
 as possible for better readability of the source and
 remove useless comments.
 * localedata/locales/km_KH (LC_TIME): Remove era stuff, it
 was commented out and apparently wrong anyway because it was
 using Lao characters. If Buddhist era should be used
 for km_KH, a native speaker should write the correct formaat
 for Khmer.
 * localedata/locales/km_KH (LC_TIME): Add first_weekday 1
 (According to CLDR, the first weekday for Cambodia is Sunday).
 * localedata/locales/km_KH (LC_NAME): Remove name_mr and name_mrs
 (These were using Lao characters which must be wrong. If we get
 the correct data from a native speaker, we could add it back, until
 then it is better not to have name_mr and name_mrs at all than
 having it wrong).

f301e53... by Rafal Luzynski <email address hidden> on 2017-07-11

Correct the size of _nl_value_type_LC_... arrays.

There were several problems with checking the array size in the past,
for example BZ#356, caused by incorrectly assuming that every locale
token represents one element. In fact, if a token represented
a subarray, for example an array of month names or characters category
and it appeared at the end of the array the compiler assumed that
the array ends just after the first element of the subarray.
A workaround used in the past was to skip some categories while testing,
for example LC_CTYPE. Now when we are about to add alternative month
names to LC_TIME (BZ#10871) this will fail again.

 * locale/loadlocale.c: Correct size of
 _nl_value_type_LC_<category> arrays.

Reviewed-by: Zack Weinberg <email address hidden>

7e9d707... by Joseph Myers <email address hidden> on 2017-10-27

Include bits/mathcalls.h for more _FloatN, _FloatNx types.

Continuing the preparation for additional _FloatN / _FloatNx type
support, this patch arranges for <bits/mathcalls.h> and
<bits/mathcalls-helper-functions.h> to be included for each such type
under conditions and with macros defined corresponding to those
already present for _Float128.

Tested for x86_64.

 * math/math.h [__HAVE_DISTINCT_FLOAT16 || (__HAVE_FLOAT16 && !_LIBC)]:
 Include <bits/mathcalls-helper-functions.h> and <bits/mathcalls.h>
 with appropriate macros defined and undefined.
 [__HAVE_DISTINCT_FLOAT32 || (__HAVE_FLOAT32 && !_LIBC)]: Likewise.
 [__HAVE_DISTINCT_FLOAT64 || (__HAVE_FLOAT64 && !_LIBC)]: Likewise.
 [__HAVE_DISTINCT_FLOAT32X || (__HAVE_FLOAT32X && !_LIBC)]: Likewise.
 [__HAVE_DISTINCT_FLOAT64X || (__HAVE_FLOAT64X && !_LIBC)]: Likewise.
 [__HAVE_DISTINCT_FLOAT128X || (__HAVE_FLOAT128X && !_LIBC)]: Likewise.

63d3b46... by "H.J. Lu" <email address hidden> on 2017-10-27

i386: Regenerate libm-test-ulps for for gcc 7

Regenerate libm-test-ulps for gcc 7 with "-m32 -O2 -march=i586".

 * sysdeps/i386/fpu/libm-test-ulps: Regenerated for GCC 7 with
 "-O2 -march=i586".

a4cc02c... by Mike FABIAN <email address hidden> on 2017-10-27

tt_RU locale: make yesstr and nostr agree with CLDR by starting with lower case letters

 * localedata/locales/tt_RU (LC_MESSAGES): Start yesstr and nostr
 with lowercase letters to make it agree with CLDR.