platform/upstream/glibc.git
7 years agoFix s390 version of pt-longjmp.c
Andreas Schwab [Wed, 9 Aug 2017 08:36:08 +0000 (10:36 +0200)]
Fix s390 version of pt-longjmp.c

7 years agoAdd test for bug 21041
Andreas Schwab [Tue, 8 Aug 2017 15:44:32 +0000 (17:44 +0200)]
Add test for bug 21041

7 years agomemcpy_falkor: Fix code style in comments
Siddhesh Poyarekar [Wed, 9 Aug 2017 07:27:17 +0000 (12:57 +0530)]
memcpy_falkor: Fix code style in comments

7 years agoaarch64: Optimized memcpy for Qualcomm Falkor processor
Siddhesh Poyarekar [Wed, 9 Aug 2017 01:02:17 +0000 (06:32 +0530)]
aarch64: Optimized memcpy for Qualcomm Falkor processor

This is an optimized implementation of the memcpy routine that gives a
significant gain in performance for all sizes of copies on the
Qualcomm Falkor processor.  A detailed rationale of the implementation
is written in a comment in the patch.

This implementation improves time for copies up to 128 bytes by up to
15% and for larger copies by up to 35% in the glibc
microbenchmark. The memcpy-random benchmark sees improvements in all
sizes in the range of 13%-18%.

Here are the full numbers extracted from the glibc microbenchmark
using the commands:

../benchtests/scripts/compare_strings.py benchtests/bench-memcpy.out \
../benchtests/scripts/benchout_strings.schema.json \
-base=__memcpy_generic length align1 align2

../benchtests/scripts/compare_strings.py benchtests/bench-memcpy-large.out \
../benchtests/scripts/benchout_strings.schema.json \
-base=__memcpy_generic length align1 align2

../benchtests/scripts/compare_strings.py benchtests/bench-memcpy-random.out \
../benchtests/scripts/benchout_strings.schema.json \
-base=__memcpy_generic max-size

Function: memcpy
__memcpy_thunderx       __memcpy_falkor __memcpy_generic
Variant: default
================================================================================
length=1,align1=0,align2=0:     33.59 (-115.00%)        15.62 (0.00%)   15.62
length=1,align1=0,align2=0:     16.41 (-10.53%) 14.06 (5.26%)   14.84
length=1,align1=0,align2=0:     14.84 (0.00%)   14.84 (0.00%)   14.84
length=1,align1=0,align2=0:     15.62 (-5.26%)  14.06 (5.26%)   14.84
length=2,align1=0,align2=0:     15.62 (-5.26%)  14.06 (5.26%)   14.84
length=2,align1=1,align2=0:     15.62 (-5.26%)  14.06 (5.26%)   14.84
length=2,align1=0,align2=1:     14.84 (0.00%)   14.06 (5.26%)   14.84
length=2,align1=1,align2=1:     14.84 (-5.56%)  14.06 (0.00%)   14.06
length=4,align1=0,align2=0:     14.06 (0.00%)   14.06 (0.00%)   14.06
length=4,align1=2,align2=0:     14.06 (-5.88%)  14.06 (-5.88%)  13.28
length=4,align1=0,align2=2:     14.06 (0.00%)   14.06 (0.00%)   14.06
length=4,align1=2,align2=2:     14.06 (-5.88%)  14.06 (-5.88%)  13.28
length=8,align1=0,align2=0:     14.84 (-5.56%)  13.28 (5.56%)   14.06
length=8,align1=3,align2=0:     14.06 (0.00%)   13.28 (5.56%)   14.06
length=8,align1=0,align2=3:     13.28 (0.00%)   13.28 (0.00%)   13.28
length=8,align1=3,align2=3:     13.28 (-6.25%)  13.28 (-6.25%)  12.50
length=16,align1=0,align2=0:    13.28 (0.00%)   13.28 (0.00%)   13.28
length=16,align1=4,align2=0:    13.28 (0.00%)   12.50 (5.88%)   13.28
length=16,align1=0,align2=4:    13.28 (0.00%)   13.28 (0.00%)   13.28
length=16,align1=4,align2=4:    13.28 (-6.25%)  12.50 (0.00%)   12.50
length=32,align1=0,align2=0:    14.06 (0.00%)   12.50 (11.11%)  14.06
length=32,align1=5,align2=0:    13.28 (0.00%)   12.50 (5.88%)   13.28
length=32,align1=0,align2=5:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=32,align1=5,align2=5:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=64,align1=0,align2=0:    14.06 (-5.88%)  13.28 (0.00%)   13.28
length=64,align1=6,align2=0:    13.28 (0.00%)   13.28 (0.00%)   13.28
length=64,align1=0,align2=6:    14.06 (5.26%)   14.06 (5.26%)   14.84
length=64,align1=6,align2=6:    14.84 (-11.77%) 14.06 (-5.88%)  13.28
length=128,align1=0,align2=0:   17.19 (-4.76%)  14.84 (9.52%)   16.41
length=128,align1=7,align2=0:   16.41 (4.55%)   15.62 (9.09%)   17.19
length=128,align1=0,align2=7:   16.41 (0.00%)   14.06 (14.29%)  16.41
length=128,align1=7,align2=7:   16.41 (4.55%)   15.62 (9.09%)   17.19
length=256,align1=0,align2=0:   21.88 (-3.70%)  21.09 (0.00%)   21.09
length=256,align1=8,align2=0:   21.09 (-3.85%)  21.09 (-3.85%)  20.31
length=256,align1=0,align2=8:   20.31 (-4.00%)  20.31 (-4.00%)  19.53
length=256,align1=8,align2=8:   21.88 (-7.69%)  20.31 (0.00%)   20.31
length=512,align1=0,align2=0:   28.91 (-2.78%)  28.91 (-2.78%)  28.12
length=512,align1=9,align2=0:   30.47 (-2.63%)  30.47 (-2.63%)  29.69
length=512,align1=0,align2=9:   29.69 (0.00%)   29.69 (0.00%)   29.69
length=512,align1=9,align2=9:   28.12 (-2.86%)  28.12 (-2.86%)  27.34
length=1024,align1=0,align2=0:  44.53 (0.00%)   44.53 (0.00%)   44.53
length=1024,align1=10,align2=0:         50.00 (0.00%)   50.00 (0.00%)   50.00
length=1024,align1=0,align2=10:         49.22 (1.56%)   50.78 (-1.56%)  50.00
length=1024,align1=10,align2=10:        44.53 (-1.79%)  43.75 (0.00%)   43.75
length=2048,align1=0,align2=0:  77.34 (-1.02%)  76.56 (0.00%)   76.56
length=2048,align1=11,align2=0:         89.84 (0.00%)   89.84 (0.00%)   89.84
length=2048,align1=0,align2=11:         89.84 (0.00%)   89.84 (0.00%)   89.84
length=2048,align1=11,align2=11:        75.78 (0.00%)   75.78 (0.00%)   75.78
length=4096,align1=0,align2=0:  141.41 (-0.56%) 140.62 (0.00%)  140.62
length=4096,align1=12,align2=0:         171.09 (-0.46%) 170.31 (0.00%)  170.31
length=4096,align1=0,align2=12:         170.31 (0.00%)  170.31 (0.00%)  170.31
length=4096,align1=12,align2=12:        140.62 (0.00%)  140.62 (0.00%)  140.62
length=8192,align1=0,align2=0:  278.91 (-0.28%) 275.78 (0.84%)  278.12
length=8192,align1=13,align2=0:         338.28 (0.23%)  335.94 (0.92%)  339.06
length=8192,align1=0,align2=13:         338.28 (0.00%)  455.47 (-34.64%)        338.28
length=8192,align1=13,align2=13:        278.12 (-0.28%) 275.78 (0.56%)  277.34
length=16384,align1=0,align2=0:         535.94 (-0.15%) 531.25 (0.73%)  535.16
length=16384,align1=14,align2=0:        659.38 (0.12%)  659.38 (0.12%)  660.16
length=16384,align1=0,align2=14:        659.38 (0.00%)  657.03 (0.36%)  659.38
length=16384,align1=14,align2=14:       535.16 (0.44%)  532.81 (0.87%)  537.50
length=32768,align1=0,align2=0:         1260.94 (10.68%)        1121.88 (20.53%)        1411.72
length=32768,align1=15,align2=0:        1368.75 (10.02%)        1376.56 (9.50%) 1521.09
length=32768,align1=0,align2=15:        1333.59 (10.91%)        1373.44 (8.25%) 1496.88
length=32768,align1=15,align2=15:       1256.25 (13.96%)        1125.78 (22.90%)        1460.16
length=65536,align1=0,align2=0:         2853.91 (30.11%)        2589.06 (36.60%)        4083.59
length=65536,align1=16,align2=0:        2850.00 (30.14%)        2589.84 (36.52%)        4079.69
length=65536,align1=0,align2=16:        2853.12 (30.60%)        2589.84 (37.00%)        4110.94
length=65536,align1=16,align2=16:       2850.78 (30.07%)        2589.06 (36.49%)        4076.56
length=0,align1=0,align2=0:     15.62 (-5.26%)  16.41 (-10.53%) 14.84
length=0,align1=0,align2=0:     14.84 (-5.56%)  14.84 (-5.56%)  14.06
length=0,align1=0,align2=0:     14.84 (0.00%)   14.84 (0.00%)   14.84
length=0,align1=0,align2=0:     16.41 (-16.67%) 14.84 (-5.56%)  14.06
length=1,align1=0,align2=0:     15.62 (4.76%)   15.62 (4.76%)   16.41
length=1,align1=1,align2=0:     15.62 (0.00%)   14.84 (5.00%)   15.62
length=1,align1=0,align2=1:     14.84 (0.00%)   14.84 (0.00%)   14.84
length=1,align1=1,align2=1:     14.84 (0.00%)   14.06 (5.26%)   14.84
length=2,align1=0,align2=0:     14.84 (0.00%)   14.06 (5.26%)   14.84
length=2,align1=2,align2=0:     14.84 (0.00%)   14.06 (5.26%)   14.84
length=2,align1=0,align2=2:     14.84 (-5.56%)  14.06 (0.00%)   14.06
length=2,align1=2,align2=2:     14.84 (0.00%)   14.06 (5.26%)   14.84
length=3,align1=0,align2=0:     14.84 (0.00%)   14.84 (0.00%)   14.84
length=3,align1=3,align2=0:     14.84 (-5.56%)  14.06 (0.00%)   14.06
length=3,align1=0,align2=3:     15.62 (-11.11%) 14.06 (0.00%)   14.06
length=3,align1=3,align2=3:     14.84 (0.00%)   14.06 (5.26%)   14.84
length=4,align1=0,align2=0:     17.97 (-27.78%) 14.06 (0.00%)   14.06
length=4,align1=4,align2=0:     13.28 (5.56%)   14.06 (0.00%)   14.06
length=4,align1=0,align2=4:     14.06 (0.00%)   13.28 (5.56%)   14.06
length=4,align1=4,align2=4:     13.28 (5.56%)   13.28 (5.56%)   14.06
length=5,align1=0,align2=0:     13.28 (5.56%)   13.28 (5.56%)   14.06
length=5,align1=5,align2=0:     14.06 (0.00%)   14.06 (0.00%)   14.06
length=5,align1=0,align2=5:     14.06 (0.00%)   13.28 (5.56%)   14.06
length=5,align1=5,align2=5:     14.06 (-5.88%)  14.06 (-5.88%)  13.28
length=6,align1=0,align2=0:     14.06 (-5.88%)  14.06 (-5.88%)  13.28
length=6,align1=6,align2=0:     14.06 (0.00%)   14.06 (0.00%)   14.06
length=6,align1=0,align2=6:     14.06 (0.00%)   13.28 (5.56%)   14.06
length=6,align1=6,align2=6:     14.06 (0.00%)   13.28 (5.56%)   14.06
length=7,align1=0,align2=0:     14.84 (-11.77%) 14.06 (-5.88%)  13.28
length=7,align1=7,align2=0:     13.28 (0.00%)   14.06 (-5.88%)  13.28
length=7,align1=0,align2=7:     14.06 (0.00%)   14.06 (0.00%)   14.06
length=7,align1=7,align2=7:     14.06 (0.00%)   14.06 (0.00%)   14.06
length=8,align1=0,align2=0:     14.06 (-5.88%)  13.28 (0.00%)   13.28
length=8,align1=8,align2=0:     14.06 (0.00%)   13.28 (5.56%)   14.06
length=8,align1=0,align2=8:     13.28 (0.00%)   13.28 (0.00%)   13.28
length=8,align1=8,align2=8:     14.06 (-5.88%)  13.28 (0.00%)   13.28
length=9,align1=0,align2=0:     13.28 (0.00%)   13.28 (0.00%)   13.28
length=9,align1=9,align2=0:     13.28 (0.00%)   13.28 (0.00%)   13.28
length=9,align1=0,align2=9:     13.28 (0.00%)   14.06 (-5.88%)  13.28
length=9,align1=9,align2=9:     14.06 (-5.88%)  13.28 (0.00%)   13.28
length=10,align1=0,align2=0:    14.06 (0.00%)   13.28 (5.56%)   14.06
length=10,align1=10,align2=0:   14.06 (-5.88%)  14.06 (-5.88%)  13.28
length=10,align1=0,align2=10:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=10,align1=10,align2=10:  14.06 (0.00%)   13.28 (5.56%)   14.06
length=11,align1=0,align2=0:    14.06 (-5.88%)  13.28 (0.00%)   13.28
length=11,align1=11,align2=0:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=11,align1=0,align2=11:   13.28 (0.00%)   13.28 (0.00%)   13.28
length=11,align1=11,align2=11:  13.28 (0.00%)   13.28 (0.00%)   13.28
length=12,align1=0,align2=0:    14.06 (-5.88%)  13.28 (0.00%)   13.28
length=12,align1=12,align2=0:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=12,align1=0,align2=12:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=12,align1=12,align2=12:  14.06 (0.00%)   13.28 (5.56%)   14.06
length=13,align1=0,align2=0:    14.06 (-5.88%)  13.28 (0.00%)   13.28
length=13,align1=13,align2=0:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=13,align1=0,align2=13:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=13,align1=13,align2=13:  13.28 (0.00%)   13.28 (0.00%)   13.28
length=14,align1=0,align2=0:    13.28 (0.00%)   13.28 (0.00%)   13.28
length=14,align1=14,align2=0:   13.28 (5.56%)   13.28 (5.56%)   14.06
length=14,align1=0,align2=14:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=14,align1=14,align2=14:  14.06 (-5.88%)  13.28 (0.00%)   13.28
length=15,align1=0,align2=0:    14.06 (-5.88%)  13.28 (0.00%)   13.28
length=15,align1=15,align2=0:   14.06 (-5.88%)  14.06 (-5.88%)  13.28
length=15,align1=0,align2=15:   13.28 (0.00%)   13.28 (0.00%)   13.28
length=15,align1=15,align2=15:  13.28 (0.00%)   14.06 (-5.88%)  13.28
length=16,align1=0,align2=0:    14.06 (-5.88%)  13.28 (0.00%)   13.28
length=16,align1=16,align2=0:   13.28 (5.56%)   14.06 (0.00%)   14.06
length=16,align1=0,align2=16:   14.84 (-11.77%) 13.28 (0.00%)   13.28
length=16,align1=16,align2=16:  13.28 (-6.25%)  12.50 (0.00%)   12.50
length=17,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=17,align1=17,align2=0:   14.84 (-11.77%) 12.50 (5.88%)   13.28
length=17,align1=0,align2=17:   14.84 (-5.56%)  12.50 (11.11%)  14.06
length=17,align1=17,align2=17:  14.84 (-11.77%) 12.50 (5.88%)   13.28
length=18,align1=0,align2=0:    14.06 (0.00%)   12.50 (11.11%)  14.06
length=18,align1=18,align2=0:   13.28 (5.56%)   12.50 (11.11%)  14.06
length=18,align1=0,align2=18:   14.06 (-5.88%)  12.50 (5.88%)   13.28
length=18,align1=18,align2=18:  14.06 (0.00%)   12.50 (11.11%)  14.06
length=19,align1=0,align2=0:    14.06 (-5.88%)  13.28 (0.00%)   13.28
length=19,align1=19,align2=0:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=19,align1=0,align2=19:   14.84 (-5.56%)  12.50 (11.11%)  14.06
length=19,align1=19,align2=19:  14.06 (-5.88%)  12.50 (5.88%)   13.28
length=20,align1=0,align2=0:    14.84 (-11.77%) 12.50 (5.88%)   13.28
length=20,align1=20,align2=0:   14.06 (0.00%)   12.50 (11.11%)  14.06
length=20,align1=0,align2=20:   14.06 (-5.88%)  12.50 (5.88%)   13.28
length=20,align1=20,align2=20:  14.06 (0.00%)   13.28 (5.56%)   14.06
length=21,align1=0,align2=0:    14.84 (-5.56%)  12.50 (11.11%)  14.06
length=21,align1=21,align2=0:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=21,align1=0,align2=21:   14.84 (-11.77%) 12.50 (5.88%)   13.28
length=21,align1=21,align2=21:  13.28 (5.56%)   13.28 (5.56%)   14.06
length=22,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=22,align1=22,align2=0:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=22,align1=0,align2=22:   14.06 (0.00%)   12.50 (11.11%)  14.06
length=22,align1=22,align2=22:  14.06 (0.00%)   12.50 (11.11%)  14.06
length=23,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=23,align1=23,align2=0:   14.06 (-5.88%)  13.28 (0.00%)   13.28
length=23,align1=0,align2=23:   14.06 (-5.88%)  12.50 (5.88%)   13.28
length=23,align1=23,align2=23:  14.06 (-5.88%)  13.28 (0.00%)   13.28
length=24,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=24,align1=24,align2=0:   14.06 (0.00%)   13.28 (5.56%)   14.06
length=24,align1=0,align2=24:   14.84 (-11.77%) 12.50 (5.88%)   13.28
length=24,align1=24,align2=24:  14.06 (-5.88%)  13.28 (0.00%)   13.28
length=25,align1=0,align2=0:    14.06 (0.00%)   12.50 (11.11%)  14.06
length=25,align1=25,align2=0:   14.06 (0.00%)   13.28 (5.56%)   14.06
length=25,align1=0,align2=25:   14.06 (0.00%)   12.50 (11.11%)  14.06
length=25,align1=25,align2=25:  13.28 (0.00%)   13.28 (0.00%)   13.28
length=26,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=26,align1=26,align2=0:   14.06 (0.00%)   13.28 (5.56%)   14.06
length=26,align1=0,align2=26:   14.06 (-5.88%)  12.50 (5.88%)   13.28
length=26,align1=26,align2=26:  14.06 (0.00%)   13.28 (5.56%)   14.06
length=27,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=27,align1=27,align2=0:   14.06 (-5.88%)  12.50 (5.88%)   13.28
length=27,align1=0,align2=27:   14.06 (-5.88%)  12.50 (5.88%)   13.28
length=27,align1=27,align2=27:  14.06 (0.00%)   12.50 (11.11%)  14.06
length=28,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=28,align1=28,align2=0:   14.06 (0.00%)   12.50 (11.11%)  14.06
length=28,align1=0,align2=28:   14.06 (0.00%)   12.50 (11.11%)  14.06
length=28,align1=28,align2=28:  14.84 (-11.77%) 13.28 (0.00%)   13.28
length=29,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=29,align1=29,align2=0:   13.28 (0.00%)   12.50 (5.88%)   13.28
length=29,align1=0,align2=29:   14.06 (0.00%)   12.50 (11.11%)  14.06
length=29,align1=29,align2=29:  13.28 (5.56%)   12.50 (11.11%)  14.06
length=30,align1=0,align2=0:    14.06 (-5.88%)  12.50 (5.88%)   13.28
length=30,align1=30,align2=0:   13.28 (5.56%)   12.50 (11.11%)  14.06
length=30,align1=0,align2=30:   14.06 (-5.88%)  12.50 (5.88%)   13.28
length=30,align1=30,align2=30:  13.28 (0.00%)   12.50 (5.88%)   13.28
length=31,align1=0,align2=0:    13.28 (0.00%)   12.50 (5.88%)   13.28
length=31,align1=31,align2=0:   14.06 (0.00%)   12.50 (11.11%)  14.06
length=31,align1=0,align2=31:   13.28 (0.00%)   12.50 (5.88%)   13.28
length=31,align1=31,align2=31:  14.06 (0.00%)   12.50 (11.11%)  14.06
length=48,align1=0,align2=0:    14.06 (0.00%)   14.06 (0.00%)   14.06
length=48,align1=3,align2=0:    14.06 (0.00%)   14.06 (0.00%)   14.06
length=48,align1=0,align2=3:    14.06 (-5.88%)  14.06 (-5.88%)  13.28
length=48,align1=3,align2=3:    13.28 (5.56%)   14.06 (0.00%)   14.06
length=80,align1=0,align2=0:    15.62 (-11.11%) 14.84 (-5.56%)  14.06
length=80,align1=5,align2=0:    15.62 (-11.11%) 16.41 (-16.67%) 14.06
length=80,align1=0,align2=5:    14.06 (0.00%)   15.62 (-11.11%) 14.06
length=80,align1=5,align2=5:    15.62 (-5.26%)  17.19 (-15.79%) 14.84
length=96,align1=0,align2=0:    14.06 (0.00%)   14.84 (-5.56%)  14.06
length=96,align1=6,align2=0:    14.84 (-5.56%)  16.41 (-16.67%) 14.06
length=96,align1=0,align2=6:    14.06 (0.00%)   14.84 (-5.56%)  14.06
length=96,align1=6,align2=6:    14.84 (-5.56%)  17.19 (-22.22%) 14.06
length=112,align1=0,align2=0:   17.19 (-4.76%)  14.06 (14.29%)  16.41
length=112,align1=7,align2=0:   17.19 (0.00%)   16.41 (4.55%)   17.19
length=112,align1=0,align2=7:   16.41 (0.00%)   14.84 (9.52%)   16.41
length=112,align1=7,align2=7:   17.19 (0.00%)   17.19 (0.00%)   17.19
length=144,align1=0,align2=0:   17.19 (-10.00%) 17.97 (-15.00%) 15.62
length=144,align1=9,align2=0:   17.19 (-4.76%)  18.75 (-14.29%) 16.41
length=144,align1=0,align2=9:   20.31 (-8.33%)  18.75 (0.00%)   18.75
length=144,align1=9,align2=9:   18.75 (-4.35%)  18.75 (-4.35%)  17.97
length=160,align1=0,align2=0:   18.75 (-4.35%)  17.97 (0.00%)   17.97
length=160,align1=10,align2=0:  18.75 (4.00%)   18.75 (4.00%)   19.53
length=160,align1=0,align2=10:  19.53 (-4.17%)  17.97 (4.17%)   18.75
length=160,align1=10,align2=10:         18.75 (-4.35%)  18.75 (-4.35%)  17.97
length=176,align1=0,align2=0:   18.75 (-4.35%)  17.19 (4.35%)   17.97
length=176,align1=11,align2=0:  19.53 (0.00%)   19.53 (0.00%)   19.53
length=176,align1=0,align2=11:  19.53 (-4.17%)  18.75 (0.00%)   18.75
length=176,align1=11,align2=11:         18.75 (0.00%)   17.97 (4.17%)   18.75
length=192,align1=0,align2=0:   18.75 (0.00%)   17.97 (4.17%)   18.75
length=192,align1=12,align2=0:  21.09 (-8.00%)  18.75 (4.00%)   19.53
length=192,align1=0,align2=12:  18.75 (0.00%)   18.75 (0.00%)   18.75
length=192,align1=12,align2=12:         18.75 (0.00%)   17.97 (4.17%)   18.75
length=208,align1=0,align2=0:   17.97 (0.00%)   20.31 (-13.04%) 17.97
length=208,align1=13,align2=0:  19.53 (7.41%)   21.09 (0.00%)   21.09
length=208,align1=0,align2=13:  23.44 (-11.11%) 21.09 (0.00%)   21.09
length=208,align1=13,align2=13:         21.09 (-3.85%)  21.09 (-3.85%)  20.31
length=224,align1=0,align2=0:   21.09 (-8.00%)  20.31 (-4.00%)  19.53
length=224,align1=14,align2=0:  23.44 (-11.11%) 20.31 (3.70%)   21.09
length=224,align1=0,align2=14:  21.09 (3.57%)   20.31 (7.14%)   21.88
length=224,align1=14,align2=14:         20.31 (0.00%)   19.53 (3.85%)   20.31
length=240,align1=0,align2=0:   20.31 (-4.00%)  19.53 (0.00%)   19.53
length=240,align1=15,align2=0:  22.66 (0.00%)   20.31 (10.34%)  22.66
length=240,align1=0,align2=15:  20.31 (-4.00%)  20.31 (-4.00%)  19.53
length=240,align1=15,align2=15:         21.88 (0.00%)   21.09 (3.57%)   21.88
length=272,align1=0,align2=0:   20.31 (0.00%)   28.12 (-38.46%) 20.31
length=272,align1=17,align2=0:  22.66 (0.00%)   27.34 (-20.69%) 22.66
length=272,align1=0,align2=17:  25.78 (-10.00%) 28.12 (-20.00%) 23.44
length=272,align1=17,align2=17:         22.66 (-3.57%)  27.34 (-25.00%) 21.88
length=288,align1=0,align2=0:   23.44 (-7.14%)  27.34 (-25.00%) 21.88
length=288,align1=18,align2=0:  22.66 (0.00%)   27.34 (-20.69%) 22.66
length=288,align1=0,align2=18:  23.44 (-3.45%)  25.00 (-10.35%) 22.66
length=288,align1=18,align2=18:         22.66 (-3.57%)  21.88 (0.00%)   21.88
length=304,align1=0,align2=0:   21.88 (0.00%)   21.88 (0.00%)   21.88
length=304,align1=19,align2=0:  23.44 (-3.45%)  22.66 (0.00%)   22.66
length=304,align1=0,align2=19:  22.66 (0.00%)   22.66 (0.00%)   22.66
length=304,align1=19,align2=19:         22.66 (-3.57%)  21.88 (0.00%)   21.88
length=320,align1=0,align2=0:   22.66 (-3.57%)  21.88 (0.00%)   21.88
length=320,align1=20,align2=0:  22.66 (0.00%)   22.66 (0.00%)   22.66
length=320,align1=0,align2=20:  22.66 (0.00%)   22.66 (0.00%)   22.66
length=320,align1=20,align2=20:         22.66 (-3.57%)  21.88 (0.00%)   21.88
length=336,align1=0,align2=0:   21.88 (0.00%)   24.22 (-10.71%) 21.88
length=336,align1=21,align2=0:  22.66 (0.00%)   25.00 (-10.35%) 22.66
length=336,align1=0,align2=21:  25.78 (0.00%)   25.00 (3.03%)   25.78
length=336,align1=21,align2=21:         25.00 (0.00%)   23.44 (6.25%)   25.00
length=352,align1=0,align2=0:   24.22 (0.00%)   24.22 (0.00%)   24.22
length=352,align1=22,align2=0:  25.00 (0.00%)   25.00 (0.00%)   25.00
length=352,align1=0,align2=22:  25.00 (-3.23%)  25.00 (-3.23%)  24.22
length=352,align1=22,align2=22:         25.00 (-3.23%)  24.22 (0.00%)   24.22
length=368,align1=0,align2=0:   25.00 (-3.23%)  23.44 (3.23%)   24.22
length=368,align1=23,align2=0:  25.00 (0.00%)   24.22 (3.12%)   25.00
length=368,align1=0,align2=23:  25.00 (-3.23%)  25.00 (-3.23%)  24.22
length=368,align1=23,align2=23:         25.00 (-6.67%)  23.44 (0.00%)   23.44
length=384,align1=0,align2=0:   24.22 (0.00%)   24.22 (0.00%)   24.22
length=384,align1=24,align2=0:  25.00 (0.00%)   24.22 (3.12%)   25.00
length=384,align1=0,align2=24:  25.00 (0.00%)   25.78 (-3.12%)  25.00
length=384,align1=24,align2=24:         24.22 (-3.33%)  23.44 (0.00%)   23.44
length=400,align1=0,align2=0:   25.00 (-3.23%)  26.56 (-9.68%)  24.22
length=400,align1=25,align2=0:  25.78 (-3.12%)  27.34 (-9.38%)  25.00
length=400,align1=0,align2=25:  27.34 (0.00%)   27.34 (0.00%)   27.34
length=400,align1=25,align2=25:         26.56 (0.00%)   25.78 (2.94%)   26.56
length=416,align1=0,align2=0:   26.56 (-3.03%)  25.78 (0.00%)   25.78
length=416,align1=26,align2=0:  28.12 (-2.86%)  27.34 (0.00%)   27.34
length=416,align1=0,align2=26:  27.34 (-2.94%)  28.12 (-5.88%)  26.56
length=416,align1=26,align2=26:         25.78 (0.00%)   26.56 (-3.03%)  25.78
length=432,align1=0,align2=0:   27.34 (-2.94%)  25.78 (2.94%)   26.56
length=432,align1=27,align2=0:  28.12 (-2.86%)  27.34 (0.00%)   27.34
length=432,align1=0,align2=27:  27.34 (0.00%)   28.12 (-2.86%)  27.34
length=432,align1=27,align2=27:         25.78 (0.00%)   25.78 (0.00%)   25.78
length=448,align1=0,align2=0:   26.56 (-3.03%)  25.78 (0.00%)   25.78
length=448,align1=28,align2=0:  27.34 (0.00%)   27.34 (0.00%)   27.34
length=448,align1=0,align2=28:  27.34 (0.00%)   28.12 (-2.86%)  27.34
length=448,align1=28,align2=28:         25.78 (0.00%)   25.78 (0.00%)   25.78
length=464,align1=0,align2=0:   25.78 (0.00%)   28.12 (-9.09%)  25.78
length=464,align1=29,align2=0:  28.12 (-2.86%)  29.69 (-8.57%)  27.34
length=464,align1=0,align2=29:  30.47 (0.00%)   30.47 (0.00%)   30.47
length=464,align1=29,align2=29:         28.12 (0.00%)   27.34 (2.78%)   28.12
length=480,align1=0,align2=0:   29.69 (-5.56%)  28.12 (0.00%)   28.12
length=480,align1=30,align2=0:  31.25 (-2.56%)  29.69 (2.56%)   30.47
length=480,align1=0,align2=30:  29.69 (0.00%)   30.47 (-2.63%)  29.69
length=480,align1=30,align2=30:         28.12 (0.00%)   28.12 (0.00%)   28.12
length=496,align1=0,align2=0:   28.12 (0.00%)   27.34 (2.78%)   28.12
length=496,align1=31,align2=0:  30.47 (-2.63%)  29.69 (0.00%)   29.69
length=496,align1=0,align2=31:  29.69 (0.00%)   30.47 (-2.63%)  29.69
length=496,align1=31,align2=31:         28.12 (-2.86%)  28.12 (-2.86%)  27.34
length=1024,align1=0,align2=0:  44.53 (0.00%)   44.53 (0.00%)   44.53
length=1024,align1=32,align2=0:         44.53 (-1.79%)  44.53 (-1.79%)  43.75
length=1024,align1=0,align2=32:         44.53 (-1.79%)  43.75 (0.00%)   43.75
length=1024,align1=32,align2=32:        43.75 (1.75%)   43.75 (1.75%)   44.53
length=1056,align1=0,align2=0:  46.88 (-1.69%)  46.88 (-1.69%)  46.09
length=1056,align1=33,align2=0:         53.12 (0.00%)   52.34 (1.47%)   53.12
length=1056,align1=0,align2=33:         52.34 (0.00%)   53.12 (-1.49%)  52.34
length=1056,align1=33,align2=33:        46.09 (0.00%)   46.88 (-1.69%)  46.09
length=1088,align1=0,align2=0:  46.88 (-1.69%)  46.09 (0.00%)   46.09
length=1088,align1=34,align2=0:         52.34 (0.00%)   52.34 (0.00%)   52.34
length=1088,align1=0,align2=34:         53.12 (-3.03%)  53.12 (-3.03%)  51.56
length=1088,align1=34,align2=34:        46.09 (0.00%)   46.88 (-1.69%)  46.09
length=1120,align1=0,align2=0:  49.22 (-1.61%)  48.44 (0.00%)   48.44
length=1120,align1=35,align2=0:         54.69 (1.41%)   55.47 (0.00%)   55.47
length=1120,align1=0,align2=35:         57.03 (0.00%)   55.47 (2.74%)   57.03
length=1120,align1=35,align2=35:        48.44 (0.00%)   49.22 (-1.61%)  48.44
length=1152,align1=0,align2=0:  47.66 (1.61%)   48.44 (0.00%)   48.44
length=1152,align1=36,align2=0:         55.47 (-1.43%)  55.47 (-1.43%)  54.69
length=1152,align1=0,align2=36:         58.59 (-1.35%)  55.47 (4.05%)   57.81
length=1152,align1=36,align2=36:        48.44 (0.00%)   49.22 (-1.61%)  48.44
length=1184,align1=0,align2=0:  53.12 (-3.03%)  50.78 (1.52%)   51.56
length=1184,align1=37,align2=0:         61.72 (-2.60%)  57.03 (5.19%)   60.16
length=1184,align1=0,align2=37:         62.50 (-1.27%)  57.03 (7.60%)   61.72
length=1184,align1=37,align2=37:        53.12 (-1.49%)  50.78 (2.99%)   52.34
length=1216,align1=0,align2=0:  53.91 (-4.55%)  50.78 (1.52%)   51.56
length=1216,align1=38,align2=0:         60.94 (0.00%)   57.03 (6.41%)   60.94
length=1216,align1=0,align2=38:         60.16 (0.00%)   57.81 (3.90%)   60.16
length=1216,align1=38,align2=38:        52.34 (-1.52%)  50.00 (3.03%)   51.56
length=1248,align1=0,align2=0:  54.69 (-2.94%)  53.12 (0.00%)   53.12
length=1248,align1=39,align2=0:         64.06 (-1.23%)  60.16 (4.94%)   63.28
length=1248,align1=0,align2=39:         60.94 (-2.63%)  60.16 (-1.32%)  59.38
length=1248,align1=39,align2=39:        53.12 (0.00%)   52.34 (1.47%)   53.12
length=1280,align1=0,align2=0:  52.34 (-1.52%)  52.34 (-1.52%)  51.56
length=1280,align1=40,align2=0:         61.72 (3.66%)   59.38 (7.32%)   64.06
length=1280,align1=0,align2=40:         60.94 (-2.63%)  60.16 (-1.32%)  59.38
length=1280,align1=40,align2=40:        52.34 (-1.52%)  52.34 (-1.52%)  51.56
length=1312,align1=0,align2=0:  54.69 (-1.45%)  55.47 (-2.90%)  53.91
length=1312,align1=41,align2=0:         63.28 (0.00%)   62.50 (1.23%)   63.28
length=1312,align1=0,align2=41:         62.50 (0.00%)   62.50 (0.00%)   62.50
length=1312,align1=41,align2=41:        53.91 (0.00%)   54.69 (-1.45%)  53.91
length=1344,align1=0,align2=0:  54.69 (0.00%)   54.69 (0.00%)   54.69
length=1344,align1=42,align2=0:         62.50 (0.00%)   62.50 (0.00%)   62.50
length=1344,align1=0,align2=42:         62.50 (-1.27%)  62.50 (-1.27%)  61.72
length=1344,align1=42,align2=42:        53.91 (0.00%)   53.91 (0.00%)   53.91
length=1376,align1=0,align2=0:  65.62 (-16.67%) 68.75 (-22.22%) 56.25
length=1376,align1=43,align2=0:         71.88 (-9.52%)  73.44 (-11.90%) 65.62
length=1376,align1=0,align2=43:         72.66 (-12.05%) 74.22 (-14.46%) 64.84
length=1376,align1=43,align2=43:        64.06 (-13.89%) 67.97 (-20.83%) 56.25
length=1408,align1=0,align2=0:  57.03 (-1.39%)  68.75 (-22.22%) 56.25
length=1408,align1=44,align2=0:         65.62 (-1.20%)  73.44 (-13.25%) 64.84
length=1408,align1=0,align2=44:         64.84 (0.00%)   74.22 (-14.46%) 64.84
length=1408,align1=44,align2=44:        56.25 (-1.41%)  68.75 (-23.94%) 55.47
length=1440,align1=0,align2=0:  67.97 (-14.47%) 64.84 (-9.21%)  59.38
length=1440,align1=45,align2=0:         74.22 (-10.47%) 68.75 (-2.33%)  67.19
length=1440,align1=0,align2=45:         72.66 (-6.90%)  69.53 (-2.30%)  67.97
length=1440,align1=45,align2=45:        65.62 (-13.51%) 58.59 (-1.35%)  57.81
length=1472,align1=0,align2=0:  66.41 (-14.86%) 58.59 (-1.35%)  57.81
length=1472,align1=46,align2=0:         73.44 (-9.30%)  67.19 (0.00%)   67.19
length=1472,align1=0,align2=46:         70.31 (-4.65%)  67.97 (-1.16%)  67.19
length=1472,align1=46,align2=46:        57.81 (0.00%)   58.59 (-1.35%)  57.81
length=1504,align1=0,align2=0:  60.94 (0.00%)   60.94 (0.00%)   60.94
length=1504,align1=47,align2=0:         71.09 (-1.11%)  70.31 (0.00%)   70.31
length=1504,align1=0,align2=47:         70.31 (-1.12%)  70.31 (-1.12%)  69.53
length=1504,align1=47,align2=47:        60.94 (-1.30%)  60.16 (0.00%)   60.16
length=1536,align1=0,align2=0:  62.50 (-3.90%)  60.16 (0.00%)   60.16
length=1536,align1=48,align2=0:         60.94 (-1.30%)  60.16 (0.00%)   60.16
length=1536,align1=0,align2=48:         61.72 (-3.95%)  60.16 (-1.32%)  59.38
length=1536,align1=48,align2=48:        60.94 (-1.30%)  60.16 (0.00%)   60.16
length=1568,align1=0,align2=0:  80.47 (-27.16%) 63.28 (0.00%)   63.28
length=1568,align1=49,align2=0:         86.72 (-18.09%) 72.66 (1.06%)   73.44
length=1568,align1=0,align2=49:         74.22 (-3.26%)  74.22 (-3.26%)  71.88
length=1568,align1=49,align2=49:        62.50 (0.00%)   61.72 (1.25%)   62.50
length=1600,align1=0,align2=0:  62.50 (-1.27%)  62.50 (-1.27%)  61.72
length=1600,align1=50,align2=0:         73.44 (0.00%)   71.88 (2.13%)   73.44
length=1600,align1=0,align2=50:         72.66 (0.00%)   73.44 (-1.08%)  72.66
length=1600,align1=50,align2=50:        62.50 (-1.27%)  62.50 (-1.27%)  61.72
length=1632,align1=0,align2=0:  64.84 (0.00%)   64.84 (0.00%)   64.84
length=1632,align1=51,align2=0:         75.78 (0.00%)   75.00 (1.03%)   75.78
length=1632,align1=0,align2=51:         78.91 (0.00%)   75.78 (3.96%)   78.91
length=1632,align1=51,align2=51:        64.84 (-2.47%)  64.84 (-2.47%)  63.28
length=1664,align1=0,align2=0:  64.84 (-1.22%)  64.84 (-1.22%)  64.06
length=1664,align1=52,align2=0:         75.78 (0.00%)   75.00 (1.03%)   75.78
length=1664,align1=0,align2=52:         80.47 (-0.98%)  75.78 (4.90%)   79.69
length=1664,align1=52,align2=52:        64.06 (-1.23%)  65.62 (-3.70%)  63.28
length=1696,align1=0,align2=0:  69.53 (-3.49%)  72.66 (-8.14%)  67.19
length=1696,align1=53,align2=0:         80.47 (-0.98%)  82.03 (-2.94%)  79.69
length=1696,align1=0,align2=53:         80.47 (0.96%)   82.03 (-0.96%)  81.25
length=1696,align1=53,align2=53:        68.75 (-2.33%)  72.66 (-8.14%)  67.19
length=1728,align1=0,align2=0:  67.97 (0.00%)   72.66 (-6.90%)  67.97
length=1728,align1=54,align2=0:         80.47 (-0.98%)  82.81 (-3.92%)  79.69
length=1728,align1=0,align2=54:         78.91 (-1.00%)  82.03 (-5.00%)  78.12
length=1728,align1=54,align2=54:        68.75 (0.00%)   72.66 (-5.68%)  68.75
length=1760,align1=0,align2=0:  77.34 (-12.50%) 68.75 (0.00%)   68.75
length=1760,align1=55,align2=0:         91.41 (-8.33%)  79.69 (5.56%)   84.38
length=1760,align1=0,align2=55:         88.28 (-10.78%) 80.47 (-0.98%)  79.69
length=1760,align1=55,align2=55:        77.34 (-11.24%) 68.75 (1.12%)   69.53
length=1792,align1=0,align2=0:  78.12 (-14.94%) 68.75 (-1.15%)  67.97
length=1792,align1=56,align2=0:         88.28 (-4.63%)  79.69 (5.56%)   84.38
length=1792,align1=0,align2=56:         88.28 (-9.71%)  80.47 (0.00%)   80.47
length=1792,align1=56,align2=56:        77.34 (-11.24%) 68.75 (1.12%)   69.53
length=1824,align1=0,align2=0:  72.66 (7.92%)   70.31 (10.89%)  78.91
length=1824,align1=57,align2=0:         85.94 (5.17%)   82.03 (9.48%)   90.62
length=1824,align1=0,align2=57:         82.03 (3.67%)   82.81 (2.75%)   85.16
length=1824,align1=57,align2=57:        70.31 (-1.12%)  70.31 (-1.12%)  69.53
length=1856,align1=0,align2=0:  70.31 (-1.12%)  70.31 (-1.12%)  69.53
length=1856,align1=58,align2=0:         83.59 (-0.94%)  82.03 (0.94%)   82.81
length=1856,align1=0,align2=58:         178.12 (-115.09%)       82.81 (0.00%)   82.81
length=1856,align1=58,align2=58:        70.31 (-1.12%)  70.31 (-1.12%)  69.53
length=1888,align1=0,align2=0:  73.44 (-1.08%)  78.91 (-8.60%)  72.66
length=1888,align1=59,align2=0:         85.94 (0.00%)   89.84 (-4.55%)  85.94
length=1888,align1=0,align2=59:         84.38 (0.00%)   89.06 (-5.56%)  84.38
length=1888,align1=59,align2=59:        72.66 (-1.09%)  78.12 (-8.70%)  71.88
length=1920,align1=0,align2=0:  72.66 (-1.09%)  78.12 (-8.70%)  71.88
length=1920,align1=60,align2=0:         85.94 (0.00%)   89.84 (-4.55%)  85.94
length=1920,align1=0,align2=60:         85.16 (0.00%)   89.06 (-4.59%)  85.16
length=1920,align1=60,align2=60:        72.66 (-1.09%)  78.91 (-9.78%)  71.88
length=1952,align1=0,align2=0:  75.00 (-1.05%)  75.00 (-1.05%)  74.22
length=1952,align1=61,align2=0:         88.28 (0.00%)   87.50 (0.88%)   88.28
length=1952,align1=0,align2=61:         87.50 (0.00%)   88.28 (-0.89%)  87.50
length=1952,align1=61,align2=61:        74.22 (0.00%)   74.22 (0.00%)   74.22
length=1984,align1=0,align2=0:  75.00 (-1.05%)  73.44 (1.05%)   74.22
length=1984,align1=62,align2=0:         89.06 (-0.89%)  87.50 (0.88%)   88.28
length=1984,align1=0,align2=62:         87.50 (0.00%)   88.28 (-0.89%)  87.50
length=1984,align1=62,align2=62:        74.22 (0.00%)   74.22 (0.00%)   74.22
length=2016,align1=0,align2=0:  77.34 (-1.02%)  76.56 (0.00%)   76.56
length=2016,align1=63,align2=0:         91.41 (-0.86%)  90.62 (0.00%)   90.62
length=2016,align1=0,align2=63:         89.84 (0.00%)   90.62 (-0.87%)  89.84
length=2016,align1=63,align2=63:        77.34 (-1.02%)  76.56 (0.00%)   76.56
length=4096,align1=0,align2=0:  141.41 (-0.56%) 146.88 (-4.44%) 140.62

Function: memcpy
__memcpy_thunderx       __memcpy_falkor __memcpy_generic
Variant: large
================================================================================
length=65543,align1=0,align2=0:         4018.75 (3.09%) 2634.38 (36.47%)        4146.88
length=65551,align1=0,align2=3:         4425.00 (-6.47%)        3134.38 (24.59%)        4156.25
length=65567,align1=3,align2=0:         2909.38 (29.95%)        3134.38 (24.53%)        4153.12
length=65599,align1=3,align2=5:         4415.62 (-6.16%)        3134.38 (24.64%)        4159.38
length=131079,align1=0,align2=0:        5765.62 (30.38%)        5240.62 (36.72%)        8281.25
length=131087,align1=0,align2=3:        8831.25 (-6.56%)        6271.88 (24.32%)        8287.50
length=131103,align1=3,align2=0:        5793.75 (29.05%)        6268.75 (23.23%)        8165.62
length=131135,align1=3,align2=5:        5806.25 (29.97%)        6259.38 (24.50%)        8290.62
length=262151,align1=0,align2=0:        11850.00 (28.91%)       10762.50 (35.43%)       16668.80
length=262159,align1=0,align2=3:        12043.80 (27.72%)       12700.00 (23.78%)       16662.50
length=262175,align1=3,align2=0:        12046.90 (27.90%)       12687.50 (24.07%)       16709.40
length=262207,align1=3,align2=5:        11984.40 (28.08%)       12678.10 (23.91%)       16662.50
length=524295,align1=0,align2=0:        24825.00 (25.00%)       24268.80 (27.34%)       33400.00
length=524303,align1=0,align2=3:        35731.20 (-6.53%)       25678.10 (23.44%)       33540.60
length=524319,align1=3,align2=0:        25893.80 (22.71%)       25725.00 (23.22%)       33503.10
length=524351,align1=3,align2=5:        25887.50 (22.86%)       25690.60 (23.45%)       33559.40
length=1048583,align1=0,align2=0:       50621.90 (0.30%)        50600.00 (0.34%)        50771.90
length=1048591,align1=0,align2=3:       53206.20 (0.54%)        51081.20 (4.51%)        53493.80
length=1048607,align1=3,align2=0:       53221.90 (0.32%)        51975.00 (2.66%)        53393.80
length=1048639,align1=3,align2=5:       53240.60 (0.36%)        51953.10 (2.77%)        53431.20
length=2097159,align1=0,align2=0:       103744.00 (-2.00%)      102447.00 (-1.00%)      102425.00
length=2097167,align1=0,align2=3:       108588.00 (-1.00%)      105159.00 (2.00%)       107606.00
length=2097183,align1=3,align2=0:       107678.00 (0.00%)       105250.00 (2.00%)       108125.00
length=2097215,align1=3,align2=5:       107906.00 (1.00%)       105841.00 (3.00%)       109475.00
length=4194311,align1=0,align2=0:       202994.00 (0.00%)       202500.00 (1.00%)       204809.00
length=4194319,align1=0,align2=3:       213350.00 (0.00%)       205997.00 (3.00%)       213384.00
length=4194335,align1=3,align2=0:       212653.00 (0.00%)       206444.00 (3.00%)       212900.00
length=4194367,align1=3,align2=5:       213044.00 (0.00%)       206084.00 (3.00%)       213847.00
length=8388615,align1=0,align2=0:       401294.00 (0.00%)       401231.00 (0.00%)       401944.00
length=8388623,align1=0,align2=3:       480872.00 (-14.00%)     406444.00 (3.00%)       422900.00
length=8388639,align1=3,align2=0:       422147.00 (0.00%)       407750.00 (3.00%)       422803.00
length=8388671,align1=3,align2=5:       442003.00 (-5.00%)      407125.00 (3.00%)       423509.00
length=16777223,align1=0,align2=0:      799809.00 (0.00%)       800000.00 (0.00%)       801756.00
length=16777231,align1=0,align2=3:      841184.00 (0.00%)       808525.00 (4.00%)       843775.00
length=16777247,align1=3,align2=0:      841166.00 (0.00%)       810147.00 (3.00%)       843147.00
length=16777279,align1=3,align2=5:      972569.00 (-16.00%)     808588.00 (4.00%)       843731.00
length=33554439,align1=0,align2=0:      1842240.00 (-0.01%)     1863590.00 (-1.17%)     1841990.00
length=33554447,align1=0,align2=3:      2103470.00 (-2.74%)     1919460.00 (6.25%)      2047440.00
length=33554463,align1=3,align2=0:      2075690.00 (-1.07%)     1930040.00 (6.02%)      2053720.00
length=33554495,align1=3,align2=5:      2110590.00 (-2.82%)     1924440.00 (6.25%)      2052650.00

Function: memcpy
__memcpy_thunderx       __memcpy_falkor __memcpy_generic
Variant: random
================================================================================
max-size=4096:  44061.90 (5.85%)        38568.20 (17.59%)       46799.90
max-size=8192:  42790.90 (5.27%)        38158.90 (15.52%)       45171.50
max-size=16384:         44912.10 (2.25%)        38710.40 (15.75%)       45945.00
max-size=32768:         43577.90 (1.23%)        37975.10 (13.93%)       44120.00
max-size=65536:         44375.50 (1.04%)        38474.20 (14.20%)       44840.60

* manual/tunables.texi (Tunable glibc.tune.cpu): Add falkor.
* sysdeps/aarch64/multiarch/Makefile (sysdep_routines): Add
memcpy_falkor.
* sysdeps/aarch64/multiarch/ifunc-impl-list.c (MAX_IFUNC):
Bump.
(__libc_ifunc_impl_list): Add __memcpy_falkor.
* sysdeps/aarch64/multiarch/memcpy.c: Likewise.
* sysdeps/aarch64/multiarch/memcpy_falkor.S: New file.
* sysdeps/unix/sysv/linux/aarch64/cpu-features.c (cpu_list):
Add falkor.
* sysdeps/unix/sysv/linux/aarch64/cpu-features.h (IS_FALKOR):
New macro.

7 years agomanual: Document getcontext uc_stack value on Linux [BZ #759]
Adhemerval Zanella [Tue, 16 May 2017 19:05:35 +0000 (16:05 -0300)]
manual: Document getcontext uc_stack value on Linux [BZ #759]

As decribed in BZ#759, Linux getcontext implementation on Linux does
differs from other SysV system about the returned uc_stack.  This is
true not only for i386, but for all the architecture I could actually
check (aarch64, arm, alpha, hppa, m68k, mips, mips64, mips64n32,
powerpc, powerpc64, powerpc64le, s390x, sh, sparc, sparc64, and x86).

And I think we should not change current behavior for some reasons:

1. POSIX 2008 removed this SySV interface for a good reason and changing
   this behavior adds nothing for current portable code.  POSIX 2001
   specification does states that stack should be saved [1] and current
   GLIBC code does in a arch-specific manner (inside the mcontext_t)
   which allows the setcontext to work correctly.

2. Changing this behavior would potentially require compat symbols and
   I see no gain in adding compat symbols for deprecated interfaces.

3. Also, for comment #2 in BZ#759, it is up to kernel do setup the contents
   for ucontext_t and currently it does not provide the stack information
   as well.  Trying to change it is also another fix that does not worth
   the possible gains.

Instead my proposal is to make it clear the current interface may differ
depending of the underlying operational system.

glibc documentation and close this bug as invalid.

[BZ #759]
* manual/setjmp.texi (getcontex): Document uc_stack value on Linux.

[1] http://pubs.opengroup.org/onlinepubs/009695399/functions/getcontext.html

7 years agoDo not use __ptr_t.
Joseph Myers [Tue, 8 Aug 2017 17:14:49 +0000 (17:14 +0000)]
Do not use __ptr_t.

sys/cdefs.h has a macro __ptr_t, which a few places in glibc use
instead of void *.  void * is a well-understood standard type for that
purpose and in a post-C89 context there is no need for a macro for it;
this patch changes those places to use void * directly instead.

Unlike __long_double_t, __ptr_t is widely used outside glibc (or at
least has many hits on codesearch.debian.net).  I don't know how many
of those uses would break if sys/cdefs.h ceased to define the macro,
but there's enough risk that this patch leaves the definition and just
removes the uses within glibc; removal of the definition can be
considered separately if desired.

Tested for x86_64, and with build-many-glibcs.py.

* malloc/mcheck.c (old_free_hook): Use void * instead of __ptr_t.
(old_malloc_hook): Likewise.
(old_memalign_hook): Likewise.
(old_realloc_hook): Likewise.
(struct hdr): Likewise.
(flood): Likewise.
(freehook): Likewise.
(mallochook): Likewise.
(memalignhook): Likewise.
(reallochook): Likewise.
(mprobe): Likewise.
* malloc/mtrace.c (mallwatch): Likewise.
(tr_old_free_hook): Likewise.
(tr_old_malloc_hook): Likewise.
(tr_old_realloc_hook): Likewise.
(tr_old_memalign_hook): Likewise.
(tr_where): Likewise.
(lock_and_info): Likewise.
(tr_freehook): Likewise.
(tr_mallochook): Likewise.
(tr_reallochook): Likewise.
(tr_memalignhook): Likewise.
* misc/err.h [!__GNUC_VA_LIST] (__gnuc_va_list): Likewise.
* misc/mmap.c (__mmap): Likewise.
* misc/mmap64.c (__mmap64): Likewise.
* misc/mprotect.c (__mprotect): Likewise.
* misc/msync.c (msync): Likewise.
* misc/munmap.c (__munmap): Likewise.
* posix/posix_madvise.c (posix_madvise): Likewise.
* socket/send.c (__send): Likewise.
* socket/sendto.c (__sendto): Likewise.
* socket/setsockopt.c (__setsockopt): Likewise.
* string/memcmp.c (__ptr_t): Remove macro.
(MEMCMP): Use void * instead of ptr_t.
* string/memrchr.c (__ptr_t): Remove macro.
(__memrchr): Use void * instead of ptr_t.
* sysdeps/mach/hurd/dl-sysdep.c (__mmap): Likewise.
* sysdeps/mach/hurd/mmap.c (__mmap): Likewise.
* sysdeps/mach/hurd/mmap64.c (__mmap64): Likewise.
* sysdeps/mach/mprotect.c (__mprotect): Likewise.
* sysdeps/mach/msync.c (msync): Likewise.
* sysdeps/mach/munmap.c (__munmap): Likewise.
* sysdeps/mips/bits/setjmp.h (struct __jmp_buf_internal_tag):
Likewise.
* sysdeps/posix/getcwd.c (__getcwd): Likewise.
* sysdeps/powerpc/powerpc32/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc32/power4/memcpy.S (memcpy): Likewise.
* sysdeps/powerpc/powerpc32/power4/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc32/power6/memcpy.S (memcpy): Likewise.
* sysdeps/powerpc/powerpc32/power6/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc32/power7/memcpy.S (memcpy): Likewise.
* sysdeps/powerpc/powerpc32/power7/mempcpy.S (__mempcpy):
Likewise.
* sysdeps/powerpc/powerpc32/power7/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc64/memcpy.S (memcpy): Likewise.
* sysdeps/powerpc/powerpc64/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc64/power4/memcpy.S (memcpy): Likewise.
* sysdeps/powerpc/powerpc64/power4/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc64/power6/memcpy.S (memcpy): Likewise.
* sysdeps/powerpc/powerpc64/power6/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc64/power7/memcpy.S (memcpy): Likewise.
* sysdeps/powerpc/powerpc64/power7/mempcpy.S (__mempcpy):
Likewise.
* sysdeps/powerpc/powerpc64/power7/memset.S (memset): Likewise.
* sysdeps/powerpc/powerpc64/power8/memset.S (memset): Likewise.
* sysdeps/tile/memcmp.c (__ptr_t): Remove macro.
(MEMCMP): Use void * instead of ptr_t.
* sysdeps/unix/sysv/linux/alpha/oldglob.c (old_glob_t): Likewise.
* sysdeps/unix/sysv/linux/mmap.c (__mmap): Likewise.

7 years agogetaddrinfo: Remove unreachable return statement from gaih_inet
Florian Weimer [Tue, 8 Aug 2017 16:48:05 +0000 (18:48 +0200)]
getaddrinfo: Remove unreachable return statement from gaih_inet

7 years agoi386: Add <startup.h> [BZ #21913]
H.J. Lu [Tue, 8 Aug 2017 15:41:08 +0000 (08:41 -0700)]
i386: Add <startup.h> [BZ #21913]

On Linux/i386, there are 3 ways to make a system call:

1. call *%gs:SYSINFO_OFFSET.  This requires TLS initialization.
2. call *_dl_sysinfo.  This requires relocation of _dl_sysinfo.
3. int $0x80.  This is slower than #2 and #3, but works everywhere.

When an object file is compiled with PIC, #1 is prefered since it is
faster than #3 and doesn't require relocation of _dl_sysinfo.  For
dynamic executables, ld.so initializes TLS.  However, for static
executables, before TLS is initialized by __libc_setup_tls, #3 should
be used for system calls.

This patch adds <startup.h> which defines _startup_fatal and defaults
it to __libc_fatal.  It replaces __libc_fatal with _startup_fatal in
static executables where it is called before __libc_setup_tls is called.
This header file is included in all files containing functions which are
called before __libc_setup_tls is called.  On Linux/i386, when PIE is
enabled by default, _startup_fatal is turned into ABORT_INSTRUCTION and
I386_USE_SYSENTER is defined to 0 so that "int $0x80" is used for system
calls before __libc_setup_tls is called.

Tested on i686 and x86-64.  Without this patch, all statically-linked
tests will fail on i686 when the compiler defaults to -fPIE.

[BZ #21913]
* csu/libc-tls.c: Include <startup.h> first.
(__libc_setup_tls): Call _startup_fatal instead of __libc_fatal.
* elf/dl-tunables.c: Include <startup.h> first.
* include/libc-symbols.h (BUILD_PIE_DEFAULT): New.
* sysdeps/generic/startup.h: New file.
* sysdeps/unix/sysv/linux/i386/startup.h: Likewise.
* sysdeps/unix/sysv/linux/i386/brk.c [BUILD_PIE_DEFAULT != 0]
(I386_USE_SYSENTER): New.  Defined to 0.

7 years agoDon't use IFUNC resolver for longjmp or system in libpthread (bug 21041)
Andreas Schwab [Tue, 8 Aug 2017 14:21:58 +0000 (16:21 +0200)]
Don't use IFUNC resolver for longjmp or system in libpthread (bug 21041)

Unlike the vfork forwarder and like the fork forwarder as in bug 19861,
there won't be a problem when the compiler does not turn this into a tail
call.

7 years agoposix: Set p{read,write}v2 to return ENOTSUP (BZ#21780)
Adhemerval Zanella [Mon, 17 Jul 2017 13:59:59 +0000 (10:59 -0300)]
posix: Set p{read,write}v2 to return ENOTSUP (BZ#21780)

Different than other architectures hppa-linux-gnu define different values
for ENOTSUP and EOPNOTSUPP, where the later is a Linux specific one.
This leads to tst-preadwritev{64}v2 tests failures:

$ ./testrun.sh misc/tst-preadvwritev2
error: tst-preadvwritev2-common.c:35: preadv2 failure did not set errno to ENOTSUP (223)
error: 1 test failures

The straightforward fix is to return the POSIX defined ENOTSUP on all
p{read,write}v{64}v2 implementations instead of Linux specific one.

Checked on x86_64-linux-gnu and the tst-preadwritev{64}v2 on
hppa-linux-gnu (although due the installed kernel on my testing system
the pwritev{64}v2 with an invalid flag still fails due a known kernel
issue [1]).

[BZ #21780]
* sysdeps/posix/preadv2.c (preadv2): Use ENOTSUP instead of
EOPNOTSUPP.
* sysdeps/posix/preadv64v2.c (preadv64v2): Likewise.
* sysdeps/posix/pwritev2.c (pwritev2): Likewise.
* sysdeps/posix/pwritev64v2.c (pwritev64v2): Likewise.
* sysdeps/unix/sysv/linux/preadv2.c (preadv2): Likewise.
* sysdeps/unix/sysv/linux/preadv64v2.c (preadv64v2): Likewise.
* sysdeps/unix/sysv/linux/pwritev2.c (pwritev2): Likewise.
* sysdeps/unix/sysv/linux/pwritev64v2.c (pwritev64v2): Likewise.

[1] https://sourceware.org/ml/libc-alpha/2017-06/msg00726.html

7 years agoFix XPG4.2 bits/sigaction.h namespace (bug 21899).
Joseph Myers [Mon, 7 Aug 2017 23:41:32 +0000 (23:41 +0000)]
Fix XPG4.2 bits/sigaction.h namespace (bug 21899).

For XPG4.2, sa_sigaction, SA_ONSTACK, SA_RESETHAND, SA_RESTART and
SA_NODEFER should be defined in signal.h, but they are only defined
for other standards at present.

This patch fixes the various bits/sigaction.h headers accordingly.
All the fixes are essentially the same, except those for SPARC and
Tile.

For SPARC, the header (a) spuriously defined various nonstandard
macros for __USE_UNIX98 || defined __USE_XOPEN2K8 and (b) defined some
standard macros as aliases of nonstandard ones instead of the other
way round.  This patch fixes the SPARC header to handle these macros
the same way and with the same conditions as those for other
architectures, so the standard macros are the primary ones and the
other ones are defined only for __USE_MISC and are aliases of the
standard ones where applicable.

For Tile, the header spuriously defined the nonstandard macro
SA_NOPTRACE for __USE_UNIX98 || defined __USE_XOPEN2K8; this is moved
to __USE_MISC.

(Those nonstandard macros are in a reserved namespace, but it seems
desirable to be consistent between architectures as far as possible,
and so not define them in standard modes anywhere.)

Tested for x86_64, and with build-many-glibcs.py.

[BZ #21899]
* bits/sigaction.h (struct sigaction): Define sa_handler and
sa_sigaction using union also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
* sysdeps/unix/sysv/linux/alpha/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
* sysdeps/unix/sysv/linux/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
* sysdeps/unix/sysv/linux/ia64/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
* sysdeps/unix/sysv/linux/mips/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
* sysdeps/unix/sysv/linux/s390/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.  Define directly rather than as alias.
(SA_RESETHAND): Likewise.
(SA_INTERRUPT): Define only for [__USE_MISC].
(SA_NOMASK): Define as alias of SA_NODEFER, only for [__USE_MISC].
(SA_ONESHOT): Define as alias of SA_RESETHAND, only for
[__USE_MISC].
(SA_STACK): Define only for [__USE_MISC].
* sysdeps/unix/sysv/linux/tile/bits/sigaction.h
(struct sigaction): Define sa_handler and sa_sigaction using union
also for [__USE_XOPEN_EXTENDED].
(SA_ONSTACK): Change [__USE_UNIX98] condition to
[__USE_XOPEN_EXTENDED].
(SA_RESTART): Likewise.
(SA_NODEFER): Likewise.
(SA_RESETHAND): Likewise.
(SA_NOPTRACE): Define only for [__USE_MISC].

7 years agoConsistently use uintN_t not u_intN_t everywhere.
Joseph Myers [Mon, 7 Aug 2017 19:55:34 +0000 (19:55 +0000)]
Consistently use uintN_t not u_intN_t everywhere.

This patch changes the remaining uses of the old nonstandard u_intN_t
types in glibc to use the C99 uintN_t instead, except for the
definitions of those typedefs and the tests of them in the c++-types
test.  This follows the previous such fix for libm, and being
consistent in using uintN_t makes sense as a global cleanup.

Tested for x86_64, and with build-many-glibcs.py.

* catgets/catgets.c (catgets): Use uintN_t instead of u_intN_t.
* catgets/catgetsinfo.h (struct catalog_obj): Likewise.
(struct catalog_info): Likewise.
* inet/htontest.c (lo): Likewise.
(foo): Likewise.
* inet/inet_lnaof.c (inet_lnaof): Likewise.
* inet/inet_net.c (inet_network): Likewise.
* inet/inet_netof.c (inet_netof): Likewise.
* inet/rcmd.c (__ivaliduser): Likewise.
(iruserok): Likewise.
* locale/loadlocale.c (_nl_intern_locale_data): Likewise.
* locale/programs/locale-spec.c (locale_special): Likewise.
* nis/nis_findserv.c (struct findserv_req): Likewise.
(__nis_findfastest_with_timeout): Likewise.
* nss/test-netdb.c (test_network): Likewise.
* resolv/inet_neta.c (inet_neta): Likewise.
* resolv/ns_date.c (ns_datetosecs): Likewise.
(SECS_PER_DAY): Likewise.
* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r):
Likewise.
* resolv/res_comp.c (__putlong): Likewise.
(__putshort): Likewise.
(_getlong): Likewise.
(_getshort): Likewise.
* resolv/res_debug.c (p_time): Likewise.
(precsize_ntoa): Likewise.
(precsize_aton): Likewise.
(latlon2ul): Likewise.
(loc_aton): Likewise.
(loc_ntoa): Likewise.
* resolv/res_hconf.c (struct netaddr): Likewise.
(_res_hconf_reorder_addrs): Likewise.
* sunrpc/clnt_tcp.c (clnttcp_call): Likewise.
(clnttcp_control): Likewise.
* sunrpc/clnt_udp.c (clntudp_call): Likewise.
(clntudp_control): Likewise.
* sunrpc/clnt_unix.c (clntunix_call): Likewise.
(clntunix_control): Likewise.
* sunrpc/pmap_rmt.c (clnt_broadcast): Likewise.
* sunrpc/rpc/auth.h (union des_block): Likewise.
* sunrpc/tst-udp-nonblocking.c (do_test): Likewise.
* sunrpc/xdr_rec.c (struct rec_strm): Likewise.
(xdrrec_create): Likewise.
(xdrrec_endofrecord): Likewise.
(flush_out): Likewise.
* sunrpc/xdr_stdio.c (xdrstdio_getlong): Likewise.
(xdrstdio_putlong): Likewise.
* sysdeps/unix/sysv/linux/errqueue.h (struct sock_extended_err):
Likewise.

7 years agoRemove __long_double_t.
Joseph Myers [Mon, 7 Aug 2017 19:53:17 +0000 (19:53 +0000)]
Remove __long_double_t.

sys/cdefs.h has a macro __long_double_t used in two places in glibc.
long double is a standard part of C since C89; there is no need for
such an alias for it.  This patch removes that macro and uses long
double directly everywhere.  As an implementation-namespace,
undocumented symbol, it should not be considered part of the API for
users, and codesearch.debian.net shows no sign of it being used
outside glibc in a way that would break with this patch.

Tested for x86_64.

* misc/sys/cdefs.h (__long_double_t): Remove.
* stdio-common/printf_fp.c (__printf_fp_l): Use long double
instead of __long_double_t,
* stdlib/strfmon_l.c (__vstrfmon_l): Likewise.

7 years agobenchtests: Avoid a display error when running in text terminal
Siddhesh Poyarekar [Mon, 7 Aug 2017 19:26:10 +0000 (00:56 +0530)]
benchtests: Avoid a display error when running in text terminal

The compare_strings.py script generates a graph for the benchmarks it
performs a comparison on and that fails if X is not available.  Avoid
the error and ensure that only the graph is generated and saved as a
PNG file.

* benchtests/scripts/compare_strings.py: Avoid display error
when generating graph.

7 years agobenchtests: Allow selecting baseline for compare_string.py
Siddhesh Poyarekar [Mon, 7 Aug 2017 19:25:12 +0000 (00:55 +0530)]
benchtests: Allow selecting baseline for compare_string.py

This patch allows one to provide the function name using an optional
-base option to compare all other functions against.  This is useful
when pitching one implementation of a string function against
alternatives.  In the absence of this option, comparisons are done
against the first ifunc in the list.

* benchtests/scripts/compare_strings.py (main): Add an
optional -base option.
(process_results): New argument base_func.

7 years agobenchtests: Use TEST_NAME instead of hardcoding memcpy
Siddhesh Poyarekar [Mon, 7 Aug 2017 19:14:00 +0000 (00:44 +0530)]
benchtests: Use TEST_NAME instead of hardcoding memcpy

The hardcoded 'memcpy' name turns up in other derived tests like
mempcpy.

       * benchtests/bench-memcpy.c (test_main): Use TEST_NAME instead of
       hardcoding memcpy.
       * benchtests/bench-memcpy-large.c (test_name): Likewise.
       * benchtests/bench-memcpy-random.c (test_name): Likewise.

7 years agoFix missing redirects in testsuite targets
Andreas Schwab [Mon, 7 Aug 2017 15:11:10 +0000 (17:11 +0200)]
Fix missing redirects in testsuite targets

7 years agox86-64: Add FMA multiarch functions to libm
H.J. Lu [Mon, 7 Aug 2017 15:19:59 +0000 (08:19 -0700)]
x86-64: Add FMA multiarch functions to libm

This patch adds multiarch functions optimized with -mfma -mavx2 to libm.
e_pow-fma.c is compiled with $(config-cflags-nofma) due to PR 19003.

* sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
Add e_exp-fma, e_log-fma, e_pow-fma, s_atan-fma, e_asin-fma,
e_atan2-fma, s_sin-fma, s_tan-fma, mplog-fma, mpa-fma,
slowexp-fma, slowpow-fma, sincos32-fma, doasin-fma, dosincos-fma,
halfulp-fma, mpexp-fma, mpatan2-fma, mpatan-fma, mpsqrt-fma,
and mptan-fma.
(CFLAGS-doasin-fma.c): New.
(CFLAGS-dosincos-fma.c): Likewise.
(CFLAGS-e_asin-fma.c): Likewise.
(CFLAGS-e_atan2-fma.c): Likewise.
(CFLAGS-e_exp-fma.c): Likewise.
(CFLAGS-e_log-fma.c): Likewise.
(CFLAGS-e_pow-fma.c): Likewise.
(CFLAGS-halfulp-fma.c): Likewise.
(CFLAGS-mpa-fma.c): Likewise.
(CFLAGS-mpatan-fma.c): Likewise.
(CFLAGS-mpatan2-fma.c): Likewise.
(CFLAGS-mpexp-fma.c): Likewise.
(CFLAGS-mplog-fma.c): Likewise.
(CFLAGS-mpsqrt-fma.c): Likewise.
(CFLAGS-mptan-fma.c): Likewise.
(CFLAGS-s_atan-fma.c): Likewise.
(CFLAGS-sincos32-fma.c): Likewise.
(CFLAGS-slowexp-fma.c): Likewise.
(CFLAGS-slowpow-fma.c): Likewise.
(CFLAGS-s_sin-fma.c): Likewise.
(CFLAGS-s_tan-fma.c): Likewise.
* sysdeps/x86_64/fpu/multiarch/doasin-fma.c: New file.
* sysdeps/x86_64/fpu/multiarch/dosincos-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/e_asin-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/e_atan2-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/e_exp-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/e_log-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/e_pow-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/halfulp-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/ifunc-avx-fma4.h: Likewise.
* sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h: Likewise.
* sysdeps/x86_64/fpu/multiarch/mpa-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/mpatan-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/mpatan2-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/mpexp-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/mplog-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/mpsqrt-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/mptan-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_atan-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_sin-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_tan-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/sincos32-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/slowexp-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/slowpow-fma.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/e_asin.c: Rewrite.
* 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/e_pow.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.

7 years agoReimplement min_of_type using __MATH_TG.
Joseph Myers [Fri, 4 Aug 2017 21:32:57 +0000 (21:32 +0000)]
Reimplement min_of_type using __MATH_TG.

This patch reimplements the libm-internal min_of_type macro to use
__MATH_TG instead of its own local type-generic implementation, so
simplifying the code and reducing the number of different type-generic
implementation variants in use in glibc.

Tested for x86_64.

* sysdeps/generic/math_private.h (__EXPR_FLT128): Remove macro.
(min_of_type_f): New macro.
(min_of_type_): Likewise.
(min_of_type_l): Likewise.
(min_of_type_f128): Likewise.
(min_of_type): Define using __MATH_TG and taking an expression
argument.
(math_check_force_underflow): Pass expression instead of type to
min_of_type.
(math_check_force_underflow_nonneg): Likewise.

7 years agox86: Remove assembly versions of HAS_CPU_FEATURE/HAS_ARCH_FEATURE
H.J. Lu [Fri, 4 Aug 2017 20:38:05 +0000 (13:38 -0700)]
x86: Remove assembly versions of HAS_CPU_FEATURE/HAS_ARCH_FEATURE

Since all x86 IFUNC selectors are implemented in C, assembly versions of
HAS_CPU_FEATURE and HAS_ARCH_FEATURE can be removed.

* sysdeps/x86/cpu-features.h [__ASSEMBLER__]
(LOAD_RTLD_GLOBAL_RO_RDX, HAS_FEATURE, LOAD_FUNC_GOT_EAX,
HAS_CPU_FEATURE, HAS_ARCH_FEATURE): Removed.

7 years agoi686: Implement IFUNC selectors in C
H.J. Lu [Wed, 19 Jul 2017 13:54:03 +0000 (06:54 -0700)]
i686: Implement IFUNC selectors in C

* sysdeps/i386/i686/multiarch/Makefile (sysdep_routines): Add
bcopy-ia32, bzero-ia32, rawmemchr-ia32 memchr-ia32,
memcmp-ia32, memcpy-ia32, memmove-ia32, mempcpy-ia32,
memset-ia32, strcat-ia32, strchr-ia32, strrchr-ia32,
strcpy-ia32, strcmp-ia32, strcspn-ia32, strpbrk-ia32,
strspn-ia32, strlen-ia32, stpcpy-ia32, stpncpy-ia32,
memcpy_chk-nonshared, mempcpy_chk-nonshared,
memmove_chk-nonshared and memset_chk-nonshared
* sysdeps/i386/i686/multiarch/bcopy-ia32.S: New file.
* sysdeps/i386/i686/multiarch/bcopy.c: Likewise.
* sysdeps/i386/i686/multiarch/bzero-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/bzero.c: Likewise.
* sysdeps/i386/i686/multiarch/ifunc-memmove.h: Likewise.
* sysdeps/i386/i686/multiarch/ifunc-memset.h: Likewise.
* sysdeps/i386/i686/multiarch/ifunc-sse2-bsf.h: Likewise.
* sysdeps/i386/i686/multiarch/ifunc-sse2-ssse3.h: Likewise.
* sysdeps/i386/i686/multiarch/ifunc-sse2.h: Likewise.
* sysdeps/i386/i686/multiarch/ifunc-sse4_2.h: Likewise.
* sysdeps/i386/i686/multiarch/ifunc-ssse3-sse4_2.h: Likewise.
* sysdeps/i386/i686/multiarch/memchr-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/memchr.c: Likewise.
* sysdeps/i386/i686/multiarch/memcmp-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/memcmp.c: Likewise.
* sysdeps/i386/i686/multiarch/memcpy-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/memcpy.c: Likewise.
* sysdeps/i386/i686/multiarch/memcpy_chk-nonshared.S: Likewise.
* sysdeps/i386/i686/multiarch/memcpy_chk.c: Likewise.
* sysdeps/i386/i686/multiarch/memmove-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/memmove.c: Likewise.
* sysdeps/i386/i686/multiarch/memmove_chk-nonshared.S: Likewise.
* sysdeps/i386/i686/multiarch/memmove_chk.c: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy.c: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy_chk-nonshared.S: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy_chk.c: Likewise.
* sysdeps/i386/i686/multiarch/memrchr.c: Likewise.
* sysdeps/i386/i686/multiarch/memset-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/memset.c: Likewise.
* sysdeps/i386/i686/multiarch/memset_chk-nonshared.S: Likewise.
* sysdeps/i386/i686/multiarch/rawmemchr-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/rawmemchr.c: Likewise.
* sysdeps/i386/i686/multiarch/stpcpy-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/stpcpy-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/stpcpy.c: Likewise.
* sysdeps/i386/i686/multiarch/stpncpy-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/stpncpy.c: Likewise.
* sysdeps/i386/i686/multiarch/strcasecmp.c: Likewise.
* sysdeps/i386/i686/multiarch/strcasecmp_l.c: Likewise.
* sysdeps/i386/i686/multiarch/strcat-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strcat.c: Likewise.
* sysdeps/i386/i686/multiarch/strchr-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strchr.c: Likewise.
* sysdeps/i386/i686/multiarch/strcmp-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strcmp.c: Likewise.
* sysdeps/i386/i686/multiarch/strcpy-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strcpy.c: Likewise.
* sysdeps/i386/i686/multiarch/strcspn-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strcspn.c: Likewise.
* sysdeps/i386/i686/multiarch/strlen-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strlen.c: Likewise.
* sysdeps/i386/i686/multiarch/strncase.c: Likewise.
* sysdeps/i386/i686/multiarch/strncase_l.c: Likewise.
* sysdeps/i386/i686/multiarch/strncat.c: Likewise.
* sysdeps/i386/i686/multiarch/strncmp.c: Likewise.
* sysdeps/i386/i686/multiarch/strncpy.c: Likewise.
* sysdeps/i386/i686/multiarch/strnlen.c: Likewise.
* sysdeps/i386/i686/multiarch/strpbrk-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strpbrk.c: Likewise.
* sysdeps/i386/i686/multiarch/strrchr-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strrchr.c: Likewise.
* sysdeps/i386/i686/multiarch/strspn-ia32.S: Likewise.
* sysdeps/i386/i686/multiarch/strspn.c: Likewise.
* sysdeps/i386/i686/multiarch/wcschr.c: Likewise.
* sysdeps/i386/i686/multiarch/wcscmp.c: Likewise.
* sysdeps/i386/i686/multiarch/wcscpy.c: Likewise.
* sysdeps/i386/i686/multiarch/wcslen.c: Likewise.
* sysdeps/i386/i686/multiarch/wcsrchr.c: Likewise.
* sysdeps/i386/i686/multiarch/wmemcmp.c: Likewise.
* sysdeps/i386/i686/multiarch/bcopy.S: Removed.
* sysdeps/i386/i686/multiarch/bzero.S: Likewise.
* sysdeps/i386/i686/multiarch/memchr.S: Likewise.
* sysdeps/i386/i686/multiarch/memcmp.S: Likewise.
* sysdeps/i386/i686/multiarch/memcpy.S: Likewise.
* sysdeps/i386/i686/multiarch/memcpy_chk.S: Likewise.
* sysdeps/i386/i686/multiarch/memmove.S: Likewise.
* sysdeps/i386/i686/multiarch/memmove_chk.S: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy.S: Likewise.
* sysdeps/i386/i686/multiarch/mempcpy_chk.S: Likewise.
* sysdeps/i386/i686/multiarch/memrchr.S: Likewise.
* sysdeps/i386/i686/multiarch/memset.S: Likewise.
* sysdeps/i386/i686/multiarch/memset_chk.S: Likewise.
* sysdeps/i386/i686/multiarch/rawmemchr.S: Likewise.
* sysdeps/i386/i686/multiarch/stpcpy.S: Likewise.
* sysdeps/i386/i686/multiarch/stpncpy.S: Likewise.
* sysdeps/i386/i686/multiarch/strcasecmp.S: Likewise.
* sysdeps/i386/i686/multiarch/strcasecmp_l.S: Likewise.
* sysdeps/i386/i686/multiarch/strcat.S: Likewise.
* sysdeps/i386/i686/multiarch/strcmp.S: Likewise.
* sysdeps/i386/i686/multiarch/strcpy.S: Likewise.
* sysdeps/i386/i686/multiarch/strcspn.S: Likewise.
* sysdeps/i386/i686/multiarch/strlen.S: Likewise.
* sysdeps/i386/i686/multiarch/strncase.S: Likewise.
* sysdeps/i386/i686/multiarch/strncase_l.S: Likewise.
* sysdeps/i386/i686/multiarch/strncat.S: Likewise.
* sysdeps/i386/i686/multiarch/strncmp.S: Likewise.
* sysdeps/i386/i686/multiarch/strncpy.S: Likewise.
* sysdeps/i386/i686/multiarch/strnlen.S: Likewise.
* sysdeps/i386/i686/multiarch/strpbrk.S: Likewise.
* sysdeps/i386/i686/multiarch/strrchr.S: Likewise.
* sysdeps/i386/i686/multiarch/strspn.S: Likewise.
* sysdeps/i386/i686/multiarch/wcschr.S: Likewise.
* sysdeps/i386/i686/multiarch/wcscmp.S: Likewise.
* sysdeps/i386/i686/multiarch/wcscpy.S: Likewise.
* sysdeps/i386/i686/multiarch/wcslen.S: Likewise.
* sysdeps/i386/i686/multiarch/wcsrchr.S: Likewise.
* sysdeps/i386/i686/multiarch/wmemcmp.S: Likewise.

7 years agox86-64: Implement libmathvec IFUNC selectors in C
H.J. Lu [Fri, 4 Aug 2017 20:03:44 +0000 (13:03 -0700)]
x86-64: Implement libmathvec IFUNC selectors in C

* sysdeps/x86_64/fpu/multiarch/Makefile (libmvec-sysdep_routines)
Add svml_d_cos2_core-sse2, svml_d_cos4_core-sse,
svml_d_cos8_core-avx2, svml_d_exp2_core-sse2,
svml_d_exp4_core-sse, svml_d_exp8_core-avx2,
svml_d_log2_core-sse2, svml_d_log4_core-sse,
svml_d_log8_core-avx2, svml_d_pow2_core-sse2,
svml_d_pow4_core-sse, svml_d_pow8_core-avx2
svml_d_sin2_core-sse2, svml_d_sin4_core-sse,
svml_d_sin8_core-avx2, svml_d_sincos2_core-sse2,
svml_d_sincos4_core-sse, svml_d_sincos8_core-avx2,
svml_s_cosf16_core-avx2, svml_s_cosf4_core-sse2,
svml_s_cosf8_core-sse, svml_s_expf16_core-avx2,
svml_s_expf4_core-sse2, svml_s_expf8_core-sse,
svml_s_logf16_core-avx2, svml_s_logf4_core-sse2,
svml_s_logf8_core-sse, svml_s_powf16_core-avx2,
svml_s_powf4_core-sse2, svml_s_powf8_core-sse,
svml_s_sincosf16_core-avx2, svml_s_sincosf4_core-sse2,
svml_s_sincosf8_core-sse, svml_s_sinf16_core-avx2,
svml_s_sinf4_core-sse2 and svml_s_sinf8_core-sse.
* sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx2.h: New file.
* sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-avx512.h: Likewise.
* sysdeps/x86_64/fpu/multiarch/ifunc-mathvec-sse4_1.h: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf16_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_expf16_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_expf4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_expf8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_logf16_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_logf4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_logf8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_powf16_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_powf4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_powf8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf16_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf16_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf4_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf8_core.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_cos2_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN2v_cos): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_cos4_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN4v_cos): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_cos8_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN8v_cos): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_exp2_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN2v_exp): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_exp4_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN4v_exp): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_exp8_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN8v_exp): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_log2_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_log2_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN2v_log): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_log4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_log4_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN4v_log): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_log8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_log8_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN8v_log): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_pow2_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN2vv_pow): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_pow4_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN4vv_pow): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_pow8_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN8vv_pow): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sin2_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN2v_sin): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sin4_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN4v_sin): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sin8_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN8v_sin): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos2_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN2vvv_sincos): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos4_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN4vvv_sincos): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sincos8_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN8vvv_sincos): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf16_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf16_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN16v_cosf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf4_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN4v_cosf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_cosf8_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN8v_cosf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_expf16_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_expf16_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN16v_expf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_expf4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_expf4_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN4v_expf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_expf8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_expf8_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN8v_expf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_logf16_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_logf16_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN16v_logf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_logf4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_logf4_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN4v_logf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_logf8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_logf8_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN8v_logf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_powf16_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_powf16_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN16vv_powf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_powf4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_powf4_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN4vv_powf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_powf8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_powf8_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN8vv_powf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf16_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf16_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN16vvv_sincosf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf4_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN4vvv_sincosf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sincosf8_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN8vvv_sincosf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf16_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf16_core-avx2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVeN16v_sinf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf4_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf4_core-sse2.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVbN4v_sinf): Removed.
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf8_core.S:  Renamed to
...
* sysdeps/x86_64/fpu/multiarch/svml_d_sinf8_core-sse.S: This.
Don't include <sysdep.h> nor <init-arch.h>.
(_ZGVdN8v_sinf): Removed.

7 years agox86-64: Implement libm IFUNC selectors in C
H.J. Lu [Fri, 4 Aug 2017 20:01:59 +0000 (13:01 -0700)]
x86-64: Implement libm IFUNC selectors in C

* sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):
Add s_ceil-sse4_1, s_ceilf-sse4_1, s_floor-sse4_1,
s_floorf-sse4_1, s_nearbyint-sse4_1, s_nearbyintf-sse4_1,
s_rint-sse4_1 and s_rintf-sse4_1.
* sysdeps/x86_64/fpu/multiarch/ifunc-sse4_1.h: New file.
* sysdeps/x86_64/fpu/multiarch/s_ceil.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_ceilf.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_floor.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_floorf.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_nearbyint.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_nearbyintf.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_rint.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_rintf.c: Likewise.
* sysdeps/x86_64/fpu/multiarch/s_ceil.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_ceil-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__ceil): Removed.
* sysdeps/x86_64/fpu/multiarch/s_ceilf.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_ceilf-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__ceilf): Removed.
* sysdeps/x86_64/fpu/multiarch/s_floor.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_floor-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__floor): Removed.
* sysdeps/x86_64/fpu/multiarch/s_floorf.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_floorf-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__floorf): Removed.
* sysdeps/x86_64/fpu/multiarch/s_nearbyint.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_nearbyint-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__nearbyint): Removed.
* sysdeps/x86_64/fpu/multiarch/s_nearbyintf.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_nearbyintf-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__nearbyintf): Removed.
* sysdeps/x86_64/fpu/multiarch/s_rint.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_rint-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__rint): Removed.
* sysdeps/x86_64/fpu/multiarch/s_rintf.S: Renamed to ...
* sysdeps/x86_64/fpu/multiarch/s_rintf-sse4_1.S: This.  Don't
include <machine/asm.h> nor <init-arch.h>.  Include <sysdep.h>.
(__rintf): Removed.

7 years agoi386: Support static PIE in start.S
H.J. Lu [Fri, 4 Aug 2017 19:59:35 +0000 (12:59 -0700)]
i386: Support static PIE in start.S

Since start.o may be compiled as PIC, we should check PIC instead of
SHARED.  Also avoid dynamic relocation against main in static PIE since
_start is the entry point before the executable is relocated.

* sysdeps/i386/start.S (_start): Check Check PIC instead of
SHARED.  Avoid dynamic relocation against main in static PIE.

7 years agoCompile tst-prelink.c without PIE [BZ #21815]
H.J. Lu [Fri, 4 Aug 2017 19:58:01 +0000 (12:58 -0700)]
Compile tst-prelink.c without PIE [BZ #21815]

tst-prelink.c checks for conflict with GLOB_DAT relocation against stdio.
On i386, there is no GLOB_DAT relocation against stdio with PIE.  We
should compile tst-prelink.c without PIE.

[BZ #21815]
* elf/Makefile (CFLAGS-tst-prelink.c): New.
(LDFLAGS-tst-prelink): Likewise.

7 years agoi386: Update I386_USE_SYSENTER for early PIC syscall
H.J. Lu [Fri, 4 Aug 2017 19:30:22 +0000 (12:30 -0700)]
i386: Update I386_USE_SYSENTER for early PIC syscall

Define I386_USE_SYSENTER to 0 or 1 so that special versions of syscalls
with "int $0x80" can be provided for static PIE during self relocation.
Also check PIC instead SHARED for PIC version of syscall macros.

* sysdeps/unix/sysv/linux/i386/sysdep.h (I386_USE_SYSENTER):
Define to I386_USE_SYSENTER to 0 or 1 if not defined.
(ENTER_KERNEL): Check if I386_USE_SYSENTER is 1 and check PIC.
(INTERNAL_SYSCALL_MAIN_INLINE): Likewise.
(INTERNAL_SYSCALL_NCS): Likewise.
(LOADARGS_1): Likewise.
(LOADARGS_5): Likewise.
(RESTOREARGS_1): Likewise.
(RESTOREARGS_5): Likewise.

7 years agox86-64: Use IFUNC memcpy and mempcpy in libc.a
H.J. Lu [Fri, 4 Aug 2017 19:27:00 +0000 (12:27 -0700)]
x86-64: Use IFUNC memcpy and mempcpy in libc.a

Since apply_irel is called before memcpy and mempcpy are called, we
can use IFUNC memcpy and mempcpy in libc.a.

* sysdeps/x86_64/memmove.S (MEMCPY_SYMBOL): Don't check SHARED.
(MEMPCPY_SYMBOL): Likewise.
* sysdeps/x86_64/multiarch/ifunc-impl-list.c
(__libc_ifunc_impl_list): Test memcpy and mempcpy in libc.a.
* sysdeps/x86_64/multiarch/memcpy-ssse3-back.S: Also include
in libc.a.
* sysdeps/x86_64/multiarch/memcpy-ssse3.S: Likewise.
* sysdeps/x86_64/multiarch/memmove-avx512-no-vzeroupper.S:
Likewise.
* sysdeps/x86_64/multiarch/memcpy.c: Also include in libc.a.
(__hidden_ver1): Don't use in libc.a.
* sysdeps/x86_64/multiarch/memmove-sse2-unaligned-erms.S
(__mempcpy): Don't create a weak alias in libc.a.
* sysdeps/x86_64/multiarch/memmove-vec-unaligned-erms.S: Support
libc.a.
* sysdeps/x86_64/multiarch/mempcpy.c: Also include in libc.a.
(__hidden_ver1): Don't use in libc.a.

7 years agoCheck linker support for INSERT in linker script
H.J. Lu [Fri, 4 Aug 2017 19:17:15 +0000 (12:17 -0700)]
Check linker support for INSERT in linker script

Since gold doesn't support INSERT in linker script:

https://sourceware.org/bugzilla/show_bug.cgi?id=21676

tst-split-dynreloc fails to link with gold.  Check if linker supports
INSERT in linker script before using it.

* config.make.in (have-insert): New.
* configure.ac (libc_cv_insert): New.  Set to yes if linker
supports INSERT in linker script.
(AC_SUBST(libc_cv_insert): New.
* configure: Regenerated.
* sysdeps/x86_64/Makefile (tests): Add tst-split-dynreloc only
if $(have-insert) == yes.

7 years agoRun vismain only if linker supports protected data symbol
H.J. Lu [Fri, 4 Aug 2017 18:47:08 +0000 (11:47 -0700)]
Run vismain only if linker supports protected data symbol

Gold doesn't support protected data symbol:

configure:5672: checking linker support for protected data symbol
configure:5682: gcc -fuse-ld=gold -nostdlib -nostartfiles -fno-stack-protector -fPIC -shared conftest.c -o conftest.so
configure:5685: $? = 0
configure:5692: gcc -fuse-ld=gold -nostdlib -nostartfiles -fno-stack-protector conftest.c -o conftest conftest.so
/usr/local/bin/ld.gold: error: /tmp/ccXWoofs.o: cannot make copy relocation for protected symbol 'bar', defined in conftest.so
collect2: error: ld returned 1 exit status

Run vismain only if linker supports protected data symbol.

* elf/Makefile (tests): Add vismain only if
$(have-protected-data) == yes.
(tests-pie): Likewise.

7 years agox86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]
H.J. Lu [Fri, 4 Aug 2017 18:14:19 +0000 (11:14 -0700)]
x86-64: Use _dl_runtime_resolve_opt only with AVX512F [BZ #21871]

On AVX machines with XGETBV (ECX == 1) like Skylake processors,

(gdb) disass _dl_runtime_resolve_avx_opt
Dump of assembler code for function _dl_runtime_resolve_avx_opt:
   0x0000000000015890 <+0>: push   %rax
   0x0000000000015891 <+1>: push   %rcx
   0x0000000000015892 <+2>: push   %rdx
   0x0000000000015893 <+3>: mov    $0x1,%ecx
   0x0000000000015898 <+8>: xgetbv
   0x000000000001589b <+11>: mov    %eax,%r11d
   0x000000000001589e <+14>: pop    %rdx
   0x000000000001589f <+15>: pop    %rcx
   0x00000000000158a0 <+16>: pop    %rax
   0x00000000000158a1 <+17>: and    $0x4,%r11d
   0x00000000000158a5 <+21>: bnd je 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.

is slower than:

(gdb) disass _dl_runtime_resolve_avx_slow
Dump of assembler code for function _dl_runtime_resolve_avx_slow:
   0x0000000000015850 <+0>: vorpd  %ymm0,%ymm1,%ymm8
   0x0000000000015854 <+4>: vorpd  %ymm2,%ymm3,%ymm9
   0x0000000000015858 <+8>: vorpd  %ymm4,%ymm5,%ymm10
   0x000000000001585c <+12>: vorpd  %ymm6,%ymm7,%ymm11
   0x0000000000015860 <+16>: vorpd  %ymm8,%ymm9,%ymm9
   0x0000000000015865 <+21>: vorpd  %ymm10,%ymm11,%ymm10
   0x000000000001586a <+26>: vpcmpeqd %xmm8,%xmm8,%xmm8
   0x000000000001586f <+31>: vorpd  %ymm9,%ymm10,%ymm10
   0x0000000000015874 <+36>: vptest %ymm10,%ymm8
   0x0000000000015879 <+41>: bnd jae 0x158b0 <_dl_runtime_resolve_avx>
   0x000000000001587c <+44>: vzeroupper
   0x000000000001587f <+47>: bnd jmpq 0x16200 <_dl_runtime_resolve_sse_vex>
End of assembler dump.
(gdb)

since xgetbv takes much more cycles than single cycle operations like
vpord/vvpcmpeq/ptest.  _dl_runtime_resolve_opt should be used only with
AVX512 where AVX512 instructions lead to lower CPU frequency on Skylake
server.

[BZ #21871]
* sysdeps/x86/cpu-features.c (init_cpu_features): Set
bit_arch_Use_dl_runtime_resolve_opt only with AVX512F.

7 years agox86: Remove __memset_zero_constant_len_parameter [BZ #21790]
H.J. Lu [Fri, 4 Aug 2017 17:56:40 +0000 (10:56 -0700)]
x86: Remove __memset_zero_constant_len_parameter [BZ #21790]

__memset_zero_constant_len_parameter should be removed by

commit 61062f56304750c367c5c1533351621353c112a7
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Tue Mar 1 00:35:23 2005 +0000

    2005-02-24  Roland McGrath  <roland@redhat.com>

            * debug/Versions (libc: GLIBC_2.4): Remove
            __memset_zero_constant_len_parameter.
            * sysdeps/generic/memset_chk.c: Remove alias and warning.
            * misc/sys/cdefs.h (__warndecl): New macro.
            * debug/warning-nop.c: New file.
            * string/bits/string3.h (memset): Call __warn_memset_zero_len with no
            arguments, instead of calling __memset_zero_constant_len_parameter.
            Use __warndecl for __warn_memset_zero_len.
            * debug/Makefile (routines): Add $(static-only-routines).
            (static-only-routines): New variable.

This patch removes the last emaining pieces of it.  Tested it on i586,
i686 and x86-64.

[BZ #21790]
* sysdeps/i386/i586/memset.S
(__memset_zero_constant_len_parameter): Removed.
* sysdeps/i386/i686/memset.S
(__memset_zero_constant_len_parameter): Likewise.
* sysdeps/i386/i686/multiarch/memset_chk.S
(__memset_zero_constant_len_parameter): Likewise.
* sysdeps/x86_64/memset.S (__memset_zero_constant_len_parameter):
Likewise.

7 years agoFix the return type of the getentropy stub
Aurelien Jarno [Thu, 3 Aug 2017 22:35:48 +0000 (22:35 +0000)]
Fix the return type of the getentropy stub

The return type of the getentropy stub is wrongly defined as ssize_t,
while both the <sys/random.h> header and the Linux implementation
define it as int. This patch fixes that.

Changelog:
* stdlib/getentropy.c (getentropy): Change return type to int.

7 years agoi686/multiarch: Regenerate ulps
Aurelien Jarno [Thu, 3 Aug 2017 22:33:19 +0000 (22:33 +0000)]
i686/multiarch: Regenerate ulps

This comes from running “make regen-ulps” on an AMD Opteron 2378 CPU.

Changelog:
* sysdeps/i386/i686/fpu/multiarch/libm-test-ulps: Regenerated.

7 years agoConsistently use uintN_t not u_intN_t in libm.
Joseph Myers [Thu, 3 Aug 2017 19:55:04 +0000 (19:55 +0000)]
Consistently use uintN_t not u_intN_t in libm.

This patch changes libm code to make consistent use of C99 uintN_t
types instead of sometimes using those and sometimes using the older
nonstandard u_intN_t names.  This makes sense as a cleanup in its own
right, and also facilitates merges to GCC's libquadmath (which gets
the types from stdint.h and so may not have u_intN_t available at
all).

Tested for x86_64, and with build-many-glibcs.py.

* math/s_nextafter.c (__nextafter): Use uintN_t instead of
u_intN_t.
* math/s_nexttowardf.c (__nexttowardf): Likewise.
* sysdeps/generic/math_private.h (ieee_double_shape_type):
Likewise.
(ieee_float_shape_type): Likewise.
* sysdeps/i386/fpu/s_fpclassifyl.c (__fpclassifyl): Likewise.
* sysdeps/i386/fpu/s_isnanl.c (__isnanl): Likewise.
* sysdeps/i386/fpu/s_nextafterl.c (__nextafterl): Likewise.
* sysdeps/i386/fpu/s_nexttoward.c (__nexttoward): Likewise.
* sysdeps/i386/fpu/s_nexttowardf.c (__nexttowardf): Likewise.
* sysdeps/ieee754/dbl-64/e_acosh.c (__ieee754_acosh): Likewise.
* sysdeps/ieee754/dbl-64/e_cosh.c (__ieee754_cosh): Likewise.
* sysdeps/ieee754/dbl-64/e_fmod.c (__ieee754_fmod): Likewise.
* sysdeps/ieee754/dbl-64/e_gamma_r.c (__ieee754_gamma_r):
Likewise.
* sysdeps/ieee754/dbl-64/e_hypot.c (__ieee754_hypot): Likewise.
* sysdeps/ieee754/dbl-64/e_jn.c (__ieee754_jn): Likewise.
(__ieee754_yn): Likewise.
* sysdeps/ieee754/dbl-64/e_log10.c (__ieee754_log10): Likewise.
* sysdeps/ieee754/dbl-64/e_log2.c (__ieee754_log2): Likewise.
* sysdeps/ieee754/dbl-64/e_rem_pio2.c (__ieee754_rem_pio2):
Likewise.
* sysdeps/ieee754/dbl-64/e_sinh.c (__ieee754_sinh): Likewise.
* sysdeps/ieee754/dbl-64/s_ceil.c (__ceil): Likewise.
* sysdeps/ieee754/dbl-64/s_copysign.c (__copysign): Likewise.
* sysdeps/ieee754/dbl-64/s_erf.c (__erf): Likewise.
(__erfc): Likewise.
* sysdeps/ieee754/dbl-64/s_expm1.c (__expm1): Likewise.
* sysdeps/ieee754/dbl-64/s_finite.c (FINITE): Likewise.
* sysdeps/ieee754/dbl-64/s_floor.c (__floor): Likewise.
* sysdeps/ieee754/dbl-64/s_fpclassify.c (__fpclassify): Likewise.
* sysdeps/ieee754/dbl-64/s_isnan.c (__isnan): Likewise.
* sysdeps/ieee754/dbl-64/s_issignaling.c (__issignaling):
Likewise.
* sysdeps/ieee754/dbl-64/s_llrint.c (__llrint): Likewise.
* sysdeps/ieee754/dbl-64/s_llround.c (__llround): Likewise.
* sysdeps/ieee754/dbl-64/s_lrint.c (__lrint): Likewise.
* sysdeps/ieee754/dbl-64/s_lround.c (__lround): Likewise.
* sysdeps/ieee754/dbl-64/s_modf.c (__modf): Likewise.
* sysdeps/ieee754/dbl-64/s_nextup.c (__nextup): Likewise.
* sysdeps/ieee754/dbl-64/s_remquo.c (__remquo): Likewise.
* sysdeps/ieee754/dbl-64/s_round.c (__round): Likewise.
* sysdeps/ieee754/dbl-64/s_trunc.c (__trunc): Likewise.
* sysdeps/ieee754/dbl-64/wordsize-64/s_issignaling.c
(__issignaling): Likewise.
* sysdeps/ieee754/flt-32/e_atan2f.c (__ieee754_atan2f): Likewise.
* sysdeps/ieee754/flt-32/e_fmodf.c (__ieee754_fmodf): Likewise.
* sysdeps/ieee754/flt-32/e_gammaf_r.c (__ieee754_gammaf_r):
Likewise.
* sysdeps/ieee754/flt-32/e_jnf.c (__ieee754_ynf): Likewise.
* sysdeps/ieee754/flt-32/e_log10f.c (__ieee754_log10f): Likewise.
* sysdeps/ieee754/flt-32/e_powf.c (__ieee754_powf): Likewise.
* sysdeps/ieee754/flt-32/e_rem_pio2f.c (__ieee754_rem_pio2f):
Likewise.
* sysdeps/ieee754/flt-32/e_remainderf.c (__ieee754_remainderf):
Likewise.
* sysdeps/ieee754/flt-32/e_sqrtf.c (__ieee754_sqrtf): Likewise.
* sysdeps/ieee754/flt-32/s_ceilf.c (__ceilf): Likewise.
* sysdeps/ieee754/flt-32/s_copysignf.c (__copysignf): Likewise.
* sysdeps/ieee754/flt-32/s_erff.c (__erff): Likewise.
(__erfcf): Likewise.
* sysdeps/ieee754/flt-32/s_expm1f.c (__expm1f): Likewise.
* sysdeps/ieee754/flt-32/s_finitef.c (FINITEF): Likewise.
* sysdeps/ieee754/flt-32/s_floorf.c (__floorf): Likewise.
* sysdeps/ieee754/flt-32/s_fpclassifyf.c (__fpclassifyf):
Likewise.
* sysdeps/ieee754/flt-32/s_isnanf.c (__isnanf): Likewise.
* sysdeps/ieee754/flt-32/s_issignalingf.c (__issignalingf):
Likewise.
* sysdeps/ieee754/flt-32/s_llrintf.c (__llrintf): Likewise.
* sysdeps/ieee754/flt-32/s_llroundf.c (__llroundf): Likewise.
* sysdeps/ieee754/flt-32/s_lrintf.c (__lrintf): Likewise.
* sysdeps/ieee754/flt-32/s_lroundf.c (__lroundf): Likewise.
* sysdeps/ieee754/flt-32/s_modff.c (__modff): Likewise.
* sysdeps/ieee754/flt-32/s_remquof.c (__remquof): Likewise.
* sysdeps/ieee754/flt-32/s_roundf.c (__roundf): Likewise.
* sysdeps/ieee754/ldbl-128/e_acoshl.c (__ieee754_acoshl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_atan2l.c (__ieee754_atan2l):
Likewise.
* sysdeps/ieee754/ldbl-128/e_atanhl.c (__ieee754_atanhl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_fmodl.c (__ieee754_fmodl): Likewise.
* sysdeps/ieee754/ldbl-128/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-128/e_hypotl.c (__ieee754_hypotl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_jnl.c (__ieee754_jnl): Likewise.
(__ieee754_ynl): Likewise.
* sysdeps/ieee754/ldbl-128/e_powl.c (__ieee754_powl): Likewise.
* sysdeps/ieee754/ldbl-128/e_rem_pio2l.c (__ieee754_rem_pio2l):
Likewise.
* sysdeps/ieee754/ldbl-128/e_remainderl.c (__ieee754_remainderl):
Likewise.
* sysdeps/ieee754/ldbl-128/e_sinhl.c (__ieee754_sinhl): Likewise.
* sysdeps/ieee754/ldbl-128/k_cosl.c (__kernel_cosl): Likewise.
* sysdeps/ieee754/ldbl-128/k_sincosl.c (__kernel_sincosl):
Likewise.
* sysdeps/ieee754/ldbl-128/k_sinl.c (__kernel_sinl): Likewise.
* sysdeps/ieee754/ldbl-128/s_ceill.c (__ceill): Likewise.
* sysdeps/ieee754/ldbl-128/s_copysignl.c (__copysignl): Likewise.
* sysdeps/ieee754/ldbl-128/s_erfl.c (__erfcl): Likewise.
* sysdeps/ieee754/ldbl-128/s_fabsl.c (__fabsl): Likewise.
* sysdeps/ieee754/ldbl-128/s_finitel.c (__finitel): Likewise.
* sysdeps/ieee754/ldbl-128/s_floorl.c (__floorl): Likewise.
* sysdeps/ieee754/ldbl-128/s_fpclassifyl.c (__fpclassifyl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_frexpl.c (__frexpl): Likewise.
* sysdeps/ieee754/ldbl-128/s_isnanl.c (__isnanl): Likewise.
* sysdeps/ieee754/ldbl-128/s_issignalingl.c (__issignalingl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_llrintl.c (__llrintl): Likewise.
* sysdeps/ieee754/ldbl-128/s_llroundl.c (__llroundl): Likewise.
* sysdeps/ieee754/ldbl-128/s_lrintl.c (__lrintl): Likewise.
* sysdeps/ieee754/ldbl-128/s_lroundl.c (__lroundl): Likewise.
* sysdeps/ieee754/ldbl-128/s_modfl.c (__modfl): Likewise.
* sysdeps/ieee754/ldbl-128/s_nearbyintl.c (__nearbyintl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nextafterl.c (__nextafterl):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttoward.c (__nexttoward):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-128/s_nextupl.c (__nextupl): Likewise.
* sysdeps/ieee754/ldbl-128/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-128/s_rintl.c (__rintl): Likewise.
* sysdeps/ieee754/ldbl-128/s_roundl.c (__roundl): Likewise.
* sysdeps/ieee754/ldbl-128/s_tanhl.c (__tanhl): Likewise.
* sysdeps/ieee754/ldbl-128/s_truncl.c (__truncl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_fmodl.c (__ieee754_fmodl):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_powl.c (__ieee754_powl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_rem_pio2l.c (__ieee754_rem_pio2l):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/e_remainderl.c
(__ieee754_remainderl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_cosl.c (__kernel_cosl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/k_sinl.c (__kernel_sinl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fabsl.c (__fabsl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_fpclassifyl.c (___fpclassifyl):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_modfl.c (__modfl): Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-128ibm/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-96/e_acoshl.c (__ieee754_acoshl): Likewise.
* sysdeps/ieee754/ldbl-96/e_asinl.c (__ieee754_asinl): Likewise.
* sysdeps/ieee754/ldbl-96/e_atanhl.c (__ieee754_atanhl): Likewise.
* sysdeps/ieee754/ldbl-96/e_coshl.c (__ieee754_coshl): Likewise.
* sysdeps/ieee754/ldbl-96/e_gammal_r.c (__ieee754_gammal_r):
Likewise.
* sysdeps/ieee754/ldbl-96/e_hypotl.c (__ieee754_hypotl): Likewise.
* sysdeps/ieee754/ldbl-96/e_j0l.c (__ieee754_j0l): Likewise.
(__ieee754_y0l): Likewise.
(pzero): Likewise.
(qzero): Likewise.
* sysdeps/ieee754/ldbl-96/e_j1l.c (__ieee754_j1l): Likewise.
(__ieee754_y1l): Likewise.
(pone): Likewise.
(qone): Likewise.
* sysdeps/ieee754/ldbl-96/e_jnl.c (__ieee754_jnl): Likewise.
(__ieee754_ynl): Likewise.
* sysdeps/ieee754/ldbl-96/e_lgammal_r.c (sin_pi): Likewise.
(__ieee754_lgammal_r): Likewise.
* sysdeps/ieee754/ldbl-96/e_rem_pio2l.c (__ieee754_rem_pio2l):
Likewise.
* sysdeps/ieee754/ldbl-96/e_sinhl.c (__ieee754_sinhl): Likewise.
* sysdeps/ieee754/ldbl-96/s_copysignl.c (__copysignl): Likewise.
* sysdeps/ieee754/ldbl-96/s_erfl.c (__erfl): Likewise.
(__erfcl): Likewise.
* sysdeps/ieee754/ldbl-96/s_frexpl.c (__frexpl): Likewise.
* sysdeps/ieee754/ldbl-96/s_issignalingl.c (__issignalingl):
Likewise.
* sysdeps/ieee754/ldbl-96/s_llrintl.c (__llrintl): Likewise.
* sysdeps/ieee754/ldbl-96/s_llroundl.c (__llroundl): Likewise.
* sysdeps/ieee754/ldbl-96/s_lrintl.c (__lrintl): Likewise.
* sysdeps/ieee754/ldbl-96/s_lroundl.c (__lroundl): Likewise.
* sysdeps/ieee754/ldbl-96/s_modfl.c (__modfl): Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttoward.c (__nexttoward): Likewise.
* sysdeps/ieee754/ldbl-96/s_nexttowardf.c (__nexttowardf):
Likewise.
* sysdeps/ieee754/ldbl-96/s_nextupl.c (__nextupl): Likewise.
* sysdeps/ieee754/ldbl-96/s_remquol.c (__remquol): Likewise.
* sysdeps/ieee754/ldbl-96/s_roundl.c (__roundl): Likewise.
* sysdeps/ieee754/ldbl-96/s_tanhl.c (__tanhl): Likewise.
* sysdeps/ieee754/ldbl-opt/s_nexttowardfd.c (__nldbl_nexttowardf):
Likewise.
* sysdeps/m68k/m680x0/fpu/e_pow.c (s(__ieee754_pow)): Likewise.
* sysdeps/m68k/m680x0/fpu/s_fpclassifyl.c (__fpclassifyl):
Likewise.
* sysdeps/m68k/m680x0/fpu/s_llrint.c (__llrint): Likewise.
* sysdeps/m68k/m680x0/fpu/s_llrintf.c (__llrintf): Likewise.
* sysdeps/m68k/m680x0/fpu/s_llrintl.c (__llrintl): Likewise.
* sysdeps/m68k/m680x0/fpu/s_nextafterl.c (__nextafterl): Likewise.
* sysdeps/x86/fpu/powl_helper.c (__powl_helper): Likewise.

7 years agoAdd yesstr and nostr for doi_IN, kok_IN, and sat_IN
Mike FABIAN [Thu, 3 Aug 2017 15:29:00 +0000 (17:29 +0200)]
Add yesstr and nostr for doi_IN, kok_IN, and sat_IN

For the locales doi_IN,  kok_IN, and sat_IN, the words for
“yes” and “no” were apparently in yesexpr and noexpr.
Copy them from there to add yesstr and nostr.
Also make yesexpr and noexpr more readable by using
the POSIX portable character set.

* locales/doi_IN (LC_MESSAGES): Add yesstr and nostr.
* locales/kok_IN (LC_MESSAGES): Add yesstr and nostr.
* locales/sat_IN (LC_MESSAGES): Add yesstr and nostr.

7 years agoRevert “Fix yesexpr in en_DK locale”
Mike FABIAN [Thu, 3 Aug 2017 10:41:26 +0000 (12:41 +0200)]
Revert “Fix yesexpr in en_DK locale”

This reverts commit 8f75515080ee099030547ba5bcae59e800a2cc08

Revert “Fix yesexpr in en_DK locale”.

* locales/en_DK (LC_MESSAGES): Restore original yesexpr, noexpr,
yesstr, nostr. Convert them to ASCII and add a comment why
we want to have them like this.

7 years agogetaddrinfo: Release resolver context on error in gethosts [BZ #21885]
Florian Weimer [Thu, 3 Aug 2017 10:33:00 +0000 (12:33 +0200)]
getaddrinfo: Release resolver context on error in gethosts [BZ #21885]

7 years agodrop redundant ([eE][sS])? and [oO]? from yesexpr and noexpr in km_KH locale
Mike FABIAN [Thu, 3 Aug 2017 09:46:45 +0000 (11:46 +0200)]
drop redundant ([eE][sS])? and [oO]? from yesexpr and noexpr in km_KH locale

* locales/km_KH (LC_MESSAGES): drop redundant ([eE][sS])? and [oO]?
from yesexpr and noexpr

7 years agoDrop redundant .* from yesexpr and noexpr in agr_PE locale
Mike FABIAN [Thu, 3 Aug 2017 09:33:00 +0000 (11:33 +0200)]
Drop redundant .* from yesexpr and noexpr in agr_PE locale

And make the expressions more readable by using the POSIX portable character set
instead of Unicode code points.

* locales/agr_PE (LC_MESSAGES): drop .* from yesexpr and noexpr

7 years agoAdded new Locale bho_NP
Akhilesh Kumar [Fri, 28 Jul 2017 03:25:35 +0000 (08:55 +0530)]
Added new Locale bho_NP

Bhojpuri is one of the most common languages in Nepal and India.
http://codefornepal.org/en/2014/02/top-10-languages-spoken-as-mother-tongues-in-nepal/
https://en.wikipedia.org/wiki/Bhojpuri_language

Added "bho_NP" locale and Reference is taken form "bho_IN".

[BZ #21845]
* locales/bho_NP: New file, Bhojpuri locale for Nepal.
* SUPPORTED: Add bho_NP/UTF-8

7 years agoFix yesexpr in en_DK locale
Akhilesh Kumar [Mon, 31 Jul 2017 06:35:28 +0000 (12:05 +0530)]
Fix yesexpr in en_DK locale

[BZ #21867]
* locales/en_DK (LC_MESSAGES): Fix yesexpr

7 years agoFix abday in zh_SG
Akhilesh Kumar [Fri, 28 Jul 2017 04:10:45 +0000 (09:40 +0530)]
Fix abday in zh_SG

Make it the same as in zh_CN and zh_TW which agrees with "narrow" in CLDR.

[BZ #21853]
* locales/zh_SG (LC_TIME): Fix abday

7 years agotst-tlsopt-powerpc as a shared lib
Alan Modra [Thu, 3 Aug 2017 06:09:21 +0000 (15:39 +0930)]
tst-tlsopt-powerpc as a shared lib

This makes the __tls_get_addr_opt test run as a shared library, and so
actually test that DTPMOD64/DTPREL64 pairs are processed by ld.so to
support the __tls_get_adfr_opt call stub fast return.  After a
2017-01-24 patch (binutils f0158f4416) ld.bfd no longer emitted
unnecessary dynamic relocations against local thread variables,
instead setting up the __tls_index GOT entries for the call stub fast
return.  This meant tst-tlsopt-powerpc passed but did not check ld.so
relocation support.  After a 2017-07-16 patch (binutils 676ee2b5fa)
ld.bfd no longer set up the __tls_index GOT entries for the call stub
fast return, and tst-tlsopt-powerpc failed.

Compiling mod-tlsopt-powerpc.c with -DSHARED exposed a bug in
powerpc64/tls-macros.h, which defines a __TLS_GET_ADDR macro that
clashes with one defined in dl-tls.h.  The tls-macros.h version is
only used in that file, so delete it and expand.

* sysdeps/powerpc/mod-tlsopt-powerpc.c: Extract from
tst-tlsopt-powerpc.c with function name change and no test harness.
* sysdeps/powerpc/tst-tlsopt-powerpc.c: Remove body of test.
Call tls_get_addr_opt_test.
* sysdeps/powerpc/Makefile (LDFLAGS-tst-tlsopt-powerpc): Don't define.
(modules-names): Add mod-tlsopt-powerpc.
(mod-tlsopt-powerpc.so-no-z-defs): Define.
(tst-tlsopt-powerpc): Depend on .so.
* sysdeps/powerpc/powerpc64/tls-macros.h (__TLS_GET_ADDR): Don't
define.  Expand use in TLS_GD and TLS_LD.

7 years agoAdd missing include for pthread_setcancelstate
Samuel Thibault [Wed, 2 Aug 2017 21:07:58 +0000 (23:07 +0200)]
Add missing include for pthread_setcancelstate

* sysdeps/posix/shm_open.c: Include <pthread.h>.

7 years ago[hurd]: Add __libc_init_secure stub
Samuel Thibault [Wed, 2 Aug 2017 21:29:57 +0000 (23:29 +0200)]
[hurd]: Add __libc_init_secure stub

csu/libc-start.c now insists on calling __libc_init_secure, while the Hurd
port already implements it "very early" in dl-sysdep.c and init-first.c

* sysdeps/mach/hurd/enbl-secure.c (__libc_init_secure): Define
function.

7 years agoFix tgmath.h for __int128 (bug 21686).
Joseph Myers [Wed, 2 Aug 2017 20:16:05 +0000 (20:16 +0000)]
Fix tgmath.h for __int128 (bug 21686).

When a tgmath.h macro is passed a double argument and an argument of
type __int128, it generates a call to a long double function (although
the result still gets converted to type double).  __int128 is similar
enough to integer types that it should be handled consistently like
them, so always like double for these macros rather than sometimes
like double and sometimes like long double.  This patch fixes the
logic accordingly and makes gen-tgmath-tests.py generate tests for
__int128.

Tested for x86_64 and x86.

[BZ #21686]
* math/tgmath.h (__TGMATH_BINARY_REAL_ONLY): Add arguments before
comparing size with that of double.
(__TGMATH_BINARY_REAL_STD_ONLY): Likewise.
(__TGMATH_BINARY_REAL_RET_ONLY): Likewise.
(__TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY): Likewise.
(__TGMATH_TERNARY_REAL_ONLY): Likewise.
(__TGMATH_BINARY_REAL_IMAG): Likewise.
* math/gen-tgmath-tests.py (Type.init_types): Create __int128 and
unsigned __int128 types.

7 years agoRemove CFLAG settings that turn off warning (no longer needed).
Steve Ellcey [Wed, 2 Aug 2017 19:57:58 +0000 (12:57 -0700)]
Remove CFLAG settings that turn off warning (no longer needed).

2017-08-02  Steve Ellcey  <sellcey@cavium.com>

* localedata/Makefile (CFLAGS-tst_iswalnum.c, CFLAGS-tst_iswalpha.c
CFLAGS-tst_iswcntrl.c, CFLAGS-tst_iswdigit.c, CFLAGS-tst_iswgraph.c,
CFLAGS-tst_iswlower.c, CFLAGS-tst_iswprint.c, CFLAGS-tst_iswpunct.c,
CFLAGS-tst_iswspace.c, CFLAGS-tst_iswupper.c, CFLAGS-tst_iswxdigit.c,
CFLAGS-tst_towlower.c, CFLAGS-tst_towupper.c): Remove.

7 years agox86-64: Check PIC instead of SHARED in start.S
H.J. Lu [Wed, 2 Aug 2017 17:27:14 +0000 (10:27 -0700)]
x86-64: Check PIC instead of SHARED in start.S

Since start.o may be compiled as PIC, we should check PIC instead of
SHARED.

* sysdeps/x86_64/start.S (_start): Check PIC instead of SHARED.

7 years agoi386: Check PIC to enable PIC setups in multiarch functions
H.J. Lu [Wed, 2 Aug 2017 17:25:11 +0000 (10:25 -0700)]
i386: Check PIC to enable PIC setups in multiarch functions

Check PIC, instead of SHARED, to enable PIC setups.

* sysdeps/i386/i686/multiarch/memcmp-sse4.S: Check PIC instead
of SHARED.
* sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S: Likewise.
* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S: Likewise.
* sysdeps/i386/i686/multiarch/memcpy-ssse3.S: Likewise.
* sysdeps/i386/i686/multiarch/memset-sse2-rep.S: Likewise.
* sysdeps/i386/i686/multiarch/memset-sse2.S: Likewise.
* sysdeps/i386/i686/multiarch/strcat-sse2.S: Likewise.
* sysdeps/i386/i686/multiarch/strcpy-sse2.S: Likewise.

7 years agoFix tgmath.h for bit-fields (bug 21685).
Joseph Myers [Wed, 2 Aug 2017 16:09:01 +0000 (16:09 +0000)]
Fix tgmath.h for bit-fields (bug 21685).

The tgmath.h macros produce errors for bit-field arguments, because
they apply sizeof and typeof to the arguments.  This patch fixes them
to use unary + systematically before using sizeof or typeof on
arguments that might be bit-fields (note that __real__ of a bit-field
is still a bit-field for this purpose, since it's an lvalue).
gen-tgmath-tests.py is extended to add tests for this case.

Tested for x86_64.

[BZ #21685]
* math/tgmath.h (__tgmath_real_type): Use unary + on potentially
bit-field expressions passed to sizeof or typeof.
[__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
(__TGMATH_F128): Likewise.
[__HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)]
(__TGMATH_CF128): Likewise.
(__TGMATH_UNARY_REAL_ONLY): Likewise.
(__TGMATH_UNARY_REAL_RET_ONLY): Likewise.
(__TGMATH_BINARY_FIRST_REAL_ONLY): Likewise.
(__TGMATH_BINARY_FIRST_REAL_STD_ONLY): Likewise.
(__TGMATH_BINARY_REAL_ONLY): Likewise.
(__TGMATH_BINARY_REAL_STD_ONLY): Likewise.
(__TGMATH_BINARY_REAL_RET_ONLY): Likewise.
(__TGMATH_TERNARY_FIRST_SECOND_REAL_ONLY): Likewise.
(__TGMATH_TERNARY_REAL_ONLY): Likewise.
(__TGMATH_TERNARY_FIRST_REAL_RET_ONLY): Likewise.
(__TGMATH_UNARY_REAL_IMAG): Likewise.
(__TGMATH_UNARY_IMAG): Likewise.
(__TGMATH_UNARY_REAL_IMAG_RET_REAL): Likewise.
(__TGMATH_BINARY_REAL_IMAG): Likewise.
* math/gen-tgmath-tests.py (Type.init_types): Create bit_field
type.
(define_vars_for_type): Handle bit_field type specially.
(Tests.__init__): Declare structure with bit-field element.

7 years agoi386: Don't define multiarch __memmove_chk in libc.a [BZ #21791]
H.J. Lu [Wed, 2 Aug 2017 15:32:00 +0000 (08:32 -0700)]
i386: Don't define multiarch __memmove_chk in libc.a [BZ #21791]

There is no need to define multiarch __memmove_chk in libc.a since they
aren't used at all.

[BZ #21791]
* sysdeps/i386/i686/multiarch/memcpy-sse2-unaligned.S
(MEMCPY_CHK): Define only if SHARED is defined.
* sysdeps/i386/i686/multiarch/memcpy-ssse3-rep.S (MEMCPY_CHK):
Likewise.
* sysdeps/i386/i686/multiarch/memcpy-ssse3.S (MEMCPY_CHK):
Likewise.

7 years agoRotate ChangeLog correctly
Siddhesh Poyarekar [Wed, 2 Aug 2017 15:27:34 +0000 (20:57 +0530)]
Rotate ChangeLog correctly

I incorrectly assumed that the ChangeLog numbers (.1, .2, etc.) are in
order.  They're not and the latest non-current ChangeLog is the one
with the highest number.  Fixed.

7 years agoRotate ChangeLog
Siddhesh Poyarekar [Wed, 2 Aug 2017 15:15:20 +0000 (20:45 +0530)]
Rotate ChangeLog

7 years agoOpen master for development
Siddhesh Poyarekar [Wed, 2 Aug 2017 13:53:16 +0000 (19:23 +0530)]
Open master for development

7 years agoUpdate for 2.26 release
Siddhesh Poyarekar [Wed, 2 Aug 2017 12:57:16 +0000 (18:27 +0530)]
Update for 2.26 release

7 years agoUpdate contributors and latest gcc and binutils versions
Siddhesh Poyarekar [Wed, 2 Aug 2017 12:52:58 +0000 (18:22 +0530)]
Update contributors and latest gcc and binutils versions

7 years agoFix up ChangeLog formatting
Siddhesh Poyarekar [Wed, 2 Aug 2017 08:04:13 +0000 (13:34 +0530)]
Fix up ChangeLog formatting

7 years agoAdd list of bugs fixed in 2.26
Siddhesh Poyarekar [Wed, 2 Aug 2017 02:56:45 +0000 (08:26 +0530)]
Add list of bugs fixed in 2.26

7 years agoUpdate translations
Siddhesh Poyarekar [Wed, 2 Aug 2017 02:37:58 +0000 (08:07 +0530)]
Update translations

7 years agoUpdate NEWS
Siddhesh Poyarekar [Wed, 2 Aug 2017 02:37:16 +0000 (08:07 +0530)]
Update NEWS

7 years agoUpdate translations
Siddhesh Poyarekar [Sun, 30 Jul 2017 18:43:08 +0000 (00:13 +0530)]
Update translations

7 years agomutex: Fix robust mutex lock acquire (Bug 21778)
Carlos O'Donell [Sat, 29 Jul 2017 04:02:03 +0000 (00:02 -0400)]
mutex: Fix robust mutex lock acquire (Bug 21778)

65810f0ef05e8c9e333f17a44e77808b163ca298 fixed a robust mutex bug but
introduced BZ 21778: if the CAS used to try to acquire a lock fails, the
expected value is not updated, which breaks other cases in the loce
acquisition loop.  The fix is to simply update the expected value with
the value returned by the CAS, which ensures that behavior is as if the
first case with the CAS never happened (if the CAS fails).

This is a regression introduced in the last release.

Tested on x86_64, i686, ppc64, ppc64le, s390x, aarch64, armv7hl.

7 years agomicroblaze: Resolve non-relocatable branch in pt-vfork.S (BZ#21779)
Nathan Rossi [Fri, 28 Jul 2017 12:21:14 +0000 (09:21 -0300)]
microblaze: Resolve non-relocatable branch in pt-vfork.S (BZ#21779)

The relative branch directly to __libc_vfork results in an relocation
that cannot be resolved. Specifically a R_MICROBLAZE_64_PCREL relocation
is created for this branch, however for MicroBlaze R_MICROBLAZE_64_PCREL
type relocations symbols are not resolved. Additionally due to the
branch being located in the .text section the instruction cannot be
rewritten as the section is not writable, and causes a segfault at
runtime when loading libpthread.

To resolve this issue, ensure the branch is done using PLT. This removes
the need to modify the instruction and trades the R_MICROBLAZE_64_PCREL
for a more common R_MICROBLAZE_JUMP via the PLT.

[BZ #21779]
* sysdeps/unix/sysv/linux/microblaze/pt-vfork.S: Branch using PLT.

7 years agoUpdate Microblaze libm-test-ulps
Nathan Rossi [Fri, 28 Jul 2017 12:19:40 +0000 (09:19 -0300)]
Update Microblaze libm-test-ulps

* sysdeps/microblaze/libm-test-ulps: Update.

7 years agoUpdate Nios II ULPs file.
Chung-Lin Tang [Fri, 28 Jul 2017 10:54:35 +0000 (03:54 -0700)]
Update Nios II ULPs file.

7 years agorwlock: Fix explicit hand-over (bug 21298)
Carlos O'Donell [Fri, 28 Jul 2017 04:22:44 +0000 (00:22 -0400)]
rwlock: Fix explicit hand-over (bug 21298)

Without this fix, the rwlock can fail to execute the explicit hand-over
in certain cases (e.g., empty critical sections that switch quickly between
read and write phases).  This can then lead to errors in how __wrphase_futex
is accessed, which in turn can lead to deadlocks.

7 years agoUpdate Alpha libm-test-ulps
Adhemerval Zanella [Thu, 27 Jul 2017 17:21:28 +0000 (14:21 -0300)]
Update Alpha libm-test-ulps

* sysdeps/alpha/fpu/libm-test-ulps: Update.

7 years agoFix country name in title of mai_NP locale
Akhilesh Kumar [Thu, 27 Jul 2017 10:29:25 +0000 (15:59 +0530)]
Fix country name in title of mai_NP locale

[BZ #21848]
* locales/mai_NP (LC_IDENTIFICATION): Fix country name in title.

7 years agoImprove country_name in be_BY@latin
Ihar Hrachyshka [Thu, 27 Jul 2017 09:44:40 +0000 (11:44 +0200)]
Improve country_name in be_BY@latin

7 years agoMinor improvements to new az_IR locale
Mike FABIAN [Thu, 27 Jul 2017 09:04:38 +0000 (11:04 +0200)]
Minor improvements to new az_IR locale

* locales/az_IR (LC_MESSAGES): Improve yesexpr and noexpr.
* locales/az_IR (LC_ADDRESS): Fix typo in comment  and
use the individual iso-639-3 code for South Azerbaijani
"azb" in lang_term.
* locales/az_IR (LC_NAME): Improve readability of name_fmt in source.

7 years agoAdd new az_IR locale
Mousa Moradi [Thu, 27 Jul 2017 08:41:21 +0000 (10:41 +0200)]
Add new az_IR locale

[BZ #14172]
* locales/az_IR: New file.

7 years agoFix wrong monetary system used in ta_LK locale
Akhilesh Kumar [Thu, 27 Jul 2017 08:10:57 +0000 (10:10 +0200)]
Fix wrong monetary system used in ta_LK locale

[BZ #21839]
* locales/ta_LK (LC_MONETARY): copy "si_LK"

7 years agomanual: Refactor documentation of CHAR_BIT.
Rical Jasan [Tue, 20 Jun 2017 13:39:27 +0000 (06:39 -0700)]
manual: Refactor documentation of CHAR_BIT.

This single-@item @table is better defined with @deftypevr, since the
CHAR_BIT macro has @standards (being declared in a header), and @items
in @tables are not considered annotatable.  Using @deftypevr
automatically includes the macro in the Variable and Constant Macro
Index and ensures its inclusion the Summary of Library Facilities.
@deftypevr is used to record the type of the macro so that it also
appears in the Summary.

The description is updated to mention a later POSIX requirement that
this macro have the value 8.

* manual/lang.texi (CHAR_BIT): Convert from an @table to an
@deftypevr.  Change standard from ISO to C90.  Mention the
POSIX.1-2001 requirement of the value 8.

7 years agomanual: Complete @standards in creature.texi.
Rical Jasan [Thu, 27 Jul 2017 10:16:46 +0000 (03:16 -0700)]
manual: Complete @standards in creature.texi.

* manual/creature.texi (_REENTRANT): Annotate as obsolete.
(_THREAD_SAFE): Likewise.

7 years agoFix country_name in nds_NL
Mike FABIAN [Thu, 27 Jul 2017 07:33:56 +0000 (09:33 +0200)]
Fix country_name in nds_NL

7 years agoFix Latin characters and month sequence in mai_IN
Akhilesh Kumar [Thu, 27 Jul 2017 03:18:04 +0000 (08:48 +0530)]
Fix Latin characters and month sequence in mai_IN

Fixes [BZ #21822] with commit id 832f8e048773da9aac99cd1ee57f2ccbd40860f6

[BZ #21844]
* locales/mai_IN (LC_TIME): Fix Latin characters and month sequence.

7 years agoRevert "Remove redundant data for LC_MONETARY for Indian locales"
Mike FABIAN [Wed, 26 Jul 2017 18:53:38 +0000 (20:53 +0200)]
Revert "Remove redundant data for LC_MONETARY for Indian locales"

This reverts commit 480af555f35201a646531cfd7c68a58905edba90.

Revert:
2017-07-26  Akhilesh Kumar <akhilesh.k@samsung.com>

Remove redundant data for LC_MONETARY

[BZ #21836]
* locales/ar_IN (LC_MONETARY): copy "hi_IN"
* locales/as_IN (LC_MONETARY): copy "hi_IN"
* locales/bhb_IN (LC_MONETARY): copy "hi_IN"
* locales/bn_IN (LC_MONETARY): copy "hi_IN"
* locales/en_IN (LC_MONETARY): copy "hi_IN"
* locales/gu_IN (LC_MONETARY): copy "hi_IN"
* locales/kn_IN (LC_MONETARY): copy "hi_IN"
* locales/kok_IN (LC_MONETARY): copy "hi_IN"
* locales/ks_IN (LC_MONETARY): copy "hi_IN"
* locales/ml_IN (LC_MONETARY): copy "hi_IN"
* locales/mr_IN (LC_MONETARY): copy "hi_IN"
* locales/or_IN (LC_MONETARY): copy "hi_IN"
* locales/pa_IN (LC_MONETARY): copy "hi_IN"
* locales/sa_IN (LC_MONETARY): copy "hi_IN"
* locales/sd_IN (LC_MONETARY): copy "hi_IN"
* locales/ta_IN (LC_MONETARY): copy "hi_IN"
* locales/tcy_IN (LC_MONETARY): copy "hi_IN"
* locales/te_IN (LC_MONETARY): copy "hi_IN"
* locales/ur_IN (LC_MONETARY): copy "hi_IN"

7 years agoRemove erroneous spaces from some strings in locale files
Mike FABIAN [Wed, 26 Jul 2017 14:46:26 +0000 (16:46 +0200)]
Remove erroneous spaces from some strings in locale files

* locales/hif_FJ (LC_TIME): Remove erroneous spaces from d_t_fmt.
* locales/km_KH (LC_TIME): Remove erroneous space from d_t_fmt.
* locales/sm_WS (LC_TIME): Remove erroneous spaces from day.

7 years agoRemove erroneous tabs from some strings in locale files
Mike FABIAN [Wed, 26 Jul 2017 12:47:18 +0000 (14:47 +0200)]
Remove erroneous tabs from some strings in locale files

* locales/et_EE (LC_ADDRESS): Remove tabs in postal_fmt.
* locales/hif_FJ (LC_TIME): Remove tabs in t_fmt_ampm.
* locales/hif_FJ (LC_NAME): Remove tabs in name_fmt.

7 years agoFix inappropriate characters in LC_IDENTIFICATION in several locales
Mike FABIAN [Wed, 26 Jul 2017 12:30:08 +0000 (14:30 +0200)]
Fix inappropriate characters in LC_IDENTIFICATION in several locales

Found using the script check-localedef.py by Zack Weinberg.

* locales/agr_PE (LC_IDENTIFICATION): Fix inappropriate character.
* locales/an_ES (LC_IDENTIFICATION): Fix inappropriate character.
* locales/gv_GB (LC_IDENTIFICATION): Fix inappropriate character.
* locales/kw_GB (LC_IDENTIFICATION): Fix inappropriate character.
* locales/ln_CD (LC_IDENTIFICATION): Fix inappropriate character.
* locales/nb_NO (LC_IDENTIFICATION): Fix inappropriate character.
* locales/pap_CW (LC_IDENTIFICATION): Fix inappropriate character.
* locales/se_NO (LC_IDENTIFICATION): Fix inappropriate character.
* locales/sgs_LT (LC_IDENTIFICATION): Fix inappropriate character.

7 years agoFix inappropriate escape sequences in LC_IDENTIFICATION in several locales
Mike FABIAN [Wed, 26 Jul 2017 11:37:17 +0000 (13:37 +0200)]
Fix inappropriate escape sequences in LC_IDENTIFICATION in several locales

Found using the script check-localedef.py by Zack Weinberg.

* locales/aa_DJ (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/aa_ER (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/aa_ET (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/ak_GH (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/bn_BD (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/de_IT (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/es_CU (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/gd_GB (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/gl_ES (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/he_IL (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/hr_HR (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/ht_HT (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/hy_AM (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/lg_UG (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/mai_IN (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/mg_MG (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/pl_PL (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/quz_PE (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/se_NO (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/sl_SI (LC_IDENTIFICATION): Fix inappropriate escape sequence.
* locales/ta_LK (LC_IDENTIFICATION): Fix inappropriate escape sequence.

7 years agoIndian scripts: More fixes after the recent import.
Rafal Luzynski [Tue, 25 Jul 2017 23:44:02 +0000 (01:44 +0200)]
Indian scripts: More fixes after the recent import.

After the recent import of month names from CLDRv31 (bug 21217,
commit c853f14) an import of abbreviated month names is also needed
to make sure they match the full forms.

In case of kok_IN CLDR does not provide the abbreviated month names
explicitly but uses full month names in such cases so abmon section
has been copied from mon.

* localedata/locales/as_IN (abmon): Update from CLDR.
* localedata/locales/bn_BD (abmon): Likewise.
* localedata/locales/bn_IN (abmon): Likewise.
* localedata/locales/gu_IN (abmon): Likewise.
* localedata/locales/hi_IN (abmon): Likewise.
* localedata/locales/kn_IN (abmon): Likewise.
* localedata/locales/ml_IN (abmon): Likewise.
* localedata/locales/mr_IN (abmon): Likewise.
* localedata/locales/ne_NP (abmon): Likewise.
* localedata/locales/or_IN (abmon): Likewise.
* localedata/locales/pa_IN (abmon): Likewise.
* localedata/locales/ta_IN (abmon): Likewise.
* localedata/locales/te_IN (abmon): Likewise.

* localedata/locales/kok_IN (abmon): Likewise but copied from mon.

7 years agoUpdate translations
Siddhesh Poyarekar [Wed, 26 Jul 2017 12:57:41 +0000 (18:27 +0530)]
Update translations

       * po/bg.po: Update translations.
       * po/cs.po: Likewise.
       * po/de.po: Likewise.
       * po/pl.po: Likewise.
       * po/uk.po: Likewise.
       * po/vi.po: Likewise.

7 years agoUse POSIX Portable Character Set in the new mai_NP locale source file instead of...
Mike FABIAN [Wed, 26 Jul 2017 10:24:07 +0000 (12:24 +0200)]
Use POSIX Portable Character Set in the new  mai_NP locale source file instead of <Uxxxx>

* localedata/locales/mai_NP: Use POSIX Portable Character Set.

7 years agoAdded New Locale mai_NP
Akhilesh Kumar [Wed, 26 Jul 2017 03:51:32 +0000 (09:21 +0530)]
Added New Locale mai_NP

Maithili which is an official language not only in India but in Nepal as well.
https://en.wikipedia.org/wiki/Maithili_language
Reference is taken form mai_IN.

[BZ #21835]
* localedata/locales/mai_NP: New file.
* localedata/SUPPORTED: Add mai_NP/UTF-8.

7 years agoRemoved redundant data for the_NP locale
Akhilesh Kumar [Wed, 26 Jul 2017 08:13:59 +0000 (13:43 +0530)]
Removed redundant data for the_NP locale

[BZ #21838]
* locales/the_NP (LC_CTYPE): copy "ne_NP"
* locales/the_NP (LC_COLLATE): copy "ne_NP"
* locales/the_NP (LC_MONETARY): copy "ne_NP"
* locales/the_NP (LC_TELEPHONE): copy "ne_NP"

7 years agoRemove redundant data for LC_MONETARY in sd_IN@devanagari
Mike FABIAN [Wed, 26 Jul 2017 09:09:13 +0000 (11:09 +0200)]
Remove redundant data for LC_MONETARY in sd_IN@devanagari

7 years agoRemove redundant data for LC_MONETARY for Indian locales
Akhilesh Kumar [Wed, 26 Jul 2017 07:49:14 +0000 (13:19 +0530)]
Remove redundant data for LC_MONETARY for Indian locales

[BZ #21836]
* locales/ar_IN (LC_MONETARY): copy "hi_IN"
* locales/as_IN (LC_MONETARY): copy "hi_IN"
* locales/bhb_IN (LC_MONETARY): copy "hi_IN"
* locales/bn_IN (LC_MONETARY): copy "hi_IN"
* locales/en_IN (LC_MONETARY): copy "hi_IN"
* locales/gu_IN (LC_MONETARY): copy "hi_IN"
* locales/kn_IN (LC_MONETARY): copy "hi_IN"
* locales/kok_IN (LC_MONETARY): copy "hi_IN"
* locales/ks_IN (LC_MONETARY): copy "hi_IN"
* locales/ml_IN (LC_MONETARY): copy "hi_IN"
* locales/mr_IN (LC_MONETARY): copy "hi_IN"
* locales/or_IN (LC_MONETARY): copy "hi_IN"
* locales/pa_IN (LC_MONETARY): copy "hi_IN"
* locales/sa_IN (LC_MONETARY): copy "hi_IN"
* locales/sd_IN (LC_MONETARY): copy "hi_IN"
* locales/ta_IN (LC_MONETARY): copy "hi_IN"
* locales/tcy_IN (LC_MONETARY): copy "hi_IN"
* locales/te_IN (LC_MONETARY): copy "hi_IN"
* locales/ur_IN (LC_MONETARY): copy "hi_IN"

7 years agoAdd [BZ #21828] to ChangeLog
Mike FABIAN [Wed, 26 Jul 2017 06:20:20 +0000 (08:20 +0200)]
Add [BZ #21828] to ChangeLog

7 years agoMention in NEWS that the Unicode 10.0.0 update causes user visible changes
Mike FABIAN [Wed, 26 Jul 2017 06:15:01 +0000 (08:15 +0200)]
Mention in NEWS that the Unicode 10.0.0 update causes user visible changes

7 years agosv: Update translation
Siddhesh Poyarekar [Wed, 26 Jul 2017 01:39:50 +0000 (07:09 +0530)]
sv: Update translation

7 years agoFix inconsistency in country_isbn and missing prefixes
Akhilesh Kumar [Thu, 20 Jul 2017 07:05:29 +0000 (12:35 +0530)]
Fix inconsistency in country_isbn and missing prefixes

[BZ #21797]
* locales/et_EE (LC_ADDRESS): Fix country_isbn.
* locales/hy_AM (LC_ADDRESS): Fix country_isbn.

7 years agoAdd country_name to several locales
Mike FABIAN [Mon, 24 Jul 2017 12:52:09 +0000 (14:52 +0200)]
Add country_name to several locales

* locales/an_ES (LC_ADDRESS): Add country_name.
* locales/ayc_PE (LC_ADDRESS): Add country_name.
* locales/be_BY@latin (LC_ADDRESS): Add country_name.
* locales/dv_MV (LC_ADDRESS): Add country_name,
country_ab2, and country_ab3
* locales/ia_FR (LC_ADDRESS): Add country_name.
* locales/ik_CA (LC_ADDRESS): Add country_name.
* locales/lij_IT (LC_ADDRESS): Add country_name.
* locales/mi_NZ (LC_ADDRESS): Add country_name.
* locales/nds_DE (LC_ADDRESS): Add country_name.
* locales/nds_NL (LC_ADDRESS): Add country_name.
* locales/oc_FR (LC_ADDRESS): Add country_name.
* locales/sa_IN (LC_ADDRESS): Add country_name.
* locales/sc_IT (LC_ADDRESS): Add country_name.
* locales/sd_IN (LC_ADDRESS): Add country_name.
* locales/tcy_IN (LC_ADDRESS): Add country_name.
* locales/tg_TJ (LC_ADDRESS): Add country_name.
* locales/tl_PH (LC_ADDRESS): Add country_name.
* locales/tt_RU (LC_ADDRESS): Add country_name.
* locales/wo_SN (LC_ADDRESS): Add country_name.
* locales/zh_SG (LC_ADDRESS): Add country_name.

7 years agoFix name_mrs for mag_IN
Akhilesh Kumar [Mon, 24 Jul 2017 12:10:26 +0000 (17:40 +0530)]
Fix name_mrs for mag_IN

[BZ #21825]
* locales/mag_IN(LC_NAME): Fix name_mrs.

7 years agoAdded yesstr/nostr for sa_IN
Akhilesh Kumar [Mon, 24 Jul 2017 07:13:47 +0000 (12:43 +0530)]
Added yesstr/nostr for sa_IN

[BZ #21823]
* locales/sa_IN (LC_MESSAGES): Add yesstr,nostr

7 years agoFix LC_TIME for mai_IN
Akhilesh Kumar [Mon, 24 Jul 2017 06:56:11 +0000 (12:26 +0530)]
Fix LC_TIME for mai_IN

[BZ #21822]
* locales/mai_IN (LC_TIME): Fix abday, day, mon etc...

7 years agozic: Use PRIdMAX to print line numbers
Siddhesh Poyarekar [Tue, 25 Jul 2017 07:04:14 +0000 (12:34 +0530)]
zic: Use PRIdMAX to print line numbers

The PRIdLINENUM abstraction is unnecessary and breaks libc.pot
generation.

* timezone.zic (PRIdLINENO): Remove.
(verror): Use PRIdMAX.
* po/libc.pot: Regenerate.

7 years agotunables: Use direct syscall for access (BZ#21744)
Adhemerval Zanella [Mon, 17 Jul 2017 21:11:12 +0000 (18:11 -0300)]
tunables: Use direct syscall for access (BZ#21744)

The function maybe_enable_malloc_check, which is called by
__tunables_init, calls __access_noerrno.  It isn't problem when
symbol is is in ld.so, which has a special version of __access_noerrno
without stack protector.  But when glibc is built with stack protector,
maybe_enable_malloc_check in libc.a can't call the regular version of
__access_noerrno with stack protector.

This patch changes how Linux defines the __access_noerrno to be an
inline call instead and thus preventing defining different build
rules for ld/static and shared.

H.J. Lu  <hongjiu.lu@intel.com>
Adhemerval Zanella  <adhemerval.zanella@linaro.org>

[BZ #21744]
* elf/dl-tunables.c: Include not-errno.h header.
* include/unistd.h (__access_noerrno): Remove definition.
* sysdeps/unix/sysv/linux/access.c (__access_noerrno): Likewise.
* sysdeps/generic/not-errno.h: New file.
* sysdeps/unix/sysv/linux/not-errno.h: Likewise.

7 years agoAvoid accessing corrupted stack from __stack_chk_fail [BZ #21752]
H.J. Lu [Mon, 24 Jul 2017 13:06:08 +0000 (06:06 -0700)]
Avoid accessing corrupted stack from __stack_chk_fail [BZ #21752]

__libc_argv[0] points to address on stack and __libc_secure_getenv
accesses environment variables which are on stack.  We should avoid
accessing stack when stack is corrupted.

This patch also renames function argument in __fortify_fail_abort
from do_backtrace to need_backtrace to avoid confusion with do_backtrace
from enum __libc_message_action.

[BZ #21752]
* debug/fortify_fail.c (__fortify_fail_abort): Don't pass down
__libc_argv[0] if we aren't doing backtrace.  Rename do_backtrace
to need_backtrace.
* sysdeps/posix/libc_fatal.c (__libc_message): Don't call
__libc_secure_getenv if we aren't doing backtrace.

7 years agoRemove extra semicolons in struct pthread_mutex (bug 21804)
Andreas Schwab [Mon, 24 Jul 2017 09:06:19 +0000 (11:06 +0200)]
Remove extra semicolons in struct pthread_mutex (bug 21804)